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