diff --git a/config/symbols.hd.txt b/config/symbols.hd.txt index 03d20468c..572dab34b 100644 --- a/config/symbols.hd.txt +++ b/config/symbols.hd.txt @@ -960,6 +960,10 @@ g_unkGraphicsStruct = 0x80097408; g_BottomCornerTextTimer = 0x80097410; g_BottomCornerTextPrims = 0x80097414; g_entityDestroyed = 0x80097428; +D_80097488 = 0x80097488; +D_8009748A_x_i_hi = 0x8009748A; +D_8009748C_y_val = 0x8009748C; +D_8009748E_y_i_hi = 0x8009748E; g_pads = 0x80097490; g_pads_0_released = 0x80097492; g_pads_0_tapped = 0x80097494; diff --git a/config/symbols.us.txt b/config/symbols.us.txt index 407fd5bdc..fcfac2d4a 100644 --- a/config/symbols.us.txt +++ b/config/symbols.us.txt @@ -988,6 +988,10 @@ g_unkGraphicsStruct = 0x80097408; g_BottomCornerTextTimer = 0x80097410; g_BottomCornerTextPrims = 0x80097414; g_entityDestroyed = 0x80097428; +D_80097488 = 0x80097488; +D_8009748A_x_i_hi = 0x8009748A; +D_8009748C_y_val = 0x8009748C; +D_8009748E_y_i_hi = 0x8009748E; g_pads = 0x80097490; g_pads_0_released = 0x80097492; g_pads_0_tapped = 0x80097494; diff --git a/include/game.h b/include/game.h index d25f53319..b676c718d 100644 --- a/include/game.h +++ b/include/game.h @@ -468,6 +468,11 @@ typedef void (*PfnEntityUpdate)(struct Entity*); #include "unkstruct.h" +typedef struct { + f32 x; + f32 y; +} Pos; + typedef struct { f32 posX; f32 posY; @@ -1575,16 +1580,7 @@ extern s32 D_80097420[]; extern s32 D_80097424; extern s32 D_80097448[]; // underwater physics. 7448 and 744C. Could be struct. extern s32 D_80097450; -extern s32 D_80097488; -// Overlapping data, worth further investigation -extern u16 D_8009748A[]; -extern s32 D_8009748C; - -/* - * Elevator moving, "underflowed" to 0xFF - * when going up, 0x1 when going up - */ -extern u16 D_8009748E[]; +extern Pos D_80097488; extern Pad g_pads[PAD_COUNT]; extern Stages g_StageId; extern s32 D_800974A4; // map open diff --git a/src/dra/5087C.c b/src/dra/5087C.c index c189fcf7e..299b57010 100644 --- a/src/dra/5087C.c +++ b/src/dra/5087C.c @@ -1121,8 +1121,8 @@ void func_800F298C(void) { g_api.o.TestCollisions(); D_8013759C = PLAYER.posX.i.hi; g_Player.unk7C = PLAYER.posX.i.hi; - D_80097488 = 0; - D_8009748C = 0; + D_80097488.x.val = 0; + D_80097488.y.val = 0; D_801375A0 = PLAYER.posY.i.hi; g_Player.unk7E = PLAYER.posY.i.hi; if ((g_StageId == STAGE_ST0) || @@ -1221,8 +1221,8 @@ void func_800F298C(void) { D_801375B8 = D_801375B0 - g_Tilemap.cameraY.i.hi; D_801375A4 = D_8013759C - PLAYER.posX.val; D_801375A8 = D_801375A0 - PLAYER.posY.val; - D_801375A4 -= D_80097488; - D_801375A8 -= D_8009748C; + D_801375A4 -= D_80097488.x.val; + D_801375A8 -= D_80097488.y.val; func_800F0940(); for (i = 0, ent = &g_Entities[0]; i < LEN(g_Entities); i++, ent++) { diff --git a/src/st/cen/D600.c b/src/st/cen/D600.c index da0df0e44..0d65fd112 100644 --- a/src/st/cen/D600.c +++ b/src/st/cen/D600.c @@ -614,7 +614,7 @@ void EntityPlatform(Entity* self) { if (temp_v0 > 496) { self->posY.i.hi--; player->posY.i.hi--; - D_8009748E[0]--; + D_80097488.y.i.hi--; } else { g_api.PlaySfx(SE_CEN_PLATFORM_STOP); if (player->facingLeft == 0) { @@ -653,7 +653,7 @@ void EntityPlatform(Entity* self) { if (temp_v0 < 592) { self->posY.i.hi++; player->posY.i.hi++; - *D_8009748A += 1; + D_80097488.x.i.hi++; } else { D_8003C8B8 = 1; if (*D_80097400 != 0) { diff --git a/src/st/np3/3246C.c b/src/st/np3/3246C.c index 14448d430..e2e6934d1 100644 --- a/src/st/np3/3246C.c +++ b/src/st/np3/3246C.c @@ -570,8 +570,8 @@ void EntityCavernDoorPlatform(Entity* self) { temp -= self->ext.generic.unk88.S16.unk2; player->posX.i.hi += temp; player->posY.i.hi++; - D_8009748A[0] += temp; - D_8009748A[2] += 1; + D_80097488.x.i.hi += temp; + D_80097488.y.i.hi += 1; } self->ext.generic.unk88.unk = self->posX.val; self->ext.generic.unk8C.modeS32 = self->posY.val; diff --git a/src/st/nz0/30958.c b/src/st/nz0/30958.c index b3686aa85..db30d9f6a 100644 --- a/src/st/nz0/30958.c +++ b/src/st/nz0/30958.c @@ -1014,7 +1014,7 @@ void EntityElevator2(Entity* self) { self->posY.i.hi = 96 - camY; } else if (temp != 0) { g_Entities[player].posY.i.hi--; - D_8009748E[0]--; + D_80097488.y.i.hi--; } } else { self->posY.i.hi++; @@ -1023,7 +1023,7 @@ void EntityElevator2(Entity* self) { self->posY.i.hi = 216 - camY; } else if (temp != 0) { g_Entities[player].posY.i.hi++; - D_8009748E[0]++; + D_80097488.y.i.hi++; } } } diff --git a/src/st/nz0/36DE4.c b/src/st/nz0/36DE4.c index ca0dd2f75..2f88b60f9 100644 --- a/src/st/nz0/36DE4.c +++ b/src/st/nz0/36DE4.c @@ -178,7 +178,7 @@ void EntityElevator(Entity* self) { if (temp != 0) { g_api.func_8010DFF0(0, 1); g_Entities[player].posY.i.hi--; - D_8009748E[0]--; + D_80097488.y.i.hi--; } } else { self->posY.i.hi = y; @@ -198,7 +198,7 @@ void EntityElevator(Entity* self) { if (temp != 0) { g_api.func_8010DFF0(0, 1); g_Entities[player].posY.i.hi++; - D_8009748E[0]++; + D_80097488.y.i.hi++; } break; }