]> 4ch.mooo.com Git - 16.git/blob - 16/modex16/PCXTEST.C
modified: 16/modex16/MAKEFILE
[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("koishi^^.pcx");\r
14         bmp = modexLoadPcx("chikyuu.pcx");\r
15         bmp3 = modexLoadPcx("flower.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, 0, 0, &bmp, 1);
34         modexDrawBmp(VGA, 100, 20, &bmp3, 1);\r
35     modexShowPage(VGA);\r
36 //    for(index = 0; index<500; index++) {\r
37         //while(1/*!kbhit()*/){ // conditions of screen saver\r
38         while (!kbhit()){  /* Wait for a keystroke                         */\r
39                 modexWaitBorder();\r
40                                 //ch=getch();\r
41                                 //if(ch==0x71)break; // 'q'\r
42                                 //if(ch==0x1b)break; // 'ESC'\r
43         }\r
44         (void) getch();   /* Clear the keyboard buffer                    */\r
45         modexLeave();\r
46 \r
47     return;\r
48 }\r