From 6854ba96cbb436d52b8baaf251c57f1fa33226fa Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 27 Feb 2017 20:37:11 -0600 Subject: [PATCH] ====----==== reverted undid what i did today ==== --- src/exmmtest.c | 9 -- src/lib/16_dbg.c | 213 +-------------------------------------------- src/lib/16_dbg.h | 4 - src/lib/16_in.c | 16 ---- src/lib/16_in.h | 2 - src/lib/scroll16.c | 1 - 6 files changed, 2 insertions(+), 243 deletions(-) diff --git a/src/exmmtest.c b/src/exmmtest.c index 881a1356..b6efd4eb 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -221,15 +221,6 @@ PRINTBB; printf("\n\npress any key to continue!\n"); getch(); printf("press any key to continue!\n"); getch(); #endif #endif //filereadload - -/* -#ifdef __WATCOMC__ - IN_Shutdown(&gvar); - ShapeTest (&gvar); - IN_Startup(&gvar); -#endif -*/ - DebugMemory_(&gvar, 1); MM_DumpData(&gvar); MM_Report_(&gvar); diff --git a/src/lib/16_dbg.c b/src/lib/16_dbg.c index 576f492b..bfa55a53 100755 --- a/src/lib/16_dbg.c +++ b/src/lib/16_dbg.c @@ -17,7 +17,7 @@ boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0,dbg_nointest=0; boolean dbg_maptext=0; byte *dbg_mapdata; #endif -#endif //debug +#endif #ifdef __WATCOMC__ // TODO: Could we also provide a build mode to emit debug to the "Bochs E9 hack?" @@ -91,214 +91,5 @@ void _DEBUGF(const char *fmt,...) { _DEBUG(_DEBUGF_TMP); va_end(va); } -#endif //serial #endif //watcomc -/* -================ -= -= ShapeTest -= -================ -*/ - -#pragma warn -pia -void ShapeTest (global_game_variables_t *gvar) -{ -extern word NumDigi; -extern word _seg *DigiList; -static char buf[10]; - - boolean done; - ScanCode scan; - int i,j; -// dword l; word k,x; - memptr addr; - PageListStruct far *page; - -// CenterWindow(20,16); -// VW_UpdateScreen(); - for (i = 0,done = false;!done;) - { -// US_ClearWindow(); -// sound = -1; - - page = &(gvar->pm.PMPages[i]); -// US_Print(" Page #"); -// US_PrintUnsigned(i); - printf(" Page #%u", i); - if (i < (gvar->pm.fi.PMSpriteStart)) -// US_Print(" (Wall)"); - printf(" (Wall)"); -/* else if (i < (gvar->pm.fi.PMSoundStart)) -// US_Print(" (Sprite)"); - printf(" (Sprite)"); - else if (i == (gvar->pm.fi.ChunksInFile - 1)) -// US_Print(" (Sound Info)"); - printf(" (Sound Info)"); - else -// US_Print(" (Sound)"); - printf(" (Sound)");*/ - -// US_Print("\n XMS: "); - printf("\n XMS: "); - if (page->xmsPage != -1) -// US_PrintUnsigned(page->xmsPage); - printf("%u", page->xmsPage); - else -// US_Print("No"); - printf("No"); - -// US_Print("\n Main: "); - if (page->mainPage != -1) -// US_PrintUnsigned(page->mainPage); - printf("\n Main: %u", page->mainPage); - else if (page->emsPage != -1) - { -// US_Print("EMS "); -// US_PrintUnsigned(page->emsPage); - printf("EMS %u", page->emsPage); - } - else -// US_Print("No"); - printf("No"); - -// US_Print("\n Last hit: "); -// US_PrintUnsigned(page->lastHit); - printf("\n Last hit: %u", page->lastHit); - -// US_Print("\n Address: "); - printf("\n Address: "); - addr = PM_GetPageAddress(i, gvar); - sprintf(buf,"0x%04x",(word)addr); -// US_Print(buf); - printf("%s", buf); - - if (addr) - { -/* if (i < PMSpriteStart) - { - // - // draw the wall - // - bufferofs += 32*SCREENWIDTH; - postx = 128; - postwidth = 1; - postsource = ((long)((unsigned)addr))<<16; - for (x=0;x<64;x++,postx++,postsource+=64) - { - wallheight[postx] = 256; - FarScalePost (); - } - bufferofs -= 32*SCREENWIDTH; - } - else if (i < PMSoundStart) - { - // - // draw the sprite - // - bufferofs += 32*SCREENWIDTH; - SimpleScaleShape (160, i-PMSpriteStart, 64); - bufferofs -= 32*SCREENWIDTH; - } - else if (i == ChunksInFile - 1) - { - US_Print("\n\n Number of sounds: "); - US_PrintUnsigned(NumDigi); - for (l = j = k = 0;j < NumDigi;j++) - { - l += DigiList[(j * 2) + 1]; - k += (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize; - } - US_Print("\n Total bytes: "); - US_PrintUnsigned(l); - US_Print("\n Total pages: "); - US_PrintUnsigned(k); - } - else - { - byte far *dp = (byte far *)MK_FP(addr,0); - for (j = 0;j < NumDigi;j++) - { - k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize; - if - ( - (i >= PMSoundStart + DigiList[j * 2]) - && (i < PMSoundStart + DigiList[j * 2] + k) - ) - break; - } - if (j < NumDigi) - { -// sound = j; - US_Print("\n Sound #"); - US_PrintUnsigned(j); - US_Print("\n Segment #"); - US_PrintUnsigned(i - PMSoundStart - DigiList[j * 2]); - } - for (j = 0;j < page->length;j += 32) - { - byte v = dp[j]; - int v2 = (unsigned)v; - v2 -= 128; - v2 /= 4; - if (v2 < 0) - VWB_Vlin(WindowY + WindowH - 32 + v2, - WindowY + WindowH - 32, - WindowX + 8 + (j / 32),BLACK); - else - VWB_Vlin(WindowY + WindowH - 32, - WindowY + WindowH - 32 + v2, - WindowX + 8 + (j / 32),BLACK); - } - }*/ - printf("\naddr ok\n"); - } - -// VW_UpdateScreen(); - -// while (!(scan = IN_GetLastScan())) - scan = *IN_GetScanName(scan); -// SD_Poll(); - - IN_ClearKey(scan); - switch (scan) - { - case sc_LeftArrow: - if (i) - i--; - break; - case sc_RightArrow: - if (++i >= (gvar->pm.fi.ChunksInFile)) - i--; - break; - case sc_W: // Walls - i = 0; - break; - case sc_S: // Sprites -// i = (gvar->pm.fi.PMSpriteStart); - break; - case sc_D: // Digitized -// i = (gvar->pm.fi.PMSoundStart); - break; - case sc_I: // Digitized info - i = (gvar->pm.fi.ChunksInFile - 1); - break; - case sc_L: // Load all pages - for (j = 0;j < (gvar->pm.fi.ChunksInFile);j++) - PM_GetPage(j, gvar); - break; - case sc_P: -// if (sound != -1) -// SD_PlayDigitized(sound); - break; - case sc_Escape: - done = true; - break; - case sc_Enter: - PM_GetPage(i, gvar); - break; - } - } - //SD_StopDigitized(); -} -#pragma warn +pia +#endif diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index 3d7ef4af..5340313a 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -3,7 +3,6 @@ #define _SRC_LIB_16_DBG #include "src/lib/16_head.h" -#include "src/lib/16_pm.h" #include "src/lib/16_tdef.h" #define __DEBUG__ @@ -54,7 +53,4 @@ static inline int _DEBUG_INIT() { } # endif #endif //watcomc - -void ShapeTest (global_game_variables_t *gvar); - #endif // _SRC_LIB_16_DBG diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 44c6aac1..8d17c37f 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -501,17 +501,11 @@ IN_GetJoyButtonsDB(word joy) static void INL_StartKbd() { - byte far *lock_key; INL_KeyHook = 0; // Clear key hook IN_ClearKeysDown(); OldKeyVect = _dos_getvect(KeyInt); - - // turn off num-lock via BIOS - lock_key = MK_FP(0x040, 0x017); // Pointing to the address of the bios shift state keys - *lock_key&=(~(16 | 32 | 64)); // toggle off the locks by changing the values of the 4th, 5th, and 6th bits of the address byte of 0040:0017 - OldKeyVect(); // call BIOS keyhandler to change keyboard lights _dos_setvect(KeyInt,INL_KeyService); } @@ -1281,13 +1275,3 @@ boolean IN_qb(byte kee) if(inpu.Keyboard[kee]==true) return 1; else return 0; } - -ScanCode IN_GetLastScan() -{ - return inpu.LastScan; -} - -ScanCode IN_GetCurCode() -{ - return inst.CurCode; -} diff --git a/src/lib/16_in.h b/src/lib/16_in.h index b56e9f46..9bcec258 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -302,7 +302,5 @@ extern boolean IN_UserInput(dword delay,boolean clear); extern boolean IN_KeyDown(byte code); extern void IN_ClearKey(byte code); extern boolean IN_qb(byte kee); -extern ScanCode IN_GetLastScan(); -extern ScanCode IN_GetCurCode(); #endif diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 5ba59ca5..b4523474 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -741,7 +741,6 @@ void shinku(global_game_variables_t *gv) gv->video.dorender =!gv->video.dorender ; //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2; } -//++++ PM_NextFrame(gv); } void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn) -- 2.39.5