#
S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768
Z_FLAGS=-zk0 -zc -zp8 -zm
-O_FLAGS=-obmilr -oe=24 -outpack -ei -ohnl+ -zp4
+O_FLAGS=-opmilr -oe=24 -outback -ei -ohnl+ -zp4
T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1##-fo=.$(OBJ) -e=65536
DBUGFLAGS=-fm=$^&.mah -fd=$^&
##
#git submodule add <repo>
mkdl: .symbolic
- @cd $(DOSLIB:$(to_os_path))
+ @cd $(DOSLIBDIR:$(to_os_path))
@$(DOSLIBMAKEALL) $(DOSLIB_MEMMODE)
@cd $(BUILD_ROOT)
cldl: .symbolic
- @cd $(DOSLIB:$(to_os_path))
+ @cd $(DOSLIBDIR:$(to_os_path))
@$(DOSLIBMAKEALL) $(DOSLIB_MEMMODE) clean
@cd $(BUILD_ROOT)
//#define FILENAME_2 "data/default.pal"\r
\r
//#define PATTERN\r
+#define INITTNUM 1\r
#define DRAWCORNERBOXES \\r
-modexClearRegion(&gvar.video.page[0], 16, 16, 16, 16, 15); \\r
-modexClearRegion(&gvar.video.page[0], gvar.video.page[0].sw, gvar.video.page[0].sh, 16, 16, 15);\r
+DRAWOTHERCORNERBOX_TOPLEFT; \\r
+DRAWOTHERCORNERBOX_TOPRIGHT; \\r
+DRAWOTHERCORNERBOX_BOTTOMLEFT; \\r
+DRAWOTHERCORNERBOX_BOTTOMRIGHT; \\r
\r
static unsigned char palette[768];\r
player_t player[MaxPlayers];\r
unsigned int bufsz;\r
int fd, i;\r
char *bakapee1,*bakapee2;\r
- boolean anim=1,noanim=1;\r
+ boolean anim=1,noanim=0;\r
pan.pn=0;\r
\r
bakapee1=malloc(64);\r
\r
/* setup camera and screen~ */\r
modexHiganbanaPageSetup(&gvar.video);\r
-player[0].tx = mv[0].tx + mv[0].page->tilemidposscreenx;\r
- player[0].ty = mv[0].ty + mv[0].page->tilemidposscreeny;\r
modexShowPage(&(gvar.video.page[pan.pn]));\r
for(i=0;i<gvar.video.num_of_pages;i++)\r
{\r
mv[i].page = &gvar.video.page[i];\r
mv[i].video = &gvar.video;\r
mv[i].pan = &pan;\r
- mv[i].tx = 0;\r
- mv[i].ty = 0;\r
+ mv[i].tx = INITTNUM;\r
+ mv[i].ty = INITTNUM;\r
}\r
+ //player[0].tx = INITTNUM; player[0].ty = INITTNUM;\r
+ //mapinitmapview(mv, player[0].tx, player[0].tx);\r
+\r
\r
#define VMEMHEIGHT gvar.video.page[0].height+gvar.video.page[1].height\r
\r
bufsz = 0;\r
free(bakapee1);\r
free(bakapee2);\r
- printf("mv 0\n tx=%u ty=%u\n\n", mv[0].tx, mv[0].tx);\r
- printf("mv 1\n tx=%u ty=%u\n", mv[1].tx, mv[1].tx);\r
+ //printf("mv 0\n tx=%d ty=%d\n\n", mv[0].tx, mv[0].tx);\r
+ //printf("mv 1\n tx=%d ty=%d\n", mv[1].tx, mv[1].tx);\r
return 0;\r
}\r
int py;//px,\r
unsigned int i;\r
\r
- /* set up the coordinates */\r
- mv[0].tx = mv[1].tx = tx;\r
- mv[0].ty = mv[1].ty = ty;\r
- mv[0].page->dx = mv[1].page->dx = mv[2].page->dx = mv[3].page->dx = mv->map->tiles->tileWidth;\r
- mv[0].page->dy = mv[1].page->dy = mv[2].page->dy = mv[3].page->dy = mv->map->tiles->tileHeight;\r
-\r
- /* set up the thresholds */\r
- mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileWidth * 2;\r
- mv[0].dyThresh = mv[1].dyThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileHeight * 2;\r
+ mapinitmapview(mv, tx, ty);\r
\r
/* draw the tiles */\r
modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0);\r
modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 0, 0, 24, 32);\r
}\r
\r
-void mapGoTo_(map_view_t *mv, int tx, int ty)\r
+void mapinitmapview(map_view_t *mv, int tx, int ty)\r
{\r
- int py;\r
- unsigned int i;\r
-\r
/* set up the coordinates */\r
mv[0].tx = mv[1].tx = tx;\r
mv[0].ty = mv[1].ty = ty;\r
/* set up the thresholds */\r
mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileWidth * 2;\r
mv[0].dyThresh = mv[1].dyThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileHeight * 2;\r
-\r
- /* draw the tiles */\r
- modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0);\r
- py=0;\r
- i=mv[0].ty * mv[0].map->width + mv[0].tx;\r
- for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) {\r
- mapDrawWRow(&mv[0], tx-1, ty, py);\r
- i+=mv->map->width - tx;\r
- }\r
- if(!pageploop) modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);\r
-// {\r
-// unsigned int k,j,o;\r
-// /* fill screen with a distinctive pattern */\r
-// for (k=0;k < vga_state.vga_width;k++) {\r
-// o = k >> 2;\r
-// vga_write_sequencer(0x02/*map mask*/,1 << (k&3));\r
-// for (j=0;j < (mv[0].page->height)+(mv[1].page->height)+(mv[2].page->height)+(mv[3].page->height);j++,o += vga_state.vga_stride)\r
-// vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15!\r
-// }\r
-// }\r
- modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 0, 0, 24, 32);\r
}\r
\r
void near\r
void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid);\r
sword chkmap(map_t *map, word q);\r
void mapGoTo(map_view_t *mv, int tx, int ty);\r
-void mapGoTo_(map_view_t *mv, int tx, int ty);\r
+void mapinitmapview(map_view_t *mv, int tx, int ty);\r
void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *p, word poopoffset);\r
void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word poopoffset);\r
if(IN_KeyDown(1+1)){ pan.pn=0; modexShowPage(&(gvar.video.page[pan.pn])); } \\r
if(IN_KeyDown(2+1)){ pan.pn=1; modexShowPage(&(gvar.video.page[pan.pn])); } \\r
if(IN_KeyDown(3+1)){ pan.pn=2; modexShowPage(&(gvar.video.page[pan.pn])); } \\r
- if(IN_KeyDown(4+1)){ pan.pn=3; modexShowPage(&(gvar.video.page[pan.pn])); }\r
-\r
-#define TESUTODRAWBOX \\r
- modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15);\\r
- modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128);\\r
- modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42);\\r
- modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128);\\r
- modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height);\\r
- modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47);\\r
- modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45);\\r
+ if(IN_KeyDown(4+1)){ pan.pn=3; modexShowPage(&(gvar.video.page[pan.pn])); } \\r
+ if(IN_KeyDown(25)){ modexpdump(mv[1].page); modexShowPage(&(gvar.video.page[1])); IN_UserInput(1,1); }\r
+\r
+////corner markers\r
+#define GVP gvar.video.page[0]\r
+#define GW GVP.width-16\r
+#define GH GVP.height-16\r
+#define GE GVP.sw\r
+#define GJ GVP.sh\r
+#define DCBF modexClearRegion(&GVP\r
+\r
+#define DRAWOTHERCORNERBOX_TOPLEFT \\r
+DCBF, 0, 0, 16, 16, 0); \\r
+DCBF, 16, 16, 16, 16, 2);\r
+\r
+#define DRAWOTHERCORNERBOX_TOPRIGHT \\r
+DCBF, GW, 0, 16, 16, 0); \\r
+DCBF, GE, 16, 16, 16, 2);\r
+\r
+#define DRAWOTHERCORNERBOX_BOTTOMLEFT \\r
+DCBF, 0, GH, 16, 16, 0); \\r
+DCBF, 16, GJ, 16, 16, 2);\r
+\r
+#define DRAWOTHERCORNERBOX_BOTTOMRIGHT \\r
+DCBF, GE, GJ, 16, 16, 2);\\r
+DCBF, GW, GH, 16, 16, 0);\r
+\r
+\r
\r
typedef unsigned char far *VGA_RAM_PTR;\r
//VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000);\r
\r
static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
\r
-void main() {\r
+void main()\r
+{\r
static global_game_variables_t gvar;\r
//__segment sega;\r
memptr bigbuffer;\r