Document entities

This commit is contained in:
Luciano Ciccariello 2023-01-05 19:35:01 +00:00
parent a45aa2a4b6
commit 51daf68981
15 changed files with 171 additions and 138 deletions

View File

@ -22,11 +22,11 @@ CollectHeartVessel = 0x8019BCAC;
CollectLifeVessel = 0x8019BD50;
c_HeartPrizes = 0x801811AC;
CreateEntity = 0x80198B80;
EntityItemDrop = 0x8019BDC8;
EntityPriceDrop = 0x8019BDC8;
EntityExplosion = 0x8019C63C;
EntityHeartDrop = 0x8019C7DC;
EntityRelicItem = 0x8019D074;
EntityInventoryItem = 0x8019DB44;
EntityInventoryDrop = 0x8019C7DC;
EntityRelicOrb = 0x8019D074;
EntityHeartDrop = 0x8019DB44;
EntityIntenseExplosion = 0x8019F070;
EntityStageNamePopup = 0x801A0734;
EntityAbsorbOrb = 0x801A13B8;

View File

@ -62,11 +62,11 @@ EntityDummy = 0x80192DA8;
ReplaceBreakableWithItemDrop = 0x80193394;
CollectHeartVessel = 0x801938FC;
CollectLifeVessel = 0x8019394C;
EntityItemDrop = 0x801939E0;
EntityPriceDrop = 0x801939E0;
EntityExplosion = 0x80194218;
EntityHeartDrop = 0x801943EC;
EntityRelicItem = 0x801949C0;
EntityInventoryItem = 0x80195520;
EntityInventoryDrop = 0x801943EC;
EntityRelicOrb = 0x801949C0;
EntityHeartDrop = 0x80195520;
EntityIntenseExplosion = 0x801964E4;
EntityAbsorbOrb = 0x801982BC;
EntityEnemyBlood = 0x80198650;

View File

@ -25,12 +25,12 @@ AllocEntity = 0x801C54D4;
InitializeEntity = 0x801C5974;
EntityDummy = 0x801C5A70;
ReplaceBreakableWithItemDrop = 0x801C605C;
EntityItemDrop = 0x801C6684;
EntityPriceDrop = 0x801C6684;
EntityExplosion = 0x801C6EF8;
EntityHeartDrop = 0x801C7098;
EntityRelicItem = 0x801C7930;
EntityInventoryItem = 0x801C8400;
EntityUnkId0D = 0x801C8528;
EntityInventoryDrop = 0x801C7098;
EntityRelicOrb = 0x801C7930;
EntityHeartDrop = 0x801C8400;
EntityUnkId0E = 0x801C8528;
EntityIntenseExplosion = 0x801C992C;
EntityStageNamePopup = 0x801CAFF0;
EntityAbsorbOrb = 0x801CBC74;

View File

@ -21,12 +21,12 @@ AllocEntity = 0x801BCD44;
InitializeEntity = 0x801BD1E4;
EntityDummy = 0x801BD2E0;
ReplaceBreakableWithItemDrop = 0x801BD8CC;
EntityItemDrop = 0x801BDEF4;
EntityPriceDrop = 0x801BDEF4;
EntityExplosion = 0x801BE768;
EntityHeartDrop = 0x801BE908;
EntityRelicItem = 0x801BF1A0;
EntityInventoryItem = 0x801BFC70;
EntityUnkId0D = 0x801BFD98;
EntityInventoryDrop = 0x801BE908;
EntityRelicOrb = 0x801BF1A0;
EntityHeartDrop = 0x801BFC70;
EntityUnkId0E = 0x801BFD98;
EntityIntenseExplosion = 0x801C119C;
EntityStageNamePopup = 0x801C2860;
EntityAbsorbOrb = 0x801C34E4;

View File

@ -1,5 +1,5 @@
CreateEntity = 0x801BB0C4;
EntityTransitionDoor = 0x801BBCB4;
EntityRedDoor = 0x801BBCB4;
DestroyEntity = 0x801BC8EC;
Random = 0x801B94D4;
SpawnExplosionEntity = 0x801BBB4C;
@ -14,11 +14,11 @@ c_HeartPrizes = 0x80181DA4;
CollectGold = 0x801BDFFC;
CollectHeartVessel = 0x801BE1F0;
CollectLifeVessel = 0x801BE294;
EntityCandleDrop = 0x801BE30C;
EntityCandleHeartDrop = 0x801BED20;
EntityBreakable = 0x801BE30C;
EntityInventoryDrop = 0x801BED20;
EntityAbsorbOrb = 0x801C2AA8;
EntityRoomForeground = 0x801C32EC;
EntityBoneScimitar = 0x801C37E4;
EntityBloodSkeleton = 0x801C7958;
EntityAreaTitlePopup = 0x801C8CAC;
EntityStageNamePopup = 0x801C8CAC;
c_GoldPrizes = 0x80181D14;

View File

@ -60,6 +60,8 @@ D_80186F00 = 0x80186F00;
D_80186F08 = 0x80186F08;
D_80186F48 = 0x80186F48;
EntityBreakable = 0x8018726C;
EntityWarpRoom = 0x801873A0;
EntityWarpSmallRocks = 0x80187F1C;
Random = 0x801881E8;
UpdateStageEntities = 0x80188218;
EntityNumericDamage = 0x80189734;
@ -81,12 +83,12 @@ CollectHeart = 0x8018CC90;
CollectGold = 0x8018CD10;
CollectHeartVessel = 0x8018CF04;
CollectLifeVessel = 0x8018CFA8;
EntityItemDrop = 0x8018D020;
EntityPriceDrop = 0x8018D020;
EntityExplosion = 0x8018D894;
EntityHeartDrop = 0x8018DA34;
EntityRelicItem = 0x8018E2CC;
EntityInventoryItem = 0x8018ED9C;
EntityUnkId0D = 0x8018EEC4;
EntityInventoryDrop = 0x8018DA34;
EntityRelicOrb = 0x8018E2CC;
EntityHeartDrop = 0x8018ED9C;
EntityUnkId0E = 0x8018EEC4;
EntityIntenseExplosion = 0x801902C8;
EntityStageNamePopup = 0x8019198C;
EntityAbsorbOrb = 0x80192610;

View File

@ -2,25 +2,81 @@
* File: objects.h
* Description: SOTN Object header
*
* These entity IDs are common across all stages
* Only the first 0x10 entities are common across all stages
*/
typedef enum {
/* 0x00 */ ENTITY_MIN,
/* 0x00 */ ENTITY_UNALLOCATED,
// Usually those are the small candles, but they can also be the jars
// from the Arena map or other type of objects that can be broken.
/* 0x01 */ ENTITY_BREAKABLE,
/* 0x02 */ ENTITY_EXPLOSION,
/* 0x03 */ ENTITY_ITEM_DROP,
// The price drop that usually comes from breakable objects. Those can be
// small hearts, big hearts, money, sub-weapons, power ups.
// The type of drop depends from the SubID.
/* 0x03 */ ENTITY_PRICE_DROP,
// Shows the amount of damage dealt or received.
// The number is the value from the SubID.
/* 0x04 */ ENTITY_NUMERIC_DAMAGE,
// The red door that is usually used when changing a stage.
/* 0x05 */ ENTITY_RED_DOOR,
/* 0x06 */ ENTITY_INTENSE_EXPLOSION,
/* 0x07 */ ENTITY_ABSORB_ORB,
// Used to render big foreground objects that cannot be represented as a
// tileset. An example is the angels statue located in the loading room.
/* 0x08 */ ENTITY_ROOM_FOREGROUND,
// The box that shows the stage name when entering for the first time.
/* 0x09 */ ENTITY_STAGE_NAME_POPUP,
/* 0x0A */ ENTITY_HEART_DROP,
/* 0x0B */ ENTITY_RELIC,
/* 0x0C */ ENTITY_COLLECTABLE,
// Price drop representing an inventory item. The inventory item itself
// changes based on the SubID.
/* 0x0A */ ENTITY_INVENTORY_DROP,
// Floating relic orb. The type of relic is based on the SubID.
/* 0x0B */ ENTITY_RELIC_ORB,
// Similar to ENTITY_INVENTORY but only drops small hearts.
/* 0x0C */ ENTITY_HEART_DROP,
// Enemy blood particle. The SubID dictates the direction where the blood
// will spill.
/* 0x0D */ ENTITY_ENEMY_BLOOD,
// Invoke some kind of full-screen menu. Maybe it's the shopping menu?
/* 0x0E */ ENTITY_0E,
// Empty entity
/* 0x0F */ ENTITY_0F,
// Empty entity
/* 0x10 */ ENTITY_RESERVED_10,
// Its use is unknown but it is found in DRA, not in any other overlay.
// Its meaning depends from the stage currently loaded.
/* 0x13 */ ENTITY_13 = 0x13
} SotnEntityIds;
} SotnEntityIds;
void EntityBreakable(Entity*);
void EntityExplosion(Entity*);
void EntityPriceDrop(Entity*);
void EntityNumericDamage(Entity*);
void EntityRedDoor(Entity*);
void EntityIntenseExplosion(Entity*);
void EntityAbsorbOrb(Entity*);
void EntityRoomForeground(Entity*);
void EntityStageNamePopup(Entity*);
void EntityInventoryDrop(Entity*);
void EntityRelicOrb(Entity*);
void EntityHeartDrop(Entity*);
void EntityEnemyBlood(Entity*);
void EntityUnkId0E(Entity*);
void EntityDummy(Entity*);

View File

@ -4507,7 +4507,7 @@ Entity* func_8011879C(s16 entityIndex, s16 arg1) {
if (entityIndex < arg1) {
while (var_a0 < arg1) {
if (entity->objectId == ENTITY_MIN) {
if (entity->objectId == ENTITY_UNALLOCATED) {
return entity;
}
var_a0++;

View File

@ -392,7 +392,7 @@ Entity* func_8015F8F8(s16 entityIndex, s16 arg1) {
if (entityIndex < arg1) {
while (var_a0 < arg1) {
if (entity->objectId == ENTITY_MIN) {
if (entity->objectId == ENTITY_UNALLOCATED) {
return entity;
}
var_a0++;

View File

@ -8,7 +8,6 @@
void ReplaceBreakableWithItemDrop(Entity* arg0);
void DestroyEntity(Entity* entity);
void EntityExplosion(Entity*);
void func_80198F18(s16);
void func_80199014(s16);
void func_801991CC(s16);
@ -16,14 +15,10 @@ void func_801992C8(s16);
void func_801A046C(u16);
s32 func_8019AC78(u8, s16);
void PreventEntityFromRespawning(Entity* entity);
void EntityCandleDrop(struct Entity*);
void EntityCandleHeartDrop(struct Entity*);
void FallEntity(void);
void func_8019B858(void);
void SpawnExplosionEntity(u16 objectId, Entity* entity);
Entity* AllocEntity(Entity*, Entity*);
void EntityItemDrop(struct Entity*);
void EntityHeartDrop(struct Entity*);
void func_8019A78C(void);
Entity* func_8019AC18(Entity*, Entity*);
void func_8019E5E0(Entity* entity);
@ -717,14 +712,14 @@ void ReplaceBreakableWithItemDrop(Entity* entity) {
entity->subId = var_v1;
if (var_v1 < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityItemDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityPriceDrop;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
var_v1 = temp_a0 - 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = EntityHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = EntityInventoryDrop;
}
entity->subId = var_v1;
@ -839,7 +834,7 @@ void CollectLifeVessel(void) {
void func_8019BDA0(void) { DestroyEntity(g_CurrentEntity); }
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityItemDrop);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityPriceDrop);
void EntityExplosion(Entity* entity) {
u32 temp_v0;
@ -905,13 +900,13 @@ void func_8019C738(Entity* entity, s32 renderFlags) {
}
}
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityHeartDrop);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityInventoryDrop);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", func_8019CDC4);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityRelicItem);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityRelicOrb);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityInventoryItem);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", EntityHeartDrop);
INCLUDE_ASM("asm/st/dre/nonmatchings/11A64", func_8019DC6C);

View File

@ -15,9 +15,6 @@ void func_80190C78(s16);
void SpawnExplosionEntity(u16, Entity*);
u8 func_80192914(s16 arg0, s16 arg1);
void ReplaceBreakableWithItemDrop(Entity*);
void EntityItemDrop(Entity*);
void EntityHeartDrop(Entity*);
void EntityExplosion(Entity*);
void func_8019102C(u16 objectId, Entity* ent1, Entity* ent2);
void func_80198BC8(void* const, s32);
void func_8019344C(void);
@ -873,14 +870,14 @@ void ReplaceBreakableWithItemDrop(Entity* entity) {
entity->subId = var_v1;
if (var_v1 < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityItemDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityPriceDrop;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
var_v1 = temp_a0 - 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = EntityHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = EntityInventoryDrop;
}
entity->subId = var_v1;
@ -1009,7 +1006,7 @@ Entity* func_801939C4(void) {
return D_8006C26C;
}
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityItemDrop);
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityPriceDrop);
void EntityExplosion(Entity* entity) {
u32 temp_v0;
@ -1063,16 +1060,16 @@ void func_80194314(Entity* entity) {
}
}
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityHeartDrop);
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityInventoryDrop);
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityRelicItem);
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityRelicOrb);
// v1 -> a0 reg swap
// https://decomp.me/scratch/h3CVU
#ifndef NON_MATCHING
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityInventoryItem);
INCLUDE_ASM("asm/st/mad/nonmatchings/D8C8", EntityHeartDrop);
#else
void EntityInventoryItem(Entity* entity, u32 arg1) {
void EntityHeartDrop(Entity* entity, u32 arg1) {
u16 temp_v0_2;
u16 temp_v1;
u16 var_v1;
@ -1092,9 +1089,9 @@ void EntityInventoryItem(Entity* entity, u32 arg1) {
var_v1 = D_80180F5C[temp_a0];
if (var_v1 < 0x80) {
entity->unkB8.unkFuncB8 = EntityItemDrop;
entity->unkB8.unkFuncB8 = EntityPriceDrop;
} else {
entity->unkB8.unkFuncB8 = EntityHeartDrop;
entity->unkB8.unkFuncB8 = EntityInventoryDrop;
var_v1 -= 0x80;
}

View File

@ -8,8 +8,6 @@
void SpawnExplosionEntity(u16, Entity*);
void ReplaceBreakableWithItemDrop(Entity*);
void EntityItemDrop(Entity*);
void EntityHeartDrop(Entity*);
extern u8* D_80180850;
extern u16 D_80180B00[];
@ -626,14 +624,14 @@ void ReplaceBreakableWithItemDrop(Entity* entity) {
entity->subId = var_v1;
if (var_v1 < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityItemDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityPriceDrop;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
var_v1 = temp_a0 - 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = EntityHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = EntityInventoryDrop;
}
entity->subId = var_v1;
@ -679,21 +677,21 @@ void func_801C660C(void) {
void func_801C665C(void) { DestroyEntity(g_CurrentEntity); }
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityItemDrop);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityPriceDrop);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityExplosion);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", func_801C6FF4);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityHeartDrop);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityInventoryDrop);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", func_801C7680);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityRelicItem);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityRelicOrb);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityInventoryItem);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityHeartDrop);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityUnkId0D);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", EntityUnkId0E);
INCLUDE_ASM("asm/st/no3/nonmatchings/377D4", func_801C8A84);

View File

@ -9,8 +9,8 @@
void SpawnExplosionEntity(u16, Entity*);
void ReplaceBreakableWithItemDrop(Entity*);
int func_801CD658();
void EntityItemDrop(Entity* entity);
void EntityHeartDrop(Entity* entity);
void EntityPriceDrop(Entity* entity);
void EntityInventoryDrop(Entity* entity);
extern u16 D_80180A90[];
extern ObjInit2 D_80180C10[];
@ -472,14 +472,14 @@ void ReplaceBreakableWithItemDrop(Entity* entity) {
entity->subId = var_v1;
if (var_v1 < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityItemDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityPriceDrop;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
var_v1 = temp_a0 - 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = EntityHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = EntityInventoryDrop;
}
entity->subId = var_v1;
@ -504,21 +504,21 @@ INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", func_801BDE7C);
void func_801BDECC(void) { DestroyEntity(g_CurrentEntity); }
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityItemDrop);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityPriceDrop);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityExplosion);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", func_801BE864);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityHeartDrop);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityInventoryDrop);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", func_801BEEF0);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityRelicItem);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityRelicOrb);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityInventoryItem);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityHeartDrop);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityUnkId0D);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", EntityUnkId0E);
INCLUDE_ASM("asm/st/np3/nonmatchings/3246C", func_801C02F4);

View File

@ -14,8 +14,6 @@ s32 func_801BCF74(s32*);
s32 func_801BD720(s32*, s32);
void func_801BEB80(Entity*);
void func_801C29B0(s32);
void EntityCandleDrop(Entity* entity);
void EntityCandleHeartDrop(Entity* entity);
void func_801C33D8(const u32*, s32);
void func_801C0B24(Entity* entity);
void func_801C4CC0(void);
@ -181,7 +179,7 @@ s32 func_801BBC3C(Unkstruct5* arg0) {
return diff;
}
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityTransitionDoor);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityRedDoor);
void DestroyEntity(Entity* item) {
s32 i;
@ -489,14 +487,14 @@ void func_801BDCE4(Entity* entity) {
subId = entity->subId &= 0xFFF;
if (subId < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityCandleDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityBreakable;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
subId -= 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = (PfnEntityUpdate)EntityCandleHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = (PfnEntityUpdate)EntityInventoryDrop;
}
entity->subId = subId;
@ -628,7 +626,7 @@ void CollectLifeVessel(void) {
void func_801BE2E4(void) { DestroyEntity(g_CurrentEntity); }
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityCandleDrop);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityBreakable);
void func_801BEB80(Entity* entity) {
u32 temp_v0;
@ -692,7 +690,7 @@ void func_801BEC7C(Entity* entity, s32 arg1) {
}
}
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityCandleHeartDrop);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityInventoryDrop);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", func_801BF308);
@ -1340,8 +1338,8 @@ void func_801C7884(Entity* entity) {
entity->unk1E += 0x20;
if (entity[-1].step != 1) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityCandleDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityBreakable;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
entity->step = ENTITY_STEP_0;
@ -1374,7 +1372,7 @@ INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", func_801C7D68);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", func_801C8ADC);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityAreaTitlePopup);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", EntityStageNamePopup);
INCLUDE_ASM("config/../asm/st/nz0/nonmatchings/394D4", func_801C9930);

View File

@ -303,54 +303,38 @@ const LayoutObject* const D_80180310[] = {
// *** Layout object definition end ***
// *** Object definition start ***
void EntityBreakable(Entity*);
void EntityExplosion(Entity*);
void EntityItemDrop(Entity*);
void EntityNumericDamage(Entity*);
void EntityRedDoor(Entity*);
void EntityIntenseExplosion(Entity*);
void EntityAbsorbOrb(Entity*);
void EntityRoomForeground(Entity*);
void EntityStageNamePopup(Entity*);
void EntityHeartDrop(Entity*);
void EntityRelicItem(Entity*);
void EntityInventoryItem(Entity*);
void EntityEnemyBlood(Entity*);
void EntityUnkId0D(Entity*);
void EntityDummy(Entity*);
void EntityDummy(Entity*);
void func_80186FD0(Entity*);
void func_801870B0(Entity*);
void func_8018F510(Entity*);
void func_8018F838(Entity*);
void func_8018F928(Entity*);
void func_801873A0(Entity*);
void func_80187F1C(Entity*);
void EntityWarpRoom(Entity*);
void EntityWarpSmallRocks(Entity*);
const PfnEntityUpdate PfnEntityUpdates[] = {
/* 3E0 */ (PfnEntityUpdate)D_80181400,
/* 3E4 */ (PfnEntityUpdate)EntityBreakable,
/* 3E8 */ (PfnEntityUpdate)EntityExplosion,
/* 3EC */ (PfnEntityUpdate)EntityItemDrop,
/* 3EC */ (PfnEntityUpdate)EntityPriceDrop,
/* 3F0 */ (PfnEntityUpdate)EntityNumericDamage,
/* 3F4 */ (PfnEntityUpdate)EntityRedDoor,
/* 3F8 */ (PfnEntityUpdate)EntityIntenseExplosion,
/* 3FC */ (PfnEntityUpdate)EntityAbsorbOrb,
/* 400 */ (PfnEntityUpdate)EntityRoomForeground,
/* 404 */ (PfnEntityUpdate)EntityStageNamePopup,
/* 408 */ (PfnEntityUpdate)EntityHeartDrop,
/* 40C */ (PfnEntityUpdate)EntityRelicItem,
/* 410 */ (PfnEntityUpdate)EntityInventoryItem,
/* 408 */ (PfnEntityUpdate)EntityInventoryDrop,
/* 40C */ (PfnEntityUpdate)EntityRelicOrb,
/* 410 */ (PfnEntityUpdate)EntityHeartDrop,
/* 414 */ (PfnEntityUpdate)EntityEnemyBlood,
/* 418 */ (PfnEntityUpdate)EntityUnkId0D,
/* 418 */ (PfnEntityUpdate)EntityUnkId0E,
/* 41C */ (PfnEntityUpdate)EntityDummy,
/* 420 */ (PfnEntityUpdate)EntityDummy,
/* 424 */ (PfnEntityUpdate)func_80186FD0,
/* 428 */ (PfnEntityUpdate)func_801870B0,
/* 424 */ (PfnEntityUpdate)func_80186FD0, // unused
/* 428 */ (PfnEntityUpdate)func_801870B0, // unused? looks debugging stuff
/* 42C */ (PfnEntityUpdate)func_8018F510,
/* 430 */ (PfnEntityUpdate)func_8018F838,
/* 434 */ (PfnEntityUpdate)func_8018F928,
/* 438 */ (PfnEntityUpdate)func_801873A0,
/* 43C */ (PfnEntityUpdate)func_80187F1C,
/* 438 */ (PfnEntityUpdate)EntityWarpRoom,
/* 43C */ (PfnEntityUpdate)EntityWarpSmallRocks,
};
const u16 g_eBreakableInit[] = {
@ -568,7 +552,7 @@ const u32 D_80180608[] = {
/* 644 */ 0x00001E00,
};
// owned by func_801873A0
// owned by EntityWarpRoom
const u32 D_80180648[] = {
/* 648 */ 0x00000000,
/* 64C */ 0x00040000,
@ -2633,7 +2617,7 @@ void EntityBreakable(Entity* entity) {
}
#ifndef NON_MATCHING
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_801873A0);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityWarpRoom);
#else
extern u8 D_8003BEBC;
extern s16 (*D_8003C7B8)(/*?*/ u32, /*?*/ u32);
@ -2647,8 +2631,11 @@ extern s32 D_80193AA4;
extern s32 D_80193AA8;
extern s32 D_80193AAC;
// Handle warp logic
void func_801873A0(Entity* arg0) {
// Handles everything about the warp room.
// It is responsible to spawn the colourful background, the stones on the
// ground and it always listen to the UP button. When the UP
// button is pressed, it brights the screen and teleport the player.
void EntityWarpRoom(Entity* arg0) {
POLY_GT4* var_s2;
POLY_GT4* var_s2_2;
s16 temp_s4;
@ -3052,7 +3039,7 @@ void func_801873A0(Entity* arg0) {
}
#endif
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_80187F1C);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityWarpSmallRocks);
s32 Random(void) {
g_randomNext = (g_randomNext * 0x01010101) + 1;
@ -3716,14 +3703,14 @@ void ReplaceBreakableWithItemDrop(Entity* entity) {
entity->subId = var_v1;
if (var_v1 < 0x80) {
entity->objectId = ENTITY_ITEM_DROP;
entity->pfnUpdate = EntityItemDrop;
entity->objectId = ENTITY_PRICE_DROP;
entity->pfnUpdate = EntityPriceDrop;
entity->animationFrameDuration = 0;
entity->animationFrameIndex = 0;
} else {
var_v1 = temp_a0 - 0x80;
entity->objectId = ENTITY_HEART_DROP;
entity->pfnUpdate = EntityHeartDrop;
entity->objectId = ENTITY_INVENTORY_DROP;
entity->pfnUpdate = EntityInventoryDrop;
}
entity->subId = var_v1;
@ -3859,7 +3846,7 @@ void CollectLifeVessel(void) {
void func_8018CFF8(void) { DestroyEntity(g_CurrentEntity); }
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityItemDrop);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityPriceDrop);
void EntityExplosion(Entity* entity) {
u16 zPriority;
@ -3920,15 +3907,15 @@ void func_8018D990(Entity* arg0, s32 renderFlags) {
}
}
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityHeartDrop);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityInventoryDrop);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018E01C);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityRelicItem);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityRelicOrb);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityInventoryItem);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityHeartDrop);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityUnkId0D);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", EntityUnkId0E);
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018F420);