mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
tr2/option: remove unused detail level code
This commit is contained in:
parent
5608095730
commit
f88273525d
5 changed files with 3 additions and 87 deletions
|
@ -28,6 +28,7 @@
|
|||
- fixed wrongly positioned doors in Ice Palace and Floating Islands, which caused invisible walls (#1963)
|
||||
- fixed picking up the Gong Hammer in Ice Palace sometimes not opening the nearby door (#1716)
|
||||
- fixed room 98 in Wreck of the Maria Doria not having water (#1939)
|
||||
- removed unused detail level option
|
||||
|
||||
## [0.6](https://github.com/LostArtefacts/TRX/compare/tr2-0.5...tr2-0.6) - 2024-11-06
|
||||
- added a fly cheat key (#1642)
|
||||
|
|
|
@ -4735,7 +4735,7 @@ typedef enum {
|
|||
0x004D9EBC - int32_t g_SavedGames;
|
||||
0x0051A2CC - TEXTSTRING *g_PasswordText1;
|
||||
0x0051A2D0 - int32_t g_PassportMode;
|
||||
0x0051A2D8 - TEXTSTRING *g_DetailText[5];
|
||||
0x0051A2D8 + TEXTSTRING *g_DetailText[5];
|
||||
0x0051A2F0 - TEXTSTRING *g_SoundText[4];
|
||||
0x0051A290 + TEXTSTRING *m_ControlsTextA[14]; // INPUT_ROLE_NUMBER_OF
|
||||
0x0051A258 + TEXTSTRING *g_ControlsTextB[14]; // INPUT_ROLE_NUMBER_OF
|
||||
|
@ -4753,7 +4753,7 @@ typedef enum {
|
|||
0x00466B80 - int16_t g_SavedLevels[24]; // MAX_LEVELS
|
||||
0x004654E8 - int16_t g_Inv_MainQtys[];
|
||||
0x00465578 - int16_t g_Inv_KeysQtys[];
|
||||
0x0046773C - int32_t g_DetailLevel;
|
||||
0x0046773C + int32_t g_DetailLevel;
|
||||
0x0051A250 + int32_t g_LayoutPage;
|
||||
0x0051A24C + int32_t g_KeySelector;
|
||||
0x0051A248 + int32_t g_KeyCursor;
|
||||
|
|
|
@ -2762,13 +2762,6 @@ int32_t __cdecl LevelCompleteSequence(void)
|
|||
void __cdecl S_LoadSettings(void)
|
||||
{
|
||||
OpenGameRegistryKey("Game");
|
||||
|
||||
{
|
||||
DWORD tmp;
|
||||
GetRegistryDwordValue("DetailLevel", &tmp, 1);
|
||||
g_DetailLevel = tmp;
|
||||
}
|
||||
|
||||
GetRegistryFloatValue("Sizer", &g_GameSizerCopy, 1.0);
|
||||
CloseGameRegistryKey();
|
||||
}
|
||||
|
@ -2776,7 +2769,6 @@ void __cdecl S_LoadSettings(void)
|
|||
void __cdecl S_SaveSettings(void)
|
||||
{
|
||||
OpenGameRegistryKey("Game");
|
||||
SetRegistryDwordValue("DetailLevel", g_DetailLevel);
|
||||
SetRegistryFloatValue("Sizer", g_GameSizerCopy);
|
||||
CloseGameRegistryKey();
|
||||
}
|
||||
|
|
|
@ -4,85 +4,10 @@
|
|||
#include "global/funcs.h"
|
||||
#include "global/vars.h"
|
||||
|
||||
static void M_InitText(void);
|
||||
static void M_ShutdownText(void);
|
||||
|
||||
static void M_InitText(void)
|
||||
{
|
||||
g_DetailText[0] =
|
||||
Text_Create(0, 50, g_GF_GameStrings[GF_S_GAME_DETAIL_LOW]);
|
||||
g_DetailText[1] =
|
||||
Text_Create(0, 25, g_GF_GameStrings[GF_S_GAME_DETAIL_MEDIUM]);
|
||||
g_DetailText[2] =
|
||||
Text_Create(0, 0, g_GF_GameStrings[GF_S_GAME_DETAIL_HIGH]);
|
||||
|
||||
g_DetailText[3] = Text_Create(0, -32, " ");
|
||||
Text_AddBackground(g_DetailText[3], 160, 107, 0, 0, TS_BACKGROUND);
|
||||
Text_AddOutline(g_DetailText[3], TS_BACKGROUND);
|
||||
|
||||
g_DetailText[4] =
|
||||
Text_Create(0, -30, g_GF_GameStrings[GF_S_GAME_DETAIL_SELECT_DETAIL]);
|
||||
Text_AddBackground(g_DetailText[4], 156, 0, 0, 0, TS_HEADING);
|
||||
Text_AddOutline(g_DetailText[4], TS_HEADING);
|
||||
|
||||
Text_AddBackground(g_DetailText[g_DetailLevel], 148, 0, 0, 0, TS_REQUESTED);
|
||||
Text_AddOutline(g_DetailText[g_DetailLevel], TS_REQUESTED);
|
||||
|
||||
for (int32_t i = 0; i < 5; i++) {
|
||||
Text_CentreH(g_DetailText[i], 1);
|
||||
Text_CentreV(g_DetailText[i], 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void M_ShutdownText(void)
|
||||
{
|
||||
for (int32_t i = 0; i < 5; i++) {
|
||||
Text_Remove(g_DetailText[i]);
|
||||
g_DetailText[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl Option_Detail(INVENTORY_ITEM *const item)
|
||||
{
|
||||
if (g_DetailText[0] == NULL) {
|
||||
M_InitText();
|
||||
}
|
||||
|
||||
if (g_InputDB.back && g_DetailLevel > 0) {
|
||||
Text_RemoveOutline(g_DetailText[g_DetailLevel]);
|
||||
Text_RemoveBackground(g_DetailText[g_DetailLevel]);
|
||||
g_DetailLevel--;
|
||||
Text_AddOutline(g_DetailText[g_DetailLevel], TS_REQUESTED);
|
||||
Text_AddBackground(
|
||||
g_DetailText[g_DetailLevel], 148, 0, 0, 0, TS_REQUESTED);
|
||||
}
|
||||
if (g_InputDB.forward && g_DetailLevel < 2) {
|
||||
Text_RemoveOutline(g_DetailText[g_DetailLevel]);
|
||||
Text_RemoveBackground(g_DetailText[g_DetailLevel]);
|
||||
g_DetailLevel++;
|
||||
Text_AddOutline(g_DetailText[g_DetailLevel], TS_REQUESTED);
|
||||
Text_AddBackground(
|
||||
g_DetailText[g_DetailLevel], 148, 0, 0, 0, TS_REQUESTED);
|
||||
}
|
||||
|
||||
switch (g_DetailLevel) {
|
||||
case 0:
|
||||
g_PerspectiveDistance = 0;
|
||||
break;
|
||||
case 1:
|
||||
g_PerspectiveDistance = 0x3000000;
|
||||
break;
|
||||
case 2:
|
||||
g_PerspectiveDistance = 0x14000000;
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_InputDB.menu_confirm || g_InputDB.menu_back) {
|
||||
M_ShutdownText();
|
||||
}
|
||||
}
|
||||
|
||||
void Option_Detail_Shutdown(void)
|
||||
{
|
||||
M_ShutdownText();
|
||||
}
|
||||
|
|
|
@ -110,7 +110,6 @@
|
|||
#define g_DumpY (*(int16_t*)0x00466BE6)
|
||||
#define g_DumpWidth (*(int16_t*)0x00466BE8)
|
||||
#define g_DumpHeight (*(int16_t*)0x00466BEA)
|
||||
#define g_DetailLevel (*(int32_t*)0x0046773C)
|
||||
#define g_MidSort (*(int32_t*)0x0046C300) // = 0
|
||||
#define g_ViewportAspectRatio (*(float*)0x0046C304) // = 0.0f
|
||||
#define g_XGenY1 (*(int32_t*)0x0046C308)
|
||||
|
@ -371,7 +370,6 @@
|
|||
#define g_ScreenshotCounter (*(int32_t*)0x0051A240)
|
||||
#define g_PasswordText1 (*(TEXTSTRING **)0x0051A2CC)
|
||||
#define g_PassportMode (*(int32_t*)0x0051A2D0)
|
||||
#define g_DetailText (*(TEXTSTRING *(*)[5])0x0051A2D8)
|
||||
#define g_SoundText (*(TEXTSTRING *(*)[4])0x0051A2F0)
|
||||
#define g_WaterPalette (*(RGB_888(*)[256])0x0051B308)
|
||||
#define g_PicturePalette (*(RGB_888(*)[256])0x0051B608)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue