From: sparky4 Date: Wed, 20 Apr 2016 15:47:21 +0000 (-0500) Subject: repo sync and i did some debugging ww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=4abdbc1a7b9643df0fcc8762c60ef874cb4de63d;p=16.git repo sync and i did some debugging ww --- diff --git a/makefile b/makefile index 12fa4fa7..2fe7425d 100755 --- 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 06179c75..bd947e55 100755 Binary files a/pcx2vrl and b/pcx2vrl differ diff --git a/pcxsscut b/pcxsscut index 2ce56d28..1deec74d 100755 Binary files a/pcxsscut and b/pcxsscut differ diff --git a/src/16.c b/src/16.c index 27c17a58..5ab85e09 100755 --- a/src/16.c +++ b/src/16.c @@ -60,21 +60,23 @@ main(int argc, char *argv[]) /* save the palette */ dpal = modexNewPal(); modexPalSave(dpal); - modexFadeOff(4, dpal); +// modexFadeOff(4, dpal); //printf("pal load\n"); //gpal = modexNewPal(); /*modexPalSave(gpal); modexSavePalFile("data/g.pal", gpal);*/ - printf("wwww loop wwww\n"); +//0000 printf("wwww loop wwww\n"); VGAmodeX(1, 1, &gvar); - modexPalBlack(); //so player will not see loadings~ +// modexPalBlack(); //so player will not see loadings~ IN_Startup(); IN_Default(0,&player,ctrl_Joystick); //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1); + start_timer(&gvar); while(ENGI_EXIT != engi_stat) { IN_ReadControl(0,&player); if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT; + shinku(&gvar); } switch(detectcpu()) { @@ -88,5 +90,5 @@ main(int argc, char *argv[]) printf("version %s\n", VERSION); printf("detected CPU type: %s\n", cpus); IN_Shutdown(); - modexFadeOn(4, dpal); +// modexFadeOn(4, dpal); } diff --git a/src/16.h b/src/16.h index b12b1a7d..bb870326 100755 --- a/src/16.h +++ b/src/16.h @@ -27,7 +27,9 @@ #include "src/lib/16_in.h" #include "src/lib/modex16.h" #include "src/lib/wcpu/wcpu.h" -#include "src/lib/planar.h" +//#include "src/lib/planar.h" +#include "src/lib/scroll16.h" +#include "src/lib/16_timer.h" typedef enum { ENGI_EXIT, diff --git a/src/fontgfx.c b/src/fontgfx.c index 954416d5..90e6a869 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -28,7 +28,6 @@ #include #include #include -#include global_game_variables_t gvar; @@ -122,7 +121,7 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ if(colpee>=32+24) colpee=32; } getch(); - 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); + 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); getch(); //modexprint(100, 100, 1, 47, 0, "wwww"); // modexprint(0, 0, 1, 0, colpee, &rose); diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 2d018dc1..79a03cf3 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -920,7 +920,6 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons DEC CX JNZ L1 } -//TODO: OPTIMIZE THIS!!!! modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr); x_draw += 8; /* track X for edge of screen */ addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */ @@ -1032,7 +1031,7 @@ void modexcls(page_t *page, byte color, byte *Where) _fmemset(Where, color, page->width*(page->height)/4); } -/*void +void modexWaitBorder() { while(inp(INPUT_STATUS_1) & 8) { // spin @@ -1041,7 +1040,7 @@ modexWaitBorder() { while(!(inp(INPUT_STATUS_1) & 8)) { // spin } -}*/ +} void bios_cls() { VGA_ALPHA_PTR ap; diff --git a/src/lib/modex16.h b/src/lib/modex16.h index f85eb055..98551f48 100755 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -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 diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 73a5fbba..ac3bf7ab 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -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; } diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 77065af9..33c7ed15 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -37,7 +37,6 @@ #include #include #include -#include //#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_*/ diff --git a/src/scroll.c b/src/scroll.c index b1b9d5ae..ecd48e29 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -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 cee2d1d5..b67956b7 100755 Binary files a/vrl2vrs and b/vrl2vrs differ diff --git a/vrsdump b/vrsdump index a75a903a..dbaba30e 100755 Binary files a/vrsdump and b/vrsdump differ