From: sparky4 Date: Thu, 4 May 2017 00:29:35 +0000 (-0500) Subject: 16_ca needs huge amounts of work and I should remember what needs to be done soon... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=3a2741ba173836748d0fa07e41f2c56c184cee8d;p=16.git 16_ca needs huge amounts of work and I should remember what needs to be done soon[going to port rest of code to borland c some time so we can use the core components of id engine here ][going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] added 1st scroll back [i work on CA] palette debug show values added wwww and i need to know how to see vrs/vrl imaage data palette index numbers [i am trying to find out how the hell you get the index number values of VRL/VRS] boom has been fixed ^^ --- diff --git a/XCROLL.LOG b/XCROLL.LOG index c4fea944..5b66a033 100755 --- a/XCROLL.LOG +++ b/XCROLL.LOG @@ -9,28 +9,25 @@ Object 4's name: 'stump' "walkable":"0" } walkable: 0 -VRS_OpenVRS - vrl_size=515 - Project 16 xcroll.exe. This is just a test file! -version May 3 2017 15:15:20 +version May 3 2017 19:14:27 page[0]dxy: 16x16 player vars: - xy: 160x128 txy: 10x8 triggxy: 10x9 value: 39 - hp: 4 q: 1 info.dir: 2 d: 2 dire: 30 pdir: 0 - delay=0 + xy: 160x128 txy: 13x15 triggxy: 13x14 value: 11 + hp: 4 q: 1 info.dir: 2 d: 2 dire: 11 pdir: 0 + delay=1 VL_PrintmodexmemInfo: Virtual Screen: 352x272 Tile: 22x17=((Virtual Screen)/16) Screen: 320x240 Tile: 20x15=((Screen)/16) stride: 80 draw_stride: 88 draw_stride_limit: 88 Free Video Memory: 767 - page [0]=(a000:0000) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 - [1]=(a000:5d80) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 - [2]=(a000:bb00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 - [3]=(a000:dc00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 + page [0]=(a000:268c) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 + [1]=(a000:840c) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 + [2]=(a000:e18c) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 + [3]=(a000:028c) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 gvar.video: r=0 bgps=1 diff --git a/data/G.PAL b/data/G.PAL index ebf07024..2d98b012 100755 Binary files a/data/G.PAL and b/data/G.PAL differ diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index f6ffafb6..4a039203 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -231,21 +231,9 @@ void CAL_GetGrChunkLength (int chunk,global_game_variables_t *gvar) boolean CA_FarRead(int handle, byte far *dest, dword length, global_game_variables_t *gvar) { boolean flag=0; - //dword fat=0; - //word segm=0; - if(gvar->pm.emm.EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - //segm=(length%0xfffflu)-1; - //fat=segm*0xfffflu; - //length-=fat; - printf("CA_FarRead doesn't support 64K reads yet!\n"); - return 0;//TODO: EXPAND!!! - } + if (length>0xfffflu) + Quit (gvar, "CA_FarRead doesn't support 64K reads yet!");//TODO: EXPAND!!! - //if(!fat&&!segm) - //{ __asm { push ds mov bx,[handle] @@ -293,7 +281,7 @@ End: /* ========================== = -= CA_SegWrite += CA_FarWrite = = Write from a file to a far pointer = @@ -303,21 +291,9 @@ End: boolean CA_FarWrite(int handle, byte far *source, dword length, global_game_variables_t *gvar) { boolean flag=0; - //dword fat=0; - //word segm=0; - if(gvar->pm.emm.EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - //segm=(length%0xfffflu)-1; - //fat=segm*0xfffflu; - //length-=fat; - printf("CA_FarWrite doesn't support 64K reads yet!\n"); - return 0; - } + if (length>0xfffflu) + Quit (gvar, "CA_FarWrite doesn't support 64K reads yet!");//TODO: EXPAND!!! - //if(!fat&&!segm) - //{ __asm { push ds mov bx,[handle] @@ -1451,7 +1427,6 @@ cachein: //=========================================================================== //????#if GRMODE == EGAGR -#if 1 /* ====================== @@ -1462,10 +1437,9 @@ cachein: = ====================== */ - +/*++++ unsigned static sheight,swidth; boolean static dothemask; -unsigned *shifttabletable[8]; void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest, unsigned width, unsigned height, unsigned pixshift, boolean domask, global_game_variables_t *gvar) @@ -1583,7 +1557,7 @@ dodatabyte: } #endif - +*/ //=========================================================================== /* @@ -1595,7 +1569,7 @@ dodatabyte: = ====================== */ - +/*++++ void CAL_CacheSprite (int chunk, byte far *compressed, global_game_variables_t *gvar) { int i; @@ -1714,7 +1688,7 @@ void CAL_CacheSprite (int chunk, byte far *compressed, global_game_variables_t * } //#endif -} +}*/ //=========================================================================== diff --git a/src/lib/16_dbg.c b/src/lib/16_dbg.c index 5a9173f7..ff7d0a8e 100755 --- a/src/lib/16_dbg.c +++ b/src/lib/16_dbg.c @@ -288,7 +288,7 @@ void ShowPalVal (global_game_variables_t *gvar) spv.i = 0; // IN_UserInput(1, gvar); - modexpdump(&gvar->video.page[0]); + modexpdump(0, gvar); for (spv.oi = 1,done = false;!done;) { @@ -310,13 +310,13 @@ void ShowPalVal (global_game_variables_t *gvar) if(spv.oi!=spv.i) { - modexpdump(&gvar->video.page[0]); + modexpdump(0, gvar); modexClearRegion(&gvar->video.page[0], spv.palx+TILEWH, spv.paly+TILEWH, spv.mult, spv.mult, 5); modexClearRegion(&gvar->video.page[0], spv.palx+TILEWH+1, spv.paly+TILEWH+1, spv.mult-2, spv.mult-2, spv.i); spv.oi = spv.i; } -#define SHOWPALVARPRINT modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 0, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; +#define SHOWPALVARPRINT modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; sprintf(global_temp_status_text, "%03u", spv.i); SHOWPALVARPRINT sprintf(global_temp_status_text, "r %03u", gvar->video.palette[(spv.i*3)+0]/*>>2*/); SHOWPALVARPRINT sprintf(global_temp_status_text, "g %03u", gvar->video.palette[(spv.i*3)+1]/*>>2*/); SHOWPALVARPRINT @@ -385,7 +385,7 @@ void ShowPalVal (global_game_variables_t *gvar) break; } } - IN_UserInput(1, gvar); +// IN_UserInput(1, gvar); } #endif //debug vl #endif //watcomc diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 06338dbb..324d0f54 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -789,9 +789,9 @@ void MML_ClearBlock (global_game_variables_t *gvar) while(scan) { - if(!(scan->attributes&LOCKBIT) && (scan->attributes&PURGEBITS)) + if(!(scan->attributes&LOCKBIT) && (scan->attributes&PURGEBITS) ) { - MM_FreePtr(scan->useptr, gvar); + MM_FreePtr (scan->useptr, gvar); return; } scan = scan->next; @@ -1010,14 +1010,21 @@ void MM_GetPtr (memptr *baseptr,dword size, global_game_variables_t *gvar) gvar->mm.mmnew->attributes = BASEATTRIBUTES; //if(gvar->mm.mmnew->useptr==NULL){ #ifdef __DEBUG_MM__ - printf("MM_GetPtr\n"); if(dbg_debugmm>0){ + printf("===============================================================================\n"); + printf(" MM_GetPtr\n"); + printf("===============================================================================\n"); //%04x - printf(" baseptr=%Fp ", baseptr); printf("useptr=%Fp\n", gvar->mm.mmnew->useptr); - printf(" *baseptr=%Fp ", *baseptr); printf("*useptr=%Fp\n", *(gvar->mm.mmnew->useptr)); - printf(" &baseptr=%Fp ", &baseptr); printf("&useptr=%Fp\n", &(gvar->mm.mmnew->useptr)); +// printf(" baseptr=%Fp ", baseptr); printf("useptr=%Fp\n", gvar->mm.mmnew->useptr); +// //printf(" *baseptr=%Fp ", *baseptr); printf("*useptr=%Fp\n", *(gvar->mm.mmnew->useptr)); +// printf(" &baseptr=%Fp ", &baseptr); printf("&useptr=%Fp\n", &(gvar->mm.mmnew->useptr)); + + printf(" baseptr=%04x ", baseptr); printf("useptr=%04x\n", gvar->mm.mmnew->useptr); + //printf(" *baseptr=%04x ", *baseptr); printf("*useptr=%04x\n", *(gvar->mm.mmnew->useptr)); + printf(" &baseptr=%04u ", &baseptr); printf("&useptr=%04u\n", &(gvar->mm.mmnew->useptr)); + + printf(" size is %lu\n", size); } - printf(" size is %lu\n", size); #endif //Quit (gvar, "gvar->mm.mmnew->useptr==NULL"); } @@ -1498,6 +1505,17 @@ void MM_ShowMemory (global_game_variables_t *gvar) } #endif #ifdef MMSMSCANINFO + MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar); +#endif + + + if(gvar->video.VL_Started) IN_Ack(gvar); + + gvar->video.BOFS = (byte __far *)temp; +} + +#ifdef MMSMSCANINFO +void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar) { byte scratch1[4]; unsigned maxq = q; @@ -1533,7 +1551,7 @@ void MM_ShowMemory (global_game_variables_t *gvar) struct mmblockstruct far *next; } mmblocktype;*/ //modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str); -#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 0, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; +#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; if(gvar->video.VL_Started) { VL_ShowPage(&gvar->video.page[0], 1, 0); @@ -1541,7 +1559,8 @@ void MM_ShowMemory (global_game_variables_t *gvar) }else clrscr(); sprintf(global_temp_status_text, "block #%04u", qq); MMSMPRINTMEMINFO // sprintf(global_temp_status_text, "%Fp", scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO - sprintf(global_temp_status_text, "%04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[qq].scan->start); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[qq].scan->length); MMSMPRINTMEMINFO if (scaninfo[qq].scan->next && scaninfo[qq].scan->next->start > end+1) { @@ -1583,8 +1602,8 @@ void MM_ShowMemory (global_game_variables_t *gvar) if(gvar->video.VL_Started) { //if (scan->next && scan->next->start > end+1) free - xpos = 16; - ypos = 16;//(gvar->video.page[0].sh-(32));//8*4 + xpos = gvar->video.page[0].dx; + ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4 } else { @@ -1605,6 +1624,14 @@ void MM_ShowMemory (global_game_variables_t *gvar) if(qq0) qq-=100; + else qq = maxq; + break; + case sc_DownArrow: + if(qqvideo.VL_Started) IN_Ack(gvar); - - gvar->video.BOFS = (byte __far *)temp; -} - //========================================================================== /* diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index c003b54b..510dadae 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -199,6 +199,7 @@ void MM_SetPurge (memptr *baseptr, int purge, global_game_variables_t *gvar); void MM_SetLock (memptr *baseptr, boolean locked, global_game_variables_t *gvar); void MM_SortMem (global_game_variables_t *gvar); void MM_ShowMemory (global_game_variables_t *gvar); +void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar); void MM_DumpData (global_game_variables_t *gvar); dword MM_UnusedMemory (global_game_variables_t *gvar); dword MM_TotalFree (global_game_variables_t *gvar); diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 93022c26..d106d0ef 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -81,10 +81,12 @@ if(gvar.in.inst->Keyboard[sc_F7]){ ZC_ShowMV(&gvar.mv, 0, 1); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_F6]){ ZC_ShowMV(&gvar.mv, 0, 0); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss; IN_UserInput(1, &gvar); } \ - if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(0, &gvar); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_Q]){ VL_modexPrintTextBox(&gvar); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_W]){ VL_MemToScreen((byte __far *)&gvar, 64, 64, 16, 16, &gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_M]){ MM_ShowMemory(&gvar); IN_UserInput(1, &gvar); } \ RFDEBUGFUNCTIONS //FIZZLEFADEFUNCTION diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index b1e68e10..cd94df84 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -408,10 +408,10 @@ typedef struct typedef struct { - //ylookup[MAXSCANLINES], +//---- ylookup[MAXSCANLINES], unsigned int offscreen_ofs; unsigned int pattern_ofs; -// unsigned bufferofs,linewidth,displayofs; +//+-+- unsigned bufferofs,linewidth,displayofs; pan_t pan; } ofs_t; //unfinished @@ -454,8 +454,9 @@ typedef struct boolean fastpalette; byte far palette1[256][3],far palette2[256][3]; pictabletype _seg *pictable; - spritetabletype _seg *spritetable; - unsigned *shifttabletable[8]; + //keen/cata vars +// spritetabletype _seg *spritetable; +// unsigned *shifttabletable[8]; } video_t; //from scroll16 diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 5b73ac5c..2c3fc766 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -879,11 +879,11 @@ void modexPalSave(byte *palette) /*byte * modexNewPal() { byte *ptr; - ptr = m a l l o c(PAL_SIZE); + ptr = mAlloc(PAL_SIZE); // handle errors if(!ptr) { - printf("Could not allocate palette.\n"); + printf("Could not Allocate palette.\n"); } return ptr; @@ -937,8 +937,8 @@ void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, word void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar) { VLL_LoadPalFilewithoffset(filename, palette, - 0, -// 9, + 0, //overwrite core/system palette +// 9, //preserved core/system palette PAL_SIZE, gvar); } @@ -1135,7 +1135,7 @@ void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color break; case 1: if(tlsw){ x-=page->tlx; y-=page->tly; } - x_draw = x/4; + x_draw = x>>2; addrq = (page->stridew) * y + (word)(x_draw) + ((word)page->data); addrr = addrq; @@ -1264,7 +1264,7 @@ void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, c } /* palette dump on display! */ -void modexpdump(page_t *pee) +void modexpdump(nibble pagenum, global_game_variables_t *gvar) { int mult=(QUADWH); int palq=(mult)*TILEWH; @@ -1272,10 +1272,11 @@ void modexpdump(page_t *pee) int palx, paly; for(paly=TILEWH*8; palyvideo.page[pagenum], palx+TILEWH, paly+TILEWH, mult, mult, palcol); palcol++; } } + modexPalSave(gvar->video.palette); } #if 0 ///////////////////////////////////////////////////////////////////////////// diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index 91db3049..078a5080 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -254,7 +254,7 @@ void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, wor void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str); void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); void VL_modexPrintTextBox(global_game_variables_t *gvar); -void modexpdump(page_t *pee); +void modexpdump(nibble pagenum, global_game_variables_t *gvar); void VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw); void modexWaitBorder(); void modexWaitBorder_start(); diff --git a/src/lib/16_vrs.c b/src/lib/16_vrs.c index 0edcf627..056366af 100755 --- a/src/lib/16_vrs.c +++ b/src/lib/16_vrs.c @@ -59,8 +59,16 @@ void VRS_OpenVRS(char *filename, entity_t *enti, boolean rlsw, global_game_varia #ifndef VRS_USECAMMPM vrl_line_offsets = malloc(sizeof(vrl1_vgax_offset_t *)*num_of_vrl);//TODO: USE MM_ CA_ AND PM_ #else - MM_GetPtr(MEMPTRCONV gvar->ca.grsegs, sizeof(vrl1_vgax_offset_t *)*num_of_vrl, gvar); - enti->spri.spritesheet.vrl_line_offsets = (vrl1_vgax_offset_t **)gvar->ca.grsegs; + switch(rlsw) + { + case 0: +#ifdef __DEBUG_MM__ + dbg_debugmm=0; +#endif + MM_GetPtr(MEMPTRCONV gvar->ca.grsegs, sizeof(vrl1_vgax_offset_t *)*num_of_vrl, gvar); + enti->spri.spritesheet.vrl_line_offsets = (vrl1_vgax_offset_t **)gvar->ca.grsegs; + break; + } #endif vrl_headers_offsets = (uint32_t far *)(enti->spri.spritesheet.buffer + enti->spri.spritesheet.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 496f4854..0aad37a2 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -614,16 +614,16 @@ void ZC_mapScroll(map_view_t *mv, player_t *player, word pn) //=========================================================================== //TODO: put player in starting position of assigned spot on map //default player position on the viewable map -void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw) +void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, boolean defaultsw) { - player[pn].enti.tx = x + pip[0].tx; - player[pn].enti.ty = y + pip[0].ty; + player->enti.tx = x + pip[0].tx; + player->enti.ty = y + pip[0].ty; switch(defaultsw) { case 1: - player[pn].enti.tx += pip[0].page->ti.tilemidposscreenx; - player[pn].enti.ty += pip[0].page->ti.tilemidposscreeny; + player->enti.tx += pip[0].page->ti.tilemidposscreenx; + player->enti.ty += pip[0].page->ti.tilemidposscreeny; break; case 0: break; @@ -1091,3 +1091,11 @@ void mapScroll(map_view_t *mv, player_t *player) break; } } + +void ZC_GirdChk (global_game_variables_t *gvar, player_t *player) +{ + if((player->enti.q==1) && + !(player->enti.x%gvar->mv[0].map->tiles->tileWidth==0 && player->enti.y%gvar->mv[0].map->tiles->tileHeight==0)) + ZC_PlayerXYpos(0, 0, player, gvar->mv, 1); + //TODO: MAKE SURE TO RESYNC PLAYER IN WALKABLE SPOT +} diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 6a36737c..67641fac 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -115,7 +115,7 @@ 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 ZC_mapScroll(map_view_t *mv, player_t *player, word pn); -void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw); +void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, boolean defaultsw); sword chkmap(map_t *map, word q); void mapGoTo(map_view_t *mv, int tx, int ty); void ZC_mapinitMV(map_view_t *mv, int tx, int ty); @@ -208,4 +208,6 @@ void walk_player(player_t *player, map_view_t *map_v); // Scroll map in one direction (assumed from gvar.player's movement) void mapScroll(map_view_t *mv, player_t *player); +void ZC_GirdChk (global_game_variables_t *gvar, player_t *player); + #endif /*__SCROLL16_H_*/ diff --git a/src/palbomb.c b/src/palbomb.c index fbfa7251..1da8abb1 100755 --- a/src/palbomb.c +++ b/src/palbomb.c @@ -28,7 +28,7 @@ void main(int argc, char *argv[]) { PALPROGRAMSNEWPAGE VL_ShowPage(&gvar.video.page[0], 1, 0); - modexpdump(&gvar.video.page[0]); + modexpdump(0, &gvar); while(!kbhit()){ VL_modexPalScramble(&gvar.video.palette); } modexPalSave(&gvar.video.palette); VGAmodeX(0, 0, &gvar); diff --git a/src/palettec.c b/src/palettec.c index 1e55aca5..e2a91856 100755 --- a/src/palettec.c +++ b/src/palettec.c @@ -28,7 +28,7 @@ void main(int argc, char *argv[]) { modexSavePalFile(bakapee, &gvar.video.palette); PALPROGRAMSNEWPAGE VL_ShowPage(&gvar.video.page[0], 1, 0); - modexpdump(&gvar.video.page[0]); + modexpdump(0, &gvar); while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ } // modexPalSave(&gvar.video.palette); VGAmodeX(0, 0, &gvar); diff --git a/src/palettel.c b/src/palettel.c index 7f548934..1fbd0de6 100755 --- a/src/palettel.c +++ b/src/palettel.c @@ -29,7 +29,7 @@ void main(int argc, char *argv[]) VL_LoadPalFile(bakapee, &gvar.video.palette, &gvar); //modexLoadPalFile(bakapee, &(gvar.video.palette)); PALPROGRAMSNEWPAGE VL_ShowPage(&gvar.video.page[0], 1, 0); - modexpdump(&gvar.video.page[0]); + modexpdump(0, &gvar); while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ } modexPalSave(&gvar.video.palette); VGAmodeX(0, 0, &gvar); diff --git a/src/vidtest.c b/src/vidtest.c index 8995f1d8..c957ef62 100755 --- a/src/vidtest.c +++ b/src/vidtest.c @@ -170,7 +170,7 @@ void main(int argc, char *argv[]) } // if(i>PAL_SIZE) i=0; }//9*/ - if(gvar.in.inst->Keyboard[25]){ modexpdump(&gvar.video.page[gvar.video.sp]); IN_UserInput(1, &gvar); }//p + if(gvar.in.inst->Keyboard[25]){ modexpdump(gvar.video.sp, &gvar); IN_UserInput(1, &gvar); }//p if(gvar.in.inst->Keyboard[sc_I]){ drawboxesmodex(&gvar.video.page[gvar.video.sp]); IN_UserInput(1, &gvar); }//i if(gvar.in.inst->Keyboard[sc_O]){ copyboxesmodex(&gvar.video.page, !gvar.video.sp); IN_UserInput(1, &gvar); }//o //VL_ShowPage(&gvar.video.page[gvar.video.sp], 0, 0); diff --git a/src/vrstest.c b/src/vrstest.c index 7ab82a4c..6ba75ee7 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -151,7 +151,7 @@ void main() TAIL_FUNCTIONKEYDRAWJUNKNOMV if(gvar.in.inst->Keyboard[sc_F7]){ VL_ShowPage(&gvar.video.page[0], 1, 1); IN_UserInput(1, &gvar); } if(gvar.in.inst->Keyboard[sc_F6]){ VL_ShowPage(&gvar.video.page[0], 1, 0); IN_UserInput(1, &gvar); } - if(gvar.in.inst->Keyboard[25]){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } //p + if(gvar.in.inst->Keyboard[25]){ modexpdump(0, &gvar); IN_UserInput(1, &gvar); } //p } VGAmodeX(0, 1, &gvar); MM_ShowMemory(&gvar); diff --git a/src/xcroll.c b/src/xcroll.c index 9416cf9e..a8c8e2ea 100755 --- a/src/xcroll.c +++ b/src/xcroll.c @@ -40,7 +40,8 @@ unsigned int i; //static word paloffset=0; #endif byte *ptr; -memptr pal; +//memptr pal; +boolean spriteswitch=0; #define FILENAME_1 "data/spri/chikyuu.vrs" #define FILENAME_1P "data/spri/chikyuu.pal" @@ -134,7 +135,7 @@ void main(int argc, char *argv[]) //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(&gvar.mv, 0, 0); - ZC_PlayerXYpos(0, 0, &gvar.player, &gvar.mv, 0, 1); + ZC_PlayerXYpos(0, 0, &gvar.player[0], &gvar.mv, 1); EN_initPlayer(&gvar.player[0], &gvar.video); //print_anim_ids(gvar.player[0].enti.spri); if (gvar.video.sprifilei == -1) @@ -189,14 +190,12 @@ void main(int argc, char *argv[]) } 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--; } //debugging binds! - - 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 +// 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 if(gvar.in.inst->Keyboard[22]){ VL_modexPalScramble(&gvar.video.palette); VL_LoadPalFileCore(&gvar.video.palette, &gvar); } //u TAIL_FUNCTIONKEYFUNCTIONS TAIL_FUNCTIONKEYDRAWJUNK 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); } - if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); } //=============================================================================== #if 0 @@ -215,31 +214,36 @@ void main(int argc, char *argv[]) #endif //=============================================================================== - if(gvar.in.inst->Keyboard[sc_J] || gvar.in.inst->Keyboard[sc_K]) + if(gvar.in.inst->Keyboard[sc_J])// || gvar.in.inst->Keyboard[sc_K]) { - if(gvar.in.inst->Keyboard[sc_J]) + if(spriteswitch)//gvar.in.inst->Keyboard[sc_J]) { strcpy(bakapee, FILENAME_1); strcpy(bakapeep, FILENAME_1P); gvar.player[0].enti.overdraww=0; } - if(gvar.in.inst->Keyboard[sc_K]) + else//if(gvar.in.inst->Keyboard[sc_K]) { strcpy(bakapee, FILENAME_2); strcpy(bakapeep, FILENAME_2P); gvar.player[0].enti.overdraww=2; } + spriteswitch=!spriteswitch; + //read_vrs(&gvar, bakapee, gvar.player[0].enti.spri->spritesheet); VRS_ReadVRS(bakapee, &gvar.player[0].enti, &gvar); VL_LoadPalFile(bakapeep, &gvar.video.palette, &gvar); ZC_animatePlayer(&gvar.mv, &gvar.player, 0); + IN_UserInput(1, &gvar); }//JK //#ifdef FADE // if(gvar.in.inst->Keyboard[10]){ modexPalOverscan(rand()%56); modexPalUpdate(gvar.video.dpal); IN_UserInput(1, &gvar); } //#endif if(gvar.in.inst->Keyboard[sc_R]){ VL_modexPalOverscan(&gvar.video.palette, rand()%32); } //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! + + //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! + ZC_GirdChk(&gvar, &gvar.player[0]); } /* fade back to text mode */