From cad54ee4a9ec01767e23c9a2725037ccb40f3db8 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 16:45:50 +0100 Subject: [PATCH 1/7] SERIOUS Objectplace improvement. * Object number up/down is now assigned to ringslinger weapon next/prev. SO much nicer to use, especially since most people have that stuff bound to the scroll wheel. --- src/m_cheat.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/m_cheat.c b/src/m_cheat.c index 1c5f835cb..1c1b8c6aa 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -1165,23 +1165,17 @@ void OP_ObjectplaceMovement(player_t *player) if (player->pflags & PF_ATTACKDOWN) { // Are ANY objectplace buttons pressed? If no, remove flag. - if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_CAMRIGHT|BT_CAMLEFT))) + if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG))) player->pflags &= ~PF_ATTACKDOWN; // Do nothing. return; } - if (cmd->buttons & BT_CAMLEFT) - { + if (cmd->buttons & BT_WEAPONPREV) OP_CycleThings(-1); - player->pflags |= PF_ATTACKDOWN; - } - else if (cmd->buttons & BT_CAMRIGHT) - { + else if (cmd->buttons & BT_WEAPONNEXT) OP_CycleThings(1); - player->pflags |= PF_ATTACKDOWN; - } // Place an object and add it to the maplist if (cmd->buttons & BT_ATTACK) @@ -1264,7 +1258,7 @@ void Command_ObjectPlace_f(void) HU_DoCEcho(va(M_GetText( "\\\\\\\\\\\\\\\\\\\\\\\\\x82" " Objectplace Controls: \x80\\\\" - "Camera L/R: Cycle mapthings\\" + "Weapon L/R: Cycle mapthings\\" " Jump: Float up \\" " Spin: Float down \\" " Fire Ring: Place object \\"))); From a2560c52173d9df8d720d46b79cb09daefc3bde9 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 19:40:30 +0100 Subject: [PATCH 2/7] Some tweaks to the devmode overlay. * Plays nicely with showfps on - see http://imgur.com/a/7GzDM for the various cases. * Add PF_THOKKED to the flags in devmode DBG_DETAILED (as "TH"). --- src/screen.c | 5 +++-- src/st_stuff.c | 34 +++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/screen.c b/src/screen.c index 376586c5d..2e4f4256b 100644 --- a/src/screen.c +++ b/src/screen.c @@ -411,6 +411,7 @@ void SCR_DisplayTicRate(void) tic_t ontic = I_GetTime(); tic_t totaltics = 0; INT32 ticcntcolor = 0; + INT32 offs = (cv_debug ? 8 : 0); for (i = lasttic + 1; i < TICRATE+lasttic && i < ontic; ++i) fpsgraph[i % TICRATE] = false; @@ -424,9 +425,9 @@ void SCR_DisplayTicRate(void) if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP; else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP; - V_DrawString(vid.width-(24*vid.dupx), vid.height-(16*vid.dupy), + V_DrawString(vid.width-(24*vid.dupx), vid.height-((16-offs)*vid.dupy), V_YELLOWMAP|V_NOSCALESTART, "FPS"); - V_DrawString(vid.width-(40*vid.dupx), vid.height-( 8*vid.dupy), + V_DrawString(vid.width-((40+(4*offs))*vid.dupx), vid.height-(8*vid.dupy), ticcntcolor|V_NOSCALESTART, va("%02d/%02u", totaltics, TICRATE)); lasttic = ontic; diff --git a/src/st_stuff.c b/src/st_stuff.c index 43d2bd176..d45e005ba 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -546,19 +546,26 @@ static void ST_DrawNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 a static void ST_drawDebugInfo(void) { INT32 height = 192; + INT32 dist = 8; - if (!stplyr->mo) + if (!(stplyr->mo && cv_debug)) return; + if (cv_ticrate.value) + { + height -= 12; + dist >>= 1; + } + if (cv_debug & DBG_BASIC) { const fixed_t d = AngleFixed(stplyr->mo->angle); - V_DrawRightAlignedString(320, 168, V_MONOSPACE, va("X: %6d", stplyr->mo->x>>FRACBITS)); - V_DrawRightAlignedString(320, 176, V_MONOSPACE, va("Y: %6d", stplyr->mo->y>>FRACBITS)); - V_DrawRightAlignedString(320, 184, V_MONOSPACE, va("Z: %6d", stplyr->mo->z>>FRACBITS)); - V_DrawRightAlignedString(320, 192, V_MONOSPACE, va("A: %6d", FixedInt(d))); + V_DrawRightAlignedString(320, height - 24, V_MONOSPACE, va("X: %6d", stplyr->mo->x>>FRACBITS)); + V_DrawRightAlignedString(320, height - 16, V_MONOSPACE, va("Y: %6d", stplyr->mo->y>>FRACBITS)); + V_DrawRightAlignedString(320, height - 8, V_MONOSPACE, va("Z: %6d", stplyr->mo->z>>FRACBITS)); + V_DrawRightAlignedString(320, height, V_MONOSPACE, va("A: %6d", FixedInt(d))); - height = 152; + height -= (32+dist); } if (cv_debug & DBG_DETAILED) @@ -569,11 +576,12 @@ static void ST_drawDebugInfo(void) V_DrawRightAlignedString(320, height - 80, V_MONOSPACE, va("AIR: %4d, %3d", stplyr->powers[pw_underwater], stplyr->powers[pw_spacetime])); // Flags - V_DrawRightAlignedString(304-64, height - 72, V_MONOSPACE, "Flags:"); - V_DrawString(304-60, height - 72, (stplyr->jumping) ? V_GREENMAP : V_REDMAP, "JM"); - V_DrawString(304-40, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD"); - V_DrawString(304-20, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP"); - V_DrawString(304, height - 72, (stplyr->pflags & PF_STARTDASH) ? V_GREENMAP : V_REDMAP, "ST"); + V_DrawRightAlignedString(304-84, height - 72, V_MONOSPACE, "Flags:"); + V_DrawString(304-80, height - 72, (stplyr->jumping) ? V_GREENMAP : V_REDMAP, "JM"); + V_DrawString(304-60, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD"); + V_DrawString(304-40, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP"); + V_DrawString(304-20, height - 72, (stplyr->pflags & PF_STARTDASH) ? V_GREENMAP : V_REDMAP, "ST"); + V_DrawString(304, height - 72, (stplyr->pflags & PF_THOKKED) ? V_GREENMAP : V_REDMAP, "TH"); V_DrawRightAlignedString(320, height - 64, V_MONOSPACE, va("CEILZ: %6d", stplyr->mo->ceilingz>>FRACBITS)); V_DrawRightAlignedString(320, height - 56, V_MONOSPACE, va("FLOORZ: %6d", stplyr->mo->floorz>>FRACBITS)); @@ -587,7 +595,7 @@ static void ST_drawDebugInfo(void) V_DrawRightAlignedString(320, height - 8, V_MONOSPACE, va("MOMZ: %6d", stplyr->mo->momz>>FRACBITS)); V_DrawRightAlignedString(320, height, V_MONOSPACE, va("SPEED: %6d", stplyr->speed>>FRACBITS)); - height -= 120; + height -= (112+dist); } if (cv_debug & DBG_RANDOMIZER) // randomizer testing @@ -600,7 +608,7 @@ static void ST_drawDebugInfo(void) V_DrawRightAlignedString(320, height - 8, V_MONOSPACE, va("Seed: %08x", P_GetRandSeed())); V_DrawRightAlignedString(320, height, V_MONOSPACE, va("== : .%04d", peekres)); - height -= 32; + height -= (24+dist); } if (cv_debug & DBG_MEMORY) From 0d3ee9a109e3968dd1eb5bd71758ab5c2edaa338 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 20:14:23 +0100 Subject: [PATCH 3/7] Weapon rings are limited in how fast they can scroll, so I guess it's okay if objectplace is too - and makes it less awkward for people who do just use normal keys for weapon up/down for some reason. --- src/m_cheat.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/m_cheat.c b/src/m_cheat.c index 1c1b8c6aa..4c44d4b89 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -1165,7 +1165,7 @@ void OP_ObjectplaceMovement(player_t *player) if (player->pflags & PF_ATTACKDOWN) { // Are ANY objectplace buttons pressed? If no, remove flag. - if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG))) + if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_WEAPONNEXT|BT_WEAPONPREV))) player->pflags &= ~PF_ATTACKDOWN; // Do nothing. @@ -1173,9 +1173,16 @@ void OP_ObjectplaceMovement(player_t *player) } if (cmd->buttons & BT_WEAPONPREV) + { OP_CycleThings(-1); - else if (cmd->buttons & BT_WEAPONNEXT) + player->pflags |= PF_ATTACKDOWN; + } + + if (cmd->buttons & BT_WEAPONNEXT) + { OP_CycleThings(1); + player->pflags |= PF_ATTACKDOWN; + } // Place an object and add it to the maplist if (cmd->buttons & BT_ATTACK) From eb310cc9c7feaf06f69e991e630d8857129a536b Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 20:44:51 +0100 Subject: [PATCH 4/7] On MI's reccomendation, swapped FPS and %d/35's position so that only the description "FPS" moves. http://imgur.com/a/rQogE --- src/screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screen.c b/src/screen.c index 2e4f4256b..d00155785 100644 --- a/src/screen.c +++ b/src/screen.c @@ -425,9 +425,9 @@ void SCR_DisplayTicRate(void) if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP; else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP; - V_DrawString(vid.width-(24*vid.dupx), vid.height-((16-offs)*vid.dupy), + V_DrawString(vid.width-((24+(6*offs))*vid.dupx), vid.height-((16-offs)*vid.dupy), V_YELLOWMAP|V_NOSCALESTART, "FPS"); - V_DrawString(vid.width-((40+(4*offs))*vid.dupx), vid.height-(8*vid.dupy), + V_DrawString(vid.width-(40*vid.dupx), vid.height-(8*vid.dupy), ticcntcolor|V_NOSCALESTART, va("%02d/%02u", totaltics, TICRATE)); lasttic = ontic; From d318db3496c11ea75b62ce8b88b3e06d7ea2ee42 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 21:11:12 +0100 Subject: [PATCH 5/7] Minor offset adjustments. --- src/st_stuff.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index d45e005ba..67c3752b1 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -573,14 +573,14 @@ static void ST_drawDebugInfo(void) V_DrawRightAlignedString(320, height - 104, V_MONOSPACE, va("SHIELD: %5x", stplyr->powers[pw_shield])); V_DrawRightAlignedString(320, height - 96, V_MONOSPACE, va("SCALE: %5d%%", (stplyr->mo->scale*100)/FRACUNIT)); V_DrawRightAlignedString(320, height - 88, V_MONOSPACE, va("DASH: %3d/%3d", stplyr->dashspeed>>FRACBITS, stplyr->maxdash>>FRACBITS)); - V_DrawRightAlignedString(320, height - 80, V_MONOSPACE, va("AIR: %4d, %3d", stplyr->powers[pw_underwater], stplyr->powers[pw_spacetime])); + V_DrawRightAlignedString(320, height - 80, V_MONOSPACE, va("AIR:%4d, %3d", stplyr->powers[pw_underwater], stplyr->powers[pw_spacetime])); // Flags - V_DrawRightAlignedString(304-84, height - 72, V_MONOSPACE, "Flags:"); - V_DrawString(304-80, height - 72, (stplyr->jumping) ? V_GREENMAP : V_REDMAP, "JM"); - V_DrawString(304-60, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD"); - V_DrawString(304-40, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP"); - V_DrawString(304-20, height - 72, (stplyr->pflags & PF_STARTDASH) ? V_GREENMAP : V_REDMAP, "ST"); + V_DrawRightAlignedString(304-74, height - 72, V_MONOSPACE, "Flags:"); + V_DrawString(304-72, height - 72, (stplyr->jumping) ? V_GREENMAP : V_REDMAP, "JM"); + V_DrawString(304-54, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD"); + V_DrawString(304-36, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP"); + V_DrawString(304-18, height - 72, (stplyr->pflags & PF_STARTDASH) ? V_GREENMAP : V_REDMAP, "ST"); V_DrawString(304, height - 72, (stplyr->pflags & PF_THOKKED) ? V_GREENMAP : V_REDMAP, "TH"); V_DrawRightAlignedString(320, height - 64, V_MONOSPACE, va("CEILZ: %6d", stplyr->mo->ceilingz>>FRACBITS)); From 490cf0183ad8791649c3683312309767d76e6b57 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 30 Sep 2016 21:47:34 +0100 Subject: [PATCH 6/7] Fixed some mistaken assumptions I made about the devmode overlay, and replaced "Flags" with "PF" to 1) make it clearer what type of flags they are and 2) use less horiontal space --- src/st_stuff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 67c3752b1..626145847 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -573,10 +573,10 @@ static void ST_drawDebugInfo(void) V_DrawRightAlignedString(320, height - 104, V_MONOSPACE, va("SHIELD: %5x", stplyr->powers[pw_shield])); V_DrawRightAlignedString(320, height - 96, V_MONOSPACE, va("SCALE: %5d%%", (stplyr->mo->scale*100)/FRACUNIT)); V_DrawRightAlignedString(320, height - 88, V_MONOSPACE, va("DASH: %3d/%3d", stplyr->dashspeed>>FRACBITS, stplyr->maxdash>>FRACBITS)); - V_DrawRightAlignedString(320, height - 80, V_MONOSPACE, va("AIR:%4d, %3d", stplyr->powers[pw_underwater], stplyr->powers[pw_spacetime])); + V_DrawRightAlignedString(320, height - 80, V_MONOSPACE, va("AIR: %4d, %3d", stplyr->powers[pw_underwater], stplyr->powers[pw_spacetime])); // Flags - V_DrawRightAlignedString(304-74, height - 72, V_MONOSPACE, "Flags:"); + V_DrawRightAlignedString(304-74, height - 72, V_MONOSPACE, "PF:"); V_DrawString(304-72, height - 72, (stplyr->jumping) ? V_GREENMAP : V_REDMAP, "JM"); V_DrawString(304-54, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD"); V_DrawString(304-36, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP"); @@ -613,7 +613,7 @@ static void ST_drawDebugInfo(void) if (cv_debug & DBG_MEMORY) { - V_DrawRightAlignedString(320, height, V_MONOSPACE, va("Heap used: %7sKB", sizeu1(Z_TagsUsage(0, INT32_MAX)>>10))); + V_DrawRightAlignedString(320, height, V_MONOSPACE, va("Heap: %7sKB", sizeu1(Z_TagsUsage(0, INT32_MAX)>>10))); } } From e390598e133815efed008b99651349a78e8fb607 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 23 Oct 2016 14:35:35 +0100 Subject: [PATCH 7/7] Fix objectplace controls text so it displays "Weapon Next/Prev" --- src/m_cheat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/m_cheat.c b/src/m_cheat.c index 4c44d4b89..9086236c3 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -1265,10 +1265,10 @@ void Command_ObjectPlace_f(void) HU_DoCEcho(va(M_GetText( "\\\\\\\\\\\\\\\\\\\\\\\\\x82" " Objectplace Controls: \x80\\\\" - "Weapon L/R: Cycle mapthings\\" - " Jump: Float up \\" - " Spin: Float down \\" - " Fire Ring: Place object \\"))); + "Weapon Next/Prev: Cycle mapthings\\" + " Jump: Float up \\" + " Spin: Float down \\" + " Fire Ring: Place object \\"))); } // Save all the player's data.