"walkable":"0"\r
}\r
walkable: 0\r
-VRS_OpenVRS\r
- vrl_size=515\r
-\r
\r
Project 16 xcroll.exe. This is just a test file!\r
-version May 3 2017 15:15:20\r
+version May 3 2017 19:14:27\r
page[0]dxy: 16x16\r
\r
player vars:\r
- xy: 160x128 txy: 10x8 triggxy: 10x9 value: 39\r
- hp: 4 q: 1 info.dir: 2 d: 2 dire: 30 pdir: 0\r
- delay=0\r
+ xy: 160x128 txy: 13x15 triggxy: 13x14 value: 11\r
+ hp: 4 q: 1 info.dir: 2 d: 2 dire: 11 pdir: 0\r
+ delay=1\r
\r
VL_PrintmodexmemInfo:\r
Virtual Screen: 352x272 Tile: 22x17=((Virtual Screen)/16)\r
Screen: 320x240 Tile: 20x15=((Screen)/16)\r
stride: 80 draw_stride: 88 draw_stride_limit: 88\r
Free Video Memory: 767\r
- page [0]=(a000:0000) size=23936 w=352 h=272 sw=320 sh=240 pi=1408\r
- [1]=(a000:5d80) size=23936 w=352 h=272 sw=320 sh=240 pi=1408\r
- [2]=(a000:bb00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
- [3]=(a000:dc00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
+ page [0]=(a000:268c) size=23936 w=352 h=272 sw=320 sh=240 pi=1408\r
+ [1]=(a000:840c) size=23936 w=352 h=272 sw=320 sh=240 pi=1408\r
+ [2]=(a000:e18c) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
+ [3]=(a000:028c) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
gvar.video:\r
r=0 bgps=1 \r
\r
boolean CA_FarRead(int handle, byte far *dest, dword length, global_game_variables_t *gvar)\r
{\r
boolean flag=0;\r
- //dword fat=0;\r
- //word segm=0;\r
- if(gvar->pm.emm.EMSVer<0x40)\r
- if(length>0xfffflu)\r
- {\r
- printf("File is a fat bakapee\n");\r
- //segm=(length%0xfffflu)-1;\r
- //fat=segm*0xfffflu;\r
- //length-=fat;\r
- printf("CA_FarRead doesn't support 64K reads yet!\n");\r
- return 0;//TODO: EXPAND!!!\r
- }\r
+ if (length>0xfffflu)\r
+ Quit (gvar, "CA_FarRead doesn't support 64K reads yet!");//TODO: EXPAND!!!\r
\r
- //if(!fat&&!segm)\r
- //{\r
__asm {\r
push ds\r
mov bx,[handle]\r
/*\r
==========================\r
=\r
-= CA_SegWrite\r
+= CA_FarWrite\r
=\r
= Write from a file to a far pointer\r
=\r
boolean CA_FarWrite(int handle, byte far *source, dword length, global_game_variables_t *gvar)\r
{\r
boolean flag=0;\r
- //dword fat=0;\r
- //word segm=0;\r
- if(gvar->pm.emm.EMSVer<0x40)\r
- if(length>0xfffflu)\r
- {\r
- printf("File is a fat bakapee\n");\r
- //segm=(length%0xfffflu)-1;\r
- //fat=segm*0xfffflu;\r
- //length-=fat;\r
- printf("CA_FarWrite doesn't support 64K reads yet!\n");\r
- return 0;\r
- }\r
+ if (length>0xfffflu)\r
+ Quit (gvar, "CA_FarWrite doesn't support 64K reads yet!");//TODO: EXPAND!!!\r
\r
- //if(!fat&&!segm)\r
- //{\r
__asm {\r
push ds\r
mov bx,[handle]\r
//===========================================================================\r
\r
//????#if GRMODE == EGAGR\r
-#if 1\r
\r
/*\r
======================\r
=\r
======================\r
*/\r
-\r
+/*++++\r
unsigned static sheight,swidth;\r
boolean static dothemask;\r
-unsigned *shifttabletable[8];\r
\r
void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,\r
unsigned width, unsigned height, unsigned pixshift, boolean domask, global_game_variables_t *gvar)\r
}\r
\r
#endif\r
-\r
+*/\r
//===========================================================================\r
\r
/*\r
=\r
======================\r
*/\r
-\r
+/*++++\r
void CAL_CacheSprite (int chunk, byte far *compressed, global_game_variables_t *gvar)\r
{\r
int i;\r
}\r
\r
//#endif\r
-}\r
+}*/\r
\r
//===========================================================================\r
\r
spv.i = 0;\r
\r
// IN_UserInput(1, gvar);\r
- modexpdump(&gvar->video.page[0]);\r
+ modexpdump(0, gvar);\r
\r
for (spv.oi = 1,done = false;!done;)\r
{\r
\r
if(spv.oi!=spv.i)\r
{\r
- modexpdump(&gvar->video.page[0]);\r
+ modexpdump(0, gvar);\r
modexClearRegion(&gvar->video.page[0], spv.palx+TILEWH, spv.paly+TILEWH, spv.mult, spv.mult, 5);\r
modexClearRegion(&gvar->video.page[0], spv.palx+TILEWH+1, spv.paly+TILEWH+1, spv.mult-2, spv.mult-2, spv.i);\r
spv.oi = spv.i;\r
}\r
\r
-#define SHOWPALVARPRINT modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 0, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
+#define SHOWPALVARPRINT modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
sprintf(global_temp_status_text, "%03u", spv.i); SHOWPALVARPRINT\r
sprintf(global_temp_status_text, "r %03u", gvar->video.palette[(spv.i*3)+0]/*>>2*/); SHOWPALVARPRINT\r
sprintf(global_temp_status_text, "g %03u", gvar->video.palette[(spv.i*3)+1]/*>>2*/); SHOWPALVARPRINT\r
break;\r
}\r
}\r
- IN_UserInput(1, gvar);\r
+// IN_UserInput(1, gvar);\r
}\r
#endif //debug vl\r
#endif //watcomc\r
\r
while(scan)\r
{\r
- if(!(scan->attributes&LOCKBIT) && (scan->attributes&PURGEBITS))\r
+ if(!(scan->attributes&LOCKBIT) && (scan->attributes&PURGEBITS) )\r
{\r
- MM_FreePtr(scan->useptr, gvar);\r
+ MM_FreePtr (scan->useptr, gvar);\r
return;\r
}\r
scan = scan->next;\r
gvar->mm.mmnew->attributes = BASEATTRIBUTES;\r
//if(gvar->mm.mmnew->useptr==NULL){\r
#ifdef __DEBUG_MM__\r
- printf("MM_GetPtr\n");\r
if(dbg_debugmm>0){\r
+ printf("===============================================================================\n");\r
+ printf(" MM_GetPtr\n");\r
+ printf("===============================================================================\n");\r
//%04x\r
- printf(" baseptr=%Fp ", baseptr); printf("useptr=%Fp\n", gvar->mm.mmnew->useptr);\r
- printf(" *baseptr=%Fp ", *baseptr); printf("*useptr=%Fp\n", *(gvar->mm.mmnew->useptr));\r
- printf(" &baseptr=%Fp ", &baseptr); printf("&useptr=%Fp\n", &(gvar->mm.mmnew->useptr));\r
+// printf(" baseptr=%Fp ", baseptr); printf("useptr=%Fp\n", gvar->mm.mmnew->useptr);\r
+// //printf(" *baseptr=%Fp ", *baseptr); printf("*useptr=%Fp\n", *(gvar->mm.mmnew->useptr));\r
+// printf(" &baseptr=%Fp ", &baseptr); printf("&useptr=%Fp\n", &(gvar->mm.mmnew->useptr));\r
+\r
+ printf(" baseptr=%04x ", baseptr); printf("useptr=%04x\n", gvar->mm.mmnew->useptr);\r
+ //printf(" *baseptr=%04x ", *baseptr); printf("*useptr=%04x\n", *(gvar->mm.mmnew->useptr));\r
+ printf(" &baseptr=%04u ", &baseptr); printf("&useptr=%04u\n", &(gvar->mm.mmnew->useptr));\r
+\r
+ printf(" size is %lu\n", size);\r
}\r
- printf(" size is %lu\n", size);\r
#endif\r
//Quit (gvar, "gvar->mm.mmnew->useptr==NULL"); }\r
\r
}\r
#endif\r
#ifdef MMSMSCANINFO\r
+ MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar);\r
+#endif\r
+\r
+\r
+ if(gvar->video.VL_Started) IN_Ack(gvar);\r
+\r
+ gvar->video.BOFS = (byte __far *)temp;\r
+}\r
+\r
+#ifdef MMSMSCANINFO\r
+void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar)\r
{\r
byte scratch1[4];\r
unsigned maxq = q;\r
struct mmblockstruct far *next;\r
} mmblocktype;*/\r
//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
-#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 0, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
+#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
if(gvar->video.VL_Started)\r
{\r
VL_ShowPage(&gvar->video.page[0], 1, 0);\r
}else clrscr();\r
sprintf(global_temp_status_text, "block #%04u", qq); MMSMPRINTMEMINFO\r
// sprintf(global_temp_status_text, "%Fp", scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO\r
- sprintf(global_temp_status_text, "%04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[qq].scan->start); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO\r
sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[qq].scan->length); MMSMPRINTMEMINFO\r
if (scaninfo[qq].scan->next && scaninfo[qq].scan->next->start > end+1)\r
{\r
if(gvar->video.VL_Started)\r
{\r
//if (scan->next && scan->next->start > end+1) free\r
- xpos = 16;\r
- ypos = 16;//(gvar->video.page[0].sh-(32));//8*4\r
+ xpos = gvar->video.page[0].dx;\r
+ ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
}\r
else\r
{\r
if(qq<maxq) qq++;\r
else qq = 0;\r
break;\r
+/* case sc_UpArrow:\r
+ if(qq>0) qq-=100;\r
+ else qq = maxq;\r
+ break;\r
+ case sc_DownArrow:\r
+ if(qq<maxq) qq+=100;\r
+ else qq = 0;\r
+ break;*/\r
case sc_Escape:\r
done = true;\r
break;\r
}\r
#endif\r
\r
- if(gvar->video.VL_Started) IN_Ack(gvar);\r
-\r
- gvar->video.BOFS = (byte __far *)temp;\r
-}\r
-\r
//==========================================================================\r
\r
/*\r
void MM_SetLock (memptr *baseptr, boolean locked, global_game_variables_t *gvar);\r
void MM_SortMem (global_game_variables_t *gvar);\r
void MM_ShowMemory (global_game_variables_t *gvar);\r
+void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar);\r
void MM_DumpData (global_game_variables_t *gvar);\r
dword MM_UnusedMemory (global_game_variables_t *gvar);\r
dword MM_TotalFree (global_game_variables_t *gvar);\r
if(gvar.in.inst->Keyboard[sc_F7]){ ZC_ShowMV(&gvar.mv, 0, 1); IN_UserInput(1, &gvar); } \\r
if(gvar.in.inst->Keyboard[sc_F6]){ ZC_ShowMV(&gvar.mv, 0, 0); IN_UserInput(1, &gvar); } \\r
if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss; IN_UserInput(1, &gvar); } \\r
- if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } \\r
+ if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(0, &gvar); IN_UserInput(1, &gvar); } \\r
if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } \\r
if(gvar.in.inst->Keyboard[sc_Q]){ VL_modexPrintTextBox(&gvar); IN_UserInput(1, &gvar); } \\r
if(gvar.in.inst->Keyboard[sc_W]){ VL_MemToScreen((byte __far *)&gvar, 64, 64, 16, 16, &gvar); IN_UserInput(1, &gvar); } \\r
+ if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); } \\r
+ if(gvar.in.inst->Keyboard[sc_M]){ MM_ShowMemory(&gvar); IN_UserInput(1, &gvar); } \\r
RFDEBUGFUNCTIONS\r
//FIZZLEFADEFUNCTION\r
\r
\r
typedef struct\r
{\r
- //ylookup[MAXSCANLINES],\r
+//---- ylookup[MAXSCANLINES],\r
unsigned int offscreen_ofs;\r
unsigned int pattern_ofs;\r
-// unsigned bufferofs,linewidth,displayofs;\r
+//+-+- unsigned bufferofs,linewidth,displayofs;\r
pan_t pan;\r
\r
} ofs_t; //unfinished\r
boolean fastpalette;\r
byte far palette1[256][3],far palette2[256][3];\r
pictabletype _seg *pictable;\r
- spritetabletype _seg *spritetable;\r
- unsigned *shifttabletable[8];\r
+ //keen/cata vars\r
+// spritetabletype _seg *spritetable;\r
+// unsigned *shifttabletable[8];\r
} video_t;\r
\r
//from scroll16\r
/*byte *\r
modexNewPal() {\r
byte *ptr;\r
- ptr = m a l l o c(PAL_SIZE);\r
+ ptr = mAlloc(PAL_SIZE);\r
\r
// handle errors\r
if(!ptr) {\r
- printf("Could not allocate palette.\n");\r
+ printf("Could not Allocate palette.\n");\r
}\r
\r
return ptr;\r
void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar)\r
{\r
VLL_LoadPalFilewithoffset(filename, palette,\r
- 0,\r
-// 9,\r
+ 0, //overwrite core/system palette\r
+// 9, //preserved core/system palette\r
PAL_SIZE, gvar);\r
}\r
\r
break;\r
case 1:\r
if(tlsw){ x-=page->tlx; y-=page->tly; }\r
- x_draw = x/4;\r
+ x_draw = x>>2;\r
addrq = (page->stridew) * y + (word)(x_draw) +\r
((word)page->data);\r
addrr = addrq;\r
}\r
\r
/* palette dump on display! */\r
-void modexpdump(page_t *pee)\r
+void modexpdump(nibble pagenum, global_game_variables_t *gvar)\r
{\r
int mult=(QUADWH);\r
int palq=(mult)*TILEWH;\r
int palx, paly;\r
for(paly=TILEWH*8; paly<palq+TILEWH*8; paly+=mult){\r
for(palx=TILEWH*12; palx<palq+TILEWH*12; palx+=mult){\r
- modexClearRegion(pee, palx+TILEWH, paly+TILEWH, mult, mult, palcol);\r
+ modexClearRegion(&gvar->video.page[pagenum], palx+TILEWH, paly+TILEWH, mult, mult, palcol);\r
palcol++;\r
}\r
}\r
+ modexPalSave(gvar->video.palette);\r
}\r
#if 0\r
/////////////////////////////////////////////////////////////////////////////\r
void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str);\r
void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str);\r
void VL_modexPrintTextBox(global_game_variables_t *gvar);\r
-void modexpdump(page_t *pee);\r
+void modexpdump(nibble pagenum, global_game_variables_t *gvar);\r
void VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw);\r
void modexWaitBorder();\r
void modexWaitBorder_start();\r
#ifndef VRS_USECAMMPM\r
vrl_line_offsets = malloc(sizeof(vrl1_vgax_offset_t *)*num_of_vrl);//TODO: USE MM_ CA_ AND PM_\r
#else\r
- MM_GetPtr(MEMPTRCONV gvar->ca.grsegs, sizeof(vrl1_vgax_offset_t *)*num_of_vrl, gvar);\r
- enti->spri.spritesheet.vrl_line_offsets = (vrl1_vgax_offset_t **)gvar->ca.grsegs;\r
+ switch(rlsw)\r
+ {\r
+ case 0:\r
+#ifdef __DEBUG_MM__\r
+ dbg_debugmm=0;\r
+#endif\r
+ MM_GetPtr(MEMPTRCONV gvar->ca.grsegs, sizeof(vrl1_vgax_offset_t *)*num_of_vrl, gvar);\r
+ enti->spri.spritesheet.vrl_line_offsets = (vrl1_vgax_offset_t **)gvar->ca.grsegs;\r
+ break;\r
+ }\r
#endif\r
\r
vrl_headers_offsets = (uint32_t far *)(enti->spri.spritesheet.buffer + enti->spri.spritesheet.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]);\r
//===========================================================================\r
//TODO: put player in starting position of assigned spot on map\r
//default player position on the viewable map\r
-void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw)\r
+void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, boolean defaultsw)\r
{\r
- player[pn].enti.tx = x + pip[0].tx;\r
- player[pn].enti.ty = y + pip[0].ty;\r
+ player->enti.tx = x + pip[0].tx;\r
+ player->enti.ty = y + pip[0].ty;\r
\r
switch(defaultsw)\r
{\r
case 1:\r
- player[pn].enti.tx += pip[0].page->ti.tilemidposscreenx;\r
- player[pn].enti.ty += pip[0].page->ti.tilemidposscreeny;\r
+ player->enti.tx += pip[0].page->ti.tilemidposscreenx;\r
+ player->enti.ty += pip[0].page->ti.tilemidposscreeny;\r
break;\r
case 0:\r
break;\r
break;\r
}\r
}\r
+\r
+void ZC_GirdChk (global_game_variables_t *gvar, player_t *player)\r
+{\r
+ if((player->enti.q==1) &&\r
+ !(player->enti.x%gvar->mv[0].map->tiles->tileWidth==0 && player->enti.y%gvar->mv[0].map->tiles->tileHeight==0))\r
+ ZC_PlayerXYpos(0, 0, player, gvar->mv, 1);\r
+ //TODO: MAKE SURE TO RESYNC PLAYER IN WALKABLE SPOT\r
+}\r
void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid);\r
void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid);\r
void ZC_mapScroll(map_view_t *mv, player_t *player, word pn);\r
-void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw);\r
+void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, boolean defaultsw);\r
sword chkmap(map_t *map, word q);\r
void mapGoTo(map_view_t *mv, int tx, int ty);\r
void ZC_mapinitMV(map_view_t *mv, int tx, int ty);\r
// Scroll map in one direction (assumed from gvar.player's movement)\r
void mapScroll(map_view_t *mv, player_t *player);\r
\r
+void ZC_GirdChk (global_game_variables_t *gvar, player_t *player);\r
+\r
#endif /*__SCROLL16_H_*/\r
\r
PALPROGRAMSNEWPAGE\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
- modexpdump(&gvar.video.page[0]);\r
+ modexpdump(0, &gvar);\r
while(!kbhit()){ VL_modexPalScramble(&gvar.video.palette); }\r
modexPalSave(&gvar.video.palette);\r
VGAmodeX(0, 0, &gvar);\r
modexSavePalFile(bakapee, &gvar.video.palette);\r
PALPROGRAMSNEWPAGE\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
- modexpdump(&gvar.video.page[0]);\r
+ modexpdump(0, &gvar);\r
while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r
// modexPalSave(&gvar.video.palette);\r
VGAmodeX(0, 0, &gvar);\r
VL_LoadPalFile(bakapee, &gvar.video.palette, &gvar); //modexLoadPalFile(bakapee, &(gvar.video.palette));\r
PALPROGRAMSNEWPAGE\r
VL_ShowPage(&gvar.video.page[0], 1, 0);\r
- modexpdump(&gvar.video.page[0]);\r
+ modexpdump(0, &gvar);\r
while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r
modexPalSave(&gvar.video.palette);\r
VGAmodeX(0, 0, &gvar);\r
}\r
// if(i>PAL_SIZE) i=0;\r
}//9*/\r
- if(gvar.in.inst->Keyboard[25]){ modexpdump(&gvar.video.page[gvar.video.sp]); IN_UserInput(1, &gvar); }//p\r
+ if(gvar.in.inst->Keyboard[25]){ modexpdump(gvar.video.sp, &gvar); IN_UserInput(1, &gvar); }//p\r
if(gvar.in.inst->Keyboard[sc_I]){ drawboxesmodex(&gvar.video.page[gvar.video.sp]); IN_UserInput(1, &gvar); }//i\r
if(gvar.in.inst->Keyboard[sc_O]){ copyboxesmodex(&gvar.video.page, !gvar.video.sp); IN_UserInput(1, &gvar); }//o\r
//VL_ShowPage(&gvar.video.page[gvar.video.sp], 0, 0);\r
TAIL_FUNCTIONKEYDRAWJUNKNOMV\r
if(gvar.in.inst->Keyboard[sc_F7]){ VL_ShowPage(&gvar.video.page[0], 1, 1); IN_UserInput(1, &gvar); }\r
if(gvar.in.inst->Keyboard[sc_F6]){ VL_ShowPage(&gvar.video.page[0], 1, 0); IN_UserInput(1, &gvar); }\r
- if(gvar.in.inst->Keyboard[25]){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } //p\r
+ if(gvar.in.inst->Keyboard[25]){ modexpdump(0, &gvar); IN_UserInput(1, &gvar); } //p\r
}\r
VGAmodeX(0, 1, &gvar);\r
MM_ShowMemory(&gvar);\r
//static word paloffset=0;\r
#endif\r
byte *ptr;\r
-memptr pal;\r
+//memptr pal;\r
+boolean spriteswitch=0;\r
\r
#define FILENAME_1 "data/spri/chikyuu.vrs"\r
#define FILENAME_1P "data/spri/chikyuu.pal"\r
//TODO: LOAD map data and position the map in the middle of the screen if smaller then screen\r
mapGoTo(&gvar.mv, 0, 0);\r
\r
- ZC_PlayerXYpos(0, 0, &gvar.player, &gvar.mv, 0, 1);\r
+ ZC_PlayerXYpos(0, 0, &gvar.player[0], &gvar.mv, 1);\r
EN_initPlayer(&gvar.player[0], &gvar.video);\r
//print_anim_ids(gvar.player[0].enti.spri);\r
if (gvar.video.sprifilei == -1)\r
}\r
if(gvar.player[0].enti.q == (TILEWH/(gvar.player[0].enti.speed))+1 && gvar.player[0].info.dir != 2 && (gvar.player[0].enti.triggerx == 5 && gvar.player[0].enti.triggery == 5)){ gvar.player[0].enti.hp--; }\r
//debugging binds!\r
-\r
- if(gvar.in.inst->Keyboard[24]){ VL_modexPalScramble(&gvar.video.palette); /*paloffset=0;*/ VL_LoadPalFileCore(&gvar.video.palette, &gvar); modexpdump(gvar.mv[0].page); IN_UserInput(1, &gvar); } //o\r
+// if(gvar.in.inst->Keyboard[24]){ VL_modexPalScramble(&gvar.video.palette); /*paloffset=0;*/ VL_LoadPalFileCore(&gvar.video.palette, &gvar); modexpdump(gvar.mv[0].page); IN_UserInput(1, &gvar); } //o\r
if(gvar.in.inst->Keyboard[22]){ VL_modexPalScramble(&gvar.video.palette); VL_LoadPalFileCore(&gvar.video.palette, &gvar); } //u\r
\r
TAIL_FUNCTIONKEYFUNCTIONS\r
TAIL_FUNCTIONKEYDRAWJUNK\r
if(gvar.in.inst->Keyboard[sc_L]){ modexClearRegion(&gvar.video.page[0], gvar.player[0].enti.x, gvar.player[0].enti.y, 16, 16, 1); }\r
- if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); }\r
\r
//===============================================================================\r
#if 0\r
#endif\r
//===============================================================================\r
\r
- if(gvar.in.inst->Keyboard[sc_J] || gvar.in.inst->Keyboard[sc_K])\r
+ if(gvar.in.inst->Keyboard[sc_J])// || gvar.in.inst->Keyboard[sc_K])\r
{\r
- if(gvar.in.inst->Keyboard[sc_J])\r
+ if(spriteswitch)//gvar.in.inst->Keyboard[sc_J])\r
{\r
strcpy(bakapee, FILENAME_1);\r
strcpy(bakapeep, FILENAME_1P);\r
gvar.player[0].enti.overdraww=0;\r
}\r
- if(gvar.in.inst->Keyboard[sc_K])\r
+ else//if(gvar.in.inst->Keyboard[sc_K])\r
{\r
strcpy(bakapee, FILENAME_2);\r
strcpy(bakapeep, FILENAME_2P);\r
gvar.player[0].enti.overdraww=2;\r
}\r
+ spriteswitch=!spriteswitch;\r
+\r
//read_vrs(&gvar, bakapee, gvar.player[0].enti.spri->spritesheet);\r
VRS_ReadVRS(bakapee, &gvar.player[0].enti, &gvar);\r
VL_LoadPalFile(bakapeep, &gvar.video.palette, &gvar);\r
ZC_animatePlayer(&gvar.mv, &gvar.player, 0);\r
+ IN_UserInput(1, &gvar);\r
}//JK\r
//#ifdef FADE\r
// if(gvar.in.inst->Keyboard[10]){ modexPalOverscan(rand()%56); modexPalUpdate(gvar.video.dpal); IN_UserInput(1, &gvar); }\r
//#endif\r
if(gvar.in.inst->Keyboard[sc_R]){ VL_modexPalOverscan(&gvar.video.palette, rand()%32); } //r\r
\r
- if((gvar.player[0].enti.q==1) && !(gvar.player[0].enti.x%TILEWH==0 && gvar.player[0].enti.y%TILEWH==0)) Quit (&gvar, "PLAYER OFF THE RAILS!");//break; //incase things go out of sync!\r
+\r
+ //if((gvar.player[0].enti.q==1) && !(gvar.player[0].enti.x%TILEWH==0 && gvar.player[0].enti.y%TILEWH==0)) Quit (&gvar, "PLAYER OFF THE RAILS!");//break; //incase things go out of sync!\r
+ ZC_GirdChk(&gvar, &gvar.player[0]);\r
}\r
\r
/* fade back to text mode */\r