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