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