Discover g_zEntityCenter field

This commit is contained in:
Luciano Ciccariello 2022-10-29 01:13:38 +01:00
parent 7316de85a6
commit c91276ad56
11 changed files with 15 additions and 18 deletions

View File

@ -175,7 +175,7 @@ MAD_PATCHES = \
-e "s/D_8007E9CC/D_8007EF1C/g" -e "s/0x8007E9CC/0x8007EF1C/g" \
-e "s/D_80086A9C/D_80086FEC/g" -e "s/0x80086A9C/0x80086FEC/g" \
-e "s/D_80096EA8/D_800973F8/g" -e "s/0x80096EA8/0x800973F8/g" \
-e "s/D_80096EB8/D_80097408/g" -e "s/0x80096EB8/0x80097408/g" \
-e "s/D_80096EB8/g_zEntityCenter/g" -e "s/0x80096EB8/0x80097408/g" \
-e "s/D_80096EC0/D_80097410/g" -e "s/0x80096EC0/0x80097410/g" \
-e "s/D_80096EC4/D_80097414/g" -e "s/0x80096EC4/0x80097414/g" \
-e "s/D_80097364/g_randomNext/g" -e "s/0x80097364/0x800978b8/g" \

View File

@ -40,7 +40,7 @@ g_pStrObjLayout18 = 0x80181AF8;
g_pStrObjLayout19 = 0x80181BA2;
g_pStrObjLayout20 = 0x80181C4C;
g_pStrObjLayout21 = 0x80181CF6;
EntityCandle = 0x8018E830;
EntityBreakable = 0x8018E830;
Random = 0x8018E964;
UpdateStageEntities = 0x8018E994;
func_8018EDB8 = 0x8018EDB8;

View File

@ -5,7 +5,7 @@ DestroyEntityFromIndex = 0x801C4CD0;
LoadObjLayout = 0x801C3C98;
g_pStObjLayout = 0x8018077C;
g_stRooms = 0x80183CC4;
EntityCandle = 0x801B7A64;
EntityBreakable = 0x801B7A64;
Random = 0x801C184C;
UpdateStageEntities = 0x801C187C;
EntityDamage = 0x801C2D98;

View File

@ -1,7 +1,5 @@
PfnEntityUpdates = 0x801808CC;
LoadObjLayout = 0x801BB508;
g_pStObjLayout = 0x80180728;
EntityCandle = 0x801B26FC;
EntityBreakable = 0x801B26FC;
UpdateStageEntities = 0x801B90EC;
EntityDamage = 0x801BA608;
SpawnExplosionEntity = 0x801BB734;

View File

@ -3,7 +3,7 @@ PfnEntityUpdates = 0x801803E0;
c_GoldPrizes = 0x80180E30;
c_HeartPrizes = 0x80180EC0;
g_stRooms = 0x801811AC;
EntityCandle = 0x8018726C;
EntityBreakable = 0x8018726C;
Random = 0x801881E8;
UpdateStageEntities = 0x80188218;
CreateEntity = 0x80189DD8;

View File

@ -897,7 +897,7 @@ playerY = 0x800973F4;
D_800973F8 = 0x800973F8;
D_800973FC = 0x800973FC;
D_80097400 = 0x80097400;
D_80097408 = 0x80097408;
g_zEntityCenter = 0x80097408;
D_8009740C = 0x8009740C;
D_80097410 = 0x80097410;
D_80097414 = 0x80097414;

View File

@ -472,7 +472,7 @@ extern Entity D_800762D8[]; // D_800733D8 + 0x40
extern Unkstruct8 g_CurrentRoomTileLayout;
extern Entity D_8007A958[];
extern Entity D_8007D858[];
extern u16 D_80097408;
extern u16 g_zEntityCenter;
extern s32 D_80097428[];
extern Entity D_8007EF1C;
extern void* D_8007EFD8;

View File

@ -109,7 +109,7 @@ void func_80191D00(Entity* entity) {
}
} else {
func_8019B0B8(D_80180458);
entity->zPriority = D_80097408 - 20;
entity->zPriority = g_zEntityCenter - 20;
entity->blendMode = D_80180650[temp_s0];
entity->hitboxHeight = D_80180630[temp_s0];
entity->animationSet = D_80180640[temp_s0];
@ -651,7 +651,7 @@ void func_8019B0B8(u16* arg0) {
D_8006C3B8->unk2E = 0;
D_8006C3B8->initState++;
if (D_8006C3B8->zPriority == 0) {
D_8006C3B8->zPriority = D_80097408 - 0xC;
D_8006C3B8->zPriority = g_zEntityCenter - 0xC;
}
}

View File

@ -74,7 +74,7 @@ void EntityBreakable(Entity* entity) {
}
} else {
InitializeEntity(D_80180AAC);
entity->zPriority = D_80097408 - 0x14;
entity->zPriority = g_zEntityCenter - 0x14;
entity->blendMode = D_80180E90[temp_s0];
entity->hitboxHeight = D_80180E70[temp_s0];
entity->animationSet = D_80180E80[temp_s0];
@ -568,7 +568,7 @@ void InitializeEntity(u16* arg0) {
D_8006C3B8->unk2E = 0;
D_8006C3B8->initState++;
if (D_8006C3B8->zPriority == 0) {
D_8006C3B8->zPriority = D_80097408 - 0xC;
D_8006C3B8->zPriority = g_zEntityCenter - 0xC;
}
}

View File

@ -39,8 +39,7 @@ void func_801B246C(Entity* arg0) {
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", func_801B2540);
void EntityCandle(Entity* entity) {
u16 temp_s0 = entity->subId >> 0xC;
void EntityBreakable(Entity* entity) {
if (entity->initState) {
AnimateEntity(D_80180E28[temp_s0], entity);
if (entity->unk44) { // If the candle is destroyed
@ -367,7 +366,7 @@ void InitializeEntity(u16* arg0) {
D_8006C3B8->unk2E = 0;
D_8006C3B8->initState++;
if (D_8006C3B8->zPriority == 0) {
D_8006C3B8->zPriority = D_80097408 - 0xC;
D_8006C3B8->zPriority = g_zEntityCenter - 0xC;
}
}

View File

@ -152,7 +152,7 @@ void EntityBreakable(Entity* entity) {
}
} else {
InitializeEntity(D_80180440);
entity->zPriority = D_80097408 - 0x14;
entity->zPriority = g_zEntityCenter - 0x14;
entity->blendMode = D_801805F8[temp_s0];
entity->hitboxHeight = D_801805D8[temp_s0];
entity->animationSet = D_801805E8[temp_s0];
@ -705,7 +705,7 @@ void InitializeEntity(u16* arg0) {
D_8006C3B8->unk2E = 0;
D_8006C3B8->initState++;
if (D_8006C3B8->zPriority == 0) {
D_8006C3B8->zPriority = D_80097408 - 0xC;
D_8006C3B8->zPriority = g_zEntityCenter - 0xC;
}
}