mirror of
https://github.com/zeldaret/oot
synced 2026-05-24 07:11:01 -04:00
045a92d7c3
* Started doing cleanup * did more work * did more migration * migrated more rodata and worked on some structs * did more work * Removal of ROOM field from initvars, some rodata migration, some string decompilation * General update * Decompiled vt strings * Tool work * Tool improvements * 270 overlay rodata files remaining * better float handling * floats * Many more floats * migrated boss_mo * assorted fixes * Migrated 10 * tool improvements * migrated 10 * 10 more * 1 more * did a few more * fixes * 10 more * more floats * Did some more, updated migrate-rodata.py to 'modify' the C file after processing in order to make to compiler process it as if it was changed. * removed changes made to script by accident * migrated largest rodata - ovl_fishing * Did some more * 114 remaining * 99 left ! * almost done migrating rodata * did some more, done for tonight * almost done, tried add support to the script for z_player * All possible rodata migrated in actor overlays * update * removed static from all overlays, ran format.sh * Removed unknown actor structs * converted a few floats * Added new lines to header files that were missing them. Removed unused asm files * Removed unused asm files * Formatting newlines Further formatting spacing .float spacing More space formatting More spacing formatting Removing .balign 4 after floats Co-authored-by: Ethan Roseman <ethteck@gmail.com>
57 lines
1.8 KiB
C
57 lines
1.8 KiB
C
#include <global.h>
|
|
|
|
void (*sPlayerCallInitFunc)(void*, GlobalContext*);
|
|
void (*sPlayerCallDestroyFunc)(void*, GlobalContext*);
|
|
void (*sPlayerCallUpdateFunc)(void*, GlobalContext*);
|
|
void (*sPlayerCallDrawFunc)(void*, GlobalContext*);
|
|
|
|
void func_80846CD8(Player*, GlobalContext*);
|
|
void func_8084AB54(Player*, GlobalContext*);
|
|
void func_80849EA8(Player*, GlobalContext*);
|
|
void func_8084A5C4(Player*, GlobalContext*);
|
|
|
|
void PlayerCall_Init(Player* player, GlobalContext* globalCtx);
|
|
void PlayerCall_Destroy(Player* player, GlobalContext* globalCtx);
|
|
void PlayerCall_Update(Player* player, GlobalContext* globalCtx);
|
|
void PlayerCall_Draw(Player* player, GlobalContext* globalCtx);
|
|
|
|
const ActorInit Player_InitVars = {
|
|
ACTOR_PLAYER,
|
|
ACTORTYPE_PLAYER,
|
|
0x6000035,
|
|
OBJECT_GAMEPLAY_KEEP,
|
|
sizeof(Player),
|
|
(ActorFunc)PlayerCall_Init,
|
|
(ActorFunc)PlayerCall_Destroy,
|
|
(ActorFunc)PlayerCall_Update,
|
|
(ActorFunc)PlayerCall_Draw,
|
|
};
|
|
|
|
void PlayerCall_InitFuncPtrs() {
|
|
sPlayerCallInitFunc = KaleidoManager_GetRamAddr(func_80846CD8);
|
|
sPlayerCallDestroyFunc = KaleidoManager_GetRamAddr(func_8084AB54);
|
|
sPlayerCallUpdateFunc = KaleidoManager_GetRamAddr(func_80849EA8);
|
|
sPlayerCallDrawFunc = KaleidoManager_GetRamAddr(func_8084A5C4);
|
|
}
|
|
|
|
void PlayerCall_Init(Player* player, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
PlayerCall_InitFuncPtrs();
|
|
sPlayerCallInitFunc(player, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Destroy(Player* player, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallDestroyFunc(player, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Update(Player* player, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallUpdateFunc(player, globalCtx);
|
|
}
|
|
|
|
void PlayerCall_Draw(Player* player, GlobalContext* globalCtx) {
|
|
KaleidoScopeCall_LoadPlayer();
|
|
sPlayerCallDrawFunc(player, globalCtx);
|
|
}
|