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
/* 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
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
#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
#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
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
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
_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
while(!(inp(INPUT_STATUS_1) & 8)) {\r
// spin\r
}\r
-}*/\r
+}\r
\r
void bios_cls() {\r
VGA_ALPHA_PTR ap;\r
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
}*/
/* 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))
{
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;
}
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;
}
#include <hw/dos/dos.h>
#include <hw/vga/vga.h>
#include <hw/vga/vrl.h>
-#include <hw/vga/vgatty.h>
//#define SPRITE
//#define TILERENDER
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_*/
#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