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

Big actor cleanup (fixed) (#69)

* 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>
This commit is contained in:
Lucas Shaw 2020-04-14 11:16:34 -07:00 committed by GitHub
parent 5aef81071e
commit 045a92d7c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10327 changed files with 33390 additions and 45661 deletions

View file

@ -8,21 +8,20 @@
#include <vt.h>
#define ROOM 0x00
#define FLAGS 0x00000030
static void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx);
static void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx);
static void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx);
static void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx);
void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx);
void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx);
void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx);
void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx);
static void func_80978030(DemoGeff* this, GlobalContext* globalCtx);
void func_80978030(DemoGeff* this, GlobalContext* globalCtx);
static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx);
static void func_80978308(DemoGeff* this, GlobalContext* globalCtx);
void func_809783D4(DemoGeff* this, GlobalContext* globalCtx);
void func_80978308(DemoGeff* this, GlobalContext* globalCtx);
static void func_809784D4(DemoGeff* this, GlobalContext* globalCtx);
static void func_80978344(DemoGeff* this, GlobalContext* globalCtx);
void func_809784D4(DemoGeff* this, GlobalContext* globalCtx);
void func_80978344(DemoGeff* this, GlobalContext* globalCtx);
s16 objectIds[] = {
OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF,
@ -45,7 +44,6 @@ ActorFunc drawFuncs[] = {
const ActorInit Demo_Geff_InitVars = {
ACTOR_DEMO_GEFF,
ACTORTYPE_BOSS,
ROOM,
FLAGS,
OBJECT_GEFF,
sizeof(DemoGeff),
@ -57,10 +55,10 @@ const ActorInit Demo_Geff_InitVars = {
extern UNK_TYPE D_06000EA0;
static void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx) {
void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx) {
}
static void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) {
void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) {
if (this->actor.params < 0 || this->actor.params >= 9) {
osSyncPrintf(VT_FGCOL(RED) "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST);
Actor_Kill(&this->actor);
@ -70,7 +68,7 @@ static void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) {
this->drawConfig = 0;
}
static void func_80977EA8(GlobalContext* globalCtx, u32 dlist) {
void func_80977EA8(GlobalContext* globalCtx, u32 dlist) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];
@ -85,7 +83,7 @@ static void func_80977EA8(GlobalContext* globalCtx, u32 dlist) {
Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 188);
}
static void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) {
void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 objBankIndex = this->objBankIndex;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
@ -102,7 +100,7 @@ static void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) {
Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 212);
}
static void func_80978030(DemoGeff* this, GlobalContext* globalCtx) {
void func_80978030(DemoGeff* this, GlobalContext* globalCtx) {
Vec3f* thisScale = &this->actor.scale;
this->action = 1;
this->drawConfig = 1;
@ -130,7 +128,7 @@ static void func_80978030(DemoGeff* this, GlobalContext* globalCtx) {
}
}
static void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) {
void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) {
s32 targetParams = 2;
Actor* propIt;
@ -153,7 +151,7 @@ static void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) {
}
}
static void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) {
void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) {
DemoGt* demoGt = this->demoGt;
s16 params = this->actor.params;
if (demoGt != NULL && (params != 6) && (params != 7) && (params != 8)) {
@ -163,17 +161,17 @@ static void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) {
}
}
static void func_80978308(DemoGeff* this, GlobalContext* globalCtx) {
void func_80978308(DemoGeff* this, GlobalContext* globalCtx) {
func_809781FC(this, globalCtx);
func_809782A0(this, globalCtx);
func_80978030(this, globalCtx);
}
static void func_80978344(DemoGeff* this, GlobalContext* globalCtx) {
void func_80978344(DemoGeff* this, GlobalContext* globalCtx) {
func_80977EA8(globalCtx, &D_06000EA0);
}
static void func_80978370(DemoGeff* this, GlobalContext* globalCtx) {
void func_80978370(DemoGeff* this, GlobalContext* globalCtx) {
s16 params = this->actor.params;
ActorFunc actorFunc = scaleFuncs[params];
if (actorFunc == NULL) {
@ -184,7 +182,7 @@ static void func_80978370(DemoGeff* this, GlobalContext* globalCtx) {
actorFunc(this, globalCtx);
}
static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) {
void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) {
ObjectContext* objCtx = &globalCtx->objectCtx;
Actor* thisx = &this->actor;
s32 params = thisx->params;
@ -203,7 +201,7 @@ static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) {
}
}
static void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) {
void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) {
if (this->action < 0 || this->action >= 2 || actionFuncs[this->action] == NULL) {
osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return;
@ -211,10 +209,10 @@ static void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) {
actionFuncs[this->action](this, globalCtx);
}
static void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) {
void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) {
}
static void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx) {
void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx) {
s32 drawConfig = this->drawConfig;
s16 pad;
if (drawConfig < 0 || drawConfig >= 2 || drawFuncs[drawConfig] == NULL) {