OSDN Git Service

wwww
[proj16/16.git] / src / fontgfx.c
old mode 100644 (file)
new mode 100755 (executable)
index 644af73..edea863
 //#include "lib/16text.h"\r
 #include "lib/modex16.h"\r
 \r
+global_game_variables_t gvar;\r
+\r
 void main(int argc, char near *argv[])\r
 {\r
        //JMOJI\r
        static byte e;\r
        //word ri;\r
        byte pee[2];\r
-       page_t screen;\r
        static byte ibmlogo[]="IIIIIII  BBBBBBBBB    MMMMM       MMMMM\n\\r
 IIIIIII  BBBBBBBBBBB  MMMMMM     MMMMMM\n\\r
   III     BBB    BBB   MMMMMM   MMMMMM\n\\r
@@ -41,32 +42,33 @@ IIIIIII  BBBBBBBBBBB  MMMMMM     MMMMMM\n\
 IIIIIII  BBBBBBBBBBB  MMMM   MMM   MMMM\n\\r
 IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\\r
 ";\r
-       static byte rose[]="                                              :. ,..\\r
-                                            .' :~.':_.,\\r
-                                          .'   ::.::'.'\\r
-                                         :     ::'  .:\\r
-                                       `.:    .:  .:/\\r
-                                        `::--.:'.::'\\r
-                                          |. _:===-'\\r
-                                         / /\\r
-                        ,---.---.    __,','\\r
-                       (~`.  \   )   )','.,---..\\r
-                        `v`\ | ,' .-'.:,'_____   `.\\r
-                            )|/.-~.--~~--.   ~~~-. \\\r
-                          _/-'_.-~        ""---.._`.|\\r
-                     _.-~~_.-~                    ""'\\r
-              _..--~~_.(~~\\r
-   __...---~~~_..--~~\\r
-,'___...---~~~\\r
+       static byte rose[]="                                              :. ,..\n\\r
+                                            .' :~.':_.,\n\\r
+                                          .'   ::.::'.'\n\\r
+                                         :     ::'  .:\n\\r
+                                       `.:    .:  .:/\n\\r
+                                        `::--.:'.::'\n\\r
+                                          |. _:===-'\n\\r
+                                         / /\n\\r
+                        ,---.---.    __,','\n\\r
+                       (~`.  \   )   )','.,---..\n\\r
+                        `v`\ | ,' .-'.:,'_____   `.\n\\r
+                            )|/.-~.--~~--.   ~~~-. \ \n\\r
+                          _/-'_.-~        ""---.._`.|\n\\r
+                     _.-~~_.-~                    ""'\n\\r
+              _..--~~_.(~~\n\\r
+   __...---~~~_..--~~\n\\r
+,'___...---~~~\n\\r
 ";\r
 //     static byte *rosa;\r
        static word chx, chy, colpee;\r
        textInit();\r
-       modexEnter();\r
+       VGAmodeX(1, &gvar);\r
        /* setup camera and screen~ */\r
-       screen = modexDefaultPage();\r
-       screen.width += (16*2);\r
-       screen.height += (16*2);\r
+       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
+       //gvar.video.page[0].width += (16*2);\r
+       //gvar.video.page[0].height += (16*2);\r
+//++++ modexShowPage(&gvar.video.page[0]);\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
        chx=0;\r
@@ -74,15 +76,15 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
        colpee=32;\r
        for(e=0x00; e<=0xFE; e++)\r
        {\r
-               if(chx+8>(SCREEN_WIDTH/2)-16)\r
+               if(chx+8>(gvar.video.page[0].width/2))\r
                {\r
                        chx=0;\r
                        chy+=8;\r
                        sprintf(pee,"%u", colpee);\r
-                       modexprint(&screen, 200, 200, 1, 47, 0, &pee);\r
+                       modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);\r
                        //getch();\r
                }\r
-               modexprint(&screen, chx, chy, 1, 0, colpee, &e);\r
+               modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);\r
                chx+=9;\r
                colpee++;\r
                if(colpee>=32+24) colpee=32;\r
@@ -90,10 +92,11 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
        //modexprint(100, 100, 1, 47, 0, "wwww");\r
        getch();\r
 //     modexprint(0, 0, 1, 0, colpee, &rose);\r
-       modexprint(&screen, 0, 0, 0, 0, colpee, &ibmlogo);\r
+//++++ modexprint(&gvar.video.page[0], 0, 0, 0, 0, colpee, &ibmlogo);\r
+       modexprintbig(&gvar.video.page[0], 0, 0, 1, colpee, 0, "IBM");\r
 //     modexprint(0, 0, 1, 0, colpee, ROSE);\r
        getch();\r
-       modexLeave();\r
+       VGAmodeX(0, &gvar);\r
 //     rosa=malloc(sizeof(ROSE));\r
 //     (*rosa)=(byte)ROSE;\r
        printf("\n%s\n", rose);\r