Removed gChangeAreaIndex as it is unused (and does nothing), and fixed thi and crashes (#187)

* Removed gChangeAreaIndex as it is unused, and fixed thi and crashes

* Fixes

* undo formatting

* Undid stones
This commit is contained in:
Emerald Lockdown 2022-09-18 19:28:09 -05:00 committed by GitHub
parent 64ef71e466
commit 3ec278639e
2 changed files with 7 additions and 6 deletions

View File

@ -60,7 +60,6 @@ u8 gRejectInstantWarp = 0;
s16 gChangeLevel = -1;
s16 gChangeLevelTransition = -1;
s16 gChangeAreaIndex = -1;
s16 gChangeActNum = -1;
static bool sFirstCastleGroundsMenu = true;
@ -1338,15 +1337,19 @@ void update_menu_level(void) {
gChangeLevel = curLevel;
gChangeActNum = 2;
} else if (curLevel == LEVEL_THI) {
gChangeLevel = curLevel;
gChangeAreaIndex = 2;
gChangeActNum = 6;
gChangeLevel = LEVEL_THI;
} else {
gChangeLevel = curLevel;
gChangeActNum = 6;
}
}
if (gCurrAreaIndex != 2 && gCurrLevelNum == LEVEL_THI) {
sWarpDest.type = WARP_TYPE_CHANGE_AREA;
sWarpDest.areaIdx = 2;
sWarpDest.nodeId = 0x0A;
}
// set sFirstCastleGroundsMenu to false to prevent wall hugging bug
if (curLevel != LEVEL_CASTLE_GROUNDS) {
sFirstCastleGroundsMenu = false;
@ -1455,7 +1458,6 @@ void update_menu_level(void) {
gChangeActNum = 2;
} else if (curLevel == LEVEL_THI) {
gChangeLevel = curLevel;
gChangeAreaIndex = 2;
gChangeActNum = 6;
} else {
gChangeLevel = curLevel;

View File

@ -78,7 +78,6 @@ extern void (*sTransitionUpdate)(s16 *);
extern u8 unused3[4];
extern s16 gChangeLevel;
extern s16 gChangeAreaIndex;
extern s16 gChangeActNum;
struct WarpDest {