OSDN Git Service

repo sync and i did some debugging ww
authorsparky4 <sparky4@cock.li>
Wed, 20 Apr 2016 15:47:21 +0000 (10:47 -0500)
committersparky4 <sparky4@cock.li>
Wed, 20 Apr 2016 15:47:21 +0000 (10:47 -0500)
13 files changed:
makefile
pcx2vrl
pcxsscut
src/16.c
src/16.h
src/fontgfx.c
src/lib/modex16.c
src/lib/modex16.h
src/lib/scroll16.c
src/lib/scroll16.h
src/scroll.c
vrl2vrs
vrsdump

index 12fa4fa..2fe7425 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -81,7 +81,8 @@ DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 
 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ) $(DOSLIBLIBS)
 
-DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib
+DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib
+#$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib
 
 TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe
 # tsthimem.exe
diff --git a/pcx2vrl b/pcx2vrl
index 06179c7..bd947e5 100755 (executable)
Binary files a/pcx2vrl and b/pcx2vrl differ
index 2ce56d2..1deec74 100755 (executable)
Binary files a/pcxsscut and b/pcxsscut differ
index 27c17a5..5ab85e0 100755 (executable)
--- a/src/16.c
+++ b/src/16.c
@@ -60,21 +60,23 @@ main(int argc, char *argv[])
        /* save the palette */\r
        dpal = modexNewPal();\r
        modexPalSave(dpal);\r
-       modexFadeOff(4, dpal);\r
+//     modexFadeOff(4, dpal);\r
        //printf("pal load\n");\r
        //gpal = modexNewPal();\r
        /*modexPalSave(gpal);\r
        modexSavePalFile("data/g.pal", gpal);*/\r
-       printf("wwww loop wwww\n");\r
+//0000 printf("wwww loop wwww\n");\r
        VGAmodeX(1, 1, &gvar);\r
-       modexPalBlack();        //so player will not see loadings~\r
+//     modexPalBlack();        //so player will not see loadings~\r
        IN_Startup();\r
        IN_Default(0,&player,ctrl_Joystick);\r
        //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1);\r
+       start_timer(&gvar);\r
        while(ENGI_EXIT != engi_stat)\r
        {\r
                IN_ReadControl(0,&player);\r
                if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT;\r
+               shinku(&gvar);\r
        }\r
        switch(detectcpu())\r
        {\r
@@ -88,5 +90,5 @@ main(int argc, char *argv[])
        printf("version %s\n", VERSION);\r
        printf("detected CPU type: %s\n", cpus);\r
        IN_Shutdown();\r
-       modexFadeOn(4, dpal);\r
+//     modexFadeOn(4, dpal);\r
 }\r
index b12b1a7..bb87032 100755 (executable)
--- a/src/16.h
+++ b/src/16.h
@@ -27,7 +27,9 @@
 #include "src/lib/16_in.h"\r
 #include "src/lib/modex16.h"\r
 #include "src/lib/wcpu/wcpu.h"\r
-#include "src/lib/planar.h"\r
+//#include "src/lib/planar.h"\r
+#include "src/lib/scroll16.h"\r
+#include "src/lib/16_timer.h"\r
 \r
 typedef enum {\r
        ENGI_EXIT,\r
index 954416d..90e6a86 100755 (executable)
@@ -28,7 +28,6 @@
 #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
@@ -122,7 +121,7 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
                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, 32, 0, &rose);\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
index 2d018dc..79a03cf 100755 (executable)
@@ -920,7 +920,6 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons
                DEC CX\r
                JNZ L1\r
        }\r
-//TODO: OPTIMIZE THIS!!!!\r
                modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr);\r
                x_draw += 8; /* track X for edge of screen */\r
                addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */\r
@@ -1032,7 +1031,7 @@ void modexcls(page_t *page, byte color, byte *Where)
        _fmemset(Where, color, page->width*(page->height)/4);\r
 }\r
 \r
-/*void\r
+void\r
 modexWaitBorder() {\r
     while(inp(INPUT_STATUS_1)  & 8)  {\r
        // spin\r
@@ -1041,7 +1040,7 @@ modexWaitBorder() {
     while(!(inp(INPUT_STATUS_1)  & 8))  {\r
        // spin\r
     }\r
-}*/\r
+}\r
 \r
 void bios_cls() {\r
        VGA_ALPHA_PTR ap;\r
index f85eb05..98551f4 100755 (executable)
@@ -180,7 +180,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons
 void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str);
 void modexpdump(page_t *pee);
 void modexcls(page_t *page, byte color, byte *Where);
-//void modexWaitBorder();
+void modexWaitBorder();
 void bios_cls();
 
 #endif
index 73a5fbb..ac3bf7a 100755 (executable)
@@ -587,9 +587,8 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x)
 }*/
 
 /*     sync    */
-void shinku(map_view_t *pip, global_game_variables_t *gv)
+void shinku(global_game_variables_t *gv)
 {
-       //float t;
        //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4);
        if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second))
        {
@@ -600,8 +599,10 @@ void shinku(map_view_t *pip, global_game_variables_t *gv)
                word type = 1;
                //t=(((*(gv->clock))-gv->clock_start) /18.2);
                sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv));
+               printf("%s\n", gv->pee);
                //FIXME PLEASE!!
-               //modexprint(pip[0].page, x*4, y*4, type, col, bgcol, gv->pee);
+               modexprint(&(gv->video.page[0]), 200, 200, type, col, bgcol, gv->pee);
+//++++ modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee);
                //(gv->clock_start)=*(gv->clock);
                gv->kurokku.tiku=0;
        }
@@ -615,8 +616,8 @@ void shinku(map_view_t *pip, global_game_variables_t *gv)
                break;
                case 1:
                        //turn this off if XT
-                       //modexWaitBorder();
-                       vga_wait_for_vsync();
+                       modexWaitBorder();
+                       //vga_wait_for_vsync();
                        gv->kurokku.frames_per_second=60;
                break;
        }
index 77065af..33c7ed1 100755 (executable)
@@ -37,7 +37,6 @@
 #include <hw/dos/dos.h>
 #include <hw/vga/vga.h>
 #include <hw/vga/vrl.h>
-#include <hw/vga/vgatty.h>
 
 //#define SPRITE
 //#define TILERENDER
@@ -79,7 +78,7 @@ void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word p
 void mapDrawWRow(map_view_t *mv, int tx, int ty, word y);
 void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);
 //void qclean();
-void shinku(map_view_t *pip, global_game_variables_t *gv);
+void shinku(global_game_variables_t *gv);
 void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch);
 
 #endif /*__SCROLL16_H_*/
index b1b9d5a..ecd48e2 100755 (executable)
@@ -202,7 +202,7 @@ void main(int argc, char *argv[])
 #endif
        while(!IN_KeyDown(sc_Escape) && player[0].hp>0)
        {
-               shinku(mv, &gvar);
+               shinku(&gvar);
                IN_ReadControl(0,&player);
        //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square
        //to stop scrolling and have the player position data move to the edge of the screen with respect to the direction
diff --git a/vrl2vrs b/vrl2vrs
index cee2d1d..b67956b 100755 (executable)
Binary files a/vrl2vrs and b/vrl2vrs differ
diff --git a/vrsdump b/vrsdump
index a75a903..dbaba30 100755 (executable)
Binary files a/vrsdump and b/vrsdump differ