mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
De-duplicate CEN (#1651)
I went through all of CEN, cross-referencing it with WRP to make as many files match as possible. This involved pulling in data (which had been pulled in on WRP but not on CEN yet), renaming shared variables to not have placeholder names, adjusting file splits, and more. EntityBreakable seems to be very different here, so I did not do any deduplication on that one yet. I think we need to get a robust system for deduplicating across stages so we can share .h files even when the stages are different. Right now there's no way for an included .h file to know it's part of CEN (at least, that I know of).
This commit is contained in:
parent
7881032011
commit
0501151335
@ -90,7 +90,7 @@ segments:
|
||||
- [0xF3A0, data] # D_psp_09246A20
|
||||
- [0xF440, data] # D_psp_09246AC0
|
||||
- [0xF450, data] # D_psp_09246AD0
|
||||
- [0xF460, data] # D_80181134
|
||||
- [0xF460, data] # eRoomForegroundInit
|
||||
- [0xF700, data] # D_psp_09246D80
|
||||
- [0xF720, data] # D_psp_09246DA0
|
||||
- [0xF740, .data, wrp_psp/wrp_data_F740] # D_psp_09246DC0
|
||||
|
@ -38,7 +38,9 @@ segments:
|
||||
- [0xDC, .data, header] # layers
|
||||
- [0x134, .data, header] # gfxbanks
|
||||
- [0x1EC, .data, e_laydef] # layout entries header
|
||||
- [0x394, .data, entity]
|
||||
- [0x394, .data, e_init]
|
||||
- [0x4D4, .data, st_debug]
|
||||
- [0x554, .data, e_breakable]
|
||||
- [0x5D8, .data, holyglassescutscene]
|
||||
- [0x68C, .data, F890]
|
||||
- [0x7B8, .data, st_update]
|
||||
@ -48,14 +50,15 @@ segments:
|
||||
- [0xDBC, .data, e_collect]
|
||||
- [0x10AC, .data, e_misc]
|
||||
- [0x1110, .data, e_misc]
|
||||
- [0x11C8, data]
|
||||
- [0x11C8, .data, e_particles]
|
||||
- [0x1248, .data, e_room_fg]
|
||||
- [0x12D4, .data, rooms]
|
||||
- [0x1300, .data, e_layout] # layout entries data
|
||||
- [0x13F0, data]
|
||||
- [0x69EC, .data, tile_data] # tile data
|
||||
- [0x81EC, .data, tile_data] # tile definitions
|
||||
- [0xC60C, .data, sprites]
|
||||
- [0xD414, .rodata, entity]
|
||||
- [0xD414, .rodata, e_init]
|
||||
- [0xD42C, .rodata, holyglassescutscene]
|
||||
- [0xD4B0, .rodata, F890]
|
||||
- [0xD4D8, .rodata, e_red_door] # EntityRedDoor
|
||||
@ -65,7 +68,9 @@ segments:
|
||||
- [0xD5B0, .rodata, e_misc]
|
||||
- [0xD5C4, .rodata, e_stage_name] # EntityStageNamePopup
|
||||
- [0xD5F8, .rodata, prim_helpers]
|
||||
- [0xD600, c]
|
||||
- [0xD600, c, st_debug]
|
||||
- [0xD89C, c, e_breakable]
|
||||
- [0xDB18, c]
|
||||
- [0xDF0C, c, holyglassescutscene]
|
||||
- [0xF890, c]
|
||||
- [0x10E4C, c, st_update]
|
||||
@ -74,10 +79,12 @@ segments:
|
||||
- [0x135B4, c, e_red_door]
|
||||
- [0x14264, c, st_common]
|
||||
- [0x15714, c, e_collect]
|
||||
- [0x16C90, c, blit_char]
|
||||
- [0x16F30, c, e_misc]
|
||||
- [0x16C90, c, blit_char]
|
||||
- [0x16F30, c, e_misc]
|
||||
- [0x1A5F0, c, e_stage_name]
|
||||
- [0x1B274, c]
|
||||
- [0x1B274, c, e_particles]
|
||||
- [0x1BAB8, c, e_room_fg]
|
||||
- [0x1BBA4, c, popup]
|
||||
- [0x1BED4, c, prim_helpers]
|
||||
- [0x1C704, .bss, header]
|
||||
- [0x1C764, .bss, create_entity]
|
||||
|
@ -65,7 +65,7 @@ PrimResetNext = 0x09244520;
|
||||
UnkPolyFunc2 = 0x09244628;
|
||||
PrimDecreaseBrightness = 0x09244690;
|
||||
EntityBreakable = 0x09244838;
|
||||
func_80186FD0 = 0x092449b8;
|
||||
EntityBackgroundBlock = 0x092449b8;
|
||||
EntityUnkId12 = 0x09244ac8;
|
||||
EntityWarpRoom = 0x09244d28;
|
||||
EntityWarpSmallRocks = 0x09245c50;
|
||||
@ -90,7 +90,7 @@ unk14_yVel = 0x092466B8;
|
||||
unk14_startFrame = 0x092466D0;
|
||||
unk14_lifetime = 0x092466D8;
|
||||
g_eDamageDisplayClut = 0x09246AA8;
|
||||
D_80181134 = 0x09246AE0;
|
||||
eRoomForegroundInit = 0x09246AE0;
|
||||
g_SpriteBanks = 0x09246C18;
|
||||
g_TileLayers = 0x09246D18;
|
||||
g_Cluts = 0x09246D80;
|
||||
@ -113,7 +113,7 @@ g_eBreakableHitboxes = 0x09246FD0;
|
||||
g_eBreakableanimSets = 0x09246FD8;
|
||||
g_eBreakableDrawModes = 0x09246FE8;
|
||||
g_StageOverlay = 0x0924B960;
|
||||
D_801804E0 = 0x0924B9B8;
|
||||
g_eBackgroundBlockInit = 0x0924B9B8;
|
||||
g_EntityUnkId12Hitbox = 0x0924B9E0;
|
||||
g_EntityUnkId12TilemapProps = 0x0924B9E8;
|
||||
g_HeartDropArray_wrp = 0x0924BA58;
|
||||
|
@ -1,6 +1,3 @@
|
||||
g_ESoulStealOrbAngles = 0x801811C8;
|
||||
g_ESoulStealOrbSprt = 0x801811D8;
|
||||
g_ESoulStealOrbAnim = 0x80181238;
|
||||
D_80181658 = 0x80181658;
|
||||
D_8018199C = 0x8018199C;
|
||||
D_80183A40 = 0x80183A40;
|
||||
|
@ -862,7 +862,7 @@ typedef struct {
|
||||
/* 0x08 */ u16 drawFlags;
|
||||
/* 0x0A */ u16 drawMode;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ u8* unk10;
|
||||
/* 0x10 */ u8* animFrames;
|
||||
} ObjInit; // size = 0x14
|
||||
|
||||
typedef struct { // only difference from above is this one uses a facingLeft
|
||||
@ -874,7 +874,7 @@ typedef struct { // only difference from above is this one uses a facingLeft
|
||||
/* 0x08 */ u16 drawFlags;
|
||||
/* 0x0A */ u16 drawMode;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ u8* unk10;
|
||||
/* 0x10 */ u8* animFrames;
|
||||
} ObjInit2; // size = 0x14
|
||||
|
||||
typedef struct GpuBuffer { // also called 'DB' in the PSY-Q samples
|
||||
|
@ -19,20 +19,7 @@ void func_us_8018AC0C(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
static u8 g_EntityUnkId12Hitbox[] = {
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x20};
|
||||
static u8 g_EntityUnkId12Data[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
static u16 g_EntityUnkId12TilemapProps[] = {
|
||||
0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x01FC, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x00FC, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x0200, 0x0600, 0x0300,
|
||||
0x0000, 0x01FC, 0x0500, 0x02FC, 0x0000, 0x0000, 0x0500, 0x0400,
|
||||
0x0000, 0x0000, 0x0500, 0x0400, 0x0000, 0x01FC, 0x0500, 0x02FC,
|
||||
0x00F0, 0x01FC, 0x0310, 0x02FC, 0x00F0, 0x01FC, 0x0310, 0x02FC,
|
||||
};
|
||||
#include "../../st/entity_unk_id12.h"
|
||||
|
@ -1,30 +0,0 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "cen.h"
|
||||
|
||||
#include "../entity_soul_steal_orb.h"
|
||||
|
||||
#include "../entity_enemy_blood.h"
|
||||
|
||||
void EntityUnkId08(Entity* entity) {
|
||||
ObjInit* objInit = &D_8018125C[entity->params];
|
||||
|
||||
if (entity->step == 0) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
entity->animSet = objInit->animSet;
|
||||
entity->zPriority = objInit->zPriority;
|
||||
entity->unk5A = objInit->unk5A;
|
||||
entity->palette = objInit->palette;
|
||||
entity->drawFlags = objInit->drawFlags;
|
||||
entity->drawMode = objInit->drawMode;
|
||||
if (objInit->unkC != 0) {
|
||||
entity->flags = objInit->unkC;
|
||||
}
|
||||
if (entity->params >= 5) {
|
||||
entity->rotZ = 0x800;
|
||||
entity->drawFlags = (u8)(entity->drawFlags | FLAG_DRAW_ROTZ);
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
}
|
||||
|
||||
#include "../popup.h"
|
@ -1,112 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
/*
|
||||
* File: D600.c
|
||||
* Overlay: CEN
|
||||
* Description: Center Cube Area (Final Boss)
|
||||
*/
|
||||
|
||||
#include "cen.h"
|
||||
#include "game.h"
|
||||
#include "sfx.h"
|
||||
|
||||
// background block of rock
|
||||
void EntityBackgroundBlock(Entity* self) {
|
||||
ObjInit* obj = &D_80180490[self->params].animSet;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
self->animSet = obj->animSet;
|
||||
self->zPriority = obj->zPriority;
|
||||
self->unk5A = obj->unk5A;
|
||||
self->palette = obj->palette;
|
||||
self->drawFlags = obj->drawFlags;
|
||||
self->drawMode = obj->drawMode;
|
||||
|
||||
if (obj->unkC != 0) {
|
||||
self->flags = obj->unkC;
|
||||
}
|
||||
|
||||
if (self->params == 1) {
|
||||
self->rotY = 0x200;
|
||||
self->rotX = 0x200;
|
||||
}
|
||||
}
|
||||
AnimateEntity(obj->unk10, self);
|
||||
}
|
||||
|
||||
extern u16 g_EntityUnkId12TilemapProps[];
|
||||
extern u16 g_EntityUnkId12Init[];
|
||||
extern u8 g_EntityUnkId12Data[];
|
||||
extern u8 g_EntityUnkId12Hitbox[];
|
||||
|
||||
#include "../entity_unk_id12.h"
|
||||
|
||||
void EntityUnkId01(Entity* self) {
|
||||
Entity* newEntity;
|
||||
u16* ptr;
|
||||
s32 j;
|
||||
s32 i;
|
||||
u16 params = self->params >> 0xC;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180404);
|
||||
self->zPriority = 0xB0;
|
||||
self->drawMode = D_801805B4[params];
|
||||
newEntity = &self[1];
|
||||
self->hitboxHeight = D_80180594[params];
|
||||
self->animSet = D_801805A4[params];
|
||||
DestroyEntity(newEntity);
|
||||
CreateEntityFromEntity(E_BACKGROUND_BLOCK, self, newEntity);
|
||||
if (params != 0) {
|
||||
self[1].posY.i.hi -= 32;
|
||||
} else {
|
||||
self[1].posY.i.hi -= 16;
|
||||
}
|
||||
newEntity->params = 1;
|
||||
}
|
||||
|
||||
AnimateEntity(D_80180574[params], self);
|
||||
|
||||
if (self->hitParams) {
|
||||
g_api.PlaySfx(SFX_CANDLE_HIT);
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromCurrentEntity(E_EXPLOSION, newEntity);
|
||||
newEntity->params = D_8018059C[params] | 0x10;
|
||||
}
|
||||
|
||||
for (ptr = &D_801805BC, i = 0; i < 4; i++) {
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromEntity(0x80, self, newEntity);
|
||||
newEntity->posX.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->posY.i.hi = newEntity->posY.i.hi + *ptr;
|
||||
ptr++;
|
||||
if (params != 0) {
|
||||
newEntity->posY.i.hi -= 20;
|
||||
}
|
||||
newEntity->params = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (params != 0) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromEntity(0x80, self, newEntity);
|
||||
newEntity->posX.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->posY.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->params = j + 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
ReplaceBreakableWithItemDrop(self);
|
||||
DestroyEntity(&self[1]);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8018DB18(Entity* self) {
|
||||
Entity* newEntity;
|
@ -57,13 +57,13 @@ extern u16 g_EInitGeneric[];
|
||||
extern u16 g_eInitGeneric2[];
|
||||
extern u16 D_8018047C[]; // EntityElevator
|
||||
|
||||
extern ObjInit D_80180490[];
|
||||
extern s32 D_80180574[];
|
||||
extern s8 D_80180594[];
|
||||
extern ObjInit g_eBackgroundBlockInit[];
|
||||
extern u16* D_80180574[];
|
||||
extern u8 D_80180594[];
|
||||
extern u8 D_8018059C[];
|
||||
extern s16 D_801805A4[];
|
||||
extern s8 D_801805B4[];
|
||||
extern u16 D_801805BC;
|
||||
extern u16 D_801805A4[];
|
||||
extern u8 D_801805B4[];
|
||||
extern s16 D_801805BC[];
|
||||
extern u16 D_80180EEC[];
|
||||
extern u16 D_80180F1C[];
|
||||
extern s8 c_HeartPrizes[];
|
||||
|
@ -1,4 +1,2 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <common.h>
|
||||
|
||||
#include "../create_entity.h"
|
||||
|
101
src/st/cen/e_breakable.c
Normal file
101
src/st/cen/e_breakable.c
Normal file
@ -0,0 +1,101 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
#include "cen.h"
|
||||
#include "game.h"
|
||||
#include "sfx.h"
|
||||
|
||||
static u8 anim_1[] = {3, 14, 4, 15, 4, 16, 4, 17, 4, 18, 4, 19, 3, 20};
|
||||
static u8 anim_2[] = {3, 21, 4, 22, 4, 23, 4, 24, 4, 25, 4, 26, 3, 27};
|
||||
|
||||
static u8* g_eBreakableAnimations[] = {
|
||||
anim_1, anim_2, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
static u8 g_eBreakableHitboxes[] = {12, 20, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
static u8 g_eBreakableExplosionTypes[] = {3, 3, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
static u16 g_eBreakableanimSets[] = {
|
||||
ANIMSET_OVL(1), ANIMSET_OVL(1), 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
static u8 g_eBreakableDrawModes[] = {
|
||||
DRAW_TPAGE | DRAW_TPAGE2,
|
||||
DRAW_TPAGE | DRAW_TPAGE2,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
};
|
||||
|
||||
static s16 xyOffsets[] = {
|
||||
-4, -4, 3, -6, 2, 9, -4, 12, 0, 2, 0, 15, 0, 31,
|
||||
};
|
||||
|
||||
void EntityBreakable(Entity* self) {
|
||||
Entity* newEntity;
|
||||
u16* ptr;
|
||||
s32 j;
|
||||
s32 i;
|
||||
u16 breakableType = self->params >> 0xC;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180404);
|
||||
self->zPriority = 0xB0;
|
||||
self->drawMode = g_eBreakableDrawModes[breakableType];
|
||||
newEntity = &self[1];
|
||||
self->hitboxHeight = g_eBreakableHitboxes[breakableType];
|
||||
self->animSet = g_eBreakableanimSets[breakableType];
|
||||
DestroyEntity(newEntity);
|
||||
CreateEntityFromEntity(E_BACKGROUND_BLOCK, self, newEntity);
|
||||
if (breakableType != 0) {
|
||||
self[1].posY.i.hi -= 32;
|
||||
} else {
|
||||
self[1].posY.i.hi -= 16;
|
||||
}
|
||||
newEntity->params = 1;
|
||||
}
|
||||
|
||||
AnimateEntity(g_eBreakableAnimations[breakableType], self);
|
||||
|
||||
if (self->hitParams) {
|
||||
g_api.PlaySfx(SFX_CANDLE_HIT);
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromCurrentEntity(E_EXPLOSION, newEntity);
|
||||
newEntity->params =
|
||||
g_eBreakableExplosionTypes[breakableType] | 0x10;
|
||||
}
|
||||
|
||||
for (ptr = &xyOffsets, i = 0; i < 4; i++) {
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromEntity(0x80, self, newEntity);
|
||||
newEntity->posX.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->posY.i.hi = newEntity->posY.i.hi + *ptr;
|
||||
ptr++;
|
||||
if (breakableType != 0) {
|
||||
newEntity->posY.i.hi -= 20;
|
||||
}
|
||||
newEntity->params = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (breakableType != 0) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
newEntity = AllocEntity(&g_Entities[224], &g_Entities[256]);
|
||||
if (newEntity != 0) {
|
||||
CreateEntityFromEntity(0x80, self, newEntity);
|
||||
newEntity->posX.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->posY.i.hi += *ptr;
|
||||
ptr++;
|
||||
newEntity->params = j + 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
ReplaceBreakableWithItemDrop(self);
|
||||
DestroyEntity(&self[1]);
|
||||
}
|
||||
}
|
@ -2,14 +2,14 @@
|
||||
#include "game.h"
|
||||
#include "stage.h"
|
||||
|
||||
void EntityUnkId01(Entity*);
|
||||
void EntityBreakable(Entity*);
|
||||
void EntityExplosion(Entity*);
|
||||
void EntityPrizeDrop(Entity*);
|
||||
void EntityDamageDisplay(Entity*);
|
||||
void EntityRedDoor(Entity*);
|
||||
void EntityIntenseExplosion(Entity*);
|
||||
void EntitySoulStealOrb(Entity*);
|
||||
void EntityUnkId08(Entity*);
|
||||
void EntityRoomForeground(Entity*);
|
||||
void EntityStageNamePopup(Entity*);
|
||||
void EntityEquipItemDrop(Entity*);
|
||||
void EntityRelicOrb(Entity*);
|
||||
@ -31,10 +31,10 @@ void EntityUnkId1B(Entity*);
|
||||
void EntityMovingElevator(Entity*);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
EntityUnkId01, EntityExplosion,
|
||||
EntityBreakable, EntityExplosion,
|
||||
EntityPrizeDrop, EntityDamageDisplay,
|
||||
EntityRedDoor, EntityIntenseExplosion,
|
||||
EntitySoulStealOrb, EntityUnkId08,
|
||||
EntitySoulStealOrb, EntityRoomForeground,
|
||||
EntityStageNamePopup, EntityEquipItemDrop,
|
||||
EntityRelicOrb, EntityHeartDrop,
|
||||
EntityEnemyBlood, EntityMessageBox,
|
||||
@ -138,14 +138,14 @@ EntityInit D_8018047C = {
|
||||
static u32 JUNK_80180488 = 0x00FF0140;
|
||||
static u32 D_8018048C = 0x00FF0740;
|
||||
|
||||
ObjInit D_80180490 = {
|
||||
ObjInit g_eBackgroundBlockInit = {
|
||||
.animSet = ANIMSET_OVL(2),
|
||||
.zPriority = 129,
|
||||
.unk5A = 0,
|
||||
.palette = PAL_DRA(0),
|
||||
.drawFlags = DRAW_DEFAULT,
|
||||
.unkC = NULL,
|
||||
.unk10 = &D_8018048C,
|
||||
.animFrames = &D_8018048C,
|
||||
};
|
||||
|
||||
u16 g_eRedDoorTiles[][8] = {
|
||||
@ -153,59 +153,3 @@ u16 g_eRedDoorTiles[][8] = {
|
||||
{0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x02F4, 0x0309, 0x0305, 0x0307},
|
||||
{0x03A3, 0x03A7, 0x03A8, 0x03A3, 0x02F4, 0x030F, 0x0310, 0x02F4},
|
||||
};
|
||||
|
||||
u8 g_EntityUnkId12Hitbox[] = {32, 32, 32, 32, 32, 32, 80, 32};
|
||||
u8 g_EntityUnkId12Data[] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
u16 g_EntityUnkId12TilemapProps[] = {
|
||||
0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x01FC, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x00FC, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x0200, 0x0600, 0x0300,
|
||||
0x0000, 0x01FC, 0x0500, 0x02FC, 0x0000, 0x0000, 0x0500, 0x0400,
|
||||
0x0000, 0x0000, 0x0500, 0x0400, 0x0000, 0x01FC, 0x0500, 0x02FC,
|
||||
0x00F0, 0x01FC, 0x0310, 0x02FC, 0x00F0, 0x01FC, 0x0310, 0x02FC,
|
||||
};
|
||||
|
||||
static u16 D_80180554[] = {
|
||||
0x0E03, 0x0F04, 0x1004, 0x1104, 0x1204, 0x1304, 0x1403, 0x0000,
|
||||
};
|
||||
|
||||
static u16 D_80180564[] = {
|
||||
0x1503, 0x1604, 0x1704, 0x1804, 0x1904, 0x1A04, 0x1B03, 0x0000,
|
||||
};
|
||||
|
||||
u16* D_80180574[] = {
|
||||
D_80180554, D_80180564, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
};
|
||||
|
||||
// height
|
||||
u8 D_80180594[] = {
|
||||
12, 20, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
// params
|
||||
u8 D_8018059C[] = {
|
||||
0x3, 0x3, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
// animset
|
||||
u16 D_801805A4[] = {
|
||||
ANIMSET_OVL(1), ANIMSET_OVL(1), 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
// draw mode
|
||||
u8 D_801805B4[] = {
|
||||
DRAW_TPAGE | DRAW_TPAGE2,
|
||||
DRAW_TPAGE | DRAW_TPAGE2,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
DRAW_DEFAULT,
|
||||
};
|
||||
|
||||
s16 D_801805BC[] = {
|
||||
-4, -4, 3, -6, 2, 9, -4, 12, 0, 2, 0, 15, 0, 31,
|
||||
};
|
2
src/st/cen/e_particles.c
Normal file
2
src/st/cen/e_particles.c
Normal file
@ -0,0 +1,2 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "../e_particles.h"
|
2
src/st/cen/e_room_fg.c
Normal file
2
src/st/cen/e_room_fg.c
Normal file
@ -0,0 +1,2 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "../e_room_fg.h"
|
@ -154,7 +154,7 @@ void EntityHolyGlassesCutscene(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
if (CutsceneUnk2(D_801813F0) & 0xFF) {
|
||||
if (CutsceneUnk2(D_801813F0)) {
|
||||
self->flags |= FLAG_HAS_PRIMS | FLAG_UNK_2000;
|
||||
D_8003C704 = 1;
|
||||
g_CutsceneFlags = 0;
|
||||
|
4
src/st/cen/popup.c
Normal file
4
src/st/cen/popup.c
Normal file
@ -0,0 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "cen.h"
|
||||
|
||||
#include "../popup.h"
|
5
src/st/cen/st_debug.c
Normal file
5
src/st/cen/st_debug.c
Normal file
@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
#include "cen.h"
|
||||
|
||||
#include "../st_debug.h"
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
s32 CutsceneUnk2(s32 textDialogue) {
|
||||
u8 CutsceneUnk2(s32 textDialogue) {
|
||||
Primitive* prim;
|
||||
s16 firstPrimIndex;
|
||||
|
||||
|
@ -31,7 +31,7 @@ void EntityUnkId11(Entity* entity) {
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(obj->unk10, entity);
|
||||
AnimateEntity(obj->animFrames, entity);
|
||||
}
|
||||
|
||||
void func_80191B44(Entity* entity) {
|
||||
|
@ -27,7 +27,7 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->drawFlags |= FLAG_DRAW_ROTZ;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
AnimateEntity(objInit->animFrames, entity);
|
||||
}
|
||||
|
||||
#include "../popup.h"
|
||||
|
@ -132,9 +132,9 @@ void EntitySuccubusCutscene(Entity* self) {
|
||||
}
|
||||
}
|
||||
if (self->params) {
|
||||
bit_shifty = CutsceneUnk2(D_80181B65) & 0xFF;
|
||||
bit_shifty = CutsceneUnk2(D_80181B65);
|
||||
} else {
|
||||
bit_shifty = CutsceneUnk2(D_801816C8) & 0xFF;
|
||||
bit_shifty = CutsceneUnk2(D_801816C8);
|
||||
}
|
||||
if (bit_shifty) {
|
||||
self->flags |= FLAG_HAS_PRIMS | FLAG_UNK_2000;
|
||||
|
@ -2,28 +2,28 @@
|
||||
#include <stage.h>
|
||||
|
||||
#if !defined(VERSION_PSP)
|
||||
static u8 D_80181120[] = {0x40, 0x01, 0xFF, 0x00};
|
||||
static u8 D_80181124[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
static u8 D_80181128[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
static u8 D_8018112C[] = {0x40, 0x01, 0xFF, 0x00};
|
||||
static u8 D_80181130[] = {0x40, 0x03, 0xFF, 0x00};
|
||||
static ObjInit D_80181134[] = {
|
||||
{0x0006, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, D_80181120},
|
||||
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, D_80181128},
|
||||
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x10, 0, D_8018112C},
|
||||
{0x0006, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, D_80181124},
|
||||
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, D_80181130},
|
||||
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x10, 0, D_8018112C},
|
||||
static u8 foregroundAnim1[] = {0x40, 0x01, 0xFF, 0x00};
|
||||
static u8 foregroundAnim2[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
static u8 foregroundAnim3[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
static u8 foregroundAnim4[] = {0x40, 0x01, 0xFF, 0x00};
|
||||
static u8 foregroundAnim5[] = {0x40, 0x03, 0xFF, 0x00};
|
||||
static ObjInit eRoomForegroundInit[] = {
|
||||
{0x0006, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim1},
|
||||
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim3},
|
||||
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim4},
|
||||
{0x0006, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim2},
|
||||
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim5},
|
||||
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x10, 0, foregroundAnim4},
|
||||
};
|
||||
|
||||
#else
|
||||
extern ObjInit D_80181134[];
|
||||
extern ObjInit eRoomForegroundInit[];
|
||||
|
||||
#endif
|
||||
|
||||
extern u16 g_eInitGeneric2[];
|
||||
void EntityRoomForeground(Entity* entity) {
|
||||
ObjInit* objInit = &D_80181134[entity->params];
|
||||
ObjInit* objInit = &eRoomForegroundInit[entity->params];
|
||||
|
||||
if (!entity->step) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
@ -41,5 +41,5 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->rotZ = 0x800;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
AnimateEntity(objInit->animFrames, entity);
|
||||
}
|
||||
|
@ -1,5 +1,25 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
static u8 g_EntityUnkId12Hitbox[] = {
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x20};
|
||||
|
||||
#ifndef VERSION_PSP // moved to BSS
|
||||
static u8 g_EntityUnkId12Data[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
extern u8 g_EntityUnkId12Data[];
|
||||
#endif
|
||||
|
||||
static u16 g_EntityUnkId12TilemapProps[] = {
|
||||
0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x01FC, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x00FC, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x0200, 0x0600, 0x0300,
|
||||
0x0000, 0x01FC, 0x0500, 0x02FC, 0x0000, 0x0000, 0x0500, 0x0400,
|
||||
0x0000, 0x0000, 0x0500, 0x0400, 0x0000, 0x01FC, 0x0500, 0x02FC,
|
||||
0x00F0, 0x01FC, 0x0310, 0x02FC, 0x00F0, 0x01FC, 0x0310, 0x02FC,
|
||||
};
|
||||
|
||||
extern u16 g_EntityUnkId12Init[];
|
||||
void EntityUnkId12(Entity* entity) {
|
||||
u16 var_s0;
|
||||
|
@ -22,7 +22,7 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->flags = obj->unkC;
|
||||
}
|
||||
}
|
||||
AnimateEntity(obj->unk10, entity);
|
||||
AnimateEntity(obj->animFrames, entity);
|
||||
}
|
||||
|
||||
// Different from other overlays, but identical to the one in Weapon 21.
|
||||
|
@ -110,7 +110,7 @@ void func_8018E5AC(Entity* self) {
|
||||
self->flags = temp_v0;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
void func_8018E674(Entity* self) {
|
||||
|
@ -26,7 +26,7 @@ void EntityCavernDoorVase(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
void EntityUnkId12(Entity* entity) {
|
||||
|
@ -28,7 +28,7 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->drawFlags |= FLAG_DRAW_ROTZ;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
AnimateEntity(objInit->animFrames, entity);
|
||||
}
|
||||
|
||||
void func_801CC5A4(Entity* entity, u8 count, u8 params, s32 xDist, s32 yDist,
|
||||
|
@ -98,7 +98,7 @@ void EntityDeathCutscene(Entity* self) {
|
||||
return;
|
||||
}
|
||||
g_Entities[192].params = 0x100;
|
||||
if (CutsceneUnk2(D_80184CE0) & 0xFF) {
|
||||
if (CutsceneUnk2(D_80184CE0)) {
|
||||
self->flags |= FLAG_HAS_PRIMS | FLAG_UNK_2000;
|
||||
g_CutsceneFlags = 0;
|
||||
D_801D7DD4 = 0;
|
||||
|
@ -21,5 +21,5 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->drawFlags |= FLAG_DRAW_ROTZ;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
AnimateEntity(objInit->animFrames, entity);
|
||||
}
|
||||
|
@ -18,21 +18,7 @@ void func_801B246C(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
static u8 g_EntityUnkId12Hitbox[] = {
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x20};
|
||||
static u8 g_EntityUnkId12Data[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
static u16 g_EntityUnkId12TilemapProps[] = {
|
||||
0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x01FC, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x00FC, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x0200, 0x0600, 0x0300,
|
||||
0x0000, 0x01FC, 0x0500, 0x02FC, 0x0000, 0x0000, 0x0500, 0x0400,
|
||||
0x0000, 0x0000, 0x0500, 0x0400, 0x0000, 0x01FC, 0x0500, 0x02FC,
|
||||
0x00F0, 0x01FC, 0x0310, 0x02FC, 0x00F0, 0x01FC, 0x0310, 0x02FC,
|
||||
};
|
||||
|
||||
#include "../entity_unk_id12.h"
|
||||
|
@ -23,7 +23,7 @@ void func_801B0958(Entity* self) {
|
||||
self->flags = objInit->unkC;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
bool func_801B0A20(Entity* self) {
|
||||
|
@ -80,83 +80,83 @@ void EntityMaria(Entity*);
|
||||
void func_801B8E0C(Entity*);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
(PfnEntityUpdate)EntityBreakableNZ0,
|
||||
(PfnEntityUpdate)EntityExplosion,
|
||||
(PfnEntityUpdate)EntityPrizeDrop,
|
||||
(PfnEntityUpdate)EntityDamageDisplay,
|
||||
(PfnEntityUpdate)EntityRedDoor,
|
||||
(PfnEntityUpdate)EntityIntenseExplosion,
|
||||
(PfnEntityUpdate)EntitySoulStealOrb,
|
||||
(PfnEntityUpdate)EntityRoomForeground,
|
||||
(PfnEntityUpdate)EntityStageNamePopup,
|
||||
(PfnEntityUpdate)EntityEquipItemDrop,
|
||||
(PfnEntityUpdate)EntityRelicOrb,
|
||||
(PfnEntityUpdate)EntityHeartDrop,
|
||||
(PfnEntityUpdate)EntityEnemyBlood,
|
||||
(PfnEntityUpdate)EntityMessageBox,
|
||||
(PfnEntityUpdate)EntityDummy,
|
||||
(PfnEntityUpdate)EntityDummy,
|
||||
(PfnEntityUpdate)func_801B0958,
|
||||
(PfnEntityUpdate)func_801B0AA4,
|
||||
(PfnEntityUpdate)EntityUnkId13,
|
||||
(PfnEntityUpdate)EntityUnkId14,
|
||||
(PfnEntityUpdate)EntityUnkId15,
|
||||
(PfnEntityUpdate)EntityPurpleBrickScrollingBackground,
|
||||
(PfnEntityUpdate)EntityLeftSecretRoomWall,
|
||||
(PfnEntityUpdate)EntityBottomSecretRoomFloor,
|
||||
(PfnEntityUpdate)BoxPuzzleFloorButton,
|
||||
(PfnEntityUpdate)BoxPuzzleSpikes,
|
||||
(PfnEntityUpdate)EntityMoveableBox,
|
||||
(PfnEntityUpdate)EntityCannonLever,
|
||||
(PfnEntityUpdate)EntityCannon,
|
||||
(PfnEntityUpdate)EntityCannonShot,
|
||||
(PfnEntityUpdate)EntityCannonWall,
|
||||
(PfnEntityUpdate)EntityBloodSkeleElevButton,
|
||||
(PfnEntityUpdate)EntityElevator2,
|
||||
(PfnEntityUpdate)EntitySecretWallDebris,
|
||||
(PfnEntityUpdate)EntityRedEyeBust,
|
||||
(PfnEntityUpdate)EntityFloorButton,
|
||||
(PfnEntityUpdate)EntityFloorSpikes,
|
||||
(PfnEntityUpdate)EntityBloodSkeleton,
|
||||
(PfnEntityUpdate)EntityBoneScimitar,
|
||||
(PfnEntityUpdate)EntityBoneScimitarParts,
|
||||
(PfnEntityUpdate)EntityAxeKnight,
|
||||
(PfnEntityUpdate)EntityAxeKnightThrowingAxe,
|
||||
(PfnEntityUpdate)EntityBloodyZombie,
|
||||
(PfnEntityUpdate)func_801C5D20,
|
||||
(PfnEntityUpdate)EntityBloodSplatter,
|
||||
(PfnEntityUpdate)EntitySkeleton,
|
||||
(PfnEntityUpdate)EntitySkeletonThrownBone,
|
||||
(PfnEntityUpdate)EntitySkeletonPieces,
|
||||
(PfnEntityUpdate)EntitySpittleBone,
|
||||
(PfnEntityUpdate)EntityRotateSpittlebone,
|
||||
(PfnEntityUpdate)EntitySpittleBoneSpit,
|
||||
(PfnEntityUpdate)EntityTableWithGlobe,
|
||||
(PfnEntityUpdate)EntityLifeMaxTank,
|
||||
(PfnEntityUpdate)EntityBlueFlameTable,
|
||||
(PfnEntityUpdate)EntityRelicContainer,
|
||||
(PfnEntityUpdate)EntityWargExplosionPuffOpaque,
|
||||
(PfnEntityUpdate)EntitySubWeaponContainer,
|
||||
(PfnEntityUpdate)func_801C7538,
|
||||
(PfnEntityUpdate)func_801C7654,
|
||||
(PfnEntityUpdate)func_801C77B8,
|
||||
(PfnEntityUpdate)func_801C7884,
|
||||
(PfnEntityUpdate)EntityBossFightManager,
|
||||
(PfnEntityUpdate)EntityBossRoomBlock,
|
||||
(PfnEntityUpdate)EntitySlogra,
|
||||
(PfnEntityUpdate)EntitySlograSpear,
|
||||
(PfnEntityUpdate)EntitySlograSpearProjectile,
|
||||
(PfnEntityUpdate)EntityGaibon,
|
||||
(PfnEntityUpdate)func_801B69E8,
|
||||
(PfnEntityUpdate)EntitySmallGaibonProjectile,
|
||||
(PfnEntityUpdate)EntityLargeGaibonProjectile,
|
||||
(PfnEntityUpdate)EntityElevator,
|
||||
(PfnEntityUpdate)func_801B6DE4,
|
||||
(PfnEntityUpdate)EntityLifeUpSpawn,
|
||||
(PfnEntityUpdate)EntityMagicallySealedDoor,
|
||||
(PfnEntityUpdate)EntityMariaCutscene,
|
||||
(PfnEntityUpdate)EntityMaria,
|
||||
(PfnEntityUpdate)func_801B8E0C,
|
||||
EntityBreakableNZ0,
|
||||
EntityExplosion,
|
||||
EntityPrizeDrop,
|
||||
EntityDamageDisplay,
|
||||
EntityRedDoor,
|
||||
EntityIntenseExplosion,
|
||||
EntitySoulStealOrb,
|
||||
EntityRoomForeground,
|
||||
EntityStageNamePopup,
|
||||
EntityEquipItemDrop,
|
||||
EntityRelicOrb,
|
||||
EntityHeartDrop,
|
||||
EntityEnemyBlood,
|
||||
EntityMessageBox,
|
||||
EntityDummy,
|
||||
EntityDummy,
|
||||
func_801B0958,
|
||||
func_801B0AA4,
|
||||
EntityUnkId13,
|
||||
EntityUnkId14,
|
||||
EntityUnkId15,
|
||||
EntityPurpleBrickScrollingBackground,
|
||||
EntityLeftSecretRoomWall,
|
||||
EntityBottomSecretRoomFloor,
|
||||
BoxPuzzleFloorButton,
|
||||
BoxPuzzleSpikes,
|
||||
EntityMoveableBox,
|
||||
EntityCannonLever,
|
||||
EntityCannon,
|
||||
EntityCannonShot,
|
||||
EntityCannonWall,
|
||||
EntityBloodSkeleElevButton,
|
||||
EntityElevator2,
|
||||
EntitySecretWallDebris,
|
||||
EntityRedEyeBust,
|
||||
EntityFloorButton,
|
||||
EntityFloorSpikes,
|
||||
EntityBloodSkeleton,
|
||||
EntityBoneScimitar,
|
||||
EntityBoneScimitarParts,
|
||||
EntityAxeKnight,
|
||||
EntityAxeKnightThrowingAxe,
|
||||
EntityBloodyZombie,
|
||||
func_801C5D20,
|
||||
EntityBloodSplatter,
|
||||
EntitySkeleton,
|
||||
EntitySkeletonThrownBone,
|
||||
EntitySkeletonPieces,
|
||||
EntitySpittleBone,
|
||||
EntityRotateSpittlebone,
|
||||
EntitySpittleBoneSpit,
|
||||
EntityTableWithGlobe,
|
||||
EntityLifeMaxTank,
|
||||
EntityBlueFlameTable,
|
||||
EntityRelicContainer,
|
||||
EntityWargExplosionPuffOpaque,
|
||||
EntitySubWeaponContainer,
|
||||
func_801C7538,
|
||||
func_801C7654,
|
||||
func_801C77B8,
|
||||
func_801C7884,
|
||||
EntityBossFightManager,
|
||||
EntityBossRoomBlock,
|
||||
EntitySlogra,
|
||||
EntitySlograSpear,
|
||||
EntitySlograSpearProjectile,
|
||||
EntityGaibon,
|
||||
func_801B69E8,
|
||||
EntitySmallGaibonProjectile,
|
||||
EntityLargeGaibonProjectile,
|
||||
EntityElevator,
|
||||
func_801B6DE4,
|
||||
EntityLifeUpSpawn,
|
||||
EntityMagicallySealedDoor,
|
||||
EntityMariaCutscene,
|
||||
EntityMaria,
|
||||
func_801B8E0C,
|
||||
};
|
||||
|
||||
u16 g_eBreakableInit[] = {
|
||||
|
@ -63,7 +63,7 @@ void EntityMariaCutscene(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
if (CutsceneUnk2(D_80183B0C) & 0xFF) {
|
||||
if (CutsceneUnk2(D_80183B0C)) {
|
||||
self->flags |= FLAG_HAS_PRIMS | FLAG_UNK_2000;
|
||||
g_CutsceneFlags = 0;
|
||||
D_801CB73C = 0;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "rwrp.h"
|
||||
#include "../st_private.h"
|
||||
|
||||
void func_80186FD0(Entity*);
|
||||
void EntityBackgroundBlock(Entity*);
|
||||
void EntityUnkId12(Entity*);
|
||||
void EntityUnkId13(Entity*);
|
||||
void EntityUnkId14(Entity*);
|
||||
@ -11,29 +11,16 @@ void EntityRWarpRoom(Entity*);
|
||||
void EntityWarpSmallRocks(Entity*);
|
||||
void EntityPrizeDrop(Entity*);
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
/* 3E4 */ (PfnEntityUpdate)EntityBreakable,
|
||||
/* 3E8 */ (PfnEntityUpdate)EntityExplosion,
|
||||
/* 3EC */ (PfnEntityUpdate)EntityPrizeDrop,
|
||||
/* 3F0 */ (PfnEntityUpdate)EntityDamageDisplay,
|
||||
/* 3F4 */ (PfnEntityUpdate)EntityRedDoor,
|
||||
/* 3F8 */ (PfnEntityUpdate)EntityIntenseExplosion,
|
||||
/* 3FC */ (PfnEntityUpdate)EntitySoulStealOrb,
|
||||
/* 400 */ (PfnEntityUpdate)EntityRoomForeground,
|
||||
/* 404 */ (PfnEntityUpdate)EntityStageNamePopup,
|
||||
/* 408 */ (PfnEntityUpdate)EntityEquipItemDrop,
|
||||
/* 40C */ (PfnEntityUpdate)EntityRelicOrb,
|
||||
/* 410 */ (PfnEntityUpdate)EntityHeartDrop,
|
||||
/* 414 */ (PfnEntityUpdate)EntityEnemyBlood,
|
||||
/* 418 */ (PfnEntityUpdate)EntityMessageBox,
|
||||
/* 41C */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 420 */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 424 */ (PfnEntityUpdate)func_80186FD0, // unused
|
||||
/* 428 */ (PfnEntityUpdate)EntityUnkId12, // unused? looks debugging stuff
|
||||
/* 42C */ (PfnEntityUpdate)EntityUnkId13,
|
||||
/* 430 */ (PfnEntityUpdate)EntityUnkId14,
|
||||
/* 434 */ (PfnEntityUpdate)EntityUnkId15,
|
||||
/* 438 */ (PfnEntityUpdate)EntityRWarpRoom,
|
||||
/* 43C */ (PfnEntityUpdate)EntityWarpSmallRocks,
|
||||
EntityBreakable, EntityExplosion, EntityPrizeDrop,
|
||||
EntityDamageDisplay, EntityRedDoor, EntityIntenseExplosion,
|
||||
EntitySoulStealOrb, EntityRoomForeground, EntityStageNamePopup,
|
||||
EntityEquipItemDrop, EntityRelicOrb, EntityHeartDrop,
|
||||
EntityEnemyBlood, EntityMessageBox, EntityDummy,
|
||||
EntityDummy,
|
||||
EntityBackgroundBlock, // unused
|
||||
EntityUnkId12, // unused? looks debugging stuff
|
||||
EntityUnkId13, EntityUnkId14, EntityUnkId15,
|
||||
EntityRWarpRoom, EntityWarpSmallRocks,
|
||||
};
|
||||
|
||||
// *** Group here all the Entity Init ***
|
||||
@ -75,7 +62,7 @@ u16 g_EInitSmallRocks[] = {
|
||||
|
||||
static u32 D_801804D0[] = {0x00FF0140};
|
||||
static u32 D_801804D4[] = {0x26022502, 0x26022702, 0x00000000};
|
||||
ObjInit D_801804E0[] = {
|
||||
ObjInit g_eBackgroundBlockInit[] = {
|
||||
{0x0006, 0x01FA, 0x0000, 0x0000, 0x00, 0x10, 0x00000000, D_801804D0},
|
||||
{0x8001, 0x00C0, 0x0000, 0x0000, 0x03, 0x30, 0x00000000, D_801804D4},
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ void func_801A7D64(Entity* self) {
|
||||
self->flags = obj->unkC;
|
||||
}
|
||||
}
|
||||
AnimateEntity(obj->unk10, self);
|
||||
AnimateEntity(obj->animFrames, self);
|
||||
}
|
||||
|
||||
bool func_801A7E2C(Entity* self) {
|
||||
|
@ -27,7 +27,7 @@ void EntityRoomForeground(Entity* entity) {
|
||||
entity->drawFlags |= FLAG_DRAW_ROTZ;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
AnimateEntity(objInit->animFrames, entity);
|
||||
}
|
||||
|
||||
#include "../popup.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "../cutscene_unk1.h"
|
||||
|
||||
// not an exact duplicate
|
||||
s32 CutsceneUnk2(const char* textDialogue) {
|
||||
u8 CutsceneUnk2(const char* textDialogue) {
|
||||
Primitive* prim;
|
||||
s16 firstPrimIndex;
|
||||
|
||||
@ -117,7 +117,7 @@ void EntityDraculaCutscene(Entity* self) {
|
||||
|
||||
switch (self->step) {
|
||||
case 0:
|
||||
if (CutsceneUnk2(D_801829D8) & 0xFF) {
|
||||
if (CutsceneUnk2(D_801829D8)) {
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
g_CutsceneFlags = 0;
|
||||
D_801C2580 = 0;
|
||||
|
29
src/st/st_debug.h
Normal file
29
src/st/st_debug.h
Normal file
@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
extern ObjInit g_eBackgroundBlockInit[];
|
||||
extern u16 g_eInitGeneric2[];
|
||||
|
||||
void EntityBackgroundBlock(Entity* self) {
|
||||
ObjInit* objInit = &g_eBackgroundBlockInit[self->params];
|
||||
if (!self->step) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
self->animSet = objInit->animSet;
|
||||
self->zPriority = objInit->zPriority;
|
||||
self->unk5A = objInit->unk5A;
|
||||
self->palette = objInit->palette;
|
||||
self->drawFlags = objInit->drawFlags;
|
||||
self->drawMode = objInit->drawMode;
|
||||
|
||||
if (objInit->unkC) {
|
||||
self->flags = objInit->unkC;
|
||||
}
|
||||
|
||||
if (self->params == 1) {
|
||||
self->rotX = self->rotY = 0x0200;
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(objInit->animFrames, self);
|
||||
}
|
||||
|
||||
#include "entity_unk_id12.h"
|
@ -2,7 +2,7 @@
|
||||
#include "wrp.h"
|
||||
#include "../st_private.h"
|
||||
|
||||
void func_80186FD0(Entity*);
|
||||
void EntityBackgroundBlock(Entity*);
|
||||
void EntityUnkId12(Entity*);
|
||||
void EntityUnkId13(Entity*);
|
||||
void EntityUnkId14(Entity*);
|
||||
@ -11,29 +11,16 @@ void EntityWarpRoom(Entity*);
|
||||
void EntityWarpSmallRocks(Entity*);
|
||||
void EntityPrizeDrop(Entity*);
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
/* 3E4 */ (PfnEntityUpdate)EntityBreakable,
|
||||
/* 3E8 */ (PfnEntityUpdate)EntityExplosion,
|
||||
/* 3EC */ (PfnEntityUpdate)EntityPrizeDrop,
|
||||
/* 3F0 */ (PfnEntityUpdate)EntityDamageDisplay,
|
||||
/* 3F4 */ (PfnEntityUpdate)EntityRedDoor,
|
||||
/* 3F8 */ (PfnEntityUpdate)EntityIntenseExplosion,
|
||||
/* 3FC */ (PfnEntityUpdate)EntitySoulStealOrb,
|
||||
/* 400 */ (PfnEntityUpdate)EntityRoomForeground,
|
||||
/* 404 */ (PfnEntityUpdate)EntityStageNamePopup,
|
||||
/* 408 */ (PfnEntityUpdate)EntityEquipItemDrop,
|
||||
/* 40C */ (PfnEntityUpdate)EntityRelicOrb,
|
||||
/* 410 */ (PfnEntityUpdate)EntityHeartDrop,
|
||||
/* 414 */ (PfnEntityUpdate)EntityEnemyBlood,
|
||||
/* 418 */ (PfnEntityUpdate)EntityMessageBox,
|
||||
/* 41C */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 420 */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 424 */ (PfnEntityUpdate)func_80186FD0, // unused
|
||||
/* 428 */ (PfnEntityUpdate)EntityUnkId12, // unused? looks debugging stuff
|
||||
/* 42C */ (PfnEntityUpdate)EntityUnkId13,
|
||||
/* 430 */ (PfnEntityUpdate)EntityUnkId14,
|
||||
/* 434 */ (PfnEntityUpdate)EntityUnkId15,
|
||||
/* 438 */ (PfnEntityUpdate)EntityWarpRoom,
|
||||
/* 43C */ (PfnEntityUpdate)EntityWarpSmallRocks,
|
||||
EntityBreakable, EntityExplosion, EntityPrizeDrop,
|
||||
EntityDamageDisplay, EntityRedDoor, EntityIntenseExplosion,
|
||||
EntitySoulStealOrb, EntityRoomForeground, EntityStageNamePopup,
|
||||
EntityEquipItemDrop, EntityRelicOrb, EntityHeartDrop,
|
||||
EntityEnemyBlood, EntityMessageBox, EntityDummy,
|
||||
EntityDummy,
|
||||
EntityBackgroundBlock, // unused
|
||||
EntityUnkId12, // unused? looks debugging stuff
|
||||
EntityUnkId13, EntityUnkId14, EntityUnkId15,
|
||||
EntityWarpRoom, EntityWarpSmallRocks,
|
||||
};
|
||||
|
||||
u16 g_eBreakableInit[] = {
|
||||
@ -75,7 +62,7 @@ u16 g_EInitSmallRocks[] = {
|
||||
|
||||
static u32 D_801804D0[] = {0x00FF0140};
|
||||
static u32 D_801804D4[] = {0x26022502, 0x26022702, 0x00000000};
|
||||
ObjInit D_801804E0[] = {
|
||||
ObjInit g_eBackgroundBlockInit[] = {
|
||||
{0x0006, 0x01FA, 0x0000, 0x0000, 0x00, 0x10, 0x00000000, D_801804D0},
|
||||
{0x8001, 0x00C0, 0x0000, 0x0000, 0x03, 0x30, 0x00000000, D_801804D4},
|
||||
};
|
||||
|
@ -1,51 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "wrp.h"
|
||||
|
||||
static u8 g_EntityUnkId12Hitbox[] = {
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x20};
|
||||
|
||||
#ifndef VERSION_PSP // moved to BSS
|
||||
static u8 g_EntityUnkId12Data[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
extern u8 g_EntityUnkId12Data[];
|
||||
#endif
|
||||
|
||||
static u16 g_EntityUnkId12TilemapProps[] = {
|
||||
0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x01FC, 0x0000, 0x0000, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x00FC, 0x0600, 0x01FC,
|
||||
0x0000, 0x00FC, 0x0600, 0x0300, 0x0000, 0x0200, 0x0600, 0x0300,
|
||||
0x0000, 0x01FC, 0x0500, 0x02FC, 0x0000, 0x0000, 0x0500, 0x0400,
|
||||
0x0000, 0x0000, 0x0500, 0x0400, 0x0000, 0x01FC, 0x0500, 0x02FC,
|
||||
0x00F0, 0x01FC, 0x0310, 0x02FC, 0x00F0, 0x01FC, 0x0310, 0x02FC,
|
||||
};
|
||||
|
||||
extern ObjInit D_801804E0[];
|
||||
extern u16 g_eInitGeneric2[];
|
||||
extern u16 g_EntityUnkId12Init[];
|
||||
|
||||
void func_80186FD0(Entity* self) {
|
||||
ObjInit* objInit = &D_801804E0[self->params];
|
||||
if (!self->step) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
self->animSet = objInit->animSet;
|
||||
self->zPriority = objInit->zPriority;
|
||||
self->unk5A = objInit->unk5A;
|
||||
self->palette = objInit->palette;
|
||||
self->drawFlags = objInit->drawFlags;
|
||||
self->drawMode = objInit->drawMode;
|
||||
|
||||
if (objInit->unkC) {
|
||||
self->flags = objInit->unkC;
|
||||
}
|
||||
|
||||
if (self->params == 1) {
|
||||
self->rotX = self->rotY = 0x0200;
|
||||
}
|
||||
}
|
||||
|
||||
AnimateEntity(objInit->unk10, self);
|
||||
}
|
||||
|
||||
#include "../entity_unk_id12.h"
|
||||
#include "../st_debug.h"
|
||||
|
@ -7,7 +7,7 @@ u16 g_eRedDoorTiles[][8] = {
|
||||
};
|
||||
|
||||
void EntityDamageDisplay(Entity*);
|
||||
void func_80186FD0(Entity*);
|
||||
void EntityBackgroundBlock(Entity*);
|
||||
void EntityUnkId12(Entity*);
|
||||
void EntityUnkId13(Entity*);
|
||||
void EntityWarpRoom(Entity*);
|
||||
@ -31,7 +31,7 @@ PfnEntityUpdate D_psp_09246E30[] = {
|
||||
/* 418 */ (PfnEntityUpdate)EntityMessageBox,
|
||||
/* 41C */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 420 */ (PfnEntityUpdate)EntityDummy,
|
||||
/* 424 */ (PfnEntityUpdate)func_80186FD0, // unused
|
||||
/* 424 */ (PfnEntityUpdate)EntityBackgroundBlock, // unused
|
||||
/* 428 */ (PfnEntityUpdate)EntityUnkId12, // unused? looks debugging stuff
|
||||
/* 42C */ (PfnEntityUpdate)EntityUnkId13,
|
||||
/* 430 */ (PfnEntityUpdate)EntityUnkId14,
|
||||
|
Loading…
Reference in New Issue
Block a user