1
Program GetModeRange_Example;
3
{ This program demonstrates how to find all available graph modes }
8
{ Currently, only 4, 8, 15 and 16 bit modes are supported
9
but this may change in the future }
10
gdnames: array[D4bit..D16bit] of string[6] =
11
('4 bit','6 bit','8 bit','12 bit','15 bit','16 bit');
16
gd, c, low, high, res: integer;
18
assign(t,'modes.txt');
21
for gd := D4bit to D16bit do
23
{ Get the available mode numbers for this driver }
24
getModeRange(gd,low,high);
27
Writeln(t,': low modenr = ',low,', high modenr = ',high);
30
no resolutions are supported for this bitdepth }
34
writeln(t,' No modes supported!');
39
{ Enter all supported resolutions for this bitdepth
40
and write their characteristics to the file }
41
for c := low to high do
44
writeln(t,' testing mode nr ',c);
49
{ An error occurred when entering the mode? }
51
writeln(t,grapherrormsg(res))
54
write(t,'maxx: ',getmaxx,', maxy: ',getmaxy);
55
Writeln(t,', maxcolor: ',getmaxcolor);
65
Writeln('All supported modes are listed in modes.txt files');