From 73a472de65a1c0c533737e848467052c6194cdc9 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 10:34:39 +0200 Subject: [PATCH 01/23] Updated Crispy Hud Raw Version of Crispy Hud --- src/heretic/sb_bar.c | 47 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 426509613..b85f812f2 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1051,20 +1051,48 @@ void DrawInventoryBar(void) void DrawFullScreenStuff(void) { - const char *patch; + const char *patch; int i; int x; int temp; - UpdateState |= I_FULLSCRN; - if (CPlayer->mo->health > 0) + + + //[noseey] add Ammo, Jewels, Armor to fullscreen stuff + //TODO Do not always render, only if update needed + temp = CPlayer->mo->health; + if (temp > 0) { - DrBNumber(CPlayer->mo->health, 5, 180); + DrINumber(temp, 5 - WIDESCREENDELTA, 185); } else { - DrBNumber(0, 5, 180); + DrINumber(0, 5 - WIDESCREENDELTA, 185); } + // Ammo + temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; + if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) + { + V_DrawPatch(50 - WIDESCREENDELTA, 183, + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), + PU_CACHE)); + DrINumber(temp, 72 - WIDESCREENDELTA, 185); + } + // Keys + if (CPlayer->keys[key_yellow]) + { + V_DrawPatch(180 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_green]) + { + V_DrawPatch(192 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_blue]) + { + V_DrawPatch(204 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + } + // Armor + DrINumber(CPlayer->armorpoints, 240 + WIDESCREENDELTA, 185); if (deathmatch) { temp = 0; @@ -1075,16 +1103,16 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 45, 185); + DrINumber(temp, 45 - WIDESCREENDELTA, 185); } if (!inventory) { if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); + V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307 + WIDESCREENDELTA, 192); } } else @@ -1116,6 +1144,7 @@ void DrawFullScreenStuff(void) PatchINVRTGEM1 : PatchINVRTGEM2); } } + UpdateState |= I_FULLSCRN; } //-------------------------------------------------------------------------- From e127a8f96f0a6fbe9f7a6fd03000aae208d73c30 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 11:36:28 +0200 Subject: [PATCH 02/23] Alignment Keys and Armor in Fullscreen Hud Alignment Keys and Armor in Fullscreen Hud --- src/heretic/sb_bar.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index b85f812f2..ae502a2ae 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1056,8 +1056,6 @@ void DrawFullScreenStuff(void) int x; int temp; - - //[noseey] add Ammo, Jewels, Armor to fullscreen stuff //TODO Do not always render, only if update needed temp = CPlayer->mo->health; @@ -1081,18 +1079,18 @@ void DrawFullScreenStuff(void) // Keys if (CPlayer->keys[key_yellow]) { - V_DrawPatch(180 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + V_DrawPatch(193 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); } if (CPlayer->keys[key_green]) { - V_DrawPatch(192 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + V_DrawPatch(205 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); } if (CPlayer->keys[key_blue]) { - V_DrawPatch(204 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + V_DrawPatch(217 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); } // Armor - DrINumber(CPlayer->armorpoints, 240 + WIDESCREENDELTA, 185); + DrINumber(CPlayer->armorpoints, 250 + WIDESCREENDELTA, 185); if (deathmatch) { temp = 0; From 8d6057ff80687edc442ba24630e12b4ae9a7f25c Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 11:38:52 +0200 Subject: [PATCH 03/23] Update Comment Update Comment --- src/heretic/sb_bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index ae502a2ae..d79888862 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1056,7 +1056,7 @@ void DrawFullScreenStuff(void) int x; int temp; - //[noseey] add Ammo, Jewels, Armor to fullscreen stuff + //[crispy] add Ammo, Jewels, Armor to fullscreen stuff //TODO Do not always render, only if update needed temp = CPlayer->mo->health; if (temp > 0) From 542d3a7845a957ea90807ec021e8a3f6dcbec792 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 14:39:08 +0200 Subject: [PATCH 04/23] Expanding Screenblocks to 12 Expanding Screenblocks to 12. --- .cproject | 71 ++++++++++ .project | 34 +++++ .settings/language.settings.xml | 15 ++ .settings/org.eclipse.cdt.core.prefs | 6 + opl/.cproject | 16 +++ opl/.project | 20 +++ pcsound/.cproject | 16 +++ pcsound/.project | 20 +++ src/.cproject | 16 +++ src/.project | 20 +++ src/doom/.cproject | 16 +++ src/doom/.project | 20 +++ src/heretic/.cproject | 16 +++ src/heretic/.project | 20 +++ src/heretic/mn_menu.c | 6 +- src/heretic/r_main.c | 2 +- src/heretic/sb_bar.c | 203 ++++++++++++++++++--------- src/hexen/.cproject | 16 +++ src/hexen/.project | 20 +++ src/setup/.cproject | 16 +++ src/setup/.project | 20 +++ src/strife/.cproject | 16 +++ src/strife/.project | 20 +++ textscreen/.cproject | 16 +++ textscreen/.project | 20 +++ 25 files changed, 589 insertions(+), 72 deletions(-) create mode 100644 .cproject create mode 100644 .project create mode 100644 .settings/language.settings.xml create mode 100644 .settings/org.eclipse.cdt.core.prefs create mode 100644 opl/.cproject create mode 100644 opl/.project create mode 100644 pcsound/.cproject create mode 100644 pcsound/.project create mode 100644 src/.cproject create mode 100644 src/.project create mode 100644 src/doom/.cproject create mode 100644 src/doom/.project create mode 100644 src/heretic/.cproject create mode 100644 src/heretic/.project create mode 100644 src/hexen/.cproject create mode 100644 src/hexen/.project create mode 100644 src/setup/.cproject create mode 100644 src/setup/.project create mode 100644 src/strife/.cproject create mode 100644 src/strife/.project create mode 100644 textscreen/.cproject create mode 100644 textscreen/.project diff --git a/.cproject b/.cproject new file mode 100644 index 000000000..0775d1691 --- /dev/null +++ b/.cproject @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 000000000..01af95f60 --- /dev/null +++ b/.project @@ -0,0 +1,34 @@ + + + crispy-doom + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml new file mode 100644 index 000000000..975fa8f57 --- /dev/null +++ b/.settings/language.settings.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 000000000..c8ec5df2d --- /dev/null +++ b/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,6 @@ +doxygen/doxygen_new_line_after_brief=true +doxygen/doxygen_use_brief_tag=false +doxygen/doxygen_use_javadoc_tags=true +doxygen/doxygen_use_pre_tag=false +doxygen/doxygen_use_structural_commands=false +eclipse.preferences.version=1 diff --git a/opl/.cproject b/opl/.cproject new file mode 100644 index 000000000..a5bbb4658 --- /dev/null +++ b/opl/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opl/.project b/opl/.project new file mode 100644 index 000000000..939521b15 --- /dev/null +++ b/opl/.project @@ -0,0 +1,20 @@ + + + opl + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/pcsound/.cproject b/pcsound/.cproject new file mode 100644 index 000000000..7e048b1a3 --- /dev/null +++ b/pcsound/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pcsound/.project b/pcsound/.project new file mode 100644 index 000000000..99c94db44 --- /dev/null +++ b/pcsound/.project @@ -0,0 +1,20 @@ + + + pcsound + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/.cproject b/src/.cproject new file mode 100644 index 000000000..3e5c5119d --- /dev/null +++ b/src/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/.project b/src/.project new file mode 100644 index 000000000..468ec4016 --- /dev/null +++ b/src/.project @@ -0,0 +1,20 @@ + + + src + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/doom/.cproject b/src/doom/.cproject new file mode 100644 index 000000000..620aa2ce7 --- /dev/null +++ b/src/doom/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/doom/.project b/src/doom/.project new file mode 100644 index 000000000..6574e7b41 --- /dev/null +++ b/src/doom/.project @@ -0,0 +1,20 @@ + + + doom + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/heretic/.cproject b/src/heretic/.cproject new file mode 100644 index 000000000..620aa2ce7 --- /dev/null +++ b/src/heretic/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/heretic/.project b/src/heretic/.project new file mode 100644 index 000000000..d77ed1848 --- /dev/null +++ b/src/heretic/.project @@ -0,0 +1,20 @@ + + + heretic + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 0ae7d94ae..1a3ab6161 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -1125,7 +1125,7 @@ static void DrawOptionsMenu(void) static void DrawOptions2Menu(void) { - DrawSlider(&Options2Menu, 1, 9, screenblocks - 3); + DrawSlider(&Options2Menu, 1, 9, (screenblocks < 12 ? screenblocks : 11) - 3); DrawSlider(&Options2Menu, 3, 16, snd_MaxVolume); DrawSlider(&Options2Menu, 5, 16, snd_MusicVolume); } @@ -1531,7 +1531,7 @@ static boolean SCScreenSize(int option) { if (option == RIGHT_DIR) { - if (screenblocks < 11) + if (screenblocks < 12) { screenblocks++; } @@ -1540,7 +1540,7 @@ static boolean SCScreenSize(int option) { screenblocks--; } - R_SetViewSize(screenblocks, detailLevel); + R_SetViewSize((screenblocks < 12 ? screenblocks : 11), detailLevel); return true; } diff --git a/src/heretic/r_main.c b/src/heretic/r_main.c index 4846eefb2..561e50165 100644 --- a/src/heretic/r_main.c +++ b/src/heretic/r_main.c @@ -840,7 +840,7 @@ void R_Init(void) R_InitTables(); // viewwidth / viewheight / detailLevel are set by the defaults printf ("."); - R_SetViewSize(screenblocks, detailLevel); + R_SetViewSize((screenblocks < 12 ? screenblocks : 11), detailLevel); //tprintf("R_InitPlanes\n", 0); R_InitPlanes(); printf ("."); diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index d79888862..fe40d7fb0 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1056,93 +1056,160 @@ void DrawFullScreenStuff(void) int x; int temp; - //[crispy] add Ammo, Jewels, Armor to fullscreen stuff - //TODO Do not always render, only if update needed - temp = CPlayer->mo->health; - if (temp > 0) - { - DrINumber(temp, 5 - WIDESCREENDELTA, 185); - } - else - { - DrINumber(0, 5 - WIDESCREENDELTA, 185); - } - // Ammo - temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; - if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) - { - V_DrawPatch(50 - WIDESCREENDELTA, 183, - W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), - PU_CACHE)); - DrINumber(temp, 72 - WIDESCREENDELTA, 185); - } - // Keys - if (CPlayer->keys[key_yellow]) - { - V_DrawPatch(193 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_green]) - { - V_DrawPatch(205 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_blue]) - { - V_DrawPatch(217 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); - } - // Armor - DrINumber(CPlayer->armorpoints, 250 + WIDESCREENDELTA, 185); - if (deathmatch) + UpdateState |= I_FULLSCRN; + + if (screenblocks == 12) { - temp = 0; - for (i = 0; i < MAXPLAYERS; i++) + // [crispy] Crispy Hud + // TODO Do not always render, only if update needed + temp = CPlayer->mo->health; + if (temp > 0) + { + DrINumber(temp, 3 - WIDESCREENDELTA, 185); + } + else + { + DrINumber(0, 3 - WIDESCREENDELTA, 185); + } + // Ammo + temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; + if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) + { + V_DrawPatch(50 - WIDESCREENDELTA, 183, + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), + PU_CACHE)); + DrINumber(temp, 72 - WIDESCREENDELTA, 185); + } + // Keys + if (CPlayer->keys[key_yellow]) + { + V_DrawPatch(193 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_green]) + { + V_DrawPatch(205 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_blue]) + { + V_DrawPatch(217 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + } + // Armor + DrINumber(CPlayer->armorpoints, 250 + WIDESCREENDELTA, 185); + if (deathmatch) { - if (playeringame[i]) + temp = 0; + for (i = 0; i < MAXPLAYERS; i++) { - temp += CPlayer->frags[i]; + if (playeringame[i]) + { + temp += CPlayer->frags[i]; + } } + DrINumber(temp, 45 - WIDESCREENDELTA, 185); } - DrINumber(temp, 45 - WIDESCREENDELTA, 185); - } - if (!inventory) - { - if (CPlayer->readyArtifact > 0) + if (!inventory) + { + if (CPlayer->readyArtifact > 0) + { + patch = DEH_String(patcharti[CPlayer->readyArtifact]); + V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 300 + WIDESCREENDELTA, 192); + } + } + else { - patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307 + WIDESCREENDELTA, 192); + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawAltTLPatch(50 + i * 31, 168, + W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); + V_DrawPatch(50 + i * 31, 168, + W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, + 190); + } + } + V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(269, 167, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } } } else { - x = inv_ptr - curpos; - for (i = 0; i < 7; i++) + // [crispy] Regular Fullscreen Hud + if (CPlayer->mo->health > 0) + { + DrBNumber(CPlayer->mo->health, 5, 180); + } + else + { + DrBNumber(0, 5, 180); + } + if (deathmatch) { - V_DrawAltTLPatch(50 + i * 31, 168, - W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i - && CPlayer->inventory[x + i].type != arti_none) + temp = 0; + for (i = 0; i < MAXPLAYERS; i++) { - patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 168, - W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 190); + if (playeringame[i]) + { + temp += CPlayer->frags[i]; + } } + DrINumber(temp, 45, 185); } - V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); - if (x != 0) + if (!inventory) { - V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : - PatchINVLFGEM2); + if (CPlayer->readyArtifact > 0) + { + patch = DEH_String(patcharti[CPlayer->readyArtifact]); + V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); + } } - if (CPlayer->inventorySlotNum - x > 7) + else { - V_DrawPatch(269, 167, !(leveltime & 4) ? - PatchINVRTGEM1 : PatchINVRTGEM2); + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawAltTLPatch(50 + i * 31, 168, + W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); + V_DrawPatch(50 + i * 31, 168, + W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, + 190); + } + } + V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(269, 167, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } } } - UpdateState |= I_FULLSCRN; } //-------------------------------------------------------------------------- diff --git a/src/hexen/.cproject b/src/hexen/.cproject new file mode 100644 index 000000000..b12d417b4 --- /dev/null +++ b/src/hexen/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/hexen/.project b/src/hexen/.project new file mode 100644 index 000000000..dafd18066 --- /dev/null +++ b/src/hexen/.project @@ -0,0 +1,20 @@ + + + hexen + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/setup/.cproject b/src/setup/.cproject new file mode 100644 index 000000000..620aa2ce7 --- /dev/null +++ b/src/setup/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/setup/.project b/src/setup/.project new file mode 100644 index 000000000..192161377 --- /dev/null +++ b/src/setup/.project @@ -0,0 +1,20 @@ + + + setup + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/src/strife/.cproject b/src/strife/.cproject new file mode 100644 index 000000000..a3fbfa410 --- /dev/null +++ b/src/strife/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/strife/.project b/src/strife/.project new file mode 100644 index 000000000..8fc70ffd0 --- /dev/null +++ b/src/strife/.project @@ -0,0 +1,20 @@ + + + strife + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + diff --git a/textscreen/.cproject b/textscreen/.cproject new file mode 100644 index 000000000..e9ddafb72 --- /dev/null +++ b/textscreen/.cproject @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/textscreen/.project b/textscreen/.project new file mode 100644 index 000000000..bf2016456 --- /dev/null +++ b/textscreen/.project @@ -0,0 +1,20 @@ + + + textscreen + + + + + + org.eclipse.cdt.core.cBuilder + clean,full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.cmake.core.cmakeNature + + From 52d2fa77890ddf6028b58d299363636fa42af8d8 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 14:50:29 +0200 Subject: [PATCH 05/23] Removal of unnecessary files. Removal of unnecessary files. --- .cproject | 71 ---------------------------- .settings/language.settings.xml | 15 ------ .settings/org.eclipse.cdt.core.prefs | 6 --- opl/.cproject | 16 ------- opl/.project | 20 -------- pcsound/.cproject | 16 ------- pcsound/.project | 20 -------- src/.cproject | 16 ------- src/.project | 20 -------- src/doom/.cproject | 16 ------- src/doom/.project | 20 -------- src/heretic/.cproject | 16 ------- src/heretic/.project | 20 -------- src/hexen/.cproject | 16 ------- src/hexen/.project | 20 -------- src/setup/.cproject | 16 ------- src/setup/.project | 20 -------- src/strife/.cproject | 16 ------- src/strife/.project | 20 -------- textscreen/.cproject | 16 ------- textscreen/.project | 20 -------- 21 files changed, 416 deletions(-) delete mode 100644 .cproject delete mode 100644 .settings/language.settings.xml delete mode 100644 .settings/org.eclipse.cdt.core.prefs delete mode 100644 opl/.cproject delete mode 100644 opl/.project delete mode 100644 pcsound/.cproject delete mode 100644 pcsound/.project delete mode 100644 src/.cproject delete mode 100644 src/.project delete mode 100644 src/doom/.cproject delete mode 100644 src/doom/.project delete mode 100644 src/heretic/.cproject delete mode 100644 src/heretic/.project delete mode 100644 src/hexen/.cproject delete mode 100644 src/hexen/.project delete mode 100644 src/setup/.cproject delete mode 100644 src/setup/.project delete mode 100644 src/strife/.cproject delete mode 100644 src/strife/.project delete mode 100644 textscreen/.cproject delete mode 100644 textscreen/.project diff --git a/.cproject b/.cproject deleted file mode 100644 index 0775d1691..000000000 --- a/.cproject +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml deleted file mode 100644 index 975fa8f57..000000000 --- a/.settings/language.settings.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs deleted file mode 100644 index c8ec5df2d..000000000 --- a/.settings/org.eclipse.cdt.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -doxygen/doxygen_new_line_after_brief=true -doxygen/doxygen_use_brief_tag=false -doxygen/doxygen_use_javadoc_tags=true -doxygen/doxygen_use_pre_tag=false -doxygen/doxygen_use_structural_commands=false -eclipse.preferences.version=1 diff --git a/opl/.cproject b/opl/.cproject deleted file mode 100644 index a5bbb4658..000000000 --- a/opl/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opl/.project b/opl/.project deleted file mode 100644 index 939521b15..000000000 --- a/opl/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - opl - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/pcsound/.cproject b/pcsound/.cproject deleted file mode 100644 index 7e048b1a3..000000000 --- a/pcsound/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pcsound/.project b/pcsound/.project deleted file mode 100644 index 99c94db44..000000000 --- a/pcsound/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - pcsound - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/.cproject b/src/.cproject deleted file mode 100644 index 3e5c5119d..000000000 --- a/src/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.project b/src/.project deleted file mode 100644 index 468ec4016..000000000 --- a/src/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - src - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/doom/.cproject b/src/doom/.cproject deleted file mode 100644 index 620aa2ce7..000000000 --- a/src/doom/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/doom/.project b/src/doom/.project deleted file mode 100644 index 6574e7b41..000000000 --- a/src/doom/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - doom - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/heretic/.cproject b/src/heretic/.cproject deleted file mode 100644 index 620aa2ce7..000000000 --- a/src/heretic/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/heretic/.project b/src/heretic/.project deleted file mode 100644 index d77ed1848..000000000 --- a/src/heretic/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - heretic - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/hexen/.cproject b/src/hexen/.cproject deleted file mode 100644 index b12d417b4..000000000 --- a/src/hexen/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hexen/.project b/src/hexen/.project deleted file mode 100644 index dafd18066..000000000 --- a/src/hexen/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - hexen - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/setup/.cproject b/src/setup/.cproject deleted file mode 100644 index 620aa2ce7..000000000 --- a/src/setup/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/setup/.project b/src/setup/.project deleted file mode 100644 index 192161377..000000000 --- a/src/setup/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - setup - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/src/strife/.cproject b/src/strife/.cproject deleted file mode 100644 index a3fbfa410..000000000 --- a/src/strife/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/strife/.project b/src/strife/.project deleted file mode 100644 index 8fc70ffd0..000000000 --- a/src/strife/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - strife - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - diff --git a/textscreen/.cproject b/textscreen/.cproject deleted file mode 100644 index e9ddafb72..000000000 --- a/textscreen/.cproject +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/textscreen/.project b/textscreen/.project deleted file mode 100644 index bf2016456..000000000 --- a/textscreen/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - textscreen - - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - - From afb88d5caf7b42745550f317fa014598a19762c9 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 26 Oct 2024 14:56:48 +0200 Subject: [PATCH 06/23] Delete .project --- .project | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 .project diff --git a/.project b/.project deleted file mode 100644 index 01af95f60..000000000 --- a/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - crispy-doom - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.core.cBuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.cmake.core.cmakeNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - From 3ffe50603c3502c54ed5a6558719c82a50d78a82 Mon Sep 17 00:00:00 2001 From: Noseey Date: Wed, 30 Oct 2024 22:16:44 +0100 Subject: [PATCH 07/23] Conservative Crispy Hud Conservative Crispy Hud with moved jewels between Item and Ammo, height of widgets from the original hud. --- src/heretic/sb_bar.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index fe40d7fb0..4d06b2f47 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1065,36 +1065,36 @@ void DrawFullScreenStuff(void) temp = CPlayer->mo->health; if (temp > 0) { - DrINumber(temp, 3 - WIDESCREENDELTA, 185); + DrINumber(temp, 5 - WIDESCREENDELTA, 170); } else { - DrINumber(0, 3 - WIDESCREENDELTA, 185); + DrINumber(0, 5 - WIDESCREENDELTA, 170); } // Ammo temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) { - V_DrawPatch(50 - WIDESCREENDELTA, 183, - W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), + V_DrawPatch(55 - WIDESCREENDELTA, 172, + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), //delta to Number is 2 PU_CACHE)); - DrINumber(temp, 72 - WIDESCREENDELTA, 185); + DrINumber(temp, 53 - WIDESCREENDELTA, 162); //delta to Health is 48 } // Keys if (CPlayer->keys[key_yellow]) { - V_DrawPatch(193 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + V_DrawPatch(272 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); } if (CPlayer->keys[key_green]) { - V_DrawPatch(205 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + V_DrawPatch(272 + WIDESCREENDELTA, 172, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); } if (CPlayer->keys[key_blue]) { - V_DrawPatch(217 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + V_DrawPatch(272 + WIDESCREENDELTA, 180, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); } // Armor - DrINumber(CPlayer->armorpoints, 250 + WIDESCREENDELTA, 185); + DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 170); if (deathmatch) { temp = 0; @@ -1112,9 +1112,9 @@ void DrawFullScreenStuff(void) if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 300 + WIDESCREENDELTA, 192); + //V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(240 + WIDESCREENDELTA, 160, W_CacheLumpName(patch, PU_CACHE)); //delta to Armor is 46 + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); //delta to Patch is 22 } } else From 84bac45eceec877aacba0c2ef345c0385bf2f8fd Mon Sep 17 00:00:00 2001 From: Noseey Date: Fri, 1 Nov 2024 14:07:35 +0100 Subject: [PATCH 08/23] Adjusted Jewels Adjusted Jewels with original spacing to item --- src/heretic/sb_bar.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 4d06b2f47..63b52a09b 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1083,15 +1083,15 @@ void DrawFullScreenStuff(void) // Keys if (CPlayer->keys[key_yellow]) { - V_DrawPatch(272 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); //delta to Icon is 26 } if (CPlayer->keys[key_green]) { - V_DrawPatch(272 + WIDESCREENDELTA, 172, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 172, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); } if (CPlayer->keys[key_blue]) { - V_DrawPatch(272 + WIDESCREENDELTA, 180, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 180, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); } // Armor DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 170); @@ -1107,6 +1107,36 @@ void DrawFullScreenStuff(void) } DrINumber(temp, 45 - WIDESCREENDELTA, 185); } + + +// // Ready artifact +// if (ArtifactFlash) +// { +// V_DrawPatch(180, 161, PatchBLACKSQ); +// +// temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; +// +// V_DrawPatch(182, 161, W_CacheLumpNum(temp, PU_CACHE)); +// ArtifactFlash--; +// //oldarti = -1; // so that the correct artifact fills in after the flash +// //UpdateState |= I_STATBAR; +// } +// else if (oldarti != CPlayer->readyArtifact +// || oldartiCount != CPlayer->inventory[inv_ptr].count) +// { +// V_DrawPatch(180, 161, PatchBLACKSQ); +// if (CPlayer->readyArtifact > 0) +// { +// V_DrawPatch(179, 160, +// W_CacheLumpName(DEH_String(patcharti[CPlayer->readyArtifact]), +// PU_CACHE)); +// DrSmallNumber(CPlayer->inventory[inv_ptr].count, 201, 182); +// } +// //oldarti = CPlayer->readyArtifact; +// //oldartiCount = CPlayer->inventory[inv_ptr].count; +// //UpdateState |= I_STATBAR; +// } + if (!inventory) { if (CPlayer->readyArtifact > 0) From 89f1d63715ba1aab8876a23737b9d364c3769e18 Mon Sep 17 00:00:00 2001 From: Noseey Date: Fri, 1 Nov 2024 15:50:01 +0100 Subject: [PATCH 09/23] Update sb_bar.c to fix height of item selector Update sb_bar.c to fix height of item selector --- src/heretic/sb_bar.c | 93 +++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 27 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 63b52a09b..3636e73d3 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1108,38 +1108,77 @@ void DrawFullScreenStuff(void) DrINumber(temp, 45 - WIDESCREENDELTA, 185); } - -// // Ready artifact -// if (ArtifactFlash) +// if (!inventory) // { -// V_DrawPatch(180, 161, PatchBLACKSQ); +// // Ready artifact +// if (ArtifactFlash) +// { +// V_DrawPatch(180, 161, PatchBLACKSQ); // -// temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; +// temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; // -// V_DrawPatch(182, 161, W_CacheLumpNum(temp, PU_CACHE)); -// ArtifactFlash--; -// //oldarti = -1; // so that the correct artifact fills in after the flash -// //UpdateState |= I_STATBAR; +// V_DrawPatch(255, 161, W_CacheLumpNum(temp, PU_CACHE)); +// ArtifactFlash--; +// //oldarti = -1; // so that the correct artifact fills in after the flash +// //UpdateState |= I_STATBAR; +// } +// else if (oldarti != CPlayer->readyArtifact +// || oldartiCount != CPlayer->inventory[inv_ptr].count) +// { +// V_DrawPatch(180, 161, PatchBLACKSQ); +// if (CPlayer->readyArtifact > 0) +// { +// V_DrawPatch(240 + WIDESCREENDELTA, 160, +// W_CacheLumpName(DEH_String(patcharti[CPlayer->readyArtifact]), +// PU_CACHE)); +// DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); //delta to Patch is 22 +// } +// //oldarti = CPlayer->readyArtifact; +// //oldartiCount = CPlayer->inventory[inv_ptr].count; +// //UpdateState |= I_STATBAR; +// } // } -// else if (oldarti != CPlayer->readyArtifact -// || oldartiCount != CPlayer->inventory[inv_ptr].count) +// else // { -// V_DrawPatch(180, 161, PatchBLACKSQ); -// if (CPlayer->readyArtifact > 0) +// x = inv_ptr - curpos; +// //UpdateState |= I_STATBAR; +// V_DrawPatch(34, 160, PatchINVBAR); +// for (i = 0; i < 7; i++) // { -// V_DrawPatch(179, 160, -// W_CacheLumpName(DEH_String(patcharti[CPlayer->readyArtifact]), -// PU_CACHE)); -// DrSmallNumber(CPlayer->inventory[inv_ptr].count, 201, 182); +// //V_DrawPatch(50+i*31, 160, W_CacheLumpName("ARTIBOX", PU_CACHE)); +// if (CPlayer->inventorySlotNum > x + i +// && CPlayer->inventory[x + i].type != arti_none) +// { +// patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); +// +// V_DrawPatch(50 + i * 31, 160, W_CacheLumpName(patch, PU_CACHE)); +// DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, 182); +// } +// } +// V_DrawPatch(50 + curpos * 31, 189, PatchSELECTBOX); +// if (x != 0) +// { +// V_DrawPatch(38, 159, !(leveltime & 4) ? PatchINVLFGEM1 : +// PatchINVLFGEM2); +// } +// if (CPlayer->inventorySlotNum - x > 7) +// { +// V_DrawPatch(269, 159, !(leveltime & 4) ? +// PatchINVRTGEM1 : PatchINVRTGEM2); // } -// //oldarti = CPlayer->readyArtifact; -// //oldartiCount = CPlayer->inventory[inv_ptr].count; -// //UpdateState |= I_STATBAR; // } if (!inventory) { - if (CPlayer->readyArtifact > 0) + if (ArtifactFlash) + { + temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; + V_DrawPatch(243 + WIDESCREENDELTA, 161, W_CacheLumpNum(temp, PU_CACHE)); + ArtifactFlash--; + //oldarti = -1; // so that the correct artifact fills in after the flash + //UpdateState |= I_STATBAR; + } + else if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); //V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); @@ -1152,27 +1191,27 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawAltTLPatch(50 + i * 31, 168, + V_DrawAltTLPatch(50 + i * 31, 160, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 168, + V_DrawPatch(50 + i * 31, 160, W_CacheLumpName(patch, PU_CACHE)); DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 190); + 182); } } - V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 189, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(38, 159, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(269, 167, !(leveltime & 4) ? + V_DrawPatch(269, 159, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } From 98ddb00547c791ed8f557c7f683c7f8eab15f4e3 Mon Sep 17 00:00:00 2001 From: Noseey Date: Fri, 1 Nov 2024 16:03:07 +0100 Subject: [PATCH 10/23] Update sb_bar.c Cleanup comments and use non-transparent patch for item selector background. --- src/heretic/sb_bar.c | 79 +++++--------------------------------------- 1 file changed, 8 insertions(+), 71 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 3636e73d3..021f2b5d7 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1076,14 +1076,14 @@ void DrawFullScreenStuff(void) if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) { V_DrawPatch(55 - WIDESCREENDELTA, 172, - W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), //delta to Number is 2 + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), PU_CACHE)); - DrINumber(temp, 53 - WIDESCREENDELTA, 162); //delta to Health is 48 + DrINumber(temp, 53 - WIDESCREENDELTA, 162); } // Keys if (CPlayer->keys[key_yellow]) { - V_DrawPatch(214 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); //delta to Icon is 26 + V_DrawPatch(214 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); } if (CPlayer->keys[key_green]) { @@ -1107,67 +1107,6 @@ void DrawFullScreenStuff(void) } DrINumber(temp, 45 - WIDESCREENDELTA, 185); } - -// if (!inventory) -// { -// // Ready artifact -// if (ArtifactFlash) -// { -// V_DrawPatch(180, 161, PatchBLACKSQ); -// -// temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; -// -// V_DrawPatch(255, 161, W_CacheLumpNum(temp, PU_CACHE)); -// ArtifactFlash--; -// //oldarti = -1; // so that the correct artifact fills in after the flash -// //UpdateState |= I_STATBAR; -// } -// else if (oldarti != CPlayer->readyArtifact -// || oldartiCount != CPlayer->inventory[inv_ptr].count) -// { -// V_DrawPatch(180, 161, PatchBLACKSQ); -// if (CPlayer->readyArtifact > 0) -// { -// V_DrawPatch(240 + WIDESCREENDELTA, 160, -// W_CacheLumpName(DEH_String(patcharti[CPlayer->readyArtifact]), -// PU_CACHE)); -// DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); //delta to Patch is 22 -// } -// //oldarti = CPlayer->readyArtifact; -// //oldartiCount = CPlayer->inventory[inv_ptr].count; -// //UpdateState |= I_STATBAR; -// } -// } -// else -// { -// x = inv_ptr - curpos; -// //UpdateState |= I_STATBAR; -// V_DrawPatch(34, 160, PatchINVBAR); -// for (i = 0; i < 7; i++) -// { -// //V_DrawPatch(50+i*31, 160, W_CacheLumpName("ARTIBOX", PU_CACHE)); -// if (CPlayer->inventorySlotNum > x + i -// && CPlayer->inventory[x + i].type != arti_none) -// { -// patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); -// -// V_DrawPatch(50 + i * 31, 160, W_CacheLumpName(patch, PU_CACHE)); -// DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, 182); -// } -// } -// V_DrawPatch(50 + curpos * 31, 189, PatchSELECTBOX); -// if (x != 0) -// { -// V_DrawPatch(38, 159, !(leveltime & 4) ? PatchINVLFGEM1 : -// PatchINVLFGEM2); -// } -// if (CPlayer->inventorySlotNum - x > 7) -// { -// V_DrawPatch(269, 159, !(leveltime & 4) ? -// PatchINVRTGEM1 : PatchINVRTGEM2); -// } -// } - if (!inventory) { if (ArtifactFlash) @@ -1175,15 +1114,12 @@ void DrawFullScreenStuff(void) temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; V_DrawPatch(243 + WIDESCREENDELTA, 161, W_CacheLumpNum(temp, PU_CACHE)); ArtifactFlash--; - //oldarti = -1; // so that the correct artifact fills in after the flash - //UpdateState |= I_STATBAR; } else if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - //V_DrawAltTLPatch(286 + WIDESCREENDELTA, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(240 + WIDESCREENDELTA, 160, W_CacheLumpName(patch, PU_CACHE)); //delta to Armor is 46 - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); //delta to Patch is 22 + V_DrawPatch(240 + WIDESCREENDELTA, 160, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); } } else @@ -1191,8 +1127,9 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawAltTLPatch(50 + i * 31, 160, + V_DrawPatch(50 + i * 31, 160, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { @@ -1218,7 +1155,7 @@ void DrawFullScreenStuff(void) } else { - // [crispy] Regular Fullscreen Hud + // [crispy] Vanilla Fullscreen Hud if (CPlayer->mo->health > 0) { DrBNumber(CPlayer->mo->health, 5, 180); From 4aa0a22e857f29a127eaf7e0e1d4f75a9dcb69d4 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 2 Nov 2024 10:49:24 +0100 Subject: [PATCH 11/23] Update sb_bar.c Move Frags to be visible above health. --- src/heretic/sb_bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 021f2b5d7..fa14d5c70 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1105,7 +1105,7 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 45 - WIDESCREENDELTA, 185); + DrINumber(temp, 5 - WIDESCREENDELTA, 155); } if (!inventory) { From 24e104ca140a7aec3d1f63e93ad4d57d1d49531a Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 2 Nov 2024 11:00:05 +0100 Subject: [PATCH 12/23] Update sb_bar.c Moving Hud down by 10px --- src/heretic/sb_bar.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index fa14d5c70..fe5b4fa87 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1065,36 +1065,36 @@ void DrawFullScreenStuff(void) temp = CPlayer->mo->health; if (temp > 0) { - DrINumber(temp, 5 - WIDESCREENDELTA, 170); + DrINumber(temp, 5 - WIDESCREENDELTA, 180); } else { - DrINumber(0, 5 - WIDESCREENDELTA, 170); + DrINumber(0, 5 - WIDESCREENDELTA, 180); } // Ammo temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) { - V_DrawPatch(55 - WIDESCREENDELTA, 172, + V_DrawPatch(55 - WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), PU_CACHE)); - DrINumber(temp, 53 - WIDESCREENDELTA, 162); + DrINumber(temp, 53 - WIDESCREENDELTA, 172); } // Keys if (CPlayer->keys[key_yellow]) { - V_DrawPatch(214 + WIDESCREENDELTA, 164, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); } if (CPlayer->keys[key_green]) { - V_DrawPatch(214 + WIDESCREENDELTA, 172, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); } if (CPlayer->keys[key_blue]) { - V_DrawPatch(214 + WIDESCREENDELTA, 180, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); } // Armor - DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 170); + DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); if (deathmatch) { temp = 0; @@ -1105,21 +1105,21 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 5 - WIDESCREENDELTA, 155); + DrINumber(temp, 5 - WIDESCREENDELTA, 165); } if (!inventory) { if (ArtifactFlash) { temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; - V_DrawPatch(243 + WIDESCREENDELTA, 161, W_CacheLumpNum(temp, PU_CACHE)); + V_DrawPatch(243 + WIDESCREENDELTA, 171, W_CacheLumpNum(temp, PU_CACHE)); ArtifactFlash--; } else if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawPatch(240 + WIDESCREENDELTA, 160, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 182); + V_DrawPatch(240 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 192); } } else @@ -1127,28 +1127,28 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawPatch(50 + i * 31, 160, + V_DrawPatch(50 + i * 31, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 160, + V_DrawPatch(50 + i * 31, 170, W_CacheLumpName(patch, PU_CACHE)); DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 182); + 192); } } - V_DrawPatch(50 + curpos * 31, 189, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 199, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(38, 159, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(38, 169, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(269, 159, !(leveltime & 4) ? + V_DrawPatch(269, 169, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } From 3003fc42ff9ecd0d74b6504351090782be6a7b11 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sun, 3 Nov 2024 17:48:17 +0100 Subject: [PATCH 13/23] Fixing Findings for Pull-Request #1234 Fixing Findings for Pull-Request #1234 Crispy-Hud: https://github.com/fabiangreffrath/crispy-doom/pull/1234 --- src/heretic/mn_menu.c | 4 +- src/heretic/r_main.c | 2 +- src/heretic/sb_bar.c | 129 +++++++++++++++++++++--------------------- 3 files changed, 67 insertions(+), 68 deletions(-) diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 1a3ab6161..f527d3c7f 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -1125,7 +1125,7 @@ static void DrawOptionsMenu(void) static void DrawOptions2Menu(void) { - DrawSlider(&Options2Menu, 1, 9, (screenblocks < 12 ? screenblocks : 11) - 3); + DrawSlider(&Options2Menu, 1, 9, BETWEEN(3, 11, screenblocks) - 3); DrawSlider(&Options2Menu, 3, 16, snd_MaxVolume); DrawSlider(&Options2Menu, 5, 16, snd_MusicVolume); } @@ -1540,7 +1540,7 @@ static boolean SCScreenSize(int option) { screenblocks--; } - R_SetViewSize((screenblocks < 12 ? screenblocks : 11), detailLevel); + R_SetViewSize(BETWEEN(3, 11, screenblocks), detailLevel); return true; } diff --git a/src/heretic/r_main.c b/src/heretic/r_main.c index 561e50165..b8e793eba 100644 --- a/src/heretic/r_main.c +++ b/src/heretic/r_main.c @@ -840,7 +840,7 @@ void R_Init(void) R_InitTables(); // viewwidth / viewheight / detailLevel are set by the defaults printf ("."); - R_SetViewSize((screenblocks < 12 ? screenblocks : 11), detailLevel); + R_SetViewSize(BETWEEN(3, 11, screenblocks), detailLevel); //tprintf("R_InitPlanes\n", 0); R_InitPlanes(); printf ("."); diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index fe5b4fa87..88fffe55e 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1051,50 +1051,23 @@ void DrawInventoryBar(void) void DrawFullScreenStuff(void) { - const char *patch; + const char *patch; int i; int x; int temp; UpdateState |= I_FULLSCRN; - if (screenblocks == 12) + if (screenblocks <= 11) { - // [crispy] Crispy Hud - // TODO Do not always render, only if update needed - temp = CPlayer->mo->health; - if (temp > 0) + if (CPlayer->mo->health > 0) { - DrINumber(temp, 5 - WIDESCREENDELTA, 180); + DrBNumber(CPlayer->mo->health, 5, 180); } else { - DrINumber(0, 5 - WIDESCREENDELTA, 180); + DrBNumber(0, 5, 180); } - // Ammo - temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; - if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) - { - V_DrawPatch(55 - WIDESCREENDELTA, 182, - W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), - PU_CACHE)); - DrINumber(temp, 53 - WIDESCREENDELTA, 172); - } - // Keys - if (CPlayer->keys[key_yellow]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_green]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_blue]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); - } - // Armor - DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); if (deathmatch) { temp = 0; @@ -1105,21 +1078,16 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 5 - WIDESCREENDELTA, 165); + DrINumber(temp, 45, 185); } if (!inventory) { - if (ArtifactFlash) - { - temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; - V_DrawPatch(243 + WIDESCREENDELTA, 171, W_CacheLumpNum(temp, PU_CACHE)); - ArtifactFlash--; - } - else if (CPlayer->readyArtifact > 0) + if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawPatch(240 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 192); + V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); } } else @@ -1127,43 +1095,68 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawPatch(50 + i * 31, 170, + V_DrawAltTLPatch(50 + i * 31, 168, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 170, + V_DrawPatch(50 + i * 31, 168, W_CacheLumpName(patch, PU_CACHE)); DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 192); + 190); } } - V_DrawPatch(50 + curpos * 31, 199, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(38, 169, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(269, 169, !(leveltime & 4) ? + V_DrawPatch(269, 167, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } } - else + else if(screenblocks == 12) { - // [crispy] Vanilla Fullscreen Hud - if (CPlayer->mo->health > 0) + // [crispy] Crispy Hud + // TODO Do not always render, only if update needed + temp = CPlayer->mo->health; + if (temp > 0) { - DrBNumber(CPlayer->mo->health, 5, 180); + DrINumber(temp, 5 - WIDESCREENDELTA, 180); } else { - DrBNumber(0, 5, 180); + DrINumber(0, 5 - WIDESCREENDELTA, 180); } + // Ammo + temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; + if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) + { + V_DrawPatch(55 - WIDESCREENDELTA, 182, + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), + PU_CACHE)); + DrINumber(temp, 53 - WIDESCREENDELTA, 172); + } + // Keys + if (CPlayer->keys[key_yellow]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_green]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_blue]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + } + // Armor + DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); if (deathmatch) { temp = 0; @@ -1174,16 +1167,21 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 45, 185); + DrINumber(temp, 5 - WIDESCREENDELTA, 165); } if (!inventory) { - if (CPlayer->readyArtifact > 0) + if (ArtifactFlash) + { + temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; + V_DrawPatch(243 + WIDESCREENDELTA, 171, W_CacheLumpNum(temp, PU_CACHE)); + ArtifactFlash--; + } + else if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); + V_DrawPatch(240 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 262 + WIDESCREENDELTA, 192); } } else @@ -1191,27 +1189,28 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawAltTLPatch(50 + i * 31, 168, + V_DrawPatch(50 + i * 31, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 168, + V_DrawPatch(50 + i * 31, 170, W_CacheLumpName(patch, PU_CACHE)); DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 190); + 192); } } - V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 199, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(38, 169, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(269, 167, !(leveltime & 4) ? + V_DrawPatch(269, 169, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } From a2e7aa26d8e0c9d1ccdb23a00b4bb2cf8d5ee46c Mon Sep 17 00:00:00 2001 From: Noseey Date: Mon, 4 Nov 2024 18:56:39 +0100 Subject: [PATCH 14/23] Restructuered DrawFullScreenStuff in sb_bar.c Added "return" in crispy hud condition to keep indentation of original code intact. --- src/heretic/sb_bar.c | 178 +++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 91 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 88fffe55e..3499eaa21 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1057,73 +1057,10 @@ void DrawFullScreenStuff(void) int temp; UpdateState |= I_FULLSCRN; - - if (screenblocks <= 11) - { - if (CPlayer->mo->health > 0) - { - DrBNumber(CPlayer->mo->health, 5, 180); - } - else - { - DrBNumber(0, 5, 180); - } - if (deathmatch) - { - temp = 0; - for (i = 0; i < MAXPLAYERS; i++) - { - if (playeringame[i]) - { - temp += CPlayer->frags[i]; - } - } - DrINumber(temp, 45, 185); - } - if (!inventory) - { - if (CPlayer->readyArtifact > 0) - { - patch = DEH_String(patcharti[CPlayer->readyArtifact]); - V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); - } - } - else - { - x = inv_ptr - curpos; - for (i = 0; i < 7; i++) - { - V_DrawAltTLPatch(50 + i * 31, 168, - W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i - && CPlayer->inventory[x + i].type != arti_none) - { - patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 168, - W_CacheLumpName(patch, PU_CACHE)); - DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 190); - } - } - V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); - if (x != 0) - { - V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : - PatchINVLFGEM2); - } - if (CPlayer->inventorySlotNum - x > 7) - { - V_DrawPatch(269, 167, !(leveltime & 4) ? - PatchINVRTGEM1 : PatchINVRTGEM2); - } - } - } - else if(screenblocks == 12) + // [crispy] Crispy Hud + // TODO Do not always render, only if update needed + if(screenblocks == 12) { - // [crispy] Crispy Hud - // TODO Do not always render, only if update needed temp = CPlayer->mo->health; if (temp > 0) { @@ -1135,28 +1072,28 @@ void DrawFullScreenStuff(void) } // Ammo temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; - if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) - { + if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) + { V_DrawPatch(55 - WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), PU_CACHE)); - DrINumber(temp, 53 - WIDESCREENDELTA, 172); - } + DrINumber(temp, 53 - WIDESCREENDELTA, 172); + } // Keys - if (CPlayer->keys[key_yellow]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_green]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_blue]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); - } + if (CPlayer->keys[key_yellow]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_green]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_blue]) + { + V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); + } // Armor - DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); + DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); if (deathmatch) { temp = 0; @@ -1171,13 +1108,13 @@ void DrawFullScreenStuff(void) } if (!inventory) { - if (ArtifactFlash) - { - temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; - V_DrawPatch(243 + WIDESCREENDELTA, 171, W_CacheLumpNum(temp, PU_CACHE)); - ArtifactFlash--; - } - else if (CPlayer->readyArtifact > 0) + if (ArtifactFlash) + { + temp = W_GetNumForName(DEH_String("useartia")) + ArtifactFlash - 1; + V_DrawPatch(243 + WIDESCREENDELTA, 171, W_CacheLumpNum(temp, PU_CACHE)); + ArtifactFlash--; + } + else if (CPlayer->readyArtifact > 0) { patch = DEH_String(patcharti[CPlayer->readyArtifact]); V_DrawPatch(240 + WIDESCREENDELTA, 170, W_CacheLumpName(patch, PU_CACHE)); @@ -1191,7 +1128,6 @@ void DrawFullScreenStuff(void) { V_DrawPatch(50 + i * 31, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { @@ -1214,6 +1150,66 @@ void DrawFullScreenStuff(void) PatchINVRTGEM1 : PatchINVRTGEM2); } } + return; + } + if (CPlayer->mo->health > 0) + { + DrBNumber(CPlayer->mo->health, 5, 180); + } + else + { + DrBNumber(0, 5, 180); + } + if (deathmatch) + { + temp = 0; + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i]) + { + temp += CPlayer->frags[i]; + } + } + DrINumber(temp, 45, 185); + } + if (!inventory) + { + if (CPlayer->readyArtifact > 0) + { + patch = DEH_String(patcharti[CPlayer->readyArtifact]); + V_DrawAltTLPatch(286, 170, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + V_DrawPatch(286, 170, W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 307, 192); + } + } + else + { + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawAltTLPatch(50 + i * 31, 168, + W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); + V_DrawPatch(50 + i * 31, 168, + W_CacheLumpName(patch, PU_CACHE)); + DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, + 190); + } + } + V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(269, 167, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } } } From 85a5b66ee21136655ece252616f8d0d6de233038 Mon Sep 17 00:00:00 2001 From: Noseey Date: Tue, 5 Nov 2024 23:56:06 +0100 Subject: [PATCH 15/23] Adding rough Hexen crispy HUD First rough version of Hexen crispy HUD, without shifting widgets or considering widescreendelta. --- src/hexen/mn_menu.c | 6 +- src/hexen/r_main.c | 2 +- src/hexen/sb_bar.c | 217 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+), 4 deletions(-) diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c index e09a0b929..f4c78a646 100644 --- a/src/hexen/mn_menu.c +++ b/src/hexen/mn_menu.c @@ -1120,7 +1120,7 @@ static void DrawOptionsMenu(void) static void DrawOptions2Menu(void) { - DrawSlider(&Options2Menu, 1, 9, screenblocks - 3); + DrawSlider(&Options2Menu, 1, 9, BETWEEN(3, 11, screenblocks) - 3); DrawSlider(&Options2Menu, 3, 16, snd_MaxVolume); DrawSlider(&Options2Menu, 5, 16, snd_MusicVolume); } @@ -1569,7 +1569,7 @@ static void SCScreenSize(int option) { if (option == RIGHT_DIR) { - if (screenblocks < 11) + if (screenblocks < 12) { screenblocks++; } @@ -1578,7 +1578,7 @@ static void SCScreenSize(int option) { screenblocks--; } - R_SetViewSize(screenblocks, detailLevel); + R_SetViewSize(BETWEEN(3, 11, screenblocks), detailLevel); } //--------------------------------------------------------------------------- diff --git a/src/hexen/r_main.c b/src/hexen/r_main.c index 579d70c8f..0b97e7512 100644 --- a/src/hexen/r_main.c +++ b/src/hexen/r_main.c @@ -835,7 +835,7 @@ void R_Init(void) R_InitPointToAngle(); R_InitTables(); // viewwidth / viewheight / detailLevel are set by the defaults - R_SetViewSize(screenblocks, detailLevel); + R_SetViewSize(BETWEEN(3, 11, screenblocks), detailLevel); R_InitPlanes(); R_InitLightTables(); R_InitSkyMap(); diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index 346238ff2..463dac4a1 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1479,6 +1479,223 @@ void DrawFullScreenStuff(void) int temp; UpdateState |= I_FULLSCRN; + // [crispy] Crispy Hud + // TODO Do not always render, only if update needed + if(screenblocks == 12) + { + int j, k; + patch_t *manaPatch1, *manaPatch2; + patch_t *manaVialPatch1, *manaVialPatch2; + + manaPatch1 = NULL; + manaPatch2 = NULL; + manaVialPatch1 = NULL; + manaVialPatch2 = NULL; + + // Health + temp = CPlayer->mo->health; + if (temp >= 25) + { + DrINumber(temp, 40, 176); + } + else + { + DrRedINumber(temp, 40, 176); + } + + // Frags + if (deathmatch) + { + temp = 0; + for (i = 0; i < maxplayers; i++) + { + if (playeringame[i]) + { + temp += CPlayer->frags[i]; + } + } + DrINumber(temp, 40, 165); + } + + // Mana + temp = CPlayer->mana[0]; + DrSmallNumber(temp, 79, 181); // x Delta to Health is 39 + manaVialPatch1 = (patch_t *) 1; // force a vial update + if (temp == 0) + { // Draw Dim Mana icon + manaPatch1 = PatchMANADIM1; + } + else if (oldmana1 == 0) + { + manaPatch1 = PatchMANABRIGHT1; + } + temp = CPlayer->mana[1]; + DrSmallNumber(temp, 111, 181); // x Delta to Mana 0 is 32 + manaVialPatch1 = (patch_t *) 1; // force a vial update + if (temp == 0) + { // Draw Dim Mana icon + manaPatch2 = PatchMANADIM2; + } + else if (oldmana2 == 0) + { + manaPatch2 = PatchMANABRIGHT2; + } + // Update mana graphics based upon mana count/weapon type + if (CPlayer->readyweapon == WP_FIRST) + { + manaPatch1 = PatchMANADIM1; + manaPatch2 = PatchMANADIM2; + manaVialPatch1 = PatchMANAVIALDIM1; + manaVialPatch2 = PatchMANAVIALDIM2; + } + else if (CPlayer->readyweapon == WP_SECOND) + { + if (!manaPatch1) + { + manaPatch1 = PatchMANABRIGHT1; + } + manaVialPatch1 = PatchMANAVIAL1; + manaPatch2 = PatchMANADIM2; + manaVialPatch2 = PatchMANAVIALDIM2; + } + else if (CPlayer->readyweapon == WP_THIRD) + { + manaPatch1 = PatchMANADIM1; + manaVialPatch1 = PatchMANAVIALDIM1; + if (!manaPatch2) + { + manaPatch2 = PatchMANABRIGHT2; + } + manaVialPatch2 = PatchMANAVIAL2; + } + else + { + manaVialPatch1 = PatchMANAVIAL1; + manaVialPatch2 = PatchMANAVIAL2; + if (!manaPatch1) + { + manaPatch1 = PatchMANABRIGHT1; + } + if (!manaPatch2) + { + manaPatch2 = PatchMANABRIGHT2; + } + } + V_DrawPatch(77, 164, manaPatch1); // x Delta to Health is 37 + V_DrawPatch(110, 164, manaPatch2); // x Delta to Mana Patch 1 is 33 + V_DrawPatch(94, 164, manaVialPatch1); // x Delta to Mana Patch 1 is 17 + for (i = 165; i < 187 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) + { + for (j = 0; j <= crispy->hires; j++) + for (k = 0; k <= crispy->hires; k++) + { + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((95 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((96 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((97 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + } + } + V_DrawPatch(102, 164, manaVialPatch2); // x Delta to Mana Vial 1 is 8 + for (i = 165; i < 187 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) + { + for (j = 0; j <= crispy->hires; j++) + for (k = 0; k <= crispy->hires; k++) + { + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((103 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((104 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((105 + WIDESCREENDELTA) << crispy->hires) + k] = 0; + } + } + // Armor + temp = AutoArmorSave[CPlayer->class] + + CPlayer->armorpoints[ARMOR_ARMOR] + + CPlayer->armorpoints[ARMOR_SHIELD] + + CPlayer->armorpoints[ARMOR_HELMET] + + CPlayer->armorpoints[ARMOR_AMULET]; + oldarmor = temp; + DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 250, 176); + UpdateState |= I_STATBAR; + // Weapon Pieces + if (CPlayer->pieces == 7) + { + V_DrawPatch(190, 162, PatchWEAPONFULL); // x Delta to Armor is 60 + } + else + { + V_DrawPatch(190, 162, PatchWEAPONSLOT); + if (CPlayer->pieces & WPIECE1) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0], 162, PatchPIECE1); // use same offset as for x in WeaponFull + } + if (CPlayer->pieces & WPIECE2) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1], 162, PatchPIECE2); + } + if (CPlayer->pieces & WPIECE3) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2], 162, PatchPIECE3); + } + } + // Items, Itemflash and Selection Bar + if (!inventory) + { + if (ArtifactFlash) + { + V_DrawPatch(148, 164, W_CacheLumpNum(W_GetNumForName("useartia") // x Delta to Item is +5 + + ArtifactFlash - 1, PU_CACHE)); + ArtifactFlash--; + } + else if (CPlayer->readyArtifact > 0) + { + V_DrawPatch(143, 163, + W_CacheLumpName(patcharti[CPlayer->readyArtifact], // x Delta to Weapon Patch is 47 + PU_CACHE)); + if (CPlayer->inventory[inv_ptr].count > 1) + { + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 162, 184); // x Delta to Item is +19 + } + } + } + else + { + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawPatch(50 + i * 31, 162, W_CacheLumpName("ARTIBOX", + PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + V_DrawPatch(49 + i * 31, 161, + W_CacheLumpName(patcharti + [CPlayer->inventory[x + i].type], + PU_CACHE)); + if (CPlayer->inventory[x + i].count > 1) + { + DrSmallNumber(CPlayer->inventory[x + i].count, + 66 + i * 31, 182); + } + } + } + V_DrawPatch(50 + curpos * 31, 161, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(40, 161, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(268, 161, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } + } + return; + } if (CPlayer->mo->health > 0) { DrBNumber(CPlayer->mo->health, 5, 180); From b4f778023a5a2f2fe34f996bd8add38d72ba95ab Mon Sep 17 00:00:00 2001 From: Noseey Date: Wed, 6 Nov 2024 19:45:52 +0100 Subject: [PATCH 16/23] Refine Hexen Crispy Hud Shift widgets to the left and right, make it align with aspect ratio, fixing indentation. --- src/hexen/sb_bar.c | 363 ++++++++++++++++++++++----------------------- 1 file changed, 181 insertions(+), 182 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index 463dac4a1..3f5ee6bc9 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1496,11 +1496,11 @@ void DrawFullScreenStuff(void) temp = CPlayer->mo->health; if (temp >= 25) { - DrINumber(temp, 40, 176); + DrINumber(temp, 5 - WIDESCREENDELTA, 176); } else { - DrRedINumber(temp, 40, 176); + DrRedINumber(temp, 5 - WIDESCREENDELTA, 176); } // Frags @@ -1514,186 +1514,185 @@ void DrawFullScreenStuff(void) temp += CPlayer->frags[i]; } } - DrINumber(temp, 40, 165); - } - - // Mana - temp = CPlayer->mana[0]; - DrSmallNumber(temp, 79, 181); // x Delta to Health is 39 - manaVialPatch1 = (patch_t *) 1; // force a vial update - if (temp == 0) - { // Draw Dim Mana icon - manaPatch1 = PatchMANADIM1; - } - else if (oldmana1 == 0) - { - manaPatch1 = PatchMANABRIGHT1; - } - temp = CPlayer->mana[1]; - DrSmallNumber(temp, 111, 181); // x Delta to Mana 0 is 32 - manaVialPatch1 = (patch_t *) 1; // force a vial update - if (temp == 0) - { // Draw Dim Mana icon - manaPatch2 = PatchMANADIM2; - } - else if (oldmana2 == 0) - { - manaPatch2 = PatchMANABRIGHT2; - } - // Update mana graphics based upon mana count/weapon type - if (CPlayer->readyweapon == WP_FIRST) - { - manaPatch1 = PatchMANADIM1; - manaPatch2 = PatchMANADIM2; - manaVialPatch1 = PatchMANAVIALDIM1; - manaVialPatch2 = PatchMANAVIALDIM2; - } - else if (CPlayer->readyweapon == WP_SECOND) - { - if (!manaPatch1) - { - manaPatch1 = PatchMANABRIGHT1; - } - manaVialPatch1 = PatchMANAVIAL1; - manaPatch2 = PatchMANADIM2; - manaVialPatch2 = PatchMANAVIALDIM2; - } - else if (CPlayer->readyweapon == WP_THIRD) - { - manaPatch1 = PatchMANADIM1; - manaVialPatch1 = PatchMANAVIALDIM1; - if (!manaPatch2) - { - manaPatch2 = PatchMANABRIGHT2; - } - manaVialPatch2 = PatchMANAVIAL2; - } - else - { - manaVialPatch1 = PatchMANAVIAL1; - manaVialPatch2 = PatchMANAVIAL2; - if (!manaPatch1) - { - manaPatch1 = PatchMANABRIGHT1; - } - if (!manaPatch2) - { - manaPatch2 = PatchMANABRIGHT2; - } - } - V_DrawPatch(77, 164, manaPatch1); // x Delta to Health is 37 - V_DrawPatch(110, 164, manaPatch2); // x Delta to Mana Patch 1 is 33 - V_DrawPatch(94, 164, manaVialPatch1); // x Delta to Mana Patch 1 is 17 - for (i = 165; i < 187 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) - { - for (j = 0; j <= crispy->hires; j++) - for (k = 0; k <= crispy->hires; k++) - { - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((95 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((96 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((97 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - } - } - V_DrawPatch(102, 164, manaVialPatch2); // x Delta to Mana Vial 1 is 8 - for (i = 165; i < 187 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) - { - for (j = 0; j <= crispy->hires; j++) - for (k = 0; k <= crispy->hires; k++) - { - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((103 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((104 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((105 + WIDESCREENDELTA) << crispy->hires) + k] = 0; - } - } - // Armor - temp = AutoArmorSave[CPlayer->class] - + CPlayer->armorpoints[ARMOR_ARMOR] + - CPlayer->armorpoints[ARMOR_SHIELD] + - CPlayer->armorpoints[ARMOR_HELMET] + - CPlayer->armorpoints[ARMOR_AMULET]; - oldarmor = temp; - DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 250, 176); - UpdateState |= I_STATBAR; - // Weapon Pieces - if (CPlayer->pieces == 7) - { - V_DrawPatch(190, 162, PatchWEAPONFULL); // x Delta to Armor is 60 - } - else - { - V_DrawPatch(190, 162, PatchWEAPONSLOT); - if (CPlayer->pieces & WPIECE1) - { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0], 162, PatchPIECE1); // use same offset as for x in WeaponFull - } - if (CPlayer->pieces & WPIECE2) - { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1], 162, PatchPIECE2); - } - if (CPlayer->pieces & WPIECE3) - { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2], 162, PatchPIECE3); - } - } - // Items, Itemflash and Selection Bar - if (!inventory) - { - if (ArtifactFlash) - { - V_DrawPatch(148, 164, W_CacheLumpNum(W_GetNumForName("useartia") // x Delta to Item is +5 - + ArtifactFlash - 1, PU_CACHE)); - ArtifactFlash--; - } - else if (CPlayer->readyArtifact > 0) - { - V_DrawPatch(143, 163, - W_CacheLumpName(patcharti[CPlayer->readyArtifact], // x Delta to Weapon Patch is 47 - PU_CACHE)); - if (CPlayer->inventory[inv_ptr].count > 1) - { - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 162, 184); // x Delta to Item is +19 - } - } - } - else - { - x = inv_ptr - curpos; - for (i = 0; i < 7; i++) - { - V_DrawPatch(50 + i * 31, 162, W_CacheLumpName("ARTIBOX", - PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i - && CPlayer->inventory[x + i].type != arti_none) - { - V_DrawPatch(49 + i * 31, 161, - W_CacheLumpName(patcharti - [CPlayer->inventory[x + i].type], - PU_CACHE)); - if (CPlayer->inventory[x + i].count > 1) - { - DrSmallNumber(CPlayer->inventory[x + i].count, - 66 + i * 31, 182); - } - } - } - V_DrawPatch(50 + curpos * 31, 161, PatchSELECTBOX); - if (x != 0) - { - V_DrawPatch(40, 161, !(leveltime & 4) ? PatchINVLFGEM1 : - PatchINVLFGEM2); - } - if (CPlayer->inventorySlotNum - x > 7) - { - V_DrawPatch(268, 161, !(leveltime & 4) ? - PatchINVRTGEM1 : PatchINVRTGEM2); - } - } + DrINumber(temp, 5 - WIDESCREENDELTA, 165); + } + + // Mana + temp = CPlayer->mana[0]; + DrSmallNumber(temp, 44 - WIDESCREENDELTA, 181); // x Delta to Health is 39 + manaVialPatch1 = (patch_t *) 1; // force a vial update + if (temp == 0) + { // Draw Dim Mana icon + manaPatch1 = PatchMANADIM1; + } + else if (oldmana1 == 0) + { + manaPatch1 = PatchMANABRIGHT1; + } + temp = CPlayer->mana[1]; + DrSmallNumber(temp, 76 - WIDESCREENDELTA, 181); // x Delta to Mana 0 is 32 + manaVialPatch1 = (patch_t *) 1; // force a vial update + if (temp == 0) + { // Draw Dim Mana icon + manaPatch2 = PatchMANADIM2; + } + else if (oldmana2 == 0) + { + manaPatch2 = PatchMANABRIGHT2; + } + // Update mana graphics based upon mana count/weapon type + if (CPlayer->readyweapon == WP_FIRST) + { + manaPatch1 = PatchMANADIM1; + manaPatch2 = PatchMANADIM2; + manaVialPatch1 = PatchMANAVIALDIM1; + manaVialPatch2 = PatchMANAVIALDIM2; + } + else if (CPlayer->readyweapon == WP_SECOND) + { + if (!manaPatch1) + { + manaPatch1 = PatchMANABRIGHT1; + } + manaVialPatch1 = PatchMANAVIAL1; + manaPatch2 = PatchMANADIM2; + manaVialPatch2 = PatchMANAVIALDIM2; + } + else if (CPlayer->readyweapon == WP_THIRD) + { + manaPatch1 = PatchMANADIM1; + manaVialPatch1 = PatchMANAVIALDIM1; + if (!manaPatch2) + { + manaPatch2 = PatchMANABRIGHT2; + } + manaVialPatch2 = PatchMANAVIAL2; + } + else + { + manaVialPatch1 = PatchMANAVIAL1; + manaVialPatch2 = PatchMANAVIAL2; + if (!manaPatch1) + { + manaPatch1 = PatchMANABRIGHT1; + } + if (!manaPatch2) + { + manaPatch2 = PatchMANABRIGHT2; + } + } + V_DrawPatch(42 - WIDESCREENDELTA, 164, manaPatch1); // x Delta to Health is 37 + V_DrawPatch(75 - WIDESCREENDELTA, 164, manaPatch2); // x Delta to Mana Patch 1 is 33 + V_DrawPatch(59 - WIDESCREENDELTA, 164, manaVialPatch1); // x Delta to Mana Patch 1 is 17 + for (i = 165; i < 187 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) + { + for (j = 0; j <= crispy->hires; j++) + for (k = 0; k <= crispy->hires; k++) + { + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((60) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((61) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((62) << crispy->hires) + k] = 0; + } + } + V_DrawPatch(67 - WIDESCREENDELTA, 164, manaVialPatch2); // x Delta to Mana Vial 1 is 8 + for (i = 165; i < 187 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) + { + for (j = 0; j <= crispy->hires; j++) + for (k = 0; k <= crispy->hires; k++) + { + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((68) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((69) << crispy->hires) + k] = 0; + I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) + + ((70) << crispy->hires) + k] = 0; + } + } + // Armor + temp = AutoArmorSave[CPlayer->class] + + CPlayer->armorpoints[ARMOR_ARMOR] + + CPlayer->armorpoints[ARMOR_SHIELD] + + CPlayer->armorpoints[ARMOR_HELMET] + + CPlayer->armorpoints[ARMOR_AMULET]; + oldarmor = temp; + DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 176); + // Weapon Pieces + if (CPlayer->pieces == 7) + { + V_DrawPatch(228 + WIDESCREENDELTA, 162, PatchWEAPONFULL); // x Delta to Armor is 60 + } + else + { + V_DrawPatch(228 + WIDESCREENDELTA, 162, PatchWEAPONSLOT); + if (CPlayer->pieces & WPIECE1) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0] + 38 + WIDESCREENDELTA, 162, PatchPIECE1); // use same offset as for x in WeaponFull + } + if (CPlayer->pieces & WPIECE2) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1] + 38 + WIDESCREENDELTA, 162, PatchPIECE2); + } + if (CPlayer->pieces & WPIECE3) + { + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 162, PatchPIECE3); + } + } + // Items, Itemflash and Selection Bar + if (!inventory) + { + if (ArtifactFlash) + { + V_DrawPatch(186 + WIDESCREENDELTA, 164, W_CacheLumpNum(W_GetNumForName("useartia") // x Delta to Item is +5 + + ArtifactFlash - 1, PU_CACHE)); + ArtifactFlash--; + } + else if (CPlayer->readyArtifact > 0) + { + V_DrawPatch(181 + WIDESCREENDELTA, 163, + W_CacheLumpName(patcharti[CPlayer->readyArtifact], // x Delta to Weapon Patch is 47 + PU_CACHE)); + if (CPlayer->inventory[inv_ptr].count > 1) + { + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 200 + WIDESCREENDELTA, 184); // x Delta to Item is +19 + } + } + } + else + { + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawPatch(50 + i * 31, 162, W_CacheLumpName("ARTIBOX", + PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + V_DrawPatch(49 + i * 31, 161, + W_CacheLumpName(patcharti + [CPlayer->inventory[x + i].type], + PU_CACHE)); + if (CPlayer->inventory[x + i].count > 1) + { + DrSmallNumber(CPlayer->inventory[x + i].count, + 66 + i * 31, 182); + } + } + } + V_DrawPatch(50 + curpos * 31, 161, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(40, 161, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(268, 161, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } + } return; } if (CPlayer->mo->health > 0) From a04eb6ea972884dbe8daadcef9d0a5359afc3d9a Mon Sep 17 00:00:00 2001 From: Noseey Date: Wed, 6 Nov 2024 20:10:58 +0100 Subject: [PATCH 17/23] Shifting down Hexen Crispy Hud Shifting down Hexen Crispy Hud by 7px. Cleanup comments. --- src/hexen/sb_bar.c | 64 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index 3f5ee6bc9..c2e99d5d4 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1496,11 +1496,11 @@ void DrawFullScreenStuff(void) temp = CPlayer->mo->health; if (temp >= 25) { - DrINumber(temp, 5 - WIDESCREENDELTA, 176); + DrINumber(temp, 5 - WIDESCREENDELTA, 183); } else { - DrRedINumber(temp, 5 - WIDESCREENDELTA, 176); + DrRedINumber(temp, 5 - WIDESCREENDELTA, 183); } // Frags @@ -1519,7 +1519,7 @@ void DrawFullScreenStuff(void) // Mana temp = CPlayer->mana[0]; - DrSmallNumber(temp, 44 - WIDESCREENDELTA, 181); // x Delta to Health is 39 + DrSmallNumber(temp, 44 - WIDESCREENDELTA, 188); manaVialPatch1 = (patch_t *) 1; // force a vial update if (temp == 0) { // Draw Dim Mana icon @@ -1530,7 +1530,7 @@ void DrawFullScreenStuff(void) manaPatch1 = PatchMANABRIGHT1; } temp = CPlayer->mana[1]; - DrSmallNumber(temp, 76 - WIDESCREENDELTA, 181); // x Delta to Mana 0 is 32 + DrSmallNumber(temp, 76 - WIDESCREENDELTA, 188); manaVialPatch1 = (patch_t *) 1; // force a vial update if (temp == 0) { // Draw Dim Mana icon @@ -1581,34 +1581,34 @@ void DrawFullScreenStuff(void) manaPatch2 = PatchMANABRIGHT2; } } - V_DrawPatch(42 - WIDESCREENDELTA, 164, manaPatch1); // x Delta to Health is 37 - V_DrawPatch(75 - WIDESCREENDELTA, 164, manaPatch2); // x Delta to Mana Patch 1 is 33 - V_DrawPatch(59 - WIDESCREENDELTA, 164, manaVialPatch1); // x Delta to Mana Patch 1 is 17 - for (i = 165; i < 187 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) + V_DrawPatch(42 - WIDESCREENDELTA, 171, manaPatch1); + V_DrawPatch(75 - WIDESCREENDELTA, 171, manaPatch2); + V_DrawPatch(59 - WIDESCREENDELTA, 171, manaVialPatch1); + for (i = 172; i < 194 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) { for (j = 0; j <= crispy->hires; j++) for (k = 0; k <= crispy->hires; k++) { I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((60) << crispy->hires) + k] = 0; + + (60 << crispy->hires) + k] = 0; I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((61) << crispy->hires) + k] = 0; + + (61 << crispy->hires) + k] = 0; I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((62) << crispy->hires) + k] = 0; + + (62 << crispy->hires) + k] = 0; } } - V_DrawPatch(67 - WIDESCREENDELTA, 164, manaVialPatch2); // x Delta to Mana Vial 1 is 8 - for (i = 165; i < 187 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) + V_DrawPatch(67 - WIDESCREENDELTA, 171, manaVialPatch2); + for (i = 172; i < 194 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) { for (j = 0; j <= crispy->hires; j++) for (k = 0; k <= crispy->hires; k++) { I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((68) << crispy->hires) + k] = 0; + + (68 << crispy->hires) + k] = 0; I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((69) << crispy->hires) + k] = 0; + + (69 << crispy->hires) + k] = 0; I_VideoBuffer[SCREENWIDTH * ((i << crispy->hires) + j) - + ((70) << crispy->hires) + k] = 0; + + (70 << crispy->hires) + k] = 0; } } // Armor @@ -1618,26 +1618,26 @@ void DrawFullScreenStuff(void) CPlayer->armorpoints[ARMOR_HELMET] + CPlayer->armorpoints[ARMOR_AMULET]; oldarmor = temp; - DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 176); + DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 183); // Weapon Pieces if (CPlayer->pieces == 7) { - V_DrawPatch(228 + WIDESCREENDELTA, 162, PatchWEAPONFULL); // x Delta to Armor is 60 + V_DrawPatch(228 + WIDESCREENDELTA, 169, PatchWEAPONFULL); } else { - V_DrawPatch(228 + WIDESCREENDELTA, 162, PatchWEAPONSLOT); + V_DrawPatch(228 + WIDESCREENDELTA, 169, PatchWEAPONSLOT); if (CPlayer->pieces & WPIECE1) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0] + 38 + WIDESCREENDELTA, 162, PatchPIECE1); // use same offset as for x in WeaponFull + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0] + 38 + WIDESCREENDELTA, 169, PatchPIECE1); } if (CPlayer->pieces & WPIECE2) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1] + 38 + WIDESCREENDELTA, 162, PatchPIECE2); + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1] + 38 + WIDESCREENDELTA, 169, PatchPIECE2); } if (CPlayer->pieces & WPIECE3) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 162, PatchPIECE3); + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 169, PatchPIECE3); } } // Items, Itemflash and Selection Bar @@ -1645,18 +1645,18 @@ void DrawFullScreenStuff(void) { if (ArtifactFlash) { - V_DrawPatch(186 + WIDESCREENDELTA, 164, W_CacheLumpNum(W_GetNumForName("useartia") // x Delta to Item is +5 + V_DrawPatch(186 + WIDESCREENDELTA, 171, W_CacheLumpNum(W_GetNumForName("useartia") + ArtifactFlash - 1, PU_CACHE)); ArtifactFlash--; } else if (CPlayer->readyArtifact > 0) { - V_DrawPatch(181 + WIDESCREENDELTA, 163, - W_CacheLumpName(patcharti[CPlayer->readyArtifact], // x Delta to Weapon Patch is 47 + V_DrawPatch(181 + WIDESCREENDELTA, 170, + W_CacheLumpName(patcharti[CPlayer->readyArtifact], PU_CACHE)); if (CPlayer->inventory[inv_ptr].count > 1) { - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 200 + WIDESCREENDELTA, 184); // x Delta to Item is +19 + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 200 + WIDESCREENDELTA, 191); } } } @@ -1665,31 +1665,31 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawPatch(50 + i * 31, 162, W_CacheLumpName("ARTIBOX", + V_DrawPatch(50 + i * 31, 169, W_CacheLumpName("ARTIBOX", PU_CACHE)); if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { - V_DrawPatch(49 + i * 31, 161, + V_DrawPatch(49 + i * 31, 168, W_CacheLumpName(patcharti [CPlayer->inventory[x + i].type], PU_CACHE)); if (CPlayer->inventory[x + i].count > 1) { DrSmallNumber(CPlayer->inventory[x + i].count, - 66 + i * 31, 182); + 66 + i * 31, 189); } } } - V_DrawPatch(50 + curpos * 31, 161, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 168, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(40, 161, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(40, 168, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(268, 161, !(leveltime & 4) ? + V_DrawPatch(268, 168, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } From 02b436321d3df4ed4fe7f6f7a57fd4fb21535749 Mon Sep 17 00:00:00 2001 From: Noseey Date: Wed, 6 Nov 2024 20:43:29 +0100 Subject: [PATCH 18/23] Refinement Hexen Crispy Hud Shifting up by 1px again, shifting item widget to the left instead of right. --- src/hexen/sb_bar.c | 50 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index c2e99d5d4..030a6b1f3 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1496,11 +1496,11 @@ void DrawFullScreenStuff(void) temp = CPlayer->mo->health; if (temp >= 25) { - DrINumber(temp, 5 - WIDESCREENDELTA, 183); + DrINumber(temp, 5 - WIDESCREENDELTA, 182); } else { - DrRedINumber(temp, 5 - WIDESCREENDELTA, 183); + DrRedINumber(temp, 5 - WIDESCREENDELTA, 182); } // Frags @@ -1519,7 +1519,7 @@ void DrawFullScreenStuff(void) // Mana temp = CPlayer->mana[0]; - DrSmallNumber(temp, 44 - WIDESCREENDELTA, 188); + DrSmallNumber(temp, 44 - WIDESCREENDELTA, 187); manaVialPatch1 = (patch_t *) 1; // force a vial update if (temp == 0) { // Draw Dim Mana icon @@ -1530,7 +1530,7 @@ void DrawFullScreenStuff(void) manaPatch1 = PatchMANABRIGHT1; } temp = CPlayer->mana[1]; - DrSmallNumber(temp, 76 - WIDESCREENDELTA, 188); + DrSmallNumber(temp, 76 - WIDESCREENDELTA, 187); manaVialPatch1 = (patch_t *) 1; // force a vial update if (temp == 0) { // Draw Dim Mana icon @@ -1581,10 +1581,10 @@ void DrawFullScreenStuff(void) manaPatch2 = PatchMANABRIGHT2; } } - V_DrawPatch(42 - WIDESCREENDELTA, 171, manaPatch1); - V_DrawPatch(75 - WIDESCREENDELTA, 171, manaPatch2); - V_DrawPatch(59 - WIDESCREENDELTA, 171, manaVialPatch1); - for (i = 172; i < 194 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) + V_DrawPatch(42 - WIDESCREENDELTA, 170, manaPatch1); + V_DrawPatch(75 - WIDESCREENDELTA, 170, manaPatch2); + V_DrawPatch(59 - WIDESCREENDELTA, 170, manaVialPatch1); + for (i = 171; i < 193 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) { for (j = 0; j <= crispy->hires; j++) for (k = 0; k <= crispy->hires; k++) @@ -1597,8 +1597,8 @@ void DrawFullScreenStuff(void) + (62 << crispy->hires) + k] = 0; } } - V_DrawPatch(67 - WIDESCREENDELTA, 171, manaVialPatch2); - for (i = 172; i < 194 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) + V_DrawPatch(67 - WIDESCREENDELTA, 170, manaVialPatch2); + for (i = 171; i < 193 - (22 * CPlayer->mana[1]) / MAX_MANA; i++) { for (j = 0; j <= crispy->hires; j++) for (k = 0; k <= crispy->hires; k++) @@ -1618,26 +1618,26 @@ void DrawFullScreenStuff(void) CPlayer->armorpoints[ARMOR_HELMET] + CPlayer->armorpoints[ARMOR_AMULET]; oldarmor = temp; - DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 183); + DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 182); // Weapon Pieces if (CPlayer->pieces == 7) { - V_DrawPatch(228 + WIDESCREENDELTA, 169, PatchWEAPONFULL); + V_DrawPatch(228 + WIDESCREENDELTA, 168, PatchWEAPONFULL); } else { - V_DrawPatch(228 + WIDESCREENDELTA, 169, PatchWEAPONSLOT); + V_DrawPatch(228 + WIDESCREENDELTA, 168, PatchWEAPONSLOT); if (CPlayer->pieces & WPIECE1) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0] + 38 + WIDESCREENDELTA, 169, PatchPIECE1); + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][0] + 38 + WIDESCREENDELTA, 168, PatchPIECE1); } if (CPlayer->pieces & WPIECE2) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1] + 38 + WIDESCREENDELTA, 169, PatchPIECE2); + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][1] + 38 + WIDESCREENDELTA, 168, PatchPIECE2); } if (CPlayer->pieces & WPIECE3) { - V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 169, PatchPIECE3); + V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 168, PatchPIECE3); } } // Items, Itemflash and Selection Bar @@ -1645,18 +1645,18 @@ void DrawFullScreenStuff(void) { if (ArtifactFlash) { - V_DrawPatch(186 + WIDESCREENDELTA, 171, W_CacheLumpNum(W_GetNumForName("useartia") + V_DrawPatch(113 - WIDESCREENDELTA, 170, W_CacheLumpNum(W_GetNumForName("useartia") + ArtifactFlash - 1, PU_CACHE)); ArtifactFlash--; } else if (CPlayer->readyArtifact > 0) { - V_DrawPatch(181 + WIDESCREENDELTA, 170, + V_DrawPatch(108 - WIDESCREENDELTA, 169, W_CacheLumpName(patcharti[CPlayer->readyArtifact], PU_CACHE)); if (CPlayer->inventory[inv_ptr].count > 1) { - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 200 + WIDESCREENDELTA, 191); + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 127 - WIDESCREENDELTA, 190); } } } @@ -1665,31 +1665,31 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawPatch(50 + i * 31, 169, W_CacheLumpName("ARTIBOX", + V_DrawPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX", PU_CACHE)); if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { - V_DrawPatch(49 + i * 31, 168, + V_DrawPatch(49 + i * 31, 167, W_CacheLumpName(patcharti [CPlayer->inventory[x + i].type], PU_CACHE)); if (CPlayer->inventory[x + i].count > 1) { DrSmallNumber(CPlayer->inventory[x + i].count, - 66 + i * 31, 189); + 66 + i * 31, 188); } } } - V_DrawPatch(50 + curpos * 31, 168, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 167, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(40, 168, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(40, 167, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(268, 168, !(leveltime & 4) ? + V_DrawPatch(268, 167, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } } From f89cc16b6cd3e6fc79bc13d99978b0fbd89e1dbe Mon Sep 17 00:00:00 2001 From: Noseey Date: Thu, 7 Nov 2024 17:46:46 +0100 Subject: [PATCH 19/23] Cirspy Hexen Hud - Inventory Bar Refinement Only draw health and ammo widget once the inventory is open. --- src/hexen/sb_bar.c | 125 ++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 63 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index 030a6b1f3..70432ba1d 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1502,7 +1502,68 @@ void DrawFullScreenStuff(void) { DrRedINumber(temp, 5 - WIDESCREENDELTA, 182); } - + // Armor + temp = AutoArmorSave[CPlayer->class] + + CPlayer->armorpoints[ARMOR_ARMOR] + + CPlayer->armorpoints[ARMOR_SHIELD] + + CPlayer->armorpoints[ARMOR_HELMET] + + CPlayer->armorpoints[ARMOR_AMULET]; + oldarmor = temp; + DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 182); + // Items, Itemflash and Selection Bar + if (!inventory) + { + if (ArtifactFlash) + { + V_DrawPatch(113 - WIDESCREENDELTA, 170, W_CacheLumpNum(W_GetNumForName("useartia") + + ArtifactFlash - 1, PU_CACHE)); + ArtifactFlash--; + } + else if (CPlayer->readyArtifact > 0) + { + V_DrawPatch(108 - WIDESCREENDELTA, 169, + W_CacheLumpName(patcharti[CPlayer->readyArtifact], + PU_CACHE)); + if (CPlayer->inventory[inv_ptr].count > 1) + { + DrSmallNumber(CPlayer->inventory[inv_ptr].count, 127 - WIDESCREENDELTA, 190); + } + } + } + else + { + x = inv_ptr - curpos; + for (i = 0; i < 7; i++) + { + V_DrawPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX", + PU_CACHE)); + if (CPlayer->inventorySlotNum > x + i + && CPlayer->inventory[x + i].type != arti_none) + { + V_DrawPatch(49 + i * 31, 167, + W_CacheLumpName(patcharti + [CPlayer->inventory[x + i].type], + PU_CACHE)); + if (CPlayer->inventory[x + i].count > 1) + { + DrSmallNumber(CPlayer->inventory[x + i].count, + 66 + i * 31, 188); + } + } + } + V_DrawPatch(50 + curpos * 31, 167, PatchSELECTBOX); + if (x != 0) + { + V_DrawPatch(40, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + PatchINVLFGEM2); + } + if (CPlayer->inventorySlotNum - x > 7) + { + V_DrawPatch(268, 167, !(leveltime & 4) ? + PatchINVRTGEM1 : PatchINVRTGEM2); + } + return; // Stop drawing further widgets + } // Frags if (deathmatch) { @@ -1516,7 +1577,6 @@ void DrawFullScreenStuff(void) } DrINumber(temp, 5 - WIDESCREENDELTA, 165); } - // Mana temp = CPlayer->mana[0]; DrSmallNumber(temp, 44 - WIDESCREENDELTA, 187); @@ -1611,14 +1671,6 @@ void DrawFullScreenStuff(void) + (70 << crispy->hires) + k] = 0; } } - // Armor - temp = AutoArmorSave[CPlayer->class] - + CPlayer->armorpoints[ARMOR_ARMOR] + - CPlayer->armorpoints[ARMOR_SHIELD] + - CPlayer->armorpoints[ARMOR_HELMET] + - CPlayer->armorpoints[ARMOR_AMULET]; - oldarmor = temp; - DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 182); // Weapon Pieces if (CPlayer->pieces == 7) { @@ -1640,59 +1692,6 @@ void DrawFullScreenStuff(void) V_DrawPatch(PieceX[PlayerClass[consoleplayer]][2] + 38 + WIDESCREENDELTA, 168, PatchPIECE3); } } - // Items, Itemflash and Selection Bar - if (!inventory) - { - if (ArtifactFlash) - { - V_DrawPatch(113 - WIDESCREENDELTA, 170, W_CacheLumpNum(W_GetNumForName("useartia") - + ArtifactFlash - 1, PU_CACHE)); - ArtifactFlash--; - } - else if (CPlayer->readyArtifact > 0) - { - V_DrawPatch(108 - WIDESCREENDELTA, 169, - W_CacheLumpName(patcharti[CPlayer->readyArtifact], - PU_CACHE)); - if (CPlayer->inventory[inv_ptr].count > 1) - { - DrSmallNumber(CPlayer->inventory[inv_ptr].count, 127 - WIDESCREENDELTA, 190); - } - } - } - else - { - x = inv_ptr - curpos; - for (i = 0; i < 7; i++) - { - V_DrawPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX", - PU_CACHE)); - if (CPlayer->inventorySlotNum > x + i - && CPlayer->inventory[x + i].type != arti_none) - { - V_DrawPatch(49 + i * 31, 167, - W_CacheLumpName(patcharti - [CPlayer->inventory[x + i].type], - PU_CACHE)); - if (CPlayer->inventory[x + i].count > 1) - { - DrSmallNumber(CPlayer->inventory[x + i].count, - 66 + i * 31, 188); - } - } - } - V_DrawPatch(50 + curpos * 31, 167, PatchSELECTBOX); - if (x != 0) - { - V_DrawPatch(40, 167, !(leveltime & 4) ? PatchINVLFGEM1 : - PatchINVLFGEM2); - } - if (CPlayer->inventorySlotNum - x > 7) - { - V_DrawPatch(268, 167, !(leveltime & 4) ? - PatchINVRTGEM1 : PatchINVRTGEM2); - } - } return; } if (CPlayer->mo->health > 0) From d0fd2023fb0802e21159664525c4c9e11e68f0bb Mon Sep 17 00:00:00 2001 From: Noseey Date: Thu, 7 Nov 2024 19:45:05 +0100 Subject: [PATCH 20/23] Intersect check for Hexen Crispy Hud Display frags even when inventory open, adding intersect check between ManaPatch2 and Gem1. --- src/hexen/sb_bar.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index 70432ba1d..c1623382c 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1484,6 +1484,8 @@ void DrawFullScreenStuff(void) if(screenblocks == 12) { int j, k; + int xPosGem1; + int xPosManaPatch2; patch_t *manaPatch1, *manaPatch2; patch_t *manaVialPatch1, *manaVialPatch2; @@ -1491,6 +1493,8 @@ void DrawFullScreenStuff(void) manaPatch2 = NULL; manaVialPatch1 = NULL; manaVialPatch2 = NULL; + xPosGem1 = 40; + xPosManaPatch2 = 75 - WIDESCREENDELTA; // Health temp = CPlayer->mo->health; @@ -1510,6 +1514,19 @@ void DrawFullScreenStuff(void) CPlayer->armorpoints[ARMOR_AMULET]; oldarmor = temp; DrINumber(FixedDiv(temp, 5 * FRACUNIT) >> FRACBITS, 288 + WIDESCREENDELTA, 182); + // Frags + if (deathmatch) + { + temp = 0; + for (i = 0; i < maxplayers; i++) + { + if (playeringame[i]) + { + temp += CPlayer->frags[i]; + } + } + DrINumber(temp, 5 - WIDESCREENDELTA, 165); + } // Items, Itemflash and Selection Bar if (!inventory) { @@ -1554,7 +1571,7 @@ void DrawFullScreenStuff(void) V_DrawPatch(50 + curpos * 31, 167, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(40, 167, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(xPosGem1, 167, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) @@ -1562,20 +1579,11 @@ void DrawFullScreenStuff(void) V_DrawPatch(268, 167, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } - return; // Stop drawing further widgets - } - // Frags - if (deathmatch) - { - temp = 0; - for (i = 0; i < maxplayers; i++) + // Check for Intersect + if (xPosManaPatch2 + 15 >= xPosGem1) { - if (playeringame[i]) - { - temp += CPlayer->frags[i]; - } + return; // Stop drawing further widgets } - DrINumber(temp, 5 - WIDESCREENDELTA, 165); } // Mana temp = CPlayer->mana[0]; @@ -1642,7 +1650,7 @@ void DrawFullScreenStuff(void) } } V_DrawPatch(42 - WIDESCREENDELTA, 170, manaPatch1); - V_DrawPatch(75 - WIDESCREENDELTA, 170, manaPatch2); + V_DrawPatch(xPosManaPatch2, 170, manaPatch2); V_DrawPatch(59 - WIDESCREENDELTA, 170, manaVialPatch1); for (i = 171; i < 193 - (22 * CPlayer->mana[0]) / MAX_MANA; i++) { From ccbc3c2f52050a5deb1dd03e75e6b8f4b047da61 Mon Sep 17 00:00:00 2001 From: Noseey Date: Mon, 18 Nov 2024 21:52:11 +0100 Subject: [PATCH 21/23] Fix Hexen Crispy-Hud Item-Alignment Fix Hexen Crispy-Hud Item-Alignment to match standard HUD. --- src/hexen/sb_bar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index c1623382c..d839703ec 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1557,14 +1557,14 @@ void DrawFullScreenStuff(void) if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { - V_DrawPatch(49 + i * 31, 167, + V_DrawPatch(48 + i * 31, 167, W_CacheLumpName(patcharti [CPlayer->inventory[x + i].type], PU_CACHE)); if (CPlayer->inventory[x + i].count > 1) { DrSmallNumber(CPlayer->inventory[x + i].count, - 66 + i * 31, 188); + 66 + i * 31, 189); } } } From 2b32c3682f0bbc87b7e78fa98473b22248d78c8b Mon Sep 17 00:00:00 2001 From: Noseey Date: Mon, 18 Nov 2024 22:03:05 +0100 Subject: [PATCH 22/23] Align Heretic Crispy-HUD Bar with Hexen To be consistent with the Hexen Crispy-Hud: - Align height of Heretic HUD Item Selection Bar with vanilla fullscreen hud - Don't draw Ammo and Jewels when Gem2 overlaps with Jewels --- src/heretic/sb_bar.c | 70 ++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 3499eaa21..fef14f34d 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1061,6 +1061,13 @@ void DrawFullScreenStuff(void) // TODO Do not always render, only if update needed if(screenblocks == 12) { + int xPosGem2; + int xPosKeys; + + xPosGem2 = 270; + xPosKeys = 214 + WIDESCREENDELTA; + + // Health temp = CPlayer->mo->health; if (temp > 0) { @@ -1070,30 +1077,9 @@ void DrawFullScreenStuff(void) { DrINumber(0, 5 - WIDESCREENDELTA, 180); } - // Ammo - temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; - if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) - { - V_DrawPatch(55 - WIDESCREENDELTA, 182, - W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), - PU_CACHE)); - DrINumber(temp, 53 - WIDESCREENDELTA, 172); - } - // Keys - if (CPlayer->keys[key_yellow]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_green]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); - } - if (CPlayer->keys[key_blue]) - { - V_DrawPatch(214 + WIDESCREENDELTA, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); - } // Armor DrINumber(CPlayer->armorpoints, 286 + WIDESCREENDELTA, 180); + // Frags if (deathmatch) { temp = 0; @@ -1106,6 +1092,7 @@ void DrawFullScreenStuff(void) } DrINumber(temp, 5 - WIDESCREENDELTA, 165); } + // Items, Itemflash and Selection Bar if (!inventory) { if (ArtifactFlash) @@ -1126,29 +1113,56 @@ void DrawFullScreenStuff(void) x = inv_ptr - curpos; for (i = 0; i < 7; i++) { - V_DrawPatch(50 + i * 31, 170, + V_DrawPatch(50 + i * 31, 168, W_CacheLumpName(DEH_String("ARTIBOX"), PU_CACHE)); if (CPlayer->inventorySlotNum > x + i && CPlayer->inventory[x + i].type != arti_none) { patch = DEH_String(patcharti[CPlayer->inventory[x + i].type]); - V_DrawPatch(50 + i * 31, 170, + V_DrawPatch(50 + i * 31, 168, W_CacheLumpName(patch, PU_CACHE)); DrSmallNumber(CPlayer->inventory[x + i].count, 69 + i * 31, - 192); + 190); } } - V_DrawPatch(50 + curpos * 31, 199, PatchSELECTBOX); + V_DrawPatch(50 + curpos * 31, 197, PatchSELECTBOX); if (x != 0) { - V_DrawPatch(38, 169, !(leveltime & 4) ? PatchINVLFGEM1 : + V_DrawPatch(38, 167, !(leveltime & 4) ? PatchINVLFGEM1 : PatchINVLFGEM2); } if (CPlayer->inventorySlotNum - x > 7) { - V_DrawPatch(269, 169, !(leveltime & 4) ? + V_DrawPatch(xPosGem2, 167, !(leveltime & 4) ? PatchINVRTGEM1 : PatchINVRTGEM2); } + // Check for Intersect + if (xPosGem2 + 10 >= xPosKeys) + { + return; // Stop drawing further widgets + } + } + // Ammo + temp = CPlayer->ammo[wpnlev1info[CPlayer->readyweapon].ammo]; + if (temp && CPlayer->readyweapon > 0 && CPlayer->readyweapon < 7) + { + V_DrawPatch(55 - WIDESCREENDELTA, 182, + W_CacheLumpName(DEH_String(ammopic[CPlayer->readyweapon - 1]), + PU_CACHE)); + DrINumber(temp, 53 - WIDESCREENDELTA, 172); + } + // Keys + if (CPlayer->keys[key_yellow]) + { + V_DrawPatch(xPosKeys, 174, W_CacheLumpName(DEH_String("ykeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_green]) + { + V_DrawPatch(xPosKeys, 182, W_CacheLumpName(DEH_String("gkeyicon"), PU_CACHE)); + } + if (CPlayer->keys[key_blue]) + { + V_DrawPatch(xPosKeys, 190, W_CacheLumpName(DEH_String("bkeyicon"), PU_CACHE)); } return; } From 087b2d2dea29b667daf10a64c7a5355399fde696 Mon Sep 17 00:00:00 2001 From: Noseey Date: Wed, 20 Nov 2024 22:05:01 +0100 Subject: [PATCH 23/23] Fixing PatchSELECTBOX Pos for Hexen Crispy-Hud Fixing PatchSELECTBOX Pos for Hexen Crispy-Hud by moving it 2px to the left to align with non-fullscreen standard hud. --- src/hexen/sb_bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index d839703ec..92a0bf591 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -1568,7 +1568,7 @@ void DrawFullScreenStuff(void) } } } - V_DrawPatch(50 + curpos * 31, 167, PatchSELECTBOX); + V_DrawPatch(48 + curpos * 31, 167, PatchSELECTBOX); if (x != 0) { V_DrawPatch(xPosGem1, 167, !(leveltime & 4) ? PatchINVLFGEM1 :