]> 4ch.mooo.com Git - 16.git/blob - 16/modex16/PCXTEST.C
modified: 16/DOS_GFX.EXE
[16.git] / 16 / modex16 / PCXTEST.C
1 #include <stdio.h>\r
2 #include "modex16.h"\r
3 \r
4 void main() {\r
5     bitmap_t bmp;\r
6     int index;\r
7         int ch=0x0;\r
8 \r
9     bmp = modexLoadPcx("ed.pcx");\r
10     modexEnter();\r
11 \r
12     /* fix up the palette and everything */\r
13     modexPalUpdate(bmp.palette);\r
14 \r
15     /* don't show the drawing page */\r
16     modexShowPage(VGA + PAGE_SIZE);\r
17 \r
18     /* clear and draw one sprite and one bitmap */\r
19     modexClearRegion(VGA, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);\r
20     modexDrawBmp(VGA, 20, 20, &bmp, 1);\r
21     modexDrawBmp(VGA, 100, 20, &bmp, 0);\r
22     modexShowPage(VGA);\r
23 //    for(index = 0; index<500; index++) {\r
24 while(!kbhit()){ // conditions of screen saver\r
25         modexWaitBorder();\r
26                         ch=getch();\r
27                         if(ch==0x71)break; // 'q'\r
28                         if(ch==0x1b)break; // 'ESC'\r
29     }\r
30     modexLeave();\r
31 \r
32     return;\r
33 }\r