home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
progmisc
/
euphor10.zip
/
SELECT.E
< prev
next >
Wrap
Text File
|
1993-05-05
|
725b
|
30 lines
-------------------------------------
-- search for a good graphics mode --
-------------------------------------
constant nice_color_modes = {261,260,259,258,257,256,18,19,16,14,13,4},
nice_mono_modes = {17, 11, 15, 6, 5}
global function select_mode(integer choice)
-- try to select the choice mode,
-- but if it fails try other modes
sequence vc, modes
vc = video_config()
if vc[VC_COLOR] then
modes = choice & nice_color_modes
else
modes = choice & nice_mono_modes
end if
for i = 1 to length(modes) do
graphics_mode(modes[i])
vc = video_config()
if vc[VC_XPIXELS] > 0 then
return 1
end if
end for
return 0
end function