FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
-#DOSLIBEXMMOBJ = himemsys.$(OBJ) emm.$(OBJ)
VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(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
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
-#testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe
+
EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
all: $(EXEC) joytest.exe vrs
-
-#$(16LIBOBJS) => 16.lib bug....
+#16.lib => $(16LIBOBJS) bug....
+16LIB=$(16LIBOBJS)
#
#game and bakapi executables
#
-16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib
- wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib -fm=16.mah
+16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+ wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah
bakapi.exe: bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS)
wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah
#
#Test Executables!
#
-scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib
- wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib -fm=scroll.mah
+scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+ wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah
scroll.$(OBJ): $(SRC)scroll.c
wcl $(FLAGS) -c $(SRC)scroll.c
test2.exe: test2.$(OBJ) gfx.lib
wcl $(FLAGS) test2.$(OBJ) gfx.lib -fm=test2.mah
-fonttest.exe: fonttest.$(OBJ) $(16LIBOBJS) gfx.lib
- wcl $(FLAGS) fonttest.$(OBJ) $(16LIBOBJS) gfx.lib -fm=fonttest.mah
-
-#fonttes0.exe: fonttes0.$(OBJ) $(16LIBOBJS)
-# wcl $(FLAGS) fonttes0.$(OBJ) $(16LIBOBJS)
-
-fontgfx.exe: fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib $(DOSLIBLIBS)
- wcl $(FLAGS) fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
-
-inputest.exe: inputest.$(OBJ) $(16LIBOBJS)
- wcl $(FLAGS) inputest.$(OBJ) $(16LIBOBJS) -fm=inputest.mah
-
-#sountest.exe: sountest.$(OBJ) $(16LIBOBJS)
-# wcl $(FLAGS) sountest.$(OBJ) $(16LIBOBJS)
+fonttest.exe: fonttest.$(OBJ) $(16LIB) gfx.lib
+ wcl $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah
-#miditest.exe: miditest.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ) midi.$(OBJ)
-# wcl $(FLAGS) miditest.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ) midi.$(OBJ)
+#fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
+# wcl $(FLAGS) fonttes0.$(OBJ) $(16LIB)
-tsthimem.exe: tsthimem.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ)
- wcl $(FLAGS) tsthimem.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ) -fm=tsthimem.mah
+fontgfx.exe: fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
+ wcl $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
-#testemm.exe: testemm.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ)
-# wcl $(FLAGS) testemm.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ)
+inputest.exe: inputest.$(OBJ) $(16LIB)
+ wcl $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah
-#testemm0.exe: testemm0.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ)
-# wcl $(FLAGS) testemm0.$(OBJ) $(16LIBOBJS) $(DOSLIBEXMMOBJ)
+#sountest.exe: sountest.$(OBJ) $(16LIB)
+# wcl $(FLAGS) sountest.$(OBJ) $(16LIB)
pcxtest.exe: pcxtest.$(OBJ) gfx.lib
wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah
-palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIBOBJS)
- wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIBOBJS)
+palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIB)
+ wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB)
-palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIBOBJS)
- wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIBOBJS)
+palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIB)
+ wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB)
pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib
wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah
planrpcx.exe: planrpcx.$(OBJ) gfx.lib
wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah
-maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib
- wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib -fm=maptest.mah
+maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+ wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah
-#maptest0.exe: maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)
-# wcl $(FLAGS) $(MFLAGS) maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)
+fmemtest.exe: fmemtest.$(OBJ) $(16LIB)
+ wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
-#emmtest.exe: emmtest.$(OBJ) memory.$(OBJ)
-# wcl $(FLAGS) $(MFLAGS) emmtest.$(OBJ) memory.$(OBJ)
+exmmtest.exe: exmmtest.$(OBJ) $(16LIB)
+ wcl $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIB)
-#emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
-# wcl $(FLAGS) $(MFLAGS) emsdump.$(OBJ) memory.$(OBJ)
-
-fmemtest.exe: fmemtest.$(OBJ) $(16LIBOBJS)
- wcl $(FLAGS) fmemtest.$(OBJ) $(16LIBOBJS) -fm=fmemtest.mah
-
-exmmtest.exe: exmmtest.$(OBJ) $(16LIBOBJS)
- wcl $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIBOBJS)
-
-vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIBOBJS)
- wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIBOBJS)
+vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB)
+ wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB)
#====wcl -mc vgmtest.$(OBJ) $(VGMSNDOBJ) -fm=vgmtest.mah
16.lib: $(16LIBOBJS)# doslib.lib vgmsnd.lib
wlib -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib
-gfx.lib: $(GFXLIBOBJS)
- wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
-
-#doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
-# wlib -b $(WLIBQ) doslib.lib $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
+gfx.lib: $(GFXLIBOBJS) 16_in.$(OBJ) 16_head.$(OBJ)
+ wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS) 16_in.$(OBJ) 16_head.$(OBJ)
vgmsnd.lib: $(VGMSNDOBJ)
wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c
wcl $(FLAGS) -c $(SRCLIB)midi.c
-#
-# doslib stuff
-#
-adlib.$(OBJ): $(DOSLIB)adlib.h $(DOSLIB)adlib.c
- wcl $(FLAGS) -c $(DOSLIB)adlib.c
-
-8254.$(OBJ): $(DOSLIB)8254.h $(DOSLIB)8254.c
- wcl $(FLAGS) -c $(DOSLIB)8254.c
-
-8259.$(OBJ): $(DOSLIB)8259.h $(DOSLIB)8259.c
- wcl $(FLAGS) -c $(DOSLIB)8259.c
-
-dos.$(OBJ): $(DOSLIB)dos.h $(DOSLIB)dos.c
- wcl $(FLAGS) -c $(DOSLIB)dos.c
-
-cpu.$(OBJ): $(DOSLIB)cpu.h $(DOSLIB)cpu.c
- wcl $(FLAGS) -c $(DOSLIB)cpu.c
-
-himemsys.$(OBJ): $(DOSLIB)himemsys.h $(DOSLIB)himemsys.c
- wcl $(FLAGS) -c $(DOSLIB)himemsys.c
-
-emm.$(OBJ): $(DOSLIB)emm.h $(DOSLIB)emm.c
- wcl $(FLAGS) -c $(DOSLIB)emm.c
-
-# end of doslib stuff
-
16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
wcl $(FLAGS) -c $(SRCLIB)16_head.c
wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
#====wcl -c -mc $(VGMSNDLIB)vgmSnd.c
-#3812intf.$(OBJ): $(VGMSNDLIB)3812intf.h $(VGMSNDLIB)3812intf.c
-# wcl $(FLAGS) -c $(VGMSNDLIB)3812intf.c
-
-#farjsmn.$(OBJ): $(JSMNLIB)farjsmn.h $(JSMNLIB)farjsmn.c
-# wcl $(FLAGS) $(MFLAGS) -c $(JSMNLIB)farjsmn.c
-
#memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
# wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
#include "src/lib/bakapee.h"
-//project 16 testing define switch for veiwing the contents of the video memory
+//project 16 testing define switch for veiwing the contents of the video memory --sparky4
#define BOINK // what does this mean? --J.C.
#endif /*__BAKAPI_H_*/
page.dy = 0;\r
page.sw = p->sw;\r
page.sh = p->sh;\r
- page.width = p->sw;\r
- page.height = p->sh;\r
+ page.width = p->sw+TILEWHD;\r
+ page.height = p->sh+TILEWHD;\r
page.tw = page.sw/TILEWH;\r
page.th = page.sh/TILEWH;\r
page.tilemidposscreenx = page.tw/2;\r
page.tilemidposscreeny = (page.th/2)+1;\r
page.tilesw=p->tilesw;\r
page.tilesh=p->tilesh;\r
- page.pagesize = page.width*page.height;\r
+ page.pagesize = (sdiword)page.width*page.height;\r
page.id = 0;\r
\r
return page;\r
result.tw = p->width/TILEWH;\r
result.th = p->height/TILEWH;\r
result.id = p->id+1;\r
- result.pagesize = result.width*result.height;\r
+ result.pagesize = (sdiword)result.width*result.height;\r
\r
return result;\r
}\r
void modexCalcVmemRemain(video_t *video)\r
{\r
byte i;\r
- video->vmem_remain=262144;\r
- for(i=0; i<=video->num_of_pages; i++)\r
+ printf("\n\n 1st vmem_remain=%ld\n", video->vmem_remain);\r
+ for(i=0; i<=video->num_of_pages-1; i++)\r
{\r
video->vmem_remain-=video->page[i].pagesize;\r
+ printf(" [%u], video->page[i].pagesize=%ld\n", i, video->page[i].pagesize);\r
+ printf(" [%u], vmem_remain=%ld\n", i, video->vmem_remain);\r
}\r
}\r
\r
void modexHiganbanaPageSetup(video_t *video)\r
{\r
+ video->vmem_remain=262144L;\r
(video->page[0]) = modexDefaultPage(&(video->page[0])); video->num_of_pages++;\r
- video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
+ //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
(video->page[1]) = modexNextPage(&(video->page[0])); video->num_of_pages++;\r
-// (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, 16); video->num_of_pages++;\r
-// (video->page[2]) = modexNextPage(&(video->page[1])); video->num_of_pages++;\r
- //(352*176)+1024 is the remaining amount of memory left wwww\r
-// modexCalcVmemRemain(video);\r
-// (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].sw, 92); video->num_of_pages++;\r
+ (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, video->page[0].sh-40); video->num_of_pages++;\r
+ (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), TILEWH, TILEWH); video->num_of_pages++;\r
modexCalcVmemRemain(video);\r
+ video->p=0;\r
}\r
\r
void\r
animatePlayer(pip, player, pn, 1);
mapScrollRight(pip, player, 0, pn);
mapScrollRight(pip, player, 1, pn);
-// mapScrollRight(pip, player, 2, pn);
+ ScrollRight(pip, player, 2, pn);
+ ScrollRight(pip, player, 3, pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; }
animatePlayer(pip, player, pn, 1);
mapScrollLeft(pip, player, 0, pn);
mapScrollLeft(pip, player, 1, pn);
-// mapScrollLeft(pip, player, 2, pn);
+ ScrollLeft(pip, player, 2, pn);
+ ScrollLeft(pip, player, 3, pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; }
animatePlayer(pip, player, pn, 1);
mapScrollDown(pip, player, 0, pn);
mapScrollDown(pip, player, 1, pn);
-// mapScrollDown(pip, player, 2, pn);
+ ScrollDown(pip, player, 2, pn);
+ ScrollDown(pip, player, 3, pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; }
animatePlayer(pip, player, pn, 1);
mapScrollUp(pip, player, 0, pn);
mapScrollUp(pip, player, 1, pn);
-// mapScrollUp(pip, player, 2, pn);
+ ScrollUp(pip, player, 2, pn);
+ ScrollUp(pip, player, 3, pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; }
{
word x, y; /* coordinate for drawing */
- /* increment the pixel position and update the page */
+ /* decrement the pixel position and update the page */
mv[id].page->dx -= player[plid].speed;
/* check to see if this changes the tile */
{
word x, y; /* coordinate for drawing */
- /* increment the pixel position and update the page */
+ /* decrement the pixel position and update the page */
mv[id].page->dy -= player[plid].speed;
/* check to see if this changes the tile */
//}
}
+
+//TODO finish this wwww
+void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid)
+{
+ /* increment the pixel position and update the page */
+ mv[0].video->page[id].dx += player[plid].speed;
+
+ /* check to see if this changes the tile */
+ if(mv[0].video->page[id].dx >= mv[id].dxThresh )
+ {
+ /* Snap the origin forward */
+ mv[0].video->page[id].data += 4;
+ mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth;
+ }
+}
+
+
+void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid)
+{
+ /* decrement the pixel position and update the page */
+ mv[0].video->page[id].dx -= player[plid].speed;
+
+ /* check to see if this changes the tile */
+ if(mv[0].video->page[id].dx == 0)
+ {
+ /* Snap the origin backward */
+ mv[0].video->page[id].data -= 4;
+ mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth;
+ }
+}
+
+void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid)
+{
+ /* decrement the pixel position and update the page */
+ mv[0].video->page[id].dy -= player[plid].speed;
+
+ /* check to see if this changes the tile */
+ if(mv[0].video->page[id].dy == 0)
+ {
+ /* Snap the origin backward */
+ mv[0].video->page[id].data -= 4;
+ mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth;
+ }
+}
+
+void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid)
+{
+ /* increment the pixel position and update the page */
+ mv[0].video->page[id].dy += player[plid].speed;
+
+ /* check to see if this changes the tile */
+ if(mv[0].video->page[id].dy >= mv[id].dxThresh )
+ {
+ /* Snap the origin forward */
+ mv[0].video->page[id].data += 4;
+ mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth;
+ }
+}
+
sword chkmap(map_t *map, word q)
{
// bitmap_t bp;
#define FRAME2 modexClearRegion(pip[1].page, x, y, 24, 32, 1+dire);
#define FRAME3 modexClearRegion(pip[1].page, x, y, 24, 32, dire);
#define FRAME4 modexClearRegion(pip[1].page, x, y, 24, 32, 1+dire);
-#endif
- modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40);
+ #endif
+ if(pageflipflop)
+ modexCopyPageRegion(pip[pip->video->p].page,
+ pip[!(pip->video->p)].page, x-4, y-4, x-4, y-4, 28, 40);
+ else modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40);
//modexCopyPageRegion(pip[2].page, pip[1].page, 16, 16, 16, 16, (14*8)+4, 8+4);
if(2>ls && ls>=1) { FRAME1 }else
if(3>ls && ls>=2) { FRAME2 }else
void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid);
void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid);
void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid);
+void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid);
+void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid);
+void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid);
+void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid);
sword chkmap(map_t *map, word q);
void mapGoTo(map_view_t *mv, int tx, int ty);
void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);
sword tilemidposscreeny; /* middle tile position */\r
sword tileplayerposscreenx; /* player position on screen */\r
sword tileplayerposscreeny; /* player position on screen */\r
- iword pagesize; /* page size */\r
+ sdiword pagesize; /* page size */\r
} page_t;\r
\r
typedef struct\r
{\r
char old_mode; //old video mode before game!\r
page_t page[MAXPAGE]; //pointer to root page[0]\r
- sdword vmem_remain; //remaining video memory\r
+ sdiword vmem_remain; //remaining video memory\r
byte num_of_pages; //number of actual pages\r
boolean p; //render page number\r
word pr[MAXPAGE][4]; //render sections of pages\r
typedef unsigned int iword;\r
typedef signed int siword;\r
\r
+typedef unsigned long int diword;\r
+typedef signed long int sdiword;\r
+\r
typedef enum {false,true} boolean;\r
\r
#endif/*_TYPE_H_*/\r
/* setup camera and screen~ */
modexHiganbanaPageSetup(&gvar.video);
- for(i=0;i<gvar.video.num_of_pages;i++)
+ for(i=0;i<gvar.video.num_of_pages-2;i++)
{
mv[i].page = &gvar.video.page[i];
mv[i].map = ↦
//TODO: LOAD map data and position the map in the middle of the screen if smaller then screen
mapGoTo(&mv[0], 0, 0);
mapGoTo(&mv[1], 0, 0);
- //mapGoTo(mask, 0, 0);
//TODO: put player in starting position of spot
//default player position on the viewable map
player[0].tx = mv[0].tx + mv[0].page->tilemidposscreenx;
if(IN_KeyDown(2)){ modexShowPage(mv[0].page); panpagenum=0; }
if(IN_KeyDown(3)){ modexShowPage(mv[1].page); panpagenum=1; }
if(IN_KeyDown(4)){ modexShowPage(mv[2].page); panpagenum=2; }
- if(IN_KeyDown(5)){ modexShowPage(&(gvar.video.page[3])); panpagenum=3; }
- if(IN_KeyDown(25)){ modexpdump(mv[0].page); modexpdump(mv[1].page); } //p
+ if(IN_KeyDown(25)){ modexpdump(mv[0].page); modexpdump(mv[1].page);
+ //IN_Ack();
+ } //p
#ifdef MODEX
#ifdef FADE
if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); modexpdump(mv[1].page); }
if(IN_KeyDown(87)) //f11
{
pageflipflop=!pageflipflop;
+ //IN_Ack();
// VGAmodeX(0, 0, &gvar);
// IN_Shutdown();
// __asm
printf("Screen: %dx", gvar.video.page[0].sw); printf("%d\n", gvar.video.page[0].sh);
printf("tile resolution: %dx", gvar.video.page[0].tilesh); printf("%d ", gvar.video.page[0].tilesh);
printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny);
- printf("video memory remaining: %d\n", gvar.video.vmem_remain);
+ printf("video memory remaining: %ld\n", gvar.video.vmem_remain);
printf("\npage ");
for(i=0; i<gvar.video.num_of_pages;i++)
{
- printf("[%u]=(%Fp) ", i, &(gvar.video.page[i].data));
+ printf("[%u]=", i);
+ printf("(%Fp)\n", (gvar.video.page[i].data));
+ //printf("(%Fp)=", *(gvar.video.page[i].data));
+ //printf("(%Fp)\n", &(gvar.video.page[i].data));
}
printf("\n");
// printf("Screen2: %dx", gvar.video.page[1].width); printf("%d\n", gvar.video.page[1].height);