From: sparky4 Date: Wed, 25 Jan 2017 23:23:44 +0000 (-0600) Subject: ==== animation fram walk ==== i polished the shit out of it and it works MUCH better... X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=968b6bcf1d7f19f8902e1ae00f2a80ab78d399cc ==== animation fram walk ==== i polished the shit out of it and it works MUCH better now!! --- diff --git a/16/src/lib/oldwalk.c b/16/src/lib/oldwalk.c new file mode 100755 index 00000000..a4dabfa2 --- /dev/null +++ b/16/src/lib/oldwalk.c @@ -0,0 +1,187 @@ +void oldwalk(map_view_t *pip, player_t *player, word pn) +{ + //printf("player[%d].d=%d\n", pn, player[pn].enti.d); + switch(player[pn].enti.d) + { + //no direction + case 2: + //0000pip[0].video->startclk = (*clockw); + break; + //right movement + case 3: + //printf("pip[0].page->tilesw=%d ", pip[0].page->tilesw); printf("pip[0].page->tw=%d\n", pip[0].page->tw); + if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx && + !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY)) //collision detection! + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + ANIMATESPRIFUN(pip, player, pn, 1); + ScrollRight(pip, player, 3, pn); + ScrollRight(pip, player, 2, pn); + //mapScrollRight(pip, player, !(pip[0].video->p), pn); + mapScrollRight(pip, player, (pip[0].video->p), pn); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; } + } + else if(player[pn].enti.tx < pip[0].map->width && !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY)) + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + player[pn].enti.x+=(player[pn].enti.speed); + ANIMATESPRIFUN(pip, player, pn, 0); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; } + } + else + { + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); +#ifdef SPRITE + modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR); +#else + modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 14); +#endif + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.d = 2; + } + player[pn].enti.triggerx = player[pn].enti.tx+1; + player[pn].enti.triggery = player[pn].enti.ty; + break; + + //left movement + case 1: + if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx && + !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY)) //collision detection! + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + ANIMATESPRIFUN(pip, player, pn, 1); + ScrollLeft(pip, player, 3, pn); + ScrollLeft(pip, player, 2, pn); + //mapScrollLeft(pip, player, !(pip[0].video->p), pn); + mapScrollLeft(pip, player, (pip[0].video->p), pn); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; } + } + else if(player[pn].enti.tx > 1 && !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY)) + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + player[pn].enti.x-=(player[pn].enti.speed); + ANIMATESPRIFUN(pip, player, pn, 0); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; } + } + else + { + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); +#ifdef SPRITE + modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR); +#else + modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 10); +#endif + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.d = 2; + } + player[pn].enti.triggerx = player[pn].enti.tx-1; + player[pn].enti.triggery = player[pn].enti.ty; + break; + + //down movement + case 4: + if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny && + !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY)) //collision detection! + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + ANIMATESPRIFUN(pip, player, pn, 1); + ScrollDown(pip, player, 3, pn); + ScrollDown(pip, player, 2, pn); + //mapScrollDown(pip, player, !(pip[0].video->p), pn); + mapScrollDown(pip, player, (pip[0].video->p), pn); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; } + } + else if(player[pn].enti.ty < pip[0].map->height && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY)) + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + player[pn].enti.y+=(player[pn].enti.speed); + ANIMATESPRIFUN(pip, player, pn, 0); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; } + } + else + { + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); +#ifdef SPRITE + modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR); +#else + modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 9); +#endif + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.d = 2; + } + player[pn].enti.triggerx = player[pn].enti.tx; + player[pn].enti.triggery = player[pn].enti.ty+1; + break; + + //up movement + case 0: + if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny && + !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty-1 == TRIGGY)) //collision detection! + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + ANIMATESPRIFUN(pip, player, pn, 1); + ScrollUp(pip, player, 3, pn); + ScrollUp(pip, player, 2, pn); + //mapScrollUp(pip, player, !(pip[0].video->p), pn); + mapScrollUp(pip, player, (pip[0].video->p), pn); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; } + } + else if(player[pn].enti.ty > 1 && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty-1 == TRIGGY)) + { + if(player[pn].enti.q<=player[pn].enti.spt) + { + INC_PER_FRAME; + player[pn].enti.y-=(player[pn].enti.speed); + ANIMATESPRIFUN(pip, player, pn, 0); + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.q++; + } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; } + } + else + { + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); +#ifdef SPRITE + modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR); +#else + modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 12); +#endif + if(!pageflipflop) VL_ShowPage(pip[1].page, 0, 0); + player[pn].enti.d = 2; + } + player[pn].enti.triggerx = player[pn].enti.tx; + player[pn].enti.triggery = player[pn].enti.ty-1; + break; + } +} diff --git a/ca_use.txt b/ca_use.txt index 0de6c37b..6f0f01ba 100755 --- a/ca_use.txt +++ b/ca_use.txt @@ -1,5 +1,3 @@ -16/16/16_mm.c:CA_OpenDebug (); -16/16/16_mm.c:CA_CloseDebug (); 16/CatacombApocalypse/C6_DEBUG.C: CA_CacheGrChunk(LEVEL1TEXT+mapon); 16/CatacombApocalypse/C6_DEBUG.C: CA_CacheGrChunk(LEVEL1TEXT+mapon); 16/CatacombApocalypse/C6_GAME.C: CA_CacheGrChunk(LEVEL1TEXT+mapon); @@ -69,85 +67,6 @@ 16/CatacombApocalypse/GELIB.C: CA_MarkGrChunk(pi_shape_table[loop].shapenum); 16/CatacombApocalypse/GELIB.C: CA_MarkGrChunk(shapenum+loop); 16/CatacombApocalypse/GELIB.C: CA_CacheMarks(NULL); -16/CatacombApocalypse/ID_CA.C:= CA_OpenDebug / CA_CloseDebug -16/CatacombApocalypse/ID_CA.C:void CA_OpenDebug (void) -16/CatacombApocalypse/ID_CA.C:void CA_CloseDebug (void) -16/CatacombApocalypse/ID_CA.C:= CA_FarRead -16/CatacombApocalypse/ID_CA.C:boolean CA_FarRead (int handle, byte far *dest, long length) -16/CatacombApocalypse/ID_CA.C: Quit ("CA_FarRead doesn't support 64K reads yet!"); -16/CatacombApocalypse/ID_CA.C:= CA_SegWrite -16/CatacombApocalypse/ID_CA.C:boolean CA_FarWrite (int handle, byte far *source, long length) -16/CatacombApocalypse/ID_CA.C: Quit ("CA_FarWrite doesn't support 64K reads yet!"); -16/CatacombApocalypse/ID_CA.C:= CA_ReadFile -16/CatacombApocalypse/ID_CA.C:boolean CA_ReadFile (char *filename, memptr *ptr) -16/CatacombApocalypse/ID_CA.C: if (!CA_FarRead (handle,*ptr,size)) -16/CatacombApocalypse/ID_CA.C:= CA_LoadFile -16/CatacombApocalypse/ID_CA.C:boolean CA_LoadFile (char *filename, memptr *ptr) -16/CatacombApocalypse/ID_CA.C: if (!CA_FarRead (handle,*ptr,size)) -16/CatacombApocalypse/ID_CA.C:= CA_RLEWcompress -16/CatacombApocalypse/ID_CA.C:long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, -16/CatacombApocalypse/ID_CA.C:= CA_RLEWexpand -16/CatacombApocalypse/ID_CA.C:void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, -16/CatacombApocalypse/ID_CA.C: CA_FarRead(handle, (memptr)grstarts, (NUMCHUNKS+1)*FILEPOSSIZE); -16/CatacombApocalypse/ID_CA.C: CA_FarRead (grhandle,compseg,chunkcomplen); -16/CatacombApocalypse/ID_CA.C: CA_FarRead (grhandle,compseg,chunkcomplen); -16/CatacombApocalypse/ID_CA.C: CA_FarRead (grhandle,compseg,chunkcomplen); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(handle, tinf, length); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(handle, (byte far *)audiostarts, length); -16/CatacombApocalypse/ID_CA.C:= CA_Startup -16/CatacombApocalypse/ID_CA.C:void CA_Startup (void) -16/CatacombApocalypse/ID_CA.C: Quit("CA_Startup(): Can't find audio files."); -16/CatacombApocalypse/ID_CA.C: Quit("CA_Startup(): Can't find level files."); -16/CatacombApocalypse/ID_CA.C: Quit("CA_Startup(): Can't find graphics files."); -16/CatacombApocalypse/ID_CA.C:= CA_Shutdown -16/CatacombApocalypse/ID_CA.C:void CA_Shutdown (void) -16/CatacombApocalypse/ID_CA.C:= CA_CacheAudioChunk -16/CatacombApocalypse/ID_CA.C:void CA_CacheAudioChunk (int chunk) -16/CatacombApocalypse/ID_CA.C: Quit("CA_CacheAudioChunk(): Can't find audio files."); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(audiohandle,audiosegs[chunk],compressed); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(audiohandle,bufferseg,compressed); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(audiohandle,bigbufferseg,compressed); -16/CatacombApocalypse/ID_CA.C:= CA_LoadAllSounds -16/CatacombApocalypse/ID_CA.C:void CA_LoadAllSounds (void) -16/CatacombApocalypse/ID_CA.C: CA_CacheAudioChunk (start); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bufferseg,compressed); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); -16/CatacombApocalypse/ID_CA.C:= CA_CacheGrChunk -16/CatacombApocalypse/ID_CA.C:void CA_CacheGrChunk (int chunk) -16/CatacombApocalypse/ID_CA.C: Quit("CA_CacheGrChunk(): Can't find graphics files."); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bufferseg,compressed); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); -16/CatacombApocalypse/ID_CA.C:= CA_CacheMap -16/CatacombApocalypse/ID_CA.C:void CA_CacheMap (int mapnum) -16/CatacombApocalypse/ID_CA.C: Quit("CA_CacheMap(): Can't find level files."); -16/CatacombApocalypse/ID_CA.C: Quit ("CA_CacheMap: Tried to load a non existent map!"); -16/CatacombApocalypse/ID_CA.C: CA_FarRead (maphandle,(memptr)mapheaderseg[mapnum],sizeof(maptype)); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(maphandle,(byte far *)source,compressed); -16/CatacombApocalypse/ID_CA.C: CA_RLEWexpand (((unsigned far *)buffer2seg)+1,*dest,size, -16/CatacombApocalypse/ID_CA.C: CA_RLEWexpand (source+1, *dest,size, -16/CatacombApocalypse/ID_CA.C:= CA_UpLevel -16/CatacombApocalypse/ID_CA.C:void CA_UpLevel (void) -16/CatacombApocalypse/ID_CA.C: Quit ("CA_UpLevel: Up past level 7!"); -16/CatacombApocalypse/ID_CA.C:= CA_DownLevel -16/CatacombApocalypse/ID_CA.C:void CA_DownLevel (void) -16/CatacombApocalypse/ID_CA.C: Quit ("CA_DownLevel: Down past level 0!"); -16/CatacombApocalypse/ID_CA.C: CA_CacheMarks(NULL); -16/CatacombApocalypse/ID_CA.C:= CA_ClearMarks -16/CatacombApocalypse/ID_CA.C:void CA_ClearMarks (void) -16/CatacombApocalypse/ID_CA.C:= CA_ClearAllMarks -16/CatacombApocalypse/ID_CA.C:void CA_ClearAllMarks (void) -16/CatacombApocalypse/ID_CA.C:= CA_FreeGraphics -16/CatacombApocalypse/ID_CA.C:void CA_FreeGraphics (void) -16/CatacombApocalypse/ID_CA.C:= CA_SetAllPurge -16/CatacombApocalypse/ID_CA.C:void CA_SetAllPurge (void) -16/CatacombApocalypse/ID_CA.C: CA_ClearMarks (); -16/CatacombApocalypse/ID_CA.C: CA_FreeGraphics (); -16/CatacombApocalypse/ID_CA.C:void CA_SetGrPurge (void) -16/CatacombApocalypse/ID_CA.C:= CA_CacheMarks -16/CatacombApocalypse/ID_CA.C:void CA_CacheMarks (char *title) -16/CatacombApocalypse/ID_CA.C: Quit("CA_CacheMarks(): Can't find graphics files."); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bufferseg,endpos-pos); -16/CatacombApocalypse/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); 16/CatacombApocalypse/ID_MM.C://CA_OpenDebug (); 16/CatacombApocalypse/ID_MM.C://CA_CloseDebug (); 16/CatacombApocalypse/ID_RF.C: CA_MarkGrChunk(STARTTILE16+tile); @@ -178,68 +97,8 @@ 16/CatacombApocalypse/SOFT.C: CA_LoadFile(SourceFile,&SrcPtr); 16/CatacombApocalypse/SOFT.C: CA_LoadFile(SourceFile,DstPtr); 16/CatacombApocalypse/SOFT.C: if (!CA_FarRead(handle,MK_FP(*MemPtr,0),ChunkLen)) -16/ID_MM.C://CA_OpenDebug (); -16/ID_MM.C://CA_CloseDebug (); -16/keen/id_ca.c:= CA_FarRead -16/keen/id_ca.c:boolean CA_FarRead (int handle, byte far *dest, long length) -16/keen/id_ca.c: Quit ("CA_FarRead doesn't support 64K reads yet!"); -16/keen/id_ca.c:= CA_SegWrite -16/keen/id_ca.c:boolean CA_FarWrite (int handle, byte far *source, long length) -16/keen/id_ca.c: Quit ("CA_FarWrite doesn't support 64K reads yet!"); -16/keen/id_ca.c:= CA_LoadFile -16/keen/id_ca.c:boolean CA_LoadFile (char *filename, memptr *ptr) -16/keen/id_ca.c: if (!CA_FarRead (handle,*ptr,size)) -16/keen/id_ca.c:= CA_RLEWcompress -16/keen/id_ca.c:long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, -16/keen/id_ca.c:= CA_RLEWexpand -16/keen/id_ca.c:void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, -16/keen/id_ca.c: CA_FarRead(handle, (memptr)grstarts, (NUMCHUNKS+1)*4); -16/keen/id_ca.c: CA_FarRead (grhandle,compseg,chunkcomplen); -16/keen/id_ca.c: CA_FarRead (grhandle,compseg,chunkcomplen); -16/keen/id_ca.c: CA_FarRead (grhandle,compseg,chunkcomplen); -16/keen/id_ca.c: CA_FarRead(handle, tinf, length); -16/keen/id_ca.c: CA_FarRead(handle, (byte far *)audiostarts, length); -16/keen/id_ca.c:= CA_Startup -16/keen/id_ca.c:void CA_Startup (void) -16/keen/id_ca.c:= CA_Shutdown -16/keen/id_ca.c:void CA_Shutdown (void) -16/keen/id_ca.c:= CA_CacheAudioChunk -16/keen/id_ca.c:void CA_CacheAudioChunk (int chunk) -16/keen/id_ca.c: CA_FarRead(audiohandle,audiosegs[chunk],compressed); -16/keen/id_ca.c: CA_FarRead(audiohandle,bufferseg,compressed); -16/keen/id_ca.c: CA_FarRead(audiohandle,bigbufferseg,compressed); -16/keen/id_ca.c:= CA_LoadAllSounds -16/keen/id_ca.c:void CA_LoadAllSounds (void) -16/keen/id_ca.c: CA_CacheAudioChunk (start); -16/keen/id_ca.c: CA_FarRead(grhandle,bufferseg,compressed); -16/keen/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); -16/keen/id_ca.c:= CA_CacheGrChunk -16/keen/id_ca.c:void CA_CacheGrChunk (int chunk) -16/keen/id_ca.c: CA_FarRead(grhandle,bufferseg,compressed); -16/keen/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); -16/keen/id_ca.c:= CA_CacheMap -16/keen/id_ca.c:void CA_CacheMap (int mapnum) -16/keen/id_ca.c: Quit ("CA_CacheMap: Tried to load a non existant map!"); -16/keen/id_ca.c: CA_FarRead (maphandle,bufferseg,((mapfiletype _seg *)tinf)->headersize[mapnum]); -16/keen/id_ca.c: CA_FarRead (maphandle,(memptr)mapheaderseg[mapnum],sizeof(maptype)); -16/keen/id_ca.c: CA_FarRead(maphandle,(byte far *)source,compressed); -16/keen/id_ca.c: CA_RLEWexpand (((unsigned far *)buffer2seg)+1,*dest,size, -16/keen/id_ca.c: CA_RLEWexpand (source+1, *dest,size, -16/keen/id_ca.c:= CA_UpLevel -16/keen/id_ca.c:void CA_UpLevel (void) -16/keen/id_ca.c: Quit ("CA_UpLevel: Up past level 7!"); -16/keen/id_ca.c:= CA_DownLevel -16/keen/id_ca.c:void CA_DownLevel (void) -16/keen/id_ca.c: Quit ("CA_DownLevel: Down past level 0!"); -16/keen/id_ca.c: CA_CacheMarks(titleptr[ca_levelnum], 1); -16/keen/id_ca.c:= CA_ClearMarks -16/keen/id_ca.c:void CA_ClearMarks (void) -16/keen/id_ca.c:= CA_ClearAllMarks -16/keen/id_ca.c:void CA_ClearAllMarks (void) -16/keen/id_ca.c:= CA_CacheMarks -16/keen/id_ca.c:void CA_CacheMarks (char *title, boolean cachedownlevel) -16/keen/id_ca.c: CA_FarRead(grhandle,bufferseg,endpos-pos); -16/keen/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); + + 16/keen/id_rf.c: CA_MarkGrChunk(STARTTILE16+tile); 16/keen/id_rf.c: CA_MarkGrChunk(STARTTILE16+next); 16/keen/id_rf.c: CA_MarkGrChunk(STARTTILE16M+tile); @@ -281,95 +140,14 @@ 16/keen/soft.c: CA_LoadFile(SourceFile,&SrcPtr); 16/keen/soft.c: CA_LoadFile(SourceFile,DstPtr); 16/keen/soft.c: if (!CA_FarRead(handle,MK_FP(*MemPtr,0),ChunkLen)) -16/wf3d8086/id_ca.c:void CA_CannotOpen(char *string); -16/wf3d8086/id_ca.c:= CA_OpenDebug / CA_CloseDebug -16/wf3d8086/id_ca.c:void CA_OpenDebug (void) -16/wf3d8086/id_ca.c:void CA_CloseDebug (void) -16/wf3d8086/id_ca.c:= CA_FarRead -16/wf3d8086/id_ca.c:boolean CA_FarRead (int handle, byte far *dest, long length) -16/wf3d8086/id_ca.c: Quit ("CA_FarRead doesn't support 64K reads yet!"); -16/wf3d8086/id_ca.c:= CA_SegWrite -16/wf3d8086/id_ca.c:boolean CA_FarWrite (int handle, byte far *source, long length) -16/wf3d8086/id_ca.c: Quit ("CA_FarWrite doesn't support 64K reads yet!"); -16/wf3d8086/id_ca.c:= CA_ReadFile -16/wf3d8086/id_ca.c:boolean CA_ReadFile (char *filename, memptr *ptr) -16/wf3d8086/id_ca.c: if (!CA_FarRead (handle,*ptr,size)) -16/wf3d8086/id_ca.c:= CA_WriteFile -16/wf3d8086/id_ca.c:boolean CA_WriteFile (char *filename, void far *ptr, long length) -16/wf3d8086/id_ca.c: if (!CA_FarWrite (handle,ptr,length)) -16/wf3d8086/id_ca.c:= CA_LoadFile -16/wf3d8086/id_ca.c:boolean CA_LoadFile (char *filename, memptr *ptr) -16/wf3d8086/id_ca.c: if (!CA_FarRead (handle,*ptr,size)) -16/wf3d8086/id_ca.c:= CA_RLEWcompress -16/wf3d8086/id_ca.c:long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, -16/wf3d8086/id_ca.c:= CA_RLEWexpand -16/wf3d8086/id_ca.c:void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_FarRead(handle, (memptr)grstarts, (NUMCHUNKS+1)*FILEPOSSIZE); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_FarRead (grhandle,compseg,chunkcomplen); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_FarRead(handle, tinf, length); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_FarRead (maphandle,(memptr)mapheaderseg[i],sizeof(maptype)); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c: CA_FarRead(handle, (byte far *)audiostarts, length); -16/wf3d8086/id_ca.c: CA_CannotOpen(fname); -16/wf3d8086/id_ca.c:= CA_Startup -16/wf3d8086/id_ca.c:void CA_Startup (void) -16/wf3d8086/id_ca.c:= CA_Shutdown -16/wf3d8086/id_ca.c:void CA_Shutdown (void) -16/wf3d8086/id_ca.c:= CA_CacheAudioChunk -16/wf3d8086/id_ca.c:void CA_CacheAudioChunk (int chunk) -16/wf3d8086/id_ca.c: CA_FarRead(audiohandle,audiosegs[chunk],compressed); -16/wf3d8086/id_ca.c: CA_FarRead(audiohandle,bufferseg,compressed); -16/wf3d8086/id_ca.c: CA_FarRead(audiohandle,bigbufferseg,compressed); -16/wf3d8086/id_ca.c:= CA_LoadAllSounds -16/wf3d8086/id_ca.c:void CA_LoadAllSounds (void) -16/wf3d8086/id_ca.c: CA_CacheAudioChunk (start); -16/wf3d8086/id_ca.c:= CA_CacheGrChunk -16/wf3d8086/id_ca.c:void CA_CacheGrChunk (int chunk) -16/wf3d8086/id_ca.c: CA_FarRead(grhandle,bufferseg,compressed); -16/wf3d8086/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wf3d8086/id_ca.c:= CA_CacheScreen -16/wf3d8086/id_ca.c:void CA_CacheScreen (int chunk) -16/wf3d8086/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wf3d8086/id_ca.c:= CA_CacheMap -16/wf3d8086/id_ca.c:void CA_CacheMap (int mapnum) -16/wf3d8086/id_ca.c: CA_FarRead(maphandle,(byte far *)source,compressed); -16/wf3d8086/id_ca.c: CA_RLEWexpand (((unsigned far *)buffer2seg)+1,*dest,size, -16/wf3d8086/id_ca.c: CA_RLEWexpand (source+1, *dest,size, -16/wf3d8086/id_ca.c:= CA_UpLevel -16/wf3d8086/id_ca.c:void CA_UpLevel (void) -16/wf3d8086/id_ca.c: Quit ("CA_UpLevel: Up past level 7!"); -16/wf3d8086/id_ca.c:= CA_DownLevel -16/wf3d8086/id_ca.c:void CA_DownLevel (void) -16/wf3d8086/id_ca.c: Quit ("CA_DownLevel: Down past level 0!"); -16/wf3d8086/id_ca.c: CA_CacheMarks(); -16/wf3d8086/id_ca.c:= CA_ClearMarks -16/wf3d8086/id_ca.c:void CA_ClearMarks (void) -16/wf3d8086/id_ca.c:= CA_ClearAllMarks -16/wf3d8086/id_ca.c:void CA_ClearAllMarks (void) -16/wf3d8086/id_ca.c:= CA_FreeGraphics -16/wf3d8086/id_ca.c:void CA_SetGrPurge (void) -16/wf3d8086/id_ca.c: CA_ClearMarks (); -16/wf3d8086/id_ca.c:= CA_SetAllPurge -16/wf3d8086/id_ca.c:void CA_SetAllPurge (void) -16/wf3d8086/id_ca.c: CA_SetGrPurge (); -16/wf3d8086/id_ca.c:= CA_CacheMarks -16/wf3d8086/id_ca.c:void CA_CacheMarks (void) -16/wf3d8086/id_ca.c: CA_FarRead(grhandle,bufferseg,endpos-pos); -16/wf3d8086/id_ca.c: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wf3d8086/id_ca.c:void CA_CannotOpen(char *string) + + 16/wf3d8086/id_pm.c: if (!CA_FarRead(PageFile,buf,length)) 16/wf3d8086/id_pm.c: if (!CA_FarRead(PageFile,(byte far *)buf,size)) 16/wf3d8086/id_pm.c: if (!CA_FarRead(PageFile,(byte far *)buf,size)) 16/wf3d8086/id_vh.c: CA_CacheGrChunk (STARTTILE8); 16/wf3d8086/id_vh.c: CA_CacheGrChunk (STARTTILE16+i); 16/wf3d8086/id_vh.c: CA_CacheGrChunk (i); -16/wf3d8086/obj/wolf3d.map: 1710:000B 1752 C=CODE S=ID_CA_TEXT G=(none) M=ID_CA.C ACBP=28 16/wf3d8086/wl_act2.c: CA_UpLevel (); 16/wf3d8086/wl_act2.c: CA_CacheScreen(C_LETSSEEPIC); 16/wf3d8086/wl_act2.c: CA_DownLevel (); @@ -528,251 +306,169 @@ 16/wf3d8086/wl_text.c: CA_CacheGrChunk (artnum); 16/wf3d8086/wl_text.c: CA_LoadFile (endfilename,&layout); 16/wf3d8086/wl_text.c: CA_DownLevel (); -16/wf3d8086/wolf3d.map: 160F:0008 16B9 C=CODE S=ID_CA_TEXT G=(none) M=ID_CA.C ACBP=28 -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CannotOpen(char *string); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_OpenDebug / CA_CloseDebug -16/wolf3d/WOLFSRC/ID_CA.C:void CA_OpenDebug (void) -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CloseDebug (void) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_FarRead -16/wolf3d/WOLFSRC/ID_CA.C:boolean CA_FarRead (int handle, byte far *dest, long length) -16/wolf3d/WOLFSRC/ID_CA.C: Quit ("CA_FarRead doesn't support 64K reads yet!"); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_SegWrite -16/wolf3d/WOLFSRC/ID_CA.C:boolean CA_FarWrite (int handle, byte far *source, long length) -16/wolf3d/WOLFSRC/ID_CA.C: Quit ("CA_FarWrite doesn't support 64K reads yet!"); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_ReadFile -16/wolf3d/WOLFSRC/ID_CA.C:boolean CA_ReadFile (char *filename, memptr *ptr) -16/wolf3d/WOLFSRC/ID_CA.C: if (!CA_FarRead (handle,*ptr,size)) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_WriteFile -16/wolf3d/WOLFSRC/ID_CA.C:boolean CA_WriteFile (char *filename, void far *ptr, long length) -16/wolf3d/WOLFSRC/ID_CA.C: if (!CA_FarWrite (handle,ptr,length)) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_LoadFile -16/wolf3d/WOLFSRC/ID_CA.C:boolean CA_LoadFile (char *filename, memptr *ptr) -16/wolf3d/WOLFSRC/ID_CA.C: if (!CA_FarRead (handle,*ptr,size)) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_RLEWcompress -16/wolf3d/WOLFSRC/ID_CA.C:long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, -16/wolf3d/WOLFSRC/ID_CA.C:= CA_RLEWexpand -16/wolf3d/WOLFSRC/ID_CA.C:void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(handle, (memptr)grstarts, (NUMCHUNKS+1)*FILEPOSSIZE); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead (grhandle,compseg,chunkcomplen); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(handle, tinf, length); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead (maphandle,(memptr)mapheaderseg[i],sizeof(maptype)); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(handle, (byte far *)audiostarts, length); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CannotOpen(fname); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_Startup -16/wolf3d/WOLFSRC/ID_CA.C:void CA_Startup (void) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_Shutdown -16/wolf3d/WOLFSRC/ID_CA.C:void CA_Shutdown (void) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_CacheAudioChunk -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CacheAudioChunk (int chunk) -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(audiohandle,audiosegs[chunk],compressed); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(audiohandle,bufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(audiohandle,bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_LoadAllSounds -16/wolf3d/WOLFSRC/ID_CA.C:void CA_LoadAllSounds (void) -16/wolf3d/WOLFSRC/ID_CA.C: CA_CacheAudioChunk (start); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_CacheGrChunk -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CacheGrChunk (int chunk) -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(grhandle,bufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_CacheScreen -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CacheScreen (int chunk) -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_CacheMap -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CacheMap (int mapnum) -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(maphandle,(byte far *)source,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: CA_RLEWexpand (((unsigned far *)buffer2seg)+1,*dest,size, -16/wolf3d/WOLFSRC/ID_CA.C: CA_RLEWexpand (source+1, *dest,size, -16/wolf3d/WOLFSRC/ID_CA.C:= CA_UpLevel -16/wolf3d/WOLFSRC/ID_CA.C:void CA_UpLevel (void) -16/wolf3d/WOLFSRC/ID_CA.C: Quit ("CA_UpLevel: Up past level 7!"); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_DownLevel -16/wolf3d/WOLFSRC/ID_CA.C:void CA_DownLevel (void) -16/wolf3d/WOLFSRC/ID_CA.C: Quit ("CA_DownLevel: Down past level 0!"); -16/wolf3d/WOLFSRC/ID_CA.C: CA_CacheMarks(); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_ClearMarks -16/wolf3d/WOLFSRC/ID_CA.C:void CA_ClearMarks (void) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_ClearAllMarks -16/wolf3d/WOLFSRC/ID_CA.C:void CA_ClearAllMarks (void) -16/wolf3d/WOLFSRC/ID_CA.C:= CA_FreeGraphics -16/wolf3d/WOLFSRC/ID_CA.C:void CA_SetGrPurge (void) -16/wolf3d/WOLFSRC/ID_CA.C: CA_ClearMarks (); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_SetAllPurge -16/wolf3d/WOLFSRC/ID_CA.C:void CA_SetAllPurge (void) -16/wolf3d/WOLFSRC/ID_CA.C: CA_SetGrPurge (); -16/wolf3d/WOLFSRC/ID_CA.C:= CA_CacheMarks -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CacheMarks (void) -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(grhandle,bufferseg,endpos-pos); -16/wolf3d/WOLFSRC/ID_CA.C: CA_FarRead(grhandle,bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C:void CA_CannotOpen(char *string) -16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,buf,length)) -16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,(byte far *)buf,size)) -16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,(byte far *)buf,size)) -16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (STARTTILE8); -16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (STARTTILE16+i); -16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (i); -16/wolf3d/WOLFSRC/WL_ACT2.C: CA_UpLevel (); -16/wolf3d/WOLFSRC/WL_ACT2.C: CA_CacheScreen(C_LETSSEEPIC); -16/wolf3d/WOLFSRC/WL_ACT2.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WL_DEBUG.C: CA_SetAllPurge(); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheMap (gamestate.mapon+10*gamestate.episode); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_LoadAllSounds (); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk (STATUSBARPIC); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_WriteFile (demoname,(void far *)demobuffer,length); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk(STARTFONT); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk(dems[demonumber]); -16/wolf3d/WOLFSRC/WL_GAME.C: CA_LoadFile (demoname,&demobuffer); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheScreen (screen); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (palette); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheScreen (ENDSCREEN3PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (END3PALETTE); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE1PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE2PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE3PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE4PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_TIMECODEPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_ENDRATIOSPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (PG13PIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_INTERMISSIONPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_INTER.C:// CA_CacheGrChunk (C_CODEPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (HIGHSCORESPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_LEVELPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_SCOREPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_NAMEPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_BACKDROPPIC); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_INTER.C: CA_LoadAllSounds(); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&gamestate,sizeof(gamestate)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*20); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*8); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)tilemap,sizeof(tilemap)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)actorat,sizeof(actorat)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)areaconnect,sizeof(areaconnect)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)areabyplayer,sizeof(areabyplayer)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)ob,sizeof(*ob)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&nullobj,sizeof(nullobj)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&laststatobj,sizeof(laststatobj)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)statobjlist,sizeof(statobjlist)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)doorposition,sizeof(doorposition)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)doorobjlist,sizeof(doorobjlist)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallstate,sizeof(pwallstate)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallx,sizeof(pwallx)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwally,sizeof(pwally)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwalldir,sizeof(pwalldir)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallpos,sizeof(pwallpos)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&checksum,sizeof(checksum)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&gamestate,sizeof(gamestate)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*20); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*8); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)tilemap,sizeof(tilemap)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)actorat,sizeof(actorat)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)areaconnect,sizeof(areaconnect)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)areabyplayer,sizeof(areabyplayer)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)player,sizeof(*player)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&nullobj,sizeof(nullobj)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&laststatobj,sizeof(laststatobj)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)statobjlist,sizeof(statobjlist)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)doorposition,sizeof(doorposition)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)doorobjlist,sizeof(doorobjlist)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallstate,sizeof(pwallstate)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallx,sizeof(pwallx)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwally,sizeof(pwally)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwalldir,sizeof(pwalldir)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallpos,sizeof(pwallpos)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&oldchecksum,sizeof(oldchecksum)); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_Shutdown (); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_LoadAllSounds (); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_Startup (); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ERRORSCREEN); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk(STARTFONT); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_UpLevel (); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ORDERSCREEN); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ERRORSCREEN); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLEPALETTE); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLE1PIC); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLE2PIC); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheScreen (TITLEPIC); -16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheScreen (CREDITSPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYS1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYS2PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYSPALETTE); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_OPTIONSPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MRETGAMEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MENDGAMEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MRETDEMOPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MSCORESPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR2PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING2PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_SAVEGAMEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MOUSELBACKPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR2PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING2PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_LOADGAMEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MOUSELBACKPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_EPISODEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_SKILLPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_SOUNDPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_MOUSESENSPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CONTROLPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CUSTOMPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CHANGEPIC); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(i); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(pic); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheAudioChunk(STARTMUSIC + chunk); -16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); -16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT); -16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheAudioChunk(STARTMUSIC + chunk); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_TOPWINDOWPIC); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_LEFTWINDOWPIC); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_RIGHTWINDOWPIC); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_BOTTOMINFOPIC); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheMarks (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk (picnum); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk (picnum); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(STARTFONT); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheScreen(snames[pagenum - 1]); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheScreen(enames[which*2 + pagenum - 1]); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_UpLevel (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheGrChunk (artnum); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_LoadFile (helpfilename,&layout); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_UpLevel (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheGrChunk (artnum); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_LoadFile (endfilename,&layout); -16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); -16/wolf3d/WOLFSRC/WOLF3D.MAP: 160F:0008 16B9 C=CODE S=ID_CA_TEXT G=(none) M=ID_CA.C ACBP=28 + + +16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,buf,length)) +16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,(byte far *)buf,size)) +16/wolf3d/WOLFSRC/ID_PM.C: if (!CA_FarRead(PageFile,(byte far *)buf,size)) +16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (STARTTILE8); +16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (STARTTILE16+i); +16/wolf3d/WOLFSRC/ID_VH.C: CA_CacheGrChunk (i); +16/wolf3d/WOLFSRC/WL_ACT2.C: CA_UpLevel (); +16/wolf3d/WOLFSRC/WL_ACT2.C: CA_CacheScreen(C_LETSSEEPIC); +16/wolf3d/WOLFSRC/WL_ACT2.C: CA_DownLevel (); +16/wolf3d/WOLFSRC/WL_DEBUG.C: CA_SetAllPurge(); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheMap (gamestate.mapon+10*gamestate.episode); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_LoadAllSounds (); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk (STATUSBARPIC); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_WriteFile (demoname,(void far *)demobuffer,length); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk(STARTFONT); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_CacheGrChunk(dems[demonumber]); +16/wolf3d/WOLFSRC/WL_GAME.C: CA_LoadFile (demoname,&demobuffer); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheScreen (screen); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (palette); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheScreen (ENDSCREEN3PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (END3PALETTE); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE1PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE2PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE3PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(BJCOLLAPSE4PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_TIMECODEPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_ENDRATIOSPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (PG13PIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_INTERMISSIONPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_INTER.C:// CA_CacheGrChunk (C_CODEPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (HIGHSCORESPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_LEVELPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_SCOREPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (C_NAMEPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(C_BACKDROPPIC); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_INTER.C: CA_LoadAllSounds(); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&gamestate,sizeof(gamestate)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*20); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*8); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)tilemap,sizeof(tilemap)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)actorat,sizeof(actorat)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)areaconnect,sizeof(areaconnect)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)areabyplayer,sizeof(areabyplayer)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)ob,sizeof(*ob)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&nullobj,sizeof(nullobj)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&laststatobj,sizeof(laststatobj)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)statobjlist,sizeof(statobjlist)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)doorposition,sizeof(doorposition)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)doorobjlist,sizeof(doorobjlist)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallstate,sizeof(pwallstate)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallx,sizeof(pwallx)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwally,sizeof(pwally)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwalldir,sizeof(pwalldir)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&pwallpos,sizeof(pwallpos)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarWrite (file,(void far *)&checksum,sizeof(checksum)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&gamestate,sizeof(gamestate)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*20); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&LevelRatios[0],sizeof(LRstruct)*8); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)tilemap,sizeof(tilemap)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)actorat,sizeof(actorat)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)areaconnect,sizeof(areaconnect)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)areabyplayer,sizeof(areabyplayer)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)player,sizeof(*player)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&nullobj,sizeof(nullobj)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&laststatobj,sizeof(laststatobj)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)statobjlist,sizeof(statobjlist)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)doorposition,sizeof(doorposition)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)doorobjlist,sizeof(doorobjlist)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallstate,sizeof(pwallstate)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallx,sizeof(pwallx)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwally,sizeof(pwally)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwalldir,sizeof(pwalldir)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&pwallpos,sizeof(pwallpos)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_FarRead (file,(void far *)&oldchecksum,sizeof(oldchecksum)); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_Shutdown (); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_LoadAllSounds (); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_Startup (); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ERRORSCREEN); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk(STARTFONT); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_UpLevel (); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_DownLevel (); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ORDERSCREEN); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (ERRORSCREEN); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLEPALETTE); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLE1PIC); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheGrChunk (TITLE2PIC); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheScreen (TITLEPIC); +16/wolf3d/WOLFSRC/WL_MAIN.C: CA_CacheScreen (CREDITSPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYS1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYS2PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (IDGUYSPALETTE); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_OPTIONSPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MRETGAMEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MENDGAMEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MRETDEMOPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MSCORESPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR2PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING2PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_SAVEGAMEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MOUSELBACKPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR2PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_DISKLOADING2PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_LOADGAMEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_MOUSELBACKPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(C_CURSOR1PIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_EPISODEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_SKILLPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_SOUNDPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_MOUSESENSPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CONTROLPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CUSTOMPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheScreen(S_CHANGEPIC); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(i); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_LoadAllSounds(); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk(pic); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_MENU.C: CA_CacheAudioChunk(STARTMUSIC + chunk); +16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT+1); +16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheGrChunk (STARTFONT); +16/wolf3d/WOLFSRC/WL_PLAY.C: CA_CacheAudioChunk(STARTMUSIC + chunk); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_TOPWINDOWPIC); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_LEFTWINDOWPIC); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_RIGHTWINDOWPIC); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(H_BOTTOMINFOPIC); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheMarks (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk (picnum); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk (picnum); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_MarkGrChunk(STARTFONT); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheScreen(snames[pagenum - 1]); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheScreen(enames[which*2 + pagenum - 1]); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_UpLevel (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheGrChunk (artnum); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_LoadFile (helpfilename,&layout); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_UpLevel (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_CacheGrChunk (artnum); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_LoadFile (endfilename,&layout); +16/wolf3d/WOLFSRC/WL_TEXT.C: CA_DownLevel (); diff --git a/planarNotes.txt b/doc/planarNotes.txt similarity index 100% rename from planarNotes.txt rename to doc/planarNotes.txt diff --git a/fontgfx.exe b/fontgfx.exe index eb0e3f89..d1b24cf8 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/makefile b/makefile index 5695c680..2f6803af 100755 --- a/makefile +++ b/makefile @@ -107,7 +107,7 @@ UPXQ=-qqq S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768 Z_FLAGS=-zk0 -zc -zp8 -zm O_FLAGS=-opmilr -oe=24 -outback -ei -ohnl+ -zp4 -T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1##-fo=.$(OBJ) -e=65536 +T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -e28#65536##-fo=.$(OBJ) DBUGFLAGS=-fm=$^&.mah -fd=$^& CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 @@ -185,14 +185,14 @@ TESTEXEC = & scroll.exe & zcroll.exe & inputest.exe & - pcxtest.exe & - vrstest.exe + pcxtest.exe TESTEXEC2 = & maptest.exe & fmemtest.exe & fonttest.exe & fontgfx.exe & test0.exe & + vrstest.exe & $(EXTERNTESTEXEC) TESTEXEC3= & pcxtest2.exe @@ -335,9 +335,10 @@ mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h 16_map.$(OBJ):$(SRCLIB)/16_map.c $(SRCLIB)/16_map.h 16_timer.$(OBJ):$(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h 16_in.$(OBJ): $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h -16_mm.$(OBJ): $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h -16_pm.$(OBJ): $(SRCLIB)/16_pm.c $(SRCLIB)/16_pm.h -16_ca.$(OBJ): $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h +16_rf.$(OBJ): $(SRCLIB)/16_rf.c $(SRCLIB)/16_rf.h +16_mm.$(OBJ): $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h +16_pm.$(OBJ): $(SRCLIB)/16_pm.c $(SRCLIB)/16_pm.h +16_ca.$(OBJ): $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h 16_dbg.$(OBJ): $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h midi.$(OBJ): $(SRCLIB)/midi.c $(SRCLIB)/midi.h 16_head.$(OBJ):$(SRCLIB)/16_head.c $(SRCLIB)/16_head.h diff --git a/mm_use.txt b/mm_use.txt index 7b0739a6..9d0622f7 100755 --- a/mm_use.txt +++ b/mm_use.txt @@ -1,76 +1,3 @@ -16/16/16_mm.c:MM_SizePtr to change the size of a given pointer -16/16/16_mm.c: strcpy(str,"MM_SetupEMS: EMS error "); -16/16/16_mm.c: MM_EMSerr(&str, err); -16/16/16_mm.c:= MM_MapEMS -16/16/16_mm.c:byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) -16/16/16_mm.c: strcpy(str,"MM_MapEMS: EMS error "); -16/16/16_mm.c: MM_EMSerr(str, err); -16/16/16_mm.c:byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi) -16/16/16_mm.c: //strcpy(str,"MM_MapXEMS: EMS error 0x"); -16/16/16_mm.c: strcpy(str,"MM_MapXEMS: EMS error "); -16/16/16_mm.c: MM_EMSerr(&str, err); -16/16/16_mm.c: MM_FreeBlock(scan, mm); -16/16/16_mm.c: MM_GetNewBlock(mm); -16/16/16_mm.c: MM_FreePtr(scan->useptr, mm); -16/16/16_mm.c: printf("MM_ClearBlock: No purgable blocks!\n"); -16/16/16_mm.c:= MM_Startup -16/16/16_mm.c:void MM_Startup(mminfo_t *mm, mminfotype *mmi) -16/16/16_mm.c: MM_Shutdown(mm); -16/16/16_mm.c: MM_GetNewBlock(mm); -16/16/16_mm.c: MM_MapEMS(mm, mmi); // map in used pages -16/16/16_mm.c: //MM_MapXEMS(mm, mmi); // map in used pages -16/16/16_mm.c: MM_GetPtr(&(mm->bufferseg),BUFFERSIZE, mm, mmi); -16/16/16_mm.c:= MM_Shutdown -16/16/16_mm.c:void MM_Shutdown(mminfo_t *mm) -16/16/16_mm.c:= MM_GetPtr -16/16/16_mm.c:void MM_GetPtr(memptr *baseptr,dword size, mminfo_t *mm, mminfotype *mmi) -16/16/16_mm.c: MM_GetNewBlock(mm); // fill in start and next after a spot is found -16/16/16_mm.c: MM_SortMem(mm); -16/16/16_mm.c: MM_FreeBlock(purge, mm); -16/16/16_mm.c: MM_Shutdown(mm); -16/16/16_mm.c:= MM_FreePtr -16/16/16_mm.c:void MM_FreePtr(memptr *baseptr, mminfo_t *mm) -16/16/16_mm.c: printf("MM_FreePtr: Block not found!\n"); -16/16/16_mm.c: MM_FreeBlock(scan, mm); -16/16/16_mm.c:= MM_SetPurge -16/16/16_mm.c:void MM_SetPurge(memptr *baseptr, int purge, mminfo_t *mm) -16/16/16_mm.c: printf("MM_SetPurge: Block not found!"); -16/16/16_mm.c:= MM_SetLock -16/16/16_mm.c:void MM_SetLock(memptr *baseptr, boolean locked, mminfo_t *mm) -16/16/16_mm.c: printf("MM_SetLock: Block not found!"); -16/16/16_mm.c:= MM_SortMem -16/16/16_mm.c:void MM_SortMem(mminfo_t *mm) -16/16/16_mm.c: MM_SetLock(&(memptr)audiosegs[playing],true); -16/16/16_mm.c: MM_FreeBlock(scan, mm); -16/16/16_mm.c: MM_SetLock(&(memptr)audiosegs[playing],false);*/ -16/16/16_mm.c:= MM_ShowMemory -16/16/16_mm.c:void MM_ShowMemory(/*page_t *page, */mminfo_t *mm) -16/16/16_mm.c: write(debughandle,"\nMM_ShowMemory: Memory block order currupted!\n",strlen("\nMM_ShowMemory: Memory block order currupted!\n")); -16/16/16_mm.c: //modexprint(&page, chx, chy, 1, 0, 24, "\nMM_ShowMemory: Memory block order currupted!\n"); -16/16/16_mm.c:= MM_DumpData -16/16/16_mm.c:void MM_DumpData(mminfo_t *mm) -16/16/16_mm.c: printf("MM_DumpData: Couldn't open MMDUMP.16!\n"); -16/16/16_mm.c:= MM_UnusedMemory -16/16/16_mm.c:dword MM_UnusedMemory(mminfo_t *mm) -16/16/16_mm.c:= MM_TotalFree -16/16/16_mm.c:dword MM_TotalFree(mminfo_t *mm) -16/16/16_mm.c:= MM_Report -16/16/16_mm.c:void MM_Report(/*page_t *page, */mminfo_t *mm, mminfotype *mmi) -16/16/16_mm.c: printf("UnusedMemory=%lu\n", MM_UnusedMemory(mm)); -16/16/16_mm.c: printf("TotalFree=%lu\n", MM_TotalFree(mm)); -16/16/16_mm.c:// printf("UnusedMemory=%lu kb\n", MM_UnusedMemory()/10248); -16/16/16_mm.c:// printf("TotalFree=%lu kb\n", MM_TotalFree()/10248); -16/16/16_mm.c:= MM_EMSerr -16/16/16_mm.c:void MM_EMSerr(byte *stri, byte err) -16/16/16_mm.c:= MM_BombOnError -16/16/16_mm.c:void MM_BombOnError(boolean bomb, mminfo_t *mm) -16/16/16_mm.c:void MM_GetNewBlock(mminfo_t *mm) -16/16/16_mm.c: printf("MM_GETNEWBLOCK: No free blocks!\n"); -16/16/16_mm.c:void MM_FreeBlock(mmblocktype *x, mminfo_t *mm) -16/16/16_mm.c:void MM_seguin(void) -16/16/16_mm.c:void MM_segude(void) -16/16/src/lib/16_in.c: MM_GetPtr((memptr *)&DemoBuffer,bufsize); -16/16/src/lib/16_in.c: MM_FreePtr((memptr *)&DemoBuffer); 16/CatacombApocalypse/C6_DEBUG.C: MM_SetPurge(&grsegs[LEVEL1TEXT+mapon],3); 16/CatacombApocalypse/C6_DEBUG.C: MM_SetPurge(&grsegs[LEVEL1TEXT+mapon],3); 16/CatacombApocalypse/C6_DEBUG.C: MM_SetPurge(&grsegs[LEVEL1TEXT+mapon],3); @@ -185,47 +112,6 @@ 16/CatacombApocalypse/ID_CA.C: MM_FreePtr(&bigbufferseg); 16/CatacombApocalypse/ID_IN.C: MM_GetPtr((memptr *)&DemoBuffer,bufsize); 16/CatacombApocalypse/ID_IN.C: MM_FreePtr((memptr *)&DemoBuffer); -16/CatacombApocalypse/ID_MM.C:MM_SizePtr to change the size of a given pointer -16/CatacombApocalypse/ID_MM.C:#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes" -16/CatacombApocalypse/ID_MM.C://#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/CatacombApocalypse/ID_MM.C:void MM_MapEMS (void); -16/CatacombApocalypse/ID_MM.C:= MM_MapEMS -16/CatacombApocalypse/ID_MM.C:void MM_MapEMS (void) -16/CatacombApocalypse/ID_MM.C: strcpy (str,"MM_MapEMS: EMS error 0x"); -16/CatacombApocalypse/ID_MM.C: MM_FreePtr(scan->useptr); -16/CatacombApocalypse/ID_MM.C: Quit ("MM_ClearBlock: No purgable blocks!"); -16/CatacombApocalypse/ID_MM.C:= MM_Startup -16/CatacombApocalypse/ID_MM.C:void MM_Startup (void) -16/CatacombApocalypse/ID_MM.C: MM_Shutdown (); -16/CatacombApocalypse/ID_MM.C: MM_MapEMS(); // map in used pages -16/CatacombApocalypse/ID_MM.C: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/CatacombApocalypse/ID_MM.C:= MM_Shutdown -16/CatacombApocalypse/ID_MM.C:void MM_Shutdown (void) -16/CatacombApocalypse/ID_MM.C:= MM_GetPtr -16/CatacombApocalypse/ID_MM.C:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/CatacombApocalypse/ID_MM.C: MM_SortMem (); -16/CatacombApocalypse/ID_MM.C:= MM_FreePtr -16/CatacombApocalypse/ID_MM.C:void MM_FreePtr (memptr *baseptr) -16/CatacombApocalypse/ID_MM.C: Quit ("MM_FreePtr: Block not found!"); -16/CatacombApocalypse/ID_MM.C:= MM_SetPurge -16/CatacombApocalypse/ID_MM.C:void MM_SetPurge (memptr *baseptr, int purge) -16/CatacombApocalypse/ID_MM.C: Quit ("MM_SetPurge: Block not found!"); -16/CatacombApocalypse/ID_MM.C:= MM_SetLock -16/CatacombApocalypse/ID_MM.C:void MM_SetLock (memptr *baseptr, boolean locked) -16/CatacombApocalypse/ID_MM.C: Quit ("MM_SetLock: Block not found!"); -16/CatacombApocalypse/ID_MM.C:= MM_SortMem -16/CatacombApocalypse/ID_MM.C:void MM_SortMem (void) -16/CatacombApocalypse/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],true); -16/CatacombApocalypse/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],false); -16/CatacombApocalypse/ID_MM.C:= MM_ShowMemory -16/CatacombApocalypse/ID_MM.C:void MM_ShowMemory (void) -16/CatacombApocalypse/ID_MM.C: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/CatacombApocalypse/ID_MM.C:= MM_UnusedMemory -16/CatacombApocalypse/ID_MM.C:long MM_UnusedMemory (void) -16/CatacombApocalypse/ID_MM.C:= MM_TotalFree -16/CatacombApocalypse/ID_MM.C:long MM_TotalFree (void) -16/CatacombApocalypse/ID_MM.C:= MM_BombOnError -16/CatacombApocalypse/ID_MM.C:void MM_BombOnError (boolean bomb) 16/CatacombApocalypse/ID_US.C: MM_GetPtr(save,(w * h) * CHARWIDTH); 16/CatacombApocalypse/ID_US.C: MM_FreePtr(save); 16/CatacombApocalypse/ID_US.C: MM_GetPtr(&LineOffsets,MaxHelpLines * sizeof(word)); @@ -260,90 +146,8 @@ 16/CatacombApocalypse/SOFT.C: MM_GetPtr(&SHP->Data,size); 16/CatacombApocalypse/SOFT.C: MM_FreePtr(&IFFfile); 16/CatacombApocalypse/SOFT.C: MM_GetPtr(MemPtr,FileEntry.OrginalLength); -16/ID_MM.C:MM_SizePtr to change the size of a given pointer -16/ID_MM.C:#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes" -16/ID_MM.C://#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/ID_MM.C:void MM_MapEMS (void); -16/ID_MM.C:= MM_MapEMS -16/ID_MM.C:void MM_MapEMS (void) -16/ID_MM.C: strcpy (str,"MM_MapEMS: EMS error 0x"); -16/ID_MM.C: MM_FreePtr(scan->useptr); -16/ID_MM.C: Quit ("MM_ClearBlock: No purgable blocks!"); -16/ID_MM.C:= MM_Startup -16/ID_MM.C:void MM_Startup (void) -16/ID_MM.C: MM_Shutdown (); -16/ID_MM.C: MM_MapEMS(); // map in used pages -16/ID_MM.C: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/ID_MM.C:= MM_Shutdown -16/ID_MM.C:void MM_Shutdown (void) -16/ID_MM.C:= MM_GetPtr -16/ID_MM.C:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/ID_MM.C: MM_SortMem (); -16/ID_MM.C:= MM_FreePtr -16/ID_MM.C:void MM_FreePtr (memptr *baseptr) -16/ID_MM.C: Quit ("MM_FreePtr: Block not found!"); -16/ID_MM.C:= MM_SetPurge -16/ID_MM.C:void MM_SetPurge (memptr *baseptr, int purge) -16/ID_MM.C: Quit ("MM_SetPurge: Block not found!"); -16/ID_MM.C:= MM_SetLock -16/ID_MM.C:void MM_SetLock (memptr *baseptr, boolean locked) -16/ID_MM.C: Quit ("MM_SetLock: Block not found!"); -16/ID_MM.C:= MM_SortMem -16/ID_MM.C:void MM_SortMem (void) -16/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],true); -16/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],false); -16/ID_MM.C:= MM_ShowMemory -16/ID_MM.C:void MM_ShowMemory (void) -16/ID_MM.C: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/ID_MM.C:= MM_UnusedMemory -16/ID_MM.C:long MM_UnusedMemory (void) -16/ID_MM.C:= MM_TotalFree -16/ID_MM.C:long MM_TotalFree (void) -16/ID_MM.C:= MM_BombOnError -16/ID_MM.C:void MM_BombOnError (boolean bomb) -16/ID_MMw.C:MM_SizePtr to change the size of a given pointer -16/ID_MMw.C://#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/ID_MMw.C:void MM_MapEMS (void); -16/ID_MMw.C: MM_FreePtr(scan->useptr); -16/ID_MMw.C: Quit ("MM_ClearBlock: No purgable blocks!"); -16/ID_MMw.C:= MM_Startup -16/ID_MMw.C:void MM_Startup (void) -16/ID_MMw.C: MM_Shutdown (); -16/ID_MMw.C: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/ID_MMw.C:= MM_Shutdown -16/ID_MMw.C:void MM_Shutdown (void) -16/ID_MMw.C:= MM_GetPtr -16/ID_MMw.C:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/ID_MMw.C: MM_SortMem (); -16/ID_MMw.C: Quit ("MM_GetPtr: Out of memory!"); -16/ID_MMw.C:= MM_FreePtr -16/ID_MMw.C:void MM_FreePtr (memptr *baseptr) -16/ID_MMw.C: Quit ("MM_FreePtr: Block not found!"); -16/ID_MMw.C:= MM_SetPurge -16/ID_MMw.C:void MM_SetPurge (memptr *baseptr, int purge) -16/ID_MMw.C: Quit ("MM_SetPurge: Block not found!"); -16/ID_MMw.C:= MM_SetLock -16/ID_MMw.C:void MM_SetLock (memptr *baseptr, boolean locked) -16/ID_MMw.C: Quit ("MM_SetLock: Block not found!"); -16/ID_MMw.C:= MM_SortMem -16/ID_MMw.C:void MM_SortMem (void) -16/ID_MMw.C: MM_SetLock(&(memptr)audiosegs[playing],true); -16/ID_MMw.C: MM_SetLock(&(memptr)audiosegs[playing],false); -16/ID_MMw.C:= MM_ShowMemory -16/ID_MMw.C:void MM_ShowMemory (void) -16/ID_MMw.C: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/ID_MMw.C:= MM_DumpData -16/ID_MMw.C:void MM_DumpData (void) -16/ID_MMw.C: Quit ("MM_DumpData: Couldn't open MMDUMP.TXT!"); -16/ID_MMw.C:= MM_UnusedMemory -16/ID_MMw.C:long MM_UnusedMemory (void) -16/ID_MMw.C:= MM_TotalFree -16/ID_MMw.C:long MM_TotalFree (void) -16/ID_MMw.C:= MM_BombOnError -16/ID_MMw.C:void MM_BombOnError (boolean bomb) -16/ID_SD.C: MM_GetPtr(&list,PMPageSize); -16/ID_SD.C: MM_GetPtr((memptr *)&DigiList,i * sizeof(word) * 2); -16/ID_SD.C: MM_FreePtr(&list); + + 16/keen/gelib.c: MM_FreePtr(&shape->Data); 16/keen/gelib.c: MM_GetPtr(&bio->buffer,BIO_BUFFER_LEN); 16/keen/gelib.c: MM_FreePtr(&bio->buffer); @@ -389,39 +193,6 @@ 16/keen/id_ca.c: MM_FreePtr(&bigbufferseg); 16/keen/id_in.c: MM_GetPtr((memptr *)&DemoBuffer,bufsize); 16/keen/id_in.c: MM_FreePtr((memptr *)&DemoBuffer); -16/keen/id_mm.c:MM_SizePtr to change the size of a given pointer -16/keen/id_mm.c:#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/keen/id_mm.c:void MM_MapEMS (void); -16/keen/id_mm.c:= MM_MapEMS -16/keen/id_mm.c:void MM_MapEMS (void) -16/keen/id_mm.c:= MM_Startup -16/keen/id_mm.c:void MM_Startup (void) -16/keen/id_mm.c: MM_Shutdown (); -16/keen/id_mm.c: MM_MapEMS(); // map in used pages -16/keen/id_mm.c: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/keen/id_mm.c:= MM_Shutdown -16/keen/id_mm.c:void MM_Shutdown (void) -16/keen/id_mm.c:= MM_GetPtr -16/keen/id_mm.c:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/keen/id_mm.c: MM_SortMem (); -16/keen/id_mm.c:= MM_FreePtr -16/keen/id_mm.c:void MM_FreePtr (memptr *baseptr) -16/keen/id_mm.c: Quit ("MM_FreePtr: Block not found!"); -16/keen/id_mm.c:= MM_SetPurge -16/keen/id_mm.c:void MM_SetPurge (memptr *baseptr, int purge) -16/keen/id_mm.c: Quit ("MM_SetPurge: Block not found!"); -16/keen/id_mm.c:= MM_SetLock -16/keen/id_mm.c:void MM_SetLock (memptr *baseptr, boolean locked) -16/keen/id_mm.c: Quit ("MM_SetLock: Block not found!"); -16/keen/id_mm.c:= MM_SortMem -16/keen/id_mm.c:void MM_SortMem (void) -16/keen/id_mm.c:= MM_ShowMemory -16/keen/id_mm.c:void MM_ShowMemory (void) -16/keen/id_mm.c: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/keen/id_mm.c:= MM_UnusedMemory -16/keen/id_mm.c:long MM_UnusedMemory (void) -16/keen/id_mm.c:= MM_TotalFree -16/keen/id_mm.c:long MM_TotalFree (void) 16/keen/id_us.c: MM_GetPtr(save,(w * h) * CHARWIDTH); 16/keen/id_us.c: MM_FreePtr(save); 16/keen/id_us.c: MM_GetPtr(&LineOffsets,MaxHelpLines * sizeof(word)); @@ -462,6 +233,8 @@ 16/keen/soft.c: MM_GetPtr(&SHP->Data,size); 16/keen/soft.c: MM_FreePtr(&IFFfile); 16/keen/soft.c: MM_GetPtr(MemPtr,FileEntry.OrginalLength); + + 16/wf3d8086/id_ca.c: MM_GetPtr (ptr,size); 16/wf3d8086/id_ca.c: MM_GetPtr (&(memptr)grstarts,(NUMCHUNKS+1)*FILEPOSSIZE); 16/wf3d8086/id_ca.c: MM_GetPtr(&(memptr)pictable,NUMPICS*sizeof(pictabletype)); @@ -501,69 +274,12 @@ 16/wf3d8086/id_ca.c: MM_GetPtr(&bigbufferseg,compressed); 16/wf3d8086/id_ca.c: MM_SetLock (&bigbufferseg,true); 16/wf3d8086/id_ca.c: MM_FreePtr(&bigbufferseg); -16/wf3d8086/id_mm.c:MM_SizePtr to change the size of a given pointer -16/wf3d8086/id_mm.c://#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/wf3d8086/id_mm.c:void MM_MapEMS (void); -16/wf3d8086/id_mm.c: MM_FreePtr(scan->useptr); -16/wf3d8086/id_mm.c: Quit ("MM_ClearBlock: No purgable blocks!"); -16/wf3d8086/id_mm.c:= MM_Startup -16/wf3d8086/id_mm.c:void MM_Startup (void) -16/wf3d8086/id_mm.c: MM_Shutdown (); -16/wf3d8086/id_mm.c: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/wf3d8086/id_mm.c:= MM_Shutdown -16/wf3d8086/id_mm.c:void MM_Shutdown (void) -16/wf3d8086/id_mm.c:= MM_GetPtr -16/wf3d8086/id_mm.c:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/wf3d8086/id_mm.c: MM_SortMem (); -16/wf3d8086/id_mm.c: Quit ("MM_GetPtr: Out of memory!"); -16/wf3d8086/id_mm.c:= MM_FreePtr -16/wf3d8086/id_mm.c:void MM_FreePtr (memptr *baseptr) -16/wf3d8086/id_mm.c: Quit ("MM_FreePtr: Block not found!"); -16/wf3d8086/id_mm.c:= MM_SetPurge -16/wf3d8086/id_mm.c:void MM_SetPurge (memptr *baseptr, int purge) -16/wf3d8086/id_mm.c: Quit ("MM_SetPurge: Block not found!"); -16/wf3d8086/id_mm.c:= MM_SetLock -16/wf3d8086/id_mm.c:void MM_SetLock (memptr *baseptr, boolean locked) -16/wf3d8086/id_mm.c: Quit ("MM_SetLock: Block not found!"); -16/wf3d8086/id_mm.c:= MM_SortMem -16/wf3d8086/id_mm.c:void MM_SortMem (void) -16/wf3d8086/id_mm.c: MM_SetLock(&(memptr)audiosegs[playing],true); -16/wf3d8086/id_mm.c: MM_SetLock(&(memptr)audiosegs[playing],false); -16/wf3d8086/id_mm.c:= MM_ShowMemory -16/wf3d8086/id_mm.c:void MM_ShowMemory (void) -16/wf3d8086/id_mm.c: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/wf3d8086/id_mm.c:= MM_DumpData -16/wf3d8086/id_mm.c:void MM_DumpData (void) -16/wf3d8086/id_mm.c: Quit ("MM_DumpData: Couldn't open MMDUMP.TXT!"); -16/wf3d8086/id_mm.c:= MM_UnusedMemory -16/wf3d8086/id_mm.c:long MM_UnusedMemory (void) -16/wf3d8086/id_mm.c:= MM_TotalFree -16/wf3d8086/id_mm.c:long MM_TotalFree (void) -16/wf3d8086/id_mm.c:= MM_BombOnError -16/wf3d8086/id_mm.c:void MM_BombOnError (boolean bomb) -16/wf3d8086/id_pm.c: MM_SetPurge(&MainMemPages[i],level); -16/wf3d8086/id_pm.c: MM_BombOnError(false); -16/wf3d8086/id_pm.c: MM_GetPtr(p,PMPageSize); // Try to reallocate -16/wf3d8086/id_pm.c: MM_BombOnError(true); -16/wf3d8086/id_pm.c: MM_BombOnError(false); -16/wf3d8086/id_pm.c: MM_GetPtr(p,PMPageSize); -16/wf3d8086/id_pm.c: MM_BombOnError(true); -16/wf3d8086/id_pm.c: MM_FreePtr(p); -16/wf3d8086/id_pm.c: MM_GetPtr(&(memptr)PMSegPages,sizeof(PageListStruct) * PMNumBlocks); -16/wf3d8086/id_pm.c: MM_SetLock(&(memptr)PMSegPages,true); -16/wf3d8086/id_pm.c: MM_GetPtr(&buf,size); -16/wf3d8086/id_pm.c: MM_FreePtr(&buf); -16/wf3d8086/id_pm.c: MM_GetPtr(&buf,size); -16/wf3d8086/id_pm.c: MM_FreePtr(&buf); -16/wf3d8086/id_pm.c: MM_SetLock(&(memptr)PMSegPages,false); -16/wf3d8086/id_pm.c: MM_FreePtr(&(void _seg *)PMSegPages); 16/wf3d8086/id_sd.c: MM_GetPtr(&list,PMPageSize); 16/wf3d8086/id_sd.c: MM_GetPtr((memptr *)&DigiList,i * sizeof(word) * 2); 16/wf3d8086/id_sd.c: MM_FreePtr(&list); 16/wf3d8086/id_vh.c:#define UNCACHEGRCHUNK(chunk) {MM_FreePtr(&grsegs[chunk]);grneeded[chunk]&=~ca_levelbit;} 16/wf3d8086/id_vh.c: MM_GetPtr (&(memptr)temp,size); 16/wf3d8086/id_vh.c: MM_FreePtr (&(memptr)temp); -16/wf3d8086/obj/wolf3d.map: 193E:0001 0E87 C=CODE S=ID_MM_TEXT G=(none) M=ID_MM.C ACBP=28 16/wf3d8086/oldscale.c: MM_FreePtr (&(memptr)scaledirectory[i]); 16/wf3d8086/oldscale.c: MM_SortMem (); 16/wf3d8086/oldscale.c: MM_GetPtr (&(memptr)work,20000); @@ -627,169 +343,129 @@ 16/wf3d8086/wl_text.c: MM_FreePtr (&grsegs[artnum]); 16/wf3d8086/wl_text.c: MM_FreePtr (&layout); 16/wf3d8086/wl_text.c: MM_SortMem (); -16/wf3d8086/wolf3d.map: 182E:0000 0E47 C=CODE S=ID_MM_TEXT G=(none) M=ID_MM.C ACBP=28 -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (ptr,size); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)grstarts,(NUMCHUNKS+1)*FILEPOSSIZE); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&(memptr)pictable,NUMPICS*sizeof(pictabletype)); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&compseg,chunkcomplen); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&compseg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)tinf,length); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&(memptr)mapheaderseg[i],sizeof(maptype)); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock(&(memptr)mapheaderseg[i],true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)mapsegs[i],64*64*2); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&(memptr)mapsegs[i],true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiostarts,length); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[chunk],0); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiosegs[chunk],compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiosegs[chunk],expanded); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[start],3); // make purgable -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&grsegs[chunk],expanded); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&grsegs[chunk],0); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&buffer2seg,expanded); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr (&buffer2seg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)grsegs[i],3); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)grsegs[i],3); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[i],3); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge(&grsegs[i],0); // sure it stays there! -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge(&grsegs[i],3); -16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); -16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); -16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); -16/wolf3d/WOLFSRC/ID_MM.C:MM_SizePtr to change the size of a given pointer -16/wolf3d/WOLFSRC/ID_MM.C://#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!")\ -16/wolf3d/WOLFSRC/ID_MM.C:void MM_MapEMS (void); -16/wolf3d/WOLFSRC/ID_MM.C: MM_FreePtr(scan->useptr); -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_ClearBlock: No purgable blocks!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_Startup -16/wolf3d/WOLFSRC/ID_MM.C:void MM_Startup (void) -16/wolf3d/WOLFSRC/ID_MM.C: MM_Shutdown (); -16/wolf3d/WOLFSRC/ID_MM.C: MM_GetPtr (&bufferseg,BUFFERSIZE); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_Shutdown -16/wolf3d/WOLFSRC/ID_MM.C:void MM_Shutdown (void) -16/wolf3d/WOLFSRC/ID_MM.C:= MM_GetPtr -16/wolf3d/WOLFSRC/ID_MM.C:void MM_GetPtr (memptr *baseptr,unsigned long size) -16/wolf3d/WOLFSRC/ID_MM.C: MM_SortMem (); -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_GetPtr: Out of memory!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_FreePtr -16/wolf3d/WOLFSRC/ID_MM.C:void MM_FreePtr (memptr *baseptr) -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_FreePtr: Block not found!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_SetPurge -16/wolf3d/WOLFSRC/ID_MM.C:void MM_SetPurge (memptr *baseptr, int purge) -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_SetPurge: Block not found!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_SetLock -16/wolf3d/WOLFSRC/ID_MM.C:void MM_SetLock (memptr *baseptr, boolean locked) -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_SetLock: Block not found!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_SortMem -16/wolf3d/WOLFSRC/ID_MM.C:void MM_SortMem (void) -16/wolf3d/WOLFSRC/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],true); -16/wolf3d/WOLFSRC/ID_MM.C: MM_SetLock(&(memptr)audiosegs[playing],false); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_ShowMemory -16/wolf3d/WOLFSRC/ID_MM.C:void MM_ShowMemory (void) -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_ShowMemory: Memory block order currupted!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_DumpData -16/wolf3d/WOLFSRC/ID_MM.C:void MM_DumpData (void) -16/wolf3d/WOLFSRC/ID_MM.C: Quit ("MM_DumpData: Couldn't open MMDUMP.TXT!"); -16/wolf3d/WOLFSRC/ID_MM.C:= MM_UnusedMemory -16/wolf3d/WOLFSRC/ID_MM.C:long MM_UnusedMemory (void) -16/wolf3d/WOLFSRC/ID_MM.C:= MM_TotalFree -16/wolf3d/WOLFSRC/ID_MM.C:long MM_TotalFree (void) -16/wolf3d/WOLFSRC/ID_MM.C:= MM_BombOnError -16/wolf3d/WOLFSRC/ID_MM.C:void MM_BombOnError (boolean bomb) -16/wolf3d/WOLFSRC/ID_PM.C: MM_SetPurge(&MainMemPages[i],level); -16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(false); -16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(p,PMPageSize); // Try to reallocate -16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(true); -16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(false); -16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(p,PMPageSize); -16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(true); -16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(p); -16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&(memptr)PMSegPages,sizeof(PageListStruct) * PMNumBlocks); -16/wolf3d/WOLFSRC/ID_PM.C: MM_SetLock(&(memptr)PMSegPages,true); -16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&buf,size); -16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&buf); -16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&buf,size); -16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&buf); -16/wolf3d/WOLFSRC/ID_PM.C: MM_SetLock(&(memptr)PMSegPages,false); -16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&(void _seg *)PMSegPages); -16/wolf3d/WOLFSRC/ID_SD.C: MM_GetPtr(&list,PMPageSize); -16/wolf3d/WOLFSRC/ID_SD.C: MM_GetPtr((memptr *)&DigiList,i * sizeof(word) * 2); -16/wolf3d/WOLFSRC/ID_SD.C: MM_FreePtr(&list); -16/wolf3d/WOLFSRC/ID_VH.C:#define UNCACHEGRCHUNK(chunk) {MM_FreePtr(&grsegs[chunk]);grneeded[chunk]&=~ca_levelbit;} -16/wolf3d/WOLFSRC/ID_VH.C: MM_GetPtr (&(memptr)temp,size); -16/wolf3d/WOLFSRC/ID_VH.C: MM_FreePtr (&(memptr)temp); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)scaledirectory[i]); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SortMem (); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_GetPtr (&(memptr)work,20000); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)work); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)work); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SortMem (); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SetLock (&(memptr)scaledirectory[i],true); -16/wolf3d/WOLFSRC/OLDSCALE.C: MM_GetPtr (finalspot,totalsize); -16/wolf3d/WOLFSRC/WL_DEBUG.C: US_PrintUnsigned (MM_UnusedMemory()/1024); -16/wolf3d/WOLFSRC/WL_DEBUG.C: US_PrintUnsigned (MM_TotalFree()/1024); -16/wolf3d/WOLFSRC/WL_DEBUG.C: MM_GetPtr (&buffer,64000); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_GetPtr (&demobuffer,MAXDEMOSIZE); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&demobuffer,true); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_FreePtr (&demobuffer); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&grsegs[dems[demonumber]],true); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&demobuffer,true); -16/wolf3d/WOLFSRC/WL_GAME.C: MM_FreePtr (&demobuffer); -16/wolf3d/WOLFSRC/WL_INTER.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_INTER.C: MM_FreePtr ((memptr *)&audiosegs[start]); -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_Shutdown (); -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_Startup (); // so the signon screen can be freed -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SetLock (&grsegs[STARTFONT],true); -16/wolf3d/WOLFSRC/WL_MAIN.C:// MM_BombOnError (false); -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_BombOnError (true); -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_MAIN.C:// MM_GetPtr(&nullblock,nsize); -16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_SetPurge (&(memptr)audiosegs[start],3); // make purgable -16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem(); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_FreePtr ((memptr *)&audiosegs[STARTMUSIC + lastmusic]); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_BombOnError (false); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_BombOnError (true); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true); -16/wolf3d/WOLFSRC/WL_MENU.C: MM_FreePtr ((memptr *)&audiosegs[STARTMUSIC + lastmusic]); -16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetPurge(&((memptr)audiosegs[STARTMUSIC + i]),3); -16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + i]),false); -16/wolf3d/WOLFSRC/WL_PLAY.C: MM_BombOnError (false); -16/wolf3d/WOLFSRC/WL_PLAY.C: MM_BombOnError (true); -16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_FreePtr (&(memptr)scaledirectory[i]); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_GetPtr (&(memptr)work,20000); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_FreePtr (&(memptr)work); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SetLock (&(memptr)scaledirectory[i],true); -16/wolf3d/WOLFSRC/WL_SCALE.C: MM_GetPtr (finalspot,totalsize); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&grsegs[artnum], true); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&layout, true); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&grsegs[artnum]); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&layout); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&grsegs[artnum], true); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&layout, true); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&grsegs[artnum]); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&layout); -16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); -16/wolf3d/WOLFSRC/WOLF3D.MAP: 182E:0000 0E47 C=CODE S=ID_MM_TEXT G=(none) M=ID_MM.C ACBP=28 + + +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (ptr,size); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)grstarts,(NUMCHUNKS+1)*FILEPOSSIZE); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&(memptr)pictable,NUMPICS*sizeof(pictabletype)); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&compseg,chunkcomplen); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&compseg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)tinf,length); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&(memptr)mapheaderseg[i],sizeof(maptype)); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock(&(memptr)mapheaderseg[i],true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)mapsegs[i],64*64*2); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&(memptr)mapsegs[i],true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiostarts,length); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[chunk],0); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiosegs[chunk],compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&(memptr)audiosegs[chunk],expanded); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[start],3); // make purgable +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&grsegs[chunk],expanded); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&grsegs[chunk],0); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr (&buffer2seg,expanded); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr (&buffer2seg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)grsegs[i],3); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)grsegs[i],3); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge (&(memptr)audiosegs[i],3); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge(&grsegs[i],0); // sure it stays there! +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetPurge(&grsegs[i],3); +16/wolf3d/WOLFSRC/ID_CA.C: MM_GetPtr(&bigbufferseg,compressed); +16/wolf3d/WOLFSRC/ID_CA.C: MM_SetLock (&bigbufferseg,true); +16/wolf3d/WOLFSRC/ID_CA.C: MM_FreePtr(&bigbufferseg); +16/wolf3d/WOLFSRC/ID_PM.C: MM_SetPurge(&MainMemPages[i],level); +16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(false); +16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(p,PMPageSize); // Try to reallocate +16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(true); +16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(false); +16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(p,PMPageSize); +16/wolf3d/WOLFSRC/ID_PM.C: MM_BombOnError(true); +16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(p); +16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&(memptr)PMSegPages,sizeof(PageListStruct) * PMNumBlocks); +16/wolf3d/WOLFSRC/ID_PM.C: MM_SetLock(&(memptr)PMSegPages,true); +16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&buf,size); +16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&buf); +16/wolf3d/WOLFSRC/ID_PM.C: MM_GetPtr(&buf,size); +16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&buf); +16/wolf3d/WOLFSRC/ID_PM.C: MM_SetLock(&(memptr)PMSegPages,false); +16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&(void _seg *)PMSegPages); +16/wolf3d/WOLFSRC/ID_SD.C: MM_GetPtr(&list,PMPageSize); +16/wolf3d/WOLFSRC/ID_SD.C: MM_GetPtr((memptr *)&DigiList,i * sizeof(word) * 2); +16/wolf3d/WOLFSRC/ID_SD.C: MM_FreePtr(&list); +16/wolf3d/WOLFSRC/ID_VH.C:#define UNCACHEGRCHUNK(chunk) {MM_FreePtr(&grsegs[chunk]);grneeded[chunk]&=~ca_levelbit;} +16/wolf3d/WOLFSRC/ID_VH.C: MM_GetPtr (&(memptr)temp,size); +16/wolf3d/WOLFSRC/ID_VH.C: MM_FreePtr (&(memptr)temp); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)scaledirectory[i]); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SortMem (); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_GetPtr (&(memptr)work,20000); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)work); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_FreePtr (&(memptr)work); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SortMem (); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_SetLock (&(memptr)scaledirectory[i],true); +16/wolf3d/WOLFSRC/OLDSCALE.C: MM_GetPtr (finalspot,totalsize); +16/wolf3d/WOLFSRC/WL_DEBUG.C: US_PrintUnsigned (MM_UnusedMemory()/1024); +16/wolf3d/WOLFSRC/WL_DEBUG.C: US_PrintUnsigned (MM_TotalFree()/1024); +16/wolf3d/WOLFSRC/WL_DEBUG.C: MM_GetPtr (&buffer,64000); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_GetPtr (&demobuffer,MAXDEMOSIZE); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&demobuffer,true); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_FreePtr (&demobuffer); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&grsegs[dems[demonumber]],true); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_SetLock (&demobuffer,true); +16/wolf3d/WOLFSRC/WL_GAME.C: MM_FreePtr (&demobuffer); +16/wolf3d/WOLFSRC/WL_INTER.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_INTER.C: MM_FreePtr ((memptr *)&audiosegs[start]); +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_Shutdown (); +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_Startup (); // so the signon screen can be freed +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SetLock (&grsegs[STARTFONT],true); +16/wolf3d/WOLFSRC/WL_MAIN.C:// MM_BombOnError (false); +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_BombOnError (true); +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_MAIN.C:// MM_GetPtr(&nullblock,nsize); +16/wolf3d/WOLFSRC/WL_MAIN.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_SetPurge (&(memptr)audiosegs[start],3); // make purgable +16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem(); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_FreePtr ((memptr *)&audiosegs[STARTMUSIC + lastmusic]); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_BombOnError (false); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_BombOnError (true); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true); +16/wolf3d/WOLFSRC/WL_MENU.C: MM_FreePtr ((memptr *)&audiosegs[STARTMUSIC + lastmusic]); +16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetPurge(&((memptr)audiosegs[STARTMUSIC + i]),3); +16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + i]),false); +16/wolf3d/WOLFSRC/WL_PLAY.C: MM_BombOnError (false); +16/wolf3d/WOLFSRC/WL_PLAY.C: MM_BombOnError (true); +16/wolf3d/WOLFSRC/WL_PLAY.C: MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_FreePtr (&(memptr)scaledirectory[i]); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_GetPtr (&(memptr)work,20000); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_FreePtr (&(memptr)work); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_SetLock (&(memptr)scaledirectory[i],true); +16/wolf3d/WOLFSRC/WL_SCALE.C: MM_GetPtr (finalspot,totalsize); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&grsegs[artnum], true); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&layout, true); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&grsegs[artnum]); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&layout); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&grsegs[artnum], true); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SetLock (&layout, true); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&grsegs[artnum]); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_FreePtr (&layout); +16/wolf3d/WOLFSRC/WL_TEXT.C: MM_SortMem (); diff --git a/pm_use.txt b/pm_use.txt index 651d085c..f944a7e4 100755 --- a/pm_use.txt +++ b/pm_use.txt @@ -1,64 +1,5 @@ 16/wf3d8086/contigsc.c: shape = PM_GetSpritePage (shapenum); 16/wf3d8086/contigsc.c: shape = PM_GetSpritePage (shapenum); -16/wf3d8086/id_pm.c:// PM_SetMainMemPurge() - Sets the purge level for all allocated main memory -16/wf3d8086/id_pm.c:// blocks. This shouldn't be called directly - the PM_LockMainMem() and -16/wf3d8086/id_pm.c:// PM_UnlockMainMem() macros should be used instead. -16/wf3d8086/id_pm.c:PM_SetMainMemPurge(int level) -16/wf3d8086/id_pm.c:// PM_CheckMainMem() - If something besides the Page Mgr makes requests of -16/wf3d8086/id_pm.c:// This routine now calls PM_LockMainMem() to make sure that any allocation -16/wf3d8086/id_pm.c:// of the other blocks. Because PM_LockMainMem() is called, -16/wf3d8086/id_pm.c:// PM_UnlockMainMem() needs to be called before any other part of the -16/wf3d8086/id_pm.c:PM_CheckMainMem(void) -16/wf3d8086/id_pm.c: PM_LockMainMem(); -16/wf3d8086/id_pm.c:// necessary to make requests of the Memory Mgr, PM_UnlockMainMem() -16/wf3d8086/id_pm.c: Quit("PM_SetupMainMem: Not enough main memory"); -16/wf3d8086/id_pm.c:// PM_GetPageAddress() - Returns the address of a given page -16/wf3d8086/id_pm.c:PM_GetPageAddress(int pagenum) -16/wf3d8086/id_pm.c: PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length); -16/wf3d8086/id_pm.c: addr = PM_GetPageAddress(orig); -16/wf3d8086/id_pm.c:// PM_GetPage() - Returns the address of the page, loading it if necessary -16/wf3d8086/id_pm.c:PM_GetPage(int pagenum) -16/wf3d8086/id_pm.c: Quit("PM_GetPage: Invalid page request"); -16/wf3d8086/id_pm.c: if (!(result = PM_GetPageAddress(pagenum))) -16/wf3d8086/id_pm.c: result = PM_GetPageAddress(pagenum); -16/wf3d8086/id_pm.c:// PM_SetPageLock() - Sets the lock type on a given page -16/wf3d8086/id_pm.c:PM_SetPageLock(int pagenum,PMLockType lock) -16/wf3d8086/id_pm.c: Quit("PM_SetPageLock: Locking/unlocking non-sound page"); -16/wf3d8086/id_pm.c:// PM_Preload() - Loads as many pages as possible into all types of memory. -16/wf3d8086/id_pm.c:PM_Preload(boolean (*update)(word current,word total)) -16/wf3d8086/id_pm.c: Quit ("PM_Preload: Pages>=ChunksInFile"); -16/wf3d8086/id_pm.c: PM_GetPage(page); -16/wf3d8086/id_pm.c: addr = PM_GetPage(oogypage); -16/wf3d8086/id_pm.c: Quit("PM_Preload: XMS buffer failed"); -16/wf3d8086/id_pm.c: Quit ("PM_Preload: Pages>=ChunksInFile"); -16/wf3d8086/id_pm.c: Quit("PM_Preload: Exceeded XMS pages"); -16/wf3d8086/id_pm.c: Quit("PM_Preload: Page too long"); -16/wf3d8086/id_pm.c:// PM_NextFrame() - Increments the frame counter and adjusts the thrash -16/wf3d8086/id_pm.c:PM_NextFrame(void) -16/wf3d8086/id_pm.c: sprintf(buf,"PM_NextFrame: Page %d is locked",i); -16/wf3d8086/id_pm.c:// PM_Reset() - Sets up caching structures -16/wf3d8086/id_pm.c:PM_Reset(void) -16/wf3d8086/id_pm.c:// PM_Startup() - Start up the Page Mgr -16/wf3d8086/id_pm.c:PM_Startup(void) -16/wf3d8086/id_pm.c: Quit("PM_Startup: No main or EMS"); -16/wf3d8086/id_pm.c: PM_Reset(); -16/wf3d8086/id_pm.c:// PM_Shutdown() - Shut down the Page Mgr -16/wf3d8086/id_pm.c:PM_Shutdown(void) -16/wf3d8086/id_pm.h:#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v)) -16/wf3d8086/id_pm.h:#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v)) -16/wf3d8086/id_pm.h:#define PM_LockMainMem() PM_SetMainMemPurge(0) -16/wf3d8086/id_pm.h:#define PM_UnlockMainMem() PM_SetMainMemPurge(3) -16/wf3d8086/id_pm.h:extern void PM_Startup(void), -16/wf3d8086/id_pm.h: PM_Shutdown(void), -16/wf3d8086/id_pm.h: PM_Reset(void), -16/wf3d8086/id_pm.h: PM_Preload(boolean (*update)(word current,word total)), -16/wf3d8086/id_pm.h: PM_NextFrame(void), -16/wf3d8086/id_pm.h: PM_SetPageLock(int pagenum,PMLockType lock), -16/wf3d8086/id_pm.h: PM_SetMainPurge(int level), -16/wf3d8086/id_pm.h: PM_CheckMainMem(void); -16/wf3d8086/id_pm.h:extern memptr PM_GetPageAddress(int pagenum), -16/wf3d8086/id_pm.h: PM_GetPage(int pagenum); // Use this one to cache page -16/wf3d8086/id_pm.h:void PM_SetMainMemPurge(int level); 16/wf3d8086/id_sd.c: addr = PM_GetSoundPage(page); 16/wf3d8086/id_sd.c: PM_SetPageLock(PMSoundStart + page,pml_Locked); 16/wf3d8086/id_sd.c: PM_SetPageLock(i + PMSoundStart,pml_Unlocked); @@ -66,45 +7,20 @@ 16/wf3d8086/id_sd.c: PM_CheckMainMem(); 16/wf3d8086/id_sd.c: p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0); 16/wf3d8086/id_sd.c: PM_UnlockMainMem(); -Binary file 16/wf3d8086/obj/wolf3d.exe matches -16/wf3d8086/obj/wolf3d.map: 1A268H 1B44AH 011E3H ID_PM_TEXT CODE -16/wf3d8086/obj/wolf3d.map: 1A26:0008 11E3 C=CODE S=ID_PM_TEXT G=(none) M=ID_PM.C ACBP=28 -16/wf3d8086/obj/wolf3d.map: 1A26:02F3 _PM_CheckMainMem -16/wf3d8086/obj/wolf3d.map: 1A26:0CDE _PM_GetPage -16/wf3d8086/obj/wolf3d.map: 1A26:080D _PM_GetPageAddress -16/wf3d8086/obj/wolf3d.map: 1A26:1036 _PM_NextFrame -16/wf3d8086/obj/wolf3d.map: 1A26:0DD0 _PM_Preload -16/wf3d8086/obj/wolf3d.map: 1A26:10B0 idle _PM_Reset -16/wf3d8086/obj/wolf3d.map: 1A26:02CA _PM_SetMainMemPurge -16/wf3d8086/obj/wolf3d.map: 1A26:0DA0 _PM_SetPageLock -16/wf3d8086/obj/wolf3d.map: 1A26:11CF _PM_Shutdown -16/wf3d8086/obj/wolf3d.map: 1A26:111E _PM_Startup -16/wf3d8086/obj/wolf3d.map: 1A26:02CA _PM_SetMainMemPurge -16/wf3d8086/obj/wolf3d.map: 1A26:02F3 _PM_CheckMainMem -16/wf3d8086/obj/wolf3d.map: 1A26:080D _PM_GetPageAddress -16/wf3d8086/obj/wolf3d.map: 1A26:0CDE _PM_GetPage -16/wf3d8086/obj/wolf3d.map: 1A26:0DA0 _PM_SetPageLock -16/wf3d8086/obj/wolf3d.map: 1A26:0DD0 _PM_Preload -16/wf3d8086/obj/wolf3d.map: 1A26:1036 _PM_NextFrame -16/wf3d8086/obj/wolf3d.map: 1A26:10B0 idle _PM_Reset -16/wf3d8086/obj/wolf3d.map: 1A26:111E _PM_Startup -16/wf3d8086/obj/wolf3d.map: 1A26:11CF _PM_Shutdown 16/wf3d8086/oldscale.c: shape = PM_GetSpritePage (shapenum); -16/wf3d8086/oldscale.c: shape = PM_GetSpritePage (shapenum); - - +16/wf3d8086/oldscale.c: shape = PM_GetSpritePage (shapenum); 16/wf3d8086/wl_act2.c: PM_UnlockMainMem (); -16/wf3d8086/wl_act2.c: PM_CheckMainMem (); +16/wf3d8086/wl_act2.c: PM_CheckMainMem (); 16/wf3d8086/wl_debug.c: addr = PM_GetPageAddress(i); 16/wf3d8086/wl_debug.c: PM_GetPage(j); -16/wf3d8086/wl_debug.c: PM_GetPage(i); +16/wf3d8086/wl_debug.c: PM_GetPage(i); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); 16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); -16/wf3d8086/wl_draw.c: PM_NextFrame(); +16/wf3d8086/wl_draw.c: PM_NextFrame(); 16/wf3d8086/wl_game.c: PM_UnlockMainMem(); 16/wf3d8086/wl_game.c: PM_CheckMainMem (); 16/wf3d8086/wl_game.c: PM_CheckMainMem (); @@ -122,160 +38,6 @@ Binary file 16/wf3d8086/obj/wolf3d.exe matches 16/wf3d8086/wl_play.c: PM_CheckMainMem (); 16/wf3d8086/wl_play.c: PM_CheckMainMem (); 16/wf3d8086/wl_scale.c: shape = PM_GetSpritePage (shapenum); -16/wf3d8086/wl_scale.c: shape = PM_GetSpritePage (shapenum); - - -16/wf3d8086/wolf3d.map: 19127H 1A286H 01160H ID_PM_TEXT CODE -16/wf3d8086/wolf3d.map: 1912:0007 1160 C=CODE S=ID_PM_TEXT G=(none) M=ID_PM.C ACBP=28 -16/wf3d8086/wolf3d.map: 1912:02DF _PM_CheckMainMem -16/wf3d8086/wolf3d.map: 1912:0C71 _PM_GetPage -16/wf3d8086/wolf3d.map: 1912:07BF _PM_GetPageAddress -16/wf3d8086/wolf3d.map: 1912:0FBA _PM_NextFrame -16/wf3d8086/wolf3d.map: 1912:0D60 _PM_Preload -16/wf3d8086/wolf3d.map: 1912:1034 idle _PM_Reset -16/wf3d8086/wolf3d.map: 1912:02B8 _PM_SetMainMemPurge -16/wf3d8086/wolf3d.map: 1912:0D31 _PM_SetPageLock -16/wf3d8086/wolf3d.map: 1912:114B _PM_Shutdown -16/wf3d8086/wolf3d.map: 1912:10A0 _PM_Startup -16/wf3d8086/wolf3d.map: 1912:02B8 _PM_SetMainMemPurge -16/wf3d8086/wolf3d.map: 1912:02DF _PM_CheckMainMem -16/wf3d8086/wolf3d.map: 1912:07BF _PM_GetPageAddress -16/wf3d8086/wolf3d.map: 1912:0C71 _PM_GetPage -16/wf3d8086/wolf3d.map: 1912:0D31 _PM_SetPageLock -16/wf3d8086/wolf3d.map: 1912:0D60 _PM_Preload -16/wf3d8086/wolf3d.map: 1912:0FBA _PM_NextFrame -16/wf3d8086/wolf3d.map: 1912:1034 idle _PM_Reset -16/wf3d8086/wolf3d.map: 1912:10A0 _PM_Startup -16/wf3d8086/wolf3d.map: 1912:114B _PM_Shutdown +16/wf3d8086/wl_scale.c: shape = PM_GetSpritePage (shapenum); 16/wf3d8086/wolfhack.c: src = PM_GetPage(0); 16/wf3d8086/wolfhack.c: src = PM_GetPage(1); -16/wolf3d/WOLFSRC/CONTIGSC.C: shape = PM_GetSpritePage (shapenum); -16/wolf3d/WOLFSRC/CONTIGSC.C: shape = PM_GetSpritePage (shapenum); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_SetMainMemPurge() - Sets the purge level for all allocated main memory -16/wolf3d/WOLFSRC/ID_PM.C:// blocks. This shouldn't be called directly - the PM_LockMainMem() and -16/wolf3d/WOLFSRC/ID_PM.C:// PM_UnlockMainMem() macros should be used instead. -16/wolf3d/WOLFSRC/ID_PM.C:PM_SetMainMemPurge(int level) -16/wolf3d/WOLFSRC/ID_PM.C:// PM_CheckMainMem() - If something besides the Page Mgr makes requests of -16/wolf3d/WOLFSRC/ID_PM.C:// This routine now calls PM_LockMainMem() to make sure that any allocation -16/wolf3d/WOLFSRC/ID_PM.C:// of the other blocks. Because PM_LockMainMem() is called, -16/wolf3d/WOLFSRC/ID_PM.C:// PM_UnlockMainMem() needs to be called before any other part of the -16/wolf3d/WOLFSRC/ID_PM.C:PM_CheckMainMem(void) -16/wolf3d/WOLFSRC/ID_PM.C: PM_LockMainMem(); -16/wolf3d/WOLFSRC/ID_PM.C:// necessary to make requests of the Memory Mgr, PM_UnlockMainMem() -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_SetupMainMem: Not enough main memory"); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_GetPageAddress() - Returns the address of a given page -16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPageAddress(int pagenum) -16/wolf3d/WOLFSRC/ID_PM.C: PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length); -16/wolf3d/WOLFSRC/ID_PM.C: addr = PM_GetPageAddress(orig); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_GetPage() - Returns the address of the page, loading it if necessary -16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPage(int pagenum) -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_GetPage: Invalid page request"); -16/wolf3d/WOLFSRC/ID_PM.C: if (!(result = PM_GetPageAddress(pagenum))) -16/wolf3d/WOLFSRC/ID_PM.C: result = PM_GetPageAddress(pagenum); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_SetPageLock() - Sets the lock type on a given page -16/wolf3d/WOLFSRC/ID_PM.C:PM_SetPageLock(int pagenum,PMLockType lock) -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_SetPageLock: Locking/unlocking non-sound page"); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_Preload() - Loads as many pages as possible into all types of memory. -16/wolf3d/WOLFSRC/ID_PM.C:PM_Preload(boolean (*update)(word current,word total)) -16/wolf3d/WOLFSRC/ID_PM.C: Quit ("PM_Preload: Pages>=ChunksInFile"); -16/wolf3d/WOLFSRC/ID_PM.C: PM_GetPage(page); -16/wolf3d/WOLFSRC/ID_PM.C: addr = PM_GetPage(oogypage); -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_Preload: XMS buffer failed"); -16/wolf3d/WOLFSRC/ID_PM.C: Quit ("PM_Preload: Pages>=ChunksInFile"); -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_Preload: Exceeded XMS pages"); -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_Preload: Page too long"); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_NextFrame() - Increments the frame counter and adjusts the thrash -16/wolf3d/WOLFSRC/ID_PM.C:PM_NextFrame(void) -16/wolf3d/WOLFSRC/ID_PM.C: sprintf(buf,"PM_NextFrame: Page %d is locked",i); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_Reset() - Sets up caching structures -16/wolf3d/WOLFSRC/ID_PM.C:PM_Reset(void) -16/wolf3d/WOLFSRC/ID_PM.C:// PM_Startup() - Start up the Page Mgr -16/wolf3d/WOLFSRC/ID_PM.C:PM_Startup(void) -16/wolf3d/WOLFSRC/ID_PM.C: Quit("PM_Startup: No main or EMS"); -16/wolf3d/WOLFSRC/ID_PM.C: PM_Reset(); -16/wolf3d/WOLFSRC/ID_PM.C:// PM_Shutdown() - Shut down the Page Mgr -16/wolf3d/WOLFSRC/ID_PM.C:PM_Shutdown(void) -16/wolf3d/WOLFSRC/ID_PM.H:#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v)) -16/wolf3d/WOLFSRC/ID_PM.H:#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v)) -16/wolf3d/WOLFSRC/ID_PM.H:#define PM_LockMainMem() PM_SetMainMemPurge(0) -16/wolf3d/WOLFSRC/ID_PM.H:#define PM_UnlockMainMem() PM_SetMainMemPurge(3) -16/wolf3d/WOLFSRC/ID_PM.H:extern void PM_Startup(void), -16/wolf3d/WOLFSRC/ID_PM.H: PM_Shutdown(void), -16/wolf3d/WOLFSRC/ID_PM.H: PM_Reset(void), -16/wolf3d/WOLFSRC/ID_PM.H: PM_Preload(boolean (*update)(word current,word total)), -16/wolf3d/WOLFSRC/ID_PM.H: PM_NextFrame(void), -16/wolf3d/WOLFSRC/ID_PM.H: PM_SetPageLock(int pagenum,PMLockType lock), -16/wolf3d/WOLFSRC/ID_PM.H: PM_SetMainPurge(int level), -16/wolf3d/WOLFSRC/ID_PM.H: PM_CheckMainMem(void); -16/wolf3d/WOLFSRC/ID_PM.H:extern memptr PM_GetPageAddress(int pagenum), -16/wolf3d/WOLFSRC/ID_PM.H: PM_GetPage(int pagenum); // Use this one to cache page -16/wolf3d/WOLFSRC/ID_PM.H:void PM_SetMainMemPurge(int level); -16/wolf3d/WOLFSRC/ID_SD.C: addr = PM_GetSoundPage(page); -16/wolf3d/WOLFSRC/ID_SD.C: PM_SetPageLock(PMSoundStart + page,pml_Locked); -16/wolf3d/WOLFSRC/ID_SD.C: PM_SetPageLock(i + PMSoundStart,pml_Unlocked); -16/wolf3d/WOLFSRC/ID_SD.C: PM_UnlockMainMem(); -16/wolf3d/WOLFSRC/ID_SD.C: PM_CheckMainMem(); -16/wolf3d/WOLFSRC/ID_SD.C: p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0); -16/wolf3d/WOLFSRC/ID_SD.C: PM_UnlockMainMem(); -16/wolf3d/WOLFSRC/OLDSCALE.C: shape = PM_GetSpritePage (shapenum); -16/wolf3d/WOLFSRC/OLDSCALE.C: shape = PM_GetSpritePage (shapenum); -16/wolf3d/WOLFSRC/WL_ACT2.C: PM_UnlockMainMem (); -16/wolf3d/WOLFSRC/WL_ACT2.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_DEBUG.C: addr = PM_GetPageAddress(i); -16/wolf3d/WOLFSRC/WL_DEBUG.C: PM_GetPage(j); -16/wolf3d/WOLFSRC/WL_DEBUG.C: PM_GetPage(i); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); -16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); -16/wolf3d/WOLFSRC/WL_DRAW.C: PM_NextFrame(); -16/wolf3d/WOLFSRC/WL_GAME.C: PM_UnlockMainMem(); -16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_INTER.C: PM_Preload (PreloadUpdate); -16/wolf3d/WOLFSRC/WL_MAIN.C: PM_Shutdown (); -16/wolf3d/WOLFSRC/WL_MAIN.C: PM_Startup (); -16/wolf3d/WOLFSRC/WL_MAIN.C: PM_UnlockMainMem (); -16/wolf3d/WOLFSRC/WL_MENU.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_MENU.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); -16/wolf3d/WOLFSRC/WL_SCALE.C: shape = PM_GetSpritePage (shapenum); -16/wolf3d/WOLFSRC/WL_SCALE.C: shape = PM_GetSpritePage (shapenum); -Binary file 16/wolf3d/WOLFSRC/WOLF3D.EXE matches -16/wolf3d/WOLFSRC/WOLF3D.MAP: 19127H 1A286H 01160H ID_PM_TEXT CODE -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0007 1160 C=CODE S=ID_PM_TEXT G=(none) M=ID_PM.C ACBP=28 -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF _PM_CheckMainMem -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71 _PM_GetPage -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF _PM_GetPageAddress -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA _PM_NextFrame -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60 _PM_Preload -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle _PM_Reset -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8 _PM_SetMainMemPurge -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31 _PM_SetPageLock -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B _PM_Shutdown -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0 _PM_Startup -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8 _PM_SetMainMemPurge -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF _PM_CheckMainMem -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF _PM_GetPageAddress -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71 _PM_GetPage -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31 _PM_SetPageLock -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60 _PM_Preload -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA _PM_NextFrame -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle _PM_Reset -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0 _PM_Startup -16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B _PM_Shutdown -16/wolf3d/WOLFSRC/WOLFHACK.C: src = PM_GetPage(0); -16/wolf3d/WOLFSRC/WOLFHACK.C: src = PM_GetPage(1); - -16/wf3d8086/id_pm.c: longword last = MAXLONG; -16/wf3d8086/id_pm.c: for (i = 0,page = PMPages,lru = -1,last = MAXLONG;i < ChunksInFile;i++,page++) -16/wf3d8086/id_pm.c: for (i = 0,page = PMPages,lru = -1,last = MAXLONG;i < ChunksInFile;i++,page++) -16/wf3d8086/id_pm.c: if (++PMFrameCount >= MAXLONG - 4) diff --git a/pm_use_.txt b/pm_use_.txt new file mode 100755 index 00000000..09041618 --- /dev/null +++ b/pm_use_.txt @@ -0,0 +1,43 @@ +16/wolf3d/WOLFSRC/CONTIGSC.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/CONTIGSC.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/ID_SD.C: addr = PM_GetSoundPage(page); +16/wolf3d/WOLFSRC/ID_SD.C: PM_SetPageLock(PMSoundStart + page,pml_Locked); +16/wolf3d/WOLFSRC/ID_SD.C: PM_SetPageLock(i + PMSoundStart,pml_Unlocked); +16/wolf3d/WOLFSRC/ID_SD.C: PM_UnlockMainMem(); +16/wolf3d/WOLFSRC/ID_SD.C: PM_CheckMainMem(); +16/wolf3d/WOLFSRC/ID_SD.C: p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0); +16/wolf3d/WOLFSRC/ID_SD.C: PM_UnlockMainMem(); +16/wolf3d/WOLFSRC/OLDSCALE.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/OLDSCALE.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/WL_ACT2.C: PM_UnlockMainMem (); +16/wolf3d/WOLFSRC/WL_ACT2.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_DEBUG.C: addr = PM_GetPageAddress(i); +16/wolf3d/WOLFSRC/WL_DEBUG.C: PM_GetPage(j); +16/wolf3d/WOLFSRC/WL_DEBUG.C: PM_GetPage(i); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); +16/wolf3d/WOLFSRC/WL_DRAW.C: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic); +16/wolf3d/WOLFSRC/WL_DRAW.C: PM_NextFrame(); +16/wolf3d/WOLFSRC/WL_GAME.C: PM_UnlockMainMem(); +16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_GAME.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_INTER.C: PM_Preload (PreloadUpdate); +16/wolf3d/WOLFSRC/WL_MAIN.C: PM_Shutdown (); +16/wolf3d/WOLFSRC/WL_MAIN.C: PM_Startup (); +16/wolf3d/WOLFSRC/WL_MAIN.C: PM_UnlockMainMem (); +16/wolf3d/WOLFSRC/WL_MENU.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_MENU.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_PLAY.C: PM_CheckMainMem (); +16/wolf3d/WOLFSRC/WL_SCALE.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/WL_SCALE.C: shape = PM_GetSpritePage (shapenum); +16/wolf3d/WOLFSRC/WOLFHACK.C: src = PM_GetPage(0); +16/wolf3d/WOLFSRC/WOLFHACK.C: src = PM_GetPage(1); diff --git a/qkeen.sh b/qkeen.sh new file mode 100755 index 00000000..fffb4afb --- /dev/null +++ b/qkeen.sh @@ -0,0 +1,4 @@ +grep "$1" 16/keen/*.c +grep "$1" 16/keen/*.h +grep "$1" 16/keen/lib/*.c +grep "$1" 16/keen/lib/*.h diff --git a/src/0.c b/src/0.c index b909273f..3ac991ed 100755 --- a/src/0.c +++ b/src/0.c @@ -12,7 +12,6 @@ #define INITTNUM 1 -static byte palette[768]; player_t player[MaxPlayers]; map_view_t mv[4]; @@ -29,7 +28,7 @@ int main(int argc,char **argv) //nibble i; char *bakapee1,*bakapee2; - boolean anim=1,noanim=0; + boolean anim=1,noanim=0,zerostoppause=1; gvar.video.panp=0; @@ -75,11 +74,10 @@ int main(int argc,char **argv) return 1; } VGAmodeX(1, 1, &gvar); - - modexPalUpdate0(palette); + modexPalUpdate0(gvar.video.palette); /* load color palette */ - VL_LoadPalFile(bakapee2, &palette); + VL_LoadPalFile(bakapee2, &gvar.video.palette); /* preprocess the sprite to generate line offsets */ vrl_lineoffs = vrl1_vgax_genlineoffsets(vrl_header,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header)); @@ -92,10 +90,12 @@ int main(int argc,char **argv) /* setup camera and screen~ */ modexHiganbanaPageSetup(&gvar.video); ZC_MVSetup(&mv, &map, &gvar); - //VL_ShowPage(&(gvar.video.page[gvar.video.panp]), 0, 0); - ZC_ShowMV(&mv, 0, 0); + ZC_ShowMV(&mv, gvar.video.panp, 0); - //DRAWCORNERBOXES; +// VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw); + VL_PatternDraw(&gvar.video, 0/*gvar.video.panp*/, 0, 1); + TESTBG34 + DRAWCORNERBOXES /* make distinctive pattern offscreen, render sprite, copy onscreen. * this time, we render the distinctive pattern to another offscreen location and just copy. @@ -108,16 +108,10 @@ int main(int argc,char **argv) VGA_RAM_PTR omemptr; int xdir=1,ydir=1; - int j; - /* fill pattern offset with a distinctive pattern */ - for (i=0;i < gvar.video.page[0].width;i++) { - o = (i >> 2) + (0x10000UL - (uint16_t)gvar.video.page[0].data); - vga_write_sequencer(0x02/*map mask*/,1 << (i&3)); - for (j=0;j < gvar.video.page[0].height;j++,o += gvar.video.page[0].stridew) - vga_state.vga_graphics_ram[o] = (i^j)&15; // VRL samples put all colors in first 15! - } - TESTBG; - //DRAWCORNERBOXES; +// VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw); +// VL_PatternDraw(&gvar.video, 0, 1, 1); +// TESTBG; +// DRAWCORNERBOXES; /* starting coords. note: this technique is limited to x coordinates of multiple of 4 */ x = -(gvar.video.page[0].dx); @@ -131,21 +125,19 @@ int main(int argc,char **argv) IN_ReadControl(0,&player); if(IN_KeyDown(68)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1,1); } //f10 PANKEYFUN; - if(IN_KeyDown(sc_Space)) //space + if(IN_KeyDown(sc_Space) || zerostoppause) //space { anim=!anim; DRAWCORNERBOXES; - IN_UserInput(1,1); + if(!zerostoppause) IN_UserInput(1,1); else zerostoppause=0; } if(IN_KeyDown(sc_R)){ gvar.video.page[0].dx=gvar.video.page[0].dy=gvar.video.page[1].dx=gvar.video.page[1].dy=16; mv[0].tx = mv[0].ty = mv[1].tx = mv[1].ty = INITTNUM; - modexShowPage(&(gvar.video.page[gvar.video.panp])); + player[0].enti.q = 1; player[0].enti.d = 2; x=y=0; xdir=ydir=1; - //TESTBG; - DRAWCORNERBOXES; } //R FUNCTIONKEYFUNCTIONS0EXE; @@ -207,7 +199,6 @@ draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header //===========================================================================// - //modexShowPage(&(gvar.video.page[0])); ZC_ShowMV(&mv, 0, 0); if(!noanim) { /* another handy "demo" effect using VGA write mode 1. diff --git a/src/bakapi.c b/src/bakapi.c index e7adbd22..f787933a 100755 --- a/src/bakapi.c +++ b/src/bakapi.c @@ -122,7 +122,7 @@ main(int argc, char *argvar[]) //modexDrawBmp(VGA, 0, 0, &bmp, 0); //____ //getch(); //____ - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); // screen savers #ifdef BOINK @@ -150,7 +150,7 @@ main(int argc, char *argvar[]) if(panq<=(TILEWH/(4))) { gvar.video.page[0].dx++; - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); panq++; } else { panq = 1; pand = 0; } } @@ -161,7 +161,7 @@ main(int argc, char *argvar[]) if(panq<=(TILEWH/(4))) { gvar.video.page[0].dx--; - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); panq++; } else { panq = 1; pand = 0; } } @@ -172,7 +172,7 @@ main(int argc, char *argvar[]) if(panq<=(TILEWH/(4))) { gvar.video.page[0].dy++; - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); panq++; } else { panq = 1; pand = 0; } } @@ -183,7 +183,7 @@ main(int argc, char *argvar[]) if(panq<=(TILEWH/(4))) { gvar.video.page[0].dy--; - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); panq++; } else { panq = 1; pand = 0; } } @@ -272,7 +272,7 @@ pee: gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]); // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C. - modexShowPage(&gvar.video.page[0]); + VL_ShowPage(&gvar.video.page[0], 0, 0); break; case '-': if(bakapee.bonk>0) diff --git a/src/lib/16_enti.c b/src/lib/16_enti.c index d0a3de51..1c89d9b7 100755 --- a/src/lib/16_enti.c +++ b/src/lib/16_enti.c @@ -35,7 +35,6 @@ void EN_initentity(entity_t *enti) enti->speed=4; enti->persist_aniframe = enti->q; enti->spt=(TILEWH/(enti->speed)); //speed per tile wwww - enti->invq=1; enti->pred = enti->d; enti->overdraww=0; enti->overdrawh=4; diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index abcf48aa..b30f9df8 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -18,8 +18,8 @@ // ID_MM.H -#ifndef __16_EXMM__ -#define __16_EXMM__ +#ifndef __16_MM__ +#define __16_MM__ #include #include diff --git a/src/lib/16_rf.c b/src/lib/16_rf.c new file mode 100755 index 00000000..05ea5ae5 --- /dev/null +++ b/src/lib/16_rf.c @@ -0,0 +1,3110 @@ +/* Keen Dreams Source Code + * Copyright (C) 2014 Javier M. Chavez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +// 16_RF.C + +/* +============================================================================= + +notes +----- + +scrolling more than one tile / refresh forces a total redraw + +two overlapping sprites of equal priority can change drawing order when +updated + +============================================================================= +*/ + +#include "src/lib/16_rf.h" +#pragma hdrstop + +/* +============================================================================= + + LOCAL CONSTANTS + +============================================================================= +*/ + +#define SCREENTILESWIDE 20 +#define SCREENTILESHIGH 13 + +#define SCREENSPACE (SCREENWIDTH*240) +#define FREEEGAMEM (0x10000l-3l*SCREENSPACE) + +// +// the update array must have enough space for two screens that can float +// up two two tiles each way +// +// (PORTTILESWIDE+1)*PORTTILESHIGH must be even so the arrays can be cleared +// by word width instructions + +#define UPDATESCREENSIZE (UPDATEWIDE*PORTTILESHIGH+2) +#define UPDATESPARESIZE (UPDATEWIDE*2+4) +#define UPDATESIZE (UPDATESCREENSIZE+2*UPDATESPARESIZE) + +#define G_EGASX_SHIFT 7 // global >> ?? = screen x +#define G_CGASX_SHIFT 6 // global >> ?? = screen x +#define G_SY_SHIFT 4 // global >> ?? = screen y + +unsigned SX_T_SHIFT; // screen x >> ?? = tile EGA = 1, CGA = 2; +#define SY_T_SHIFT 4 // screen y >> ?? = tile + + +#define EGAPORTSCREENWIDE 42 +#define CGAPORTSCREENWIDE 84 +#define PORTSCREENHIGH 224 + +#define UPDATESCREENSIZE (UPDATEWIDE*PORTTILESHIGH+2) +#define UPDATESPARESIZE (UPDATEWIDE*2+4) +#define UPDATESIZE (UPDATESCREENSIZE+2*UPDATESPARESIZE) + +/* +============================================================================= + + LOCAL TYPES + +============================================================================= +*/ + +typedef struct spriteliststruct +{ + int screenx,screeny; + int width,height; + + unsigned grseg,sourceofs,planesize; + drawtype draw; + unsigned tilex,tiley,tilewide,tilehigh; + int priority,updatecount; + struct spriteliststruct **prevptr,*nextsprite; +} spritelisttype; + + +typedef struct +{ + int screenx,screeny; + int width,height; +} eraseblocktype; + + +typedef struct +{ + unsigned current; // foreground tiles have high bit set + int count; +} tiletype; + + +typedef struct animtilestruct +{ + unsigned x,y,tile; + tiletype *chain; + unsigned far *mapplane; + struct animtilestruct **prevptr,*nexttile; +} animtiletype; + +/* +============================================================================= + + GLOBAL VARIABLES + +============================================================================= +*/ + +unsigned tics; +long lasttimecount; + +boolean compatability; // crippled refresh for wierdo SVGAs + +unsigned mapwidth,mapheight,mapbyteswide,mapwordswide + ,mapbytesextra,mapwordsextra; +unsigned mapbwidthtable[MAXMAPHEIGHT]; + +// +// Global : Actor coordinates are in this, at 1/16 th of a pixel, to allow +// for fractional movement and acceleration. +// +// Tiles : Tile offsets from the upper left corner of the current map. +// +// Screen : Graphics level offsets from map origin, x in bytes, y in pixels. +// originxscreen is the same spot as originxtile, just with extra precision +// so graphics don't need to be done in tile boundaries. +// + +unsigned originxglobal,originyglobal; +unsigned originxtile,originytile; +unsigned originxscreen,originyscreen; +unsigned originmap; +unsigned originxmin,originxmax,originymin,originymax; +unsigned originxtile,originytile; + +unsigned masterofs; + +// +// Table of the offsets from bufferofs of each tile spot in the +// view port. The extra wide tile should never be drawn, but the space +// is needed to account for the extra 0 in the update arrays. Built by +// RF_Startup +// + +unsigned blockstarts[UPDATEWIDE*UPDATEHIGH]; +unsigned updatemapofs[UPDATEWIDE*UPDATEHIGH]; + +unsigned uwidthtable[PORTTILESHIGH]; // lookup instead of multiply + +byte update[2][UPDATESIZE]; +byte *updateptr,*baseupdateptr, // current start of update window + *updatestart[2], + *baseupdatestart[2]; + +//from others +cardtype videocard; // set by VW_Startup +grtype grmode; // CGAgr, EGAgr, VGAgr + +unsigned bufferofs; // hidden area to draw to before displaying +unsigned displayofs; // origin of the visable screen +// + +/* +============================================================================= + + LOCAL VARIABLES + +============================================================================= +*/ +#ifdef PROFILE +static char scratch[20],str[20]; +#endif + +tiletype allanims[MAXANIMTYPES]; +unsigned numanimchains; + +void (*refreshvector) (void); + +unsigned screenstart[3] = + {0,SCREENSPACE,SCREENSPACE*2}; + +unsigned xpanmask; // prevent panning to odd pixels + +unsigned screenpage; // screen currently being displayed +unsigned otherpage; + +#if GRMODE == EGAGR +unsigned tilecache[NUMTILE16]; +#endif + +spritelisttype spritearray[MAXSPRITES],*prioritystart[PRIORITIES], + *spritefreeptr; + +animtiletype animarray[MAXANIMTILES],*animhead,*animfreeptr; + +int animfreespot; + +eraseblocktype eraselist[2][MAXSPRITES],*eraselistptr[2]; + +/* +============================================================================= + + LOCAL PROTOTYPES + +============================================================================= +*/ + +void RFL_NewTile (unsigned updateoffset); +void RFL_MaskForegroundTiles (void); +void RFL_UpdateTiles (void); + +void RFL_CalcOriginStuff (long x, long y); +void RFL_InitSpriteList (void); +void RFL_InitAnimList (void); +void RFL_CheckForAnimTile (unsigned x, unsigned y); +void RFL_AnimateTiles (void); +void RFL_RemoveAnimsOnX (unsigned x); +void RFL_RemoveAnimsOnY (unsigned y); +void RFL_EraseBlocks (void); +void RFL_UpdateSprites (void); + + +/* +============================================================================= + + GRMODE INDEPENDANT ROUTINES + +============================================================================= +*/ + + +/* +===================== += += RF_Startup += +===================== +*/ + +static char *ParmStrings[] = {"comp",""}; + +void RF_Startup (void) +{ + int i,x,y; + unsigned *blockstart; + + if (grmode == EGAGR) + for (i = 1;i < _argc;i++) + if (US_CheckParm(_argv[i],ParmStrings) == 0) + { + compatability = true; + break; + } + + for (i=0;i += +===================== +*/ +/*++++ +void RF_NewMap (void) +{ + int i,x,y; + unsigned spot,*table; + + mapwidth = mapheaderseg[mapon]->width; + mapbyteswide = 2*mapwidth; + mapheight = mapheaderseg[mapon]->height; + mapwordsextra = mapwidth-PORTTILESWIDE; + mapbytesextra = 2*mapwordsextra; + +// +// make a lookup table for the maps left edge +// + spot = 0; + for (i=0;i=0) // <0 is a tile that is never drawn + { + CA_MarkGrChunk(STARTTILE16+tile); + if (tinf[ANIM+tile]) + { + // this tile will animated + + for (i=0;i=MAXANIMTYPES) + //Quit ("RF_MarkTileGraphics: Too many unique animated tiles!"); + allanims[i].current = tile; + allanims[i].count = tinf[SPEED+tile]; + + *info = (unsigned)&allanims[i]; + numanimchains++; + + anims = 0; + next = tile+(signed char)(tinf[ANIM+tile]); + while (next != tile) + { + CA_MarkGrChunk(STARTTILE16+next); + next += (signed char)(tinf[ANIM+next]); + if (++anims > 20) + //Quit ("MarkTileGraphics: Unending animation!"); + } + + } + } +nextback: + info++; + } while (start=0) // <0 is a tile that is never drawn + { + CA_MarkGrChunk(STARTTILE16M+tile); + if (tinf[MANIM+tile]) + { + // this tile will animated + + tilehigh = tile | 0x8000; // foreground tiles have high bit + for (i=0;i=MAXANIMTYPES) + //Quit ("RF_MarkTileGraphics: Too many unique animated tiles!"); + allanims[i].current = tilehigh; + allanims[i].count = tinf[MSPEED+tile]; + + *info = (unsigned)&allanims[i]; + numanimchains++; + + anims = 0; + next = tile+(signed char)(tinf[MANIM+tile]); + while (next != tile) + { + CA_MarkGrChunk(STARTTILE16M+next); + next += (signed char)(tinf[MANIM+next]); + if (++anims > 20) + //Quit ("MarkTileGraphics: Unending animation!"); + } + + } + } +nextfront: + info++; + } while (startnexttile; + next = animhead; // stick it at the start of the list + animhead = anim; + if (next) + next->prevptr = &anim->nexttile; + anim->nexttile = next; + anim->prevptr = &animhead; + + anim->x = x; + anim->y = y; + anim->tile = tile; + anim->mapplane = map; + anim->chain = (tiletype *)*(mapsegs[2]+offset); + } + +// +// foreground +// + map = mapsegs[1]+offset; + tile = *map; + if (tinf[MANIM+tile]) + { + if (!animfreeptr) + //Quit ("RF_CheckForAnimTile: No free spots in tilearray!"); + anim = animfreeptr; + animfreeptr = animfreeptr->nexttile; + next = animhead; // stick it at the start of the list + animhead = anim; + if (next) + next->prevptr = &anim->nexttile; + anim->nexttile = next; + anim->prevptr = &animhead; + + anim->x = x; + anim->y = y; + anim->tile = tile; + anim->mapplane = map; + anim->chain = (tiletype *)*(mapsegs[2]+offset); + } + +} +*/ + +/* +==================== += += RFL_RemoveAnimsOnX += +==================== +*/ + +void RFL_RemoveAnimsOnX (unsigned x) +{ + animtiletype *current,*next; + + current = animhead; + while (current) + { + if (current->x == x) + { + *(void **)current->prevptr = current->nexttile; + if (current->nexttile) + current->nexttile->prevptr = current->prevptr; + next = current->nexttile; + current->nexttile = animfreeptr; + animfreeptr = current; + current = next; + } + else + current = current->nexttile; + } +} + + +/* +==================== += += RFL_RemoveAnimsOnY += +==================== +*/ + +void RFL_RemoveAnimsOnY (unsigned y) +{ + animtiletype *current,*next; + + current = animhead; + while (current) + { + if (current->y == y) + { + *(void **)current->prevptr = current->nexttile; + if (current->nexttile) + current->nexttile->prevptr = current->prevptr; + next = current->nexttile; + current->nexttile = animfreeptr; + animfreeptr = current; + current = next; + } + else + current = current->nexttile; + } +} + + +/* +==================== += += RFL_AnimateTiles += +==================== +*/ +/*++++ +void RFL_AnimateTiles (void) +{ + animtiletype *current; + unsigned updateofs,tile,x,y; + tiletype *anim; + +// +// animate the lists of tiles +// + anim = &allanims[0]; + while (anim->current) + { + anim->count-=tics; + while ( anim->count < 1) + { + if (anim->current & 0x8000) + { + tile = anim->current & 0x7fff; + tile += (signed char)tinf[MANIM+tile]; + anim->count += tinf[MSPEED+tile]; + tile |= 0x8000; + } + else + { + tile = anim->current; + tile += (signed char)tinf[ANIM+tile]; + anim->count += tinf[SPEED+tile]; + } + anim->current = tile; + } + anim++; + } + + +// +// traverse the list of animating tiles +// + current = animhead; + while (current) + { + tile =current->chain->current; + if ( tile != current->tile) + { + // tile has animated + // + // remove tile from master screen cache, + // change a tile to its next state, set the structure up for + // next animation, and post an update region to both update pages + // + current->tile = tile; + + *(current->mapplane) = tile & 0x7fff; // change in map + +#if GRMODE == EGAGR + if (tile<0x8000) // background + tilecache[tile] = 0; +#endif + + x = current->x-originxtile; + y = current->y-originytile; + + if (x>=PORTTILESWIDE || y>=PORTTILESHIGH) + //Quit ("RFL_AnimateTiles: Out of bounds!"); + + updateofs = uwidthtable[y] + x; + RFL_NewTile(updateofs); // puts "1"s in both pages + } + current = current->nexttile; + } +} +*/ + +//=========================================================================== + +/* +========================= += += RFL_InitSpriteList += += Call to clear out the entire sprite list and return all of them to += the free list. += +========================= +*/ + +void RFL_InitSpriteList (void) +{ + int i; + + spritefreeptr = &spritearray[0]; + for (i=0;ioriginxmax) + x=originxmax; + + if (yoriginymax) + y=originymax; + + originxglobal = x; + originyglobal = y; + originxtile = originxglobal>>G_T_SHIFT; + originytile = originyglobal>>G_T_SHIFT; + originxscreen = originxtile<>G_P_SHIFT) & 15; + pansx = panx & 8; + pany = pansy = (originyglobal>>G_P_SHIFT) & 15; + panadjust = panx/8 + ylookup[pany]; +#endif + +#if GRMODE == CGAGR + panx = (originxglobal>>G_P_SHIFT) & 15; + pansx = panx & 12; + pany = pansy = (originyglobal>>G_P_SHIFT) & 15; + panadjust = pansx/4 + ylookup[pansy]; +#endif + +} + +//=========================================================================== + +/* +===================== += += RF_SetRefreshHook += +===================== +*/ + +void RF_SetRefreshHook (void (*func) (void) ) +{ + refreshvector = func; +} + + + +/* +================= += += RFL_NewRow += += Bring a new row of tiles onto the port, spawning animating tiles += +================= +*/ + +void RFL_NewRow (int dir) +{ + unsigned count,updatespot,updatestep; + int x,y,xstep,ystep; + + switch (dir) + { + case 0: // top row + updatespot = 0; + updatestep = 1; + x = originxtile; + y = originytile; + xstep = 1; + ystep = 0; + count = PORTTILESWIDE; + break; + + case 1: // right row + updatespot = PORTTILESWIDE-1; + updatestep = UPDATEWIDE; + x = originxtile + PORTTILESWIDE-1; + y = originytile; + xstep = 0; + ystep = 1; + count = PORTTILESHIGH; + break; + + case 2: // bottom row + updatespot = UPDATEWIDE*(PORTTILESHIGH-1); + updatestep = 1; + x = originxtile; + y = originytile + PORTTILESHIGH-1; + xstep = 1; + ystep = 0; + count = PORTTILESWIDE; + break; + + case 3: // left row + updatespot = 0; + updatestep = UPDATEWIDE; + x = originxtile; + y = originytile; + xstep = 0; + ystep = 1; + count = PORTTILESHIGH; + break; + //default: + //Quit ("RFL_NewRow: Bad dir!"); + } + + while (count--) + { + RFL_NewTile(updatespot); + RFL_CheckForAnimTile (x,y); + updatespot+=updatestep; + x+=xstep; + y+=ystep; + } +} + +//=========================================================================== + +/* +===================== += += RF_ForceRefresh += +===================== +*/ + +void RF_ForceRefresh (void) +{ + RF_NewPosition (originxglobal,originyglobal); + RF_Refresh (); + RF_Refresh (); +} + + + +/* +============================================================================= + + EGA specific routines + +============================================================================= +*/ + +#if GRMODE == EGAGR + + +/* +===================== += += RF_NewPosition EGA += +===================== +*/ + +void RF_NewPosition (unsigned x, unsigned y) +{ + int mx,my; + byte *page0ptr,*page1ptr; + unsigned updatenum; + +// +// calculate new origin related globals +// + RFL_CalcOriginStuff (x,y); + +// +// clear out all animating tiles +// + RFL_InitAnimList (); + +// +// set up the new update arrays at base position +// + memset (tilecache,0,sizeof(tilecache)); // old cache is invalid + + updatestart[0] = baseupdatestart[0]; + updatestart[1] = baseupdatestart[1]; + + page0ptr = updatestart[0]+PORTTILESWIDE; // used to stick "0"s after rows + page1ptr = updatestart[1]+PORTTILESWIDE; + + updatenum = 0; // start at first visable tile + + for (my=0;my1 || absdy>1) + { + // + // scrolled more than one tile, so start from scratch + // + RF_NewPosition(originxglobal,originyglobal); + return; + } + + if (!absdx && !absdy) + return; // the screen has not scrolled an entire tile + + +// +// adjust screens and handle SVGA crippled compatability mode +// + screenmove = deltay*16*SCREENWIDTH + deltax*TILEWIDTH; + for (i=0;i<3;i++) + { + screenstart[i]+= screenmove; + if (compatability && screenstart[i] > (0x10000l-SCREENSPACE) ) + { + // + // move the screen to the opposite end of the buffer + // + screencopy = screenmove>0 ? FREEEGAMEM : -FREEEGAMEM; + oldscreen = screenstart[i] - screenmove; + newscreen = oldscreen + screencopy; + screenstart[i] = newscreen + screenmove; + VW_ScreenToScreen (oldscreen,newscreen, + PORTTILESWIDE*2,PORTTILESHIGH*16); + + if (i==screenpage) + VW_SetScreen(newscreen+oldpanadjust,oldpanx & xpanmask); + } + } + bufferofs = screenstart[otherpage]; + displayofs = screenstart[screenpage]; + masterofs = screenstart[2]; + + +// +// float the update regions +// + move = deltax; + if (deltay==1) + move += UPDATEWIDE; + else if (deltay==-1) + move -= UPDATEWIDE; + + updatestart[0]+=move; + updatestart[1]+=move; + +// +// draw the new tiles just scrolled on to the master screen, and +// mark them as needing to be copied to each screen next refreshes +// Make sure a zero is at the end of each row in update +// + + if (deltax) + { + if (deltax==1) + { + RFL_NewRow (1); // new right row + RFL_OldRow (oldoriginmap,PORTTILESHIGH,mapbyteswide); + RFL_RemoveAnimsOnX (originxtile-1); + } + else + { + RFL_NewRow (3); // new left row + RFL_OldRow (oldoriginmap+(PORTTILESWIDE-1)*2,PORTTILESHIGH + ,mapbyteswide); + RFL_RemoveAnimsOnX (originxtile+PORTTILESWIDE); + } + + update0 = updatestart[0]+PORTTILESWIDE; + update1 = updatestart[1]+PORTTILESWIDE; + for (yy=0;yyupdatecount<2) + { + if (!sprite->updatecount) + memcpy (eraselistptr[otherpage]++,sprite,sizeof(eraseblocktype)); + memcpy (eraselistptr[screenpage]++,sprite,sizeof(eraseblocktype)); + } + + if (priority != sprite->priority) + { + // sprite mvoed to another priority, so unlink the old one and + // relink it in the new priority + + next = sprite->nextsprite; // cut old links + if (next) + next->prevptr = sprite->prevptr; + *sprite->prevptr = next; + goto linknewspot; + } + } + else + { + // this is a brand new sprite, so allocate a block from the array + + if (!spritefreeptr) + //Quit ("RF_PlaceSprite: No free spots in spritearray!"); + + sprite = spritefreeptr; + spritefreeptr = spritefreeptr->nextsprite; + +linknewspot: + next = prioritystart[priority]; // stick it in new spot + if (next) + next->prevptr = &sprite->nextsprite; + sprite->nextsprite = next; + prioritystart[priority] = sprite; + sprite->prevptr = &prioritystart[priority]; + } + +// +// write the new info to the sprite +// + spr = &spritetable[spritenumber-STARTSPRITES]; + block = (spritetype /*_seg*/ *)grsegs[spritenumber]; + + globaly+=spr->orgy; + globalx+=spr->orgx; + + pixx = globalx >> G_SY_SHIFT; + shift = (pixx&7)/2; + + sprite->screenx = pixx >> (G_EGASX_SHIFT-G_SY_SHIFT); + sprite->screeny = globaly >> G_SY_SHIFT; + sprite->width = block->width[shift]; + sprite->height = spr->height; + sprite->grseg = spritenumber; + sprite->sourceofs = block->sourceoffset[shift]; + sprite->planesize = block->planesize[shift]; + sprite->draw = draw; + sprite->priority = priority; + sprite->tilex = sprite->screenx >> SX_T_SHIFT; + sprite->tiley = sprite->screeny >> SY_T_SHIFT; + sprite->tilewide = ( (sprite->screenx + sprite->width -1) >> SX_T_SHIFT ) + - sprite->tilex + 1; + sprite->tilehigh = ( (sprite->screeny + sprite->height -1) >> SY_T_SHIFT ) + - sprite->tiley + 1; + + sprite->updatecount = 2; // draw on next two refreshes + +// save the sprite pointer off in the user's pointer so it can be moved +// again later + + *user = sprite; +} + +//=========================================================================== + +/* +===================== += += RF_RemoveSprite EGA += +===================== +*/ + +void RF_RemoveSprite (void **user) +{ + spritelisttype *sprite,*next; + + sprite = (spritelisttype *)*user; + if (!sprite) + return; + +// +// post an erase block to both pages by copying screenx,screeny,width,height +// both pages may not need to be erased if the sprite just changed last frame +// + if (sprite->updatecount<2) + { + if (!sprite->updatecount) + memcpy (eraselistptr[otherpage]++,sprite,sizeof(eraseblocktype)); + memcpy (eraselistptr[screenpage]++,sprite,sizeof(eraseblocktype)); + } + +// +// unlink the sprite node +// + next = sprite->nextsprite; + if (next) // if (!next), sprite is last in chain + next->prevptr = sprite->prevptr; + *sprite->prevptr = next; + +// +// add it back to the free list +// + sprite->nextsprite = spritefreeptr; + spritefreeptr = sprite; + +// +// null the users pointer, so next time that actor gets placed, it will +// allocate a new block +// + + *user = 0; +} + + +//=========================================================================== + + +/* +==================== += += RFL_EraseBlocks EGA += += Write mode 1 should be set += +==================== +*/ + +void RFL_EraseBlocks (void) +{ + eraseblocktype *block,*done; + int screenxh,screenyh; + unsigned pos,xtl,ytl,xth,yth,x,y; + byte *updatespot; + unsigned updatedelta; + unsigned erasecount; + +#ifdef PROFILE + erasecount = 0; +#endif + + block = otherpage ? &eraselist[1][0] : &eraselist[0][0]; + + done = eraselistptr[otherpage]; + + while (block != done) + { + + // + // clip the block to the current screen view + // + block->screenx -= originxscreen; + block->screeny -= originyscreen; + + if (block->screenx < 0) + { + block->width += block->screenx; + if (block->width<1) + goto next; + block->screenx = 0; + } + + if (block->screeny < 0) + { + block->height += block->screeny; + if (block->height<1) + goto next; + block->screeny = 0; + } + + screenxh = block->screenx + block->width; + screenyh = block->screeny + block->height; + + if (screenxh > EGAPORTSCREENWIDE) + { + block->width = EGAPORTSCREENWIDE-block->screenx; + screenxh = block->screenx + block->width; + } + + if (screenyh > PORTSCREENHIGH) + { + block->height = PORTSCREENHIGH-block->screeny; + screenyh = block->screeny + block->height; + } + + if (block->width<1 || block->height<1) + goto next; + + // + // erase the block by copying from the master screen + // + pos = ylookup[block->screeny]+block->screenx; + VW_ScreenToScreen (masterofs+pos,bufferofs+pos, + block->width,block->height); + + // + // put 2s in update where the block was, to force sprites to update + // + xtl = block->screenx >> SX_T_SHIFT; + xth = (block->screenx+block->width-1) >> SX_T_SHIFT; + ytl = block->screeny >> SY_T_SHIFT; + yth = (block->screeny+block->height-1) >> SY_T_SHIFT; + + updatespot = updateptr + uwidthtable[ytl] + xtl; + updatedelta = UPDATEWIDE - (xth-xtl+1); + + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + *updatespot++ = 2; + updatespot += updatedelta; // down to next line + } +#ifdef PROFILE + erasecount++; +#endif + +next: + block++; + } + eraselistptr[otherpage] = otherpage ? &eraselist[1][0] : &eraselist[0][0]; +#ifdef PROFILE + strcpy (scratch,"\tErase:"); + itoa (erasecount,str,10); + strcat (scratch,str); + write (profilehandle,scratch,strlen(scratch)); +#endif + +} + + +/* +==================== += += RFL_UpdateSprites EGA += += NOTE: Implement vertical clipping! += +==================== +*/ + +void RFL_UpdateSprites (void) +{ + spritelisttype *sprite; + int portx,porty,x,y,xtl,xth,ytl,yth; + int priority; + unsigned dest; + byte *updatespot,*baseupdatespot; + unsigned updatedelta; + unsigned updatecount; + unsigned height,sourceofs; + +#ifdef PROFILE + updatecount = 0; +#endif + + for (priority=0;prioritynextsprite) + { + // + // see if the sprite has any visable area in the port + // + + portx = sprite->screenx - originxscreen; + porty = sprite->screeny - originyscreen; + xtl = portx >> SX_T_SHIFT; + xth = (portx + sprite->width-1) >> SX_T_SHIFT; + ytl = porty >> SY_T_SHIFT; + yth = (porty + sprite->height-1) >> SY_T_SHIFT; + + if (xtl<0) + xtl = 0; + if (xth>=PORTTILESWIDE) + xth = PORTTILESWIDE-1; + if (ytl<0) + ytl = 0; + if (yth>=PORTTILESHIGH) + yth = PORTTILESHIGH-1; + + if (xtl>xth || ytl>yth) + continue; + + // + // see if it's visable area covers any non 0 update tiles + // + updatespot = baseupdatespot = updateptr + uwidthtable[ytl] + xtl; + updatedelta = UPDATEWIDE - (xth-xtl+1); + + if (sprite->updatecount) + { + sprite->updatecount--; // the sprite was just placed, + goto redraw; // so draw it for sure + } + + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + if (*updatespot++) + goto redraw; + updatespot += updatedelta; // down to next line + } + continue; // no need to update + +redraw: + // + // set the tiles it covers to 3, because those tiles are being + // updated + // + updatespot = baseupdatespot; + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + *updatespot++ = 3; + updatespot += updatedelta; // down to next line + } + // + // draw it! + // + height = sprite->height; + sourceofs = sprite->sourceofs; + if (porty<0) + { + height += porty; // clip top off + sourceofs -= porty*sprite->width; + porty = 0; + } + else if (porty+height>PORTSCREENHIGH) + { + height = PORTSCREENHIGH - porty; // clip bottom off + } + + dest = bufferofs + ylookup[porty] + portx; + + switch (sprite->draw) + { + case spritedraw: + VW_MaskBlock(grsegs[sprite->grseg], sourceofs, + dest,sprite->width,height,sprite->planesize); + break; + + case maskdraw: + break; + + } +#ifdef PROFILE + updatecount++; +#endif + + + } + } +#ifdef PROFILE + strcpy (scratch,"\tSprites:"); + itoa (updatecount,str,10); + strcat (scratch,str); + write (profilehandle,scratch,strlen(scratch)); +#endif + +} + + +/* +===================== += += RF_Refresh EGA += += All routines will draw at the port at bufferofs, possibly copying from += the port at masterofs. The EGA version then page flips, while the += CGA version updates the screen from the buffer port. += += Screenpage is the currently displayed page, not the one being drawn += Otherpage is the page to be worked with now += +===================== +*/ + +void RF_Refresh (void) +{ + byte *newupdate; + long newtime; + + updateptr = updatestart[otherpage]; + + RFL_AnimateTiles (); // DEBUG + +// +// update newly scrolled on tiles and animated tiles from the master screen +// + EGAWRITEMODE(1); + EGAMAPMASK(15); + RFL_UpdateTiles (); + RFL_EraseBlocks (); + +// +// Update is all 0 except where sprites have changed or new area has +// been scrolled on. Go through all sprites and update the ones that cover +// a non 0 update tile +// + EGAWRITEMODE(0); + RFL_UpdateSprites (); + +// +// if the main program has a refresh hook set, call their function before +// displaying the new page +// + if (refreshvector) + refreshvector(); + +// +// display the changed screen +// + VW_SetScreen(bufferofs+panadjust,panx & xpanmask); + +// +// prepare for next refresh +// +// Set the update array to the middle position and clear it out to all "0"s +// with an UPDATETERMINATE at the end +// + updatestart[otherpage] = newupdate = baseupdatestart[otherpage]; +asm mov ax,ds +asm mov es,ax +asm xor ax,ax +asm mov cx,(UPDATESCREENSIZE-2)/2 +asm mov di,[newupdate] +asm rep stosw +asm mov [WORD PTR es:di],UPDATETERMINATE + + screenpage ^= 1; + otherpage ^= 1; + bufferofs = screenstart[otherpage]; + displayofs = screenstart[screenpage]; + +// +// calculate tics since last refresh for adaptive timing +// + if (lasttimecount > TimeCount) + lasttimecount = TimeCount; // if the game was paused a LONG time + do + { + newtime = TimeCount; + tics = newtime-lasttimecount; + } while (ticsMAXTICS) + { + TimeCount -= (tics-MAXTICS); + tics = MAXTICS; + } +} + +#endif // GRMODE == EGAGR + +/* +============================================================================= + + CGA specific routines + +============================================================================= +*/ + +#if GRMODE == CGAGR + + +/* +===================== += += RF_NewPosition CGA += +===================== +*/ + +void RF_NewPosition (unsigned x, unsigned y) +{ + int mx,my; + byte *spotptr; + unsigned updatenum; + +// +// calculate new origin related globals +// + RFL_CalcOriginStuff (x,y); + +// +// clear out all animating tiles +// + RFL_InitAnimList (); + +// +// set up the new update arrays at base position +// + updateptr = baseupdateptr; + + spotptr = updateptr + PORTTILESWIDE; // used to stick "0"s after rows + + updatenum = 0; // start at first visable tile + + for (my=0;my1 || absdy>1) + { + // + // scrolled more than one tile, so start from scratch + // + RF_NewPosition(originxglobal,originyglobal); + return; + } + + if (!absdx && !absdy) + return; // the screen has not scrolled an entire tile + + +// +// float screens +// + screenmove = deltay*16*SCREENWIDTH + deltax*TILEWIDTH; + bufferofs += screenmove; + masterofs += screenmove; + + +// +// float the update regions +// + move = deltax; + if (deltay==1) + move += UPDATEWIDE; + else if (deltay==-1) + move -= UPDATEWIDE; + + updateptr+=move; + +// +// draw the new tiles just scrolled on to the master screen, and +// mark them as needing to be copied to each screen next refreshes +// Make sure a zero is at the end of each row in update +// + + if (deltax) + { + if (deltax==1) + { + RFL_NewRow (1); // new right row + RFL_RemoveAnimsOnX (originxtile-1); + } + else + { + RFL_NewRow (3); // new left row + RFL_RemoveAnimsOnX (originxtile+PORTTILESWIDE); + } + + spotptr = updateptr+PORTTILESWIDE; + for (yy=0;yyupdatecount) // may not have been drawn at all yet + memcpy (eraselistptr[0]++,sprite,sizeof(eraseblocktype)); + + if (priority != sprite->priority) + { + // sprite moved to another priority, so unlink the old one and + // relink it in the new priority + + next = sprite->nextsprite; // cut old links + if (next) + next->prevptr = sprite->prevptr; + *sprite->prevptr = next; + goto linknewspot; + } + } + else + { + // this is a brand new sprite, so allocate a block from the array + + if (!spritefreeptr) + //Quit ("RF_PlaceSprite: No free spots in spritearray!"); + + sprite = spritefreeptr; + spritefreeptr = spritefreeptr->nextsprite; + +linknewspot: + next = prioritystart[priority]; // stick it in new spot + if (next) + next->prevptr = &sprite->nextsprite; + sprite->nextsprite = next; + prioritystart[priority] = sprite; + sprite->prevptr = &prioritystart[priority]; + } + +// +// write the new info to the sprite +// + spr = &spritetable[spritenumber-STARTSPRITES]; + block = (spritetype /*_seg*/ *)grsegs[spritenumber]; + + globaly+=spr->orgy; + globalx+=spr->orgx; + + sprite->screenx = globalx >> G_CGASX_SHIFT; + sprite->screeny = globaly >> G_SY_SHIFT; + sprite->width = block->width[0]; + sprite->height = spr->height; + sprite->grseg = spritenumber; + sprite->sourceofs = block->sourceoffset[0]; + sprite->planesize = block->planesize[0]; + sprite->draw = draw; + sprite->priority = priority; + sprite->tilex = sprite->screenx >> SX_T_SHIFT; + sprite->tiley = sprite->screeny >> SY_T_SHIFT; + sprite->tilewide = ( (sprite->screenx + sprite->width -1) >> SX_T_SHIFT ) + - sprite->tilex + 1; + sprite->tilehigh = ( (sprite->screeny + sprite->height -1) >> SY_T_SHIFT ) + - sprite->tiley + 1; + + sprite->updatecount = 1; // draw on next refresh + +// save the sprite pointer off in the user's pointer so it can be moved +// again later + + *user = sprite; +} + +//=========================================================================== + +/* +===================== += += RF_RemoveSprite CGA += +===================== +*/ + +void RF_RemoveSprite (void **user) +{ + spritelisttype *sprite,*next; + + sprite = (spritelisttype *)*user; + if (!sprite) + return; + +// +// post an erase block to erase the old position by copying +// screenx,screeny,width,height +// + if (!sprite->updatecount) + { + memcpy (eraselistptr[0]++,sprite,sizeof(eraseblocktype)); + } + +// +// unlink the sprite node +// + next = sprite->nextsprite; + if (next) // if (!next), sprite is last in chain + next->prevptr = sprite->prevptr; + *sprite->prevptr = next; + +// +// add it back to the free list +// + sprite->nextsprite = spritefreeptr; + spritefreeptr = sprite; + +// +// null the users pointer, so next time that actor gets placed, it will +// allocate a new block +// + + *user = 0; +} + + +/* +==================== += += RFL_EraseBlocks CGA += += Write mode 1 should be set += +==================== +*/ + +void RFL_EraseBlocks (void) +{ + eraseblocktype *block,*done; + int screenxh,screenyh; + unsigned pos,xtl,ytl,xth,yth,x,y; + byte *updatespot; + unsigned updatedelta; + + block = &eraselist[0][0]; + + done = eraselistptr[0]; + + while (block != done) + { + + // + // clip the block to the current screen view + // + block->screenx -= originxscreen; + block->screeny -= originyscreen; + + if (block->screenx < 0) + { + block->width += block->screenx; + if (block->width<1) + goto next; + block->screenx = 0; + } + + if (block->screeny < 0) + { + block->height += block->screeny; + if (block->height<1) + goto next; + block->screeny = 0; + } + + screenxh = block->screenx + block->width; + screenyh = block->screeny + block->height; + + if (screenxh > CGAPORTSCREENWIDE) + { + block->width = CGAPORTSCREENWIDE-block->screenx; + screenxh = block->screenx + block->width; + } + + if (screenyh > PORTSCREENHIGH) + { + block->height = PORTSCREENHIGH-block->screeny; + screenyh = block->screeny + block->height; + } + + if (block->width<1 || block->height<1) + goto next; + + // + // erase the block by copying from the master screen + // + pos = ylookup[block->screeny]+block->screenx; + block->width = (block->width + (pos&1) + 1)& ~1; + pos &= ~1; // make sure a word copy gets used + VW_ScreenToScreen (masterofs+pos,bufferofs+pos, + block->width,block->height); + + // + // put 2s in update where the block was, to force sprites to update + // + xtl = block->screenx >> SX_T_SHIFT; + xth = (block->screenx+block->width-1) >> SX_T_SHIFT; + ytl = block->screeny >> SY_T_SHIFT; + yth = (block->screeny+block->height-1) >> SY_T_SHIFT; + + updatespot = updateptr + uwidthtable[ytl] + xtl; + updatedelta = UPDATEWIDE - (xth-xtl+1); + + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + *updatespot++ = 2; + updatespot += updatedelta; // down to next line + } + +next: + block++; + } + eraselistptr[0] = &eraselist[0][0]; +} + + +/* +==================== += += RFL_UpdateSprites CGA += += NOTE: Implement vertical clipping! += +==================== +*/ + +void RFL_UpdateSprites (void) +{ + spritelisttype *sprite; + int portx,porty,x,y,xtl,xth,ytl,yth; + int priority; + unsigned dest; + byte *updatespot,*baseupdatespot; + unsigned updatedelta; + + unsigned updatecount; + unsigned height,sourceofs; + +#ifdef PROFILE + updatecount = 0; +#endif + + + for (priority=0;prioritynextsprite) + { + // + // see if the sprite has any visable area in the port + // + + portx = sprite->screenx - originxscreen; + porty = sprite->screeny - originyscreen; + xtl = portx >> SX_T_SHIFT; + xth = (portx + sprite->width-1) >> SX_T_SHIFT; + ytl = porty >> SY_T_SHIFT; + yth = (porty + sprite->height-1) >> SY_T_SHIFT; + + if (xtl<0) + xtl = 0; + if (xth>=PORTTILESWIDE) + xth = PORTTILESWIDE-1; + if (ytl<0) + ytl = 0; + if (yth>=PORTTILESHIGH) + yth = PORTTILESHIGH-1; + + if (xtl>xth || ytl>yth) + continue; + + // + // see if it's visable area covers any non 0 update tiles + // + updatespot = baseupdatespot = updateptr + uwidthtable[ytl] + xtl; + updatedelta = UPDATEWIDE - (xth-xtl+1); + + if (sprite->updatecount) + { + sprite->updatecount--; // the sprite was just placed, + goto redraw; // so draw it for sure + } + + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + if (*updatespot++) + goto redraw; + updatespot += updatedelta; // down to next line + } + continue; // no need to update + +redraw: + // + // set the tiles it covers to 3, because those tiles are being + // updated + // + updatespot = baseupdatespot; + for (y=ytl;y<=yth;y++) + { + for (x=xtl;x<=xth;x++) + *updatespot++ = 3; + updatespot += updatedelta; // down to next line + } + // + // draw it! + // + height = sprite->height; + sourceofs = sprite->sourceofs; + if (porty<0) + { + height += porty; // clip top off + sourceofs -= porty*sprite->width; + porty = 0; + } + else if (porty+height>PORTSCREENHIGH) + { + height = PORTSCREENHIGH - porty; // clip bottom off + } + + dest = bufferofs + ylookup[porty] + portx; + + switch (sprite->draw) + { + case spritedraw: + VW_MaskBlock(grsegs[sprite->grseg], sourceofs, + dest,sprite->width,height,sprite->planesize); + break; + + case maskdraw: + break; + + } +#ifdef PROFILE + updatecount++; +#endif + + + } + } +} + + +/* +===================== += += RF_Refresh CGA += += All routines will draw at the port at bufferofs, possibly copying from += the port at masterofs. The EGA version then page flips, while the += CGA version updates the screen from the buffer port. += += Screenpage is the currently displayed page, not the one being drawn += Otherpage is the page to be worked with now += +===================== +*/ + +void RF_Refresh (void) +{ + long newtime; + + RFL_AnimateTiles (); + +// +// update newly scrolled on tiles and animated tiles from the master screen +// + RFL_UpdateTiles (); + RFL_EraseBlocks (); + +// +// Update is all 0 except where sprites have changed or new area has +// been scrolled on. Go through all sprites and update the ones that cover +// a non 0 update tile +// + RFL_UpdateSprites (); + +// +// if the main program has a refresh hook set, call their function before +// displaying the new page +// + if (refreshvector) + refreshvector(); + +// +// update everything to the screen +// + VW_CGAFullUpdate (); + +// +// calculate tics since last refresh for adaptive timing +// + if (lasttimecount > TimeCount) + lasttimecount = TimeCount; // if the game was paused a LONG time + do + { + newtime = TimeCount; + tics = newtime-lasttimecount; + } while (ticsMAXTICS) + tics = MAXTICS; + +} + +#endif // GRMODE == CGAGR +//=============================== +/* +; Keen Dreams Source Code +; Copyright (C) 2014 Javier M. Chavez +; +; This program is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2 of the License, or +; (at your option) any later version. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License along +; with this program; if not, write to the Free Software Foundation, Inc., +; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +; ID_RF_A.ASM + +IDEAL +MODEL MEDIUM,C + +INCLUDE "ID_ASM.EQU" + +CACHETILES = 1 ;enable master screen tile caching + +;============================================================================ + +TILESWIDE = 21 +TILESHIGH = 14 + +UPDATESIZE = (TILESWIDE+1)*TILESHIGH+1 + +DATASEG + +EXTRN screenseg:WORD +EXTRN updateptr:WORD +EXTRN updatestart:WORD +EXTRN masterofs:WORD ;start of master tile port +EXTRN bufferofs:WORD ;start of current buffer port +EXTRN screenstart:WORD ;starts of three screens (0/1/master) in EGA mem +EXTRN grsegs:WORD +EXTRN mapsegs:WORD +EXTRN originmap:WORD +EXTRN updatemapofs:WORD +EXTRN tilecache:WORD +EXTRN tinf:WORD ;seg pointer to map header and tile info +EXTRN blockstarts:WORD ;offsets from bufferofs for each update block + +planemask db ? +planenum db ? + +CODESEG + +screenstartcs dw ? ;in code segment for accesability + + + + +IFE GRMODE-CGAGR +;============================================================================ +; +; CGA refresh routines +; +;============================================================================ + +TILEWIDTH = 4 + +;================= +; +; RFL_NewTile +; +; Draws a composit two plane tile to the master screen and sets the update +; spot to 1 in both update pages, forcing the tile to be copied to the +; view pages the next two refreshes +; +; Called to draw newlly scrolled on strips and animating tiles +; +;================= + +PROC RFL_NewTile updateoffset:WORD +PUBLIC RFL_NewTile +USES SI,DI + +; +; mark both update lists at this spot +; + mov di,[updateoffset] + + mov bx,[updateptr] ;start of update matrix + mov [BYTE bx+di],1 + + mov dx,SCREENWIDTH-TILEWIDTH ;add to get to start of next line + +; +; set di to the location in screenseg to draw the tile +; + shl di,1 + mov si,[updatemapofs+di] ;offset in map from origin + add si,[originmap] + mov di,[blockstarts+di] ;screen location for tile + add di,[masterofs] + +; +; set BX to the foreground tile number and SI to the background number +; If either BX or SI = 0xFFFF, the tile does not need to be masked together +; as one of the planes totally eclipses the other +; + mov es,[mapsegs+2] ;foreground plane + mov bx,[es:si] + mov es,[mapsegs] ;background plane + mov si,[es:si] + + mov es,[screenseg] + + or bx,bx + jz @@singletile + jmp @@maskeddraw ;draw both together + +;============= +; +; Draw single background tile from main memory +; +;============= + +@@singletile: + shl si,1 + mov ds,[grsegs+STARTTILE16*2+si] + + xor si,si ;block is segment aligned + +REPT 15 + movsw + movsw + add di,dx +ENDM + movsw + movsw + + mov ax,ss + mov ds,ax ;restore turbo's data segment + ret + + +;========= +; +; Draw a masked tile combo +; Interupts are disabled and the stack segment is reassigned +; +;========= +@@maskeddraw: + cli ; don't allow ints when SS is set + shl bx,1 + mov ss,[grsegs+STARTTILE16M*2+bx] + shl si,1 + mov ds,[grsegs+STARTTILE16*2+si] + + xor si,si ;first word of tile data + +REPT 16 + mov ax,[si] ;background tile + and ax,[ss:si] ;mask + or ax,[ss:si+64] ;masked data + stosw + mov ax,[si+2] ;background tile + and ax,[ss:si+2] ;mask + or ax,[ss:si+66] ;masked data + stosw + add si,4 + add di,dx +ENDM + + mov ax,@DATA + mov ss,ax + sti + mov ds,ax + ret +ENDP + +ENDIF + + + +IFE GRMODE-EGAGR +;=========================================================================== +; +; EGA refresh routines +; +;=========================================================================== + +TILEWIDTH = 2 + +;================= +; +; RFL_NewTile +; +; Draws a composit two plane tile to the master screen and sets the update +; spot to 1 in both update pages, forcing the tile to be copied to the +; view pages the next two refreshes +; +; Called to draw newlly scrolled on strips and animating tiles +; +; Assumes write mode 0 +; +;================= + +PROC RFL_NewTile updateoffset:WORD +PUBLIC RFL_NewTile +USES SI,DI + +; +; mark both update lists at this spot +; + mov di,[updateoffset] + + mov bx,[updatestart] ;page 0 pointer + mov [BYTE bx+di],1 + mov bx,[updatestart+2] ;page 1 pointer + mov [BYTE bx+di],1 + +; +; set screenstartcs to the location in screenseg to draw the tile +; + shl di,1 + mov si,[updatemapofs+di] ;offset in map from origin + add si,[originmap] + mov di,[blockstarts+di] ;screen location for tile + add di,[masterofs] + mov [cs:screenstartcs],di + +; +; set BX to the foreground tile number and SI to the background number +; If either BX or SI = 0xFFFF, the tile does not need to be masked together +; as one of the planes totally eclipses the other +; + mov es,[mapsegs+2] ;foreground plane + mov bx,[es:si] + mov es,[mapsegs] ;background plane + mov si,[es:si] + + mov es,[screenseg] + mov dx,SC_INDEX ;for stepping through map mask planes + + or bx,bx + jz @@singletile + jmp @@maskeddraw ;draw both together + +;========= +; +; No foreground tile, so draw a single background tile. +; Use the master screen cache if possible +; +;========= +@@singletile: + + mov bx,SCREENWIDTH-2 ;add to get to start of next line + shl si,1 + +IFE CACHETILES + jmp @@singlemain +ENDIF + + mov ax,[tilecache+si] + or ax,ax + jz @@singlemain +;============= +; +; Draw single tile from cache +; +;============= + + mov si,ax + + mov ax,SC_MAPMASK + 15*256 ;all planes + WORDOUT + + mov dx,GC_INDEX + mov ax,GC_MODE + 1*256 ;write mode 1 + WORDOUT + + mov di,[cs:screenstartcs] + mov ds,[screenseg] + +REPT 15 + movsb + movsb + add si,bx + add di,bx +ENDM + movsb + movsb + + xor ah,ah ;write mode 0 + WORDOUT + + mov ax,ss + mov ds,ax ;restore turbo's data segment + ret + +;============= +; +; Draw single tile from main memory +; +;============= + +@@singlemain: + mov ax,[cs:screenstartcs] + mov [tilecache+si],ax ;next time it can be drawn from here with latch + mov ds,[grsegs+STARTTILE16*2+si] + + xor si,si ;block is segment aligned + + mov ax,SC_MAPMASK+0001b*256 ;map mask for plane 0 + + mov cx,4 ;draw four planes +@@planeloop: + mov dx,SC_INDEX + WORDOUT + + mov di,[cs:screenstartcs] ;start at same place in all planes + +REPT 15 + movsw + add di,bx +ENDM + movsw + + shl ah,1 ;shift plane mask over for next plane + loop @@planeloop + + mov ax,ss + mov ds,ax ;restore turbo's data segment + ret + + +;========= +; +; Draw a masked tile combo +; Interupts are disabled and the stack segment is reassigned +; +;========= +@@maskeddraw: + cli ; don't allow ints when SS is set + shl bx,1 + mov ss,[grsegs+STARTTILE16M*2+bx] + shl si,1 + mov ds,[grsegs+STARTTILE16*2+si] + + xor si,si ;first word of tile data + + mov ax,SC_MAPMASK+0001b*256 ;map mask for plane 0 + + mov di,[cs:screenstartcs] +@@planeloopm: + WORDOUT +tileofs = 0 +lineoffset = 0 +REPT 16 + mov bx,[si+tileofs] ;background tile + and bx,[ss:tileofs] ;mask + or bx,[ss:si+tileofs+32] ;masked data + mov [es:di+lineoffset],bx +tileofs = tileofs + 2 +lineoffset = lineoffset + SCREENWIDTH +ENDM + add si,32 + shl ah,1 ;shift plane mask over for next plane + cmp ah,10000b + je @@done ;drawn all four planes + jmp @@planeloopm + +@@done: + mov ax,@DATA + mov ss,ax + sti + mov ds,ax + ret +ENDP + +ENDIF + +IFE GRMODE-VGAGR +;============================================================================ +; +; VGA refresh routines +; +;============================================================================ + + +ENDIF + + +;============================================================================ +; +; reasonably common refresh routines +; +;============================================================================ + + +;================= +; +; RFL_UpdateTiles +; +; Scans through the update matrix pointed to by updateptr, looking for 1s. +; A 1 represents a tile that needs to be copied from the master screen to the +; current screen (a new row or an animated tiled). If more than one adjacent +; tile in a horizontal row needs to be copied, they will be copied as a group. +; +; Assumes write mode 1 +; +;================= + + +; AX 0/1 for scasb, temp for segment register transfers +; BX width for block copies +; CX REP counter +; DX line width deltas +; SI source for copies +; DI scas dest / movsb dest +; BP pointer to UPDATETERMINATE +; +; DS +; ES +; SS + +PROC RFL_UpdateTiles +PUBLIC RFL_UpdateTiles +USES SI,DI,BP + + jmp SHORT @@realstart +@@done: +; +; all tiles have been scanned +; + ret + +@@realstart: + mov di,[updateptr] + mov bp,(TILESWIDE+1)*TILESHIGH+1 + add bp,di ; when di = bx, all tiles have been scanned + push di + mov cx,-1 ; definately scan the entire thing + +; +; scan for a 1 in the update list, meaning a tile needs to be copied +; from the master screen to the current screen +; +@@findtile: + pop di ; place to continue scaning from + mov ax,ss + mov es,ax ; search in the data segment + mov ds,ax + mov al,1 + repne scasb + cmp di,bp + je @@done + + cmp [BYTE di],al + jne @@singletile + jmp @@tileblock + +;============ +; +; copy a single tile +; +;============ +EVEN +@@singletile: + inc di ; we know the next tile is nothing + push di ; save off the spot being scanned + sub di,[updateptr] + shl di,1 + mov di,[blockstarts-4+di] ; start of tile location on screen + mov si,di + add di,[bufferofs] ; dest in current screen + add si,[masterofs] ; source in master screen + + mov dx,SCREENWIDTH-TILEWIDTH + mov ax,[screenseg] + mov ds,ax + mov es,ax + +;-------------------------- + +IFE GRMODE-CGAGR + +REPT 15 + movsw + movsw + add si,dx + add di,dx +ENDM + movsw + movsw + +ENDIF + +;-------------------------- + +IFE GRMODE-EGAGR + +REPT 15 + movsb + movsb + add si,dx + add di,dx +ENDM + movsb + movsb + +ENDIF + +;-------------------------- + + jmp @@findtile + +;============ +; +; more than one tile in a row needs to be updated, so do it as a group +; +;============ +EVEN +@@tileblock: + mov dx,di ; hold starting position + 1 in dx + inc di ; we know the next tile also gets updated + repe scasb ; see how many more in a row + push di ; save off the spot being scanned + + mov bx,di + sub bx,dx ; number of tiles in a row + shl bx,1 ; number of bytes / row + + mov di,dx ; lookup position of start tile + sub di,[updateptr] + shl di,1 + mov di,[blockstarts-2+di] ; start of tile location + mov si,di + add di,[bufferofs] ; dest in current screen + add si,[masterofs] ; source in master screen + + mov dx,SCREENWIDTH + sub dx,bx ; offset to next line on screen +IFE GRMODE-CGAGR + sub dx,bx ; bx is words wide in CGA tiles +ENDIF + + mov ax,[screenseg] + mov ds,ax + mov es,ax + +REPT 15 + mov cx,bx +IFE GRMODE-CGAGR + rep movsw +ENDIF +IFE GRMODE-EGAGR + rep movsb +ENDIF + add si,dx + add di,dx +ENDM + mov cx,bx +IFE GRMODE-CGAGR + rep movsw +ENDIF +IFE GRMODE-EGAGR + rep movsb +ENDIF + + dec cx ; was 0 from last rep movsb, now $ffff for scasb + jmp @@findtile + +ENDP + + +;============================================================================ + + +;================= +; +; RFL_MaskForegroundTiles +; +; Scan through update looking for 3's. If the foreground tile there is a +; masked foreground tile, draw it to the screen +; +;================= + +PROC RFL_MaskForegroundTiles +PUBLIC RFL_MaskForegroundTiles +USES SI,DI,BP + jmp SHORT @@realstart +@@done: +; +; all tiles have been scanned +; + ret + +@@realstart: + mov di,[updateptr] + mov bp,(TILESWIDE+1)*TILESHIGH+2 + add bp,di ; when di = bx, all tiles have been scanned + push di + mov cx,-1 ; definately scan the entire thing +; +; scan for a 3 in the update list +; +@@findtile: + mov ax,ss + mov es,ax ; scan in the data segment + mov al,3 + pop di ; place to continue scaning from + repne scasb + cmp di,bp + je @@done + +;============ +; +; found a tile, see if it needs to be masked on +; +;============ + + push di + + sub di,[updateptr] + shl di,1 + mov si,[updatemapofs-2+di] ; offset from originmap + add si,[originmap] + + mov es,[mapsegs+2] ; foreground map plane segment + mov si,[es:si] ; foreground tile number + + or si,si + jz @@findtile ; 0 = no foreground tile + + mov bx,si + add bx,INTILE ;INTILE tile info table + mov es,[tinf] + test [BYTE PTR es:bx],80h ;high bit = masked tile + jz @@findtile + +;------------------- + +IFE GRMODE-CGAGR +;================= +; +; mask the tile CGA +; +;================= + + mov di,[blockstarts-2+di] + add di,[bufferofs] + mov es,[screenseg] + shl si,1 + mov ds,[grsegs+STARTTILE16M*2+si] + + mov bx,64 ;data starts 64 bytes after mask + + xor si,si + +lineoffset = 0 +REPT 16 + mov ax,[es:di+lineoffset] ;background + and ax,[si] ;mask + or ax,[si+bx] ;masked data + mov [es:di+lineoffset],ax ;background + inc si + inc si + mov ax,[es:di+lineoffset+2] ;background + and ax,[si] ;mask + or ax,[si+bx] ;masked data + mov [es:di+lineoffset+2],ax ;background + inc si + inc si +lineoffset = lineoffset + SCREENWIDTH +ENDM +ENDIF + +;------------------- + +IFE GRMODE-EGAGR +;================= +; +; mask the tile +; +;================= + + mov [BYTE planemask],1 + mov [BYTE planenum],0 + + mov di,[blockstarts-2+di] + add di,[bufferofs] + mov [cs:screenstartcs],di + mov es,[screenseg] + shl si,1 + mov ds,[grsegs+STARTTILE16M*2+si] + + mov bx,32 ;data starts 32 bytes after mask + +@@planeloopm: + mov dx,SC_INDEX + mov al,SC_MAPMASK + mov ah,[ss:planemask] + WORDOUT + mov dx,GC_INDEX + mov al,GC_READMAP + mov ah,[ss:planenum] + WORDOUT + + xor si,si + mov di,[cs:screenstartcs] +lineoffset = 0 +REPT 16 + mov cx,[es:di+lineoffset] ;background + and cx,[si] ;mask + or cx,[si+bx] ;masked data + inc si + inc si + mov [es:di+lineoffset],cx +lineoffset = lineoffset + SCREENWIDTH +ENDM + add bx,32 ;the mask is now further away + inc [ss:planenum] + shl [ss:planemask],1 ;shift plane mask over for next plane + cmp [ss:planemask],10000b ;done all four planes? + je @@drawn ;drawn all four planes + jmp @@planeloopm + +@@drawn: +ENDIF + +;------------------- + + mov ax,ss + mov ds,ax + mov cx,-1 ;definately scan the entire thing + + jmp @@findtile + +ENDP + + +END + +*/ diff --git a/src/lib/16_rf.h b/src/lib/16_rf.h new file mode 100755 index 00000000..7dff0b1f --- /dev/null +++ b/src/lib/16_rf.h @@ -0,0 +1,177 @@ +/* Keen Dreams Source Code + * Copyright (C) 2014 Javier M. Chavez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +// 16_RF.H + +#define __16_RF__ + +#ifndef __16_MM__ +#include "src/lib/16_mm.h" +#endif + +/* +============================================================================= + + CONSTANTS + +============================================================================= +*/ + +#define MINTICS 2 +#define MAXTICS 6 + +#define MAPBORDER 2 // map border must be at least 1 + +#define MAXSPRITES 100 // max tracked sprites +#define MAXANIMTILES 90 // max animating tiles on screen +#define MAXANIMTYPES 50 // max different unique anim tiles on map + +#define MAXMAPHEIGHT 128 + +#define PRIORITIES 4 +#define MASKEDTILEPRIORITY 3 // planes go: 0,1,2,MTILES,3 + +#define TILEGLOBAL 256 +#define PIXGLOBAL 16 + +#define G_T_SHIFT 8 // global >> ?? = tile +#define G_P_SHIFT 4 // global >> ?? = pixels +#define P_T_SHIFT 4 // pixels >> ?? = tile + +#define PORTTILESWIDE 21 // all drawing takes place inside a +#define PORTTILESHIGH 14 // non displayed port of this size + +//#define PORTGLOBALWIDE (21*TILEGLOBAL) +//#define PORTGLOBALHIGH (14*TILEGLOBAL) + +#define UPDATEWIDE (PORTTILESWIDE+1) +#define UPDATEHIGH PORTTILESHIGH + +//from others +#define SCREENWIDTH 64 +#define NUMTILE16 1440 +#define STARTTILE16 370 +#define STARTTILE16M 1810 +#define NUMTILE16M 1206 +#define SPEED 502 +#define ANIM (SPEED+NUMTILE16) + +#define NORTHWALL (ANIM+NUMTILE16) +#define EASTWALL (NORTHWALL+NUMTILE16M) +#define SOUTHWALL (EASTWALL+NUMTILE16M) +#define WESTWALL (SOUTHWALL+NUMTILE16M) +#define MANIM (WESTWALL+NUMTILE16M) +#define INTILE (MANIM+NUMTILE16M) +#define MSPEED (INTILE+NUMTILE16M) +#define CGAGR 1 +#define EGAGR 2 +#define MAXSHIFTS 1 +#define TILEWIDTH TILEWH +typedef enum {NOcard,MDAcard,CGAcard,EGAcard,MCGAcard,VGAcard, + HGCcard=0x80,HGCPcard,HICcard} cardtype; +typedef enum {CGAgr,EGAgr,VGAgr} grtype; +typedef struct +{ + int width, + height, + orgx,orgy, + xl,yl,xh,yh, + shifts; +} spritetabletype; + +typedef struct +{ + unsigned sourceoffset[MAXSHIFTS]; + unsigned planesize[MAXSHIFTS]; + unsigned width[MAXSHIFTS]; + byte data[]; +} spritetype; // the memptr for each sprite points to this +// + +//=========================================================================== + +typedef enum {spritedraw,maskdraw} drawtype; + +/* +============================================================================= + + PUBLIC VARIABLES + +============================================================================= +*/ + + +extern boolean compatability; // crippled refresh for wierdo SVGAs + +extern unsigned tics; +extern long lasttimecount; + +extern unsigned originxglobal,originyglobal; +extern unsigned originxtile,originytile; +extern unsigned originxscreen,originyscreen; + +extern unsigned mapwidth,mapheight,mapbyteswide,mapwordswide + ,mapbytesextra,mapwordsextra; +extern unsigned mapbwidthtable[MAXMAPHEIGHT]; + +extern unsigned originxmin,originxmax,originymin,originymax; + +extern unsigned masterofs; + +// +// the floating update window is also used by the view manager for +// double buffer tracking +// + +extern byte *updateptr; // current start of update window + +#if GRMODE == CGAGR +extern byte *baseupdateptr; +#endif + +extern unsigned blockstarts[UPDATEWIDE*UPDATEHIGH]; +extern unsigned updatemapofs[UPDATEWIDE*UPDATEHIGH]; +extern unsigned uwidthtable[UPDATEHIGH]; // lookup instead of multiple + +#define UPDATETERMINATE 0x0301 + +/* +============================================================================= + + PUBLIC FUNCTIONS + +============================================================================= +*/ + +void RF_Startup (void); +void RF_Shutdown (void); + +void RF_NewMap (void); +void RF_MarkTileGraphics (void); +void RF_NewPosition (unsigned x, unsigned y); +void RF_Scroll (int x, int y); + +void RF_PlaceSprite (void **user,unsigned globalx,unsigned globaly, + unsigned spritenumber, drawtype draw, int priority); +void RF_RemoveSprite (void **user); + +void RF_Refresh (void); +void RF_ForceRefresh (void); +void RF_SetRefreshHook (void (*func) (void) ); + + diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index 189c3cf4..c584f9d3 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -98,6 +98,8 @@ void print_anim_ids(struct sprite *spri) void animate_spri(entity_t *enti, video_t *video) { +#define INC_PER_FRAME if(enti->q&1) enti->persist_aniframe++; if(enti->persist_aniframe>4) enti->persist_aniframe = 1; + #define GVARVIDEO video #define VMEMPAGESIZE2 GVARVIDEO->page[0].pagesize+GVARVIDEO->page[1].pagesize #define VMEMPAGEDATA2 GVARVIDEO->page[2].data @@ -112,31 +114,25 @@ void animate_spri(entity_t *enti, video_t *video) //#define FRAME3 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 0, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR); //#define FRAME4 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 24, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR); stand switch(enti->spri->delay) -{ + { // Delay = 0 means that sprite should loop. Nothing to change here case 0: break; // Delay = 1 means that on next time unit sprite should be changed case 1: - if(enti->invq) enti->spri->curr_anim_spri++; - else enti->spri->curr_anim_spri--; -//printf("1[%u] %u", enti->invq, enti->spri->curr_anim_spri); + INC_PER_FRAME + enti->spri->curr_anim_spri++; + // If we hit the end of an animation sequence, restart it if(!( enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id)){ - //enti->spri->curr_anim_spri = 1; - enti->invq=!enti->invq; - if(enti->invq) enti->spri->curr_anim_spri+=2; - else if(enti->spri->curr_anim_spri) enti->spri->curr_anim_spri-=2; + enti->spri->curr_anim_spri = 0; enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id; -//printf(" enti->spri->curr_anim_spri=%u ", enti->spri->curr_anim_spri); } enti->spri->delay = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].delay; -//printf("\n"); -//break; + // Delay > 1 means that we should not change sprite yet. Decrease delay default: -//printf("2[%u] %u\n", enti->invq, enti->spri->curr_anim_spri); enti->spri->delay--; break; } diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 97a5f827..6f10530b 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -29,14 +29,45 @@ #include "src/lib/16_mm.h" #include "src/lib/16_ca.h" #include "src/lib/16_in.h" +#include "src/lib/testpatt.h" + +//VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 1); +//VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0); #define FUNCTIONKEYFUNCTIONS \ - if(IN_KeyDown(sc_F6)){ VL_ShowPage(&gvar.video.page[0], 0, 0); IN_UserInput(1,1); } \ - if(IN_KeyDown(sc_F7)){ VL_ShowPage(&gvar.video.page[0], 0, 1); IN_UserInput(1,1); } \ - if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1,1); } + if(IN_KeyDown(88)){ panswitch=!panswitch; IN_UserInput(1,1); } \ + FUNCTIONKEYFUNCTIONS0EXE + #define FUNCTIONKEYFUNCTIONS0EXE \ - if(IN_KeyDown(sc_F6)){ VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0); IN_UserInput(1,1); } \ - if(IN_KeyDown(sc_F7)){ VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 1); IN_UserInput(1,1); } + if(IN_KeyDown(87/*sc_F11*/)){ pageflipflop=!pageflipflop; IN_UserInput(1,1); } \ + if(IN_KeyDown(68/*sc_F10*/)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap; IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&mv, 0, 1); IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&mv, 0, 0); IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1,1); } + +//VL_ShowPage(page_t *page, boolean vsync, boolean sr) +#define PANKEYFUN \ + PANKEYFUNZC \ + FUNCTIONKEYDRAWJUNK + +#define PANKEYFUNZC \ + ZC_panPageManual(&mv, &player, 0); + +#define FUNCTIONKEYDRAWJUNK \ + if(IN_KeyDown(1+1)){ gvar.video.panp=0; ZC_ShowMV(&mv, 0, 0); } \ + if(IN_KeyDown(2+1)){ gvar.video.panp=1; ZC_ShowMV(&mv, 0, 0); } \ + if(IN_KeyDown(3+1)){ gvar.video.panp=2; ZC_ShowMV(&mv, 0, 1); } \ + if(IN_KeyDown(4+1)){ gvar.video.panp=3; ZC_ShowMV(&mv, 0, 1); } \ +\ + if(IN_KeyDown(sc_A)) modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 3); \ + if(IN_KeyDown(sc_S)) modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 4); \ +\ + if(IN_KeyDown(sc_Z)){ DRAWCORNERBOXES } \ + if(IN_KeyDown(sc_X)){ TESTBG12 } \ + if(IN_KeyDown(sc_C)){ TESTBG34 } \ + if(IN_KeyDown(sc_V)) VL_PatternDraw(&gvar.video, 0, 1, 1); void DebugMemory_(global_game_variables_t *gvar, boolean q); void Shutdown16(global_game_variables_t *gvar); diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 9ddb4581..730e7f96 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -141,14 +141,13 @@ typedef struct nibble pred; //prev. direction for animation changing word dire; //sprite in use nibble q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www - boolean invq; //animation inversing word speed; //entity speed! word spt; //speed per tile struct sprite *spri; // sprite used by entity sword hp; //hitpoints of the entity nibble overdraww, overdrawh; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. // if the sprite's edge pixels are clear anyway, you can set this to 0. - int persist_aniframe; // gonna be increased to 1 before being used, so 0 is ok for default + nibble /*int*/ persist_aniframe; // gonna be increased to 1 before being used, so 0 is ok for default } entity_t; //TODO: MAKE THIS WWWW @@ -262,6 +261,7 @@ typedef struct typedef struct { char old_mode; //old video mode before game! + byte palette[768]; //palette array page_t page[MAXPAGE]; //can be used as a pointer to root page[0] word vmem_remain; //remaining video memory byte num_of_pages; //number of actual pages @@ -269,15 +269,16 @@ typedef struct byte far * omemptr; byte vga_draw_stride; byte vga_draw_stride_limit; // further X clipping -// + //end of doslib origi vars boolean __near rss; //render sprite switch sword __near sprifilei; //player file's i boolean __near p; //render page number //BLEH - boolean __near r; //page flip if true + boolean __near r; //page flip, showpage, or render if true word pr[MAXPAGE][4]; //render sections of pages (this is supposed to be set up to draw sections of the screen if updated) - nibble sfip;//shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible. + nibble sfip; //shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible. nibble panp; //pan_t replacement + word vh; //video combined height //0000word startclk; float clk, tickclk; //timer //newer vars //TODO: find out how they are used diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index c3ecaa12..eda0f4d2 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -292,6 +292,7 @@ void modexHiganbanaPageSetup(video_t *video) modexCalcVmemRemain(video); video->p=0; video->r=1; + video->vh=video->page[0].height+video->page[1].height+video->page[2].height+video->page[3].height; //doslib origi var video->omemptr= vga_state.vga_graphics_ram; video->vga_draw_stride= vga_state.vga_draw_stride; @@ -339,8 +340,6 @@ modexShowPage(page_t *page) { outp(AC_INDEX, 0x33); outp(AC_INDEX, (page[0].dx & 0x03) << 1); } - -//another variant //args: page, vertical sync switch, screen resolution switch, page0 switch void VL_ShowPage(page_t *page, boolean vsync, boolean sr) { @@ -1260,6 +1259,56 @@ void modexcls(page_t *page, byte color, byte *Where) _fmemset(Where, color, page->width*(page->height)/4); } +// +// pattern filler from joncampbell123's code +// +void VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw) +{ + unsigned int i,j,o, d,h,s; + word w; + + switch(sw) + { + case 0: + w=vga_state.vga_width; + d=0; + s=vga_state.vga_stride; + switch(allsw) + { + case 0: + h=vga_state.vga_height; + break; + case 1: + h=video->vh; + break; + } + break; + default: + w=video->page[pn].width; + d=(0x10000UL - (uint16_t)video->page[pn].data); + s=video->page[pn].stridew; + switch(allsw) + { + case 0: + h=video->page[pn].height; + break; + case 1: + if(!pn) h=video->vh; + else h=video->page[pn].height; + break; + } + break; + } + + /* fill screen/pattern with a distinctive pattern */ + for (i=0;i < w;i++) { + o = (i >> 2) + d; + vga_write_sequencer(0x02/*map mask*/,1 << (i&3)); + for (j=0;j < h;j++,o += s) + vga_state.vga_graphics_ram[o] = (i^j)&15; // VRL samples put all colors in first 15! + } +} + void modexWaitBorder() { while(inp(INPUT_STATUS_1) & 8) { diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index 8a63781b..b79b86d8 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -103,7 +103,7 @@ page_t modexNextPage(page_t *p); page_t modexNextPageFlexibleSize(page_t *p, word x, word y); void modexCalcVmemRemain(video_t *video); void modexHiganbanaPageSetup(video_t *video); -void modexShowPage(page_t *page); +//void modexShowPage(page_t *page); void VL_ShowPage(page_t *page, boolean vsync, boolean sr); void modexPanPage(page_t *page, int dx, int dy); void modexSelectPlane(byte plane); @@ -168,6 +168,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons 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 VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw); void modexWaitBorder(); void modexprintmeminfo(video_t *v); diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index fba6fb05..e8ad461c 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -105,7 +105,7 @@ bitmapLoadPcx(char *filename, global_game_variables_t *gv) { file = fopen(filename, "rb"); if(!file) { printf("Could not open %s for reading.\n", filename); - exit(-2); + //exit(-2); } /* load the first part of the pcx file */ @@ -129,7 +129,7 @@ bitmapLoadPcx(char *filename, global_game_variables_t *gv) { if(!result.data) { fprintf(stderr, "Could not allocate memory for bitmap data."); fclose(file); - exit(-1); + //exit(-1); } /* read the buffer in */ diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 8d02cacd..b1d60d49 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -24,7 +24,7 @@ */ #include "src/lib/scroll16.h" -#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = 1; +//#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = 1; void ZC_walk(map_view_t *pip, player_t *player, word pn) { @@ -42,7 +42,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=2; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; ANIMATESPRIFUN(pip, player, pn, 2); ScrollRight(pip, player, 3, pn); ScrollRight(pip, player, 2, pn); @@ -56,7 +56,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=1; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; player[pn].enti.x+=(player[pn].enti.speed); ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; @@ -79,7 +79,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=2; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; ANIMATESPRIFUN(pip, player, pn, 2); ScrollLeft(pip, player, 3, pn); ScrollLeft(pip, player, 2, pn); @@ -93,7 +93,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=1; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; player[pn].enti.x-=(player[pn].enti.speed); ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; @@ -116,7 +116,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=2; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; ANIMATESPRIFUN(pip, player, pn, 2); ScrollDown(pip, player, 3, pn); ScrollDown(pip, player, 2, pn); @@ -130,7 +130,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=1; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; player[pn].enti.y+=(player[pn].enti.speed); ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; @@ -153,7 +153,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=2; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; ANIMATESPRIFUN(pip, player, pn, 2); ScrollUp(pip, player, 3, pn); ScrollUp(pip, player, 2, pn); @@ -167,7 +167,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) player[pn].walktype=1; if(player[pn].enti.q<=player[pn].enti.spt) { - INC_PER_FRAME; + //INC_PER_FRAME; player[pn].enti.y-=(player[pn].enti.speed); ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; @@ -186,203 +186,6 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) } -/* -src/lib/scroll16.c: mv[0].video->r=1; -src/lib/scroll16.c: mv[0].video->r=1; -src/lib/scroll16.c: mv[0].video->r=1; -src/lib/scroll16.c: mv[0].video->r=1; -src/lib/scroll16.c: pip->video->r=1; -src/lib/scroll16.c: mv->video->r=1; - */ - -void oldwalk(map_view_t *pip, player_t *player, word pn) -{ - //printf("player[%d].d=%d\n", pn, player[pn].enti.d); - switch(player[pn].enti.d) - { - //no direction - case 2: - //0000pip[0].video->startclk = (*clockw); - break; - //right movement - case 3: - //printf("pip[0].page->tilesw=%d ", pip[0].page->tilesw); printf("pip[0].page->tw=%d\n", pip[0].page->tw); - if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx && - !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY)) //collision detection! - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); - ScrollRight(pip, player, 3, pn); - ScrollRight(pip, player, 2, pn); - //mapScrollRight(pip, player, !(pip[0].video->p), pn); - mapScrollRight(pip, player, (pip[0].video->p), pn); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; } - } - else if(player[pn].enti.tx < pip[0].map->width && !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY)) - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - player[pn].enti.x+=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); -#ifdef SPRITE - modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR); -#else - modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 14); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.d = 2; - } - player[pn].enti.triggerx = player[pn].enti.tx+1; - player[pn].enti.triggery = player[pn].enti.ty; - break; - - //left movement - case 1: - if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx && - !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY)) //collision detection! - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); - ScrollLeft(pip, player, 3, pn); - ScrollLeft(pip, player, 2, pn); - //mapScrollLeft(pip, player, !(pip[0].video->p), pn); - mapScrollLeft(pip, player, (pip[0].video->p), pn); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; } - } - else if(player[pn].enti.tx > 1 && !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY)) - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - player[pn].enti.x-=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); -#ifdef SPRITE - modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR); -#else - modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 10); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.d = 2; - } - player[pn].enti.triggerx = player[pn].enti.tx-1; - player[pn].enti.triggery = player[pn].enti.ty; - break; - - //down movement - case 4: - if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny && - !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY)) //collision detection! - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); - ScrollDown(pip, player, 3, pn); - ScrollDown(pip, player, 2, pn); - //mapScrollDown(pip, player, !(pip[0].video->p), pn); - mapScrollDown(pip, player, (pip[0].video->p), pn); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; } - } - else if(player[pn].enti.ty < pip[0].map->height && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY)) - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - player[pn].enti.y+=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); -#ifdef SPRITE - modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR); -#else - modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 9); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.d = 2; - } - player[pn].enti.triggerx = player[pn].enti.tx; - player[pn].enti.triggery = player[pn].enti.ty+1; - break; - - //up movement - case 0: - if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny && - !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty-1 == TRIGGY)) //collision detection! - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); - ScrollUp(pip, player, 3, pn); - ScrollUp(pip, player, 2, pn); - //mapScrollUp(pip, player, !(pip[0].video->p), pn); - mapScrollUp(pip, player, (pip[0].video->p), pn); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; } - } - else if(player[pn].enti.ty > 1 && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty-1 == TRIGGY)) - { - if(player[pn].enti.q<=player[pn].enti.spt) - { - INC_PER_FRAME; - player[pn].enti.y-=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.q++; - } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32); -#ifdef SPRITE - modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR); -#else - modexClearRegion(pip[1].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 12); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].enti.d = 2; - } - player[pn].enti.triggerx = player[pn].enti.tx; - player[pn].enti.triggery = player[pn].enti.ty-1; - break; - } -} - //panning page void ZC_panPageManual(map_view_t *pip, player_t *player, word pn) { @@ -868,7 +671,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty) mapDrawWRow(&mv[0], tx-1, ty, py); i+=mv->map->width - tx; } - //if(!pageploop) + if(!pageploop) modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); // { // unsigned int k,j,o; @@ -906,7 +709,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) if(i==0) { //wwww - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 0); //currently the over scan color! + modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color! } else { @@ -919,7 +722,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) case 0: #endif #ifndef TILERENDER - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((dbg_mapdata[i])+1)); + if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((dbg_mapdata[i])+1)); //modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i])); #else modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); @@ -1024,13 +827,14 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) boolean pageflipflop = 1; boolean pageploop = 1; +boolean pagenorendermap = 0; /* sync */ void shinku(global_game_variables_t *gv) { word x = (0) + gv->video.page[/*!*/(gv->video.p)].dx; // follow the screen word y = (0) + gv->video.page[/*!*/(gv->video.p)].dy; // follow the screen - word col = 7, bgcol = 0, type = 1;//w = 64, h = 8, + word col = 2, bgcol = 1, type = 1;//w = 64, h = 8, //col7bgcol0 //byte o,o2,i; //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4); /* block copy to visible RAM from offscreen */ @@ -1044,9 +848,9 @@ void shinku(global_game_variables_t *gv) if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) { // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even - // though it should be. Instead it's NULL as a near pointer but contains a non-null + // though it should be. Instead it's NULL as a neAr pointer but contains a non-null // segment value, so testing against NULL doesn't work. It is initialized properly if - // you call start_timer() though which uses near malloc. Rather than fight with that, + // you call start_timer() though which uses neAr malloc. Rather than fight with that, // I decided it would be better to declare a temp buffer statically and sprintf to that. // // This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit. @@ -1074,19 +878,20 @@ void shinku(global_game_variables_t *gv) case 1: //turn this off if XT //modexWaitBorder(); - vga_wait_for_vsync(); + //vga_wait_for_vsync(); gv->kurokku.frames_per_second=60; break; } + //render!! if(pageflipflop){ - if(gv->video.r){ + if(gv->video.r ){//r=1 //vga_setup_wm1_block_copy(); //_fmemcpy((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize); //vga_restore_rm0wm0(); if(!pageploop) modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); - modexShowPage(&(gv->video.page[gv->video.p])); + VL_ShowPage(&(gv->video.page[gv->video.panp]), gv->kurokku.fpscap, 0);//VL_ShowPage(&(gv->video.page[gv->video.p]), gv->kurokku.fpscap, 0); if(!pageploop) gv->video.p=!gv->video.p; - gv->video.r=!gv->video.r; + gv->video.r =!gv->video.r ; //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2; } } @@ -1120,7 +925,7 @@ void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y) #define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+player[pn].enti.dire); #endif -void /*near*/ animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch) +void animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch) { sword x = player[pn].enti.x; sword y = player[pn].enti.y; @@ -1270,7 +1075,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr //draw sprite ZC_drawframe(pip, &player[pn].enti, x, y); -//if(player[pn].enti.q<4) delay(500); +//0000if(player[pn].enti.q<2) delay(200); pip->video->r=1; } @@ -1330,7 +1135,7 @@ void player_walk(player_t *player, map_view_t *map_v){ } } -void /*near*/ mapScroll(map_view_t *mv, player_t *player) +void mapScroll(map_view_t *mv, player_t *player) { //word x, y; /* coordinate for drawing */ int c = 1; diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 75f8eda3..9947c449 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -118,23 +118,14 @@ printf("\n\n");\ printf("pageflipflop=%u\n", pageflipflop);\ printf("\n"); -#define SHOWMVFUN ZC_ShowMV(&mv, 0, 0); -#define PANKEYFUN \ - ZC_panPageManual(&mv, &player, 0); \ - if(IN_KeyDown(1+1) || IN_KeyDown(sc_Z)){ gvar.video.panp=0; SHOWMVFUN; } \ - if(IN_KeyDown(2+1) || IN_KeyDown(sc_X)){ gvar.video.panp=1; SHOWMVFUN; } \ - if(IN_KeyDown(3+1) || IN_KeyDown(sc_C)){ gvar.video.panp=2; SHOWMVFUN; if(IN_KeyDown(sc_C)) modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); } \ - if(IN_KeyDown(4+1) || IN_KeyDown(sc_V)){ gvar.video.panp=3; SHOWMVFUN; if(IN_KeyDown(sc_V)) modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); } \ - if(IN_KeyDown(25)){ modexpdump(mv[1].page); modexShowPage(&(gvar.video.page[1])); IN_UserInput(1,1); } - -extern boolean pageflipflop, pageploop; +extern boolean pageflipflop, pageploop, pagenorendermap; extern char global_temp_status_text[512]; //map_t allocMap(int w, int h); //void initMap(map_t *map); void ZC_walk(map_view_t *pip, player_t *player, word pn); -void oldwalk(map_view_t *pip, player_t *player, word pn); +//void oldwalk(map_view_t *pip, player_t *player, word pn); void ZC_panPageManual(map_view_t *pip, player_t *player, word pn); void ZC_MVSetup(map_view_t *pip, map_t *map, global_game_variables_t *gv); void ZC_MVInit(map_view_t *pip, int tx, int ty); @@ -159,7 +150,7 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x); //void qclean(); void shinku(global_game_variables_t *gv); void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y); -void /*near*/ animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch); +void animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch); void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch); // Move an entity around. Should actually be in 16_entity @@ -169,97 +160,6 @@ boolean ZC_walk2(entity_t *ent, map_view_t *map_v); void walk_player(player_t *player, map_view_t *map_v); // Scroll map in one direction (assumed from player's movement) -void /*near*/ mapScroll(map_view_t *mv, player_t *player); +void mapScroll(map_view_t *mv, player_t *player); #endif /*__SCROLL16_H_*/ -//older zc_animate -//#define SPRITO -/*void near ZC_animatePlayer_(map_view_t *pip, player_t *player, word pn, sword scrollswitch) -{ - sword x = player[pn].enti.x; - sword y = player[pn].enti.y; - word dire=10; //direction - sword qq; //scroll offset - word ls = player[pn].enti.persist_aniframe; -#ifndef SPRITO - int i=0; -#endif - switch(scrollswitch) - { - case 0: - qq = 0; - break; - default: - qq = ((player[pn].enti.q)*(player[pn].enti.speed)); - break; - } -#ifdef SPRITE - x-=4; -#endif - y-=pip[0].map->tiles->tileHeight; - switch (player[pn].enti.d) - { - case 0: - //up - dire*=player[pn].enti.d+1; - y-=qq; - break; - case 3: - // right - dire*=(player[pn].enti.d-1); - x+=qq; - break; - case 2: - break; - case 4: - //down - dire*=(player[pn].enti.d-1); - y+=qq; - break; - case 1: - //left - dire*=(player[pn].enti.d+3); - x-=qq; - break; - } - - //setting xy position - player[pn].ent->spri->x = x; - player[pn].ent->spri->y = y; - -#ifndef SPRITO -//#define DRAWFRAME if (i == -1) return; oldanimate_spri(player[pn].ent->spri, pip->video) -#define DRAWFRAME if (i == -1) return; animate_spri(player[pn].ent->spri, pip->video) -#define NFRAME1 i = set_anim_by_id(player[pn].ent->spri, 2+dire); DRAWFRAME; -#define NFRAME2 i = set_anim_by_id(player[pn].ent->spri, 1+dire); DRAWFRAME; -#define NFRAME3 i = set_anim_by_id(player[pn].ent->spri, dire); DRAWFRAME; -#define NFRAME4 i = set_anim_by_id(player[pn].ent->spri, 2+dire); DRAWFRAME; -#else -#define NFRAME1 modexClearRegion(pip[(pip->video->p)].page, x, y, 16, 32, 2+dire); -#define NFRAME2 modexClearRegion(pip[(pip->video->p)].page, x, y, 16, 32, 1+dire); -#define NFRAME3 modexClearRegion(pip[(pip->video->p)].page, x, y, 16, 32, dire); -#define NFRAME4 modexClearRegion(pip[(pip->video->p)].page, x, y, 16, 32, 1+dire); -#endif - - switch(ls) - { - case 1: - NFRAME1 - break; - case 2: - NFRAME2 - break; - case 3: - NFRAME3 - break; - case 4: - NFRAME4 - break; - } - pip->video->r=1; -}*/ - -//modexDrawSpritePBufRegion -//modexDrawBmpPBufRegion -//#define PBUFSFUN modexDrawSpriteRegion -//#define PBUFBFUN modexDrawBmpRegion diff --git a/src/lib/testpatt.h b/src/lib/testpatt.h new file mode 100755 index 00000000..0b908618 --- /dev/null +++ b/src/lib/testpatt.h @@ -0,0 +1,94 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef __TESTPATT_H__ +#define __TESTPATT_H__ + +////corner markers +#define GVPO gvar.video.page[0] +#define GVPI gvar.video.page[1] +#define OW GVPO.width-16 +#define OH GVPO.height-16 +#define OE GVPO.sw +#define OJ GVPO.sh +#define IW GVPI.width-16 +#define IH GVPI.height-16 +#define IE GVPI.sw +#define IJ GVPI.sh +#define DCBO modexClearRegion(&GVPO +#define DCBI modexClearRegion(&GVPI + +#define DRAWOTHERCORNERBOX_TOPLEFT \ +DCBO, 0, 0, 16, 16, 0); \ +DCBO, 16, 16, 16, 16, 1); \ +DCBI, 0, 0, 16, 16, 8); \ +DCBI, 16, 16, 16, 16, 9); + +#define DRAWOTHERCORNERBOX_TOPRIGHT \ +DCBO, OW, 0, 16, 16, 2); \ +DCBO, OE, 16, 16, 16, 3); \ +DCBI, IW, 0, 16, 16, 10); \ +DCBI, IE, 16, 16, 16, 11); + +#define DRAWOTHERCORNERBOX_BOTTOMLEFT \ +DCBO, 0, OH, 16, 16, 4); \ +DCBO, 16, OJ, 16, 16, 5); \ +DCBI, 0, IH, 16, 16, 12); \ +DCBI, 16, IJ, 16, 16, 13); + +#define DRAWOTHERCORNERBOX_BOTTOMRIGHT \ +DCBO, OE, OJ, 16, 16, 6); \ +DCBO, OW, OH, 16, 16, 7); \ +DCBI, IE, IJ, 16, 16, 14);\ +DCBI, IW, IH, 16, 16, 15); + +#define DRAWCORNERBOXES \ +DRAWOTHERCORNERBOX_TOPLEFT; \ +DRAWOTHERCORNERBOX_TOPRIGHT; \ +DRAWOTHERCORNERBOX_BOTTOMLEFT; \ +DRAWOTHERCORNERBOX_BOTTOMRIGHT; + +#define TESTBG1 \ + modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15); \ + modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128); \ + modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); \ + modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); + +#define TESTBG2 \ + modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 20); \ + modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 133); \ + modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 47); \ + modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 133); + +#define TESTBG12 \ + TESTBG1 \ + TESTBG2 + +#define TESTBG34 \ + modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 45); \ + modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 47); + +#define TESTBG \ + TESTBG12 \ + TESTBG34 + +#endif diff --git a/src/scroll.c b/src/scroll.c index 9c532d51..7cfc3248 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -34,6 +34,7 @@ sword bakapee; //debugswitches boolean panswitch=0;//1 //extern boolean pageflipflop=1; +boolean pagenorendermap = 1; unsigned int i; //#ifdef FADE static word paloffset=0; @@ -166,7 +167,7 @@ void main(int argc, char *argv[]) if(!panswitch){ ZC_walk(&mv, &player, 0); }else{ - PANKEYFUN;//panPageManual(&mv, &player, 0); + PANKEYFUNZC;//panPageManual(&mv, &player, 0); //printf(" player[0].enti.q: %d", player[0].enti.q); printf(" player[0].d: %d\n", player[0].d); } @@ -197,25 +198,7 @@ void main(int argc, char *argv[]) #endif #endif //pan switch - if(IN_KeyDown(88)){panswitch=!panswitch; IN_UserInput(1,1);} //f12 - if(IN_KeyDown(87)) //f11 - { - pageflipflop=!pageflipflop; - IN_UserInput(1,1); -// VGAmodeX(0, 0, &gvar); -// IN_Shutdown(); -// __asm -// { -// mov ah,31h -// int 21h -// } - } - if(IN_KeyDown(68)) //f10 - { - gvar.kurokku.fpscap=!gvar.kurokku.fpscap; - IN_UserInput(1,1); - } - if(IN_KeyDown(67)) //f9 + if(IN_KeyDown(62)) //f3 { modexClearRegion(mv[1].page, 0, 0, mv[1].page->width, mv[1].page->height, 2); modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 3); @@ -230,7 +213,8 @@ void main(int argc, char *argv[]) modexDrawSprite(mv[0].page, 32+72, 16, (PCXBMPVAR)); } #endif - FUNCTIONKEYFUNCTIONS; + FUNCTIONKEYFUNCTIONS + FUNCTIONKEYDRAWJUNK if(IN_KeyDown(sc_L)){ modexClearRegion(&gvar.video.page[0], player[0].enti.x, player[0].enti.y, 16, 16, 1); } //9 diff --git a/src/tesuto.h b/src/tesuto.h index bcd211bc..54baf61a 100755 --- a/src/tesuto.h +++ b/src/tesuto.h @@ -1,6 +1,7 @@ #ifndef __TESUTO_H__ #define __TESUTO_H__ +#include "src/lib/testpatt.h" #include "src/lib/16_head.h" #include "src/lib/16_vl.h" #include "src/lib/16_in.h" @@ -10,67 +11,6 @@ #include #include -////corner markers -#define GVPO gvar.video.page[0] -#define GVPI gvar.video.page[1] -#define OW GVPO.width-16 -#define OH GVPO.height-16 -#define OE GVPO.sw -#define OJ GVPO.sh -#define IW GVPI.width-16 -#define IH GVPI.height-16 -#define IE GVPI.sw -#define IJ GVPI.sh -#define DCBO modexClearRegion(&GVPO -#define DCBI modexClearRegion(&GVPI - -#define DRAWOTHERCORNERBOX_TOPLEFT \ -DCBO, 0, 0, 16, 16, 0); \ -DCBO, 16, 16, 16, 16, 1); \ -DCBI, 0, 0, 16, 16, 8); \ -DCBI, 16, 16, 16, 16, 9); - -#define DRAWOTHERCORNERBOX_TOPRIGHT \ -DCBO, OW, 0, 16, 16, 2); \ -DCBO, OE, 16, 16, 16, 3); \ -DCBI, IW, 0, 16, 16, 10); \ -DCBI, IE, 16, 16, 16, 11); - -#define DRAWOTHERCORNERBOX_BOTTOMLEFT \ -DCBO, 0, OH, 16, 16, 4); \ -DCBO, 16, OJ, 16, 16, 5); \ -DCBI, 0, IH, 16, 16, 12); \ -DCBI, 16, IJ, 16, 16, 13); - -#define DRAWOTHERCORNERBOX_BOTTOMRIGHT \ -DCBO, OE, OJ, 16, 16, 6); \ -DCBO, OW, OH, 16, 16, 7); \ -DCBI, IE, IJ, 16, 16, 14);\ -DCBI, IW, IH, 16, 16, 15); - -#define DRAWCORNERBOXES \ -DRAWOTHERCORNERBOX_TOPLEFT; \ -DRAWOTHERCORNERBOX_TOPRIGHT; \ -DRAWOTHERCORNERBOX_BOTTOMLEFT; \ -DRAWOTHERCORNERBOX_BOTTOMRIGHT; \ - -#define TESTBG \ - modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 15); \ - modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 128); \ - modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42); \ - modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128); \ - modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); \ - modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); - -#define TESTBGFULL \ - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15); \ - modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128); \ - modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); \ - modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); \ - modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height); \ - modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); \ - modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); - typedef unsigned char far *VGA_RAM_PTR; //VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000); //unsigned char vga_stride = 80; // 80 x 4 = 320 for 320-pixel wide modes diff --git a/src/vrstest.c b/src/vrstest.c index 14baca18..fbc111df 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -29,6 +29,7 @@ #include "src/lib/16_mm.h" extern boolean dbg_nointest; +boolean panswitch; static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ static byte palette[768]; @@ -95,7 +96,7 @@ void main() i = set_anim_by_id((enti.spri), 31); if (i == -1) { - return; + printf("glitch!\n"); } enti.spri->x = TILEWH-4; enti.spri->y = TILEWH; @@ -141,7 +142,7 @@ void main() break; }*/ if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1,1); } //p -FUNCTIONKEYFUNCTIONS; +//FUNCTIONKEYFUNCTIONS; } VGAmodeX(0, 1, &gvar); MM_ShowMemory(&gvar); diff --git a/src/zcroll.c b/src/zcroll.c index 147555b8..a6b3bcc9 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -25,14 +25,14 @@ #include "src/lib/16render.h" #include "src/lib/16_dbg.h" -//bitmap_t p; static map_t map; map_view_t mv[4]; float t; -sword bakapee; + //debugswitches boolean panswitch=0,baka=0; //extern boolean pageflipflop=1; +boolean pagenorendermap = 1; //default: 0 unsigned int i; #ifdef FADE @@ -43,19 +43,39 @@ byte *gpal; byte *ptr; memptr pal; -bitmap_t *ptmpdata; +//bitmap_t *ptmpdata; + +#define FILENAME_1 "data/spri/chikyuu.vrs" +#define FILENAME_1P "data/spri/chikyuu.pal" +#define FILENAME_2 "data/spri/ptmp.vrs" +#define FILENAME_2P "data/spri/ptmp.pal" void main(int argc, char *argv[]) { static global_game_variables_t gvar; static player_t player[MaxPlayers]; - if(argv[1]) bakapee = atoi(argv[1]); - else bakapee = 1; + char *bakapee1,*bakapee1p; +// sword bakapee; +// if(argv[1]) bakapee = atoi(argv[1]); +// else bakapee = 1; Startup16(&gvar); gvar.video.panp=0; + bakapee1=malloc(64); + bakapee1p=malloc(64); + + if (argc < 2) { + //fprintf(stderr,"drawvrl \n palette file optional\n"); + bakapee1 = FILENAME_2; + bakapee1p = FILENAME_2P; + + }else{ + if(argv[1]) bakapee1 = argv[1]; + if(argv[2]) bakapee1p = argv[2]; + } + // OK, this one takes hellova time and needs to be done in farmalloc or MM_... //IN CA i think you use CAL_SetupGrFile but i do think we should work together on this part --sparky4 //player[0].ent = malloc(sizeof(entity_t)); @@ -70,8 +90,7 @@ void main(int argc, char *argv[]) // fprintf(stderr, "yay map loaded~~\n"); // data - read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].enti.spri->spritesheet); - PCXBMP = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite + read_vrs(&gvar, bakapee1, player[0].enti.spri->spritesheet); // input! IN_Default(0, &player,ctrl_Keyboard1); @@ -83,14 +102,16 @@ void main(int argc, char *argv[]) modexFadeOff(4, dpal); #endif - VGAmodeX(bakapee, 1, &gvar); + VGAmodeX(1/*bakapee*/, 1, &gvar); /* fix up the palette and everything */ #ifdef FADE modexPalBlack(); //reset the palette~ #endif - modexPalUpdate1(&PCXBMP->palette); -// CA_LoadFile("data/spri/chikyuu.pal", &pal, &gvar); + + /* load color palette */ + VL_LoadPalFile(bakapee1p, &gvar.video.palette); +// CA_LoadFile("data/spri/"BAKAPEEFILE1".pal", &pal, &gvar); // modexPalUpdate1(pal); #ifdef FADE gpal = modexNewPal(); @@ -149,10 +170,14 @@ void main(int argc, char *argv[]) if(!panswitch){ //ZC_walk2(player[0].ent, mv); ZC_walk(&mv, &player, 0); + }else{ + PANKEYFUNZC; + //printf(" player[0].enti.q: %d", player[0].enti.q); printf(" player[0].d: %d\n", player[0].d); } //the scripting stuff.... -/* if(((mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))] == 0) && IN_KeyDown(0x1C))||(player[0].tx == 5 && player[0].ty == 5)) + //if(((player[0].enti.triggerx == TRIGGX && player[0].enti.triggery == TRIGGY) && IN_KeyDown(0x1C))||(player[0].enti.tx == 5 && player[0].enti.ty == 5)) + if(((mv[0].map->data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))] == 0) && IN_KeyDown(0x1C))||(player[0].enti.tx == 5 && player[0].enti.ty == 5)) { short i; for(i=800; i>=400; i--) @@ -161,32 +186,13 @@ void main(int argc, char *argv[]) } nosound(); } - if(player[0].enti.q == (TILEWH/(player[0].speed))+1 && player[0].info.dir != 2 && (player[0].triggerx == 5 && player[0].triggery == 5)){ player[0].enti.hp--; } -*/ //debugging binds! - if(IN_KeyDown(2)){ modexShowPage(mv[0].page); gvar.video.panp=0; } - if(IN_KeyDown(25)){ modexpdump(mv[0].page); - IN_UserInput(1,1); - } //p + if(player[0].enti.q == (TILEWH/(player[0].enti.speed))+1 && player[0].info.dir != 2 && (player[0].enti.triggerx == 5 && player[0].enti.triggery == 5)){ player[0].enti.hp--; } + //debugging binds! if(IN_KeyDown(24)){ modexPalUpdate0(gpal); /*paloffset=0;*/ modexpdump(mv[0].page); IN_UserInput(1,1); } //o if(IN_KeyDown(22)){ modexPalUpdate0(gpal); } //u //pan switch - //if(IN_KeyDown(88)){panswitch=!panswitch; IN_UserInput(1,1);} //f12 - if(IN_KeyDown(87)) //f11 - { - pageflipflop=!pageflipflop; - IN_UserInput(1,1); - } - if(IN_KeyDown(68)) //f10 - { - gvar.kurokku.fpscap=!gvar.kurokku.fpscap; - IN_UserInput(1,1); - } - if(IN_KeyDown(67)) //f9 - { - modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 2); - } if(IN_KeyDown(66)) //f8 { // modexDrawSprite(mv[0].page, 16, 16, &p); @@ -202,12 +208,24 @@ void main(int argc, char *argv[]) break; } } - FUNCTIONKEYFUNCTIONS; + FUNCTIONKEYFUNCTIONS + FUNCTIONKEYDRAWJUNK if(IN_KeyDown(sc_L)){ modexClearRegion(&gvar.video.page[0], player[0].enti.x, player[0].enti.y, 16, 16, 1); } - if(IN_KeyDown(sc_J)){ read_vrs(&gvar, "data/spri/ptmp.vrs", player[0].enti.spri->spritesheet); *ptmpdata = bitmapLoadPcx("data/ptmp.pcx", &gvar); modexPalUpdate1(ptmpdata->palette); } - if(IN_KeyDown(sc_K)){ read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].enti.spri->spritesheet); PCXBMP = bitmapLoadPcx("data/chikyuu.pcx", &gvar); modexPalUpdate1(&PCXBMP->palette); } - - //9 + if(IN_KeyDown(sc_J) || IN_KeyDown(sc_K)) + { + if(IN_KeyDown(sc_J)) + { + bakapee1=FILENAME_1; + bakapee1p=FILENAME_1P; + } + if(IN_KeyDown(sc_K)) + { + bakapee1=FILENAME_2; + bakapee1p=FILENAME_2P; + } + read_vrs(&gvar, bakapee1, player[0].enti.spri->spritesheet); + VL_LoadPalFile(bakapee1p, &gvar.video.palette); + }//JK #ifdef FADE if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } #endif