Re: New prog!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matthew A Nunyabidness wrote:
>I wrote a color band program in Euphoria ...
>If you think you can enhance it or something, email me.
>If you have any tips on how to make a screen mode in Euphoria or
>BASIC(256 colors, 640x480 graphics, 80x25 text), tell me!!!!!!!!!!!!!
>Screen 13 is the best I can get, but I want a finer resolution.

try the following, a combination of improvement and
autoselection of the best video mode based on your
hardware and the program requirements.
kills 2 birds with one bullet, i hope.

-------------begin newband.ex (tested code)
include graphics.e
include get.e
include select.e
constant bestmode=257 --640x480x256, any higher and text too small
constant fallback=19  --gotta have at least this
                      --equal to mode 13 in QuickBASIC
--autopick the best video mode
--select_mode returns 0 if *failed*
--graphics_mode returns 0 if *successful*
if select_mode(bestmode) = 0 then       --try the most wanted first
   if not graphics_mode(fallback) then  --last ditch/last hope...
      puts(1,"Cannot find good graphics mode\n")
      abort(1)
   end if
end if
--MAIN
for a=0  to 256 do
   for y=0 to 39 do
     pixel(a,{a,y})
   end for
end for
puts(1,"\n\n\n\nThe color band, by matt1278 at juno.com")
puts(1,"\nEnjoy!")
puts(1,"\nHit any key\n")
if wait_key() then end if
--exit program
if graphics_mode(-1) then end if
clear_screen()

--------------------------end newband.ex

--Hawke'

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu