From 4b1588594b39feaf147da8465b8cae80a2df1e4a Mon Sep 17 00:00:00 2001 From: Troye Date: Tue, 5 Apr 2022 22:06:42 -0500 Subject: [PATCH 1/2] add customizable loading txt; --- CHANGELOG.md | 1 + TOMB5/global/types.h | 1 + TOMB5/specific/output.cpp | 11 +++++++++++ TOMB5/tomb5/tomb5.cpp | 10 ++++++++++ TOMB5/tomb5/troyestuff.cpp | 21 ++++++++++++++++++--- 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2773b37f..f4159309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Make mono screen (inventory background) style customizable. - Allow quick reloading while dead. - Extend the time it takes for the death menu to pop up. +- Add optional loading text. ## [2.2.0](https://github.com/Trxyebeep/TOMB5/tree/V2.2.0) (Jan. 11 2022) diff --git a/TOMB5/global/types.h b/TOMB5/global/types.h index 914909aa..d2994c06 100644 --- a/TOMB5/global/types.h +++ b/TOMB5/global/types.h @@ -2417,6 +2417,7 @@ struct tomb5_options //only bools or ulongs because that's what registry likes bool tr4_loadscreens; //on off bool tr4_loadbar; //on off ulong inv_bg_mode; //1-> original, 2->TR4, 3-> clear + bool loadingtxt; //on off }; #endif #pragma pack(pop) diff --git a/TOMB5/specific/output.cpp b/TOMB5/specific/output.cpp index 2517f7b9..8280af0a 100644 --- a/TOMB5/specific/output.cpp +++ b/TOMB5/specific/output.cpp @@ -12,6 +12,7 @@ #include "../tomb5/tomb5.h" #include "../game/draw.h" #include "../game/health.h" +#include "../game/text.h" #endif void S_DrawPickup(short object_number) @@ -1203,6 +1204,11 @@ void RenderLoadPic(long unused) phd_LookAt(camera.pos.x, camera.pos.y, camera.pos.z, camera.target.x, camera.target.y, camera.target.z, 0); S_InitialisePolyList(); RenderIt(camera.pos.room_number); + + if (tomb5.loadingtxt && tomb5.tr4_loadbar) + PrintString((ushort)phd_centerx, ushort((float((480 - (font_height >> 1)) * float(phd_winymax / 480.0F))) - (font_height >> 1)), + 5, SCRIPT_TEXT(STR_LOADING), FF_CENTER); + S_OutputPolyList(); S_DumpScreen(); @@ -1211,6 +1217,11 @@ void RenderLoadPic(long unused) phd_LookAt(camera.pos.x, camera.pos.y, camera.pos.z, camera.target.x, camera.target.y, camera.target.z, 0); S_InitialisePolyList(); RenderIt(camera.pos.room_number); + + if (tomb5.loadingtxt && tomb5.tr4_loadbar) + PrintString((ushort)phd_centerx, ushort((float((480 - (font_height >> 1)) * float(phd_winymax / 480.0F))) - (font_height >> 1)), + 5, SCRIPT_TEXT(STR_LOADING), FF_CENTER); + S_OutputPolyList(); S_DumpScreen(); #endif diff --git a/TOMB5/tomb5/tomb5.cpp b/TOMB5/tomb5/tomb5.cpp index 31db87c7..cb1299f8 100644 --- a/TOMB5/tomb5/tomb5.cpp +++ b/TOMB5/tomb5/tomb5.cpp @@ -90,6 +90,10 @@ void init_tomb5_stuff() sprintf(buf, "inv_bgM"); tomb5.inv_bg_mode = 1; //original REG_WriteLong(buf, tomb5.inv_bg_mode); + + sprintf(buf, "loadtxt"); + tomb5.loadingtxt = 1; //on + REG_WriteBool(buf, tomb5.loadingtxt); } else //Key already exists, settings already written, read them. also falls back to default if a smartass manually deletes a single value { @@ -149,6 +153,9 @@ void init_tomb5_stuff() sprintf(buf, "inv_bgM"); REG_ReadLong(buf, tomb5.inv_bg_mode, 1); + + sprintf(buf, "loadtxt"); + REG_ReadBool(buf, tomb5.loadingtxt, 1); } CloseRegistry(); @@ -216,6 +223,9 @@ void save_new_tomb5_settings() sprintf(buf, "inv_bgM"); REG_WriteLong(buf, tomb5.inv_bg_mode); + sprintf(buf, "loadtxt"); + REG_WriteBool(buf, tomb5.loadingtxt); + CloseRegistry(); } diff --git a/TOMB5/tomb5/troyestuff.cpp b/TOMB5/tomb5/troyestuff.cpp index 3ee408b4..9c3ff67b 100644 --- a/TOMB5/tomb5/troyestuff.cpp +++ b/TOMB5/tomb5/troyestuff.cpp @@ -5,7 +5,7 @@ #include "tomb5.h" #define PAGE0_NUM 14 -#define PAGE1_NUM 5 +#define PAGE1_NUM 6 void TroyeMenu(long textY, long& menu, ulong& selection, ulong selection_bak) { @@ -365,7 +365,8 @@ bool Page1(long& num, long textY, ulong selection) PrintString(phd_centerx >> 2, ushort(textY + 3 * font_height), selection & 2 ? 1 : 2, "PSX skies", 0); PrintString(phd_centerx >> 2, ushort(textY + 4 * font_height), selection & 4 ? 1 : 2, "TR4 loadscreens", 0); PrintString(phd_centerx >> 2, ushort(textY + 5 * font_height), selection & 8 ? 1 : 2, "loadbar style", 0); - PrintString(phd_centerx >> 2, ushort(textY + 6 * font_height), selection & 16 ? 1 : 2, "mono screen style", 0); + PrintString(phd_centerx >> 2, ushort(textY + 6 * font_height), selection & 0x10 ? 1 : 2, "mono screen style", 0); + PrintString(phd_centerx >> 2, ushort(textY + 7 * font_height), selection & 0x20 ? 1 : 2, "Loading text", 0); strcpy(buffer, tomb5.crawltilt ? "on" : "off"); PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 2 * font_height), selection & 1 ? 1 : 6, buffer, 0); @@ -380,7 +381,10 @@ bool Page1(long& num, long textY, ulong selection) PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 5 * font_height), selection & 8 ? 1 : 6, buffer, 0); strcpy(buffer, tomb5.inv_bg_mode == 1 ? "original" : tomb5.inv_bg_mode == 2 ? "TR4" : "clear"); - PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 6 * font_height), selection & 16 ? 1 : 6, buffer, 0); + PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 6 * font_height), selection & 0x10 ? 1 : 6, buffer, 0); + + strcpy(buffer, tomb5.loadingtxt ? "on" : "off"); + PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 7 * font_height), selection & 0x20 ? 1 : 6, buffer, 0); switch (selection) { @@ -452,6 +456,17 @@ bool Page1(long& num, long textY, ulong selection) changed = 1; } + break; + + case 1 << 5: + + if (dbinput & IN_LEFT || dbinput & IN_RIGHT) + { + SoundEffect(SFX_MENU_SELECT, 0, SFX_ALWAYS); + tomb5.loadingtxt = !tomb5.loadingtxt; + changed = 1; + } + break; } From 3eb5730f5bd14235a30517e046b90ad1a30db955 Mon Sep 17 00:00:00 2001 From: Troye <38836940+Trxyebeep@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:17:35 -0500 Subject: [PATCH 2/2] Update USING.md --- USING.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/USING.md b/USING.md index 12b52473..9ca92729 100644 --- a/USING.md +++ b/USING.md @@ -31,6 +31,7 @@ ## New options menu: *accessible through the title options menu/pause options menu* +# page 1 ### 1. FootPrints: - Toggles footprints on and off. @@ -97,3 +98,35 @@ Changes the positions of the bars on the screen. ### 12. TR4 Camera: - Toggles TR4 camera behavior on and off. + +### 13. Bar Mode: +Determines the mode of the bars. +- original: original TR4 bars. +- TR5: TR5 bar colors. +- PSX: PSX bar colors. + +# page 2 + +### 14. Crawl Tilting: +- Toggles Lara tilting while crawling on sloped surfaces. + +### 15. PSX Skies: +- Toggles using the PSX sprite for the sky. + +### 16. TR4 loadscreens: +- Toggles using original picture or new TR4 style loading screens. + +### 17. Loadbar style: +Determines the style of the loading bar in the loading screens. +- TR4: big bar, like TR4. +- TR5: original small TR5 bar. + +### 18. mono screen style: +Determines the style of the inventory/pause menu background. +- original: The original yellow-ish style. +- TR4: The TR4 black and white. +- Clear: Clear game screen as is, no color modification. + +### 19. Loading text: +- Toggles the "Loading" text in loading screens. +Note: TR5 loadbar style will ignore this option and never show the text. This is intentional and will not change.