1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 23:10:22 +00:00

Actor Cleanups (#177)

* rename init chains, colchkinfo, colider inits, damage tables

* actor cleanups

* fix collider init script names

* small fixes

* ichain arg name

* change dynapoly types and names

* revert enru1 data name

* and the type

* pr suggestions
This commit is contained in:
fig02 2020-05-31 05:55:48 -04:00 committed by GitHub
parent 13a94482e5
commit 78d0883f04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 786 additions and 869 deletions

View file

@ -1,7 +1,7 @@
/*
* File: z_demo_geff.c
* Overlay: Demo_Geff
* Description:
* Description: Ganon's Lair Rubble Fragment
*/
#include "z_demo_geff.h"
@ -25,21 +25,21 @@ void func_80978308(DemoGeff* this, GlobalContext* globalCtx);
void func_809784D4(DemoGeff* this, GlobalContext* globalCtx);
void func_80978344(DemoGeff* this, GlobalContext* globalCtx);
s16 objectIds[] = {
static s16 sObjectIDs[] = {
OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF,
};
DemoGeffInitFunc initFuncs[] = {
static DemoGeffInitFunc sInitFuncs[] = {
func_80978030, func_80978030, func_80978030, func_80978030, func_80978030,
func_80978030, func_80978030, func_80978030, func_80978030,
};
DemoGeffActionFunc actionFuncs[] = {
static DemoGeffActionFunc sActionFuncs[] = {
func_809783D4,
func_80978308,
};
DemoGeffDrawFunc drawFuncs[] = {
static DemoGeffDrawFunc sDrawFuncs[] = {
func_809784D4,
func_80978344,
};
@ -56,7 +56,7 @@ const ActorInit Demo_Geff_InitVars = {
(ActorFunc)DemoGeff_Draw,
};
extern UNK_TYPE D_06000EA0;
extern Gfx D_06000EA0[];
void DemoGeff_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
@ -73,7 +73,7 @@ void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx) {
this->drawConfig = 0;
}
void func_80977EA8(GlobalContext* globalCtx, u32 dlist) {
void func_80977EA8(GlobalContext* globalCtx, Gfx* dlist) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];
@ -174,12 +174,12 @@ void func_80978308(DemoGeff* this, GlobalContext* globalCtx) {
}
void func_80978344(DemoGeff* this, GlobalContext* globalCtx) {
func_80977EA8(globalCtx, &D_06000EA0);
func_80977EA8(globalCtx, D_06000EA0);
}
void func_80978370(DemoGeff* this, GlobalContext* globalCtx) {
s16 params = this->actor.params;
DemoGeffInitFunc initFunc = initFuncs[params];
DemoGeffInitFunc initFunc = sInitFuncs[params];
if (initFunc == NULL) {
osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params);
Actor_Kill(&this->actor);
@ -192,7 +192,7 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) {
ObjectContext* objCtx = &globalCtx->objectCtx;
Actor* thisx = &this->actor;
s32 params = thisx->params;
s16 objectId = objectIds[params];
s16 objectId = sObjectIDs[params];
s32 objBankIndex = Object_GetIndex(objCtx, objectId);
s32 pad;
@ -210,11 +210,11 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) {
void DemoGeff_Update(Actor* thisx, GlobalContext* globalCtx) {
DemoGeff* this = THIS;
if (this->action < 0 || this->action >= 2 || actionFuncs[this->action] == NULL) {
if (this->action < 0 || this->action >= 2 || sActionFuncs[this->action] == NULL) {
osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return;
}
actionFuncs[this->action](this, globalCtx);
sActionFuncs[this->action](this, globalCtx);
}
void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) {
@ -224,12 +224,12 @@ void DemoGeff_Draw(Actor* thisx, GlobalContext* globalCtx) {
DemoGeff* this = THIS;
s32 drawConfig = this->drawConfig;
if (drawConfig < 0 || drawConfig >= 2 || drawFuncs[drawConfig] == NULL) {
if (drawConfig < 0 || drawConfig >= 2 || sDrawFuncs[drawConfig] == NULL) {
osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return;
}
if (drawConfig != 0) {
func_80977F80(this, globalCtx);
}
drawFuncs[drawConfig](this, globalCtx);
sDrawFuncs[drawConfig](this, globalCtx);
}