summaryrefslogtreecommitdiff
path: root/src/code/z_map_exp.c
diff options
context:
space:
mode:
authorRoman971 <32455037+Roman971@users.noreply.github.com>2020-08-23 23:50:30 +0200
committerGitHub <noreply@github.com>2020-08-23 17:50:30 -0400
commit49609dd78bb586c8ab3349105ceedeb2eb0d91ea (patch)
treec076c98bff5e83feb342219344ed027718519acf /src/code/z_map_exp.c
parent281aaa0cb6a55f19eceb322871a8d27da9e0e8b2 (diff)
Match/Improve a bunch of non matchings (#342)
Diffstat (limited to 'src/code/z_map_exp.c')
-rw-r--r--src/code/z_map_exp.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c
index 17d2ef1f0..301bda17b 100644
--- a/src/code/z_map_exp.c
+++ b/src/code/z_map_exp.c
@@ -8,7 +8,6 @@ s16 sPlayerInitialPosX = 0;
s16 sPlayerInitialPosZ = 0;
s16 sPlayerInitialDirection = 0;
s16 sEntranceIconMapIndex = 0;
-s16 sLastRoomNum = 99;
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx) {
Player* player = PLAYER;
@@ -515,9 +514,8 @@ s16 Map_GetFloorTextIndexOffset(s32 mapIndex, s32 floor) {
return gMapData->floorTexIndexOffset[mapIndex][floor];
}
-#ifdef NON_MATCHING
-// single extra load instruction
void Map_Update(GlobalContext* globalCtx) {
+ static s16 sLastRoomNum = 99;
Player* player = PLAYER;
s32 mapIndex = gSaveContext.mapIndex;
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
@@ -536,13 +534,6 @@ void Map_Update(GlobalContext* globalCtx) {
case SCENE_HAKADAN:
case SCENE_HAKADANCH:
case SCENE_ICE_DOUKUTO:
- case SCENE_GANON:
- case SCENE_MEN:
- case SCENE_GERUDOWAY:
- case SCENE_GANONTIKA:
- case SCENE_GANON_SONOGO:
- case SCENE_GANONTIKA_SONOGO:
- case SCENE_TAKARAYA:
interfaceCtx->unk_140[30] = 0;
if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
interfaceCtx->unk_140[31] = 1;
@@ -568,7 +559,6 @@ void Map_Update(GlobalContext* globalCtx) {
// Translates to "Current floor = %d Current room = %x Number of rooms = %d"
osSyncPrintf("現在階=%d 現在部屋=%x 部屋数=%d\n", floor, interfaceCtx->mapRoomNum,
gMapData->switchEntryCount[mapIndex]);
- if (interfaceCtx->mapRoomNum) {} // Improves codegen but may not be necessary
sLastRoomNum = interfaceCtx->mapRoomNum;
}
@@ -602,6 +592,3 @@ void Map_Update(GlobalContext* globalCtx) {
}
}
}
-#else
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/Map_Update.s")
-#endif