mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 07:20:16 +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:
parent
5aef81071e
commit
045a92d7c3
10327 changed files with 33390 additions and 45661 deletions
|
@ -4,56 +4,47 @@
|
|||
* Description: Zelda's magic to open gates.
|
||||
*/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <z64.h>
|
||||
#include "z_item_inbox.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ActorFunc updateFunc;
|
||||
} ActorItemInbox; // size = 0x0154
|
||||
|
||||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000009
|
||||
|
||||
static void Init(ActorItemInbox* this, GlobalContext* globalCtx);
|
||||
static void Destroy(ActorItemInbox* this, GlobalContext* globalCtx);
|
||||
static void func_80B86020(ActorItemInbox* this, GlobalContext* globalCtx);
|
||||
static void Update(ActorItemInbox* this, GlobalContext* globalCtx);
|
||||
static void Draw(ActorItemInbox* this, GlobalContext* globalCtx);
|
||||
void ItemInbox_Init(ItemInbox* this, GlobalContext* globalCtx);
|
||||
void ItemInbox_Destroy(ItemInbox* this, GlobalContext* globalCtx);
|
||||
void func_80B86020(ItemInbox* this, GlobalContext* globalCtx);
|
||||
void ItemInbox_Update(ItemInbox* this, GlobalContext* globalCtx);
|
||||
void ItemInbox_Draw(ItemInbox* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Item_Inbox_InitVars = {
|
||||
ACTOR_ITEM_INBOX,
|
||||
ACTORTYPE_NPC,
|
||||
ROOM,
|
||||
FLAGS,
|
||||
OBJECT_GAMEPLAY_KEEP,
|
||||
sizeof(ActorItemInbox),
|
||||
(ActorFunc)Init,
|
||||
(ActorFunc)Destroy,
|
||||
(ActorFunc)Update,
|
||||
(ActorFunc)Draw,
|
||||
sizeof(ItemInbox),
|
||||
(ActorFunc)ItemInbox_Init,
|
||||
(ActorFunc)ItemInbox_Destroy,
|
||||
(ActorFunc)ItemInbox_Update,
|
||||
(ActorFunc)ItemInbox_Draw,
|
||||
};
|
||||
|
||||
static void Init(ActorItemInbox* this, GlobalContext* globalCtx) {
|
||||
this->updateFunc = (ActorFunc)func_80B86020;
|
||||
void ItemInbox_Init(ItemInbox* this, GlobalContext* globalCtx) {
|
||||
this->updateFunc = func_80B86020;
|
||||
Actor_SetScale(&this->actor, 0.2);
|
||||
}
|
||||
|
||||
static void Destroy(ActorItemInbox* this, GlobalContext* globalCtx) {
|
||||
void ItemInbox_Destroy(ItemInbox* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
static void func_80B86020(ActorItemInbox* this, GlobalContext* globalCtx) {
|
||||
void func_80B86020(ItemInbox* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetTreasure(globalCtx, (this->actor.params >> 8) & 0x1F)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
static void Update(ActorItemInbox* this, GlobalContext* globalCtx) {
|
||||
void ItemInbox_Update(ItemInbox* this, GlobalContext* globalCtx) {
|
||||
this->updateFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
static void Draw(ActorItemInbox* this, GlobalContext* globalCtx) {
|
||||
void ItemInbox_Draw(ItemInbox* this, GlobalContext* globalCtx) {
|
||||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
func_8002ED80(&this->actor, globalCtx, 0);
|
||||
func_800694A0(globalCtx, this->actor.params & 0xFF);
|
||||
|
|
14
src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h
Normal file
14
src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _Z_ITEM_INBOX_H_
|
||||
#define _Z_ITEM_INBOX_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ActorFunc updateFunc;
|
||||
} ItemInbox; // size = 0x0154
|
||||
|
||||
extern const ActorInit Item_Inbox_InitVars;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue