EntityRedDoor matching (#1167)

Another One Bites the Dust

It matches 1:1 with the PSP counterpart too:
https://decomp.me/scratch/z1VlU
This commit is contained in:
Luciano Ciccariello 2024-05-24 19:41:07 +01:00 committed by GitHub
parent d677db6800
commit 0b9e94c4d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
57 changed files with 452 additions and 105 deletions

View File

@ -38,7 +38,8 @@ segments:
- [0x1300, data]
- [0xD42C, rodata]
- [0xD4B0, .rodata, D600]
- [0xD4D8, rodata]
- [0xD4D8, .rodata, 11280] # EntityRedDoor
- [0xD4F0, rodata]
- [0xD578, .rodata, entity_relic_orb]
- [0xD5B0, .rodata, entity_message_box]
- [0xD5C4, .rodata, 18084] # EntityStageNamePopup

View File

@ -50,7 +50,8 @@ segments:
- [0x1181C, rodata]
- [0x118D0, rodata]
- [0x11910, .rodata, 1697C] # EntityFadeToWhite
- [0x1193C, rodata]
- [0x1193C, .rodata, 173C4] # EntityRedDoor
- [0x11954, rodata]
- [0x119C4, .rodata, 1C7DC]
- [0x119DC, .rodata, entity_relic_orb]
- [0x11A14, .rodata, entity_message_box]

View File

@ -65,6 +65,8 @@ segments:
- [0x19A4, data]
- [0x1D14, data]
- [0xD794, rodata]
- [0xD7CC, .rodata, EDB8] # EntityRedDoor
- [0xD7E4, rodata]
- [0xD83C, .rodata, 139E0]
- [0xD85C, rodata] # EntityEquipItemDrop
- [0xD874, .rodata, entity_relic_orb]

View File

@ -64,7 +64,8 @@ segments:
- [0x374F4, .rodata, 3FF00] # EntityDeathStolenItems
- [0x37514, .rodata, 3FF00] # EntityDeath
- [0x37564, .rodata, 3FF00] # EntityWargExplosionPuffOpaque
- [0x37578, rodata]
- [0x37578, .rodata, 41C80] # EntityRedDoor
- [0x37590, rodata]
- [0x375E0, .rodata, 46684] # EntityPrizeDrop
- [0x37600, .rodata, 46684] # EntityEquipItemDrop
- [0x37618, .rodata, entity_relic_orb]

View File

@ -60,7 +60,8 @@ segments:
- [0x31EBC, .rodata, 365FC] # func_801B65FC
- [0x31ED0, .rodata, 36990] # EntitySlogra .rodata, 36990
- [0x31EDC, rodata] # EntityGaibon .rodata, 36990
- [0x31F00, rodata]
- [0x31F00, .rodata, 394F0] # EntityRedDoor
- [0x31F18, rodata]
- [0x31F68, .rodata, 3DEF4]
- [0x31FA0, .rodata, entity_relic_orb]
- [0x31FD8, .rodata, entity_message_box]

View File

@ -87,6 +87,8 @@ segments:
- [0x30618, rodata] # EntityGaibon .rodata, 33FCC
- [0x3063C, .rodata, 36DE4] # func_801B7034
- [0x3064C, rodata]
- [0x30728, .rodata, 39908] # EntityRedDoor
- [0x30740, rodata]
- [0x30790, .rodata, 3E30C]
- [0x307B0, .rodata, 3E30C]
- [0x307C8, .rodata, entity_relic_orb]

View File

@ -58,6 +58,8 @@ segments:
- [0x27BDC, .rodata, 2DAC8] # "can't get effect works!\n"
- [0x27BFC, .rodata, 2DAC8] # func_801AF774
- [0x27C1C, rodata]
- [0x27C6C, .rodata, 31CA0] # EntityRedDoor
- [0x27C84, rodata]
- [0x27C8C, .rodata, 36358]
- [0x27CAC, rodata]
- [0x27CC4, rodata]

View File

@ -74,7 +74,7 @@ segments:
- [0x6E30, .rodata, 6FD0]
- [0x6E70, .rodata, 73A0] # EntityWarpRoom
- [0x6E90, .rodata, 73A0] # EntityWarpSmallRocks
- [0x6EA8, rodata] # EntityRedDoor
- [0x6EA8, .rodata, 861C] # EntityRedDoor
- [0x6EC0, rodata] # CollectGold
- [0x6F10, .rodata, D020]
- [0x6F30, .rodata, D020] # EntityEquipItemDrop

View File

@ -103,6 +103,6 @@ SetGeomOffset = 0x8001803C;
D_8003BE1E_mad = 0x8003BE1E;
D_8003BF28_mad = 0x8003BF28;
D_80072E9C_mad = 0x80072E9C;
D_80072EB4_mad = 0x80072EB4;
PLAYER_zPriority = 0x80072E9C;
PLAYER_step = 0x80072EB4;
D_80096ED0_mad = 0x80096ED0;

View File

@ -4,6 +4,7 @@ g_pStTileset = 0x801802A4;
g_pStObjLayoutHorizontal = 0x801802F4;
PfnEntityUpdates = 0x8018049C;
g_eBreakableInit = 0x801804F0;
g_eInitGeneric2 = 0x80180544;
g_eDamageDisplayInit = 0x80180550;
g_eBreakableAnimations = 0x80180644;
g_eBreakableHitboxes = 0x80180664;
@ -12,6 +13,8 @@ g_eBreakableanimSets = 0x80180674;
g_eBreakableDrawModes = 0x80180684;
g_eDamageDisplayClut = 0x801809C4;
g_Rooms = 0x80181130;
g_eRedDoorUV = 0x801809D4;
g_eRedDoorTiles = 0x80180594;
g_pStrObjLayout0 = 0x801811D4;
g_pStrObjLayout1 = 0x801811E8;
g_pStrObjLayout2 = 0x80181206;
@ -68,7 +71,6 @@ g_InitializeData0 = 0x801804FC;
g_UnkPrimHelperRot = 0x8018D8C0;
UnkPrimHelper = 0x80198FA0;
EntityUnkId15 = 0x80195B44;
EntityIsNearPlayer = 0x801910A8;
UnkPolyFunc2 = 0x801996EC;
PrimDecreaseBrightness = 0x8019976C;
g_LayoutObjHorizontal = 0x801997D8;

View File

@ -5,9 +5,12 @@ PfnEntityUpdates = 0x80180394;
g_InitializeData0 = 0x80180410;
g_InitializeEntityData0 = 0x8018041C;
g_EInitGeneric = 0x80180434;
g_eInitGeneric2 = 0x80180458;
g_eDamageDisplayInit = 0x80180464;
g_eRedDoorTiles = 0x801804A4;
UNK_Invincibility0 = 0x801807B8;
g_eDamageDisplayClut = 0x80180B94;
g_eRedDoorUV = 0x80180BA4;
c_GoldPrizes = 0x80180F58;
c_HeartPrizes = 0x80180FE8;
g_Rooms = 0x801812D4;
@ -30,7 +33,6 @@ EntityDamageDisplay = 0x80192398;
InitRoomEntities = 0x80193298;
UpdateRoomPosition = 0x80193410;
CreateEntityFromEntity = 0x80193538;
EntityIsNearPlayer = 0x801935B4;
EntityRedDoor = 0x8019362C;
DestroyEntity = 0x80194264;
PreventEntityFromRespawning = 0x8019434C;

View File

@ -6,7 +6,9 @@ g_eBreakableInit = 0x80180458;
g_InitializeData0 = 0x80180464;
g_InitializeEntityData0 = 0x80180470;
g_EInitGeneric = 0x80180488;
g_eInitGeneric2 = 0x801804AC;
g_eDamageDisplayInit = 0x801804B8;
g_eRedDoorTiles = 0x80180550;
g_eBreakableAnimations = 0x80180610;
g_eBreakableHitboxes = 0x80180630;
g_eBreakableExplosionTypes = 0x80180638;
@ -15,6 +17,7 @@ g_eBreakableDrawModes = 0x80180650;
g_CloneShootOrder = 0x801807D4;
UNK_Invincibility0 = 0x8018097C;
g_eDamageDisplayClut = 0x80180D58;
g_eRedDoorUV = 0x80180D68;
c_GoldPrizes = 0x8018111C;
c_HeartPrizes = 0x801811AC;
g_Rooms = 0x80181498;
@ -43,12 +46,10 @@ InitRoomEntities = 0x801993DC;
UpdateRoomPosition = 0x80199554;
CreateEntityFromCurrentEntity = 0x80199608;
CreateEntityFromEntity = 0x8019967C;
EntityIsNearPlayer = 0x801996F8;
EntityRedDoor = 0x80199770;
DestroyEntity = 0x8019A3A8;
PreventEntityFromRespawning = 0x8019A490;
AnimateEntity = 0x8019A4D8;
GetSideToPlayer = 0x8019A718;
MoveEntity = 0x8019A75C;
FallEntity = 0x8019A78C;
AllocEntity = 0x8019AC18;

View File

@ -6,7 +6,9 @@ g_eBreakableInit = 0x80180AAC;
g_InitializeData0 = 0x80180AB8;
g_InitializeEntityData0 = 0x80180AC4;
g_EInitGeneric = 0x80180ADC;
g_eInitGeneric2 = 0x80180B00;
g_eDamageDisplayInit = 0x80180B0C;
g_eRedDoorTiles = 0x80180DA0;
g_eBreakableAnimations = 0x80180E50;
g_eBreakableHitboxes = 0x80180E70;
g_eBreakableExplosionTypes = 0x80180E78;
@ -15,6 +17,7 @@ g_eBreakableDrawModes = 0x80180E90;
g_TrapDoorFlag = 0x8018123C;
UNK_Invincibility0 = 0x80181CC0;
g_eDamageDisplayClut = 0x8018209C;
g_eRedDoorUV = 0x801820AC;
c_GoldPrizes = 0x80182460;
c_HeartPrizes = 0x801824F0;
g_Rooms = 0x80183CC4;
@ -75,7 +78,6 @@ InitRoomEntities = 0x801C3C98;
UpdateRoomPosition = 0x801C3E10;
CreateEntityFromCurrentEntity = 0x801C3EC4;
CreateEntityFromEntity = 0x801C3F38;
EntityIsNearPlayer = 0x801C3FB4;
EntityRedDoor = 0x801C402C;
DestroyEntity = 0x801C4C64;
PreventEntityFromRespawning = 0x801C4D4C;

View File

@ -6,7 +6,9 @@ g_eBreakableInit = 0x80180A3C;
g_InitializeData0 = 0x80180A48;
g_InitializeEntityData0 = 0x80180A54;
g_EInitGeneric = 0x80180A6C;
g_eInitGeneric2 = 0x80180A90;
g_eDamageDisplayInit = 0x80180A9C;
g_eRedDoorTiles = 0x80180D78;
g_eBreakableAnimations = 0x80180E28;
g_eBreakableHitboxes = 0x80180E48;
g_eBreakableExplosionTypes = 0x80180E50;
@ -15,6 +17,7 @@ g_eBreakableDrawModes = 0x80180E68;
g_TrapDoorFlag = 0x80181104;
UNK_Invincibility0 = 0x8018164C;
g_eDamageDisplayClut = 0x80181A28;
g_eRedDoorUV = 0x80181A38;
c_GoldPrizes = 0x80181DEC;
c_HeartPrizes = 0x80181E7C;
g_Rooms = 0x80183A7C;
@ -52,7 +55,6 @@ InitRoomEntities = 0x801BB508;
UpdateRoomPosition = 0x801BB680;
CreateEntityFromCurrentEntity = 0x801BB734;
CreateEntityFromEntity = 0x801BB7A8;
EntityIsNearPlayer = 0x801BB824;
EntityRedDoor = 0x801BB89C;
DestroyEntity = 0x801BC4D4;
PreventEntityFromRespawning = 0x801BC5BC;

View File

@ -8,13 +8,16 @@ PfnEntityUpdates = 0x80180A94;
g_InitializeData0 = 0x80180BD4;
g_InitializeEntityData0 = 0x80180BE0;
g_EInitGeneric = 0x80180BF8;
g_eInitGeneric2 = 0x80180C1C;
g_eDamageDisplayInit = 0x80180C28;
g_eRedDoorTiles = 0x80180D8C;
g_CallElevator = 0x80180EEC;
g_BossFlag = 0x80181010;
g_ElevatorTarget = 0x801813A4;
g_ElevatorTargetPos = 0x801813A8;
UNK_Invincibility0 = 0x80181574;
g_eDamageDisplayClut = 0x80181950;
g_eRedDoorUV = 0x80181960;
c_GoldPrizes = 0x80181D14;
c_HeartPrizes = 0x80181DA4;
g_Rooms = 0x8018272C;
@ -51,7 +54,6 @@ InitRoomEntities = 0x801BB920;
UpdateRoomPosition = 0x801BBA98;
CreateEntityFromCurrentEntity = 0x801BBB4C;
CreateEntityFromEntity = 0x801BBBC0;
EntityIsNearPlayer = 0x801BBC3C;
EntityRedDoor = 0x801BBCB4;
DestroyEntity = 0x801BC8EC;
PreventEntityFromRespawning = 0x801BC9D4;

View File

@ -4,11 +4,14 @@ g_pStObjLayoutVertical = 0x801803E8;
PfnEntityUpdates = 0x801804BC;
g_InitializeData0 = 0x80180580;
g_InitializeEntityData0 = 0x8018058C;
g_eInitGeneric2 = 0x801805BC;
g_eDamageDisplayInit = 0x801805C8;
g_eRedDoorTiles = 0x8018064C;
g_isSecretStairsButtonPressed = 0x8018089C;
g_isDraculaFirstFormDefeated = 0x8018090C;
UNK_Invincibility0 = 0x801815EC;
g_eDamageDisplayClut = 0x80181968;
g_eRedDoorUV = 0x80181978;
g_Rooms = 0x80182060;
D_80183D1C = 0x80183D1C;
D_80197F80 = 0x80197F80;
@ -41,7 +44,6 @@ InitRoomEntities = 0x801B393C;
UpdateRoomPosition = 0x801B3AB4;
CreateEntityFromCurrentEntity = 0x801B3B68;
CreateEntityFromEntity = 0x801B3BDC;
EntityIsNearPlayer = 0x801B3C58;
EntityRedDoor = 0x801B3CD0;
DestroyEntity = 0x801B4908;
DestroyEntitiesFromIndex = 0x801B4974;

View File

@ -50,13 +50,10 @@ Random = 0x801881E8;
TestCollisions = 0x8018861C;
EntityDamageDisplay = 0x80189734;
CreateEntityFromEntity = 0x8018A8D4;
EntityIsNearPlayer = 0x8018A950;
EntityRedDoor = 0x8018A9C8;
DestroyEntity = 0x8018B600;
PreventEntityFromRespawning = 0x8018B6E8;
GetSideToPlayer = 0x8018B970;
AllocEntity = 0x8018BE70;
InitializeEntity = 0x8018C310;
CollectGold = 0x8018CD10;
EntityEquipItemDrop = 0x8018DA34;
EntityStageNamePopup = 0x8019198C;

View File

@ -144,6 +144,13 @@ typedef struct {
s32 yFloatSpeed;
} ET_RelicOrb;
typedef struct {
/* 0x7C */ u32 unused7C;
/* 0x80 */ u32 unused80;
/* 0x84 */ s16 angle;
/* 0x86 */ s16 unk86;
} ET_RedDoor;
typedef struct {
/* 0x7C */ struct Primitive* prim;
/* 0x80 */ s32 unk80;
@ -943,6 +950,7 @@ typedef union { // offset=0x7C
ET_EquipItemDrop equipItemDrop;
ET_NumericDamage ndmg;
ET_RelicOrb relicOrb;
ET_RedDoor door;
ET_StagePopup stpopup;
ET_MessageBox messageBox;
ET_Weapon weapon;

View File

@ -193,7 +193,15 @@ typedef enum { MONO_SOUND, STEREO_SOUND } soundMode;
#define NA_SE_EV_GLASS_BREAK 0x632
#define NA_SE_BREAK_CANDLE 0x634
#define NA_SE_PL_WARP 0x636
#define NA_SE_EN_OPEN_DOOR 0x642
#if defined(VERSION_BETA)
#define SFX_OPEN_DOOR 0x640
#define SFX_DOOR_UNKNOWN 0x64D
#else
#define SFX_OPEN_DOOR 0x642
#define SFX_DOOR_UNKNOWN 0x64F
#endif
#define NA_SE_EN_COG_CLICK 0x642
#define NA_SE_EN_ROCK_BREAK 0x644
#define SOUND_BAT_SCREECH 0x64E

View File

@ -757,7 +757,7 @@ INCLUDE_ASM("asm/saturn/game/f_nonmat", f607AACC, func_0607AACC);
* 1 = Player is on the left side
* 2 = Player is above
*/
s16 GetSideToPlayer(Entity* self) {
s32 GetSideToPlayer(Entity* self) {
Entity* player = &PLAYER;
s16 side = 0;

View File

@ -5,8 +5,7 @@ INCLUDE_ASM("st/cen/nonmatchings/11280", TestCollisions);
#include "../libstage.h"
// Red door (ID 05)
INCLUDE_ASM("st/cen/nonmatchings/11280", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -92,7 +92,7 @@ void EntityUnkId08(Entity* entity) {
ObjInit2* objInit = &D_8018125C[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180458);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -12,7 +12,7 @@ void EntityBackgroundBlock(Entity* self) {
ObjInit2* obj = &D_80180490[self->params].animSet;
if (self->step == 0) {
InitializeEntity(D_80180458);
InitializeEntity(g_eInitGeneric2);
self->animSet = obj->animSet;
self->zPriority = obj->zPriority;
self->unk5A = obj->unk4.s;

View File

@ -55,7 +55,7 @@ extern u16 D_80180404[];
extern u16 g_InitializeData0[];
extern u16 D_80180428[];
extern u16 g_EInitGeneric[];
extern u16 D_80180458[];
extern u16 g_eInitGeneric2[];
extern u16 D_8018047C[]; // EntityElevator
extern ObjInit2 D_80180490[];

View File

@ -11,7 +11,7 @@ void EntityUnkId11(Entity* entity) {
ObjInit2* obj = (ObjInit2*)&D_80180528[entity->params * 10];
if (entity->step == 0) {
InitializeEntity(D_801804AC);
InitializeEntity(g_eInitGeneric2);
entity->animSet = obj->animSet;
entity->zPriority = obj->zPriority;
entity->unk5A = obj->unk4.s;

View File

@ -5,7 +5,7 @@ INCLUDE_ASM("st/dre/nonmatchings/173C4", TestCollisions);
#include "../libstage.h"
INCLUDE_ASM("st/dre/nonmatchings/173C4", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"
@ -104,7 +104,7 @@ s32 GetDistanceToPlayerY(void) {
return yDistance;
}
s16 GetSideToPlayer(void) {
s32 GetSideToPlayer(void) {
s16 var_a0 = g_CurrentEntity->posX.i.hi > PLAYER.posX.i.hi;
if (g_CurrentEntity->posY.i.hi > PLAYER.posY.i.hi) {

View File

@ -598,7 +598,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_80181420[entity->params];
if (entity->step == 0) {
InitializeEntity(D_801804AC);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -98,7 +98,7 @@ extern s32 D_801807F8[];
extern u8 D_80180830[];
extern s16 D_80180D80[];
extern u16 g_InitializeEntityData0[];
extern u16 D_801804AC[];
extern u16 g_eInitGeneric2[];
extern u16 D_801804F4[];
extern s8 c_HeartPrizes[];
extern PfnEntityUpdate PfnEntityUpdates[];

333
src/st/entity_red_door.h Normal file
View File

@ -0,0 +1,333 @@
#include <game.h>
extern u8 g_eRedDoorUV[3][8];
extern u16 g_eRedDoorTiles[2][8];
void EntityRedDoor(Entity* self) {
Primitive* prim;
s32 i;
s16 angle;
u8* uv;
s16 x;
s16 y;
u8 sp3F;
s16 endX;
s16 scrollX;
s16 scrollY;
s32 tileIdx;
switch (self->step) {
case 0:
InitializeEntity(g_eInitGeneric2);
self->animSet = 7;
self->animCurFrame = 1;
self->zPriority = PLAYER.zPriority - 0x20;
self->facingLeft = 0;
self->posY.i.hi += 0x1F;
if (self->params & 0x100) {
self->ext.door.unk86 = -4;
} else {
self->ext.door.unk86 = 4;
}
self->posX.i.hi += self->ext.door.unk86;
self->primIndex = g_api.AllocPrimitives(PRIM_GT4, LEN(g_eRedDoorUV));
if (self->primIndex == -1) {
DestroyEntity(self);
return;
}
self->flags |= FLAG_HAS_PRIMS;
uv = g_eRedDoorUV;
prim = &g_PrimBuf[self->primIndex];
i = 0;
y = self->posY.i.hi - 0x1F;
while (prim != NULL) {
prim->u0 = uv[0];
prim->u1 = uv[1];
prim->u2 = uv[2];
prim->u3 = uv[3];
prim->v0 = uv[4];
prim->v1 = uv[5];
prim->v2 = uv[6];
prim->v3 = uv[7];
prim->tpage = 0x1F;
prim->clut = 0x198;
prim->priority = PLAYER.zPriority - 0x20;
prim->y0 = prim->y1 = y;
prim->y2 = prim->y3 = y + 62;
if (i == 0) {
prim->y0 = prim->y1 = y;
prim->y2 = prim->y3 = y + 62;
}
prim->drawMode = 6;
prim->r0 = prim->b0 = prim->g0 = 0x7F;
prim->r1 = prim->b1 = prim->g1 = 0x7F;
prim->r2 = prim->b2 = prim->g2 = 0x7F;
prim->r3 = prim->b3 = prim->g3 = 0x7F;
if (i == 2 && !(self->params & 0x100)) {
prim->drawMode |= 8;
}
if (i == 1 && (self->params & 0x100)) {
prim->drawMode |= 8;
}
i++;
uv += 8;
prim = prim->next;
}
if (EntityIsNearPlayer(self)) {
if (!(self->params & 0x100)) {
g_api.func_80134714(SFX_OPEN_DOOR, 0x60, -6);
self->ext.door.angle = 0x1000;
}
if (self->params & 0x100) {
g_api.func_80134714(SFX_OPEN_DOOR, 0x60, 6);
self->ext.door.angle = 0x800;
}
self->animCurFrame = 0;
self->step = 4;
PLAYER.velocityY = 0;
g_Player.D_80072EF4 = 0;
g_Player.D_80072EFC = 0x18;
} else {
self->ext.door.angle = 0xC00;
prim = &g_PrimBuf[self->primIndex];
i = 0;
while (prim != NULL) {
prim->drawMode |= 8;
i++;
if (i == 3) {
break;
}
prim = prim->next;
}
}
break;
case 1:
#if defined(VERSION_BETA)
if (PLAYER.step == 1 && PLAYER.facingLeft != GetSideToPlayer() &&
EntityIsNearPlayer(self))
#else
if (!(((PLAYER.facingLeft != GetSideToPlayer()) & 1) ^ 1) &&
((PLAYER.step == 0x19 && g_PlayableCharacter) ||
PLAYER.step == 1) &&
EntityIsNearPlayer(self))
#endif
{
if (!(self->params & 0x100)) {
g_api.func_80134714(SFX_OPEN_DOOR, 0x60, -6);
}
if (self->params & 0x100) {
g_api.func_80134714(SFX_OPEN_DOOR, 0x60, 6);
}
prim = &g_PrimBuf[self->primIndex];
i = 0;
while (prim != NULL) {
if (i == 1 && !(self->params & 0x100)) {
prim->drawMode &= ~DRAW_HIDE;
}
if (i == 2 && (self->params & 0x100)) {
prim->drawMode &= ~DRAW_HIDE;
}
if (i == 0) {
prim->drawMode &= ~DRAW_HIDE;
}
i++;
prim = prim->next;
}
self->animCurFrame = 0;
g_Player.D_80072EF4 = 0;
g_Player.D_80072EFC = 2;
self->step++;
}
break;
case 2:
g_Player.D_80072EF4 = 0;
g_Player.D_80072EFC = 0x18;
if (!(self->params & 0x100)) {
self->ext.door.angle += 0x20;
if (self->ext.door.angle >= 0x1000) {
self->ext.door.angle = 0x1000;
}
if (self->ext.door.angle == 0x1000) {
self->step++;
}
} else {
self->ext.door.angle -= 0x20;
if (self->ext.door.angle <= 0x800) {
self->ext.door.angle = 0x800;
}
if (self->ext.door.angle == 0x800) {
self->step++;
}
}
break;
case 3:
if (g_Player.D_80072EFC >= 4) {
return;
}
if (!(self->params & 0x100)) {
g_Player.D_80072EF4 = PAD_LEFT;
} else {
g_Player.D_80072EF4 = PAD_RIGHT;
}
g_Player.D_80072EFC = 3;
break;
case 4:
if (!(self->params & 0x100)) {
g_Player.D_80072EF4 = PAD_RIGHT;
} else {
g_Player.D_80072EF4 = PAD_LEFT;
}
g_Player.D_80072EFC = 4;
if (EntityIsNearPlayer(self) == 0) {
self->step++;
}
break;
case 5:
g_Player.D_80072EF4 = 0;
g_Player.D_80072EFC = 4;
if (!(self->params & 0x100)) {
self->ext.door.angle -= 0x20;
if (self->ext.door.angle <= 0xC00) {
self->ext.door.angle = 0xC00;
}
} else {
self->ext.door.angle += 0x20;
if (self->ext.door.angle >= 0xC00) {
self->ext.door.angle = 0xC00;
}
}
if (self->ext.door.angle == 0xC00) {
prim = &g_PrimBuf[self->primIndex];
for (i = 0; prim != NULL; i++, prim = prim->next) {
prim->drawMode |= 8;
}
if (!(self->params & 0x100)) {
g_api.func_80134714(SFX_DOOR_UNKNOWN, 0x60, -6);
}
if (self->params & 0x100) {
g_api.func_80134714(SFX_DOOR_UNKNOWN, 0x60, 6);
}
self->animCurFrame = 1;
self->step = 1;
}
break;
}
if (self->step != 1) {
g_api.func_8010E168(1, 0x20);
g_api.func_8010DFF0(1, 1);
}
x = self->posX.i.hi - self->ext.door.unk86;
if (self->params & 0x100) {
x--;
} else {
x++;
}
i = 0;
angle = self->ext.door.angle;
prim = &g_PrimBuf[self->primIndex];
for (; prim != NULL; i++, prim = prim->next) {
if (!(prim->drawMode & 8)) {
if (!(self->params & 0x100)) {
if (i == 0) {
endX = prim->x0 = prim->x2 =
x + ((rcos(angle) >> 8) * 32 >> 4);
prim->x1 = prim->x3 =
prim->x0 - ((rsin(angle) >> 4) * 6 >> 8);
if (angle > 0xF80) {
prim->x1 = prim->x3 = prim->x0 + 1;
}
if (angle > 0xE00) {
prim->u0 = prim->u2 = 178;
prim->u1 = prim->u3 = 182;
}
if (angle <= 0xE00) {
prim->u0 = prim->u2 = 177;
prim->u1 = prim->u3 = 183;
}
if (angle == 0x1000) {
prim->r1 = prim->b1 = prim->g1 = 63;
prim->r3 = prim->b3 = prim->g3 = 63;
} else {
prim->r1 = prim->b1 = prim->g1 =
0x7F - ((angle & 0x3FF) >> 4);
prim->r3 = prim->b3 = prim->g3 =
0x7F - ((angle & 0x3FF) >> 4);
}
} else {
prim->x0 = prim->x2 = x;
prim->x1 = prim->x3 = endX;
if (angle == 0x1000) {
prim->r0 = prim->b0 = prim->g0 = 63;
prim->r2 = prim->b2 = prim->g2 = 63;
} else {
prim->r0 = prim->b0 = prim->g0 = (angle & 0x3FF) >> 4;
prim->r2 = prim->b2 = prim->g2 = (angle & 0x3FF) >> 4;
}
}
} else {
if (i == 0) {
endX = prim->x1 = prim->x3 =
x + ((rcos(angle) >> 8) * 32 >> 4);
prim->x0 = prim->x2 =
prim->x1 + (((rsin(angle) >> 4) * 6) >> 8);
if (angle < 0x880) {
prim->x0 = prim->x2 = prim->x1 - 1;
}
if (angle < 0xA00) {
prim->u0 = prim->u2 = 178;
prim->u1 = prim->u3 = 182;
}
if (angle > 0xA00) {
prim->u0 = prim->u2 = 177;
prim->u1 = prim->u3 = 183;
}
if (angle == 0x800) {
prim->r0 = prim->b0 = prim->g0 = 127;
prim->r2 = prim->b2 = prim->g2 = 127;
} else {
prim->r0 = prim->b0 = prim->g0 =
63 + ((angle & 0x3FF) >> 4);
prim->r2 = prim->b2 = prim->g2 =
63 + ((angle & 0x3FF) >> 4);
}
} else {
prim->x0 = prim->x2 = endX - 1;
prim->x1 = prim->x3 = x;
if (angle == 0x800) {
prim->r1 = prim->b1 = prim->g1 = 63;
prim->r3 = prim->b3 = prim->g3 = 63;
} else {
prim->r1 = prim->b1 = prim->g1 =
63 - ((angle & 0x3FF) >> 4);
prim->r3 = prim->b3 = prim->g3 =
63 - ((angle & 0x3FF) >> 4);
}
}
}
}
}
sp3F = self->params & 0xFF;
if (self->animCurFrame) {
for (i = 0; i < 4; i++) {
x = self->posX.i.hi;
y = self->posY.i.hi - 24 + i * 0x10;
scrollX = x + g_Tilemap.scrollX.i.hi;
scrollY = y + g_Tilemap.scrollY.i.hi;
tileIdx = (scrollX >> 4) + (scrollY >> 4) * g_Tilemap.hSize * 0x10;
g_Tilemap.fg[tileIdx] = g_eRedDoorTiles[sp3F][i];
}
} else {
for (i = 0; i < 4; i++) {
x = self->posX.i.hi;
y = self->posY.i.hi - 24 + i * 0x10;
scrollX = x + g_Tilemap.scrollX.i.hi;
scrollY = y + g_Tilemap.scrollY.i.hi;
tileIdx = (scrollX >> 4) + (scrollY >> 4) * g_Tilemap.hSize * 0x10;
g_Tilemap.fg[tileIdx] = g_eRedDoorTiles[sp3F][i + 4];
}
}
}

View File

@ -4,7 +4,7 @@
* 1 = Player is on the left side
* 2 = Player is above
*/
s16 GetSideToPlayer(void) {
s32 GetSideToPlayer(void) {
s16 var_a0 = g_CurrentEntity->posX.i.hi > PLAYER.posX.i.hi;
if (g_CurrentEntity->posY.i.hi > PLAYER.posY.i.hi) {

View File

@ -546,7 +546,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* obj = &D_801810F4[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180544);
InitializeEntity(g_eInitGeneric2);
entity->animSet = obj->animSet;
entity->zPriority = obj->zPriority;
entity->unk5A = obj->unk4.s;

View File

@ -109,7 +109,7 @@ void func_8018E5AC(Entity* self) {
ObjInit2* objInit = &D_8018056C[self->params];
if (self->step == 0) {
InitializeEntity(D_80180544);
InitializeEntity(g_eInitGeneric2);
self->animSet = objInit->animSet;
self->zPriority = objInit->zPriority;
self->unk5A = objInit->unk4.s;

View File

@ -49,7 +49,7 @@ void CreateEntitiesToTheLeft(s16 posX) {
#include "../create_entity_from_entity.h"
#include "../entity_is_near_player.h"
INCLUDE_ASM("asm/us/st/mad/nonmatchings/EDB8", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -47,7 +47,7 @@ void EntityUnkId15(Entity* entity);
extern u16 g_InitializeData0[];
extern u16 D_8018052C[];
extern u16 UNK_Invincibility0[];
extern u16 D_80180544[];
extern u16 g_eInitGeneric2[];
extern ObjInit2 D_8018056C[];
extern u16 D_80180D1C[];
extern u16 D_80180D4C[];

View File

@ -11,7 +11,7 @@ void EntityCavernDoorVase(Entity* self) {
ObjInit2* objInit = &D_80180BFC[self->params];
if (self->step == 0) {
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
self->animSet = objInit->animSet;
self->zPriority = objInit->zPriority;
self->facingLeft = objInit->unk4.U8.unk0;

View File

@ -9,7 +9,7 @@ void EntityFlyingOwlAndLeaves(Entity* entity) {
switch (entity->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
entity->animSet = ANIMSET_OVL(1);
entity->animCurFrame = 56;
if (entity->params != 0) {
@ -106,7 +106,7 @@ void EntityFallingLeaf(Entity* entity) {
switch (entity->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
entity->animSet = ANIMSET_OVL(1);
entity->animCurFrame = (entity->params & 1) + 63;
entity->zPriority = 0xC1;

View File

@ -128,7 +128,7 @@ void EntityDeathStolenItem(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
break;
case 1:
@ -289,7 +289,7 @@ void EntityDeath(Entity* self) {
if (D_801D7DD0 & 0x80) {
primIndex = g_api.AllocPrimitives(PRIM_GT4, 2);
if (primIndex != -1) {
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
self->animSet = ANIMSET_OVL(8);
self->palette = 0x2D6;
self->unk5A = 0x44;
@ -565,7 +565,7 @@ void EntityUnkId5B(Entity* entity) {
switch (entity->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
entity->animSet = ANIMSET_OVL(8);
entity->palette = 0x2D6;
entity->animCurFrame = 0;
@ -605,7 +605,7 @@ void EntityUnkId5E(Entity* entity) {
switch (entity->step) {
case 0:
animCurFrame = entity->animCurFrame;
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
entity->animCurFrame = animCurFrame;
entity->animSet = ANIMSET_OVL(8);
entity->palette = 0x2D6;

View File

@ -5,7 +5,7 @@ INCLUDE_ASM("st/no3/nonmatchings/41C80", TestCollisions);
#include "../libstage.h"
INCLUDE_ASM("st/no3/nonmatchings/41C80", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -555,7 +555,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_80182764[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;
@ -991,7 +991,7 @@ void EntitySplashWater(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
if (temp_s2 != 0 && temp_s4 != 7) {
primIndex = g_api.AllocPrimitives(PRIM_GT4, 4);
} else {
@ -1184,7 +1184,7 @@ void EntitySurfacingWater(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_GT4, 2);
if (primIndex == -1) {
DestroyEntity(self);
@ -1330,7 +1330,7 @@ void EntitySideWaterSplash(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex != -1) {
prim = &g_PrimBuf[primIndex];
@ -1416,7 +1416,7 @@ void EntitySmallWaterDrop(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_TILE, 1);
if (primIndex == -1) {
DestroyEntity(self);
@ -1487,7 +1487,7 @@ void EntityWaterDrop(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180B00);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.func_800EDB58(PRIM_TILE_ALT, 0x21);
if (primIndex == -1) {
DestroyEntity(self);

View File

@ -97,7 +97,7 @@ extern u16 D_80180AD0[];
extern u16 g_EInitGeneric[];
extern u16 D_80180AE8[];
extern u16 D_80180AF4[];
extern u16 D_80180B00[];
extern u16 g_eInitGeneric2[];
extern u16 D_80180B18[];
extern u16 D_80180B48[];
extern u16 D_80180B54[];

View File

@ -10,7 +10,7 @@ void func_801B246C(Entity* self) {
ObjInit2* temp_s0 = &D_80180C10[self->params];
if (self->step == 0) {
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
self->animSet = temp_s0->animSet;
self->zPriority = temp_s0->zPriority;
self->facingLeft = temp_s0->unk4.U8.unk0;

View File

@ -5,7 +5,7 @@ INCLUDE_ASM("st/np3/nonmatchings/394F0", TestCollisions);
#include "../libstage.h"
INCLUDE_ASM("st/np3/nonmatchings/394F0", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -677,7 +677,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_801820F0[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -56,7 +56,7 @@ void EntitySplashWater(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
if (temp_s2 != 0 && temp_s4 != 7) {
primIndex = g_api.AllocPrimitives(PRIM_GT4, 4);
} else {
@ -249,7 +249,7 @@ void EntitySurfacingWater(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_GT4, 2);
if (primIndex == -1) {
DestroyEntity(self);
@ -395,7 +395,7 @@ void EntitySideWaterSplash(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex != -1) {
prim = &g_PrimBuf[primIndex];
@ -481,7 +481,7 @@ void EntitySmallWaterDrop(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.AllocPrimitives(PRIM_TILE, 1);
if (primIndex == -1) {
DestroyEntity(self);
@ -552,7 +552,7 @@ void EntityWaterDrop(Entity* self) {
switch (self->step) {
case 0:
InitializeEntity(D_80180A90);
InitializeEntity(g_eInitGeneric2);
primIndex = g_api.func_800EDB58(PRIM_TILE_ALT, 0x21);
if (primIndex == -1) {
DestroyEntity(self);

View File

@ -70,7 +70,7 @@ extern u16 D_80180A60[];
extern u16 g_EInitGeneric[];
extern u16 D_80180A78[];
extern u16 D_80180A84[];
extern u16 D_80180A90[];
extern u16 g_eInitGeneric2[];
extern u16 D_80180AA8[];
extern u16 D_80180AB4[];
extern u16 D_80180AC0[];

View File

@ -10,7 +10,7 @@ void func_801B0958(Entity* self) {
ObjInit2* temp_s0 = &D_80180D64[self->params];
if (self->step == 0) {
InitializeEntity(D_80180C1C);
InitializeEntity(g_eInitGeneric2);
self->animSet = temp_s0->animSet;
self->zPriority = temp_s0->zPriority;
self->unk5A = temp_s0->unk4.u;

View File

@ -4,7 +4,7 @@ INCLUDE_ASM("st/nz0/nonmatchings/39908", TestCollisions);
#include "../entity_damage_display.h"
#include "../libstage.h"
INCLUDE_ASM("st/nz0/nonmatchings/39908", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -710,7 +710,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_80182014[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180C1C);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -52,7 +52,7 @@ extern PfnEntityUpdate PfnEntityUpdates[];
extern const u16 g_InitializeEntityData0[];
extern u16 D_80180BEC[];
extern u16 g_EInitGeneric[]; // Init Elevator2
extern u16 D_80180C1C[];
extern u16 g_eInitGeneric2[];
extern u16 D_80180C34[];
// *** EntityBloodSkeleton properties START ***

View File

@ -5,7 +5,7 @@ void func_801A7D64(Entity* self) {
ObjInit2* obj = &D_80180638[self->params];
if (self->step == 0) {
InitializeEntity(D_801805BC);
InitializeEntity(g_eInitGeneric2);
self->animSet = obj->animSet;
self->zPriority = obj->zPriority;
self->unk5A = obj->unk4.s;
@ -266,7 +266,7 @@ void func_801A8620(Entity* entity) {
switch (entity->step) {
case 0:
InitializeEntity(D_801805BC);
InitializeEntity(g_eInitGeneric2);
entity->animSet = ANIMSET_DRA(2);
entity->animCurFrame = 1;
entity->zPriority = 0xB0;

View File

@ -5,7 +5,7 @@ INCLUDE_ASM("st/st0/nonmatchings/31CA0", TestCollisions);
#include "../libstage.h"
INCLUDE_ASM("st/st0/nonmatchings/31CA0", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"
@ -73,7 +73,7 @@ s32 GetDistanceToPlayerY(void) {
return yDistance;
}
s16 GetSideToPlayer(void) {
s32 GetSideToPlayer(void) {
s16 side = g_CurrentEntity->posX.i.hi > PLAYER.posX.i.hi;
if (g_CurrentEntity->posY.i.hi > PLAYER.posY.i.hi) {

View File

@ -863,7 +863,7 @@ void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_80181FE8[entity->params];
if (entity->step == 0) {
InitializeEntity(D_801805BC);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -28,7 +28,7 @@ typedef enum {
} EntityIDs;
void CreateEntityFromEntity(u16 entityId, Entity* source, Entity* entity);
s16 GetSideToPlayer();
s32 GetSideToPlayer();
void MoveEntity();
void SetStep(u8);
void EntityExplosion(Entity*);
@ -49,7 +49,7 @@ extern u16 D_80180574[];
extern u16 g_InitializeEntityData0[];
extern u16 D_80180598[]; // Init EntityCutscene
extern u16 D_801805A4[];
extern u16 D_801805BC[];
extern u16 g_eInitGeneric2[];
extern u16 D_801805D4[]; // Init EntityStageTitleCard
extern u16 D_801805E0[]; // Init EntityDracula
extern u16 D_801805EC[]; // Init EntityDraculaFireball

View File

@ -239,7 +239,7 @@ u16 D_8018047C[] = {
u16 D_80180488[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000,
};
u16 D_80180494[] = {
u16 g_eInitGeneric2[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0003, 0x0000,
};
u16 g_eDamageDisplayInit[] = {
@ -266,11 +266,9 @@ ObjInit2 D_801804E0[] = {
// Owned by EntityRedDoor to animate the tiles behind the door itself.
// There is a loop in EntityRedDoor that forces to write those tiles
// at every frame based on the door state to create the animation.
u16 D_80180508[] = {
/* 508 */ 0x001D, 0x0025, 0x0075, 0x007D,
/* 510 */ 0x00C6, 0x00C7, 0x00C8, 0x00C9,
/* 518 */ 0x001F, 0x0027, 0x0077, 0x007F,
/* 520 */ 0x00CA, 0x00CB, 0x00CC, 0x00CD,
u16 g_eRedDoorTiles[2][8] = {
{0x1D, 0x25, 0x75, 0x7D, 0xC6, 0xC7, 0xC8, 0xC9},
{0x1F, 0x27, 0x77, 0x7F, 0xCA, 0xCB, 0xCC, 0xCD},
};
// owned by func_801870B0
@ -653,31 +651,10 @@ u16 g_eDamageDisplayClut[] = {
/* A7A */ 0x01B1,
};
u8 D_80180A7C[] = {
/* A7C */ 0xB1,
/* A7D */ 0xB7,
/* A7E */ 0xB1,
/* A7F */ 0xB7,
/* A80 */ 0x21,
/* A81 */ 0x21,
/* A82 */ 0x5F,
/* A83 */ 0x5F,
/* A84 */ 0x88,
/* A85 */ 0xA8,
/* A86 */ 0x88,
/* A87 */ 0xA8,
/* A88 */ 0x21,
/* A89 */ 0x21,
/* A8A */ 0x5F,
/* A8B */ 0x5F,
/* A8C */ 0xA8,
/* A8D */ 0x88,
/* A8E */ 0xA8,
/* A8F */ 0x88,
/* A90 */ 0x21,
/* A91 */ 0x21,
/* A92 */ 0x5F,
/* A93 */ 0x5F,
u8 g_eRedDoorUV[][8] = {
{0xB1, 0xB7, 0xB1, 0xB7, 0x21, 0x21, 0x5F, 0x5F},
{0x88, 0xA8, 0x88, 0xA8, 0x21, 0x21, 0x5F, 0x5F},
{0xA8, 0x88, 0xA8, 0x88, 0x21, 0x21, 0x5F, 0x5F},
};
s16 D_80180A94[] = {
@ -1060,7 +1037,7 @@ extern u16 g_ItemIconSlots[];
void func_80186FD0(Entity* arg0) {
ObjInit2* objInit = &D_801804E0[arg0->params];
if (arg0->step == 0) {
InitializeEntity(D_80180494);
InitializeEntity(g_eInitGeneric2);
arg0->animSet = objInit->animSet;
arg0->zPriority = objInit->zPriority;
arg0->unk5A = objInit->unk4.s;

View File

@ -17,7 +17,7 @@ INCLUDE_ASM("st/wrp/nonmatchings/861C", TestCollisions);
#include "../libstage.h"
INCLUDE_ASM("st/wrp/nonmatchings/861C", EntityRedDoor);
#include "../entity_red_door.h"
#include "../../destroy_entity.h"

View File

@ -797,11 +797,10 @@ ObjInit2 D_80181134[] = {
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x00, 0x10, 0x00, 0, D_80181130},
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x00, 0x10, 0x00, 0, D_8018112C},
};
extern u16 D_80180494[];
void EntityRoomForeground(Entity* entity) {
ObjInit2* objInit = &D_80181134[entity->params];
if (entity->step == 0) {
InitializeEntity(D_80180494);
InitializeEntity(g_eInitGeneric2);
entity->animSet = objInit->animSet;
entity->zPriority = objInit->zPriority;
entity->unk5A = objInit->unk4.s;

View File

@ -43,10 +43,13 @@ extern s32 D_8003C8B8;
extern u16 g_InitializeData0[];
extern u16 D_80180458[];
extern u16 g_EInitGeneric[];
extern u16 g_eInitGeneric2[];
extern u16 D_801804C4[];
extern u16 g_eRedDoorTiles[2][8];
extern u32 D_80180608[];
extern u32 D_80180648;
extern WarpCoord D_8018065C[];
extern u8 g_eRedDoorUV[3][8];
extern u16 D_80180FE8[];
extern u32 D_80181044[];
extern u16 D_801810A0[]; // sestren: soul steal random angle offsets?