1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 15:30:14 +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

@ -1,42 +1,32 @@
/*
* File: z_obj_roomtimer.c
* Overlay: ovl_Obj_Roomtimer
* Description:
* Description: Timer
*/
#include <ultra64.h>
#include <global.h>
#include <z64.h>
#include "z_obj_roomtimer.h"
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ ActorFunc updateFunc;
/* 0x0150 */ u32 switchFlag;
} ActorRoomTimer; // size = 0x0154
#define ROOM 0x00
#define FLAGS 0x00000010
static void Init(ActorRoomTimer* this, GlobalContext* globalCtx);
static void Destroy(ActorRoomTimer* this, GlobalContext* globalCtx);
static void Update(ActorRoomTimer* this, GlobalContext* globalCtx);
static void func_80B9D054(ActorRoomTimer* this, GlobalContext* globalCtx);
static void func_80B9D0B0(ActorRoomTimer* this, GlobalContext* globalCtx);
void ObjRoomtimer_Init(ObjRoomtimer* this, GlobalContext* globalCtx);
void ObjRoomtimer_Destroy(ObjRoomtimer* this, GlobalContext* globalCtx);
void ObjRoomtimer_Update(ObjRoomtimer* this, GlobalContext* globalCtx);
void func_80B9D054(ObjRoomtimer* this, GlobalContext* globalCtx);
void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx);
const ActorInit Obj_Roomtimer_InitVars = {
ACTOR_OBJ_ROOMTIMER,
ACTORTYPE_ENEMY,
ROOM,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(ActorRoomTimer),
(ActorFunc)Init,
(ActorFunc)Destroy,
(ActorFunc)Update,
sizeof(ObjRoomtimer),
(ActorFunc)ObjRoomtimer_Init,
(ActorFunc)ObjRoomtimer_Destroy,
(ActorFunc)ObjRoomtimer_Update,
(ActorFunc)NULL,
};
static void Init(ActorRoomTimer* this, GlobalContext* globalCtx) {
void ObjRoomtimer_Init(ObjRoomtimer* this, GlobalContext* globalCtx) {
s16 params = this->actor.params;
this->switchFlag = (params >> 10) & 0x3F;
@ -54,7 +44,7 @@ static void Init(ActorRoomTimer* this, GlobalContext* globalCtx) {
this->updateFunc = (ActorFunc)func_80B9D054;
}
static void Destroy(ActorRoomTimer* this, GlobalContext* globalCtx) {
void ObjRoomtimer_Destroy(ObjRoomtimer* this, GlobalContext* globalCtx) {
if (this->actor.params != 0x3FF) {
if (gSaveContext.timer_1_value > 0) {
gSaveContext.timer_1_state = 10;
@ -62,7 +52,7 @@ static void Destroy(ActorRoomTimer* this, GlobalContext* globalCtx) {
}
}
static void func_80B9D054(ActorRoomTimer* this, GlobalContext* globalCtx) {
void func_80B9D054(ObjRoomtimer* this, GlobalContext* globalCtx) {
if (this->actor.params != 0x3FF) {
func_80088B34(this->actor.params);
}
@ -71,7 +61,7 @@ static void func_80B9D054(ActorRoomTimer* this, GlobalContext* globalCtx) {
this->updateFunc = (ActorFunc)func_80B9D0B0;
}
static void func_80B9D0B0(ActorRoomTimer* this, GlobalContext* globalCtx) {
void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx) {
if (Flags_GetTempClear(globalCtx, this->actor.room)) {
if (this->actor.params != 0x3FF) {
gSaveContext.timer_1_state = 10;
@ -92,6 +82,6 @@ static void func_80B9D0B0(ActorRoomTimer* this, GlobalContext* globalCtx) {
}
}
static void Update(ActorRoomTimer* this, GlobalContext* globalCtx) {
void ObjRoomtimer_Update(ObjRoomtimer* this, GlobalContext* globalCtx) {
this->updateFunc(this, globalCtx);
}

View file

@ -0,0 +1,16 @@
#ifndef _Z_OBJ_ROOMTIMER_H_
#define _Z_OBJ_ROOMTIMER_H_
#include <ultra64.h>
#include <global.h>
#include <z64.h>
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ ActorFunc updateFunc;
/* 0x0150 */ u32 switchFlag;
} ObjRoomtimer; // size = 0x0154
extern const ActorInit Obj_Roomtimer_InitVars;
#endif