mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-17 05:15:16 +00:00
More actor cleanup Part 2 (#116)
* Change all main actor functions to take a 'Actor* thisx' argument * Change all actor callbacks to also take a 'Actor* thisx' argument
This commit is contained in:
parent
8efddb0fe0
commit
f114df8929
429 changed files with 3689 additions and 2523 deletions
|
@ -1,19 +1,19 @@
|
|||
#include <global.h>
|
||||
|
||||
void (*sPlayerCallInitFunc)(void*, GlobalContext*);
|
||||
void (*sPlayerCallDestroyFunc)(void*, GlobalContext*);
|
||||
void (*sPlayerCallUpdateFunc)(void*, GlobalContext*);
|
||||
void (*sPlayerCallDrawFunc)(void*, GlobalContext*);
|
||||
void (*sPlayerCallInitFunc)(Actor* thisx, GlobalContext* globalCtx);
|
||||
void (*sPlayerCallDestroyFunc)(Actor* thisx, GlobalContext* globalCtx);
|
||||
void (*sPlayerCallUpdateFunc)(Actor* thisx, GlobalContext* globalCtx);
|
||||
void (*sPlayerCallDrawFunc)(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_80846CD8(Player*, GlobalContext*);
|
||||
void func_8084AB54(Player*, GlobalContext*);
|
||||
void func_80849EA8(Player*, GlobalContext*);
|
||||
void func_8084A5C4(Player*, GlobalContext*);
|
||||
void func_80846CD8(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_8084AB54(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_80849EA8(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_8084A5C4(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
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);
|
||||
void PlayerCall_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void PlayerCall_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void PlayerCall_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void PlayerCall_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Player_InitVars = {
|
||||
ACTOR_PLAYER,
|
||||
|
@ -34,23 +34,23 @@ void PlayerCall_InitFuncPtrs() {
|
|||
sPlayerCallDrawFunc = KaleidoManager_GetRamAddr(func_8084A5C4);
|
||||
}
|
||||
|
||||
void PlayerCall_Init(Player* player, GlobalContext* globalCtx) {
|
||||
void PlayerCall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
PlayerCall_InitFuncPtrs();
|
||||
sPlayerCallInitFunc(player, globalCtx);
|
||||
sPlayerCallInitFunc(thisx, globalCtx);
|
||||
}
|
||||
|
||||
void PlayerCall_Destroy(Player* player, GlobalContext* globalCtx) {
|
||||
void PlayerCall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
sPlayerCallDestroyFunc(player, globalCtx);
|
||||
sPlayerCallDestroyFunc(thisx, globalCtx);
|
||||
}
|
||||
|
||||
void PlayerCall_Update(Player* player, GlobalContext* globalCtx) {
|
||||
void PlayerCall_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
sPlayerCallUpdateFunc(player, globalCtx);
|
||||
sPlayerCallUpdateFunc(thisx, globalCtx);
|
||||
}
|
||||
|
||||
void PlayerCall_Draw(Player* player, GlobalContext* globalCtx) {
|
||||
void PlayerCall_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
sPlayerCallDrawFunc(player, globalCtx);
|
||||
sPlayerCallDrawFunc(thisx, globalCtx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue