]> 4ch.mooo.com Git - 16.git/blobdiff - src/fontgfx.c
updating copy left. i am super fuckin busy with school, and trying to get life back...
[16.git] / src / fontgfx.c
index 50427a3ad8af9075a7b5924beb3e27b221f8b34d..6f792549977414bca2ca599b5b1457b3efcf8623 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
  */\r
 #include <stdio.h>\r
 #include <conio.h>\r
-#include "lib/types.h"\r
+#include "src/lib/16_t.h"\r
 //#include "lib/16text.h"\r
-#include "lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
 \r
 #include <hw/cpu/cpu.h>\r
 #include <hw/dos/dos.h>\r
 #include <hw/vga/vga.h>\r
-#include <hw/vga/vgatty.h>\r
-\r
-global_game_variables_t gvar;\r
 \r
 void main(int argc, char near *argv[])\r
 {\r
-       struct vga_mode_params cm;\r
+       static global_game_variables_t gvar;\r
        //JMOJI\r
        static byte e;\r
        //word ri;\r
@@ -96,14 +93,12 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
        gvar.video.page[0].width += (16*2);\r
        gvar.video.page[0].height += (16*2);\r
        modexShowPage(&gvar.video.page[0]);\r
-       vga_read_crtc_mode(&cm);\r
        // NTS: We're in Mode-X now. printf() is useless. Do not use printf(). Or INT 10h text printing. Or DOS console output.\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
        chx=0;\r
        chy=0;\r
        colpee=32;\r
-//     bios_cls();\r
        /* position the cursor to home */\r
 //     vga_moveto(0,0);\r
 //     vga_sync_bios_cursor();\r
@@ -119,11 +114,13 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
                }\r
                sprintf(pee, "%zc", e);\r
                modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e);\r
-               chx+=9;\r
+               chx+=8;\r
                colpee++;\r
                if(colpee>=32+24) colpee=32;\r
        }\r
        getch();\r
+       modexprint(&gvar.video.page[0], gvar.video.page[0].width - (8*16)/*HACK: The rose ASCII is too wide for 320x240 so offset it to make sure the petals are visible*/, 8, 1, 45, 0, &rose);\r
+       getch();\r
        //modexprint(100, 100, 1, 47, 0, "wwww");\r
 //     modexprint(0, 0, 1, 0, colpee, &rose);\r
 //++++ modexprint(&gvar.video.page[0], 0, 0, 0, 0, colpee, &ibmlogo);\r
@@ -131,11 +128,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 //     modexprint(0, 0, 1, 0, colpee, ROSE);\r
 //++++ getch();\r
        VGAmodeX(0, 1, &gvar);\r
-//     rosa=malloc(sizeof(ROSE));\r
-//     (*rosa)=(byte)ROSE;\r
        printf("\n%s\n", rose);\r
        //printf("\nh=%d\n", '8');\r
 //     printf("\n%c\n", e);\r
-       printf("cm.offset=%d\n", cm.offset);\r
-       printf("vga_state.vga_stride=%d\n", vga_state.vga_stride);\r
 }\r