mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-06 18:13:30 +00:00
Change PfnEntityUpdates to use OVL_EXPORT
This commit is contained in:
parent
042afb87db
commit
0050d8bc01
@ -76,7 +76,7 @@ segments:
|
||||
- [0x91C0, c, rwrp/warp]
|
||||
- [0xA168, c, wrp/st_update]
|
||||
- [0xA59C, c, wrp/collision]
|
||||
- [0xBD58, c, wrp/create_entity]
|
||||
- [0xBD58, c, rwrp/create_entity]
|
||||
- [0xC8D0, c, wrp/e_red_door]
|
||||
- [0xD580, c, wrp/st_common]
|
||||
- [0xEA30, c, wrp/e_collect]
|
||||
@ -87,7 +87,7 @@ segments:
|
||||
- [0x14DD4, c, wrp/e_room_fg]
|
||||
- [0x14EC0, c, wrp/popup]
|
||||
- [0x151F0, c, wrp/prim_helpers]
|
||||
- [0x15A20, .bss, wrp/create_entity]
|
||||
- [0x15A20, .bss, rwrp/create_entity]
|
||||
- [0x15A36, .bss, rwrp/bss]
|
||||
- [0x166A8, .bss, wrp/e_collect]
|
||||
- [0x166E8]
|
||||
|
@ -1,7 +1,7 @@
|
||||
g_pStTilesetDebug = 0x80180290;
|
||||
g_pStTileset = 0x801802A4;
|
||||
g_pStObjLayoutHorizontal = 0x801802F4;
|
||||
PfnEntityUpdates = 0x8018049C;
|
||||
MAD_EntityUpdates = 0x8018049C;
|
||||
g_eBreakableInit = 0x801804F0;
|
||||
g_InitDataEnt13 = 0x8018052C;
|
||||
g_eInitGeneric2 = 0x80180544;
|
||||
|
@ -1,5 +1,5 @@
|
||||
g_GfxBanks = 0x801801D0;
|
||||
PfnEntityUpdates = 0x801803C8;
|
||||
DRE_EntityUpdates = 0x801803C8;
|
||||
g_eBreakableInit = 0x80180458;
|
||||
g_InitializeData0 = 0x80180464;
|
||||
g_InitializeEntityData0 = 0x80180470;
|
||||
|
@ -1,4 +1,4 @@
|
||||
PfnEntityUpdates = 0x80180924;
|
||||
NO3_EntityUpdates = 0x80180924;
|
||||
g_eBreakableInit = 0x80180AAC;
|
||||
g_InitializeData0 = 0x80180AB8;
|
||||
g_InitializeEntityData0 = 0x80180AC4;
|
||||
|
@ -1,5 +1,5 @@
|
||||
g_EntityGfxs = 0x801802C4;
|
||||
PfnEntityUpdates = 0x801804BC;
|
||||
ST0_EntityUpdates = 0x801804BC;
|
||||
g_eBreakableInit = 0x80180574;
|
||||
g_InitializeData0 = 0x80180580;
|
||||
g_InitializeEntityData0 = 0x8018058C;
|
||||
|
@ -43,12 +43,6 @@ extern LayoutEntity* g_pStObjLayoutVertical[];
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_PSP)
|
||||
extern PfnEntityUpdate* PfnEntityUpdates;
|
||||
#else
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
#endif
|
||||
|
||||
extern u16 g_ItemIconSlots[32];
|
||||
|
||||
/*
|
||||
|
@ -1,2 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "mar.h"
|
||||
#include "../../st/pfn_entity_update.h"
|
||||
#include "../../st/create_entity.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <stage.h>
|
||||
#include "mar.h"
|
||||
#include "../../st/pfn_entity_update.h"
|
||||
#include <cutscene.h>
|
||||
|
||||
#include "mar.h"
|
||||
|
@ -34,7 +34,7 @@ void OVL_EXPORT(EntityCutscene)(Entity* self);
|
||||
void func_us_8018C90C(Entity* self);
|
||||
void func_us_8018CA94(Entity* self);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakable, EntityExplosion,
|
||||
EntityPrizeDrop, EntityDamageDisplay,
|
||||
EntityRedDoor, EntityIntenseExplosion,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "mar.h"
|
||||
#include "../../st/pfn_entity_update.h"
|
||||
|
||||
void EntityUnkId13(Entity* self);
|
||||
void EntityUnkId14(Entity* self);
|
||||
|
@ -13,6 +13,7 @@ u16 g_RawVram[VRAM_W * VRAM_H];
|
||||
GameApi g_ApiInit = {0};
|
||||
u8 g_DemoRecordingBuffer[DEMO_MAX_LEN];
|
||||
extern bool g_IsQuitRequested;
|
||||
PfnEntityUpdate* PfnEntityUpdates;
|
||||
|
||||
ServantDesc D_80170000;
|
||||
|
||||
|
@ -17,6 +17,8 @@ u8 D_8018199C[8356];
|
||||
u8 D_80185830[3420];
|
||||
|
||||
extern Overlay OVL_EXPORT(Overlay);
|
||||
extern PfnEntityUpdate* PfnEntityUpdates;
|
||||
extern PfnEntityUpdate OVL_EXPORT(EntityUpdates)[];
|
||||
void InitStageCEN(Overlay* o) {
|
||||
LoadReset();
|
||||
LOAD_ASSET("assets/st/cen/D_8018658C.bin", D_8018658C);
|
||||
@ -29,4 +31,5 @@ void InitStageCEN(Overlay* o) {
|
||||
LOAD_ASSET("assets/st/cen/D_8018199C.bin", D_8018199C);
|
||||
LOAD_ASSET("assets/st/cen/D_80185830.bin", D_80185830);
|
||||
memcpy(o, &OVL_EXPORT(Overlay), sizeof(Overlay));
|
||||
// PfnEntityUpdates = OVL_EXPORT(EntityUpdates);
|
||||
}
|
||||
|
@ -11,10 +11,13 @@ u32 D_80181420[836];
|
||||
u16 D_80181D08[48];
|
||||
|
||||
extern Overlay OVL_EXPORT(Overlay);
|
||||
extern PfnEntityUpdate* PfnEntityUpdates;
|
||||
extern PfnEntityUpdate OVL_EXPORT(EntityUpdates)[];
|
||||
void InitStageWRP(Overlay* o) {
|
||||
LoadReset();
|
||||
LOAD_ASSET("assets/st/wrp/D_80181D08.bin", D_80181D08);
|
||||
LOAD_ASSET("assets/st/wrp/D_80181420.bin", D_80181420);
|
||||
LOAD_ASSET("assets/st/wrp/D_80181764.bin", D_80181764);
|
||||
memcpy(o, &OVL_EXPORT(Overlay), sizeof(Overlay));
|
||||
PfnEntityUpdates = OVL_EXPORT(EntityUpdates);
|
||||
}
|
||||
|
@ -48,8 +48,6 @@ u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2);
|
||||
void EntityUnkId14(Entity* entity);
|
||||
void EntityGreyPuff(Entity* entity);
|
||||
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
|
||||
/*** Initializers ***/
|
||||
extern u16 D_80180404[];
|
||||
extern u16 g_InitializeData0[];
|
||||
|
@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
#include "cen.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "cen.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include <cutscene.h>
|
||||
|
||||
// Bizarre variable - u8 here, but u16 in EntityHeartDrop
|
||||
|
@ -31,7 +31,7 @@ void EntityElevatorStationary(Entity*);
|
||||
void EntityUnkId1B(Entity*);
|
||||
void EntityMovingElevator(Entity*);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakable, EntityExplosion,
|
||||
EntityPrizeDrop, EntityDamageDisplay,
|
||||
EntityRedDoor, EntityIntenseExplosion,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "cen.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0xC0
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <types.h>
|
||||
#include "dre.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
u32 D_801A3264[24];
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "dre.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include <cutscene.h>
|
||||
|
||||
#include "../cutscene_unk1.h"
|
||||
|
@ -103,7 +103,6 @@ extern u16 g_InitializeEntityData0[];
|
||||
extern u16 g_eInitGeneric2[];
|
||||
extern u16 D_801804F4[];
|
||||
extern s8 c_HeartPrizes[];
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
extern u16 D_801804E8[];
|
||||
extern u16 D_8018050C[];
|
||||
extern u16 D_80180528[];
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "dre.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0x118
|
||||
#include "../e_misc.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "mad.h"
|
||||
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "mad.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0
|
||||
#include "../e_misc.h"
|
||||
|
@ -85,7 +85,6 @@ extern u8 g_UnkEntityAnimData[];
|
||||
// extern u16 g_testCollPrizeTable[];
|
||||
// extern u16 g_testCollRandTable;
|
||||
extern RoomHeader g_rooms[];
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
|
||||
extern u16 g_eBreakableInit[];
|
||||
extern u8* g_eBreakableAnimations[8];
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
#include "pfn_entity_update.h"
|
||||
|
||||
void MakeEntityFromId(u16 entityId, Entity* src, Entity* dst) {
|
||||
DestroyEntity(dst);
|
||||
dst->entityId = entityId;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <common.h>
|
||||
#include "no3.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
STATIC_PAD_BSS(96);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "no3.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include <cutscene.h>
|
||||
|
||||
static const char* actor_names[] = {_S("Alucard"), _S("Death")};
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "no3.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0x30
|
||||
#include "../e_misc.h"
|
||||
|
@ -243,8 +243,6 @@ extern s32 D_801D7D54;
|
||||
extern s32 D_801D7D58;
|
||||
extern u32 g_CutsceneFlags;
|
||||
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
|
||||
// *** EntityFireWarg properties START ***
|
||||
|
||||
extern Entity D_8007A958;
|
||||
|
@ -36,7 +36,7 @@ void EntityOwl(Entity* self) {
|
||||
}
|
||||
switch (self->step) {
|
||||
case 0:
|
||||
InitializeEntity(&D_80180B2C);
|
||||
InitializeEntity(D_80180B2C);
|
||||
// Turns out the knight is spawned from the owl. Neat!
|
||||
CreateEntityFromEntity(E_OWL_KNIGHT, self, KNIGHT);
|
||||
CreateEntityFromEntity(E_801CD620, self, self + 3);
|
||||
|
@ -1,2 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "np3.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <stage.h>
|
||||
#include "np3.h"
|
||||
|
||||
void EntityBreakable(Entity* self);
|
||||
void EntityExplosion(Entity* self);
|
||||
@ -93,7 +93,7 @@ void EntityGurkhaSword(Entity* self);
|
||||
void EntityBlade(Entity* self);
|
||||
void EntityBladeSword(Entity* self);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakable,
|
||||
EntityExplosion,
|
||||
EntityPrizeDrop,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "np3.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0x30
|
||||
#include "../e_misc.h"
|
||||
|
@ -271,7 +271,6 @@ extern u8 D_8018267C[]; // Animation: Walking faster
|
||||
extern s32 D_8018268C;
|
||||
extern s32 D_801826A4;
|
||||
extern s32 D_801826C4;
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
extern u8 D_80182914[];
|
||||
extern u8 D_80182935[];
|
||||
|
||||
@ -333,7 +332,7 @@ extern s16 D_801833A0[];
|
||||
extern s16 D_801833CC[];
|
||||
|
||||
// For EntityOwl
|
||||
extern u16 D_80180B2C;
|
||||
extern u16 D_80180B2C[];
|
||||
extern u16 D_801826CC[];
|
||||
extern u8 D_801826EC[];
|
||||
extern u8 D_801826F8[];
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <types.h>
|
||||
#include "nz0.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
u32 D_801CAA14[24];
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "nz0.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
static const char* actor_names[] = {_S("Alucard"), _S("Maria")};
|
||||
|
||||
|
@ -79,7 +79,7 @@ void NZ0_EntityCutscene(Entity*);
|
||||
void EntityMaria(Entity*);
|
||||
void func_801B8E0C(Entity*);
|
||||
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakableNZ0,
|
||||
EntityExplosion,
|
||||
EntityPrizeDrop,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "nz0.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0xF8
|
||||
#include "../e_misc.h"
|
||||
|
@ -98,7 +98,6 @@ void EntityGreyPuff(Entity* entity);
|
||||
void func_801C4CC0(void);
|
||||
|
||||
extern u8 D_8003BE6F[];
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
extern u16 g_InitializeEntityData0[];
|
||||
extern u16 g_EInitGeneric[]; // Init Elevator2
|
||||
extern u16 g_eInitGeneric2[];
|
||||
|
11
src/st/pfn_entity_update.h
Normal file
11
src/st/pfn_entity_update.h
Normal file
@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// NOTE: include this AFTER the stage entity is included
|
||||
// this is to ensure OVL_EXPORT is defined
|
||||
|
||||
#if defined(VERSION_PSP) || defined(VERSION_PC)
|
||||
extern PfnEntityUpdate* PfnEntityUpdates;
|
||||
#else
|
||||
extern PfnEntityUpdate OVL_EXPORT(EntityUpdates)[];
|
||||
#define PfnEntityUpdates OVL_EXPORT(EntityUpdates)
|
||||
#endif
|
4
src/st/rwrp/create_entity.c
Normal file
4
src/st/rwrp/create_entity.c
Normal file
@ -0,0 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "rwrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
@ -10,7 +10,7 @@ void EntityGreyPuff(Entity*);
|
||||
void EntityRWarpRoom(Entity*);
|
||||
void EntityWarpSmallRocks(Entity*);
|
||||
void EntityPrizeDrop(Entity*);
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakable, EntityExplosion, EntityPrizeDrop,
|
||||
EntityDamageDisplay, EntityRedDoor, EntityIntenseExplosion,
|
||||
EntitySoulStealOrb, EntityRoomForeground, EntityStageNamePopup,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "rwrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 0x2F8
|
||||
#include "../e_misc.h"
|
||||
|
@ -1,9 +1,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include <types.h>
|
||||
#include <game.h>
|
||||
|
||||
u32 D_801BEB00[25];
|
||||
u32 D_801BEB64;
|
||||
u32 D_801BEB68[165];
|
||||
Point32 D_801BEB64[0x53];
|
||||
u32 D_801BEDFC;
|
||||
u32 D_801BEE00;
|
||||
u32 D_801BEE04;
|
||||
@ -11,4 +10,7 @@ u16 D_801BEE08[2];
|
||||
u16 D_801BEE0C[66];
|
||||
u16 D_801BEE90[2312];
|
||||
|
||||
// HACK move the header inclusion at the end to not scrable the BSS variables
|
||||
#include "st0.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "st0.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include <cutscene.h>
|
||||
|
||||
#include "../cutscene_unk1.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "st0.h"
|
||||
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../e_misc.h"
|
||||
|
@ -56,7 +56,6 @@ extern const char* D_801A7984;
|
||||
extern const char* D_801A7990;
|
||||
extern const char* D_801A799C;
|
||||
|
||||
extern PfnEntityUpdate PfnEntityUpdates[];
|
||||
extern bool g_isSecretStairsButtonPressed;
|
||||
extern bool g_isDraculaFirstFormDefeated;
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "wrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
#include "../create_entity.h"
|
||||
|
@ -10,7 +10,7 @@ void EntityGreyPuff(Entity*);
|
||||
void EntityWarpRoom(Entity*);
|
||||
void EntityWarpSmallRocks(Entity*);
|
||||
void EntityPrizeDrop(Entity*);
|
||||
PfnEntityUpdate PfnEntityUpdates[] = {
|
||||
PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
|
||||
EntityBreakable, EntityExplosion, EntityPrizeDrop,
|
||||
EntityDamageDisplay, EntityRedDoor, EntityIntenseExplosion,
|
||||
EntitySoulStealOrb, EntityRoomForeground, EntityStageNamePopup,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "wrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
#define HEART_DROP_CASTLE_FLAG 280
|
||||
#include "../e_misc.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "../wrp/wrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
static u16* g_LayoutObjHorizontal;
|
||||
static u16* g_LayoutObjVertical;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "../wrp/wrp.h"
|
||||
#include "../pfn_entity_update.h"
|
||||
|
||||
// entity table to allocate new entities
|
||||
extern PfnEntityUpdate* D_08C6BC30;
|
||||
|
Loading…
Reference in New Issue
Block a user