X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ffontgfx.c;h=3edf22d56d576b13ed54387904b405b785974023;hb=d71e4ebbd3770b48eee2b2cc18288b97aad4e1e4;hp=4fc08ee98b3b790a05a050578988751c5e2e5384;hpb=f1605e99959acfb32b36ae875601fc14dd670742;p=16.git diff --git a/src/fontgfx.c b/src/fontgfx.c index 4fc08ee9..3edf22d5 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -25,13 +25,14 @@ //#include "lib/16text.h" #include "lib/modex16.h" +global_game_variables_t gvar; + void main(int argc, char near *argv[]) { //JMOJI static byte e; //word ri; byte pee[2]; - page_t screen; static byte ibmlogo[]="IIIIIII BBBBBBBBB MMMMM MMMMM\n\ IIIIIII BBBBBBBBBBB MMMMMM MMMMMM\n\ III BBB BBB MMMMMM MMMMMM\n\ @@ -62,12 +63,12 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ // static byte *rosa; static word chx, chy, colpee; textInit(); - modexEnter(); + VGAmodeX(1, &gvar); /* setup camera and screen~ */ - screen = modexDefaultPage(); - //screen.width += (16*2); - //screen.height += (16*2); -//++++ modexShowPage(&screen); + gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]); + //gvar.video.page[0].width += (16*2); + //gvar.video.page[0].height += (16*2); +//++++ modexShowPage(&gvar.video.page[0]); //modexprint(16, 16, 1, 15, "wwww"); //getch(); chx=0; @@ -75,15 +76,15 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ colpee=32; for(e=0x00; e<=0xFE; e++) { - if(chx+8>(screen.width/2)) + if(chx+8>(gvar.video.page[0].width/2)) { chx=0; chy+=8; sprintf(pee,"%u", colpee); - modexprint(&screen, 200, 200, 1, 47, 0, &pee); + modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1); //getch(); } - modexprint(&screen, chx, chy, 1, 0, colpee, &e); + modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1); chx+=9; colpee++; if(colpee>=32+24) colpee=32; @@ -91,11 +92,11 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ //modexprint(100, 100, 1, 47, 0, "wwww"); getch(); // modexprint(0, 0, 1, 0, colpee, &rose); -//++++ modexprint(&screen, 0, 0, 0, 0, colpee, &ibmlogo); - modexprintbig(&screen, 0, 0, 1, colpee, 0, "IBM"); +//++++ modexprint(&gvar.video.page[0], 0, 0, 0, 0, colpee, &ibmlogo); +// modexprintbig(&gvar.video.page[0], 0, 0, 1, colpee, 0, "IBM"); // modexprint(0, 0, 1, 0, colpee, ROSE); getch(); - modexLeave(); + VGAmodeX(0, &gvar); // rosa=malloc(sizeof(ROSE)); // (*rosa)=(byte)ROSE; printf("\n%s\n", rose);