mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 21:41:59 +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,38 +4,23 @@
|
|||
* Description: Magic Bean Salesman
|
||||
*/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include "z_en_ms.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ UNK_PTR unkSkelAnimeStruct;
|
||||
/* 0x0194 */ char unk_194[0x32];
|
||||
/* 0x01C6 */ s16 unk_1C6;
|
||||
/* 0x01C8 */ char unk_1C8[0x34];
|
||||
/* 0x01FC */ ActorFunc actionFunc;
|
||||
/* 0x0200 */ ColliderCylinderMain collider;
|
||||
/* 0x024C */ s16 activeTimer;
|
||||
} EnMs; // size = 0x0250
|
||||
|
||||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000009
|
||||
|
||||
static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Init(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Destroy(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Wait(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Talk(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Sell(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_TalkAfterBuy(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Update(EnMs* this, GlobalContext* globalCtx);
|
||||
static void EnMs_Draw(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Init(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Destroy(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Wait(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Talk(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Sell(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_TalkAfterBuy(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Update(EnMs* this, GlobalContext* globalCtx);
|
||||
void EnMs_Draw(EnMs* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Ms_InitVars = {
|
||||
ACTOR_EN_MS,
|
||||
ACTORTYPE_NPC,
|
||||
ROOM,
|
||||
FLAGS,
|
||||
OBJECT_MS,
|
||||
sizeof(EnMs),
|
||||
|
@ -66,7 +51,7 @@ static InitChainEntry initChain[] = {
|
|||
extern AnimationHeader D_060005EC;
|
||||
extern SkeletonHeader D_06003DC0;
|
||||
|
||||
static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1B);
|
||||
if (this->actor.textId == 0) {
|
||||
if (BEANS_BOUGHT >= 10) {
|
||||
|
@ -77,7 +62,7 @@ static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Init(EnMs* this, GlobalContext* globalCtx) {
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
|
||||
|
@ -103,12 +88,12 @@ static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnMs_Wait;
|
||||
}
|
||||
|
||||
static void EnMs_Destroy(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Destroy(EnMs* this, GlobalContext* globalCtx) {
|
||||
ColliderCylinderMain* collider = &this->collider;
|
||||
ActorCollider_FreeCylinder(globalCtx, collider);
|
||||
}
|
||||
|
||||
static void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
|
||||
s16 unkAngle;
|
||||
|
||||
unkAngle = this->actor.rotTowardsLinkY - this->actor.shape.rot.y;
|
||||
|
@ -123,7 +108,7 @@ static void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
||||
u8 dialogState;
|
||||
|
||||
dialogState = func_8010BDBC(&globalCtx->msgCtx);
|
||||
|
@ -151,7 +136,7 @@ static void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F410(&this->actor, globalCtx) != 0) { // if attached is set
|
||||
Rupees_ChangeBy(-prices[BEANS_BOUGHT]); // decrease ruppees
|
||||
this->actor.attachedA = NULL;
|
||||
|
@ -161,7 +146,7 @@ static void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
|
|||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
}
|
||||
|
||||
static void EnMs_TalkAfterBuy(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_TalkAfterBuy(EnMs* this, GlobalContext* globalCtx) {
|
||||
// if dialog state is 6 and player responded to textbox
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx)) == 6 && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_8010B720(globalCtx, 0x406C);
|
||||
|
@ -169,7 +154,7 @@ static void EnMs_TalkAfterBuy(EnMs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
||||
void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
|
||||
|
|
22
src/overlays/actors/ovl_En_Ms/z_en_ms.h
Normal file
22
src/overlays/actors/ovl_En_Ms/z_en_ms.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef _Z_EN_MS_H_
|
||||
#define _Z_EN_MS_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ UNK_PTR unkSkelAnimeStruct;
|
||||
/* 0x0194 */ char unk_194[0x32];
|
||||
/* 0x01C6 */ s16 unk_1C6;
|
||||
/* 0x01C8 */ char unk_1C8[0x34];
|
||||
/* 0x01FC */ ActorFunc actionFunc;
|
||||
/* 0x0200 */ ColliderCylinderMain collider;
|
||||
/* 0x024C */ s16 activeTimer;
|
||||
} EnMs; // size = 0x0250
|
||||
|
||||
|
||||
extern const ActorInit En_Ms_InitVars;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue