From 37497e427c0cd154fd969b450aa8a4956adf197a Mon Sep 17 00:00:00 2001 From: Lucas Shaw Date: Mon, 16 Mar 2020 23:09:16 -0700 Subject: [PATCH 01/23] test --- tools/ido5.3_compiler/lib/libmalloc.so | Bin tools/ido5.3_compiler/lib/libmalloc_old.so | Bin tools/ido5.3_compiler/lib/rld | Bin tools/ido5.3_compiler/usr/bin/cc | Bin tools/ido5.3_compiler/usr/lib/as0 | Bin tools/ido5.3_compiler/usr/lib/as1 | Bin tools/ido5.3_compiler/usr/lib/cfe | Bin tools/ido5.3_compiler/usr/lib/crt1.o | Bin tools/ido5.3_compiler/usr/lib/err.english.cc | 0 tools/ido5.3_compiler/usr/lib/libc.so.1 | Bin tools/ido5.3_compiler/usr/lib/libexc.so | Bin tools/ido5.3_compiler/usr/lib/libgen.so | Bin tools/ido5.3_compiler/usr/lib/libm.so | Bin tools/ido5.3_compiler/usr/lib/ugen | Bin tools/ido5.3_compiler/usr/lib/ujoin | Bin tools/ido5.3_compiler/usr/lib/uld | Bin tools/ido5.3_compiler/usr/lib/umerge | Bin tools/ido5.3_compiler/usr/lib/uopt | Bin tools/ido5.3_compiler/usr/lib/usplit | Bin 19 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/ido5.3_compiler/lib/libmalloc.so mode change 100644 => 100755 tools/ido5.3_compiler/lib/libmalloc_old.so mode change 100644 => 100755 tools/ido5.3_compiler/lib/rld mode change 100644 => 100755 tools/ido5.3_compiler/usr/bin/cc mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/as0 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/as1 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/cfe mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/crt1.o mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/err.english.cc mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libc.so.1 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libexc.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libgen.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libm.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/ugen mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/ujoin mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/uld mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/umerge mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/uopt mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/usplit diff --git a/tools/ido5.3_compiler/lib/libmalloc.so b/tools/ido5.3_compiler/lib/libmalloc.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/lib/libmalloc_old.so b/tools/ido5.3_compiler/lib/libmalloc_old.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/lib/rld b/tools/ido5.3_compiler/lib/rld old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/bin/cc b/tools/ido5.3_compiler/usr/bin/cc old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/as0 b/tools/ido5.3_compiler/usr/lib/as0 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/as1 b/tools/ido5.3_compiler/usr/lib/as1 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/cfe b/tools/ido5.3_compiler/usr/lib/cfe old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/crt1.o b/tools/ido5.3_compiler/usr/lib/crt1.o old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/err.english.cc b/tools/ido5.3_compiler/usr/lib/err.english.cc old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libc.so.1 b/tools/ido5.3_compiler/usr/lib/libc.so.1 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libexc.so b/tools/ido5.3_compiler/usr/lib/libexc.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libgen.so b/tools/ido5.3_compiler/usr/lib/libgen.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libm.so b/tools/ido5.3_compiler/usr/lib/libm.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/ugen b/tools/ido5.3_compiler/usr/lib/ugen old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/ujoin b/tools/ido5.3_compiler/usr/lib/ujoin old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/uld b/tools/ido5.3_compiler/usr/lib/uld old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/umerge b/tools/ido5.3_compiler/usr/lib/umerge old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/uopt b/tools/ido5.3_compiler/usr/lib/uopt old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/usplit b/tools/ido5.3_compiler/usr/lib/usplit old mode 100644 new mode 100755 From 898a103b78d458d727bbf7ff9110f6544c86c837 Mon Sep 17 00:00:00 2001 From: fig02 Date: Tue, 17 Mar 2020 04:38:46 -0400 Subject: [PATCH 02/23] move en_dog progress from old repo --- include/z64.h | 17 +- include/z64scene.h | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 373 +++++++++++++++++++++- src/overlays/actors/ovl_En_Dog/z_en_dog.h | 18 +- undefined_syms.txt | 5 +- 5 files changed, 397 insertions(+), 18 deletions(-) diff --git a/include/z64.h b/include/z64.h index 46215b89ed..096cb5f227 100644 --- a/include/z64.h +++ b/include/z64.h @@ -159,7 +159,9 @@ typedef struct /* 0x1360 */ s32 scene_setup_index; /* 0x1364 */ s32 respawn_flag; // "restart_flag" /* 0x1368 */ RespawnData respawn[3]; // "restart_data" - /* 0x13BC */ char unk_13BC[0x000B]; + /* 0x13BC */ char unk_13BC[0x0008]; + /* 0x13C4 */ s16 dogParams; + /* 0x13C6 */ char unk_13C6[0x0001]; /* 0x13C7 */ u8 unk_13C7; /* 0x13C8 */ u16 nayrus_love_timer; /* 0x13CA */ char unk_13CA[0x0002]; @@ -203,7 +205,7 @@ typedef struct /* 0x1418 */ u8 fade_duration; /* 0x1419 */ u8 unk_1419; // transition related /* 0x141A */ u16 environment_time; - /* 0x141C */ u8 unk_141C; + /* 0x141C */ u8 richardIsLost; /* 0x141D */ u8 transition_type; /* 0x141E */ char unk_141E[0x0002]; /* 0x1420 */ s16 world_map_area; @@ -1027,6 +1029,17 @@ typedef struct /* 0x3E */ u16 unk_3E; /* Probably Padding */ } SkelAnime; // size = 0x40 +// Some animation related structure +typedef struct +{ + /* 0x00 */ u32 animation; + /* 0x04 */ f32 playbackSpeed; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 frameCount; + /* 0x10 */ u8 unk_10; + /* 0x14 */ f32 transitionRate; +} struct_80034EC0_Entry; // size = 0x18 + typedef struct { /* 0x00 */ u32 unk_00; diff --git a/include/z64scene.h b/include/z64scene.h index 313565444a..66bfade3b9 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -475,7 +475,7 @@ typedef enum /* 0x32 */ SCENE_NIGHT_SHOP, /* 0x33 */ SCENE_FACE_SHOP, /* 0x34 */ SCENE_LINK_HOME, - /* 0x35 */ SCENE_IMPA, + /* 0x35 */ SCENE_BACK_ALLEY, /* 0x36 */ SCENE_MALON_STABLE, /* 0x37 */ SCENE_LABO, /* 0x38 */ SCENE_HYLIA_LABO, diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 38eaca0058..9442f828fc 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -3,9 +3,24 @@ #define ROOM 0x00 #define FLAGS 0x00000000 +void func_809FAFD0(EnDog* this, GlobalContext* globalCtx); +void func_809FB038(EnDog* this, GlobalContext* globalCtx); +void func_809FB0A0(EnDog* this, GlobalContext* globalCtx); +void func_809FB108(EnDog* this); +s8 func_809FB29C(EnDog* this, GlobalContext* globalCtx); +void func_809FB320(EnDog* this, GlobalContext* globalCtx); +void func_809FB3AC(EnDog* this, GlobalContext* globalCtx); void EnDog_Init(EnDog* this, GlobalContext* globalCtx); void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx); +void func_809FB6C4(EnDog* this, GlobalContext* globalCtx); +void func_809FB858(EnDog* this, GlobalContext* globalCtx); +void func_809FB940(EnDog* this, GlobalContext* globalCtx); +void func_809FBABC(EnDog* this, GlobalContext* globalCtx); +void func_809FBB64(EnDog* this, GlobalContext* globalCtx); +void func_809FBC6C(EnDog* this, GlobalContext* globalCtx); void EnDog_Update(EnDog* this, GlobalContext* globalCtx); +void func_809FBD8C(EnDog* this, GlobalContext* globalCtx); +void func_809FBDA4(EnDog* this, GlobalContext* globalCtx); void EnDog_Draw(EnDog* this, GlobalContext* globalCtx); /* @@ -23,40 +38,372 @@ const ActorInit En_Dog_InitVars = (ActorFunc)EnDog_Draw, }; */ + +static ColliderCylinderInit cylinderInit = +{ + 0x06, 0x00, 0x09, 0x39, // ColliderBodyInfo + 0x10, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00000000, + 0x00, 0x00, 0x00, 0x00, + 0xFFCFFFFF, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x00, + + 0x0010, // radius + 0x0014, // height + 0x0000, // yShift + 0x0000, 0x0000, 0x0000 //Vec3s xyz +}; + +typedef struct +{ + /* 0x00 */ u8 health; + /* 0x02 */ s16 unk_10; + /* 0x04 */ s16 unk_12; + /* 0x06 */ u16 unk_14; + /* 0x08 */ u8 mass; +}sub98Init; + +sub98Init sub98Data = +{ + 0x00, //health + 0x0000, //unk_10 + 0x0000, //unk_12 + 0x0000, //unk_14 + 0x32 //mass +}; + +struct_80034EC0_Entry skelanimeArr[]= +{ + {0x06001368, 1.0f, 0.0f, -1.0f, 0x00, 0.0f}, + {0x06001368, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, + {0x06000D78, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, + {0x06000278, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, + {0x06001150, 1.0f, 0.0f, 4.0f, 0x02, -6.0f}, + {0x06001150, 1.0f, 0.0f, 25.0f,0x04, -6.0f}, + {0x06000928, 1.0f, 0.0f, 6.0f, 0x02, -6.0f}, + {0x06000C28, 1.0f, 0.0f, -1.0f, 0x00, -6.0f} +}; + +extern D_06007290; + #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s") - #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s") - #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s") #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s") +/* +void func_809FB108(EnDog* this) +{ + s32 animationIndex; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB29C.s") + if (this->unk_1F0 != this->unk_1F2) + { + if (this->unk_1F0 == 4) + { + this->unk_1F0 = 3; + } + if (this->unk_1F0 == 6) + { + this->unk_1F0 = 5; + } + + this->unk_1F2 = this->unk_1F0; + if (this->unk_1F0 < 6U) + { + switch(this->unk_1F0) + { + case 1: animationIndex = 2; + case 2: animationIndex = 3; + case 3: animationIndex = 4; + case 5: animationIndex = 6; + default: animationIndex = 1; + } + } + } + + if (this->unk_1F2 < 6U) + { + + } +} +*/ + +s8 func_809FB29C(EnDog* this, GlobalContext* globalCtx) +{ + if ((this->collider.base.collideFlags & 2) != 0) + { + this->collider.base.collideFlags &= 0xFFFD; + return 2; + } + if (globalCtx->sceneNum == SCENE_MARKET_DAY) + { + return 0; + } + if ((this->collider.base.maskB & 1) != 0) + { + this->collider.base.maskB &= 0xFFFE; + if (gSaveContext.dogParams != 0) + { + return 0; + } + gSaveContext.dogParams = (this->actor.params & 0x7FFF); + return 1; + } + return 0; +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s") - #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Init.s") +void EnDog_Init(EnDog* this, GlobalContext* globalCtx) +{ + SkelAnime* skelAnime; + s16 followingDog; + ColliderCylinderMain* collider; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Destroy.s") + collider = &this->collider; + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 24.0f); + skelAnime = &this->skelAnime; + func_800A46F8(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13); + func_80034EC0(skelAnime, skelanimeArr, 0); + + if ((this->actor.params & 0x8000) == 0) + { + this->actor.params = (this->actor.params & 0xF0FF) | ((((this->actor.params & 0xF00) >> 8) + 1) << 8); + } + + followingDog = ((gSaveContext.dogParams & 0x0F00) >> 8); + if (followingDog == ((this->actor.params & 0x0F00) >> 8) && ((this->actor.params & 0x8000) == 0)) + { + Actor_Kill(&this->actor); + return; + } + + ActorCollider_AllocCylinder(globalCtx, collider); + ActorCollider_InitCylinder(globalCtx, collider, &this->actor, &cylinderInit); + func_80061EFC(&this->actor.sub_98, 0, &sub98Data); + Actor_SetScale(&this->actor, 0.0075f); + this->unk_1E6 = 0; + this->actor.gravity = -1.0f; + this->movementPath = func_8008E4E0(globalCtx, ((((this->actor.params & 0x00F0) >> 4) << 0x10) >> 0x10), 0xF); + + switch (globalCtx->sceneNum) + { + case SCENE_MARKET_NIGHT: + if ((gSaveContext.richardIsLost == 0) && (((this->actor.params & 0x0F00) >> 8) == 1)) + { + Actor_Kill(&this->actor); + } + break; + + case SCENE_BACK_ALLEY: + if ((u32)(this->actor.params & 0x8000) == 0) + { + if (gSaveContext.richardIsLost == 0) + { + this->unk_1F0 = 3; + this->actionFunc = &func_809FBC6C; + this->actor.speedXZ = 0.0f; + return; + } + else + { + Actor_Kill(&this->actor); + return; + } + } + break; + + default: break; + } + + if ((u32)(this->actor.params & 0x8000) != 0) + { + this->unk_1F0 = 0; + this->actionFunc = &func_809FB940; + } + else + { + this->unk_1F0 = 3; + this->actionFunc = &func_809FB858; + } +} + +void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx) +{ + ColliderCylinderMain* collider = &this->collider; + ActorCollider_FreeCylinder(globalCtx, collider); +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB858.s") +void func_809FB858(EnDog* this, GlobalContext* globalCtx) +{ + s32 temp1EC; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB940.s") + if (func_809FB29C(this, globalCtx) == 1) //if this dog is the one thats following + { + this->actionFunc = &func_809FB940; //follow function? + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBABC.s") + if (this->unk_1EC == 0) + { + temp1EC = 0; + } + else + { + this->unk_1EC -= 1; + temp1EC = this->unk_1EC; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBB64.s") + if(temp1EC == 0) + { + this->unk_1EC = Math_Rand_S16Offset(200, 100); + if ((globalCtx->state.frames & 1) != 0) //odd frame + { + this->unk_1F0 = 0; + } + else + { + this->unk_1F0 = 1; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBC6C.s") + if (this->unk_1F0 == 1) + { + this->unk_1EC = (this->unk_1EC / 2); + } + this->actionFunc = &func_809FB6C4; + } + Math_SmoothScaleMaxMinF(&this->actor.speedXZ, 0.0f, 0.4f, 1.0f, 0.0f); +} + +//EnDog_Follow +void func_809FB940(EnDog* this, GlobalContext* globalCtx) +{ + f32 speed; + + if (gSaveContext.dogParams == 0) + { + this->unk_1F0 = 3; + this->actionFunc = &func_809FBC6C; + this->actor.speedXZ = 0.0f; + return; + } + + if (this->actor.xzDistanceFromLink > 400.0f) + { + if (this->unk_1F0 != 3 && this->unk_1F0 != 4) + { + this->unk_1F0 = 5; + } + gSaveContext.dogParams = 0; + speed = 0.0f; + } + else if (this->actor.xzDistanceFromLink > 100.0f) + { + this->unk_1F0 = 1; + speed = 4.0f; + } + else if (this->actor.xzDistanceFromLink < 40.0f) + { + if (this->unk_1F0 != 5 && this->unk_1F0 != 6) + { + this->unk_1F0 = 5; + } + speed = 0.0f; + } + else + { + this->unk_1F0 = 0; + speed = 1.0f; + } + + Math_SmoothScaleMaxF(&this->actor.speedXZ, speed, 0.6f, 1.0f); + + if (!(this->actor.xzDistanceFromLink > 400.0f)) + { + Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, this->actor.rotTowardsLinkY, 10, 1000, 1); + this->actor.shape.rot = this->actor.posRot.rot; + } +} + +void func_809FBABC(EnDog* this, GlobalContext* globalCtx) +{ + if (this->actor.xzDistanceFromLink < 200.0f) + { + Math_SmoothScaleMaxF(&this->actor.speedXZ, 4.0f, 0.6f, 1.0f); + Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, (this->actor.rotTowardsLinkY ^ 0x8000), 10, 1000, 1); + } + else + { + this->actionFunc = &func_809FBB64; + } + this->actor.shape.rot = this->actor.posRot.rot; +} + +void func_809FBB64(EnDog* this, GlobalContext* globalCtx) +{ + s16 rotTowardLink; + s16 prevRotY; + f32 absAngleDiff; + + if (200.0f <= this->actor.xzDistanceFromLink) + { + this->unk_1F0 = 0; + + Math_SmoothScaleMaxF(&this->actor.speedXZ, 1.0f, 0.6f, 1.0f); + + rotTowardLink = this->actor.rotTowardsLinkY; + prevRotY = this->actor.posRot.rot.y; + Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, rotTowardLink, 10, 1000, 1); + + //weird temp reuse needed for regalloc + absAngleDiff = this->actor.posRot.rot.y; + absAngleDiff -= prevRotY; + absAngleDiff = fabsf(absAngleDiff); + if (absAngleDiff < 200.0f) + { + this->unk_1F0 = 3; + this->actionFunc = &func_809FBC6C; + this->actor.speedXZ = 0.0f; + } + } + else + { + this->unk_1F0 = 1; + this->actionFunc = &func_809FBABC; + } + this->actor.shape.rot = this->actor.posRot.rot; +} + +void func_809FBC6C(EnDog* this, GlobalContext* globalCtx) +{ + this->spawnAngle = (this->actor.rotTowardsLinkY - this->actor.shape.rot.y); + if ((gSaveContext.richardIsLost != 0) && (this->actor.xzDistanceFromLink < 200.0f)) + { + this->unk_1F0 = 1; + this->actionFunc = &func_809FBABC; + } +} + +void EnDog_Update(EnDog* this, GlobalContext* globalCtx) +{ + s32 pad1; + s32 pad2; + + func_809FB108(this); + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + func_8002E4B4(globalCtx, &this->actor, (f32)this->collider.dim.radius, (f32)this->collider.dim.height * 0.5f, 0.0f, 5); + Actor_MoveForward(&this->actor); + this->actionFunc(this, globalCtx); + ActorCollider_Cylinder_Update(&this->actor, &this->collider); + Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Update.s") #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s") - #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s") #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s") diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.h b/src/overlays/actors/ovl_En_Dog/z_en_dog.h index 2d574f85dc..acaa4dee91 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.h +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.h @@ -7,7 +7,23 @@ typedef struct { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x144]; + /* 0x014C */ SkelAnime skelAnime; + /* 0x018C */ char unk_18C[0x4]; + /* 0x0190 */ ActorFunc actionFunc; + /* 0x0194 */ ColliderCylinderMain collider; + /* 0x01E0 */ UNK_PTR movementPath; + /* 0x01E4 */ char unk_1E4[0x2]; + /* 0x01E6 */ u16 unk_1E6; + /* 0x01E8 */ s16 spawnAngle; + /* 0x01EA */ char unk_1EA[0x2]; + /* 0x01EC */ s16 unk_1EC; + /* 0x01EE */ char unk_1EE[0x2]; + /* 0x01F0 */ s16 unk_1F0; + /* 0x01F2 */ s16 unk_1F2; + /* 0x01F4 */ u8 unk_1F4; + /* 0x01F5 */ char unk_1F5[0x4D]; + /* 0x0242 */ u8 unk_242; + /* 0x0243 */ char unk_243[0x4D]; } EnDog; // size = 0x0290 extern const ActorInit En_Dog_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index c2d7779fd5..b6fbf1b3bd 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -390,4 +390,7 @@ D_06009244 = 0x06009244; D_060041F4 = 0x060041F4; D_0600A054 = 0x0600A054; D_06008688 = 0x06008688; -D_04049210 = 0x04049210; \ No newline at end of file +D_04049210 = 0x04049210; + +// z_en_dog +D_06007290 = 0x06007290; \ No newline at end of file From e972f702dc1c45cfcf5e91cb2d8d9ad1517895c1 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 17 Mar 2020 16:00:31 -0400 Subject: [PATCH 03/23] Test --- blah.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 blah.txt diff --git a/blah.txt b/blah.txt new file mode 100644 index 0000000000..e69de29bb2 From 6fc191b45bd92d8495712d3f4bb3b8e0c1638e11 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 17 Mar 2020 16:33:41 -0400 Subject: [PATCH 04/23] Migrated rodata --- .../actors/ovl_Demo_Geff/DemoGeff_Draw.s | 9 ++ .../actors/ovl_Demo_Geff/DemoGeff_Init.s | 9 ++ .../actors/ovl_Demo_Geff/DemoGeff_Update.s | 8 ++ .../actors/ovl_Demo_Geff/func_80977EA8.s | 16 ++++ .../actors/ovl_Demo_Geff/func_80977F80.s | 12 +++ .../actors/ovl_Demo_Geff/func_80978030.s | 18 ++++ .../actors/ovl_Demo_Geff/func_809780E0.s | 21 +++++ .../actors/ovl_Demo_Geff/func_80978370.s | 8 ++ .../actors/ovl_Demo_Geff/func_809783D4.s | 9 ++ data/overlays/actors/z_demo_geff.rodata.s | 80 ------------------ spec | 1 - tools/ido5.3_compiler/LICENSE.md | 0 tools/ido5.3_compiler/lib/libmalloc.so | Bin tools/ido5.3_compiler/lib/libmalloc_old.so | Bin tools/ido5.3_compiler/lib/rld | Bin tools/ido5.3_compiler/usr/bin/cc | Bin tools/ido5.3_compiler/usr/lib/as0 | Bin tools/ido5.3_compiler/usr/lib/as1 | Bin tools/ido5.3_compiler/usr/lib/cfe | Bin tools/ido5.3_compiler/usr/lib/crt1.o | Bin tools/ido5.3_compiler/usr/lib/err.english.cc | 0 tools/ido5.3_compiler/usr/lib/libc.so.1 | Bin tools/ido5.3_compiler/usr/lib/libexc.so | Bin tools/ido5.3_compiler/usr/lib/libgen.so | Bin tools/ido5.3_compiler/usr/lib/libm.so | Bin tools/ido5.3_compiler/usr/lib/ugen | Bin tools/ido5.3_compiler/usr/lib/ujoin | Bin tools/ido5.3_compiler/usr/lib/uld | Bin tools/ido5.3_compiler/usr/lib/umerge | Bin tools/ido5.3_compiler/usr/lib/uopt | Bin tools/ido5.3_compiler/usr/lib/usplit | Bin 31 files changed, 110 insertions(+), 81 deletions(-) delete mode 100644 data/overlays/actors/z_demo_geff.rodata.s mode change 100644 => 100755 tools/ido5.3_compiler/LICENSE.md mode change 100644 => 100755 tools/ido5.3_compiler/lib/libmalloc.so mode change 100644 => 100755 tools/ido5.3_compiler/lib/libmalloc_old.so mode change 100644 => 100755 tools/ido5.3_compiler/lib/rld mode change 100644 => 100755 tools/ido5.3_compiler/usr/bin/cc mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/as0 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/as1 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/cfe mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/crt1.o mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/err.english.cc mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libc.so.1 mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libexc.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libgen.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/libm.so mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/ugen mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/ujoin mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/uld mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/umerge mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/uopt mode change 100644 => 100755 tools/ido5.3_compiler/usr/lib/usplit diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s index 7be00a7160..3afafed3d0 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s @@ -1,3 +1,12 @@ +.rdata + + +glabel D_80978740 + .asciz "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" + .balign 4 + +.text + glabel DemoGeff_Draw /* 006A0 809784E0 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 /* 006A4 809784E4 AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s index dfd28b9e27..426d489ca6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s @@ -1,3 +1,12 @@ +.rdata + + +glabel D_809785E0 + .asciz "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" + .balign 4 + +.text + glabel DemoGeff_Init /* 0000C 80977E4C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 /* 00010 80977E50 AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s index 9df7106d09..c4992029af 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s @@ -1,3 +1,11 @@ +.rdata + +glabel D_80978704 + .asciz "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" + .balign 4 + +.text + glabel DemoGeff_Update /* 00638 80978478 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 /* 0063C 8097847C AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s index 70b44521f4..628433d3fd 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s @@ -1,3 +1,19 @@ +.rdata + +glabel D_8097861C + .asciz "../z_demo_geff.c" + .balign 4 + +glabel D_80978630 + .asciz "../z_demo_geff.c" + .balign 4 + +glabel D_80978644 + .asciz "../z_demo_geff.c" + .balign 4 + +.text + glabel func_80977EA8 /* 00068 80977EA8 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 /* 0006C 80977EAC AFBF001C */ sw $ra, 0x001C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s index 23cda1aae2..ee035d3a8f 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s @@ -1,3 +1,15 @@ +.rdata + +glabel D_80978658 + .asciz "../z_demo_geff.c" + .balign 4 + +glabel D_8097866C + .asciz "../z_demo_geff.c" + .balign 4 + +.text + glabel func_80977F80 /* 00140 80977F80 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 /* 00144 80977F84 AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s index 5731a2e104..ab3a164015 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s @@ -1,3 +1,21 @@ +.late_rodata + +glabel jtbl_80978778 +.word L80978064 +.word func_809780E0 +.word L8097816C +.word L80978064 +.word func_809780E0 +.word L8097816C +.word L80978064 +.word func_809780E0 +glabel D_80978798 + .word 0x3C23D70A +glabel D_8097879C + .word 0x3E99999A + +.text + glabel func_80978030 /* 001F0 80978030 AFA50004 */ sw $a1, 0x0004($sp) /* 001F4 80978034 948E001C */ lhu $t6, 0x001C($a0) ## 0000001C diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s index c140b9e4ae..a34fe5d913 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s @@ -1,3 +1,24 @@ +.late_rodata + +glabel D_809787A0 + .word 0x3C23D70A +glabel D_809787A4 + .word 0x3E19999A +glabel D_809787A8 + .word 0x3E947AE1 +glabel D_809787AC + .word 0x3DF5C28F +glabel D_809787B0 + .word 0x3C23D70A +glabel D_809787B4 + .word 0x3DCCCCCD +glabel D_809787B8 + .word 0x3E19999A +glabel D_809787BC + .word 0x3E4CCCCD + +.text + glabel func_809780E0 /* 002A0 809780E0 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 /* 002A4 809780E4 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s index fa79bc57a7..22f7325187 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s @@ -1,3 +1,11 @@ +.rdata + +glabel D_80978680 + .asciz " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" + .balign 4 + +.text + glabel func_80978370 /* 00530 80978370 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 /* 00534 80978374 AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s index 2a2cbdeb76..f06fb64efe 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s @@ -1,3 +1,12 @@ +.rdata + + +glabel D_809786C4 + .asciz "Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n" + .balign 4 + +.text + glabel func_809783D4 /* 00594 809783D4 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 /* 00598 809783D8 AFBF0014 */ sw $ra, 0x0014($sp) diff --git a/data/overlays/actors/z_demo_geff.rodata.s b/data/overlays/actors/z_demo_geff.rodata.s deleted file mode 100644 index cf738192db..0000000000 --- a/data/overlays/actors/z_demo_geff.rodata.s +++ /dev/null @@ -1,80 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata - -glabel D_809785E0 - .asciz "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" - .balign 4 - -glabel D_8097861C - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978630 - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978644 - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978658 - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_8097866C - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978680 - .asciz " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" - .balign 4 - -glabel D_809786C4 - .asciz "Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n" - .balign 4 - -glabel D_80978704 - .asciz "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" - .balign 4 - -glabel D_80978740 - .asciz "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" - .balign 4 - -glabel jtbl_80978778 -.word L80978064 -.word func_809780E0 -.word L8097816C -.word L80978064 -.word func_809780E0 -.word L8097816C -.word L80978064 -.word func_809780E0 -glabel D_80978798 - .word 0x3C23D70A -glabel D_8097879C - .word 0x3E99999A -glabel D_809787A0 - .word 0x3C23D70A -glabel D_809787A4 - .word 0x3E19999A -glabel D_809787A8 - .word 0x3E947AE1 -glabel D_809787AC - .word 0x3DF5C28F -glabel D_809787B0 - .word 0x3C23D70A -glabel D_809787B4 - .word 0x3DCCCCCD -glabel D_809787B8 - .word 0x3E19999A -glabel D_809787BC - .word 0x3E4CCCCD - - diff --git a/spec b/spec index 00c5891b03..697c0bb262 100644 --- a/spec +++ b/spec @@ -1796,7 +1796,6 @@ beginseg name "ovl_Demo_Geff" include "build/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o" include "build/data/overlays/actors/z_demo_geff.data.o" - include "build/data/overlays/actors/z_demo_geff.rodata.o" include "build/data/overlays/actors/z_demo_geff.reloc.o" endseg diff --git a/tools/ido5.3_compiler/LICENSE.md b/tools/ido5.3_compiler/LICENSE.md old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/lib/libmalloc.so b/tools/ido5.3_compiler/lib/libmalloc.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/lib/libmalloc_old.so b/tools/ido5.3_compiler/lib/libmalloc_old.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/lib/rld b/tools/ido5.3_compiler/lib/rld old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/bin/cc b/tools/ido5.3_compiler/usr/bin/cc old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/as0 b/tools/ido5.3_compiler/usr/lib/as0 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/as1 b/tools/ido5.3_compiler/usr/lib/as1 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/cfe b/tools/ido5.3_compiler/usr/lib/cfe old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/crt1.o b/tools/ido5.3_compiler/usr/lib/crt1.o old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/err.english.cc b/tools/ido5.3_compiler/usr/lib/err.english.cc old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libc.so.1 b/tools/ido5.3_compiler/usr/lib/libc.so.1 old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libexc.so b/tools/ido5.3_compiler/usr/lib/libexc.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libgen.so b/tools/ido5.3_compiler/usr/lib/libgen.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/libm.so b/tools/ido5.3_compiler/usr/lib/libm.so old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/ugen b/tools/ido5.3_compiler/usr/lib/ugen old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/ujoin b/tools/ido5.3_compiler/usr/lib/ujoin old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/uld b/tools/ido5.3_compiler/usr/lib/uld old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/umerge b/tools/ido5.3_compiler/usr/lib/umerge old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/uopt b/tools/ido5.3_compiler/usr/lib/uopt old mode 100644 new mode 100755 diff --git a/tools/ido5.3_compiler/usr/lib/usplit b/tools/ido5.3_compiler/usr/lib/usplit old mode 100644 new mode 100755 From db822f7d0f00083d036c61535a5bc667fe98641c Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 19 Mar 2020 20:06:46 -0400 Subject: [PATCH 05/23] More --- .../actors/ovl_Demo_Geff/DemoGeff_Destroy.s | 6 - .../actors/ovl_Demo_Geff/DemoGeff_Init.s | 40 ------ .../actors/ovl_Demo_Geff/DemoGeff_Update.s | 38 ------ .../actors/ovl_Demo_Geff/func_80978030.s | 104 ++++++++++++++-- .../actors/ovl_Demo_Geff/func_809780E0.s | 97 --------------- .../actors/ovl_Demo_Geff/func_80978308.s | 18 --- .../actors/ovl_Demo_Geff/func_80978344.s | 14 --- .../actors/ovl_Demo_Geff/func_809783D4.s | 60 --------- .../actors/ovl_Demo_Geff/func_809784D4.s | 6 - data/overlays/actors/z_demo_geff.data.s | 35 ------ diff.py | 0 spec | 1 - .../actors/ovl_Demo_Geff/z_demo_geff.c | 115 ++++++++++++++++-- .../actors/ovl_Demo_Geff/z_demo_geff.h | 8 +- undefined_syms.txt | 3 + 15 files changed, 211 insertions(+), 334 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978308.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978344.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809784D4.s delete mode 100644 data/overlays/actors/z_demo_geff.data.s mode change 100644 => 100755 diff.py diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Destroy.s deleted file mode 100644 index 4792166bf4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Destroy.s +++ /dev/null @@ -1,6 +0,0 @@ -glabel DemoGeff_Destroy -/* 00000 80977E40 AFA40000 */ sw $a0, 0x0000($sp) -/* 00004 80977E44 03E00008 */ jr $ra -/* 00008 80977E48 AFA50004 */ sw $a1, 0x0004($sp) - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s deleted file mode 100644 index 426d489ca6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s +++ /dev/null @@ -1,40 +0,0 @@ -.rdata - - -glabel D_809785E0 - .asciz "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" - .balign 4 - -.text - -glabel DemoGeff_Init -/* 0000C 80977E4C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00010 80977E50 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00014 80977E54 AFA40018 */ sw $a0, 0x0018($sp) -/* 00018 80977E58 AFA5001C */ sw $a1, 0x001C($sp) -/* 0001C 80977E5C 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 00020 80977E60 00802825 */ or $a1, $a0, $zero ## $a1 = 00000000 -/* 00024 80977E64 3C048098 */ lui $a0, %hi(D_809785E0) ## $a0 = 80980000 -/* 00028 80977E68 04400002 */ bltz $v0, .L80977E74 -/* 0002C 80977E6C 28410009 */ slti $at, $v0, 0x0009 -/* 00030 80977E70 14200007 */ bne $at, $zero, .L80977E90 -.L80977E74: -/* 00034 80977E74 248485E0 */ addiu $a0, $a0, %lo(D_809785E0) ## $a0 = 809785E0 -/* 00038 80977E78 0C00084C */ jal osSyncPrintf - -/* 0003C 80977E7C AFA50018 */ sw $a1, 0x0018($sp) -/* 00040 80977E80 0C00B55C */ jal Actor_Kill - -/* 00044 80977E84 8FA40018 */ lw $a0, 0x0018($sp) -/* 00048 80977E88 10000004 */ beq $zero, $zero, .L80977E9C -/* 0004C 80977E8C 8FBF0014 */ lw $ra, 0x0014($sp) -.L80977E90: -/* 00050 80977E90 ACA0014C */ sw $zero, 0x014C($a1) ## 0000014C -/* 00054 80977E94 ACA00150 */ sw $zero, 0x0150($a1) ## 00000150 -/* 00058 80977E98 8FBF0014 */ lw $ra, 0x0014($sp) -.L80977E9C: -/* 0005C 80977E9C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00060 80977EA0 03E00008 */ jr $ra -/* 00064 80977EA4 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s deleted file mode 100644 index c4992029af..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s +++ /dev/null @@ -1,38 +0,0 @@ -.rdata - -glabel D_80978704 - .asciz "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" - .balign 4 - -.text - -glabel DemoGeff_Update -/* 00638 80978478 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0063C 8097847C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00640 80978480 8C82014C */ lw $v0, 0x014C($a0) ## 0000014C -/* 00644 80978484 04400008 */ bltz $v0, .L809784A8 -/* 00648 80978488 28410002 */ slti $at, $v0, 0x0002 -/* 0064C 8097848C 10200006 */ beq $at, $zero, .L809784A8 -/* 00650 80978490 00027080 */ sll $t6, $v0, 2 -/* 00654 80978494 3C038098 */ lui $v1, %hi(D_809785A8) ## $v1 = 80980000 -/* 00658 80978498 006E1821 */ addu $v1, $v1, $t6 -/* 0065C 8097849C 8C6385A8 */ lw $v1, %lo(D_809785A8)($v1) -/* 00660 809784A0 14600006 */ bne $v1, $zero, .L809784BC -/* 00664 809784A4 00000000 */ nop -.L809784A8: -/* 00668 809784A8 3C048098 */ lui $a0, %hi(D_80978704) ## $a0 = 80980000 -/* 0066C 809784AC 0C00084C */ jal osSyncPrintf - -/* 00670 809784B0 24848704 */ addiu $a0, $a0, %lo(D_80978704) ## $a0 = 80978704 -/* 00674 809784B4 10000004 */ beq $zero, $zero, .L809784C8 -/* 00678 809784B8 8FBF0014 */ lw $ra, 0x0014($sp) -.L809784BC: -/* 0067C 809784BC 0060F809 */ jalr $ra, $v1 -/* 00680 809784C0 00000000 */ nop -/* 00684 809784C4 8FBF0014 */ lw $ra, 0x0014($sp) -.L809784C8: -/* 00688 809784C8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0068C 809784CC 03E00008 */ jr $ra -/* 00690 809784D0 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s index ab3a164015..55c2987535 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s @@ -2,17 +2,33 @@ glabel jtbl_80978778 .word L80978064 -.word func_809780E0 +.word L809780E0 .word L8097816C .word L80978064 -.word func_809780E0 +.word L809780E0 .word L8097816C .word L80978064 -.word func_809780E0 +.word L809780E0 glabel D_80978798 - .word 0x3C23D70A + .float 0.01 glabel D_8097879C - .word 0x3E99999A + .float 0.3 +glabel D_809787A0 + .float 0.01 +glabel D_809787A4 + .float 0.15 +glabel D_809787A8 + .float 0.29 +glabel D_809787AC + .float 0.12 +glabel D_809787B0 + .float 0.01 +glabel D_809787B4 + .float 0.1 +glabel D_809787B8 + .float 0.15 +glabel D_809787BC + .float 0.2 .text @@ -31,6 +47,7 @@ glabel func_80978030 /* 0021C 8097805C 01C00008 */ jr $t6 /* 00220 80978060 00000000 */ nop glabel L80978064 +.L80978064: /* 00224 80978064 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 /* 00228 80978068 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 /* 0022C 8097806C 8C6F0000 */ lw $t7, 0x0000($v1) ## 8015FA90 @@ -62,5 +79,78 @@ glabel L80978064 /* 00294 809780D4 46028480 */ add.s $f18, $f16, $f2 /* 00298 809780D8 03E00008 */ jr $ra /* 0029C 809780DC E4520008 */ swc1 $f18, 0x0008($v0) ## 00000058 - - +glabel L809780E0 +.L809780E0: +/* 002A0 809780E0 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 +/* 002A4 809780E4 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 +/* 002A8 809780E8 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 +/* 002AC 809780EC 3C018098 */ lui $at, %hi(D_809787A0) ## $at = 80980000 +/* 002B0 809780F0 C42087A0 */ lwc1 $f0, %lo(D_809787A0)($at) +/* 002B4 809780F4 856C1468 */ lh $t4, 0x1468($t3) ## 00001468 +/* 002B8 809780F8 3C018098 */ lui $at, %hi(D_809787A4) ## $at = 80980000 +/* 002BC 809780FC C42A87A4 */ lwc1 $f10, %lo(D_809787A4)($at) +/* 002C0 80978100 448C2000 */ mtc1 $t4, $f4 ## $f4 = 0.00 +/* 002C4 80978104 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 +/* 002C8 80978108 3C018098 */ lui $at, %hi(D_809787A8) ## $at = 80980000 +/* 002CC 8097810C 468021A0 */ cvt.s.w $f6, $f4 +/* 002D0 80978110 46003202 */ mul.s $f8, $f6, $f0 +/* 002D4 80978114 460A4400 */ add.s $f16, $f8, $f10 +/* 002D8 80978118 E4500000 */ swc1 $f16, 0x0000($v0) ## 00000050 +/* 002DC 8097811C 8C6D0000 */ lw $t5, 0x0000($v1) ## 8015FA90 +/* 002E0 80978120 C42887A8 */ lwc1 $f8, %lo(D_809787A8)($at) +/* 002E4 80978124 3C018098 */ lui $at, %hi(D_809787AC) ## $at = 80980000 +/* 002E8 80978128 85AE146A */ lh $t6, 0x146A($t5) ## 0000146A +/* 002EC 8097812C 448E9000 */ mtc1 $t6, $f18 ## $f18 = 0.00 +/* 002F0 80978130 00000000 */ nop +/* 002F4 80978134 46809120 */ cvt.s.w $f4, $f18 +/* 002F8 80978138 46002182 */ mul.s $f6, $f4, $f0 +/* 002FC 8097813C 46083280 */ add.s $f10, $f6, $f8 +/* 00300 80978140 E44A0004 */ swc1 $f10, 0x0004($v0) ## 00000054 +/* 00304 80978144 8C6F0000 */ lw $t7, 0x0000($v1) ## 8015FA90 +/* 00308 80978148 C42687AC */ lwc1 $f6, %lo(D_809787AC)($at) +/* 0030C 8097814C 85F8146C */ lh $t8, 0x146C($t7) ## 0000146C +/* 00310 80978150 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 +/* 00314 80978154 00000000 */ nop +/* 00318 80978158 468084A0 */ cvt.s.w $f18, $f16 +/* 0031C 8097815C 46009102 */ mul.s $f4, $f18, $f0 +/* 00320 80978160 46062200 */ add.s $f8, $f4, $f6 +/* 00324 80978164 03E00008 */ jr $ra +/* 00328 80978168 E4480008 */ swc1 $f8, 0x0008($v0) ## 00000058 +glabel L8097816C +.L8097816C: +/* 0032C 8097816C 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 +/* 00330 80978170 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 +/* 00334 80978174 8C790000 */ lw $t9, 0x0000($v1) ## 8015FA90 +/* 00338 80978178 3C018098 */ lui $at, %hi(D_809787B0) ## $at = 80980000 +/* 0033C 8097817C C42087B0 */ lwc1 $f0, %lo(D_809787B0)($at) +/* 00340 80978180 8728146E */ lh $t0, 0x146E($t9) ## 0000146E +/* 00344 80978184 3C018098 */ lui $at, %hi(D_809787B4) ## $at = 80980000 +/* 00348 80978188 C42487B4 */ lwc1 $f4, %lo(D_809787B4)($at) +/* 0034C 8097818C 44885000 */ mtc1 $t0, $f10 ## $f10 = 0.00 +/* 00350 80978190 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 +/* 00354 80978194 3C018098 */ lui $at, %hi(D_809787B8) ## $at = 80980000 +/* 00358 80978198 46805420 */ cvt.s.w $f16, $f10 +/* 0035C 8097819C 46008482 */ mul.s $f18, $f16, $f0 +/* 00360 809781A0 46049180 */ add.s $f6, $f18, $f4 +/* 00364 809781A4 E4460000 */ swc1 $f6, 0x0000($v0) ## 00000050 +/* 00368 809781A8 8C690000 */ lw $t1, 0x0000($v1) ## 8015FA90 +/* 0036C 809781AC C43287B8 */ lwc1 $f18, %lo(D_809787B8)($at) +/* 00370 809781B0 3C018098 */ lui $at, %hi(D_809787BC) ## $at = 80980000 +/* 00374 809781B4 852A1470 */ lh $t2, 0x1470($t1) ## 00001470 +/* 00378 809781B8 448A4000 */ mtc1 $t2, $f8 ## $f8 = 0.00 +/* 0037C 809781BC 00000000 */ nop +/* 00380 809781C0 468042A0 */ cvt.s.w $f10, $f8 +/* 00384 809781C4 46005402 */ mul.s $f16, $f10, $f0 +/* 00388 809781C8 46128100 */ add.s $f4, $f16, $f18 +/* 0038C 809781CC E4440004 */ swc1 $f4, 0x0004($v0) ## 00000054 +/* 00390 809781D0 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 +/* 00394 809781D4 C43087BC */ lwc1 $f16, %lo(D_809787BC)($at) +/* 00398 809781D8 856C1472 */ lh $t4, 0x1472($t3) ## 00001472 +/* 0039C 809781DC 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00 +/* 003A0 809781E0 00000000 */ nop +/* 003A4 809781E4 46803220 */ cvt.s.w $f8, $f6 +/* 003A8 809781E8 46004282 */ mul.s $f10, $f8, $f0 +/* 003AC 809781EC 46105480 */ add.s $f18, $f10, $f16 +/* 003B0 809781F0 E4520008 */ swc1 $f18, 0x0008($v0) ## 00000058 +/* 003B4 809781F4 03E00008 */ jr $ra +/* 003B8 809781F8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s deleted file mode 100644 index a34fe5d913..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s +++ /dev/null @@ -1,97 +0,0 @@ -.late_rodata - -glabel D_809787A0 - .word 0x3C23D70A -glabel D_809787A4 - .word 0x3E19999A -glabel D_809787A8 - .word 0x3E947AE1 -glabel D_809787AC - .word 0x3DF5C28F -glabel D_809787B0 - .word 0x3C23D70A -glabel D_809787B4 - .word 0x3DCCCCCD -glabel D_809787B8 - .word 0x3E19999A -glabel D_809787BC - .word 0x3E4CCCCD - -.text - -glabel func_809780E0 -/* 002A0 809780E0 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 002A4 809780E4 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 -/* 002A8 809780E8 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 -/* 002AC 809780EC 3C018098 */ lui $at, %hi(D_809787A0) ## $at = 80980000 -/* 002B0 809780F0 C42087A0 */ lwc1 $f0, %lo(D_809787A0)($at) -/* 002B4 809780F4 856C1468 */ lh $t4, 0x1468($t3) ## 00001468 -/* 002B8 809780F8 3C018098 */ lui $at, %hi(D_809787A4) ## $at = 80980000 -/* 002BC 809780FC C42A87A4 */ lwc1 $f10, %lo(D_809787A4)($at) -/* 002C0 80978100 448C2000 */ mtc1 $t4, $f4 ## $f4 = 0.00 -/* 002C4 80978104 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 -/* 002C8 80978108 3C018098 */ lui $at, %hi(D_809787A8) ## $at = 80980000 -/* 002CC 8097810C 468021A0 */ cvt.s.w $f6, $f4 -/* 002D0 80978110 46003202 */ mul.s $f8, $f6, $f0 -/* 002D4 80978114 460A4400 */ add.s $f16, $f8, $f10 -/* 002D8 80978118 E4500000 */ swc1 $f16, 0x0000($v0) ## 00000050 -/* 002DC 8097811C 8C6D0000 */ lw $t5, 0x0000($v1) ## 8015FA90 -/* 002E0 80978120 C42887A8 */ lwc1 $f8, %lo(D_809787A8)($at) -/* 002E4 80978124 3C018098 */ lui $at, %hi(D_809787AC) ## $at = 80980000 -/* 002E8 80978128 85AE146A */ lh $t6, 0x146A($t5) ## 0000146A -/* 002EC 8097812C 448E9000 */ mtc1 $t6, $f18 ## $f18 = 0.00 -/* 002F0 80978130 00000000 */ nop -/* 002F4 80978134 46809120 */ cvt.s.w $f4, $f18 -/* 002F8 80978138 46002182 */ mul.s $f6, $f4, $f0 -/* 002FC 8097813C 46083280 */ add.s $f10, $f6, $f8 -/* 00300 80978140 E44A0004 */ swc1 $f10, 0x0004($v0) ## 00000054 -/* 00304 80978144 8C6F0000 */ lw $t7, 0x0000($v1) ## 8015FA90 -/* 00308 80978148 C42687AC */ lwc1 $f6, %lo(D_809787AC)($at) -/* 0030C 8097814C 85F8146C */ lh $t8, 0x146C($t7) ## 0000146C -/* 00310 80978150 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 -/* 00314 80978154 00000000 */ nop -/* 00318 80978158 468084A0 */ cvt.s.w $f18, $f16 -/* 0031C 8097815C 46009102 */ mul.s $f4, $f18, $f0 -/* 00320 80978160 46062200 */ add.s $f8, $f4, $f6 -/* 00324 80978164 03E00008 */ jr $ra -/* 00328 80978168 E4480008 */ swc1 $f8, 0x0008($v0) ## 00000058 -glabel L8097816C -.L8097816C: -/* 0032C 8097816C 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 00330 80978170 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 -/* 00334 80978174 8C790000 */ lw $t9, 0x0000($v1) ## 8015FA90 -/* 00338 80978178 3C018098 */ lui $at, %hi(D_809787B0) ## $at = 80980000 -/* 0033C 8097817C C42087B0 */ lwc1 $f0, %lo(D_809787B0)($at) -/* 00340 80978180 8728146E */ lh $t0, 0x146E($t9) ## 0000146E -/* 00344 80978184 3C018098 */ lui $at, %hi(D_809787B4) ## $at = 80980000 -/* 00348 80978188 C42487B4 */ lwc1 $f4, %lo(D_809787B4)($at) -/* 0034C 8097818C 44885000 */ mtc1 $t0, $f10 ## $f10 = 0.00 -/* 00350 80978190 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 -/* 00354 80978194 3C018098 */ lui $at, %hi(D_809787B8) ## $at = 80980000 -/* 00358 80978198 46805420 */ cvt.s.w $f16, $f10 -/* 0035C 8097819C 46008482 */ mul.s $f18, $f16, $f0 -/* 00360 809781A0 46049180 */ add.s $f6, $f18, $f4 -/* 00364 809781A4 E4460000 */ swc1 $f6, 0x0000($v0) ## 00000050 -/* 00368 809781A8 8C690000 */ lw $t1, 0x0000($v1) ## 8015FA90 -/* 0036C 809781AC C43287B8 */ lwc1 $f18, %lo(D_809787B8)($at) -/* 00370 809781B0 3C018098 */ lui $at, %hi(D_809787BC) ## $at = 80980000 -/* 00374 809781B4 852A1470 */ lh $t2, 0x1470($t1) ## 00001470 -/* 00378 809781B8 448A4000 */ mtc1 $t2, $f8 ## $f8 = 0.00 -/* 0037C 809781BC 00000000 */ nop -/* 00380 809781C0 468042A0 */ cvt.s.w $f10, $f8 -/* 00384 809781C4 46005402 */ mul.s $f16, $f10, $f0 -/* 00388 809781C8 46128100 */ add.s $f4, $f16, $f18 -/* 0038C 809781CC E4440004 */ swc1 $f4, 0x0004($v0) ## 00000054 -/* 00390 809781D0 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 -/* 00394 809781D4 C43087BC */ lwc1 $f16, %lo(D_809787BC)($at) -/* 00398 809781D8 856C1472 */ lh $t4, 0x1472($t3) ## 00001472 -/* 0039C 809781DC 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00 -/* 003A0 809781E0 00000000 */ nop -/* 003A4 809781E4 46803220 */ cvt.s.w $f8, $f6 -/* 003A8 809781E8 46004282 */ mul.s $f10, $f8, $f0 -/* 003AC 809781EC 46105480 */ add.s $f18, $f10, $f16 -/* 003B0 809781F0 E4520008 */ swc1 $f18, 0x0008($v0) ## 00000058 -/* 003B4 809781F4 03E00008 */ jr $ra -/* 003B8 809781F8 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978308.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978308.s deleted file mode 100644 index 50ebfe6a12..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978308.s +++ /dev/null @@ -1,18 +0,0 @@ -glabel func_80978308 -/* 004C8 80978308 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 004CC 8097830C AFBF0014 */ sw $ra, 0x0014($sp) -/* 004D0 80978310 AFA40018 */ sw $a0, 0x0018($sp) -/* 004D4 80978314 0C25E07F */ jal func_809781FC -/* 004D8 80978318 AFA5001C */ sw $a1, 0x001C($sp) -/* 004DC 8097831C 8FA40018 */ lw $a0, 0x0018($sp) -/* 004E0 80978320 0C25E0A8 */ jal func_809782A0 -/* 004E4 80978324 8FA5001C */ lw $a1, 0x001C($sp) -/* 004E8 80978328 8FA40018 */ lw $a0, 0x0018($sp) -/* 004EC 8097832C 0C25E00C */ jal func_80978030 -/* 004F0 80978330 8FA5001C */ lw $a1, 0x001C($sp) -/* 004F4 80978334 8FBF0014 */ lw $ra, 0x0014($sp) -/* 004F8 80978338 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 004FC 8097833C 03E00008 */ jr $ra -/* 00500 80978340 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978344.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978344.s deleted file mode 100644 index 24f6c6256e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978344.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel func_80978344 -/* 00504 80978344 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00508 80978348 AFA40018 */ sw $a0, 0x0018($sp) -/* 0050C 8097834C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00510 80978350 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00514 80978354 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 00518 80978358 0C25DFAA */ jal func_80977EA8 -/* 0051C 8097835C 24A50EA0 */ addiu $a1, $a1, 0x0EA0 ## $a1 = 06000EA0 -/* 00520 80978360 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00524 80978364 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00528 80978368 03E00008 */ jr $ra -/* 0052C 8097836C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s deleted file mode 100644 index f06fb64efe..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s +++ /dev/null @@ -1,60 +0,0 @@ -.rdata - - -glabel D_809786C4 - .asciz "Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n" - .balign 4 - -.text - -glabel func_809783D4 -/* 00594 809783D4 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 00598 809783D8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0059C 809783DC AFA40038 */ sw $a0, 0x0038($sp) -/* 005A0 809783E0 AFA5003C */ sw $a1, 0x003C($sp) -/* 005A4 809783E4 8486001C */ lh $a2, 0x001C($a0) ## 0000001C -/* 005A8 809783E8 8FA4003C */ lw $a0, 0x003C($sp) -/* 005AC 809783EC 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 005B0 809783F0 3C058098 */ lui $a1, %hi(D_80978570) ## $a1 = 80980000 -/* 005B4 809783F4 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4 -/* 005B8 809783F8 00067840 */ sll $t7, $a2, 1 -/* 005BC 809783FC 00AF2821 */ addu $a1, $a1, $t7 -/* 005C0 80978400 00812021 */ addu $a0, $a0, $at -/* 005C4 80978404 84A58570 */ lh $a1, %lo(D_80978570)($a1) -/* 005C8 80978408 AFA4001C */ sw $a0, 0x001C($sp) -/* 005CC 8097840C 0C02604B */ jal Object_GetIndex - ## ObjectIndex -/* 005D0 80978410 AFA6002C */ sw $a2, 0x002C($sp) -/* 005D4 80978414 8FA4001C */ lw $a0, 0x001C($sp) -/* 005D8 80978418 8FA6002C */ lw $a2, 0x002C($sp) -/* 005DC 8097841C 04410009 */ bgez $v0, .L80978444 -/* 005E0 80978420 00403825 */ or $a3, $v0, $zero ## $a3 = 00000000 -/* 005E4 80978424 3C048098 */ lui $a0, %hi(D_809786C4) ## $a0 = 80980000 -/* 005E8 80978428 248486C4 */ addiu $a0, $a0, %lo(D_809786C4) ## $a0 = 809786C4 -/* 005EC 8097842C 0C00084C */ jal osSyncPrintf - -/* 005F0 80978430 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 -/* 005F4 80978434 0C00B55C */ jal Actor_Kill - -/* 005F8 80978438 8FA40038 */ lw $a0, 0x0038($sp) -/* 005FC 8097843C 1000000B */ beq $zero, $zero, .L8097846C -/* 00600 80978440 8FBF0014 */ lw $ra, 0x0014($sp) -.L80978444: -/* 00604 80978444 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 00608 80978448 0C026062 */ jal Object_IsLoaded - -/* 0060C 8097844C AFA70024 */ sw $a3, 0x0024($sp) -/* 00610 80978450 10400005 */ beq $v0, $zero, .L80978468 -/* 00614 80978454 8FA70024 */ lw $a3, 0x0024($sp) -/* 00618 80978458 8FA40038 */ lw $a0, 0x0038($sp) -/* 0061C 8097845C AC870154 */ sw $a3, 0x0154($a0) ## 00000154 -/* 00620 80978460 0C25E0DC */ jal func_80978370 -/* 00624 80978464 8FA5003C */ lw $a1, 0x003C($sp) -.L80978468: -/* 00628 80978468 8FBF0014 */ lw $ra, 0x0014($sp) -.L8097846C: -/* 0062C 8097846C 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 -/* 00630 80978470 03E00008 */ jr $ra -/* 00634 80978474 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809784D4.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809784D4.s deleted file mode 100644 index 6a177148ec..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809784D4.s +++ /dev/null @@ -1,6 +0,0 @@ -glabel func_809784D4 -/* 00694 809784D4 AFA40000 */ sw $a0, 0x0000($sp) -/* 00698 809784D8 03E00008 */ jr $ra -/* 0069C 809784DC AFA50004 */ sw $a1, 0x0004($sp) - - diff --git a/data/overlays/actors/z_demo_geff.data.s b/data/overlays/actors/z_demo_geff.data.s deleted file mode 100644 index 4b1616aec8..0000000000 --- a/data/overlays/actors/z_demo_geff.data.s +++ /dev/null @@ -1,35 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .data - -glabel D_80978570 - .word 0x01860186, 0x01860186, 0x01860186, 0x01860186, 0x01860000 -glabel D_80978584 - .word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -.word func_80978030 -glabel D_809785A8 - .word func_809783D4 -.word func_80978308 -glabel D_809785B0 - .word func_809784D4 -.word func_80978344 -glabel Demo_Geff_InitVars - .word 0x01B20900, 0x00000030, 0x01860000, 0x00000168 -.word DemoGeff_Init -.word DemoGeff_Destroy -.word DemoGeff_Update -.word DemoGeff_Draw -.word 0x00000000, 0x00000000 - diff --git a/diff.py b/diff.py old mode 100644 new mode 100755 diff --git a/spec b/spec index 697c0bb262..3ac5948834 100644 --- a/spec +++ b/spec @@ -1795,7 +1795,6 @@ endseg beginseg name "ovl_Demo_Geff" include "build/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o" - include "build/data/overlays/actors/z_demo_geff.data.o" include "build/data/overlays/actors/z_demo_geff.reloc.o" endseg diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 91d539939a..7aae5c3fbd 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -1,5 +1,7 @@ #include "z_demo_geff.h" +#include + #define ROOM 0x00 #define FLAGS 0x00000030 @@ -8,7 +10,21 @@ void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx); -/* +void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); +void func_80978308(DemoGeff* this, GlobalContext* globalCtx); + +void func_809784D4(DemoGeff* this, GlobalContext* globalCtx); +void func_80978344(DemoGeff* this, GlobalContext* globalCtx); + +void func_80978030(DemoGeff* this, GlobalContext* globalCtx); + +s16 D_80978570[] = { 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0000, }; + +ActorFunc D_80978584[] = { func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, + func_80978030, func_80978030, func_80978030, }; +ActorFunc D_809785A8[] = { func_809783D4, func_80978308, }; +ActorFunc D_809785B0[] = { func_809784D4, func_80978344, }; + const ActorInit Demo_Geff_InitVars = { ACTOR_DEMO_GEFF, @@ -22,33 +38,110 @@ const ActorInit Demo_Geff_InitVars = (ActorFunc)DemoGeff_Update, (ActorFunc)DemoGeff_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Destroy.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Init.s") +extern u32 D_06000EA0; + +void DemoGeff_Destroy(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); + return; + } + this->action = 0; + this->unk_150 = 0; +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s") +/*void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { + GraphicsContext* gfxCtx = &globalCtx->state.gfxCtx; + Gfx* gfxArr[4]; + + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 181); + func_80093D18(globalCtx->state.gfxCtx); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_geff.c", 183), + G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(gfxCtx->polyOpa.p++, dlist); + gSPPopMatrix(gfxCtx->polyOpa.p++, G_MTX_MODELVIEW); + + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 188); +}*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s") #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809780E0.s") - #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s") #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s") +/*void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { + s16 params; + if (this->unk_158 != 0) { + params = this->actor.params; + if ((params != 6) && (params != 7) && (params != 8)) { + this->actor.posRot.pos.x = this->unk_158->posRot.pos.x + this->unk_15C; + this->actor.posRot.pos.y = this->unk_158->posRot.pos.y + this->unk_160; + this->actor.posRot.pos.z = this->unk_158->posRot.pos.z + this->unk_164; + } + } +}*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978308.s") +void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { + func_809781FC(this, globalCtx); + func_809782A0(this, globalCtx); + func_80978030(this, globalCtx); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978344.s") +void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { + func_80977EA8(globalCtx, &D_06000EA0); +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s") +/* +void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { + Actor* thisx = &this->actor; + s32 params = thisx->params; + ActorFunc actorFunc = D_80978584[params]; + if (actorFunc == NULL) { + osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params); + Actor_Kill(thisx); + return; + } + actorFunc(this, globalCtx); +}*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809783D4.s") +void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { + ObjectContext* objCtx = &globalCtx->objectCtx; + Actor* thisx = &this->actor; + s32 params = thisx->params; + s16 objectId = D_80978570[params]; + s32 objBankIndex = Object_GetIndex(objCtx, objectId); + s32 pad; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Update.s") + if (objBankIndex < 0) { + osSyncPrintf(VT_FGCOL(RED) "Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n" VT_RST, params); + Actor_Kill(thisx); + return; + } + if (Object_IsLoaded(objCtx, objBankIndex)) { + this->unk_154 = objBankIndex; + func_80978370(this, globalCtx); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809784D4.s") +void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) { + if (this->action < 0 || this->action >= 2 || D_809785A8[this->action] == NULL) { + osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); + return; + } + D_809785A8[this->action](this, globalCtx); +} + +void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) { + +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s") diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h index 6b8bf972b0..e7e07e8a5f 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h @@ -7,7 +7,13 @@ typedef struct { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x1C]; + /* 0x014C */ s32 action; + /* 0x0150 */ s32 unk_150; + /* 0x0154 */ s32 unk_154; + /* 0x0158 */ Actor* unk_158; + /* 0x015C */ f32 unk_15C; + /* 0x0160 */ f32 unk_160; + /* 0x0164 */ f32 unk_164; } DemoGeff; // size = 0x0168 extern const ActorInit Demo_Geff_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index c2d7779fd5..e9ab48b6eb 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -282,6 +282,9 @@ D_02007020 = 0x02007020; // z_effect_ss_g_splash D_04027DF0 = 0x04027DF0; +// z_demo_geff +D_06000EA0 = 0x06000EA0; + // z_demo_go D_060029A8 = 0x060029A8; D_06004930 = 0x06004930; From 78c14f7fad8c4caa099837167c689f4688941a03 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 20 Mar 2020 02:20:55 -0400 Subject: [PATCH 06/23] More progress --- .../actors/ovl_Demo_Geff/DemoGeff_Draw.s | 52 --------- .../actors/ovl_Demo_Geff/func_809781FC.s | 49 -------- .../actors/ovl_Demo_Geff/z_demo_geff.c | 107 +++++++++++++++--- .../actors/ovl_Demo_Geff/z_demo_geff.h | 2 +- 4 files changed, 91 insertions(+), 119 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s deleted file mode 100644 index 3afafed3d0..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s +++ /dev/null @@ -1,52 +0,0 @@ -.rdata - - -glabel D_80978740 - .asciz "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" - .balign 4 - -.text - -glabel DemoGeff_Draw -/* 006A0 809784E0 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 006A4 809784E4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 006A8 809784E8 AFA5002C */ sw $a1, 0x002C($sp) -/* 006AC 809784EC 8C820150 */ lw $v0, 0x0150($a0) ## 00000150 -/* 006B0 809784F0 0440000B */ bltz $v0, .L80978520 -/* 006B4 809784F4 28410002 */ slti $at, $v0, 0x0002 -/* 006B8 809784F8 10200009 */ beq $at, $zero, .L80978520 -/* 006BC 809784FC 00027080 */ sll $t6, $v0, 2 -/* 006C0 80978500 3C0F8098 */ lui $t7, %hi(D_809785B0) ## $t7 = 80980000 -/* 006C4 80978504 25EF85B0 */ addiu $t7, $t7, %lo(D_809785B0) ## $t7 = 809785B0 -/* 006C8 80978508 01CF1821 */ addu $v1, $t6, $t7 -/* 006CC 8097850C 8C660000 */ lw $a2, 0x0000($v1) ## 00000000 -/* 006D0 80978510 3C188098 */ lui $t8, %hi(D_809785B0) ## $t8 = 80980000 -/* 006D4 80978514 271885B0 */ addiu $t8, $t8, %lo(D_809785B0) ## $t8 = 809785B0 -/* 006D8 80978518 14C00006 */ bne $a2, $zero, .L80978534 -/* 006DC 8097851C 00000000 */ nop -.L80978520: -/* 006E0 80978520 3C048098 */ lui $a0, %hi(D_80978740) ## $a0 = 80980000 -/* 006E4 80978524 0C00084C */ jal osSyncPrintf - -/* 006E8 80978528 24848740 */ addiu $a0, $a0, %lo(D_80978740) ## $a0 = 80978740 -/* 006EC 8097852C 1000000C */ beq $zero, $zero, .L80978560 -/* 006F0 80978530 8FBF0014 */ lw $ra, 0x0014($sp) -.L80978534: -/* 006F4 80978534 10780007 */ beq $v1, $t8, .L80978554 -/* 006F8 80978538 8FA5002C */ lw $a1, 0x002C($sp) -/* 006FC 8097853C AFA3001C */ sw $v1, 0x001C($sp) -/* 00700 80978540 0C25DFE0 */ jal func_80977F80 -/* 00704 80978544 AFA40028 */ sw $a0, 0x0028($sp) -/* 00708 80978548 8FA3001C */ lw $v1, 0x001C($sp) -/* 0070C 8097854C 8FA40028 */ lw $a0, 0x0028($sp) -/* 00710 80978550 8C660000 */ lw $a2, 0x0000($v1) ## 00000000 -.L80978554: -/* 00714 80978554 00C0F809 */ jalr $ra, $a2 -/* 00718 80978558 8FA5002C */ lw $a1, 0x002C($sp) -/* 0071C 8097855C 8FBF0014 */ lw $ra, 0x0014($sp) -.L80978560: -/* 00720 80978560 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00724 80978564 03E00008 */ jr $ra -/* 00728 80978568 00000000 */ nop -/* 0072C 8097856C 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s deleted file mode 100644 index 7a38c1bb10..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s +++ /dev/null @@ -1,49 +0,0 @@ -glabel func_809781FC -/* 003BC 809781FC 8C8E0158 */ lw $t6, 0x0158($a0) ## 00000158 -/* 003C0 80978200 15C00025 */ bne $t6, $zero, .L80978298 -/* 003C4 80978204 00000000 */ nop -/* 003C8 80978208 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 003CC 8097820C 8CA31C64 */ lw $v1, 0x1C64($a1) ## 00001C64 -/* 003D0 80978210 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 003D4 80978214 10400007 */ beq $v0, $zero, .L80978234 -/* 003D8 80978218 24050174 */ addiu $a1, $zero, 0x0174 ## $a1 = 00000174 -/* 003DC 8097821C 10410005 */ beq $v0, $at, .L80978234 -/* 003E0 80978220 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 003E4 80978224 50410004 */ beql $v0, $at, .L80978238 -/* 003E8 80978228 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 003EC 8097822C 10000002 */ beq $zero, $zero, .L80978238 -/* 003F0 80978230 24020002 */ addiu $v0, $zero, 0x0002 ## $v0 = 00000002 -.L80978234: -/* 003F4 80978234 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80978238: -/* 003F8 80978238 10600017 */ beq $v1, $zero, .L80978298 -/* 003FC 8097823C 00000000 */ nop -/* 00400 80978240 846F0000 */ lh $t7, 0x0000($v1) ## 00000000 -.L80978244: -/* 00404 80978244 54AF0012 */ bnel $a1, $t7, .L80978290 -/* 00408 80978248 8C630124 */ lw $v1, 0x0124($v1) ## 00000124 -/* 0040C 8097824C 8478001C */ lh $t8, 0x001C($v1) ## 0000001C -/* 00410 80978250 5458000F */ bnel $v0, $t8, .L80978290 -/* 00414 80978254 8C630124 */ lw $v1, 0x0124($v1) ## 00000124 -/* 00418 80978258 C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024 -/* 0041C 8097825C C4660024 */ lwc1 $f6, 0x0024($v1) ## 00000024 -/* 00420 80978260 C48A0028 */ lwc1 $f10, 0x0028($a0) ## 00000028 -/* 00424 80978264 46062201 */ sub.s $f8, $f4, $f6 -/* 00428 80978268 C484002C */ lwc1 $f4, 0x002C($a0) ## 0000002C -/* 0042C 8097826C E488015C */ swc1 $f8, 0x015C($a0) ## 0000015C -/* 00430 80978270 C4700028 */ lwc1 $f16, 0x0028($v1) ## 00000028 -/* 00434 80978274 46105481 */ sub.s $f18, $f10, $f16 -/* 00438 80978278 E4920160 */ swc1 $f18, 0x0160($a0) ## 00000160 -/* 0043C 8097827C C466002C */ lwc1 $f6, 0x002C($v1) ## 0000002C -/* 00440 80978280 AC830158 */ sw $v1, 0x0158($a0) ## 00000158 -/* 00444 80978284 46062201 */ sub.s $f8, $f4, $f6 -/* 00448 80978288 E4880164 */ swc1 $f8, 0x0164($a0) ## 00000164 -/* 0044C 8097828C 8C630124 */ lw $v1, 0x0124($v1) ## 00000124 -.L80978290: -/* 00450 80978290 5460FFEC */ bnel $v1, $zero, .L80978244 -/* 00454 80978294 846F0000 */ lh $t7, 0x0000($v1) ## 00000000 -.L80978298: -/* 00458 80978298 03E00008 */ jr $ra -/* 0045C 8097829C 00000000 */ nop - - diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 7aae5c3fbd..828bcd08ae 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -10,20 +10,21 @@ void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx); +void func_80978030(DemoGeff* this, GlobalContext* globalCtx); + void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); void func_80978308(DemoGeff* this, GlobalContext* globalCtx); void func_809784D4(DemoGeff* this, GlobalContext* globalCtx); void func_80978344(DemoGeff* this, GlobalContext* globalCtx); -void func_80978030(DemoGeff* this, GlobalContext* globalCtx); - -s16 D_80978570[] = { 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0000, }; +s16 objectIds[] = { OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, OBJECT_GEFF, + OBJECT_GEFF, OBJECT_GEFF, OBJECT_UNSET_0, }; ActorFunc D_80978584[] = { func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, }; -ActorFunc D_809785A8[] = { func_809783D4, func_80978308, }; -ActorFunc D_809785B0[] = { func_809784D4, func_80978344, }; +ActorFunc actionFuncs[] = { func_809783D4, func_80978308, }; +ActorFunc drawFuncs[] = { func_809784D4, func_80978344, }; const ActorInit Demo_Geff_InitVars = { @@ -39,7 +40,7 @@ const ActorInit Demo_Geff_InitVars = (ActorFunc)DemoGeff_Draw, }; -extern u32 D_06000EA0; +extern UNK_TYPE D_06000EA0; void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx) { @@ -52,7 +53,7 @@ void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { return; } this->action = 0; - this->unk_150 = 0; + this->drawConfig = 0; } #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s") @@ -71,10 +72,73 @@ void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { }*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s") +/*void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + Gfx* gfxArr[4]; + + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 204); + + temp_a0 = (arg1 + (this->unk_154 * 0x44)) + 0x10000; + + gSPSegment(gfxCtx->polyOpa.p++, 0x06, temp_a0->unk17B4), + + *(void *)0x80166FC0 = (s32) (temp_a0->unk17B4 + 0x80000000); + + func_800C6B54(gfxArr, &globalCtx->state.gfxCtx, "../z_demo_geff.c", 212); +}*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s") +/*void func_80978030(DemoGeff* this, GlobalContext* globalCtx) { + Vec3f* thisScale = &this->actor.scale; + this->action = 1; + this->drawConfig = 1; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809781FC.s") + switch ((u16)this->actor.params) { + default: + thisScale->x = ((f32) kREG(7) * 0.01f) + 0.3f; + thisScale->y = ((f32) kREG(8) * 0.01f) + 0.3f; + thisScale->z = ((f32) kREG(9) * 0.01f) + 0.3f; + break; + case 8: + break; + case 1: + case 4: + case 7: + thisScale->x = ((f32) kREG(10) * 0.01f) + 0.15f; + thisScale->y = ((f32) kREG(11) * 0.01f) + 0.29f; + thisScale->z = ((f32) kREG(12) * 0.01f) + 0.12f; + break; + case 2: + case 5: + thisScale->x = ((f32) kREG(13) * 0.01f) + 0.1f; + thisScale->y = ((f32) kREG(14) * 0.01f) + 0.15f; + thisScale->z = ((f32) kREG(15) * 0.01f) + 0.2f; + break; + } +}*/ + +void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { + s32 targetParams = 2; + Actor* demoGt; + + if (this->unk_158 == 0) { + demoGt = globalCtx->actorCtx.actorList[ACTORTYPE_PROP].first; + if ((this->actor.params != 0) && (this->actor.params != 1) && (this->actor.params != 2)) { + targetParams = 2; + } else { + targetParams = 1; + } + while (demoGt != 0) { + if (demoGt->id == ACTOR_DEMO_GT && demoGt->params == targetParams) { + this->unk_15C = (this->actor.posRot.pos.x - demoGt->posRot.pos.x); + this->unk_160 = (this->actor.posRot.pos.y - demoGt->posRot.pos.y); + this->unk_164 = (this->actor.posRot.pos.z - demoGt->posRot.pos.z); + this->unk_158 = demoGt; + } + demoGt = demoGt->next; + } + } +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s") /*void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { @@ -100,13 +164,11 @@ void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { } #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s") -/* -void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { +/*void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { Actor* thisx = &this->actor; - s32 params = thisx->params; - ActorFunc actorFunc = D_80978584[params]; + ActorFunc actorFunc = D_80978584[thisx->params]; if (actorFunc == NULL) { - osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params); + osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, thisx->params); Actor_Kill(thisx); return; } @@ -117,7 +179,7 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { ObjectContext* objCtx = &globalCtx->objectCtx; Actor* thisx = &this->actor; s32 params = thisx->params; - s16 objectId = D_80978570[params]; + s16 objectId = objectIds[params]; s32 objBankIndex = Object_GetIndex(objCtx, objectId); s32 pad; @@ -133,15 +195,26 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { } void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) { - if (this->action < 0 || this->action >= 2 || D_809785A8[this->action] == NULL) { + if (this->action < 0 || this->action >= 2 || actionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); return; } - D_809785A8[this->action](this, globalCtx); + actionFuncs[this->action](this, globalCtx); } void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) { } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/DemoGeff_Draw.s") +void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx) { + s32 drawConfig = this->drawConfig; + s16 pad; + if (drawConfig < 0 || drawConfig >= 2 || drawFuncs[drawConfig] == NULL) { + osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); + return; + } + if (drawConfig != 0) { + func_80977F80(this, globalCtx); + } + drawFuncs[drawConfig](this, globalCtx); +} diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h index e7e07e8a5f..cbe4527bff 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h @@ -8,7 +8,7 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ s32 action; - /* 0x0150 */ s32 unk_150; + /* 0x0150 */ s32 drawConfig; /* 0x0154 */ s32 unk_154; /* 0x0158 */ Actor* unk_158; /* 0x015C */ f32 unk_15C; From f3b509eb68a3563b48d4cc2226e93a213d6bf427 Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 20 Mar 2020 08:04:35 -0400 Subject: [PATCH 07/23] en_dog OK --- .../actors/ovl_En_Dog/EnDog_Destroy.s | 14 - .../overlays/actors/ovl_En_Dog/EnDog_Draw.s | 80 --- .../overlays/actors/ovl_En_Dog/EnDog_Init.s | 169 ------- .../overlays/actors/ovl_En_Dog/EnDog_Update.s | 57 --- .../actors/ovl_En_Dog/func_809FAFD0.s | 33 -- .../actors/ovl_En_Dog/func_809FB038.s | 33 -- .../actors/ovl_En_Dog/func_809FB0A0.s | 33 -- .../actors/ovl_En_Dog/func_809FB108.s | 122 ----- .../actors/ovl_En_Dog/func_809FB29C.s | 42 -- .../actors/ovl_En_Dog/func_809FB320.s | 44 -- .../actors/ovl_En_Dog/func_809FB3AC.s | 46 -- .../actors/ovl_En_Dog/func_809FB6C4.s | 114 ----- .../actors/ovl_En_Dog/func_809FB858.s | 70 --- .../actors/ovl_En_Dog/func_809FB940.s | 110 ---- .../actors/ovl_En_Dog/func_809FBABC.s | 49 -- .../actors/ovl_En_Dog/func_809FBB64.s | 74 --- .../actors/ovl_En_Dog/func_809FBC6C.s | 26 - .../actors/ovl_En_Dog/func_809FBD8C.s | 9 - .../actors/ovl_En_Dog/func_809FBDA4.s | 8 - data/overlays/actors/z_en_dog.data.s | 28 -- data/overlays/actors/z_en_dog.reloc.s | 11 - data/overlays/actors/z_en_dog.rodata.s | 33 -- include/functions.h | 2 + include/z64.h | 26 +- include/z64scene.h | 6 + spec | 4 +- src/code/z_actor.c | 13 +- src/code/z_common_data.c | 2 +- src/code/z_parameter.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 469 +++++++++++++----- src/overlays/actors/ovl_En_Dog/z_en_dog.h | 22 +- undefined_syms.txt | 5 +- 32 files changed, 373 insertions(+), 1383 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB29C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB858.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB940.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBABC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBB64.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBC6C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s delete mode 100644 data/overlays/actors/z_en_dog.data.s delete mode 100644 data/overlays/actors/z_en_dog.reloc.s delete mode 100644 data/overlays/actors/z_en_dog.rodata.s diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Destroy.s deleted file mode 100644 index 410b49f92e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel EnDog_Destroy -/* 006CC 809FB69C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 006D0 809FB6A0 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 006D4 809FB6A4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 006D8 809FB6A8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 006DC 809FB6AC 0C0170EB */ jal ActorCollider_FreeCylinder - -/* 006E0 809FB6B0 24C50194 */ addiu $a1, $a2, 0x0194 ## $a1 = 00000194 -/* 006E4 809FB6B4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006E8 809FB6B8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 006EC 809FB6BC 03E00008 */ jr $ra -/* 006F0 809FB6C0 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s deleted file mode 100644 index dd247f6f87..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s +++ /dev/null @@ -1,80 +0,0 @@ -glabel EnDog_Draw -/* 00DE8 809FBDB8 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0 -/* 00DEC 809FBDBC 3C0F80A0 */ lui $t7, %hi(D_809FC020) ## $t7 = 80A00000 -/* 00DF0 809FBDC0 AFBF002C */ sw $ra, 0x002C($sp) -/* 00DF4 809FBDC4 AFB00028 */ sw $s0, 0x0028($sp) -/* 00DF8 809FBDC8 AFA50064 */ sw $a1, 0x0064($sp) -/* 00DFC 809FBDCC 25EFC020 */ addiu $t7, $t7, %lo(D_809FC020) ## $t7 = 809FC020 -/* 00E00 809FBDD0 8DF90000 */ lw $t9, 0x0000($t7) ## 809FC020 -/* 00E04 809FBDD4 8DF80004 */ lw $t8, 0x0004($t7) ## 809FC024 -/* 00E08 809FBDD8 27AE0054 */ addiu $t6, $sp, 0x0054 ## $t6 = FFFFFFF4 -/* 00E0C 809FBDDC ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF4 -/* 00E10 809FBDE0 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF8 -/* 00E14 809FBDE4 8FA90064 */ lw $t1, 0x0064($sp) -/* 00E18 809FBDE8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00E1C 809FBDEC 3C0680A0 */ lui $a2, %hi(D_809FC030) ## $a2 = 80A00000 -/* 00E20 809FBDF0 8D250000 */ lw $a1, 0x0000($t1) ## 00000000 -/* 00E24 809FBDF4 24C6C030 */ addiu $a2, $a2, %lo(D_809FC030) ## $a2 = 809FC030 -/* 00E28 809FBDF8 27A40040 */ addiu $a0, $sp, 0x0040 ## $a0 = FFFFFFE0 -/* 00E2C 809FBDFC 240703CC */ addiu $a3, $zero, 0x03CC ## $a3 = 000003CC -/* 00E30 809FBE00 0C031AB1 */ jal func_800C6AC4 -/* 00E34 809FBE04 AFA50050 */ sw $a1, 0x0050($sp) -/* 00E38 809FBE08 8FAA0064 */ lw $t2, 0x0064($sp) -/* 00E3C 809FBE0C 0C024F46 */ jal func_80093D18 -/* 00E40 809FBE10 8D440000 */ lw $a0, 0x0000($t2) ## 00000000 -/* 00E44 809FBE14 8FA80050 */ lw $t0, 0x0050($sp) -/* 00E48 809FBE18 3C0CE700 */ lui $t4, 0xE700 ## $t4 = E7000000 -/* 00E4C 809FBE1C 3C0EFB00 */ lui $t6, 0xFB00 ## $t6 = FB000000 -/* 00E50 809FBE20 8D0302C0 */ lw $v1, 0x02C0($t0) ## 000002C0 -/* 00E54 809FBE24 27A90054 */ addiu $t1, $sp, 0x0054 ## $t1 = FFFFFFF4 -/* 00E58 809FBE28 246B0008 */ addiu $t3, $v1, 0x0008 ## $t3 = 00000008 -/* 00E5C 809FBE2C AD0B02C0 */ sw $t3, 0x02C0($t0) ## 000002C0 -/* 00E60 809FBE30 AC600004 */ sw $zero, 0x0004($v1) ## 00000004 -/* 00E64 809FBE34 AC6C0000 */ sw $t4, 0x0000($v1) ## 00000000 -/* 00E68 809FBE38 8D0302C0 */ lw $v1, 0x02C0($t0) ## 000002C0 -/* 00E6C 809FBE3C 246D0008 */ addiu $t5, $v1, 0x0008 ## $t5 = 00000008 -/* 00E70 809FBE40 AD0D02C0 */ sw $t5, 0x02C0($t0) ## 000002C0 -/* 00E74 809FBE44 AC6E0000 */ sw $t6, 0x0000($v1) ## 00000000 -/* 00E78 809FBE48 860F001C */ lh $t7, 0x001C($s0) ## 0000001C -/* 00E7C 809FBE4C 31F8000F */ andi $t8, $t7, 0x000F ## $t8 = 00000000 -/* 00E80 809FBE50 0018C880 */ sll $t9, $t8, 2 -/* 00E84 809FBE54 03291021 */ addu $v0, $t9, $t1 -/* 00E88 809FBE58 904D0000 */ lbu $t5, 0x0000($v0) ## 00000000 -/* 00E8C 809FBE5C 904B0003 */ lbu $t3, 0x0003($v0) ## 00000003 -/* 00E90 809FBE60 90590001 */ lbu $t9, 0x0001($v0) ## 00000001 -/* 00E94 809FBE64 000D7600 */ sll $t6, $t5, 24 -/* 00E98 809FBE68 904D0002 */ lbu $t5, 0x0002($v0) ## 00000002 -/* 00E9C 809FBE6C 016E7825 */ or $t7, $t3, $t6 ## $t7 = FB000008 -/* 00EA0 809FBE70 00194C00 */ sll $t1, $t9, 16 -/* 00EA4 809FBE74 01E95025 */ or $t2, $t7, $t1 ## $t2 = FFFFFFFC -/* 00EA8 809FBE78 000D5A00 */ sll $t3, $t5, 8 -/* 00EAC 809FBE7C 014B7025 */ or $t6, $t2, $t3 ## $t6 = FFFFFFFC -/* 00EB0 809FBE80 AC6E0004 */ sw $t6, 0x0004($v1) ## 00000004 -/* 00EB4 809FBE84 9207014E */ lbu $a3, 0x014E($s0) ## 0000014E -/* 00EB8 809FBE88 8E06016C */ lw $a2, 0x016C($s0) ## 0000016C -/* 00EBC 809FBE8C 8E050150 */ lw $a1, 0x0150($s0) ## 00000150 -/* 00EC0 809FBE90 3C1980A0 */ lui $t9, %hi(func_809FBDA4) ## $t9 = 80A00000 -/* 00EC4 809FBE94 3C1880A0 */ lui $t8, %hi(func_809FBD8C) ## $t8 = 80A00000 -/* 00EC8 809FBE98 2718BD8C */ addiu $t8, $t8, %lo(func_809FBD8C) ## $t8 = 809FBD8C -/* 00ECC 809FBE9C 2739BDA4 */ addiu $t9, $t9, %lo(func_809FBDA4) ## $t9 = 809FBDA4 -/* 00ED0 809FBEA0 AFB90014 */ sw $t9, 0x0014($sp) -/* 00ED4 809FBEA4 AFB80010 */ sw $t8, 0x0010($sp) -/* 00ED8 809FBEA8 AFB00018 */ sw $s0, 0x0018($sp) -/* 00EDC 809FBEAC 0C0286B2 */ jal func_800A1AC8 -/* 00EE0 809FBEB0 8FA40064 */ lw $a0, 0x0064($sp) -/* 00EE4 809FBEB4 8FAF0064 */ lw $t7, 0x0064($sp) -/* 00EE8 809FBEB8 3C0680A0 */ lui $a2, %hi(D_809FC040) ## $a2 = 80A00000 -/* 00EEC 809FBEBC 24C6C040 */ addiu $a2, $a2, %lo(D_809FC040) ## $a2 = 809FC040 -/* 00EF0 809FBEC0 27A40040 */ addiu $a0, $sp, 0x0040 ## $a0 = FFFFFFE0 -/* 00EF4 809FBEC4 240703E2 */ addiu $a3, $zero, 0x03E2 ## $a3 = 000003E2 -/* 00EF8 809FBEC8 0C031AD5 */ jal func_800C6B54 -/* 00EFC 809FBECC 8DE50000 */ lw $a1, 0x0000($t7) ## 00000000 -/* 00F00 809FBED0 8FBF002C */ lw $ra, 0x002C($sp) -/* 00F04 809FBED4 8FB00028 */ lw $s0, 0x0028($sp) -/* 00F08 809FBED8 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000 -/* 00F0C 809FBEDC 03E00008 */ jr $ra -/* 00F10 809FBEE0 00000000 */ nop -/* 00F14 809FBEE4 00000000 */ nop -/* 00F18 809FBEE8 00000000 */ nop -/* 00F1C 809FBEEC 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Init.s deleted file mode 100644 index 55ec87bf00..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Init.s +++ /dev/null @@ -1,169 +0,0 @@ -glabel EnDog_Init -/* 0047C 809FB44C 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 00480 809FB450 AFB00028 */ sw $s0, 0x0028($sp) -/* 00484 809FB454 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00488 809FB458 AFBF002C */ sw $ra, 0x002C($sp) -/* 0048C 809FB45C AFA5004C */ sw $a1, 0x004C($sp) -/* 00490 809FB460 3C068003 */ lui $a2, 0x8003 ## $a2 = 80030000 -/* 00494 809FB464 24C6B5EC */ addiu $a2, $a2, 0xB5EC ## $a2 = 8002B5EC -/* 00498 809FB468 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 0049C 809FB46C 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4 -/* 004A0 809FB470 0C00AC78 */ jal ActorShape_Init - -/* 004A4 809FB474 3C0741C0 */ lui $a3, 0x41C0 ## $a3 = 41C00000 -/* 004A8 809FB478 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C -/* 004AC 809FB47C 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000 -/* 004B0 809FB480 260E01F4 */ addiu $t6, $s0, 0x01F4 ## $t6 = 000001F4 -/* 004B4 809FB484 260F0242 */ addiu $t7, $s0, 0x0242 ## $t7 = 00000242 -/* 004B8 809FB488 2418000D */ addiu $t8, $zero, 0x000D ## $t8 = 0000000D -/* 004BC 809FB48C AFB80018 */ sw $t8, 0x0018($sp) -/* 004C0 809FB490 AFAF0014 */ sw $t7, 0x0014($sp) -/* 004C4 809FB494 AFAE0010 */ sw $t6, 0x0010($sp) -/* 004C8 809FB498 24C67290 */ addiu $a2, $a2, 0x7290 ## $a2 = 06007290 -/* 004CC 809FB49C AFA50034 */ sw $a1, 0x0034($sp) -/* 004D0 809FB4A0 8FA4004C */ lw $a0, 0x004C($sp) -/* 004D4 809FB4A4 0C0291BE */ jal func_800A46F8 -/* 004D8 809FB4A8 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 004DC 809FB4AC 3C0580A0 */ lui $a1, %hi(D_809FBF48) ## $a1 = 80A00000 -/* 004E0 809FB4B0 24A5BF48 */ addiu $a1, $a1, %lo(D_809FBF48) ## $a1 = 809FBF48 -/* 004E4 809FB4B4 8FA40034 */ lw $a0, 0x0034($sp) -/* 004E8 809FB4B8 0C00D3B0 */ jal func_80034EC0 -/* 004EC 809FB4BC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 004F0 809FB4C0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 004F4 809FB4C4 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 004F8 809FB4C8 26050194 */ addiu $a1, $s0, 0x0194 ## $a1 = 00000194 -/* 004FC 809FB4CC 30598000 */ andi $t9, $v0, 0x8000 ## $t9 = 00000000 -/* 00500 809FB4D0 17200008 */ bne $t9, $zero, .L809FB4F4 -/* 00504 809FB4D4 3048F0FF */ andi $t0, $v0, 0xF0FF ## $t0 = 00000000 -/* 00508 809FB4D8 30490F00 */ andi $t1, $v0, 0x0F00 ## $t1 = 00000000 -/* 0050C 809FB4DC 00095203 */ sra $t2, $t1, 8 -/* 00510 809FB4E0 254B0001 */ addiu $t3, $t2, 0x0001 ## $t3 = 00000001 -/* 00514 809FB4E4 000B6200 */ sll $t4, $t3, 8 -/* 00518 809FB4E8 010C6825 */ or $t5, $t0, $t4 ## $t5 = 00000000 -/* 0051C 809FB4EC A60D001C */ sh $t5, 0x001C($s0) ## 0000001C -/* 00520 809FB4F0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L809FB4F4: -/* 00524 809FB4F4 8463FA24 */ lh $v1, -0x05DC($v1) ## 8015FA24 -/* 00528 809FB4F8 304E0F00 */ andi $t6, $v0, 0x0F00 ## $t6 = 00000000 -/* 0052C 809FB4FC 000E7A03 */ sra $t7, $t6, 8 -/* 00530 809FB500 30630F00 */ andi $v1, $v1, 0x0F00 ## $v1 = 00000000 -/* 00534 809FB504 00031A03 */ sra $v1, $v1, 8 -/* 00538 809FB508 00031C00 */ sll $v1, $v1, 16 -/* 0053C 809FB50C 00031C03 */ sra $v1, $v1, 16 -/* 00540 809FB510 146F0007 */ bne $v1, $t7, .L809FB530 -/* 00544 809FB514 30588000 */ andi $t8, $v0, 0x8000 ## $t8 = 00000000 -/* 00548 809FB518 57000006 */ bnel $t8, $zero, .L809FB534 -/* 0054C 809FB51C 8FA4004C */ lw $a0, 0x004C($sp) -/* 00550 809FB520 0C00B55C */ jal Actor_Kill - -/* 00554 809FB524 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00558 809FB528 10000058 */ beq $zero, $zero, .L809FB68C -/* 0055C 809FB52C 8FBF002C */ lw $ra, 0x002C($sp) -.L809FB530: -/* 00560 809FB530 8FA4004C */ lw $a0, 0x004C($sp) -.L809FB534: -/* 00564 809FB534 0C0170D9 */ jal ActorCollider_AllocCylinder - -/* 00568 809FB538 AFA50034 */ sw $a1, 0x0034($sp) -/* 0056C 809FB53C 3C0780A0 */ lui $a3, %hi(D_809FBF10) ## $a3 = 80A00000 -/* 00570 809FB540 8FA50034 */ lw $a1, 0x0034($sp) -/* 00574 809FB544 24E7BF10 */ addiu $a3, $a3, %lo(D_809FBF10) ## $a3 = 809FBF10 -/* 00578 809FB548 8FA4004C */ lw $a0, 0x004C($sp) -/* 0057C 809FB54C 0C01712B */ jal ActorCollider_InitCylinder - -/* 00580 809FB550 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00584 809FB554 3C0680A0 */ lui $a2, %hi(D_809FBF3C) ## $a2 = 80A00000 -/* 00588 809FB558 24C6BF3C */ addiu $a2, $a2, %lo(D_809FBF3C) ## $a2 = 809FBF3C -/* 0058C 809FB55C 26040098 */ addiu $a0, $s0, 0x0098 ## $a0 = 00000098 -/* 00590 809FB560 0C0187BF */ jal func_80061EFC -/* 00594 809FB564 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00598 809FB568 3C053BF5 */ lui $a1, 0x3BF5 ## $a1 = 3BF50000 -/* 0059C 809FB56C 34A5C28F */ ori $a1, $a1, 0xC28F ## $a1 = 3BF5C28F -/* 005A0 809FB570 0C00B58B */ jal Actor_SetScale - -/* 005A4 809FB574 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005A8 809FB578 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 005AC 809FB57C 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 005B0 809FB580 44812000 */ mtc1 $at, $f4 ## $f4 = -1.00 -/* 005B4 809FB584 30A500F0 */ andi $a1, $a1, 0x00F0 ## $a1 = 00000000 -/* 005B8 809FB588 00052903 */ sra $a1, $a1, 4 -/* 005BC 809FB58C A60001E6 */ sh $zero, 0x01E6($s0) ## 000001E6 -/* 005C0 809FB590 00052C00 */ sll $a1, $a1, 16 -/* 005C4 809FB594 E604006C */ swc1 $f4, 0x006C($s0) ## 0000006C -/* 005C8 809FB598 8FA4004C */ lw $a0, 0x004C($sp) -/* 005CC 809FB59C 00052C03 */ sra $a1, $a1, 16 -/* 005D0 809FB5A0 0C023938 */ jal func_8008E4E0 -/* 005D4 809FB5A4 2406000F */ addiu $a2, $zero, 0x000F ## $a2 = 0000000F -/* 005D8 809FB5A8 AE0201E0 */ sw $v0, 0x01E0($s0) ## 000001E0 -/* 005DC 809FB5AC 8FB9004C */ lw $t9, 0x004C($sp) -/* 005E0 809FB5B0 24010021 */ addiu $at, $zero, 0x0021 ## $at = 00000021 -/* 005E4 809FB5B4 3C098016 */ lui $t1, 0x8016 ## $t1 = 80160000 -/* 005E8 809FB5B8 872300A4 */ lh $v1, 0x00A4($t9) ## 000000A4 -/* 005EC 809FB5BC 10610006 */ beq $v1, $at, .L809FB5D8 -/* 005F0 809FB5C0 24010035 */ addiu $at, $zero, 0x0035 ## $at = 00000035 -/* 005F4 809FB5C4 50610013 */ beql $v1, $at, .L809FB614 -/* 005F8 809FB5C8 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 005FC 809FB5CC 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 00600 809FB5D0 10000022 */ beq $zero, $zero, .L809FB65C -/* 00604 809FB5D4 30428000 */ andi $v0, $v0, 0x8000 ## $v0 = 00000000 -.L809FB5D8: -/* 00608 809FB5D8 9129FA7C */ lbu $t1, -0x0584($t1) ## 8015FA7C -/* 0060C 809FB5DC 5520000A */ bnel $t1, $zero, .L809FB608 -/* 00610 809FB5E0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 00614 809FB5E4 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 00618 809FB5E8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0061C 809FB5EC 314B0F00 */ andi $t3, $t2, 0x0F00 ## $t3 = 00000000 -/* 00620 809FB5F0 000B4203 */ sra $t0, $t3, 8 -/* 00624 809FB5F4 55010004 */ bnel $t0, $at, .L809FB608 -/* 00628 809FB5F8 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 0062C 809FB5FC 0C00B55C */ jal Actor_Kill - -/* 00630 809FB600 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00634 809FB604 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L809FB608: -/* 00638 809FB608 10000014 */ beq $zero, $zero, .L809FB65C -/* 0063C 809FB60C 30428000 */ andi $v0, $v0, 0x8000 ## $v0 = 00000000 -/* 00640 809FB610 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L809FB614: -/* 00644 809FB614 3C0C8016 */ lui $t4, 0x8016 ## $t4 = 80160000 -/* 00648 809FB618 30428000 */ andi $v0, $v0, 0x8000 ## $v0 = 00000000 -/* 0064C 809FB61C 1440000F */ bne $v0, $zero, .L809FB65C -/* 00650 809FB620 00000000 */ nop -/* 00654 809FB624 918CFA7C */ lbu $t4, -0x0584($t4) ## 8015FA7C -/* 00658 809FB628 3C0E80A0 */ lui $t6, %hi(func_809FBC6C) ## $t6 = 80A00000 -/* 0065C 809FB62C 240D0003 */ addiu $t5, $zero, 0x0003 ## $t5 = 00000003 -/* 00660 809FB630 15800006 */ bne $t4, $zero, .L809FB64C -/* 00664 809FB634 25CEBC6C */ addiu $t6, $t6, %lo(func_809FBC6C) ## $t6 = 809FBC6C -/* 00668 809FB638 44803000 */ mtc1 $zero, $f6 ## $f6 = 0.00 -/* 0066C 809FB63C A60D01F0 */ sh $t5, 0x01F0($s0) ## 000001F0 -/* 00670 809FB640 AE0E0190 */ sw $t6, 0x0190($s0) ## 00000190 -/* 00674 809FB644 10000010 */ beq $zero, $zero, .L809FB688 -/* 00678 809FB648 E6060068 */ swc1 $f6, 0x0068($s0) ## 00000068 -.L809FB64C: -/* 0067C 809FB64C 0C00B55C */ jal Actor_Kill - -/* 00680 809FB650 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00684 809FB654 1000000D */ beq $zero, $zero, .L809FB68C -/* 00688 809FB658 8FBF002C */ lw $ra, 0x002C($sp) -.L809FB65C: -/* 0068C 809FB65C 10400006 */ beq $v0, $zero, .L809FB678 -/* 00690 809FB660 24180003 */ addiu $t8, $zero, 0x0003 ## $t8 = 00000003 -/* 00694 809FB664 3C0F80A0 */ lui $t7, %hi(func_809FB940) ## $t7 = 80A00000 -/* 00698 809FB668 25EFB940 */ addiu $t7, $t7, %lo(func_809FB940) ## $t7 = 809FB940 -/* 0069C 809FB66C A60001F0 */ sh $zero, 0x01F0($s0) ## 000001F0 -/* 006A0 809FB670 10000005 */ beq $zero, $zero, .L809FB688 -/* 006A4 809FB674 AE0F0190 */ sw $t7, 0x0190($s0) ## 00000190 -.L809FB678: -/* 006A8 809FB678 3C1980A0 */ lui $t9, %hi(func_809FB858) ## $t9 = 80A00000 -/* 006AC 809FB67C 2739B858 */ addiu $t9, $t9, %lo(func_809FB858) ## $t9 = 809FB858 -/* 006B0 809FB680 A61801F0 */ sh $t8, 0x01F0($s0) ## 000001F0 -/* 006B4 809FB684 AE190190 */ sw $t9, 0x0190($s0) ## 00000190 -.L809FB688: -/* 006B8 809FB688 8FBF002C */ lw $ra, 0x002C($sp) -.L809FB68C: -/* 006BC 809FB68C 8FB00028 */ lw $s0, 0x0028($sp) -/* 006C0 809FB690 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 006C4 809FB694 03E00008 */ jr $ra -/* 006C8 809FB698 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Update.s deleted file mode 100644 index 4d107716d6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Update.s +++ /dev/null @@ -1,57 +0,0 @@ -glabel EnDog_Update -/* 00CF4 809FBCC4 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 00CF8 809FBCC8 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00CFC 809FBCCC AFB00020 */ sw $s0, 0x0020($sp) -/* 00D00 809FBCD0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00D04 809FBCD4 0C27EC42 */ jal func_809FB108 -/* 00D08 809FBCD8 AFA5003C */ sw $a1, 0x003C($sp) -/* 00D0C 809FBCDC 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 00D10 809FBCE0 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 00D14 809FBCE4 860F01D6 */ lh $t7, 0x01D6($s0) ## 000001D6 -/* 00D18 809FBCE8 860E01D4 */ lh $t6, 0x01D4($s0) ## 000001D4 -/* 00D1C 809FBCEC 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00D20 809FBCF0 448F3000 */ mtc1 $t7, $f6 ## $f6 = 0.00 -/* 00D24 809FBCF4 44815000 */ mtc1 $at, $f10 ## $f10 = 0.50 -/* 00D28 809FBCF8 448E2000 */ mtc1 $t6, $f4 ## $f4 = 0.00 -/* 00D2C 809FBCFC 46803220 */ cvt.s.w $f8, $f6 -/* 00D30 809FBD00 44809000 */ mtc1 $zero, $f18 ## $f18 = 0.00 -/* 00D34 809FBD04 24180005 */ addiu $t8, $zero, 0x0005 ## $t8 = 00000005 -/* 00D38 809FBD08 AFB80014 */ sw $t8, 0x0014($sp) -/* 00D3C 809FBD0C 8FA4003C */ lw $a0, 0x003C($sp) -/* 00D40 809FBD10 46802120 */ cvt.s.w $f4, $f4 -/* 00D44 809FBD14 460A4402 */ mul.s $f16, $f8, $f10 -/* 00D48 809FBD18 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00D4C 809FBD1C E7B20010 */ swc1 $f18, 0x0010($sp) -/* 00D50 809FBD20 44062000 */ mfc1 $a2, $f4 -/* 00D54 809FBD24 44078000 */ mfc1 $a3, $f16 -/* 00D58 809FBD28 0C00B92D */ jal func_8002E4B4 -/* 00D5C 809FBD2C 00000000 */ nop -/* 00D60 809FBD30 0C00B638 */ jal Actor_MoveForward - -/* 00D64 809FBD34 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00D68 809FBD38 8E190190 */ lw $t9, 0x0190($s0) ## 00000190 -/* 00D6C 809FBD3C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00D70 809FBD40 8FA5003C */ lw $a1, 0x003C($sp) -/* 00D74 809FBD44 0320F809 */ jalr $ra, $t9 -/* 00D78 809FBD48 00000000 */ nop -/* 00D7C 809FBD4C 26060194 */ addiu $a2, $s0, 0x0194 ## $a2 = 00000194 -/* 00D80 809FBD50 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000194 -/* 00D84 809FBD54 AFA6002C */ sw $a2, 0x002C($sp) -/* 00D88 809FBD58 0C0189B7 */ jal ActorCollider_Cylinder_Update - -/* 00D8C 809FBD5C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00D90 809FBD60 8FA4003C */ lw $a0, 0x003C($sp) -/* 00D94 809FBD64 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00D98 809FBD68 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00D9C 809FBD6C 8FA6002C */ lw $a2, 0x002C($sp) -/* 00DA0 809FBD70 0C017713 */ jal Actor_CollisionCheck_SetOT - ## CollisionCheck_setOT -/* 00DA4 809FBD74 00812821 */ addu $a1, $a0, $at -/* 00DA8 809FBD78 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00DAC 809FBD7C 8FB00020 */ lw $s0, 0x0020($sp) -/* 00DB0 809FBD80 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 -/* 00DB4 809FBD84 03E00008 */ jr $ra -/* 00DB8 809FBD88 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s deleted file mode 100644 index 7002666548..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_809FAFD0 -/* 00000 809FAFD0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00004 809FAFD4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00008 809FAFD8 8C8F0154 */ lw $t7, 0x0154($a0) ## 00000154 -/* 0000C 809FAFDC 3C0E0600 */ lui $t6, 0x0600 ## $t6 = 06000000 -/* 00010 809FAFE0 25CE1368 */ addiu $t6, $t6, 0x1368 ## $t6 = 06001368 -/* 00014 809FAFE4 15CF0010 */ bne $t6, $t7, .L809FB028 -/* 00018 809FAFE8 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 0001C 809FAFEC C4800164 */ lwc1 $f0, 0x0164($a0) ## 00000164 -/* 00020 809FAFF0 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00 -/* 00024 809FAFF4 3C0140E0 */ lui $at, 0x40E0 ## $at = 40E00000 -/* 00028 809FAFF8 46002032 */ c.eq.s $f4, $f0 -/* 0002C 809FAFFC 00000000 */ nop -/* 00030 809FB000 45010007 */ bc1t .L809FB020 -/* 00034 809FB004 00000000 */ nop -/* 00038 809FB008 44813000 */ mtc1 $at, $f6 ## $f6 = 7.00 -/* 0003C 809FB00C 00000000 */ nop -/* 00040 809FB010 46003032 */ c.eq.s $f6, $f0 -/* 00044 809FB014 00000000 */ nop -/* 00048 809FB018 45020004 */ bc1fl .L809FB02C -/* 0004C 809FB01C 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB020: -/* 00050 809FB020 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00054 809FB024 240528EF */ addiu $a1, $zero, 0x28EF ## $a1 = 000028EF -.L809FB028: -/* 00058 809FB028 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB02C: -/* 0005C 809FB02C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00060 809FB030 03E00008 */ jr $ra -/* 00064 809FB034 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s deleted file mode 100644 index 5d30f37616..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_809FB038 -/* 00068 809FB038 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0006C 809FB03C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00070 809FB040 8C8F0154 */ lw $t7, 0x0154($a0) ## 00000154 -/* 00074 809FB044 3C0E0600 */ lui $t6, 0x0600 ## $t6 = 06000000 -/* 00078 809FB048 25CE0D78 */ addiu $t6, $t6, 0x0D78 ## $t6 = 06000D78 -/* 0007C 809FB04C 15CF0010 */ bne $t6, $t7, .L809FB090 -/* 00080 809FB050 3C014000 */ lui $at, 0x4000 ## $at = 40000000 -/* 00084 809FB054 C4800164 */ lwc1 $f0, 0x0164($a0) ## 00000164 -/* 00088 809FB058 44812000 */ mtc1 $at, $f4 ## $f4 = 2.00 -/* 0008C 809FB05C 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 00090 809FB060 46002032 */ c.eq.s $f4, $f0 -/* 00094 809FB064 00000000 */ nop -/* 00098 809FB068 45010007 */ bc1t .L809FB088 -/* 0009C 809FB06C 00000000 */ nop -/* 000A0 809FB070 44813000 */ mtc1 $at, $f6 ## $f6 = 4.00 -/* 000A4 809FB074 00000000 */ nop -/* 000A8 809FB078 46003032 */ c.eq.s $f6, $f0 -/* 000AC 809FB07C 00000000 */ nop -/* 000B0 809FB080 45020004 */ bc1fl .L809FB094 -/* 000B4 809FB084 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB088: -/* 000B8 809FB088 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 000BC 809FB08C 240528EF */ addiu $a1, $zero, 0x28EF ## $a1 = 000028EF -.L809FB090: -/* 000C0 809FB090 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB094: -/* 000C4 809FB094 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 000C8 809FB098 03E00008 */ jr $ra -/* 000CC 809FB09C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s deleted file mode 100644 index 741dcf0e3c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_809FB0A0 -/* 000D0 809FB0A0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 000D4 809FB0A4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 000D8 809FB0A8 8C8F0154 */ lw $t7, 0x0154($a0) ## 00000154 -/* 000DC 809FB0AC 3C0E0600 */ lui $t6, 0x0600 ## $t6 = 06000000 -/* 000E0 809FB0B0 25CE0278 */ addiu $t6, $t6, 0x0278 ## $t6 = 06000278 -/* 000E4 809FB0B4 15CF0010 */ bne $t6, $t7, .L809FB0F8 -/* 000E8 809FB0B8 3C014150 */ lui $at, 0x4150 ## $at = 41500000 -/* 000EC 809FB0BC C4800164 */ lwc1 $f0, 0x0164($a0) ## 00000164 -/* 000F0 809FB0C0 44812000 */ mtc1 $at, $f4 ## $f4 = 13.00 -/* 000F4 809FB0C4 3C014198 */ lui $at, 0x4198 ## $at = 41980000 -/* 000F8 809FB0C8 46002032 */ c.eq.s $f4, $f0 -/* 000FC 809FB0CC 00000000 */ nop -/* 00100 809FB0D0 45010007 */ bc1t .L809FB0F0 -/* 00104 809FB0D4 00000000 */ nop -/* 00108 809FB0D8 44813000 */ mtc1 $at, $f6 ## $f6 = 19.00 -/* 0010C 809FB0DC 00000000 */ nop -/* 00110 809FB0E0 46003032 */ c.eq.s $f6, $f0 -/* 00114 809FB0E4 00000000 */ nop -/* 00118 809FB0E8 45020004 */ bc1fl .L809FB0FC -/* 0011C 809FB0EC 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB0F0: -/* 00120 809FB0F0 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00124 809FB0F4 240528D8 */ addiu $a1, $zero, 0x28D8 ## $a1 = 000028D8 -.L809FB0F8: -/* 00128 809FB0F8 8FBF0014 */ lw $ra, 0x0014($sp) -.L809FB0FC: -/* 0012C 809FB0FC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00130 809FB100 03E00008 */ jr $ra -/* 00134 809FB104 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s deleted file mode 100644 index 4c9e5ebf2a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s +++ /dev/null @@ -1,122 +0,0 @@ -glabel func_809FB108 -/* 00138 809FB108 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 0013C 809FB10C AFBF001C */ sw $ra, 0x001C($sp) -/* 00140 809FB110 AFB00018 */ sw $s0, 0x0018($sp) -/* 00144 809FB114 848301F2 */ lh $v1, 0x01F2($a0) ## 000001F2 -/* 00148 809FB118 848201F0 */ lh $v0, 0x01F0($a0) ## 000001F0 -/* 0014C 809FB11C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00150 809FB120 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00154 809FB124 50430029 */ beql $v0, $v1, .L809FB1CC -/* 00158 809FB128 2C610006 */ sltiu $at, $v1, 0x0006 -/* 0015C 809FB12C 14410003 */ bne $v0, $at, .L809FB13C -/* 00160 809FB130 240E0003 */ addiu $t6, $zero, 0x0003 ## $t6 = 00000003 -/* 00164 809FB134 A48E01F0 */ sh $t6, 0x01F0($a0) ## 000001F0 -/* 00168 809FB138 848201F0 */ lh $v0, 0x01F0($a0) ## 000001F0 -.L809FB13C: -/* 0016C 809FB13C 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006 -/* 00170 809FB140 14410003 */ bne $v0, $at, .L809FB150 -/* 00174 809FB144 240F0005 */ addiu $t7, $zero, 0x0005 ## $t7 = 00000005 -/* 00178 809FB148 A60F01F0 */ sh $t7, 0x01F0($s0) ## 000001F0 -/* 0017C 809FB14C 860201F0 */ lh $v0, 0x01F0($s0) ## 000001F0 -.L809FB150: -/* 00180 809FB150 3058FFFF */ andi $t8, $v0, 0xFFFF ## $t8 = 00000000 -/* 00184 809FB154 2F010006 */ sltiu $at, $t8, 0x0006 -/* 00188 809FB158 10200015 */ beq $at, $zero, .L809FB1B0 -/* 0018C 809FB15C A60201F2 */ sh $v0, 0x01F2($s0) ## 000001F2 -/* 00190 809FB160 0018C080 */ sll $t8, $t8, 2 -/* 00194 809FB164 3C0180A0 */ lui $at, %hi(jtbl_809FC050) ## $at = 80A00000 -/* 00198 809FB168 00380821 */ addu $at, $at, $t8 -/* 0019C 809FB16C 8C38C050 */ lw $t8, %lo(jtbl_809FC050)($at) -/* 001A0 809FB170 03000008 */ jr $t8 -/* 001A4 809FB174 00000000 */ nop -glabel L809FB178 -/* 001A8 809FB178 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 001AC 809FB17C 1000000C */ beq $zero, $zero, .L809FB1B0 -/* 001B0 809FB180 AFB90024 */ sw $t9, 0x0024($sp) -glabel L809FB184 -/* 001B4 809FB184 24080002 */ addiu $t0, $zero, 0x0002 ## $t0 = 00000002 -/* 001B8 809FB188 10000009 */ beq $zero, $zero, .L809FB1B0 -/* 001BC 809FB18C AFA80024 */ sw $t0, 0x0024($sp) -glabel L809FB190 -/* 001C0 809FB190 24090003 */ addiu $t1, $zero, 0x0003 ## $t1 = 00000003 -/* 001C4 809FB194 10000006 */ beq $zero, $zero, .L809FB1B0 -/* 001C8 809FB198 AFA90024 */ sw $t1, 0x0024($sp) -glabel L809FB19C -/* 001CC 809FB19C 240A0004 */ addiu $t2, $zero, 0x0004 ## $t2 = 00000004 -/* 001D0 809FB1A0 10000003 */ beq $zero, $zero, .L809FB1B0 -/* 001D4 809FB1A4 AFAA0024 */ sw $t2, 0x0024($sp) -glabel L809FB1A8 -/* 001D8 809FB1A8 240B0006 */ addiu $t3, $zero, 0x0006 ## $t3 = 00000006 -/* 001DC 809FB1AC AFAB0024 */ sw $t3, 0x0024($sp) -glabel L809FB1B0 -.L809FB1B0: -/* 001E0 809FB1B0 3C0580A0 */ lui $a1, %hi(D_809FBF48) ## $a1 = 80A00000 -/* 001E4 809FB1B4 24A5BF48 */ addiu $a1, $a1, %lo(D_809FBF48) ## $a1 = 809FBF48 -/* 001E8 809FB1B8 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 001EC 809FB1BC 0C00D3B0 */ jal func_80034EC0 -/* 001F0 809FB1C0 8FA60024 */ lw $a2, 0x0024($sp) -/* 001F4 809FB1C4 860301F2 */ lh $v1, 0x01F2($s0) ## 000001F2 -/* 001F8 809FB1C8 2C610006 */ sltiu $at, $v1, 0x0006 -.L809FB1CC: -/* 001FC 809FB1CC 1020002E */ beq $at, $zero, .L809FB288 -/* 00200 809FB1D0 00036080 */ sll $t4, $v1, 2 -/* 00204 809FB1D4 3C0180A0 */ lui $at, %hi(jtbl_809FC068) ## $at = 80A00000 -/* 00208 809FB1D8 002C0821 */ addu $at, $at, $t4 -/* 0020C 809FB1DC 8C2CC068 */ lw $t4, %lo(jtbl_809FC068)($at) -/* 00210 809FB1E0 01800008 */ jr $t4 -/* 00214 809FB1E4 00000000 */ nop -glabel L809FB1E8 -/* 00218 809FB1E8 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 0021C 809FB1EC 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C -/* 00220 809FB1F0 0C0295B2 */ jal func_800A56C8 -/* 00224 809FB1F4 AFA40020 */ sw $a0, 0x0020($sp) -/* 00228 809FB1F8 10400023 */ beq $v0, $zero, .L809FB288 -/* 0022C 809FB1FC 8FA40020 */ lw $a0, 0x0020($sp) -/* 00230 809FB200 3C0580A0 */ lui $a1, %hi(D_809FBF48) ## $a1 = 80A00000 -/* 00234 809FB204 24A5BF48 */ addiu $a1, $a1, %lo(D_809FBF48) ## $a1 = 809FBF48 -/* 00238 809FB208 0C00D3B0 */ jal func_80034EC0 -/* 0023C 809FB20C 24060005 */ addiu $a2, $zero, 0x0005 ## $a2 = 00000005 -/* 00240 809FB210 240D0004 */ addiu $t5, $zero, 0x0004 ## $t5 = 00000004 -/* 00244 809FB214 A60D01F0 */ sh $t5, 0x01F0($s0) ## 000001F0 -/* 00248 809FB218 860E01F0 */ lh $t6, 0x01F0($s0) ## 000001F0 -/* 0024C 809FB21C 1000001A */ beq $zero, $zero, .L809FB288 -/* 00250 809FB220 A60E01F2 */ sh $t6, 0x01F2($s0) ## 000001F2 -glabel L809FB224 -/* 00254 809FB224 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 00258 809FB228 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C -/* 0025C 809FB22C 0C0295B2 */ jal func_800A56C8 -/* 00260 809FB230 AFA40020 */ sw $a0, 0x0020($sp) -/* 00264 809FB234 10400014 */ beq $v0, $zero, .L809FB288 -/* 00268 809FB238 8FA40020 */ lw $a0, 0x0020($sp) -/* 0026C 809FB23C 3C0580A0 */ lui $a1, %hi(D_809FBF48) ## $a1 = 80A00000 -/* 00270 809FB240 24A5BF48 */ addiu $a1, $a1, %lo(D_809FBF48) ## $a1 = 809FBF48 -/* 00274 809FB244 0C00D3B0 */ jal func_80034EC0 -/* 00278 809FB248 24060007 */ addiu $a2, $zero, 0x0007 ## $a2 = 00000007 -/* 0027C 809FB24C 240F0006 */ addiu $t7, $zero, 0x0006 ## $t7 = 00000006 -/* 00280 809FB250 A60F01F0 */ sh $t7, 0x01F0($s0) ## 000001F0 -/* 00284 809FB254 861801F0 */ lh $t8, 0x01F0($s0) ## 000001F0 -/* 00288 809FB258 1000000B */ beq $zero, $zero, .L809FB288 -/* 0028C 809FB25C A61801F2 */ sh $t8, 0x01F2($s0) ## 000001F2 -glabel L809FB260 -/* 00290 809FB260 0C27EBF4 */ jal func_809FAFD0 -/* 00294 809FB264 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00298 809FB268 10000008 */ beq $zero, $zero, .L809FB28C -/* 0029C 809FB26C 8FBF001C */ lw $ra, 0x001C($sp) -glabel L809FB270 -/* 002A0 809FB270 0C27EC0E */ jal func_809FB038 -/* 002A4 809FB274 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002A8 809FB278 10000004 */ beq $zero, $zero, .L809FB28C -/* 002AC 809FB27C 8FBF001C */ lw $ra, 0x001C($sp) -glabel L809FB280 -/* 002B0 809FB280 0C27EC28 */ jal func_809FB0A0 -/* 002B4 809FB284 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -glabel L809FB288 -.L809FB288: -/* 002B8 809FB288 8FBF001C */ lw $ra, 0x001C($sp) -.L809FB28C: -/* 002BC 809FB28C 8FB00018 */ lw $s0, 0x0018($sp) -/* 002C0 809FB290 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 002C4 809FB294 03E00008 */ jr $ra -/* 002C8 809FB298 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB29C.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB29C.s deleted file mode 100644 index edddd5a147..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB29C.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel func_809FB29C -/* 002CC 809FB29C 908301A5 */ lbu $v1, 0x01A5($a0) ## 000001A5 -/* 002D0 809FB2A0 24020002 */ addiu $v0, $zero, 0x0002 ## $v0 = 00000002 -/* 002D4 809FB2A4 306E0002 */ andi $t6, $v1, 0x0002 ## $t6 = 00000000 -/* 002D8 809FB2A8 11C00003 */ beq $t6, $zero, .L809FB2B8 -/* 002DC 809FB2AC 306FFFFD */ andi $t7, $v1, 0xFFFD ## $t7 = 00000000 -/* 002E0 809FB2B0 03E00008 */ jr $ra -/* 002E4 809FB2B4 A08F01A5 */ sb $t7, 0x01A5($a0) ## 000001A5 -.L809FB2B8: -/* 002E8 809FB2B8 84B800A4 */ lh $t8, 0x00A4($a1) ## 000000A4 -/* 002EC 809FB2BC 24010020 */ addiu $at, $zero, 0x0020 ## $at = 00000020 -/* 002F0 809FB2C0 57010004 */ bnel $t8, $at, .L809FB2D4 -/* 002F4 809FB2C4 908201A7 */ lbu $v0, 0x01A7($a0) ## 000001A7 -/* 002F8 809FB2C8 03E00008 */ jr $ra -/* 002FC 809FB2CC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L809FB2D0: -/* 00300 809FB2D0 908201A7 */ lbu $v0, 0x01A7($a0) ## 000001A7 -.L809FB2D4: -/* 00304 809FB2D4 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 00308 809FB2D8 2463E660 */ addiu $v1, $v1, 0xE660 ## $v1 = 8015E660 -/* 0030C 809FB2DC 30590001 */ andi $t9, $v0, 0x0001 ## $t9 = 00000000 -/* 00310 809FB2E0 1320000C */ beq $t9, $zero, .L809FB314 -/* 00314 809FB2E4 3048FFFE */ andi $t0, $v0, 0xFFFE ## $t0 = 00000000 -/* 00318 809FB2E8 A08801A7 */ sb $t0, 0x01A7($a0) ## 000001A7 -/* 0031C 809FB2EC 846913C4 */ lh $t1, 0x13C4($v1) ## 8015FA24 -/* 00320 809FB2F0 51200004 */ beql $t1, $zero, .L809FB304 -/* 00324 809FB2F4 848A001C */ lh $t2, 0x001C($a0) ## 0000001C -/* 00328 809FB2F8 03E00008 */ jr $ra -/* 0032C 809FB2FC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L809FB300: -/* 00330 809FB300 848A001C */ lh $t2, 0x001C($a0) ## 0000001C -.L809FB304: -/* 00334 809FB304 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 00338 809FB308 314B7FFF */ andi $t3, $t2, 0x7FFF ## $t3 = 00000000 -/* 0033C 809FB30C 03E00008 */ jr $ra -/* 00340 809FB310 A46B13C4 */ sh $t3, 0x13C4($v1) ## 8015FA24 -.L809FB314: -/* 00344 809FB314 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 00348 809FB318 03E00008 */ jr $ra -/* 0034C 809FB31C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s deleted file mode 100644 index 7cc95a07d6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s +++ /dev/null @@ -1,44 +0,0 @@ -glabel func_809FB320 -/* 00350 809FB320 AFA50004 */ sw $a1, 0x0004($sp) -/* 00354 809FB324 8C8E01E0 */ lw $t6, 0x01E0($a0) ## 000001E0 -/* 00358 809FB328 55C00004 */ bnel $t6, $zero, .L809FB33C -/* 0035C 809FB32C 908201E4 */ lbu $v0, 0x01E4($a0) ## 000001E4 -/* 00360 809FB330 03E00008 */ jr $ra -/* 00364 809FB334 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L809FB338: -/* 00368 809FB338 908201E4 */ lbu $v0, 0x01E4($a0) ## 000001E4 -.L809FB33C: -/* 0036C 809FB33C 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 -/* 00370 809FB340 10400003 */ beq $v0, $zero, .L809FB350 -/* 00374 809FB344 00000000 */ nop -/* 00378 809FB348 10000001 */ beq $zero, $zero, .L809FB350 -/* 0037C 809FB34C 2403FFFF */ addiu $v1, $zero, 0xFFFF ## $v1 = FFFFFFFF -.L809FB350: -/* 00380 809FB350 848F01E6 */ lh $t7, 0x01E6($a0) ## 000001E6 -/* 00384 809FB354 01E3C021 */ addu $t8, $t7, $v1 -/* 00388 809FB358 10400009 */ beq $v0, $zero, .L809FB380 -/* 0038C 809FB35C A49801E6 */ sh $t8, 0x01E6($a0) ## 000001E6 -/* 00390 809FB360 849901E6 */ lh $t9, 0x01E6($a0) ## 000001E6 -/* 00394 809FB364 0723000F */ bgezl $t9, .L809FB3A4 -/* 00398 809FB368 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 0039C 809FB36C 8C8801E0 */ lw $t0, 0x01E0($a0) ## 000001E0 -/* 003A0 809FB370 91090000 */ lbu $t1, 0x0000($t0) ## 00000000 -/* 003A4 809FB374 252AFFFF */ addiu $t2, $t1, 0xFFFF ## $t2 = FFFFFFFF -/* 003A8 809FB378 10000009 */ beq $zero, $zero, .L809FB3A0 -/* 003AC 809FB37C A48A01E6 */ sh $t2, 0x01E6($a0) ## 000001E6 -.L809FB380: -/* 003B0 809FB380 8C8C01E0 */ lw $t4, 0x01E0($a0) ## 000001E0 -/* 003B4 809FB384 848B01E6 */ lh $t3, 0x01E6($a0) ## 000001E6 -/* 003B8 809FB388 918D0000 */ lbu $t5, 0x0000($t4) ## 00000000 -/* 003BC 809FB38C 25AEFFFF */ addiu $t6, $t5, 0xFFFF ## $t6 = FFFFFFFF -/* 003C0 809FB390 01CB082A */ slt $at, $t6, $t3 -/* 003C4 809FB394 50200003 */ beql $at, $zero, .L809FB3A4 -/* 003C8 809FB398 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 003CC 809FB39C A48001E6 */ sh $zero, 0x01E6($a0) ## 000001E6 -.L809FB3A0: -/* 003D0 809FB3A0 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L809FB3A4: -/* 003D4 809FB3A4 03E00008 */ jr $ra -/* 003D8 809FB3A8 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s deleted file mode 100644 index 8c0209f238..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s +++ /dev/null @@ -1,46 +0,0 @@ -glabel func_809FB3AC -/* 003DC 809FB3AC 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 003E0 809FB3B0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 003E4 809FB3B4 AFB00020 */ sw $s0, 0x0020($sp) -/* 003E8 809FB3B8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003EC 809FB3BC AFA50034 */ sw $a1, 0x0034($sp) -/* 003F0 809FB3C0 860601E6 */ lh $a2, 0x01E6($s0) ## 000001E6 -/* 003F4 809FB3C4 8E0501E0 */ lw $a1, 0x01E0($s0) ## 000001E0 -/* 003F8 809FB3C8 0C023948 */ jal func_8008E520 -/* 003FC 809FB3CC 27A7002E */ addiu $a3, $sp, 0x002E ## $a3 = FFFFFFFE -/* 00400 809FB3D0 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00404 809FB3D4 AFAE0010 */ sw $t6, 0x0010($sp) -/* 00408 809FB3D8 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 0040C 809FB3DC 87A5002E */ lh $a1, 0x002E($sp) -/* 00410 809FB3E0 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 00414 809FB3E4 240703E8 */ addiu $a3, $zero, 0x03E8 ## $a3 = 000003E8 -/* 00418 809FB3E8 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 0041C 809FB3EC E7A00028 */ swc1 $f0, 0x0028($sp) -/* 00420 809FB3F0 C7A20028 */ lwc1 $f2, 0x0028($sp) -/* 00424 809FB3F4 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00428 809FB3F8 3C01447A */ lui $at, 0x447A ## $at = 447A0000 -/* 0042C 809FB3FC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 00430 809FB400 4602203C */ c.lt.s $f4, $f2 -/* 00434 809FB404 00000000 */ nop -/* 00438 809FB408 4500000B */ bc1f .L809FB438 -/* 0043C 809FB40C 00000000 */ nop -/* 00440 809FB410 44813000 */ mtc1 $at, $f6 ## $f6 = 1000.00 -/* 00444 809FB414 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00448 809FB418 4606103C */ c.lt.s $f2, $f6 -/* 0044C 809FB41C 00000000 */ nop -/* 00450 809FB420 45000005 */ bc1f .L809FB438 -/* 00454 809FB424 00000000 */ nop -/* 00458 809FB428 0C27ECC8 */ jal func_809FB320 -/* 0045C 809FB42C 8FA50034 */ lw $a1, 0x0034($sp) -/* 00460 809FB430 10000002 */ beq $zero, $zero, .L809FB43C -/* 00464 809FB434 8FBF0024 */ lw $ra, 0x0024($sp) -.L809FB438: -/* 00468 809FB438 8FBF0024 */ lw $ra, 0x0024($sp) -.L809FB43C: -/* 0046C 809FB43C 8FB00020 */ lw $s0, 0x0020($sp) -/* 00470 809FB440 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00474 809FB444 03E00008 */ jr $ra -/* 00478 809FB448 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s deleted file mode 100644 index f9edc470b3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s +++ /dev/null @@ -1,114 +0,0 @@ -glabel func_809FB6C4 -/* 006F4 809FB6C4 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 006F8 809FB6C8 3C0F80A0 */ lui $t7, %hi(D_809FC008) ## $t7 = 80A00000 -/* 006FC 809FB6CC AFBF0024 */ sw $ra, 0x0024($sp) -/* 00700 809FB6D0 AFB00020 */ sw $s0, 0x0020($sp) -/* 00704 809FB6D4 AFA50054 */ sw $a1, 0x0054($sp) -/* 00708 809FB6D8 25EFC008 */ addiu $t7, $t7, %lo(D_809FC008) ## $t7 = 809FC008 -/* 0070C 809FB6DC 8DF90000 */ lw $t9, 0x0000($t7) ## 809FC008 -/* 00710 809FB6E0 27AE0044 */ addiu $t6, $sp, 0x0044 ## $t6 = FFFFFFF4 -/* 00714 809FB6E4 8DF80004 */ lw $t8, 0x0004($t7) ## 809FC00C -/* 00718 809FB6E8 ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF4 -/* 0071C 809FB6EC 8DF90008 */ lw $t9, 0x0008($t7) ## 809FC010 -/* 00720 809FB6F0 3C0980A0 */ lui $t1, %hi(D_809FC014) ## $t1 = 80A00000 -/* 00724 809FB6F4 2529C014 */ addiu $t1, $t1, %lo(D_809FC014) ## $t1 = 809FC014 -/* 00728 809FB6F8 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF8 -/* 0072C 809FB6FC ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFFC -/* 00730 809FB700 8D2B0000 */ lw $t3, 0x0000($t1) ## 809FC014 -/* 00734 809FB704 27A80038 */ addiu $t0, $sp, 0x0038 ## $t0 = FFFFFFE8 -/* 00738 809FB708 8D2A0004 */ lw $t2, 0x0004($t1) ## 809FC018 -/* 0073C 809FB70C AD0B0000 */ sw $t3, 0x0000($t0) ## FFFFFFE8 -/* 00740 809FB710 8D2B0008 */ lw $t3, 0x0008($t1) ## 809FC01C -/* 00744 809FB714 AD0A0004 */ sw $t2, 0x0004($t0) ## FFFFFFEC -/* 00748 809FB718 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0074C 809FB71C AD0B0008 */ sw $t3, 0x0008($t0) ## FFFFFFF0 -/* 00750 809FB720 0C27ECA7 */ jal func_809FB29C -/* 00754 809FB724 8FA50054 */ lw $a1, 0x0054($sp) -/* 00758 809FB728 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0075C 809FB72C 14410003 */ bne $v0, $at, .L809FB73C -/* 00760 809FB730 3C0C80A0 */ lui $t4, %hi(func_809FB940) ## $t4 = 80A00000 -/* 00764 809FB734 258CB940 */ addiu $t4, $t4, %lo(func_809FB940) ## $t4 = 809FB940 -/* 00768 809FB738 AE0C0190 */ sw $t4, 0x0190($s0) ## 00000190 -.L809FB73C: -/* 0076C 809FB73C 860201EC */ lh $v0, 0x01EC($s0) ## 000001EC -/* 00770 809FB740 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068 -/* 00774 809FB744 3C063ECC */ lui $a2, 0x3ECC ## $a2 = 3ECC0000 -/* 00778 809FB748 14400003 */ bne $v0, $zero, .L809FB758 -/* 0077C 809FB74C 244DFFFF */ addiu $t5, $v0, 0xFFFF ## $t5 = FFFFFFFF -/* 00780 809FB750 10000003 */ beq $zero, $zero, .L809FB760 -/* 00784 809FB754 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -.L809FB758: -/* 00788 809FB758 A60D01EC */ sh $t5, 0x01EC($s0) ## 000001EC -/* 0078C 809FB75C 860301EC */ lh $v1, 0x01EC($s0) ## 000001EC -.L809FB760: -/* 00790 809FB760 10600028 */ beq $v1, $zero, .L809FB804 -/* 00794 809FB764 8FAC0054 */ lw $t4, 0x0054($sp) -/* 00798 809FB768 860E01F0 */ lh $t6, 0x01F0($s0) ## 000001F0 -/* 0079C 809FB76C 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 007A0 809FB770 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3ECCCCCD -/* 007A4 809FB774 15C00005 */ bne $t6, $zero, .L809FB78C -/* 007A8 809FB778 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000 -/* 007AC 809FB77C 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 007B0 809FB780 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00 -/* 007B4 809FB784 10000005 */ beq $zero, $zero, .L809FB79C -/* 007B8 809FB788 44050000 */ mfc1 $a1, $f0 -.L809FB78C: -/* 007BC 809FB78C 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 007C0 809FB790 44810000 */ mtc1 $at, $f0 ## $f0 = 4.00 -/* 007C4 809FB794 00000000 */ nop -/* 007C8 809FB798 44050000 */ mfc1 $a1, $f0 -.L809FB79C: -/* 007CC 809FB79C 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 007D0 809FB7A0 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 007D4 809FB7A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 007D8 809FB7A8 0C27ECEB */ jal func_809FB3AC -/* 007DC 809FB7AC 8FA50054 */ lw $a1, 0x0054($sp) -/* 007E0 809FB7B0 8A180030 */ lwl $t8, 0x0030($s0) ## 00000030 -/* 007E4 809FB7B4 9A180033 */ lwr $t8, 0x0033($s0) ## 00000033 -/* 007E8 809FB7B8 861901E6 */ lh $t9, 0x01E6($s0) ## 000001E6 -/* 007EC 809FB7BC 3C028016 */ lui $v0, 0x8016 ## $v0 = 80160000 -/* 007F0 809FB7C0 AA1800B4 */ swl $t8, 0x00B4($s0) ## 000000B4 -/* 007F4 809FB7C4 BA1800B7 */ swr $t8, 0x00B7($s0) ## 000000B7 -/* 007F8 809FB7C8 96180034 */ lhu $t8, 0x0034($s0) ## 00000034 -/* 007FC 809FB7CC 2B210009 */ slti $at, $t9, 0x0009 -/* 00800 809FB7D0 10200007 */ beq $at, $zero, .L809FB7F0 -/* 00804 809FB7D4 A61800B8 */ sh $t8, 0x00B8($s0) ## 000000B8 -/* 00808 809FB7D8 3C028016 */ lui $v0, 0x8016 ## $v0 = 80160000 -/* 0080C 809FB7DC 2442E660 */ addiu $v0, $v0, 0xE660 ## $v0 = 8015E660 -/* 00810 809FB7E0 94481400 */ lhu $t0, 0x1400($v0) ## 8015FA60 -/* 00814 809FB7E4 35090001 */ ori $t1, $t0, 0x0001 ## $t1 = 00000001 -/* 00818 809FB7E8 10000016 */ beq $zero, $zero, .L809FB844 -/* 0081C 809FB7EC A4491400 */ sh $t1, 0x1400($v0) ## 8015FA60 -.L809FB7F0: -/* 00820 809FB7F0 2442E660 */ addiu $v0, $v0, 0xE660 ## $v0 = 8015CCC0 -/* 00824 809FB7F4 944A1400 */ lhu $t2, 0x1400($v0) ## 8015E0C0 -/* 00828 809FB7F8 314BFFFE */ andi $t3, $t2, 0xFFFE ## $t3 = 00000000 -/* 0082C 809FB7FC 10000011 */ beq $zero, $zero, .L809FB844 -/* 00830 809FB800 A44B1400 */ sh $t3, 0x1400($v0) ## 8015E0C0 -.L809FB804: -/* 00834 809FB804 8D83009C */ lw $v1, 0x009C($t4) ## 0000009C -/* 00838 809FB808 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 0083C 809FB80C 27AE0044 */ addiu $t6, $sp, 0x0044 ## $t6 = FFFFFFF4 -/* 00840 809FB810 0061001B */ divu $zero, $v1, $at -/* 00844 809FB814 00001810 */ mfhi $v1 -/* 00848 809FB818 00036880 */ sll $t5, $v1, 2 -/* 0084C 809FB81C 01AE1021 */ addu $v0, $t5, $t6 -/* 00850 809FB820 8C4F0000 */ lw $t7, 0x0000($v0) ## 8015CCC0 -/* 00854 809FB824 2404003C */ addiu $a0, $zero, 0x003C ## $a0 = 0000003C -/* 00858 809FB828 A60F01F0 */ sh $t7, 0x01F0($s0) ## 000001F0 -/* 0085C 809FB82C 0C01DF64 */ jal Math_Rand_S16Offset - -/* 00860 809FB830 84450002 */ lh $a1, 0x0002($v0) ## 8015CCC2 -/* 00864 809FB834 3C1880A0 */ lui $t8, %hi(func_809FB858) ## $t8 = 80A00000 -/* 00868 809FB838 2718B858 */ addiu $t8, $t8, %lo(func_809FB858) ## $t8 = 809FB858 -/* 0086C 809FB83C A60201EC */ sh $v0, 0x01EC($s0) ## 000001EC -/* 00870 809FB840 AE180190 */ sw $t8, 0x0190($s0) ## 00000190 -.L809FB844: -/* 00874 809FB844 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00878 809FB848 8FB00020 */ lw $s0, 0x0020($sp) -/* 0087C 809FB84C 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 -/* 00880 809FB850 03E00008 */ jr $ra -/* 00884 809FB854 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB858.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB858.s deleted file mode 100644 index 3e8286c1e1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB858.s +++ /dev/null @@ -1,70 +0,0 @@ -glabel func_809FB858 -/* 00888 809FB858 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 0088C 809FB85C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00890 809FB860 AFB00020 */ sw $s0, 0x0020($sp) -/* 00894 809FB864 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00898 809FB868 0C27ECA7 */ jal func_809FB29C -/* 0089C 809FB86C AFA5002C */ sw $a1, 0x002C($sp) -/* 008A0 809FB870 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001 -/* 008A4 809FB874 14460003 */ bne $v0, $a2, .L809FB884 -/* 008A8 809FB878 3C0E80A0 */ lui $t6, %hi(func_809FB940) ## $t6 = 80A00000 -/* 008AC 809FB87C 25CEB940 */ addiu $t6, $t6, %lo(func_809FB940) ## $t6 = 809FB940 -/* 008B0 809FB880 AE0E0190 */ sw $t6, 0x0190($s0) ## 00000190 -.L809FB884: -/* 008B4 809FB884 860201EC */ lh $v0, 0x01EC($s0) ## 000001EC -/* 008B8 809FB888 240400C8 */ addiu $a0, $zero, 0x00C8 ## $a0 = 000000C8 -/* 008BC 809FB88C 14400003 */ bne $v0, $zero, .L809FB89C -/* 008C0 809FB890 244FFFFF */ addiu $t7, $v0, 0xFFFF ## $t7 = FFFFFFFF -/* 008C4 809FB894 10000003 */ beq $zero, $zero, .L809FB8A4 -/* 008C8 809FB898 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -.L809FB89C: -/* 008CC 809FB89C A60F01EC */ sh $t7, 0x01EC($s0) ## 000001EC -/* 008D0 809FB8A0 860301EC */ lh $v1, 0x01EC($s0) ## 000001EC -.L809FB8A4: -/* 008D4 809FB8A4 5460001A */ bnel $v1, $zero, .L809FB910 -/* 008D8 809FB8A8 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 008DC 809FB8AC 0C01DF64 */ jal Math_Rand_S16Offset - -/* 008E0 809FB8B0 24050064 */ addiu $a1, $zero, 0x0064 ## $a1 = 00000064 -/* 008E4 809FB8B4 A60201EC */ sh $v0, 0x01EC($s0) ## 000001EC -/* 008E8 809FB8B8 8FB8002C */ lw $t8, 0x002C($sp) -/* 008EC 809FB8BC 3C0C80A0 */ lui $t4, %hi(func_809FB6C4) ## $t4 = 80A00000 -/* 008F0 809FB8C0 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001 -/* 008F4 809FB8C4 8F19009C */ lw $t9, 0x009C($t8) ## 0000009C -/* 008F8 809FB8C8 258CB6C4 */ addiu $t4, $t4, %lo(func_809FB6C4) ## $t4 = 809FB6C4 -/* 008FC 809FB8CC 33280001 */ andi $t0, $t9, 0x0001 ## $t0 = 00000000 -/* 00900 809FB8D0 51000004 */ beql $t0, $zero, .L809FB8E4 -/* 00904 809FB8D4 A60601F0 */ sh $a2, 0x01F0($s0) ## 000001F0 -/* 00908 809FB8D8 10000002 */ beq $zero, $zero, .L809FB8E4 -/* 0090C 809FB8DC A60001F0 */ sh $zero, 0x01F0($s0) ## 000001F0 -/* 00910 809FB8E0 A60601F0 */ sh $a2, 0x01F0($s0) ## 000001F0 -.L809FB8E4: -/* 00914 809FB8E4 860901F0 */ lh $t1, 0x01F0($s0) ## 000001F0 -/* 00918 809FB8E8 54C90008 */ bnel $a2, $t1, .L809FB90C -/* 0091C 809FB8EC AE0C0190 */ sw $t4, 0x0190($s0) ## 00000190 -/* 00920 809FB8F0 860A01EC */ lh $t2, 0x01EC($s0) ## 000001EC -/* 00924 809FB8F4 05410003 */ bgez $t2, .L809FB904 -/* 00928 809FB8F8 000A5843 */ sra $t3, $t2, 1 -/* 0092C 809FB8FC 25410001 */ addiu $at, $t2, 0x0001 ## $at = 00000001 -/* 00930 809FB900 00015843 */ sra $t3, $at, 1 -.L809FB904: -/* 00934 809FB904 A60B01EC */ sh $t3, 0x01EC($s0) ## 000001EC -/* 00938 809FB908 AE0C0190 */ sw $t4, 0x0190($s0) ## 00000190 -.L809FB90C: -/* 0093C 809FB90C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -.L809FB910: -/* 00940 809FB910 3C063ECC */ lui $a2, 0x3ECC ## $a2 = 3ECC0000 -/* 00944 809FB914 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3ECCCCCD -/* 00948 809FB918 44050000 */ mfc1 $a1, $f0 -/* 0094C 809FB91C 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068 -/* 00950 809FB920 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000 -/* 00954 809FB924 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 00958 809FB928 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 0095C 809FB92C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00960 809FB930 8FB00020 */ lw $s0, 0x0020($sp) -/* 00964 809FB934 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00968 809FB938 03E00008 */ jr $ra -/* 0096C 809FB93C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB940.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB940.s deleted file mode 100644 index 3f03f49370..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB940.s +++ /dev/null @@ -1,110 +0,0 @@ -glabel func_809FB940 -/* 00970 809FB940 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00974 809FB944 AFA5002C */ sw $a1, 0x002C($sp) -/* 00978 809FB948 3C058016 */ lui $a1, 0x8016 ## $a1 = 80160000 -/* 0097C 809FB94C 24A5E660 */ addiu $a1, $a1, 0xE660 ## $a1 = 8015E660 -/* 00980 809FB950 84AE13C4 */ lh $t6, 0x13C4($a1) ## 8015FA24 -/* 00984 809FB954 AFB00020 */ sw $s0, 0x0020($sp) -/* 00988 809FB958 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0098C 809FB95C 15C00009 */ bne $t6, $zero, .L809FB984 -/* 00990 809FB960 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00994 809FB964 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00998 809FB968 3C1880A0 */ lui $t8, %hi(func_809FBC6C) ## $t8 = 80A00000 -/* 0099C 809FB96C 240F0003 */ addiu $t7, $zero, 0x0003 ## $t7 = 00000003 -/* 009A0 809FB970 2718BC6C */ addiu $t8, $t8, %lo(func_809FBC6C) ## $t8 = 809FBC6C -/* 009A4 809FB974 A48F01F0 */ sh $t7, 0x01F0($a0) ## 000001F0 -/* 009A8 809FB978 AC980190 */ sw $t8, 0x0190($a0) ## 00000190 -/* 009AC 809FB97C 1000004A */ beq $zero, $zero, .L809FBAA8 -/* 009B0 809FB980 E4840068 */ swc1 $f4, 0x0068($a0) ## 00000068 -.L809FB984: -/* 009B4 809FB984 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000 -/* 009B8 809FB988 44813000 */ mtc1 $at, $f6 ## $f6 = 400.00 -/* 009BC 809FB98C C6000090 */ lwc1 $f0, 0x0090($s0) ## 00000090 -/* 009C0 809FB990 4600303C */ c.lt.s $f6, $f0 -/* 009C4 809FB994 00000000 */ nop -/* 009C8 809FB998 4502000C */ bc1fl .L809FB9CC -/* 009CC 809FB99C 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 009D0 809FB9A0 860201F0 */ lh $v0, 0x01F0($s0) ## 000001F0 -/* 009D4 809FB9A4 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 009D8 809FB9A8 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 009DC 809FB9AC 10410004 */ beq $v0, $at, .L809FB9C0 -/* 009E0 809FB9B0 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 009E4 809FB9B4 10410002 */ beq $v0, $at, .L809FB9C0 -/* 009E8 809FB9B8 24030005 */ addiu $v1, $zero, 0x0005 ## $v1 = 00000005 -/* 009EC 809FB9BC A60301F0 */ sh $v1, 0x01F0($s0) ## 000001F0 -.L809FB9C0: -/* 009F0 809FB9C0 1000001F */ beq $zero, $zero, .L809FBA40 -/* 009F4 809FB9C4 A4A013C4 */ sh $zero, 0x13C4($a1) ## 8015FA24 -/* 009F8 809FB9C8 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -.L809FB9CC: -/* 009FC 809FB9CC 44814000 */ mtc1 $at, $f8 ## $f8 = 100.00 -/* 00A00 809FB9D0 00000000 */ nop -/* 00A04 809FB9D4 4600403C */ c.lt.s $f8, $f0 -/* 00A08 809FB9D8 00000000 */ nop -/* 00A0C 809FB9DC 45000005 */ bc1f .L809FB9F4 -/* 00A10 809FB9E0 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 00A14 809FB9E4 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 00A18 809FB9E8 44810000 */ mtc1 $at, $f0 ## $f0 = 4.00 -/* 00A1C 809FB9EC 10000014 */ beq $zero, $zero, .L809FBA40 -/* 00A20 809FB9F0 A61901F0 */ sh $t9, 0x01F0($s0) ## 000001F0 -.L809FB9F4: -/* 00A24 809FB9F4 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 00A28 809FB9F8 44815000 */ mtc1 $at, $f10 ## $f10 = 40.00 -/* 00A2C 809FB9FC 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 00A30 809FBA00 460A003C */ c.lt.s $f0, $f10 -/* 00A34 809FBA04 00000000 */ nop -/* 00A38 809FBA08 4502000C */ bc1fl .L809FBA3C -/* 00A3C 809FBA0C 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00 -/* 00A40 809FBA10 860201F0 */ lh $v0, 0x01F0($s0) ## 000001F0 -/* 00A44 809FBA14 24030005 */ addiu $v1, $zero, 0x0005 ## $v1 = 00000005 -/* 00A48 809FBA18 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00A4C 809FBA1C 10620004 */ beq $v1, $v0, .L809FBA30 -/* 00A50 809FBA20 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006 -/* 00A54 809FBA24 10410002 */ beq $v0, $at, .L809FBA30 -/* 00A58 809FBA28 00000000 */ nop -/* 00A5C 809FBA2C A60301F0 */ sh $v1, 0x01F0($s0) ## 000001F0 -.L809FBA30: -/* 00A60 809FBA30 10000004 */ beq $zero, $zero, .L809FBA44 -/* 00A64 809FBA34 44050000 */ mfc1 $a1, $f0 -/* 00A68 809FBA38 44810000 */ mtc1 $at, $f0 ## $f0 = 0.00 -.L809FBA3C: -/* 00A6C 809FBA3C A60001F0 */ sh $zero, 0x01F0($s0) ## 000001F0 -.L809FBA40: -/* 00A70 809FBA40 44050000 */ mfc1 $a1, $f0 -.L809FBA44: -/* 00A74 809FBA44 3C063F19 */ lui $a2, 0x3F19 ## $a2 = 3F190000 -/* 00A78 809FBA48 34C6999A */ ori $a2, $a2, 0x999A ## $a2 = 3F19999A -/* 00A7C 809FBA4C 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068 -/* 00A80 809FBA50 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00A84 809FBA54 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000 -/* 00A88 809FBA58 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000 -/* 00A8C 809FBA5C 44818000 */ mtc1 $at, $f16 ## $f16 = 400.00 -/* 00A90 809FBA60 C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090 -/* 00A94 809FBA64 4612803C */ c.lt.s $f16, $f18 -/* 00A98 809FBA68 00000000 */ nop -/* 00A9C 809FBA6C 4503000F */ bc1tl .L809FBAAC -/* 00AA0 809FBA70 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00AA4 809FBA74 8605008A */ lh $a1, 0x008A($s0) ## 0000008A -/* 00AA8 809FBA78 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001 -/* 00AAC 809FBA7C AFA80010 */ sw $t0, 0x0010($sp) -/* 00AB0 809FBA80 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00AB4 809FBA84 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 00AB8 809FBA88 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 00ABC 809FBA8C 240703E8 */ addiu $a3, $zero, 0x03E8 ## $a3 = 000003E8 -/* 00AC0 809FBA90 8A0A0030 */ lwl $t2, 0x0030($s0) ## 00000030 -/* 00AC4 809FBA94 9A0A0033 */ lwr $t2, 0x0033($s0) ## 00000033 -/* 00AC8 809FBA98 AA0A00B4 */ swl $t2, 0x00B4($s0) ## 000000B4 -/* 00ACC 809FBA9C BA0A00B7 */ swr $t2, 0x00B7($s0) ## 000000B7 -/* 00AD0 809FBAA0 960A0034 */ lhu $t2, 0x0034($s0) ## 00000034 -/* 00AD4 809FBAA4 A60A00B8 */ sh $t2, 0x00B8($s0) ## 000000B8 -.L809FBAA8: -/* 00AD8 809FBAA8 8FBF0024 */ lw $ra, 0x0024($sp) -.L809FBAAC: -/* 00ADC 809FBAAC 8FB00020 */ lw $s0, 0x0020($sp) -/* 00AE0 809FBAB0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00AE4 809FBAB4 03E00008 */ jr $ra -/* 00AE8 809FBAB8 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBABC.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBABC.s deleted file mode 100644 index 86e6943552..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBABC.s +++ /dev/null @@ -1,49 +0,0 @@ -glabel func_809FBABC -/* 00AEC 809FBABC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00AF0 809FBAC0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00AF4 809FBAC4 AFB00020 */ sw $s0, 0x0020($sp) -/* 00AF8 809FBAC8 AFA5002C */ sw $a1, 0x002C($sp) -/* 00AFC 809FBACC 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00B00 809FBAD0 44813000 */ mtc1 $at, $f6 ## $f6 = 200.00 -/* 00B04 809FBAD4 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 00B08 809FBAD8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00B0C 809FBADC 3C0F80A0 */ lui $t7, %hi(func_809FBB64) ## $t7 = 80A00000 -/* 00B10 809FBAE0 4606203C */ c.lt.s $f4, $f6 -/* 00B14 809FBAE4 24840068 */ addiu $a0, $a0, 0x0068 ## $a0 = 00000068 -/* 00B18 809FBAE8 3C054080 */ lui $a1, 0x4080 ## $a1 = 40800000 -/* 00B1C 809FBAEC 3C063F19 */ lui $a2, 0x3F19 ## $a2 = 3F190000 -/* 00B20 809FBAF0 45000010 */ bc1f .L809FBB34 -/* 00B24 809FBAF4 25EFBB64 */ addiu $t7, $t7, %lo(func_809FBB64) ## $t7 = 809FBB64 -/* 00B28 809FBAF8 34C6999A */ ori $a2, $a2, 0x999A ## $a2 = 3F19999A -/* 00B2C 809FBAFC 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00B30 809FBB00 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000 -/* 00B34 809FBB04 8605008A */ lh $a1, 0x008A($s0) ## 0000008A -/* 00B38 809FBB08 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00B3C 809FBB0C AFAE0010 */ sw $t6, 0x0010($sp) -/* 00B40 809FBB10 38A58000 */ xori $a1, $a1, 0x8000 ## $a1 = FFFF8000 -/* 00B44 809FBB14 00052C00 */ sll $a1, $a1, 16 -/* 00B48 809FBB18 00052C03 */ sra $a1, $a1, 16 -/* 00B4C 809FBB1C 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00B50 809FBB20 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 00B54 809FBB24 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 00B58 809FBB28 240703E8 */ addiu $a3, $zero, 0x03E8 ## $a3 = 000003E8 -/* 00B5C 809FBB2C 10000003 */ beq $zero, $zero, .L809FBB3C -/* 00B60 809FBB30 8A190030 */ lwl $t9, 0x0030($s0) ## 00000030 -.L809FBB34: -/* 00B64 809FBB34 AE0F0190 */ sw $t7, 0x0190($s0) ## 00000190 -/* 00B68 809FBB38 8A190030 */ lwl $t9, 0x0030($s0) ## 00000030 -.L809FBB3C: -/* 00B6C 809FBB3C 9A190033 */ lwr $t9, 0x0033($s0) ## 00000033 -/* 00B70 809FBB40 AA1900B4 */ swl $t9, 0x00B4($s0) ## 000000B4 -/* 00B74 809FBB44 BA1900B7 */ swr $t9, 0x00B7($s0) ## 000000B7 -/* 00B78 809FBB48 96190034 */ lhu $t9, 0x0034($s0) ## 00000034 -/* 00B7C 809FBB4C A61900B8 */ sh $t9, 0x00B8($s0) ## 000000B8 -/* 00B80 809FBB50 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00B84 809FBB54 8FB00020 */ lw $s0, 0x0020($sp) -/* 00B88 809FBB58 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00B8C 809FBB5C 03E00008 */ jr $ra -/* 00B90 809FBB60 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBB64.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBB64.s deleted file mode 100644 index 5b164aad12..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBB64.s +++ /dev/null @@ -1,74 +0,0 @@ -glabel func_809FBB64 -/* 00B94 809FBB64 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00B98 809FBB68 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00B9C 809FBB6C AFB00020 */ sw $s0, 0x0020($sp) -/* 00BA0 809FBB70 AFA50034 */ sw $a1, 0x0034($sp) -/* 00BA4 809FBB74 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00BA8 809FBB78 44813000 */ mtc1 $at, $f6 ## $f6 = 200.00 -/* 00BAC 809FBB7C C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 00BB0 809FBB80 3C0B80A0 */ lui $t3, %hi(func_809FBABC) ## $t3 = 80A00000 -/* 00BB4 809FBB84 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00BB8 809FBB88 4604303E */ c.le.s $f6, $f4 -/* 00BBC 809FBB8C 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 00BC0 809FBB90 3C063F19 */ lui $a2, 0x3F19 ## $a2 = 3F190000 -/* 00BC4 809FBB94 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00BC8 809FBB98 45000027 */ bc1f .L809FBC38 -/* 00BCC 809FBB9C 256BBABC */ addiu $t3, $t3, %lo(func_809FBABC) ## $t3 = 809FBABC -/* 00BD0 809FBBA0 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00 -/* 00BD4 809FBBA4 A48001F0 */ sh $zero, 0x01F0($a0) ## 000001F0 -/* 00BD8 809FBBA8 24840068 */ addiu $a0, $a0, 0x0068 ## $a0 = 00000068 -/* 00BDC 809FBBAC 44050000 */ mfc1 $a1, $f0 -/* 00BE0 809FBBB0 44070000 */ mfc1 $a3, $f0 -/* 00BE4 809FBBB4 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00BE8 809FBBB8 34C6999A */ ori $a2, $a2, 0x999A ## $a2 = 3F19999A -/* 00BEC 809FBBBC 860E0032 */ lh $t6, 0x0032($s0) ## 00000032 -/* 00BF0 809FBBC0 8605008A */ lh $a1, 0x008A($s0) ## 0000008A -/* 00BF4 809FBBC4 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001 -/* 00BF8 809FBBC8 AFAF0010 */ sw $t7, 0x0010($sp) -/* 00BFC 809FBBCC 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00C00 809FBBD0 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 00C04 809FBBD4 240703E8 */ addiu $a3, $zero, 0x03E8 ## $a3 = 000003E8 -/* 00C08 809FBBD8 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 00C0C 809FBBDC A7AE002C */ sh $t6, 0x002C($sp) -/* 00C10 809FBBE0 86180032 */ lh $t8, 0x0032($s0) ## 00000032 -/* 00C14 809FBBE4 87B9002C */ lh $t9, 0x002C($sp) -/* 00C18 809FBBE8 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00C1C 809FBBEC 44984000 */ mtc1 $t8, $f8 ## $f8 = 0.00 -/* 00C20 809FBBF0 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00 -/* 00C24 809FBBF4 44819000 */ mtc1 $at, $f18 ## $f18 = 200.00 -/* 00C28 809FBBF8 468040A0 */ cvt.s.w $f2, $f8 -/* 00C2C 809FBBFC 3C0980A0 */ lui $t1, %hi(func_809FBC6C) ## $t1 = 80A00000 -/* 00C30 809FBC00 24080003 */ addiu $t0, $zero, 0x0003 ## $t0 = 00000003 -/* 00C34 809FBC04 2529BC6C */ addiu $t1, $t1, %lo(func_809FBC6C) ## $t1 = 809FBC6C -/* 00C38 809FBC08 46805420 */ cvt.s.w $f16, $f10 -/* 00C3C 809FBC0C 46101081 */ sub.s $f2, $f2, $f16 -/* 00C40 809FBC10 46001005 */ abs.s $f0, $f2 -/* 00C44 809FBC14 4612003C */ c.lt.s $f0, $f18 -/* 00C48 809FBC18 00000000 */ nop -/* 00C4C 809FBC1C 45020009 */ bc1fl .L809FBC44 -/* 00C50 809FBC20 8A0D0030 */ lwl $t5, 0x0030($s0) ## 00000030 -/* 00C54 809FBC24 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00C58 809FBC28 A60801F0 */ sh $t0, 0x01F0($s0) ## 000001F0 -/* 00C5C 809FBC2C AE090190 */ sw $t1, 0x0190($s0) ## 00000190 -/* 00C60 809FBC30 10000003 */ beq $zero, $zero, .L809FBC40 -/* 00C64 809FBC34 E6040068 */ swc1 $f4, 0x0068($s0) ## 00000068 -.L809FBC38: -/* 00C68 809FBC38 A60A01F0 */ sh $t2, 0x01F0($s0) ## 000001F0 -/* 00C6C 809FBC3C AE0B0190 */ sw $t3, 0x0190($s0) ## 00000190 -.L809FBC40: -/* 00C70 809FBC40 8A0D0030 */ lwl $t5, 0x0030($s0) ## 00000030 -.L809FBC44: -/* 00C74 809FBC44 9A0D0033 */ lwr $t5, 0x0033($s0) ## 00000033 -/* 00C78 809FBC48 AA0D00B4 */ swl $t5, 0x00B4($s0) ## 000000B4 -/* 00C7C 809FBC4C BA0D00B7 */ swr $t5, 0x00B7($s0) ## 000000B7 -/* 00C80 809FBC50 960D0034 */ lhu $t5, 0x0034($s0) ## 00000034 -/* 00C84 809FBC54 A60D00B8 */ sh $t5, 0x00B8($s0) ## 000000B8 -/* 00C88 809FBC58 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00C8C 809FBC5C 8FB00020 */ lw $s0, 0x0020($sp) -/* 00C90 809FBC60 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00C94 809FBC64 03E00008 */ jr $ra -/* 00C98 809FBC68 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBC6C.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBC6C.s deleted file mode 100644 index 7fe8e3c2a0..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBC6C.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_809FBC6C -/* 00C9C 809FBC6C AFA50004 */ sw $a1, 0x0004($sp) -/* 00CA0 809FBC70 848F00B6 */ lh $t7, 0x00B6($a0) ## 000000B6 -/* 00CA4 809FBC74 848E008A */ lh $t6, 0x008A($a0) ## 0000008A -/* 00CA8 809FBC78 3C198016 */ lui $t9, 0x8016 ## $t9 = 80160000 -/* 00CAC 809FBC7C 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00CB0 809FBC80 01CFC023 */ subu $t8, $t6, $t7 -/* 00CB4 809FBC84 A49801E8 */ sh $t8, 0x01E8($a0) ## 000001E8 -/* 00CB8 809FBC88 8739FA24 */ lh $t9, -0x05DC($t9) ## 8015FA24 -/* 00CBC 809FBC8C 1320000B */ beq $t9, $zero, .L809FBCBC -/* 00CC0 809FBC90 00000000 */ nop -/* 00CC4 809FBC94 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 00CC8 809FBC98 44813000 */ mtc1 $at, $f6 ## $f6 = 200.00 -/* 00CCC 809FBC9C 3C0980A0 */ lui $t1, %hi(func_809FBABC) ## $t1 = 80A00000 -/* 00CD0 809FBCA0 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001 -/* 00CD4 809FBCA4 4606203C */ c.lt.s $f4, $f6 -/* 00CD8 809FBCA8 2529BABC */ addiu $t1, $t1, %lo(func_809FBABC) ## $t1 = 809FBABC -/* 00CDC 809FBCAC 45000003 */ bc1f .L809FBCBC -/* 00CE0 809FBCB0 00000000 */ nop -/* 00CE4 809FBCB4 A48801F0 */ sh $t0, 0x01F0($a0) ## 000001F0 -/* 00CE8 809FBCB8 AC890190 */ sw $t1, 0x0190($a0) ## 00000190 -.L809FBCBC: -/* 00CEC 809FBCBC 03E00008 */ jr $ra -/* 00CF0 809FBCC0 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s deleted file mode 100644 index bd35721abc..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s +++ /dev/null @@ -1,9 +0,0 @@ -glabel func_809FBD8C -/* 00DBC 809FBD8C AFA40000 */ sw $a0, 0x0000($sp) -/* 00DC0 809FBD90 AFA50004 */ sw $a1, 0x0004($sp) -/* 00DC4 809FBD94 AFA60008 */ sw $a2, 0x0008($sp) -/* 00DC8 809FBD98 AFA7000C */ sw $a3, 0x000C($sp) -/* 00DCC 809FBD9C 03E00008 */ jr $ra -/* 00DD0 809FBDA0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 - - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s b/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s deleted file mode 100644 index 62d9896a91..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s +++ /dev/null @@ -1,8 +0,0 @@ -glabel func_809FBDA4 -/* 00DD4 809FBDA4 AFA40000 */ sw $a0, 0x0000($sp) -/* 00DD8 809FBDA8 AFA50004 */ sw $a1, 0x0004($sp) -/* 00DDC 809FBDAC AFA60008 */ sw $a2, 0x0008($sp) -/* 00DE0 809FBDB0 03E00008 */ jr $ra -/* 00DE4 809FBDB4 AFA7000C */ sw $a3, 0x000C($sp) - - diff --git a/data/overlays/actors/z_en_dog.data.s b/data/overlays/actors/z_en_dog.data.s deleted file mode 100644 index a33e77a76f..0000000000 --- a/data/overlays/actors/z_en_dog.data.s +++ /dev/null @@ -1,28 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .data - -glabel En_Dog_InitVars - .word 0x019B0400, 0x00000000, 0x016B0000, 0x00000290 -.word EnDog_Init -.word EnDog_Destroy -.word EnDog_Update -.word EnDog_Draw -glabel D_809FBF10 - .word 0x06000939, 0x10010000, 0x00000000, 0x00000000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00010100, 0x00100014, 0x00000000, 0x00000000 -glabel D_809FBF3C - .word 0x00000000, 0x00000000, 0x32000000 -glabel D_809FBF48 - .word 0x06001368, 0x3F800000, 0x00000000, 0xBF800000, 0x00000000, 0x00000000, 0x06001368, 0x3F800000, 0x00000000, 0xBF800000, 0x00000000, 0xC0C00000, 0x06000D78, 0x3F800000, 0x00000000, 0xBF800000, 0x00000000, 0xC0C00000, 0x06000278, 0x3F800000, 0x00000000, 0xBF800000, 0x00000000, 0xC0C00000, 0x06001150, 0x3F800000, 0x00000000, 0x40800000, 0x02000000, 0xC0C00000, 0x06001150, 0x3F800000, 0x40A00000, 0x41C80000, 0x04000000, 0xC0C00000, 0x06000928, 0x3F800000, 0x00000000, 0x40C00000, 0x02000000, 0xC0C00000, 0x06000C28, 0x3F800000, 0x00000000, 0xBF800000, 0x00000000, 0xC0C00000 -glabel D_809FC008 - .word 0x00000003, 0x00000005, 0x00000002 -glabel D_809FC014 - .word 0x00000028, 0x00000050, 0x00000014 -glabel D_809FC020 - .word 0xFFFFC800, 0x96643200, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_en_dog.reloc.s b/data/overlays/actors/z_en_dog.reloc.s deleted file mode 100644 index f77267065b..0000000000 --- a/data/overlays/actors/z_en_dog.reloc.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata -glabel D_809FC080 - -.incbin "baserom/ovl_En_Dog", 0x10B0, 0x00000150 diff --git a/data/overlays/actors/z_en_dog.rodata.s b/data/overlays/actors/z_en_dog.rodata.s deleted file mode 100644 index 62684d78f9..0000000000 --- a/data/overlays/actors/z_en_dog.rodata.s +++ /dev/null @@ -1,33 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata - -glabel D_809FC030 - .asciz "../z_en_dog.c" - .balign 4 - -glabel D_809FC040 - .asciz "../z_en_dog.c" - .balign 4 - -glabel jtbl_809FC050 -.word L809FB178 -.word L809FB184 -.word L809FB190 -.word L809FB19C -.word L809FB1B0 -.word L809FB1A8 -glabel jtbl_809FC068 -.word L809FB260 -.word L809FB270 -.word L809FB280 -.word L809FB1E8 -.word L809FB288 -.word L809FB224 - - diff --git a/include/functions.h b/include/functions.h index a30733cd35..6e66757dd1 100644 --- a/include/functions.h +++ b/include/functions.h @@ -392,6 +392,7 @@ Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx); s16 func_800347E8(s16 arg0); void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor, s16 alpha); void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor, s16 alpha); +void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* arg1, s32 arg2); void Actor_Noop(Actor* actor, GlobalContext* globalCtx); void Draw_DListOpa(GlobalContext* globalCtx, u32 dlist); void Draw_DListXlu(GlobalContext* globalCtx, u32 dlist); @@ -985,6 +986,7 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2); void func_80088B34(s16 arg0); void Interface_Draw(GlobalContext* globalCtx); void Interface_Update(GlobalContext* globalCtx); +f32 func_8008E520(Actor*, UNK_PTR movementPath, s16, s16*); // ? func_8008E6A0(?); // ? func_8008E6AC(?); // ? func_8008E750(?); diff --git a/include/z64.h b/include/z64.h index 096cb5f227..d8286e045c 100644 --- a/include/z64.h +++ b/include/z64.h @@ -949,7 +949,7 @@ typedef struct GlobalContext /* 0x11DFC */ UNK_PTR unk_11DFC; /* 0x11E00 */ EntranceEntry* setupEntranceList; /* 0x11E04 */ UNK_PTR setupExitList; - /* 0x11E08 */ UNK_PTR setupPathList; + /* 0x11E08 */ Path* setupPathList; /* 0x11E0C */ UNK_PTR naviMsgSegment; /* 0x11E10 */ char unk_11E10[0x4]; /* 0x11E14 */ u8 skyboxId; @@ -1005,6 +1005,17 @@ typedef struct LoadedParticleEntry /* 0x005F */ u8 type; } LoadedParticleEntry; // size = 0x60 +// Some animation related structure +typedef struct +{ + /* 0x00 */ u32 animation; + /* 0x04 */ f32 playbackSpeed; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 frameCount; + /* 0x10 */ u8 unk_10; + /* 0x14 */ f32 transitionRate; +} struct_80034EC0_Entry; // size = 0x18 + typedef struct { /* 0x00 */ u8 limbCount; @@ -1012,7 +1023,7 @@ typedef struct /* 0x02 */ u8 dListCount; /* 0x03 */ char unk_03[0x01]; /* Probably Padding */ /* 0x04 */ u32 limbIndex; - /* 0x08 */ u32 animCurrent; + /* 0x08 */ u32* animCurrent; /* 0x0C */ char unk_0C[0x04]; /* 0x10 */ f32 animFrameCount; /* 0x14 */ f32 unk_14; @@ -1029,17 +1040,6 @@ typedef struct /* 0x3E */ u16 unk_3E; /* Probably Padding */ } SkelAnime; // size = 0x40 -// Some animation related structure -typedef struct -{ - /* 0x00 */ u32 animation; - /* 0x04 */ f32 playbackSpeed; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 frameCount; - /* 0x10 */ u8 unk_10; - /* 0x14 */ f32 transitionRate; -} struct_80034EC0_Entry; // size = 0x18 - typedef struct { /* 0x00 */ u32 unk_00; diff --git a/include/z64scene.h b/include/z64scene.h index 66bfade3b9..4d331c932e 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -390,6 +390,12 @@ typedef struct s32 properties; } WaterBoxHeader; +typedef struct +{ + /* 0x00 */ u8 count; // Total number of points in the path for the actor to follow + /* 0x04 */ Vec3s* path; // Segment Address of the start of the path list +} Path; // size = 0x8 + typedef union { SCmdBase base; diff --git a/spec b/spec index 00c5891b03..d2b296a6d1 100644 --- a/spec +++ b/spec @@ -2600,9 +2600,7 @@ endseg beginseg name "ovl_En_Dog" include "build/src/overlays/actors/ovl_En_Dog/z_en_dog.o" - include "build/data/overlays/actors/z_en_dog.data.o" - include "build/data/overlays/actors/z_en_dog.rodata.o" - include "build/data/overlays/actors/z_en_dog.reloc.o" + include "build/src/overlays/actors/ovl_En_Dog/z_en_dog_reloc.o" endseg beginseg diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 3b6698c300..9c9690299d 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3763,7 +3763,7 @@ void Actor_SetTextWithPrefix(GlobalContext* globalCtx, Actor* actor, s16 baseTex case SCENE_HAKADAN_BS: case SCENE_KAKARIKO: case SCENE_KAKARIKO3: - case SCENE_IMPA: + case SCENE_BACK_ALLEY: case SCENE_HUT: case SCENE_HAKAANA: case SCENE_HAKASITARELAY: @@ -4344,17 +4344,6 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) return arg2; } -// Some animation related structure -typedef struct -{ - /* 0x00 */ u32 animation; - /* 0x04 */ f32 playbackSpeed; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 frameCount; - /* 0x10 */ u8 unk_10; - /* 0x14 */ f32 transitionRate; -} struct_80034EC0_Entry; // size = 0x18 - void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* arg1, s32 arg2) { f32 frameCount; diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 63802a7427..23197ea6ca 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -14,7 +14,7 @@ void SaveContext_Init(void) gSaveContext.chamber_cutscene_num = 0; gSaveContext.next_day_time = 0xFFFF; gSaveContext.environment_time = 0; - gSaveContext.unk_141C = 1; + gSaveContext.richardIsLost = 1; gSaveContext.transition_type = 0xFF; gSaveContext.unk_13EE = 50; } diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index cb5fb307c5..0ec2486052 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -72,7 +72,7 @@ RestrictionFlags sRestrictionFlags[] = { SCENE_KOKIRI_HOME5, 0x10, 0x10, 0x15 }, { SCENE_MALON_STABLE, 0x10, 0x10, 0x15 }, { SCENE_HUT, 0x10, 0x10, 0x15 }, - { SCENE_IMPA, 0x10, 0x10, 0x15 }, + { SCENE_BACK_ALLEY, 0x10, 0x10, 0x15 }, { SCENE_LABO, 0x10, 0x10, 0x15 }, { SCENE_HYLIA_LABO, 0x00, 0x10, 0x15 }, { SCENE_TENT, 0x10, 0x10, 0x15 }, diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 9442f828fc..7a09ca6d97 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -3,27 +3,18 @@ #define ROOM 0x00 #define FLAGS 0x00000000 -void func_809FAFD0(EnDog* this, GlobalContext* globalCtx); -void func_809FB038(EnDog* this, GlobalContext* globalCtx); -void func_809FB0A0(EnDog* this, GlobalContext* globalCtx); -void func_809FB108(EnDog* this); -s8 func_809FB29C(EnDog* this, GlobalContext* globalCtx); -void func_809FB320(EnDog* this, GlobalContext* globalCtx); -void func_809FB3AC(EnDog* this, GlobalContext* globalCtx); -void EnDog_Init(EnDog* this, GlobalContext* globalCtx); -void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx); -void func_809FB6C4(EnDog* this, GlobalContext* globalCtx); -void func_809FB858(EnDog* this, GlobalContext* globalCtx); -void func_809FB940(EnDog* this, GlobalContext* globalCtx); -void func_809FBABC(EnDog* this, GlobalContext* globalCtx); -void func_809FBB64(EnDog* this, GlobalContext* globalCtx); -void func_809FBC6C(EnDog* this, GlobalContext* globalCtx); -void EnDog_Update(EnDog* this, GlobalContext* globalCtx); -void func_809FBD8C(EnDog* this, GlobalContext* globalCtx); -void func_809FBDA4(EnDog* this, GlobalContext* globalCtx); -void EnDog_Draw(EnDog* this, GlobalContext* globalCtx); +static void EnDog_Init(EnDog* this, GlobalContext* globalCtx); +static void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx); +static void EnDog_Update(EnDog* this, GlobalContext* globalCtx); +static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx); + +static void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx); +static void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx); +static void EnDog_FollowLink(EnDog* this, GlobalContext* globalCtx); +static void EnDog_RunAway(EnDog* this, GlobalContext* globalCtx); +static void EnDog_FaceLink(EnDog* this, GlobalContext* globalCtx); +static void EnDog_Wait(EnDog* this, GlobalContext* globalCtx); -/* const ActorInit En_Dog_InitVars = { ACTOR_EN_DOG, @@ -37,11 +28,10 @@ const ActorInit En_Dog_InitVars = (ActorFunc)EnDog_Update, (ActorFunc)EnDog_Draw, }; -*/ static ColliderCylinderInit cylinderInit = { - 0x06, 0x00, 0x09, 0x39, // ColliderBodyInfo + 0x06, 0x00, 0x09, 0x39, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00000000, @@ -50,12 +40,14 @@ static ColliderCylinderInit cylinderInit = 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, - 0x0010, // radius - 0x0014, // height - 0x0000, // yShift - 0x0000, 0x0000, 0x0000 //Vec3s xyz + 0x0010, + 0x0014, + 0x0000, + 0x0000, 0x0000, 0x0000, }; +// There are multiple versions of sub98 init structs +// Keeping these local until z_collision_check is decompiled typedef struct { /* 0x00 */ u8 health; @@ -65,82 +57,170 @@ typedef struct /* 0x08 */ u8 mass; }sub98Init; -sub98Init sub98Data = +static sub98Init sub98Data = { 0x00, //health 0x0000, //unk_10 0x0000, //unk_12 0x0000, //unk_14 - 0x32 //mass + 0x32, //mass }; -struct_80034EC0_Entry skelanimeArr[]= +static struct_80034EC0_Entry animations[]= { {0x06001368, 1.0f, 0.0f, -1.0f, 0x00, 0.0f}, {0x06001368, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, {0x06000D78, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, {0x06000278, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, {0x06001150, 1.0f, 0.0f, 4.0f, 0x02, -6.0f}, - {0x06001150, 1.0f, 0.0f, 25.0f,0x04, -6.0f}, + {0x06001150, 1.0f, 5.0f, 25.0f,0x04, -6.0f}, {0x06000928, 1.0f, 0.0f, 6.0f, 0x02, -6.0f}, - {0x06000C28, 1.0f, 0.0f, -1.0f, 0x00, -6.0f} + {0x06000C28, 1.0f, 0.0f, -1.0f, 0x00, -6.0f}, }; -extern D_06007290; - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FAFD0.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB038.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB0A0.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB108.s") -/* -void func_809FB108(EnDog* this) +// Bandaid fix for a lw vs lh issue in EnDog_FollowPath. Roman will look at it later. +typedef union { - s32 animationIndex; - - if (this->unk_1F0 != this->unk_1F2) + /* 0x00 */ s32 entry; + struct { - if (this->unk_1F0 == 4) - { - this->unk_1F0 = 3; - } - if (this->unk_1F0 == 6) - { - this->unk_1F0 = 5; - } + s16 unk_0; + s16 unk_2; + }; +}s16ArrEntry; - this->unk_1F2 = this->unk_1F0; - if (this->unk_1F0 < 6U) - { - switch(this->unk_1F0) - { - case 1: animationIndex = 2; - case 2: animationIndex = 3; - case 3: animationIndex = 4; - case 5: animationIndex = 6; - default: animationIndex = 1; - } - } - } +typedef enum +{ + /* 0x00 */ DOG_WALK, + /* 0x01 */ DOG_RUN, + /* 0x02 */ DOG_BARK, + /* 0x03 */ DOG_SIT, + /* 0x04 */ DOG_SIT_2, + /* 0x05 */ DOG_BOW, + /* 0x06 */ DOG_BOW_2, +} DogBehavior; - if (this->unk_1F2 < 6U) +extern UNK_PTR D_06007290; +extern UNK_PTR D_06001368; +extern UNK_PTR D_06000D78; +extern UNK_PTR D_06000278; + +static void EnDog_WalkSFX(EnDog* this) +{ + u32* walk = &D_06001368; + if (this->skelAnime.animCurrent == walk) { - + if ((this->skelAnime.animCurrentFrame == 1.0f) || (this->skelAnime.animCurrentFrame == 7.0f)) + { + Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK); + } } } -*/ -s8 func_809FB29C(EnDog* this, GlobalContext* globalCtx) +static void EnDog_RunSFX(EnDog* this) +{ + u32* run = &D_06000D78; + if (this->skelAnime.animCurrent == run) + { + if ((this->skelAnime.animCurrentFrame == 2.0f) || (this->skelAnime.animCurrentFrame == 4.0f)) + { + Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK); + } + } +} + +static void EnDog_BarkSFX(EnDog* this) +{ + u32* bark = &D_06000278; + if (this->skelAnime.animCurrent == bark) + { + if ((this->skelAnime.animCurrentFrame == 13.0f) || (this->skelAnime.animCurrentFrame == 19.0f)) + { + Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK); + } + } +} + +static s32 EnDog_PlayAnimSFX(EnDog* this) +{ + s32 animation; + + if (this->behavior != this->nextBehavior) + { + if (this->nextBehavior == DOG_SIT_2) + { + this->nextBehavior = DOG_SIT; + } + if (this->nextBehavior == DOG_BOW_2) + { + this->nextBehavior = DOG_BOW; + } + + this->behavior = this->nextBehavior; + switch(this->behavior) + { + case DOG_WALK: + animation = 1; + break; + case DOG_RUN: + animation = 2; + break; + case DOG_BARK: + animation = 3; + break; + case DOG_SIT: + animation = 4; + break; + case DOG_BOW: + animation = 6; + break; + } + func_80034EC0(&this->skelAnime, &animations, animation); + } + + switch(this->behavior) + { + case DOG_SIT: + if (func_800A56C8(&this->skelAnime, this->skelAnime.animFrameCount) != 0) + { + func_80034EC0(&this->skelAnime, &animations, 5); + this->behavior = this->nextBehavior = DOG_SIT_2; + } + break; + case DOG_BOW: + if (func_800A56C8(&this->skelAnime, this->skelAnime.animFrameCount) != 0) + { + func_80034EC0(&this->skelAnime, &animations, 7); + this->behavior = this->nextBehavior = DOG_BOW_2; + } + break; + case DOG_WALK: + EnDog_WalkSFX(this); + break; + case DOG_RUN: + EnDog_RunSFX(this); + break; + case DOG_BARK: + EnDog_BarkSFX(this); + if (this){} // needed for regalloc + break; + } + return 0; +} + +static s8 EnDog_CanFollow(EnDog* this, GlobalContext* globalCtx) { if ((this->collider.base.collideFlags & 2) != 0) { this->collider.base.collideFlags &= 0xFFFD; return 2; } + if (globalCtx->sceneNum == SCENE_MARKET_DAY) { return 0; } + if ((this->collider.base.maskB & 1) != 0) { this->collider.base.maskB &= 0xFFFE; @@ -151,13 +231,67 @@ s8 func_809FB29C(EnDog* this, GlobalContext* globalCtx) gSaveContext.dogParams = (this->actor.params & 0x7FFF); return 1; } + return 0; } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB320.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB3AC.s") +static EnDog_UpdateWaypoint(EnDog* this, GlobalContext* globalCtx) +{ + s32 change; -void EnDog_Init(EnDog* this, GlobalContext* globalCtx) + if (this->path == NULL) + { + return 0; + } + + if (this->reverse) + { + change = -1; + } + else + { + change = 1; + } + + this->waypoint += change; + + if (this->reverse != 0) + { + if (this->waypoint < 0) + { + this->waypoint = this->path->count - 1; + } + } + else + { + if ((this->path->count - 1) < this->waypoint) + { + this->waypoint = 0; + } + } + + return 1; +} + +static s32 EnDog_Orient(EnDog* this, GlobalContext* globalCtx) +{ + s16 targetYaw; + f32 waypointDistSq; + + waypointDistSq = func_8008E520(&this->actor, this->path, this->waypoint, &targetYaw); + Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, targetYaw, 10, 1000, 1); + + if ((waypointDistSq > 0.0f) && (waypointDistSq < 1000.0f)) + { + return EnDog_UpdateWaypoint(this, globalCtx); + } + else + { + return 0; + } +} + +static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) { SkelAnime* skelAnime; s16 followingDog; @@ -167,11 +301,11 @@ void EnDog_Init(EnDog* this, GlobalContext* globalCtx) ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 24.0f); skelAnime = &this->skelAnime; func_800A46F8(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13); - func_80034EC0(skelAnime, skelanimeArr, 0); + func_80034EC0(skelAnime, animations, 0); if ((this->actor.params & 0x8000) == 0) { - this->actor.params = (this->actor.params & 0xF0FF) | ((((this->actor.params & 0xF00) >> 8) + 1) << 8); + this->actor.params = (this->actor.params & 0xF0FF) | ((((this->actor.params & 0x0F00) >> 8) + 1) << 8); } followingDog = ((gSaveContext.dogParams & 0x0F00) >> 8); @@ -185,9 +319,9 @@ void EnDog_Init(EnDog* this, GlobalContext* globalCtx) ActorCollider_InitCylinder(globalCtx, collider, &this->actor, &cylinderInit); func_80061EFC(&this->actor.sub_98, 0, &sub98Data); Actor_SetScale(&this->actor, 0.0075f); - this->unk_1E6 = 0; + this->waypoint = 0; this->actor.gravity = -1.0f; - this->movementPath = func_8008E4E0(globalCtx, ((((this->actor.params & 0x00F0) >> 4) << 0x10) >> 0x10), 0xF); + this->path = func_8008E4E0(globalCtx, (s16)((this->actor.params & 0x00F0) >> 4), 0xF); switch (globalCtx->sceneNum) { @@ -203,8 +337,8 @@ void EnDog_Init(EnDog* this, GlobalContext* globalCtx) { if (gSaveContext.richardIsLost == 0) { - this->unk_1F0 = 3; - this->actionFunc = &func_809FBC6C; + this->nextBehavior = DOG_SIT; + this->actionFunc = EnDog_Wait; this->actor.speedXZ = 0.0f; return; } @@ -221,102 +355,136 @@ void EnDog_Init(EnDog* this, GlobalContext* globalCtx) if ((u32)(this->actor.params & 0x8000) != 0) { - this->unk_1F0 = 0; - this->actionFunc = &func_809FB940; + this->nextBehavior = DOG_WALK; + this->actionFunc = EnDog_FollowLink; } else { - this->unk_1F0 = 3; - this->actionFunc = &func_809FB858; + this->nextBehavior = DOG_SIT; + this->actionFunc = EnDog_ChooseMovement; } } -void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx) +static void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx) { ColliderCylinderMain* collider = &this->collider; ActorCollider_FreeCylinder(globalCtx, collider); } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FB6C4.s") - -void func_809FB858(EnDog* this, GlobalContext* globalCtx) +static void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) { - s32 temp1EC; + s16ArrEntry behaviors[] = { 3, 5, 2 }; + s16ArrEntry unused[] = { 40, 80, 20 }; + f32 speed; + s32 frame; - if (func_809FB29C(this, globalCtx) == 1) //if this dog is the one thats following + if (EnDog_CanFollow(this, globalCtx) == 1) { - this->actionFunc = &func_809FB940; //follow function? + this->actionFunc = EnDog_FollowLink; } - if (this->unk_1EC == 0) + if(DECR(this->behaviorTimer)) { - temp1EC = 0; - } - else - { - this->unk_1EC -= 1; - temp1EC = this->unk_1EC; - } - - if(temp1EC == 0) - { - this->unk_1EC = Math_Rand_S16Offset(200, 100); - if ((globalCtx->state.frames & 1) != 0) //odd frame + if (this->nextBehavior == DOG_WALK) { - this->unk_1F0 = 0; + speed = 1.0f; } else { - this->unk_1F0 = 1; + speed = 4.0f; + } + Math_SmoothScaleMaxMinF(&this->actor.speedXZ, speed, 0.4f, 1.0f, 0.0f); + EnDog_Orient(this, globalCtx); + this->actor.shape.rot = this->actor.posRot.rot; + + // Used to change between two text boxes for Richard's owner in the Market Day scene + // depending on where he is on his path. En_Hy checks these event flags. + if (this->waypoint < 9) + { + // Richard is close to her, text says something about his coat + gSaveContext.event_inf[3] |= 1; + } + else + { + // Richard is far, text says something about running fast + gSaveContext.event_inf[3] &= ~1; + } + } + else + { + frame = globalCtx->state.frames % 3; + this->nextBehavior = behaviors[frame].entry; + // no clue why they're using the action id to calculate timer. possibly meant to use the unused array? + this->behaviorTimer = Math_Rand_S16Offset(60, behaviors[frame].unk_2); + this->actionFunc = EnDog_ChooseMovement; + } +} + +static void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx) +{ + if (EnDog_CanFollow(this, globalCtx) == 1) + { + this->actionFunc = EnDog_FollowLink; + } + + if(DECR(this->behaviorTimer) == 0) + { + this->behaviorTimer = Math_Rand_S16Offset(200, 100); + if (globalCtx->state.frames % 2) + { + this->nextBehavior = DOG_WALK; + } + else + { + this->nextBehavior = DOG_RUN; } - if (this->unk_1F0 == 1) + if (this->nextBehavior == DOG_RUN) { - this->unk_1EC = (this->unk_1EC / 2); + this->behaviorTimer = (this->behaviorTimer / 2); } - this->actionFunc = &func_809FB6C4; + this->actionFunc = EnDog_FollowPath; } Math_SmoothScaleMaxMinF(&this->actor.speedXZ, 0.0f, 0.4f, 1.0f, 0.0f); } -//EnDog_Follow -void func_809FB940(EnDog* this, GlobalContext* globalCtx) +static void EnDog_FollowLink(EnDog* this, GlobalContext* globalCtx) { f32 speed; if (gSaveContext.dogParams == 0) { - this->unk_1F0 = 3; - this->actionFunc = &func_809FBC6C; + this->nextBehavior = DOG_SIT; + this->actionFunc = EnDog_Wait; this->actor.speedXZ = 0.0f; return; } if (this->actor.xzDistanceFromLink > 400.0f) { - if (this->unk_1F0 != 3 && this->unk_1F0 != 4) + if (this->nextBehavior != DOG_SIT && this->nextBehavior != DOG_SIT_2) { - this->unk_1F0 = 5; + this->nextBehavior = DOG_BOW; } gSaveContext.dogParams = 0; speed = 0.0f; } else if (this->actor.xzDistanceFromLink > 100.0f) { - this->unk_1F0 = 1; + this->nextBehavior = DOG_RUN; speed = 4.0f; } else if (this->actor.xzDistanceFromLink < 40.0f) { - if (this->unk_1F0 != 5 && this->unk_1F0 != 6) + if (this->nextBehavior != DOG_BOW && this->nextBehavior != DOG_BOW_2) { - this->unk_1F0 = 5; + this->nextBehavior = DOG_BOW; } speed = 0.0f; } else { - this->unk_1F0 = 0; + this->nextBehavior = DOG_WALK; speed = 1.0f; } @@ -329,7 +497,7 @@ void func_809FB940(EnDog* this, GlobalContext* globalCtx) } } -void func_809FBABC(EnDog* this, GlobalContext* globalCtx) +static void EnDog_RunAway(EnDog* this, GlobalContext* globalCtx) { if (this->actor.xzDistanceFromLink < 200.0f) { @@ -338,20 +506,21 @@ void func_809FBABC(EnDog* this, GlobalContext* globalCtx) } else { - this->actionFunc = &func_809FBB64; + this->actionFunc = EnDog_FaceLink; } this->actor.shape.rot = this->actor.posRot.rot; } -void func_809FBB64(EnDog* this, GlobalContext* globalCtx) +static void EnDog_FaceLink(EnDog* this, GlobalContext* globalCtx) { s16 rotTowardLink; s16 prevRotY; f32 absAngleDiff; + // if the dog is more than 200 units away from Link, turn to face him then wait if (200.0f <= this->actor.xzDistanceFromLink) { - this->unk_1F0 = 0; + this->nextBehavior = DOG_WALK; Math_SmoothScaleMaxF(&this->actor.speedXZ, 1.0f, 0.6f, 1.0f); @@ -359,51 +528,79 @@ void func_809FBB64(EnDog* this, GlobalContext* globalCtx) prevRotY = this->actor.posRot.rot.y; Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, rotTowardLink, 10, 1000, 1); - //weird temp reuse needed for regalloc absAngleDiff = this->actor.posRot.rot.y; absAngleDiff -= prevRotY; absAngleDiff = fabsf(absAngleDiff); if (absAngleDiff < 200.0f) { - this->unk_1F0 = 3; - this->actionFunc = &func_809FBC6C; + this->nextBehavior = 3; + this->actionFunc = EnDog_Wait; this->actor.speedXZ = 0.0f; } } else { - this->unk_1F0 = 1; - this->actionFunc = &func_809FBABC; + this->nextBehavior = DOG_RUN; + this->actionFunc = EnDog_RunAway; } this->actor.shape.rot = this->actor.posRot.rot; } -void func_809FBC6C(EnDog* this, GlobalContext* globalCtx) +static void EnDog_Wait(EnDog* this, GlobalContext* globalCtx) { - this->spawnAngle = (this->actor.rotTowardsLinkY - this->actor.shape.rot.y); - if ((gSaveContext.richardIsLost != 0) && (this->actor.xzDistanceFromLink < 200.0f)) + this->unusedAngle = (this->actor.rotTowardsLinkY - this->actor.shape.rot.y); + + // If another dog is following Link and he gets within 200 units of waiting dog, run away + if ((gSaveContext.dogParams != 0) && (this->actor.xzDistanceFromLink < 200.0f)) { - this->unk_1F0 = 1; - this->actionFunc = &func_809FBABC; + this->nextBehavior = DOG_RUN; + this->actionFunc = EnDog_RunAway; } } -void EnDog_Update(EnDog* this, GlobalContext* globalCtx) +static void EnDog_Update(EnDog* this, GlobalContext* globalCtx) { s32 pad1; s32 pad2; - func_809FB108(this); + EnDog_PlayAnimSFX(this); SkelAnime_FrameUpdateMatrix(&this->skelAnime); - func_8002E4B4(globalCtx, &this->actor, (f32)this->collider.dim.radius, (f32)this->collider.dim.height * 0.5f, 0.0f, 5); + func_8002E4B4(globalCtx, &this->actor, (f32)this->collider.dim.radius, + (f32)this->collider.dim.height * 0.5f, 0.0f, 5); Actor_MoveForward(&this->actor); this->actionFunc(this, globalCtx); ActorCollider_Cylinder_Update(&this->actor, &this->collider); Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); } +static UNK_TYPE EnDog_Callback1(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) +{ + return 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBD8C.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/func_809FBDA4.s") +static void EnDog_Callback2(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) +{ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dog/EnDog_Draw.s") +} + +static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) +{ + s32 pad; + Color_RGBA8 colors[] = { {0xFF, 0xFF, 0xC8, 0x00}, {0x96, 0x64, 0x32, 0x00} }; + GraphicsContext* gfxCtx; + s32 pad2[2]; + Gfx* gfxArr[2]; + + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 972); + func_80093D18(globalCtx->state.gfxCtx); + + gDPPipeSync(gfxCtx->polyOpa.p++); + gDPSetEnvColor(gfxCtx->polyOpa.p++, + colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, + colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); + + func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, + this->skelAnime.dListCount, EnDog_Callback1, EnDog_Callback2, &this->actor); + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); +} diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.h b/src/overlays/actors/ovl_En_Dog/z_en_dog.h index acaa4dee91..a47fae24e6 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.h +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.h @@ -11,19 +11,19 @@ typedef struct /* 0x018C */ char unk_18C[0x4]; /* 0x0190 */ ActorFunc actionFunc; /* 0x0194 */ ColliderCylinderMain collider; - /* 0x01E0 */ UNK_PTR movementPath; - /* 0x01E4 */ char unk_1E4[0x2]; - /* 0x01E6 */ u16 unk_1E6; - /* 0x01E8 */ s16 spawnAngle; + /* 0x01E0 */ Path* path; + /* 0x01E4 */ u8 reverse; + /* 0x01E6 */ s16 waypoint; + /* 0x01E8 */ s16 unusedAngle; /* 0x01EA */ char unk_1EA[0x2]; - /* 0x01EC */ s16 unk_1EC; + /* 0x01EC */ s16 behaviorTimer; /* 0x01EE */ char unk_1EE[0x2]; - /* 0x01F0 */ s16 unk_1F0; - /* 0x01F2 */ s16 unk_1F2; - /* 0x01F4 */ u8 unk_1F4; - /* 0x01F5 */ char unk_1F5[0x4D]; - /* 0x0242 */ u8 unk_242; - /* 0x0243 */ char unk_243[0x4D]; + /* 0x01F0 */ s16 nextBehavior; + /* 0x01F2 */ s16 behavior; + /* 0x01F4 */ u8 unk_1F4; //gets passed to skelanime thing + /* 0x01F5 */ char unk_1F5[0x4D]; //something allocated by skelanime + /* 0x0242 */ u8 unk_242; //very likley a variable from some skelanime struct + /* 0x0243 */ char unk_243[0x4D]; //something allocated by skelanime } EnDog; // size = 0x0290 extern const ActorInit En_Dog_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index b6fbf1b3bd..de2f0b4f89 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -393,4 +393,7 @@ D_06008688 = 0x06008688; D_04049210 = 0x04049210; // z_en_dog -D_06007290 = 0x06007290; \ No newline at end of file +D_06007290 = 0x06007290; +D_06001368 = 0x06001368; +D_06000D78 = 0x06000D78; +D_06000278 = 0x06000278; \ No newline at end of file From 225e7e9db9b708498bbfee6d6e52d92558365e2f Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 20 Mar 2020 08:21:33 -0400 Subject: [PATCH 08/23] fix function prototype --- include/functions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.h b/include/functions.h index 31f07cf655..95f685e1b2 100644 --- a/include/functions.h +++ b/include/functions.h @@ -988,7 +988,7 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2); void func_80088B34(s16 arg0); void Interface_Draw(GlobalContext* globalCtx); void Interface_Update(GlobalContext* globalCtx); -f32 func_8008E520(Actor*, UNK_PTR movementPath, s16, s16*); +f32 func_8008E520(Actor* actor, Path* path, s16, s16*); // ? func_8008E6A0(?); // ? func_8008E6AC(?); // ? func_8008E750(?); From dff17518ef99789195b130378ec90dc4600a73d2 Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 20 Mar 2020 20:42:57 -0400 Subject: [PATCH 09/23] pr review changes --- include/z64.h | 2 +- src/code/z_common_data.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 49 +++++++++++------------ src/overlays/actors/ovl_En_Dog/z_en_dog.h | 12 +++--- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/include/z64.h b/include/z64.h index 59d81d58f0..964402a1e5 100644 --- a/include/z64.h +++ b/include/z64.h @@ -209,7 +209,7 @@ typedef struct /* 0x1418 */ u8 fade_duration; /* 0x1419 */ u8 unk_1419; // transition related /* 0x141A */ u16 environment_time; - /* 0x141C */ u8 richardIsLost; + /* 0x141C */ u8 dogIsLost; /* 0x141D */ u8 transition_type; /* 0x141E */ char unk_141E[0x0002]; /* 0x1420 */ s16 world_map_area; diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 23197ea6ca..0625a2b542 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -14,7 +14,7 @@ void SaveContext_Init(void) gSaveContext.chamber_cutscene_num = 0; gSaveContext.next_day_time = 0xFFFF; gSaveContext.environment_time = 0; - gSaveContext.richardIsLost = 1; + gSaveContext.dogIsLost = 1; gSaveContext.transition_type = 0xFF; gSaveContext.unk_13EE = 50; } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 8705647ee4..fd57ac46a2 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -105,7 +105,7 @@ extern UNK_PTR D_06001368; extern UNK_PTR D_06000D78; extern UNK_PTR D_06000278; -static void EnDog_WalkSFX(EnDog* this) +static void EnDog_PlayWalkSFX(EnDog* this) { u32* walk = &D_06001368; if (this->skelAnime.animCurrent == walk) @@ -117,7 +117,7 @@ static void EnDog_WalkSFX(EnDog* this) } } -static void EnDog_RunSFX(EnDog* this) +static void EnDog_PlayRunSFX(EnDog* this) { u32* run = &D_06000D78; if (this->skelAnime.animCurrent == run) @@ -129,7 +129,7 @@ static void EnDog_RunSFX(EnDog* this) } } -static void EnDog_BarkSFX(EnDog* this) +static void EnDog_PlayBarkSFX(EnDog* this) { u32* bark = &D_06000278; if (this->skelAnime.animCurrent == bark) @@ -141,7 +141,7 @@ static void EnDog_BarkSFX(EnDog* this) } } -static s32 EnDog_PlayAnimSFX(EnDog* this) +static s32 EnDog_PlayAnimAndSFX(EnDog* this) { s32 animation; @@ -195,13 +195,13 @@ static s32 EnDog_PlayAnimSFX(EnDog* this) } break; case DOG_WALK: - EnDog_WalkSFX(this); + EnDog_PlayWalkSFX(this); break; case DOG_RUN: - EnDog_RunSFX(this); + EnDog_PlayRunSFX(this); break; case DOG_BARK: - EnDog_BarkSFX(this); + EnDog_PlayBarkSFX(this); if (this){} // needed for regalloc break; } @@ -210,9 +210,9 @@ static s32 EnDog_PlayAnimSFX(EnDog* this) static s8 EnDog_CanFollow(EnDog* this, GlobalContext* globalCtx) { - if ((this->collider.base.collideFlags & 2) != 0) + if ((this->collider.base.collideFlags & 2)) { - this->collider.base.collideFlags &= 0xFFFD; + this->collider.base.collideFlags &= ~2; return 2; } @@ -221,9 +221,9 @@ static s8 EnDog_CanFollow(EnDog* this, GlobalContext* globalCtx) return 0; } - if ((this->collider.base.maskB & 1) != 0) + if ((this->collider.base.maskB & 1)) { - this->collider.base.maskB &= 0xFFFE; + this->collider.base.maskB &= ~1; if (gSaveContext.dogParams != 0) { return 0; @@ -255,7 +255,7 @@ static EnDog_UpdateWaypoint(EnDog* this, GlobalContext* globalCtx) this->waypoint += change; - if (this->reverse != 0) + if (this->reverse) { if (this->waypoint < 0) { @@ -326,16 +326,15 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) switch (globalCtx->sceneNum) { case SCENE_MARKET_NIGHT: - if ((gSaveContext.richardIsLost == 0) && (((this->actor.params & 0x0F00) >> 8) == 1)) + if ((gSaveContext.dogIsLost == 0) && (((this->actor.params & 0x0F00) >> 8) == 1)) { Actor_Kill(&this->actor); } break; - // Richard's Home - case SCENE_IMPA: + case SCENE_IMPA: // Richard's Home if ((u32)(this->actor.params & 0x8000) == 0) { - if (gSaveContext.richardIsLost == 0) + if (gSaveContext.dogIsLost == 0) { this->nextBehavior = DOG_SIT; this->actionFunc = EnDog_Wait; @@ -349,8 +348,6 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) } } break; - - default: break; } if ((u32)(this->actor.params & 0x8000) != 0) @@ -373,7 +370,7 @@ static void EnDog_Destroy(EnDog* this, GlobalContext* globalCtx) static void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) { - s16ArrEntry behaviors[] = { 3, 5, 2 }; + s16ArrEntry behaviors[] = { DOG_SIT, DOG_BOW, DOG_BARK }; s16ArrEntry unused[] = { 40, 80, 20 }; f32 speed; s32 frame; @@ -383,7 +380,7 @@ static void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) this->actionFunc = EnDog_FollowLink; } - if(DECR(this->behaviorTimer)) + if (DECR(this->behaviorTimer) != 0) { if (this->nextBehavior == DOG_WALK) { @@ -427,7 +424,7 @@ static void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx) this->actionFunc = EnDog_FollowLink; } - if(DECR(this->behaviorTimer) == 0) + if (DECR(this->behaviorTimer) == 0) { this->behaviorTimer = Math_Rand_S16Offset(200, 100); if (globalCtx->state.frames % 2) @@ -441,7 +438,7 @@ static void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx) if (this->nextBehavior == DOG_RUN) { - this->behaviorTimer = (this->behaviorTimer / 2); + this->behaviorTimer /= 2; } this->actionFunc = EnDog_FollowPath; } @@ -533,7 +530,7 @@ static void EnDog_FaceLink(EnDog* this, GlobalContext* globalCtx) absAngleDiff = fabsf(absAngleDiff); if (absAngleDiff < 200.0f) { - this->nextBehavior = 3; + this->nextBehavior = DOG_SIT; this->actionFunc = EnDog_Wait; this->actor.speedXZ = 0.0f; } @@ -563,10 +560,10 @@ static void EnDog_Update(EnDog* this, GlobalContext* globalCtx) s32 pad1; s32 pad2; - EnDog_PlayAnimSFX(this); + EnDog_PlayAnimAndSFX(this); SkelAnime_FrameUpdateMatrix(&this->skelAnime); - func_8002E4B4(globalCtx, &this->actor, (f32)this->collider.dim.radius, - (f32)this->collider.dim.height * 0.5f, 0.0f, 5); + func_8002E4B4(globalCtx, &this->actor, this->collider.dim.radius, + this->collider.dim.height * 0.5f, 0.0f, 5); Actor_MoveForward(&this->actor); this->actionFunc(this, globalCtx); ActorCollider_Cylinder_Update(&this->actor, &this->collider); diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.h b/src/overlays/actors/ovl_En_Dog/z_en_dog.h index 64cac152c9..56010c68a3 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.h +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.h @@ -14,15 +14,15 @@ typedef struct /* 0x01E4 */ u8 reverse; /* 0x01E6 */ s16 waypoint; /* 0x01E8 */ s16 unusedAngle; - /* 0x01EA */ char unk_1EA[0x2]; + /* 0x01EA */ s16 pad1; /* 0x01EC */ s16 behaviorTimer; - /* 0x01EE */ char unk_1EE[0x2]; + /* 0x01EE */ s16 pad2; /* 0x01F0 */ s16 nextBehavior; /* 0x01F2 */ s16 behavior; - /* 0x01F4 */ u8 unk_1F4; //gets passed to skelanime thing - /* 0x01F5 */ char unk_1F5[0x4D]; //something allocated by skelanime - /* 0x0242 */ u8 unk_242; //very likley a variable from some skelanime struct - /* 0x0243 */ char unk_243[0x4D]; //something allocated by skelanime + /* 0x01F4 */ u8 unk_1F4; // I believe this and the rest below belong to something skelanime + /* 0x01F5 */ char unk_1F5[0x4D]; + /* 0x0242 */ u8 unk_242; + /* 0x0243 */ char unk_243[0x4D]; } EnDog; // size = 0x0290 extern const ActorInit En_Dog_InitVars; From 8c17271ca3eca71427d06a3a16765ae346a5f030 Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 20 Mar 2020 20:46:59 -0400 Subject: [PATCH 10/23] dogIsLost is infact a bool --- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index fd57ac46a2..67393b61e4 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -326,7 +326,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) switch (globalCtx->sceneNum) { case SCENE_MARKET_NIGHT: - if ((gSaveContext.dogIsLost == 0) && (((this->actor.params & 0x0F00) >> 8) == 1)) + if ((!gSaveContext.dogIsLost) && (((this->actor.params & 0x0F00) >> 8) == 1)) { Actor_Kill(&this->actor); } @@ -334,7 +334,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) case SCENE_IMPA: // Richard's Home if ((u32)(this->actor.params & 0x8000) == 0) { - if (gSaveContext.dogIsLost == 0) + if (!gSaveContext.dogIsLost) { this->nextBehavior = DOG_SIT; this->actionFunc = EnDog_Wait; From 0cf75356a557e94f7919521ff9ad53e4b733ac20 Mon Sep 17 00:00:00 2001 From: glank Date: Sat, 21 Mar 2020 03:09:42 +0100 Subject: [PATCH 11/23] code_800FCE80 OK --- asm/code_8008E4E0.s | 2 +- asm/code_800FCE80.s | 519 ------------------ asm/fp.s | 138 +++++ .../code/code_8007BF90/func_8007C29C.s | 4 +- .../code/sys_matrix/func_800D20CC.s | 10 +- .../code/sys_matrix/func_800D2264.s | 10 +- .../code/z_camera/func_80044ADC.s | 4 +- .../code/z_camera/func_800458D4.s | 2 +- .../code/z_camera/func_80045C74.s | 6 +- .../code/z_camera/func_800460A8.s | 6 +- .../code/z_eff_blure/func_800214D0.s | 24 +- .../code/z_onepointdemo/func_8007C704.s | 2 +- .../code/z_player_lib/func_8008F87C.s | 6 +- .../actors/ovl_Arms_Hook/ArmsHook_Draw.s | 4 +- .../ovl_Bg_Spot08_Iceblock/func_808B0CE0.s | 2 +- .../actors/ovl_Boss_Dodongo/func_808C32F4.s | 2 +- .../actors/ovl_Boss_Dodongo/func_808C3704.s | 2 +- .../actors/ovl_Boss_Dodongo/func_808C5578.s | 4 +- .../actors/ovl_Boss_Fd/func_808CB718.s | 4 +- .../actors/ovl_Boss_Ganon/func_808E1EB4.s | 4 +- .../actors/ovl_Boss_Ganon/func_808E2544.s | 14 +- .../actors/ovl_Boss_Ganon/func_808E3564.s | 4 +- .../actors/ovl_Boss_Ganondrof/func_80912594.s | 2 +- .../actors/ovl_Boss_Goma/func_80917D98.s | 2 +- .../actors/ovl_Boss_Mo/func_8091C538.s | 2 +- .../actors/ovl_Boss_Mo/func_8091F5A8.s | 4 +- .../actors/ovl_Boss_Mo/func_809206C4.s | 2 +- .../actors/ovl_Boss_Mo/func_809216D0.s | 4 +- .../actors/ovl_Boss_Mo/func_80924228.s | 4 +- .../actors/ovl_Boss_Mo/func_80924D70.s | 2 +- .../actors/ovl_Boss_Tw/func_8093A2AC.s | 4 +- .../actors/ovl_Boss_Tw/func_8093B1AC.s | 4 +- .../actors/ovl_Boss_Tw/func_8093EE10.s | 4 +- .../actors/ovl_Boss_Tw/func_809453EC.s | 4 +- .../actors/ovl_Boss_Tw/func_80945D14.s | 4 +- .../actors/ovl_Boss_Tw/func_8094A1C0.s | 4 +- .../actors/ovl_Boss_Tw/func_8094A398.s | 4 +- .../actors/ovl_Demo_Effect/func_809764FC.s | 4 +- .../actors/ovl_Demo_Gj/func_80979860.s | 4 +- .../actors/ovl_En_Anubice/func_809B11C0.s | 4 +- .../actors/ovl_En_Bom_Chu/func_809C5BA8.s | 2 +- .../overlays/actors/ovl_En_Bw/func_809CEA24.s | 4 +- .../ovl_En_Clear_Tag/EnClearTag_Update.s | 4 +- .../actors/ovl_En_Clear_Tag/func_809D3B80.s | 4 +- .../overlays/actors/ovl_En_Cs/func_809E1F20.s | 4 +- .../actors/ovl_En_Daiku/func_809E349C.s | 2 +- .../actors/ovl_En_Daiku/func_809E3954.s | 2 +- .../actors/ovl_En_Daiku/func_809E3A8C.s | 2 +- .../ovl_En_Daiku_Kakariko/func_809E4BC4.s | 2 +- .../actors/ovl_En_Dnt_Jiji/func_809F2A90.s | 2 +- .../actors/ovl_En_Dnt_Nomal/func_809F3BE4.s | 2 +- .../actors/ovl_En_Dnt_Nomal/func_809F40D4.s | 4 +- .../actors/ovl_En_Dnt_Nomal/func_809F44FC.s | 2 +- .../actors/ovl_En_Dnt_Nomal/func_809F49A4.s | 2 +- .../actors/ovl_En_Dnt_Nomal/func_809F51B8.s | 2 +- .../actors/ovl_En_Dnt_Nomal/func_809F551C.s | 2 +- .../overlays/actors/ovl_En_Fd/func_80A0C4F0.s | 2 +- .../overlays/actors/ovl_En_Fd/func_80A0C7EC.s | 2 +- .../actors/ovl_En_Fhg_Fire/EnFhgFire_Init.s | 4 +- .../actors/ovl_En_Fhg_Fire/func_80A10220.s | 14 +- .../overlays/actors/ovl_En_Fw/func_80A1ECD4.s | 2 +- .../overlays/actors/ovl_En_Go/func_80A3F300.s | 2 +- .../actors/ovl_En_Goma/func_80A4A964.s | 4 +- .../actors/ovl_En_Heishi1/func_80A516E4.s | 2 +- .../actors/ovl_En_Horse/func_80A62ACC.s | 2 +- .../actors/ovl_En_Horse/func_80A63148.s | 2 +- .../actors/ovl_En_Horse/func_80A63210.s | 2 +- .../actors/ovl_En_Horse/func_80A634A0.s | 2 +- .../actors/ovl_En_Horse_Ganon/func_80A68E14.s | 2 +- .../ovl_En_Horse_Normal/func_80A6B9D0.s | 2 +- .../ovl_En_Horse_Normal/func_80A6C8E0.s | 2 +- .../actors/ovl_En_Horse_Zelda/func_80A6DE38.s | 2 +- .../actors/ovl_En_Kanban/EnKanban_Update.s | 2 +- .../actors/ovl_En_Kanban/func_80A91FA0.s | 4 +- .../overlays/actors/ovl_En_Kz/func_80A9CCD8.s | 2 +- .../overlays/actors/ovl_En_Md/func_80AAB370.s | 2 +- .../overlays/actors/ovl_En_Mm/func_80AADEF0.s | 4 +- .../overlays/actors/ovl_En_Nb/func_80AB0DAC.s | 2 +- .../actors/ovl_En_Niw/func_80AB6570.s | 2 +- .../actors/ovl_En_Niw/func_80AB6A38.s | 2 +- .../actors/ovl_En_Niw/func_80AB7328.s | 2 +- .../actors/ovl_En_Niw_Girl/func_80AB9210.s | 2 +- .../overlays/actors/ovl_En_Ny/func_80ABCF4C.s | 2 +- .../actors/ovl_En_Ru1/func_80AECF6C.s | 2 +- .../actors/ovl_En_Siofuki/func_80AFBE8C.s | 2 +- .../actors/ovl_En_Stream/func_80B0B934.s | 2 +- .../overlays/actors/ovl_En_Sw/func_80B0BE20.s | 2 +- .../overlays/actors/ovl_En_Sw/func_80B0DFFC.s | 2 +- .../actors/ovl_En_Syateki_Niw/func_80B11E78.s | 2 +- .../actors/ovl_En_Syateki_Niw/func_80B12460.s | 2 +- .../overlays/actors/ovl_En_Tk/func_80B1C3DC.s | 2 +- .../actors/ovl_En_Vb_Ball/EnVbBall_Init.s | 2 +- .../actors/ovl_En_Vb_Ball/EnVbBall_Update.s | 2 +- .../actors/ovl_En_Vb_Ball/func_80B292D0.s | 2 +- .../actors/ovl_En_Zl2/func_80B50304.s | 2 +- .../actors/ovl_En_Zl3/func_80B57034.s | 2 +- .../actors/ovl_En_Zl3/func_80B57104.s | 2 +- .../actors/ovl_En_Zl3/func_80B57458.s | 2 +- .../actors/ovl_En_Zl3/func_80B577BC.s | 2 +- .../actors/ovl_Fishing/func_80B6D688.s | 8 +- data/code_800FCE80.bss.s | 11 - data/code_800FCE80.data.s | 14 - data/code_800FCE80.rodata.s | 54 -- include/fp.h | 34 ++ include/functions.h | 26 +- include/math.h | 1 + include/variables.h | 2 - spec | 6 +- src/code/code_8007BF90.c | 4 +- src/code/code_800FCE80.c | 229 ++++++++ src/code/sys_matrix.c | 24 +- src/code/z_actor.c | 6 +- src/code/z_camera.c | 10 +- 113 files changed, 606 insertions(+), 806 deletions(-) delete mode 100644 asm/code_800FCE80.s create mode 100644 asm/fp.s delete mode 100644 data/code_800FCE80.bss.s delete mode 100644 data/code_800FCE80.data.s delete mode 100644 data/code_800FCE80.rodata.s create mode 100644 include/fp.h create mode 100644 src/code/code_800FCE80.c diff --git a/asm/code_8008E4E0.s b/asm/code_8008E4E0.s index bea9204998..4cc763e5b7 100644 --- a/asm/code_8008E4E0.s +++ b/asm/code_8008E4E0.s @@ -69,7 +69,7 @@ glabel func_8008E520 /* B05750 8008E5B0 46083301 */ sub.s $f12, $f6, $f8 /* B05754 8008E5B4 46128381 */ sub.s $f14, $f16, $f18 /* B05758 8008E5B8 E7AC001C */ swc1 $f12, 0x1c($sp) -/* B0575C 8008E5BC 0C03F494 */ jal func_800FD250 +/* B0575C 8008E5BC 0C03F494 */ jal Math_atan2f /* B05760 8008E5C0 E7AE0018 */ swc1 $f14, 0x18($sp) /* B05764 8008E5C4 3C018014 */ lui $at, %hi(D_8013E760) /* B05768 8008E5C8 C424E760 */ lwc1 $f4, %lo(D_8013E760)($at) diff --git a/asm/code_800FCE80.s b/asm/code_800FCE80.s deleted file mode 100644 index 64806b0656..0000000000 --- a/asm/code_800FCE80.s +++ /dev/null @@ -1,519 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .text - -.align 4 - -glabel func_800FCE80 -/* B74020 800FCE80 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B74024 800FCE84 AFBF0014 */ sw $ra, 0x14($sp) -/* B74028 800FCE88 E7AC0020 */ swc1 $f12, 0x20($sp) -/* B7402C 800FCE8C 0C0400A4 */ jal sinf -/* B74030 800FCE90 C7AC0020 */ lwc1 $f12, 0x20($sp) -/* B74034 800FCE94 E7A0001C */ swc1 $f0, 0x1c($sp) -/* B74038 800FCE98 0C041184 */ jal cosf -/* B7403C 800FCE9C C7AC0020 */ lwc1 $f12, 0x20($sp) -/* B74040 800FCEA0 8FBF0014 */ lw $ra, 0x14($sp) -/* B74044 800FCEA4 C7A4001C */ lwc1 $f4, 0x1c($sp) -/* B74048 800FCEA8 27BD0020 */ addiu $sp, $sp, 0x20 -/* B7404C 800FCEAC 03E00008 */ jr $ra -/* B74050 800FCEB0 46002003 */ div.s $f0, $f4, $f0 - -glabel func_800FCEB4 -/* B74054 800FCEB4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B74058 800FCEB8 AFBF0014 */ sw $ra, 0x14($sp) -/* B7405C 800FCEBC 0C03F4E4 */ jal func_800FD390 -/* B74060 800FCEC0 00000000 */ nop -/* B74064 800FCEC4 8FBF0014 */ lw $ra, 0x14($sp) -/* B74068 800FCEC8 27BD0018 */ addiu $sp, $sp, 0x18 -/* B7406C 800FCECC 03E00008 */ jr $ra -/* B74070 800FCED0 00000000 */ nop - -glabel func_800FCED4 -/* B74074 800FCED4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B74078 800FCED8 AFBF0014 */ sw $ra, 0x14($sp) -/* B7407C 800FCEDC 0C03F4F2 */ jal func_800FD3C8 -/* B74080 800FCEE0 00000000 */ nop -/* B74084 800FCEE4 8FBF0014 */ lw $ra, 0x14($sp) -/* B74088 800FCEE8 27BD0018 */ addiu $sp, $sp, 0x18 -/* B7408C 800FCEEC 03E00008 */ jr $ra -/* B74090 800FCEF0 00000000 */ nop - -glabel func_800FCEF4 -/* B74094 800FCEF4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B74098 800FCEF8 AFBF0014 */ sw $ra, 0x14($sp) -/* B7409C 800FCEFC 0C03F51C */ jal func_800FD470 -/* B740A0 800FCF00 00000000 */ nop -/* B740A4 800FCF04 8FBF0014 */ lw $ra, 0x14($sp) -/* B740A8 800FCF08 27BD0018 */ addiu $sp, $sp, 0x18 -/* B740AC 800FCF0C 03E00008 */ jr $ra -/* B740B0 800FCF10 00000000 */ nop - -glabel func_800FCF14 -/* B740B4 800FCF14 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B740B8 800FCF18 AFBF0014 */ sw $ra, 0x14($sp) -/* B740BC 800FCF1C 0C03F500 */ jal func_800FD400 -/* B740C0 800FCF20 00000000 */ nop -/* B740C4 800FCF24 8FBF0014 */ lw $ra, 0x14($sp) -/* B740C8 800FCF28 27BD0018 */ addiu $sp, $sp, 0x18 -/* B740CC 800FCF2C 03E00008 */ jr $ra -/* B740D0 800FCF30 00000000 */ nop - -glabel func_800FCF34 -/* B740D4 800FCF34 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B740D8 800FCF38 AFBF0014 */ sw $ra, 0x14($sp) -/* B740DC 800FCF3C 0C03F50E */ jal func_800FD438 -/* B740E0 800FCF40 00000000 */ nop -/* B740E4 800FCF44 8FBF0014 */ lw $ra, 0x14($sp) -/* B740E8 800FCF48 27BD0018 */ addiu $sp, $sp, 0x18 -/* B740EC 800FCF4C 03E00008 */ jr $ra -/* B740F0 800FCF50 00000000 */ nop - -glabel func_800FCF54 -/* B740F4 800FCF54 460C6002 */ mul.s $f0, $f12, $f12 -/* B740F8 800FCF58 3C028015 */ lui $v0, %hi(D_8014AAC0) # $v0, 0x8015 -/* B740FC 800FCF5C 46006086 */ mov.s $f2, $f12 -/* B74100 800FCF60 2442AAC0 */ addiu $v0, %lo(D_8014AAC0) # addiu $v0, $v0, -0x5540 -/* B74104 800FCF64 46006382 */ mul.s $f14, $f12, $f0 -/* B74108 800FCF68 00000000 */ nop -.L800FCF6C: -/* B7410C 800FCF6C C4440000 */ lwc1 $f4, ($v0) -/* B74110 800FCF70 24420004 */ addiu $v0, $v0, 4 -/* B74114 800FCF74 460E2302 */ mul.s $f12, $f4, $f14 -/* B74118 800FCF78 460C1400 */ add.s $f16, $f2, $f12 -/* B7411C 800FCF7C 46101032 */ c.eq.s $f2, $f16 -/* B74120 800FCF80 00000000 */ nop -/* B74124 800FCF84 45010004 */ bc1t .L800FCF98 -/* B74128 800FCF88 00000000 */ nop -/* B7412C 800FCF8C 46007382 */ mul.s $f14, $f14, $f0 -/* B74130 800FCF90 1000FFF6 */ b .L800FCF6C -/* B74134 800FCF94 46008086 */ mov.s $f2, $f16 -.L800FCF98: -/* B74138 800FCF98 03E00008 */ jr $ra -/* B7413C 800FCF9C 46001006 */ mov.s $f0, $f2 - -glabel func_800FCFA0 -/* B74140 800FCFA0 44808000 */ mtc1 $zero, $f16 -/* B74144 800FCFA4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B74148 800FCFA8 AFBF0014 */ sw $ra, 0x14($sp) -/* B7414C 800FCFAC 460C803C */ c.lt.s $f16, $f12 -/* B74150 800FCFB0 46006386 */ mov.s $f14, $f12 -/* B74154 800FCFB4 3C018015 */ lui $at, %hi(D_8014AAE4) -/* B74158 800FCFB8 45020004 */ bc1fl .L800FCFCC -/* B7415C 800FCFBC 4610703C */ c.lt.s $f14, $f16 -/* B74160 800FCFC0 1000000F */ b .L800FD000 -/* B74164 800FCFC4 46006006 */ mov.s $f0, $f12 -/* B74168 800FCFC8 4610703C */ c.lt.s $f14, $f16 -.L800FCFCC: -/* B7416C 800FCFCC 00000000 */ nop -/* B74170 800FCFD0 45020004 */ bc1fl .L800FCFE4 -/* B74174 800FCFD4 46107032 */ c.eq.s $f14, $f16 -/* B74178 800FCFD8 10000009 */ b .L800FD000 -/* B7417C 800FCFDC 46007007 */ neg.s $f0, $f14 -/* B74180 800FCFE0 46107032 */ c.eq.s $f14, $f16 -.L800FCFE4: -/* B74184 800FCFE4 3C018013 */ lui $at, %hi(D_801344A4) -/* B74188 800FCFE8 45000003 */ bc1f .L800FCFF8 -/* B7418C 800FCFEC 00000000 */ nop -/* B74190 800FCFF0 10000030 */ b .L800FD0B4 -/* B74194 800FCFF4 46008006 */ mov.s $f0, $f16 -.L800FCFF8: -/* B74198 800FCFF8 1000002E */ b .L800FD0B4 -/* B7419C 800FCFFC C42044A4 */ lwc1 $f0, %lo(D_801344A4)($at) -.L800FD000: -/* B741A0 800FD000 C424AAE4 */ lwc1 $f4, %lo(D_8014AAE4)($at) -/* B741A4 800FD004 3C018015 */ lui $at, %hi(D_8014AAE8) -/* B741A8 800FD008 4604003E */ c.le.s $f0, $f4 -/* B741AC 800FD00C 00000000 */ nop -/* B741B0 800FD010 45000005 */ bc1f .L800FD028 -/* B741B4 800FD014 00000000 */ nop -/* B741B8 800FD018 0C03F3D5 */ jal func_800FCF54 -/* B741BC 800FD01C 46007306 */ mov.s $f12, $f14 -/* B741C0 800FD020 10000025 */ b .L800FD0B8 -/* B741C4 800FD024 8FBF0014 */ lw $ra, 0x14($sp) -.L800FD028: -/* B741C8 800FD028 C426AAE8 */ lwc1 $f6, %lo(D_8014AAE8)($at) -/* B741CC 800FD02C 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B741D0 800FD030 4600303E */ c.le.s $f6, $f0 -/* B741D4 800FD034 00000000 */ nop -/* B741D8 800FD038 4502000D */ bc1fl .L800FD070 -/* B741DC 800FD03C 44811000 */ mtc1 $at, $f2 -/* B741E0 800FD040 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B741E4 800FD044 44811000 */ mtc1 $at, $f2 -/* B741E8 800FD048 E7AE0018 */ swc1 $f14, 0x18($sp) -/* B741EC 800FD04C 0C03F3D5 */ jal func_800FCF54 -/* B741F0 800FD050 46001303 */ div.s $f12, $f2, $f0 -/* B741F4 800FD054 3C018015 */ lui $at, %hi(D_8014AAEC) -/* B741F8 800FD058 C428AAEC */ lwc1 $f8, %lo(D_8014AAEC)($at) -/* B741FC 800FD05C 44808000 */ mtc1 $zero, $f16 -/* B74200 800FD060 C7AE0018 */ lwc1 $f14, 0x18($sp) -/* B74204 800FD064 1000000C */ b .L800FD098 -/* B74208 800FD068 46004081 */ sub.s $f2, $f8, $f0 -/* B7420C 800FD06C 44811000 */ mtc1 $at, $f2 -.L800FD070: -/* B74210 800FD070 E7AE0018 */ swc1 $f14, 0x18($sp) -/* B74214 800FD074 46001281 */ sub.s $f10, $f2, $f0 -/* B74218 800FD078 46001480 */ add.s $f18, $f2, $f0 -/* B7421C 800FD07C 0C03F3D5 */ jal func_800FCF54 -/* B74220 800FD080 46125303 */ div.s $f12, $f10, $f18 -/* B74224 800FD084 3C018015 */ lui $at, %hi(D_8014AAF0) -/* B74228 800FD088 C424AAF0 */ lwc1 $f4, %lo(D_8014AAF0)($at) -/* B7422C 800FD08C 44808000 */ mtc1 $zero, $f16 -/* B74230 800FD090 C7AE0018 */ lwc1 $f14, 0x18($sp) -/* B74234 800FD094 46002081 */ sub.s $f2, $f4, $f0 -.L800FD098: -/* B74238 800FD098 460E803C */ c.lt.s $f16, $f14 -/* B7423C 800FD09C 00000000 */ nop -/* B74240 800FD0A0 45020004 */ bc1fl .L800FD0B4 -/* B74244 800FD0A4 46001007 */ neg.s $f0, $f2 -/* B74248 800FD0A8 10000002 */ b .L800FD0B4 -/* B7424C 800FD0AC 46001006 */ mov.s $f0, $f2 -/* B74250 800FD0B0 46001007 */ neg.s $f0, $f2 -.L800FD0B4: -/* B74254 800FD0B4 8FBF0014 */ lw $ra, 0x14($sp) -.L800FD0B8: -/* B74258 800FD0B8 27BD0018 */ addiu $sp, $sp, 0x18 -/* B7425C 800FD0BC 03E00008 */ jr $ra -/* B74260 800FD0C0 00000000 */ nop - -glabel func_800FD0C4 -/* B74264 800FD0C4 3C01BF80 */ li $at, 0xBF800000 # 0.000000 -/* B74268 800FD0C8 44810000 */ mtc1 $at, $f0 -/* B7426C 800FD0CC 3C013F80 */ lui $at, 0x3f80 -/* B74270 800FD0D0 460C003E */ c.le.s $f0, $f12 -/* B74274 800FD0D4 00000000 */ nop -/* B74278 800FD0D8 4502000A */ bc1fl .L800FD104 -/* B7427C 800FD0DC 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B74280 800FD0E0 44818000 */ mtc1 $at, $f16 -/* B74284 800FD0E4 00000000 */ nop -/* B74288 800FD0E8 4610603E */ c.le.s $f12, $f16 -/* B7428C 800FD0EC 00000000 */ nop -/* B74290 800FD0F0 45020004 */ bc1fl .L800FD104 -/* B74294 800FD0F4 3C013F80 */ lui $at, 0x3f80 -/* B74298 800FD0F8 10000013 */ b .L800FD148 -/* B7429C 800FD0FC 00001025 */ move $v0, $zero -/* B742A0 800FD100 3C013F80 */ li $at, 0x3F800000 # 0.000000 -.L800FD104: -/* B742A4 800FD104 44818000 */ mtc1 $at, $f16 -/* B742A8 800FD108 24020001 */ li $v0, 1 -/* B742AC 800FD10C 460C803C */ c.lt.s $f16, $f12 -/* B742B0 800FD110 00000000 */ nop -/* B742B4 800FD114 45020004 */ bc1fl .L800FD128 -/* B742B8 800FD118 4600603C */ c.lt.s $f12, $f0 -/* B742BC 800FD11C 1000000A */ b .L800FD148 -/* B742C0 800FD120 460C8303 */ div.s $f12, $f16, $f12 -/* B742C4 800FD124 4600603C */ c.lt.s $f12, $f0 -.L800FD128: -/* B742C8 800FD128 2402FFFF */ li $v0, -1 -/* B742CC 800FD12C 3C018013 */ lui $at, %hi(D_801344A4) -/* B742D0 800FD130 45000003 */ bc1f .L800FD140 -/* B742D4 800FD134 00000000 */ nop -/* B742D8 800FD138 10000003 */ b .L800FD148 -/* B742DC 800FD13C 460C8303 */ div.s $f12, $f16, $f12 -.L800FD140: -/* B742E0 800FD140 03E00008 */ jr $ra -/* B742E4 800FD144 C42044A4 */ lwc1 $f0, %lo(D_801344A4)($at) - -.L800FD148: -/* B742E8 800FD148 3C014100 */ li $at, 0x41000000 # 0.000000 -/* B742EC 800FD14C 460C6002 */ mul.s $f0, $f12, $f12 -/* B742F0 800FD150 44801000 */ mtc1 $zero, $f2 -/* B742F4 800FD154 44817000 */ mtc1 $at, $f14 -/* B742F8 800FD158 24030008 */ li $v1, 8 -.L800FD15C: -/* B742FC 800FD15C 460E7482 */ mul.s $f18, $f14, $f14 -/* B74300 800FD160 460E7280 */ add.s $f10, $f14, $f14 -/* B74304 800FD164 2463FFFC */ addiu $v1, $v1, -4 -/* B74308 800FD168 46105280 */ add.s $f10, $f10, $f16 -/* B7430C 800FD16C 46009482 */ mul.s $f18, $f18, $f0 -/* B74310 800FD170 46107381 */ sub.s $f14, $f14, $f16 -/* B74314 800FD174 460E7202 */ mul.s $f8, $f14, $f14 -/* B74318 800FD178 46025280 */ add.s $f10, $f10, $f2 -/* B7431C 800FD17C 460E7180 */ add.s $f6, $f14, $f14 -/* B74320 800FD180 46004202 */ mul.s $f8, $f8, $f0 -/* B74324 800FD184 460A9083 */ div.s $f2, $f18, $f10 -/* B74328 800FD188 46103180 */ add.s $f6, $f6, $f16 -/* B7432C 800FD18C 46107381 */ sub.s $f14, $f14, $f16 -/* B74330 800FD190 460E7282 */ mul.s $f10, $f14, $f14 -/* B74334 800FD194 46023180 */ add.s $f6, $f6, $f2 -/* B74338 800FD198 460E7480 */ add.s $f18, $f14, $f14 -/* B7433C 800FD19C 46005282 */ mul.s $f10, $f10, $f0 -/* B74340 800FD1A0 46064083 */ div.s $f2, $f8, $f6 -/* B74344 800FD1A4 46109480 */ add.s $f18, $f18, $f16 -/* B74348 800FD1A8 46107381 */ sub.s $f14, $f14, $f16 -/* B7434C 800FD1AC 460E7182 */ mul.s $f6, $f14, $f14 -/* B74350 800FD1B0 46029480 */ add.s $f18, $f18, $f2 -/* B74354 800FD1B4 460E7200 */ add.s $f8, $f14, $f14 -/* B74358 800FD1B8 46003182 */ mul.s $f6, $f6, $f0 -/* B7435C 800FD1BC 46125083 */ div.s $f2, $f10, $f18 -/* B74360 800FD1C0 46104200 */ add.s $f8, $f8, $f16 -/* B74364 800FD1C4 46107381 */ sub.s $f14, $f14, $f16 -/* B74368 800FD1C8 46024200 */ add.s $f8, $f8, $f2 -/* B7436C 800FD1CC 1460FFE3 */ bnez $v1, .L800FD15C -/* B74370 800FD1D0 46083083 */ div.s $f2, $f6, $f8 -/* B74374 800FD1D4 46028100 */ add.s $f4, $f16, $f2 -/* B74378 800FD1D8 14400003 */ bnez $v0, .L800FD1E8 -/* B7437C 800FD1DC 46046083 */ div.s $f2, $f12, $f4 -/* B74380 800FD1E0 03E00008 */ jr $ra -/* B74384 800FD1E4 46001006 */ mov.s $f0, $f2 - -.L800FD1E8: -/* B74388 800FD1E8 18400005 */ blez $v0, .L800FD200 -/* B7438C 800FD1EC 3C018015 */ lui $at, %hi(D_8014AAF8) -/* B74390 800FD1F0 3C018015 */ lui $at, %hi(D_8014AAF4) -/* B74394 800FD1F4 C428AAF4 */ lwc1 $f8, %lo(D_8014AAF4)($at) -/* B74398 800FD1F8 03E00008 */ jr $ra -/* B7439C 800FD1FC 46024001 */ sub.s $f0, $f8, $f2 - -.L800FD200: -/* B743A0 800FD200 C42AAAF8 */ lwc1 $f10, %lo(D_8014AAF8)($at) -/* B743A4 800FD204 46025001 */ sub.s $f0, $f10, $f2 -/* B743A8 800FD208 03E00008 */ jr $ra -/* B743AC 800FD20C 00000000 */ nop - -glabel func_800FD210 -/* B743B0 800FD210 3C0E8017 */ lui $t6, %hi(D_80175600) # $t6, 0x8017 -/* B743B4 800FD214 8DCE5600 */ lw $t6, %lo(D_80175600)($t6) -/* B743B8 800FD218 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B743BC 800FD21C AFBF0014 */ sw $ra, 0x14($sp) -/* B743C0 800FD220 15C00005 */ bnez $t6, .L800FD238 -/* B743C4 800FD224 00000000 */ nop -/* B743C8 800FD228 0C03F3E8 */ jal func_800FCFA0 -/* B743CC 800FD22C 00000000 */ nop -/* B743D0 800FD230 10000004 */ b .L800FD244 -/* B743D4 800FD234 8FBF0014 */ lw $ra, 0x14($sp) -.L800FD238: -/* B743D8 800FD238 0C03F431 */ jal func_800FD0C4 -/* B743DC 800FD23C 00000000 */ nop -/* B743E0 800FD240 8FBF0014 */ lw $ra, 0x14($sp) -.L800FD244: -/* B743E4 800FD244 27BD0018 */ addiu $sp, $sp, 0x18 -/* B743E8 800FD248 03E00008 */ jr $ra -/* B743EC 800FD24C 00000000 */ nop - -glabel func_800FD250 -/* B743F0 800FD250 44801000 */ mtc1 $zero, $f2 -/* B743F4 800FD254 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B743F8 800FD258 F7B40010 */ sdc1 $f20, 0x10($sp) -/* B743FC 800FD25C 46027032 */ c.eq.s $f14, $f2 -/* B74400 800FD260 46006506 */ mov.s $f20, $f12 -/* B74404 800FD264 AFBF001C */ sw $ra, 0x1c($sp) -/* B74408 800FD268 45020017 */ bc1fl .L800FD2C8 -/* B7440C 800FD26C 460E103E */ c.le.s $f2, $f14 -/* B74410 800FD270 46026032 */ c.eq.s $f12, $f2 -/* B74414 800FD274 00000000 */ nop -/* B74418 800FD278 45020004 */ bc1fl .L800FD28C -/* B7441C 800FD27C 4614103C */ c.lt.s $f2, $f20 -/* B74420 800FD280 10000028 */ b .L800FD324 -/* B74424 800FD284 46001006 */ mov.s $f0, $f2 -/* B74428 800FD288 4614103C */ c.lt.s $f2, $f20 -.L800FD28C: -/* B7442C 800FD28C 3C018015 */ lui $at, %hi(D_8014AAFC) -/* B74430 800FD290 45020004 */ bc1fl .L800FD2A4 -/* B74434 800FD294 4602A03C */ c.lt.s $f20, $f2 -/* B74438 800FD298 10000022 */ b .L800FD324 -/* B7443C 800FD29C C420AAFC */ lwc1 $f0, %lo(D_8014AAFC)($at) -/* B74440 800FD2A0 4602A03C */ c.lt.s $f20, $f2 -.L800FD2A4: -/* B74444 800FD2A4 3C018013 */ lui $at, %hi(D_801344A4) -/* B74448 800FD2A8 45000004 */ bc1f .L800FD2BC -/* B7444C 800FD2AC 00000000 */ nop -/* B74450 800FD2B0 3C018015 */ lui $at, %hi(D_8014AB00) -/* B74454 800FD2B4 1000001B */ b .L800FD324 -/* B74458 800FD2B8 C420AB00 */ lwc1 $f0, %lo(D_8014AB00)($at) -.L800FD2BC: -/* B7445C 800FD2BC 10000019 */ b .L800FD324 -/* B74460 800FD2C0 C42044A4 */ lwc1 $f0, %lo(D_801344A4)($at) -/* B74464 800FD2C4 460E103E */ c.le.s $f2, $f14 -.L800FD2C8: -/* B74468 800FD2C8 00000000 */ nop -/* B7446C 800FD2CC 45020006 */ bc1fl .L800FD2E8 -/* B74470 800FD2D0 4602A03C */ c.lt.s $f20, $f2 -/* B74474 800FD2D4 0C03F484 */ jal func_800FD210 -/* B74478 800FD2D8 460EA303 */ div.s $f12, $f20, $f14 -/* B7447C 800FD2DC 10000012 */ b .L800FD328 -/* B74480 800FD2E0 8FBF001C */ lw $ra, 0x1c($sp) -/* B74484 800FD2E4 4602A03C */ c.lt.s $f20, $f2 -.L800FD2E8: -/* B74488 800FD2E8 00000000 */ nop -/* B7448C 800FD2EC 45020008 */ bc1fl .L800FD310 -/* B74490 800FD2F0 460EA303 */ div.s $f12, $f20, $f14 -/* B74494 800FD2F4 0C03F484 */ jal func_800FD210 -/* B74498 800FD2F8 460EA303 */ div.s $f12, $f20, $f14 -/* B7449C 800FD2FC 3C018015 */ lui $at, %hi(D_8014AB04) -/* B744A0 800FD300 C424AB04 */ lwc1 $f4, %lo(D_8014AB04)($at) -/* B744A4 800FD304 10000007 */ b .L800FD324 -/* B744A8 800FD308 46040001 */ sub.s $f0, $f0, $f4 -/* B744AC 800FD30C 460EA303 */ div.s $f12, $f20, $f14 -.L800FD310: -/* B744B0 800FD310 0C03F484 */ jal func_800FD210 -/* B744B4 800FD314 46006307 */ neg.s $f12, $f12 -/* B744B8 800FD318 3C018015 */ lui $at, %hi(D_8014AB08) -/* B744BC 800FD31C C426AB08 */ lwc1 $f6, %lo(D_8014AB08)($at) -/* B744C0 800FD320 46003001 */ sub.s $f0, $f6, $f0 -.L800FD324: -/* B744C4 800FD324 8FBF001C */ lw $ra, 0x1c($sp) -.L800FD328: -/* B744C8 800FD328 D7B40010 */ ldc1 $f20, 0x10($sp) -/* B744CC 800FD32C 27BD0020 */ addiu $sp, $sp, 0x20 -/* B744D0 800FD330 03E00008 */ jr $ra -/* B744D4 800FD334 00000000 */ nop - -glabel func_800FD338 -/* B744D8 800FD338 460C6182 */ mul.s $f6, $f12, $f12 -/* B744DC 800FD33C 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B744E0 800FD340 44812000 */ mtc1 $at, $f4 -/* B744E4 800FD344 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B744E8 800FD348 AFBF0014 */ sw $ra, 0x14($sp) -/* B744EC 800FD34C 46062001 */ sub.s $f0, $f4, $f6 -/* B744F0 800FD350 0C03F494 */ jal func_800FD250 -/* B744F4 800FD354 46000384 */ sqrt.s $f14, $f0 -/* B744F8 800FD358 8FBF0014 */ lw $ra, 0x14($sp) -/* B744FC 800FD35C 27BD0018 */ addiu $sp, $sp, 0x18 -/* B74500 800FD360 03E00008 */ jr $ra -/* B74504 800FD364 00000000 */ nop - -glabel func_800FD368 -/* B74508 800FD368 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B7450C 800FD36C AFBF0014 */ sw $ra, 0x14($sp) -/* B74510 800FD370 0C03F4CE */ jal func_800FD338 -/* B74514 800FD374 00000000 */ nop -/* B74518 800FD378 8FBF0014 */ lw $ra, 0x14($sp) -/* B7451C 800FD37C 3C018015 */ lui $at, %hi(D_8014AB0C) -/* B74520 800FD380 C424AB0C */ lwc1 $f4, %lo(D_8014AB0C)($at) -/* B74524 800FD384 27BD0018 */ addiu $sp, $sp, 0x18 -/* B74528 800FD388 03E00008 */ jr $ra -/* B7452C 800FD38C 46002001 */ sub.s $f0, $f4, $f0 - -glabel func_800FD390 -/* B74530 800FD390 4600630F */ floor.w.s $f12, $f12 -/* B74534 800FD394 03E00008 */ jr $ra -/* B74538 800FD398 46806020 */ cvt.s.w $f0, $f12 - -glabel func_800FD39C -/* B7453C 800FD39C 4620630F */ floor.w.d $f12, $f12 -/* B74540 800FD3A0 03E00008 */ jr $ra -/* B74544 800FD3A4 46806021 */ cvt.d.w $f0, $f12 - -glabel func_800FD3A8 -/* B74548 800FD3A8 4600610F */ floor.w.s $f4, $f12 -/* B7454C 800FD3AC 44022000 */ mfc1 $v0, $f4 -/* B74550 800FD3B0 03E00008 */ jr $ra -/* B74554 800FD3B4 00000000 */ nop - -glabel func_800FD3B8 -/* B74558 800FD3B8 4620610F */ floor.w.d $f4, $f12 -/* B7455C 800FD3BC 44022000 */ mfc1 $v0, $f4 -/* B74560 800FD3C0 03E00008 */ jr $ra -/* B74564 800FD3C4 00000000 */ nop - -glabel func_800FD3C8 -/* B74568 800FD3C8 4600630E */ ceil.w.s $f12, $f12 -/* B7456C 800FD3CC 03E00008 */ jr $ra -/* B74570 800FD3D0 46806020 */ cvt.s.w $f0, $f12 - -glabel func_800FD3D4 -/* B74574 800FD3D4 4620630E */ ceil.w.d $f12, $f12 -/* B74578 800FD3D8 03E00008 */ jr $ra -/* B7457C 800FD3DC 46806021 */ cvt.d.w $f0, $f12 - -glabel func_800FD3E0 -/* B74580 800FD3E0 4600610E */ ceil.w.s $f4, $f12 -/* B74584 800FD3E4 44022000 */ mfc1 $v0, $f4 -/* B74588 800FD3E8 03E00008 */ jr $ra -/* B7458C 800FD3EC 00000000 */ nop - -glabel func_800FD3F0 -/* B74590 800FD3F0 4620610E */ ceil.w.d $f4, $f12 -/* B74594 800FD3F4 44022000 */ mfc1 $v0, $f4 -/* B74598 800FD3F8 03E00008 */ jr $ra -/* B7459C 800FD3FC 00000000 */ nop - -glabel func_800FD400 -/* B745A0 800FD400 4600630D */ trunc.w.s $f12, $f12 -/* B745A4 800FD404 03E00008 */ jr $ra -/* B745A8 800FD408 46806020 */ cvt.s.w $f0, $f12 - -glabel func_800FD40C -/* B745AC 800FD40C 4620630D */ trunc.w.d $f12, $f12 -/* B745B0 800FD410 03E00008 */ jr $ra -/* B745B4 800FD414 46806021 */ cvt.d.w $f0, $f12 - -glabel func_800FD418 -/* B745B8 800FD418 4600610D */ trunc.w.s $f4, $f12 -/* B745BC 800FD41C 44022000 */ mfc1 $v0, $f4 -/* B745C0 800FD420 03E00008 */ jr $ra -/* B745C4 800FD424 00000000 */ nop - -glabel func_800FD428 -/* B745C8 800FD428 4620610D */ trunc.w.d $f4, $f12 -/* B745CC 800FD42C 44022000 */ mfc1 $v0, $f4 -/* B745D0 800FD430 03E00008 */ jr $ra -/* B745D4 800FD434 00000000 */ nop - -glabel func_800FD438 -/* B745D8 800FD438 4600630C */ round.w.s $f12, $f12 -/* B745DC 800FD43C 03E00008 */ jr $ra -/* B745E0 800FD440 46806020 */ cvt.s.w $f0, $f12 - -glabel func_800FD444 -/* B745E4 800FD444 4620630C */ round.w.d $f12, $f12 -/* B745E8 800FD448 03E00008 */ jr $ra -/* B745EC 800FD44C 46806021 */ cvt.d.w $f0, $f12 - -glabel func_800FD450 -/* B745F0 800FD450 4600610C */ round.w.s $f4, $f12 -/* B745F4 800FD454 44022000 */ mfc1 $v0, $f4 -/* B745F8 800FD458 03E00008 */ jr $ra -/* B745FC 800FD45C 00000000 */ nop - -glabel func_800FD460 -/* B74600 800FD460 4620610C */ round.w.d $f4, $f12 -/* B74604 800FD464 44022000 */ mfc1 $v0, $f4 -/* B74608 800FD468 03E00008 */ jr $ra -/* B7460C 800FD46C 00000000 */ nop - -glabel func_800FD470 -/* B74610 800FD470 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* B74614 800FD474 44812000 */ mtc1 $at, $f4 -/* B74618 800FD478 00000000 */ nop -/* B7461C 800FD47C 46046000 */ add.s $f0, $f12, $f4 -/* B74620 800FD480 4600000F */ floor.w.s $f0, $f0 -/* B74624 800FD484 03E00008 */ jr $ra -/* B74628 800FD488 46800020 */ cvt.s.w $f0, $f0 - -glabel func_800FD48C -/* B7462C 800FD48C 3C013FE0 */ li $at, 0x3FE00000 # 0.000000 -/* B74630 800FD490 44812800 */ mtc1 $at, $f5 -/* B74634 800FD494 44802000 */ mtc1 $zero, $f4 -/* B74638 800FD498 00000000 */ nop -/* B7463C 800FD49C 46246000 */ add.d $f0, $f12, $f4 -/* B74640 800FD4A0 4620000F */ floor.w.d $f0, $f0 -/* B74644 800FD4A4 03E00008 */ jr $ra -/* B74648 800FD4A8 46800021 */ cvt.d.w $f0, $f0 - -glabel func_800FD4AC -/* B7464C 800FD4AC 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* B74650 800FD4B0 44812000 */ mtc1 $at, $f4 -/* B74654 800FD4B4 00000000 */ nop -/* B74658 800FD4B8 46046000 */ add.s $f0, $f12, $f4 -/* B7465C 800FD4BC 4600000F */ floor.w.s $f0, $f0 -/* B74660 800FD4C0 44020000 */ mfc1 $v0, $f0 -/* B74664 800FD4C4 03E00008 */ jr $ra -/* B74668 800FD4C8 00000000 */ nop - -glabel func_800FD4CC -/* B7466C 800FD4CC 3C013FE0 */ li $at, 0x3FE00000 # 0.000000 -/* B74670 800FD4D0 44812800 */ mtc1 $at, $f5 -/* B74674 800FD4D4 44802000 */ mtc1 $zero, $f4 -/* B74678 800FD4D8 00000000 */ nop -/* B7467C 800FD4DC 46246000 */ add.d $f0, $f12, $f4 -/* B74680 800FD4E0 4620000F */ floor.w.d $f0, $f0 -/* B74684 800FD4E4 44020000 */ mfc1 $v0, $f0 -/* B74688 800FD4E8 03E00008 */ jr $ra -/* B7468C 800FD4EC 00000000 */ nop diff --git a/asm/fp.s b/asm/fp.s new file mode 100644 index 0000000000..4954e8ddc0 --- /dev/null +++ b/asm/fp.s @@ -0,0 +1,138 @@ +.include "macro.inc" + + +.section .data + +glabel qNaN0x3FFFFF + .word 0x7FBFFFFF + +glabel qNaN0x10000 + .word 0x7F810000 + +glabel sNaN0x3FFFFF + .word 0x7FFFFFFF + + +.section .text + +glabel floorf + floor.w.s $f12, $f12 + cvt.s.w $f0, $f12 + jr $ra + +glabel floor + floor.w.d $f12, $f12 + cvt.d.w $f0, $f12 + jr $ra + +glabel lfloorf + floor.w.s $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel lfloor + floor.w.d $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel ceilf + ceil.w.s $f12, $f12 + cvt.s.w $f0, $f12 + jr $ra + +glabel ceil + ceil.w.d $f12, $f12 + cvt.d.w $f0, $f12 + jr $ra + +glabel lceilf + ceil.w.s $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel lceil + ceil.w.d $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel truncf + trunc.w.s $f12, $f12 + cvt.s.w $f0, $f12 + jr $ra + +glabel trunc + trunc.w.d $f12, $f12 + cvt.d.w $f0, $f12 + jr $ra + +glabel ltruncf + trunc.w.s $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel ltrunc + trunc.w.d $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel nearbyintf + round.w.s $f12, $f12 + cvt.s.w $f0, $f12 + jr $ra + +glabel nearbyint + round.w.d $f12, $f12 + cvt.d.w $f0, $f12 + jr $ra + +glabel lnearbyintf + round.w.s $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel lnearbyint + round.w.d $f4, $f12 + mfc1 $v0, $f4 + nop + jr $ra + +glabel roundf + li.s $f4, 0.5 + nop + add.s $f0, $f12, $f4 + floor.w.s $f0, $f0 + cvt.s.w $f0, $f0 + jr $ra + +glabel round + li.d $f4, 0.5 + nop + add.d $f0, $f12, $f4 + floor.w.d $f0, $f0 + cvt.d.w $f0, $f0 + jr $ra + +glabel lroundf + li.s $f4, 0.5 + nop + add.s $f0, $f12, $f4 + floor.w.s $f0, $f0 + mfc1 $v0, $f0 + nop + jr $ra + +glabel lround + li.d $f4, 0.5 + nop + add.d $f0, $f12, $f4 + floor.w.d $f0, $f0 + mfc1 $v0, $f0 + nop + jr $ra diff --git a/asm/non_matchings/code/code_8007BF90/func_8007C29C.s b/asm/non_matchings/code/code_8007BF90/func_8007C29C.s index 8a5d50b887..340a29b9ce 100644 --- a/asm/non_matchings/code/code_8007BF90/func_8007C29C.s +++ b/asm/non_matchings/code/code_8007BF90/func_8007C29C.s @@ -40,7 +40,7 @@ glabel func_8007C29C /* AF3498 8007C2F8 C4AE0004 */ lwc1 $f14, 4($a1) .L8007C2FC: /* AF349C 8007C2FC E7B00024 */ swc1 $f16, 0x24($sp) -/* AF34A0 8007C300 0C03F494 */ jal func_800FD250 +/* AF34A0 8007C300 0C03F494 */ jal Math_atan2f /* AF34A4 8007C304 AFA50034 */ sw $a1, 0x34($sp) /* AF34A8 8007C308 3C018014 */ lui $at, %hi(D_8013CB84) /* AF34AC 8007C30C C42ACB84 */ lwc1 $f10, %lo(D_8013CB84)($at) @@ -77,7 +77,7 @@ glabel func_8007C29C /* AF3524 8007C384 10000010 */ b .L8007C3C8 /* AF3528 8007C388 A7A0002E */ sh $zero, 0x2e($sp) .L8007C38C: -/* AF352C 8007C38C 0C03F494 */ jal func_800FD250 +/* AF352C 8007C38C 0C03F494 */ jal Math_atan2f /* AF3530 8007C390 C4AE0008 */ lwc1 $f14, 8($a1) /* AF3534 8007C394 3C018014 */ lui $at, %hi(D_8013CB8C) /* AF3538 8007C398 C424CB8C */ lwc1 $f4, %lo(D_8013CB8C)($at) diff --git a/asm/non_matchings/code/sys_matrix/func_800D20CC.s b/asm/non_matchings/code/sys_matrix/func_800D20CC.s index 77305e9643..5e3a8efcdd 100644 --- a/asm/non_matchings/code/sys_matrix/func_800D20CC.s +++ b/asm/non_matchings/code/sys_matrix/func_800D20CC.s @@ -30,7 +30,7 @@ glabel func_800D20CC /* B49298 800D20F8 46021102 */ mul.s $f4, $f2, $f2 /* B4929C 800D20FC 46006307 */ neg.s $f12, $f12 /* B492A0 800D2100 4604A500 */ add.s $f20, $f20, $f4 -/* B492A4 800D2104 0C03F494 */ jal func_800FD250 +/* B492A4 800D2104 0C03F494 */ jal Math_atan2f /* B492A8 800D2108 4600A384 */ sqrt.s $f14, $f20 /* B492AC 800D210C 3C018014 */ lui $at, %hi(D_80146640) /* B492B0 800D2110 C4266640 */ lwc1 $f6, %lo(D_80146640)($at) @@ -50,7 +50,7 @@ glabel func_800D20CC /* B492E4 800D2144 A6000004 */ sh $zero, 4($s0) /* B492E8 800D2148 C48C0008 */ lwc1 $f12, 8($a0) /* B492EC 800D214C C48E0000 */ lwc1 $f14, ($a0) -/* B492F0 800D2150 0C03F494 */ jal func_800FD250 +/* B492F0 800D2150 0C03F494 */ jal Math_atan2f /* B492F4 800D2154 46006307 */ neg.s $f12, $f12 /* B492F8 800D2158 3C018014 */ lui $at, %hi(D_80146644) /* B492FC 800D215C C4326644 */ lwc1 $f18, %lo(D_80146644)($at) @@ -62,7 +62,7 @@ glabel func_800D20CC /* B49314 800D2174 C48C0020 */ lwc1 $f12, 0x20($a0) .L800D2178: /* B49318 800D2178 C48E0028 */ lwc1 $f14, 0x28($a0) -/* B4931C 800D217C 0C03F494 */ jal func_800FD250 +/* B4931C 800D217C 0C03F494 */ jal Math_atan2f /* B49320 800D2180 AFA40028 */ sw $a0, 0x28($sp) /* B49324 800D2184 3C018014 */ lui $at, %hi(D_80146648) /* B49328 800D2188 C4286648 */ lwc1 $f8, %lo(D_80146648)($at) @@ -76,7 +76,7 @@ glabel func_800D20CC /* B49348 800D21A8 5540000C */ bnezl $t2, .L800D21DC /* B4934C 800D21AC C4940000 */ lwc1 $f20, ($a0) /* B49350 800D21B0 C48C0004 */ lwc1 $f12, 4($a0) -/* B49354 800D21B4 0C03F494 */ jal func_800FD250 +/* B49354 800D21B4 0C03F494 */ jal Math_atan2f /* B49358 800D21B8 C48E0014 */ lwc1 $f14, 0x14($a0) /* B4935C 800D21BC 3C018014 */ lui $at, %hi(D_8014664C) /* B49360 800D21C0 C424664C */ lwc1 $f4, %lo(D_8014664C)($at) @@ -107,7 +107,7 @@ glabel func_800D20CC /* B493C0 800D2220 46041080 */ add.s $f2, $f2, $f4 /* B493C4 800D2224 46061080 */ add.s $f2, $f2, $f6 /* B493C8 800D2228 46001004 */ sqrt.s $f0, $f2 -/* B493CC 800D222C 0C03F494 */ jal func_800FD250 +/* B493CC 800D222C 0C03F494 */ jal Math_atan2f /* B493D0 800D2230 46008383 */ div.s $f14, $f16, $f0 /* B493D4 800D2234 3C018014 */ lui $at, %hi(D_80146650) /* B493D8 800D2238 C4286650 */ lwc1 $f8, %lo(D_80146650)($at) diff --git a/asm/non_matchings/code/sys_matrix/func_800D2264.s b/asm/non_matchings/code/sys_matrix/func_800D2264.s index 707546874d..0d1893e827 100644 --- a/asm/non_matchings/code/sys_matrix/func_800D2264.s +++ b/asm/non_matchings/code/sys_matrix/func_800D2264.s @@ -30,7 +30,7 @@ glabel func_800D2264 /* B49430 800D2290 46021102 */ mul.s $f4, $f2, $f2 /* B49434 800D2294 46006307 */ neg.s $f12, $f12 /* B49438 800D2298 4604A500 */ add.s $f20, $f20, $f4 -/* B4943C 800D229C 0C03F494 */ jal func_800FD250 +/* B4943C 800D229C 0C03F494 */ jal Math_atan2f /* B49440 800D22A0 4600A384 */ sqrt.s $f14, $f20 /* B49444 800D22A4 3C018014 */ lui $at, %hi(D_80146654) /* B49448 800D22A8 C4266654 */ lwc1 $f6, %lo(D_80146654)($at) @@ -50,7 +50,7 @@ glabel func_800D2264 /* B4947C 800D22DC A6000000 */ sh $zero, ($s0) /* B49480 800D22E0 C48C0010 */ lwc1 $f12, 0x10($a0) /* B49484 800D22E4 C48E0014 */ lwc1 $f14, 0x14($a0) -/* B49488 800D22E8 0C03F494 */ jal func_800FD250 +/* B49488 800D22E8 0C03F494 */ jal Math_atan2f /* B4948C 800D22EC 46006307 */ neg.s $f12, $f12 /* B49490 800D22F0 3C018014 */ lui $at, %hi(D_80146658) /* B49494 800D22F4 C4326658 */ lwc1 $f18, %lo(D_80146658)($at) @@ -62,7 +62,7 @@ glabel func_800D2264 /* B494AC 800D230C C48C0004 */ lwc1 $f12, 4($a0) .L800D2310: /* B494B0 800D2310 C48E0000 */ lwc1 $f14, ($a0) -/* B494B4 800D2314 0C03F494 */ jal func_800FD250 +/* B494B4 800D2314 0C03F494 */ jal Math_atan2f /* B494B8 800D2318 AFA40028 */ sw $a0, 0x28($sp) /* B494BC 800D231C 3C018014 */ lui $at, %hi(D_8014665C) /* B494C0 800D2320 C428665C */ lwc1 $f8, %lo(D_8014665C)($at) @@ -76,7 +76,7 @@ glabel func_800D2264 /* B494E0 800D2340 5540000C */ bnezl $t2, .L800D2374 /* B494E4 800D2344 C4940010 */ lwc1 $f20, 0x10($a0) /* B494E8 800D2348 C48C0018 */ lwc1 $f12, 0x18($a0) -/* B494EC 800D234C 0C03F494 */ jal func_800FD250 +/* B494EC 800D234C 0C03F494 */ jal Math_atan2f /* B494F0 800D2350 C48E0028 */ lwc1 $f14, 0x28($a0) /* B494F4 800D2354 3C018014 */ lui $at, %hi(D_80146660) /* B494F8 800D2358 C4246660 */ lwc1 $f4, %lo(D_80146660)($at) @@ -107,7 +107,7 @@ glabel func_800D2264 /* B49558 800D23B8 46041080 */ add.s $f2, $f2, $f4 /* B4955C 800D23BC 46061080 */ add.s $f2, $f2, $f6 /* B49560 800D23C0 46001004 */ sqrt.s $f0, $f2 -/* B49564 800D23C4 0C03F494 */ jal func_800FD250 +/* B49564 800D23C4 0C03F494 */ jal Math_atan2f /* B49568 800D23C8 46008383 */ div.s $f14, $f16, $f0 /* B4956C 800D23CC 3C018014 */ lui $at, %hi(D_80146664) /* B49570 800D23D0 C4286664 */ lwc1 $f8, %lo(D_80146664)($at) diff --git a/asm/non_matchings/code/z_camera/func_80044ADC.s b/asm/non_matchings/code/z_camera/func_80044ADC.s index 64e0a6de68..a5be3f4cbc 100644 --- a/asm/non_matchings/code/z_camera/func_80044ADC.s +++ b/asm/non_matchings/code/z_camera/func_80044ADC.s @@ -215,7 +215,7 @@ glabel func_80044ADC /* ABBF64 80044DC4 46060302 */ mul.s $f12, $f0, $f6 /* ABBF68 80044DC8 00000000 */ nop /* ABBF6C 80044DCC 46082182 */ mul.s $f6, $f4, $f8 -/* ABBF70 80044DD0 0C03F494 */ jal func_800FD250 +/* ABBF70 80044DD0 0C03F494 */ jal Math_atan2f /* ABBF74 80044DD4 E7A60040 */ swc1 $f6, 0x40($sp) /* ABBF78 80044DD8 3C018014 */ lui $at, %hi(D_80139DC8) /* ABBF7C 80044DDC C42A9DC8 */ lwc1 $f10, %lo(D_80139DC8)($at) @@ -232,7 +232,7 @@ glabel func_80044ADC /* ABBFA8 80044E08 44104000 */ mfc1 $s0, $f8 /* ABBFAC 80044E0C 00000000 */ nop /* ABBFB0 80044E10 00108400 */ sll $s0, $s0, 0x10 -/* ABBFB4 80044E14 0C03F494 */ jal func_800FD250 +/* ABBFB4 80044E14 0C03F494 */ jal Math_atan2f /* ABBFB8 80044E18 00108403 */ sra $s0, $s0, 0x10 /* ABBFBC 80044E1C 3C018014 */ lui $at, %hi(D_80139DD0) /* ABBFC0 80044E20 C4269DD0 */ lwc1 $f6, %lo(D_80139DD0)($at) diff --git a/asm/non_matchings/code/z_camera/func_800458D4.s b/asm/non_matchings/code/z_camera/func_800458D4.s index ccb791ab3a..904f926a01 100644 --- a/asm/non_matchings/code/z_camera/func_800458D4.s +++ b/asm/non_matchings/code/z_camera/func_800458D4.s @@ -58,7 +58,7 @@ glabel func_800458D4 /* ABCB18 80045978 0C01F00A */ jal func_8007C028 /* ABCB1C 8004597C E7A60048 */ swc1 $f6, 0x48($sp) /* ABCB20 80045980 C7AC0048 */ lwc1 $f12, 0x48($sp) -/* ABCB24 80045984 0C03F494 */ jal func_800FD250 +/* ABCB24 80045984 0C03F494 */ jal Math_atan2f /* ABCB28 80045988 46000386 */ mov.s $f14, $f0 /* ABCB2C 8004598C 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016 /* ABCB30 80045990 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0) diff --git a/asm/non_matchings/code/z_camera/func_80045C74.s b/asm/non_matchings/code/z_camera/func_80045C74.s index 89aab19cdc..ef494aaac1 100644 --- a/asm/non_matchings/code/z_camera/func_80045C74.s +++ b/asm/non_matchings/code/z_camera/func_80045C74.s @@ -138,7 +138,7 @@ glabel func_80045C74 /* ABCFB4 80045E14 46045501 */ sub.s $f20, $f10, $f4 /* ABCFB8 80045E18 4600A306 */ mov.s $f12, $f20 /* ABCFBC 80045E1C 46000386 */ mov.s $f14, $f0 -/* ABCFC0 80045E20 0C03F494 */ jal func_800FD250 +/* ABCFC0 80045E20 0C03F494 */ jal Math_atan2f /* ABCFC4 80045E24 E7A00054 */ swc1 $f0, 0x54($sp) /* ABCFC8 80045E28 3C018014 */ lui $at, %hi(D_80139E08) /* ABCFCC 80045E2C C4329E08 */ lwc1 $f18, %lo(D_80139E08)($at) @@ -148,7 +148,7 @@ glabel func_80045C74 /* ABCFDC 80045E3C 46083282 */ mul.s $f10, $f6, $f8 /* ABCFE0 80045E40 00000000 */ nop /* ABCFE4 80045E44 46125302 */ mul.s $f12, $f10, $f18 -/* ABCFE8 80045E48 0C03F3A0 */ jal func_800FCE80 +/* ABCFE8 80045E48 0C03F3A0 */ jal Math_tanf /* ABCFEC 80045E4C 00000000 */ nop /* ABCFF0 80045E50 C7B00054 */ lwc1 $f16, 0x54($sp) /* ABCFF4 80045E54 8FA2008C */ lw $v0, 0x8c($sp) @@ -191,7 +191,7 @@ glabel func_80045C74 /* ABD078 80045ED8 0C01F00A */ jal func_8007C028 /* ABD07C 80045EDC 46062501 */ sub.s $f20, $f4, $f6 /* ABD080 80045EE0 4600A306 */ mov.s $f12, $f20 -/* ABD084 80045EE4 0C03F494 */ jal func_800FD250 +/* ABD084 80045EE4 0C03F494 */ jal Math_atan2f /* ABD088 80045EE8 46000386 */ mov.s $f14, $f0 /* ABD08C 80045EEC 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016 /* ABD090 80045EF0 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0) diff --git a/asm/non_matchings/code/z_camera/func_800460A8.s b/asm/non_matchings/code/z_camera/func_800460A8.s index 9f4718be2b..912e308255 100644 --- a/asm/non_matchings/code/z_camera/func_800460A8.s +++ b/asm/non_matchings/code/z_camera/func_800460A8.s @@ -297,7 +297,7 @@ glabel func_800460A8 /* ABD5F4 80046454 46044501 */ sub.s $f20, $f8, $f4 /* ABD5F8 80046458 4600A306 */ mov.s $f12, $f20 /* ABD5FC 8004645C 46000386 */ mov.s $f14, $f0 -/* ABD600 80046460 0C03F494 */ jal func_800FD250 +/* ABD600 80046460 0C03F494 */ jal Math_atan2f /* ABD604 80046464 E7A00068 */ swc1 $f0, 0x68($sp) /* ABD608 80046468 3C018014 */ lui $at, %hi(D_80139E40) /* ABD60C 8004646C C4329E40 */ lwc1 $f18, %lo(D_80139E40)($at) @@ -307,7 +307,7 @@ glabel func_800460A8 /* ABD61C 8004647C 46065202 */ mul.s $f8, $f10, $f6 /* ABD620 80046480 00000000 */ nop /* ABD624 80046484 46124302 */ mul.s $f12, $f8, $f18 -/* ABD628 80046488 0C03F3A0 */ jal func_800FCE80 +/* ABD628 80046488 0C03F3A0 */ jal Math_tanf /* ABD62C 8004648C 00000000 */ nop /* ABD630 80046490 C7B00068 */ lwc1 $f16, 0x68($sp) /* ABD634 80046494 8FA200BC */ lw $v0, 0xbc($sp) @@ -352,7 +352,7 @@ glabel func_800460A8 /* ABD6C0 80046520 0C01F00A */ jal func_8007C028 /* ABD6C4 80046524 460A2501 */ sub.s $f20, $f4, $f10 /* ABD6C8 80046528 4600A306 */ mov.s $f12, $f20 -/* ABD6CC 8004652C 0C03F494 */ jal func_800FD250 +/* ABD6CC 8004652C 0C03F494 */ jal Math_atan2f /* ABD6D0 80046530 46000386 */ mov.s $f14, $f0 /* ABD6D4 80046534 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016 /* ABD6D8 80046538 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0) diff --git a/asm/non_matchings/code/z_eff_blure/func_800214D0.s b/asm/non_matchings/code/z_eff_blure/func_800214D0.s index 6f076d2c2e..a1ecf65ae7 100644 --- a/asm/non_matchings/code/z_eff_blure/func_800214D0.s +++ b/asm/non_matchings/code/z_eff_blure/func_800214D0.s @@ -330,19 +330,19 @@ glabel func_800214D0 /* A98AE8 80021948 8C59000C */ lw $t9, 0xc($v0) /* A98AEC 8002194C AA99001C */ swl $t9, 0x1c($s4) /* A98AF0 80021950 BA99001F */ swr $t9, 0x1f($s4) -/* A98AF4 80021954 0C03F3CD */ jal func_800FCF34 +/* A98AF4 80021954 0C03F3CD */ jal Math_nearbyintf /* A98AF8 80021958 C7AC0158 */ lwc1 $f12, 0x158($sp) /* A98AFC 8002195C 4600018D */ trunc.w.s $f6, $f0 /* A98B00 80021960 440A3000 */ mfc1 $t2, $f6 /* A98B04 80021964 00000000 */ nop /* A98B08 80021968 A68A0000 */ sh $t2, ($s4) -/* A98B0C 8002196C 0C03F3CD */ jal func_800FCF34 +/* A98B0C 8002196C 0C03F3CD */ jal Math_nearbyintf /* A98B10 80021970 C7AC015C */ lwc1 $f12, 0x15c($sp) /* A98B14 80021974 4600040D */ trunc.w.s $f16, $f0 /* A98B18 80021978 440C8000 */ mfc1 $t4, $f16 /* A98B1C 8002197C 00000000 */ nop /* A98B20 80021980 A68C0002 */ sh $t4, 2($s4) -/* A98B24 80021984 0C03F3CD */ jal func_800FCF34 +/* A98B24 80021984 0C03F3CD */ jal Math_nearbyintf /* A98B28 80021988 C7AC0160 */ lwc1 $f12, 0x160($sp) /* A98B2C 8002198C 4600020D */ trunc.w.s $f8, $f0 /* A98B30 80021990 440E4000 */ mfc1 $t6, $f8 @@ -356,19 +356,19 @@ glabel func_800214D0 /* A98B50 800219B0 A299000E */ sb $t9, 0xe($s4) /* A98B54 800219B4 93A8014B */ lbu $t0, 0x14b($sp) /* A98B58 800219B8 A288000F */ sb $t0, 0xf($s4) -/* A98B5C 800219BC 0C03F3CD */ jal func_800FCF34 +/* A98B5C 800219BC 0C03F3CD */ jal Math_nearbyintf /* A98B60 800219C0 C7AC014C */ lwc1 $f12, 0x14c($sp) /* A98B64 800219C4 4600048D */ trunc.w.s $f18, $f0 /* A98B68 800219C8 440A9000 */ mfc1 $t2, $f18 /* A98B6C 800219CC 00000000 */ nop /* A98B70 800219D0 A68A0010 */ sh $t2, 0x10($s4) -/* A98B74 800219D4 0C03F3CD */ jal func_800FCF34 +/* A98B74 800219D4 0C03F3CD */ jal Math_nearbyintf /* A98B78 800219D8 C7AC0150 */ lwc1 $f12, 0x150($sp) /* A98B7C 800219DC 4600028D */ trunc.w.s $f10, $f0 /* A98B80 800219E0 440C5000 */ mfc1 $t4, $f10 /* A98B84 800219E4 00000000 */ nop /* A98B88 800219E8 A68C0012 */ sh $t4, 0x12($s4) -/* A98B8C 800219EC 0C03F3CD */ jal func_800FCF34 +/* A98B8C 800219EC 0C03F3CD */ jal Math_nearbyintf /* A98B90 800219F0 C7AC0154 */ lwc1 $f12, 0x154($sp) /* A98B94 800219F4 4600010D */ trunc.w.s $f4, $f0 /* A98B98 800219F8 24120001 */ li $s2, 1 @@ -520,19 +520,19 @@ glabel func_800214D0 /* A98DDC 80021C3C 8C4B000C */ lw $t3, 0xc($v0) /* A98DE0 80021C40 AA2B000C */ swl $t3, 0xc($s1) /* A98DE4 80021C44 BA2B000F */ swr $t3, 0xf($s1) -/* A98DE8 80021C48 0C03F3CD */ jal func_800FCF34 +/* A98DE8 80021C48 0C03F3CD */ jal Math_nearbyintf /* A98DEC 80021C4C C7AC0158 */ lwc1 $f12, 0x158($sp) /* A98DF0 80021C50 4600018D */ trunc.w.s $f6, $f0 /* A98DF4 80021C54 440E3000 */ mfc1 $t6, $f6 /* A98DF8 80021C58 00000000 */ nop /* A98DFC 80021C5C A60E0000 */ sh $t6, ($s0) -/* A98E00 80021C60 0C03F3CD */ jal func_800FCF34 +/* A98E00 80021C60 0C03F3CD */ jal Math_nearbyintf /* A98E04 80021C64 C7AC015C */ lwc1 $f12, 0x15c($sp) /* A98E08 80021C68 4600020D */ trunc.w.s $f8, $f0 /* A98E0C 80021C6C 44184000 */ mfc1 $t8, $f8 /* A98E10 80021C70 00000000 */ nop /* A98E14 80021C74 A6180002 */ sh $t8, 2($s0) -/* A98E18 80021C78 0C03F3CD */ jal func_800FCF34 +/* A98E18 80021C78 0C03F3CD */ jal Math_nearbyintf /* A98E1C 80021C7C C7AC0160 */ lwc1 $f12, 0x160($sp) /* A98E20 80021C80 4600048D */ trunc.w.s $f18, $f0 /* A98E24 80021C84 4406E000 */ mfc1 $a2, $f28 @@ -558,19 +558,19 @@ glabel func_800214D0 /* A98E74 80021CD4 0C009FA1 */ jal func_80027E84 /* A98E78 80021CD8 93A401A7 */ lbu $a0, 0x1a7($sp) /* A98E7C 80021CDC A202000F */ sb $v0, 0xf($s0) -/* A98E80 80021CE0 0C03F3CD */ jal func_800FCF34 +/* A98E80 80021CE0 0C03F3CD */ jal Math_nearbyintf /* A98E84 80021CE4 C7AC014C */ lwc1 $f12, 0x14c($sp) /* A98E88 80021CE8 4600028D */ trunc.w.s $f10, $f0 /* A98E8C 80021CEC 440A5000 */ mfc1 $t2, $f10 /* A98E90 80021CF0 00000000 */ nop /* A98E94 80021CF4 A62A0000 */ sh $t2, ($s1) -/* A98E98 80021CF8 0C03F3CD */ jal func_800FCF34 +/* A98E98 80021CF8 0C03F3CD */ jal Math_nearbyintf /* A98E9C 80021CFC C7AC0150 */ lwc1 $f12, 0x150($sp) /* A98EA0 80021D00 4600010D */ trunc.w.s $f4, $f0 /* A98EA4 80021D04 440C2000 */ mfc1 $t4, $f4 /* A98EA8 80021D08 00000000 */ nop /* A98EAC 80021D0C A62C0002 */ sh $t4, 2($s1) -/* A98EB0 80021D10 0C03F3CD */ jal func_800FCF34 +/* A98EB0 80021D10 0C03F3CD */ jal Math_nearbyintf /* A98EB4 80021D14 C7AC0154 */ lwc1 $f12, 0x154($sp) /* A98EB8 80021D18 4600040D */ trunc.w.s $f16, $f0 /* A98EBC 80021D1C 4406E000 */ mfc1 $a2, $f28 diff --git a/asm/non_matchings/code/z_onepointdemo/func_8007C704.s b/asm/non_matchings/code/z_onepointdemo/func_8007C704.s index 8d1152d2fc..c0dcb5ca7f 100644 --- a/asm/non_matchings/code/z_onepointdemo/func_8007C704.s +++ b/asm/non_matchings/code/z_onepointdemo/func_8007C704.s @@ -14,7 +14,7 @@ glabel func_8007C704 /* AF38B4 8007C714 C4860000 */ lwc1 $f6, ($a0) /* AF38B8 8007C718 C4A40000 */ lwc1 $f4, ($a1) /* AF38BC 8007C71C 460A4381 */ sub.s $f14, $f8, $f10 -/* AF38C0 8007C720 0C03F494 */ jal func_800FD250 +/* AF38C0 8007C720 0C03F494 */ jal Math_atan2f /* AF38C4 8007C724 46062301 */ sub.s $f12, $f4, $f6 /* AF38C8 8007C728 3C018014 */ lui $at, %hi(D_8013CE40) /* AF38CC 8007C72C C430CE40 */ lwc1 $f16, %lo(D_8013CE40)($at) diff --git a/asm/non_matchings/code/z_player_lib/func_8008F87C.s b/asm/non_matchings/code/z_player_lib/func_8008F87C.s index a29f31e92b..ee183a3468 100644 --- a/asm/non_matchings/code/z_player_lib/func_8008F87C.s +++ b/asm/non_matchings/code/z_player_lib/func_8008F87C.s @@ -151,7 +151,7 @@ glabel func_8008F87C .L8008FAA4: /* B06C44 8008FAA4 46000506 */ mov.s $f20, $f0 .L8008FAA8: -/* B06C48 8008FAA8 0C03F494 */ jal func_800FD250 +/* B06C48 8008FAA8 0C03F494 */ jal Math_atan2f /* B06C4C 8008FAAC 4600A306 */ mov.s $f12, $f20 /* B06C50 8008FAB0 C7A80080 */ lwc1 $f8, 0x80($sp) /* B06C54 8008FAB4 C7A600A8 */ lwc1 $f6, 0xa8($sp) @@ -185,11 +185,11 @@ glabel func_8008F87C .L8008FB24: /* B06CC4 8008FB24 46000506 */ mov.s $f20, $f0 .L8008FB28: -/* B06CC8 8008FB28 0C03F494 */ jal func_800FD250 +/* B06CC8 8008FB28 0C03F494 */ jal Math_atan2f /* B06CCC 8008FB2C 4600A306 */ mov.s $f12, $f20 /* B06CD0 8008FB30 C7AC005C */ lwc1 $f12, 0x5c($sp) /* B06CD4 8008FB34 4600A386 */ mov.s $f14, $f20 -/* B06CD8 8008FB38 0C03F494 */ jal func_800FD250 +/* B06CD8 8008FB38 0C03F494 */ jal Math_atan2f /* B06CDC 8008FB3C E7A00050 */ swc1 $f0, 0x50($sp) /* B06CE0 8008FB40 3C018014 */ lui $at, %hi(D_8013E900) /* B06CE4 8008FB44 C42CE900 */ lwc1 $f12, %lo(D_8013E900)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Draw.s b/asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Draw.s index deb1d4ec56..05465187bb 100644 --- a/asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Draw.s +++ b/asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Draw.s @@ -110,14 +110,14 @@ glabel ArmsHook_Draw /* 00AD0 808659D0 46062080 */ add.s $f2, $f4, $f6 /* 00AD4 808659D4 46001004 */ sqrt.s $f0, $f2 /* 00AD8 808659D8 E7A20058 */ swc1 $f2, 0x0058($sp) -/* 00ADC 808659DC 0C03F494 */ jal func_800FD250 +/* 00ADC 808659DC 0C03F494 */ jal Math_atan2f /* 00AE0 808659E0 E7A0005C */ swc1 $f0, 0x005C($sp) /* 00AE4 808659E4 46000306 */ mov.s $f12, $f0 /* 00AE8 808659E8 0C034348 */ jal Matrix_RotateY /* 00AEC 808659EC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 /* 00AF0 808659F0 C7A2007C */ lwc1 $f2, 0x007C($sp) /* 00AF4 808659F4 C7AE005C */ lwc1 $f14, 0x005C($sp) -/* 00AF8 808659F8 0C03F494 */ jal func_800FD250 +/* 00AF8 808659F8 0C03F494 */ jal Math_atan2f /* 00AFC 808659FC 46001307 */ neg.s $f12, $f2 /* 00B00 80865A00 46000306 */ mov.s $f12, $f0 /* 00B04 80865A04 0C0342DC */ jal Matrix_RotateX diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B0CE0.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B0CE0.s index 0070a98175..2503e86c5d 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B0CE0.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B0CE0.s @@ -211,7 +211,7 @@ glabel func_808B0CE0 /* 00680 808B0FE0 8FA50024 */ lw $a1, 0x0024($sp) /* 00684 808B0FE4 0C032BFB */ jal func_800CAFEC /* 00688 808B0FE8 AFA7002C */ sw $a3, 0x002C($sp) -/* 0068C 808B0FEC 0C03F4DA */ jal func_800FD368 +/* 0068C 808B0FEC 0C03F4DA */ jal Math_acosf /* 00690 808B0FF0 46000306 */ mov.s $f12, $f0 /* 00694 808B0FF4 8FA5002C */ lw $a1, 0x002C($sp) /* 00698 808B0FF8 46000306 */ mov.s $f12, $f0 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C32F4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C32F4.s index a4e46a6654..d1c8420a28 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C32F4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C32F4.s @@ -171,7 +171,7 @@ glabel func_808C32F4 /* 023D4 808C3564 00000000 */ nop /* 023D8 808C3568 C7AC0048 */ lwc1 $f12, 0x0048($sp) -/* 023DC 808C356C 0C03F494 */ jal func_800FD250 +/* 023DC 808C356C 0C03F494 */ jal Math_atan2f /* 023E0 808C3570 C7AE0044 */ lwc1 $f14, 0x0044($sp) /* 023E4 808C3574 3C01808D */ lui $at, %hi(D_808CA6C8) ## $at = 808D0000 /* 023E8 808C3578 C42AA6C8 */ lwc1 $f10, %lo(D_808CA6C8)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C3704.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C3704.s index 457bd279e7..d9980754cd 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C3704.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C3704.s @@ -143,7 +143,7 @@ glabel func_808C3704 /* 0277C 808C390C 00000000 */ nop /* 02780 808C3910 C7AC004C */ lwc1 $f12, 0x004C($sp) -/* 02784 808C3914 0C03F494 */ jal func_800FD250 +/* 02784 808C3914 0C03F494 */ jal Math_atan2f /* 02788 808C3918 C7AE0048 */ lwc1 $f14, 0x0048($sp) /* 0278C 808C391C 3C01808D */ lui $at, %hi(D_808CA6D0) ## $at = 808D0000 /* 02790 808C3920 C42AA6D0 */ lwc1 $f10, %lo(D_808CA6D0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s index 6051242b08..9614361afa 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s @@ -635,7 +635,7 @@ glabel L808C5A4C /* 04D0C 808C5E9C E7A40010 */ swc1 $f4, 0x0010($sp) /* 04D10 808C5EA0 C7AC0180 */ lwc1 $f12, 0x0180($sp) -/* 04D14 808C5EA4 0C03F494 */ jal func_800FD250 +/* 04D14 808C5EA4 0C03F494 */ jal Math_atan2f /* 04D18 808C5EA8 C7AE017C */ lwc1 $f14, 0x017C($sp) /* 04D1C 808C5EAC 3C01808D */ lui $at, %hi(D_808CA7A8) ## $at = 808D0000 /* 04D20 808C5EB0 C426A7A8 */ lwc1 $f6, %lo(D_808CA7A8)($at) @@ -754,7 +754,7 @@ glabel L808C5FE4 /* 04EC4 808C6054 460E7182 */ mul.s $f6, $f14, $f14 /* 04EC8 808C6058 46062000 */ add.s $f0, $f4, $f6 /* 04ECC 808C605C 46000004 */ sqrt.s $f0, $f0 -/* 04ED0 808C6060 0C03F494 */ jal func_800FD250 +/* 04ED0 808C6060 0C03F494 */ jal Math_atan2f /* 04ED4 808C6064 E600022C */ swc1 $f0, 0x022C($s0) ## 0000022C /* 04ED8 808C6068 2419015E */ addiu $t9, $zero, 0x015E ## $t9 = 0000015E /* 04EDC 808C606C 24080009 */ addiu $t0, $zero, 0x0009 ## $t0 = 00000009 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808CB718.s b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808CB718.s index 1f9bbef366..9b3a1dce84 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808CB718.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808CB718.s @@ -95,7 +95,7 @@ glabel func_808CB718 /* 00AB4 808CB874 4600A306 */ mov.s $f12, $f20 /* 00AB8 808CB878 460A0202 */ mul.s $f8, $f0, $f10 /* 00ABC 808CB87C 4608B580 */ add.s $f22, $f22, $f8 -/* 00AC0 808CB880 0C03F494 */ jal func_800FD250 +/* 00AC0 808CB880 0C03F494 */ jal Math_atan2f /* 00AC4 808CB884 4600B386 */ mov.s $f14, $f22 /* 00AC8 808CB888 3C01808D */ lui $at, %hi(D_808D1E4C) ## $at = 808D0000 /* 00ACC 808CB88C C4381E4C */ lwc1 $f24, %lo(D_808D1E4C)($at) @@ -117,7 +117,7 @@ glabel func_808CB718 /* 00B0C 808CB8CC 00000000 */ nop /* 00B10 808CB8D0 46805220 */ cvt.s.w $f8, $f10 /* 00B14 808CB8D4 E7AE0090 */ swc1 $f14, 0x0090($sp) -/* 00B18 808CB8D8 0C03F494 */ jal func_800FD250 +/* 00B18 808CB8D8 0C03F494 */ jal Math_atan2f /* 00B1C 808CB8DC E7A801B4 */ swc1 $f8, 0x01B4($sp) /* 00B20 808CB8E0 46180102 */ mul.s $f4, $f0, $f24 /* 00B24 808CB8E4 3C04808D */ lui $a0, %hi(D_808D1C30) ## $a0 = 808D0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s index c758e0835d..e463507a8d 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s @@ -92,7 +92,7 @@ glabel func_808E1EB4 /* 0B794 808E2004 460A4381 */ sub.s $f14, $f8, $f10 /* 0B798 808E2008 4600A306 */ mov.s $f12, $f20 /* 0B79C 808E200C 46062581 */ sub.s $f22, $f4, $f6 -/* 0B7A0 808E2010 0C03F494 */ jal func_800FD250 +/* 0B7A0 808E2010 0C03F494 */ jal Math_atan2f /* 0B7A4 808E2014 E7AE0084 */ swc1 $f14, 0x0084($sp) /* 0B7A8 808E2018 3C018090 */ lui $at, %hi(D_808F81C4) ## $at = 80900000 /* 0B7AC 808E201C C43281C4 */ lwc1 $f18, %lo(D_808F81C4)($at) @@ -110,7 +110,7 @@ glabel func_808E1EB4 /* 0B7DC 808E204C 00108400 */ sll $s0, $s0, 16 /* 0B7E0 808E2050 00108403 */ sra $s0, $s0, 16 /* 0B7E4 808E2054 46001384 */ sqrt.s $f14, $f2 -/* 0B7E8 808E2058 0C03F494 */ jal func_800FD250 +/* 0B7E8 808E2058 0C03F494 */ jal Math_atan2f /* 0B7EC 808E205C E7A2005C */ swc1 $f2, 0x005C($sp) /* 0B7F0 808E2060 3C018090 */ lui $at, %hi(D_808F81C8) ## $at = 80900000 /* 0B7F4 808E2064 C43281C8 */ lwc1 $f18, %lo(D_808F81C8)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s index ae370ad8c6..96be55e2cf 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s @@ -114,7 +114,7 @@ glabel L808E26AC /* 0BE7C 808E26EC C6460280 */ lwc1 $f6, 0x0280($s2) ## 00000280 /* 0BE80 808E26F0 E7AC0098 */ swc1 $f12, 0x0098($sp) /* 0BE84 808E26F4 46083381 */ sub.s $f14, $f6, $f8 -/* 0BE88 808E26F8 0C03F494 */ jal func_800FD250 +/* 0BE88 808E26F8 0C03F494 */ jal Math_atan2f /* 0BE8C 808E26FC E7AE0090 */ swc1 $f14, 0x0090($sp) /* 0BE90 808E2700 3C018090 */ lui $at, %hi(D_808F8214) ## $at = 80900000 /* 0BE94 808E2704 C42A8214 */ lwc1 $f10, %lo(D_808F8214)($at) @@ -131,7 +131,7 @@ glabel L808E26AC /* 0BEC0 808E2730 46002384 */ sqrt.s $f14, $f4 /* 0BEC4 808E2734 E7A40058 */ swc1 $f4, 0x0058($sp) /* 0BEC8 808E2738 A7A80080 */ sh $t0, 0x0080($sp) -/* 0BECC 808E273C 0C03F494 */ jal func_800FD250 +/* 0BECC 808E273C 0C03F494 */ jal Math_atan2f /* 0BED0 808E2740 E7AE008C */ swc1 $f14, 0x008C($sp) /* 0BED4 808E2744 3C0145C0 */ lui $at, 0x45C0 ## $at = 45C00000 /* 0BED8 808E2748 44816000 */ mtc1 $at, $f12 ## $f12 = 6144.00 @@ -282,7 +282,7 @@ glabel L808E28FC /* 0C0F0 808E2960 46044301 */ sub.s $f12, $f8, $f4 /* 0C0F4 808E2964 AE2D01F8 */ sw $t5, 0x01F8($s1) ## 000001F8 /* 0C0F8 808E2968 C62601F8 */ lwc1 $f6, 0x01F8($s1) ## 000001F8 -/* 0C0FC 808E296C 0C03F494 */ jal func_800FD250 +/* 0C0FC 808E296C 0C03F494 */ jal Math_atan2f /* 0C100 808E2970 460A3381 */ sub.s $f14, $f6, $f10 /* 0C104 808E2974 3C018090 */ lui $at, %hi(D_808F821C) ## $at = 80900000 /* 0C108 808E2978 C428821C */ lwc1 $f8, %lo(D_808F821C)($at) @@ -322,7 +322,7 @@ glabel L808E29A8 /* 0C18C 808E29FC C62601F8 */ lwc1 $f6, 0x01F8($s1) ## 000001F8 /* 0C190 808E2A00 E7AC0098 */ swc1 $f12, 0x0098($sp) /* 0C194 808E2A04 460A3381 */ sub.s $f14, $f6, $f10 -/* 0C198 808E2A08 0C03F494 */ jal func_800FD250 +/* 0C198 808E2A08 0C03F494 */ jal Math_atan2f /* 0C19C 808E2A0C E7AE0090 */ swc1 $f14, 0x0090($sp) /* 0C1A0 808E2A10 3C018090 */ lui $at, %hi(D_808F8220) ## $at = 80900000 /* 0C1A4 808E2A14 C4288220 */ lwc1 $f8, %lo(D_808F8220)($at) @@ -337,7 +337,7 @@ glabel L808E29A8 /* 0C1C8 808E2A38 46085000 */ add.s $f0, $f10, $f8 /* 0C1CC 808E2A3C 44083000 */ mfc1 $t0, $f6 /* 0C1D0 808E2A40 46000384 */ sqrt.s $f14, $f0 -/* 0C1D4 808E2A44 0C03F494 */ jal func_800FD250 +/* 0C1D4 808E2A44 0C03F494 */ jal Math_atan2f /* 0C1D8 808E2A48 A7A80080 */ sh $t0, 0x0080($sp) /* 0C1DC 808E2A4C 3C018090 */ lui $at, %hi(D_808F8224) ## $at = 80900000 /* 0C1E0 808E2A50 C4248224 */ lwc1 $f4, %lo(D_808F8224)($at) @@ -638,7 +638,7 @@ glabel L808E2E70 /* 0C62C 808E2E9C C62A01F8 */ lwc1 $f10, 0x01F8($s1) ## 000001F8 /* 0C630 808E2EA0 E7AC0098 */ swc1 $f12, 0x0098($sp) /* 0C634 808E2EA4 46065381 */ sub.s $f14, $f10, $f6 -/* 0C638 808E2EA8 0C03F494 */ jal func_800FD250 +/* 0C638 808E2EA8 0C03F494 */ jal Math_atan2f /* 0C63C 808E2EAC E7AE0090 */ swc1 $f14, 0x0090($sp) /* 0C640 808E2EB0 3C018090 */ lui $at, %hi(D_808F822C) ## $at = 80900000 /* 0C644 808E2EB4 C428822C */ lwc1 $f8, %lo(D_808F822C)($at) @@ -654,7 +654,7 @@ glabel L808E2E70 /* 0C66C 808E2EDC 440E5000 */ mfc1 $t6, $f10 /* 0C670 808E2EE0 46000384 */ sqrt.s $f14, $f0 /* 0C674 808E2EE4 A7AE0080 */ sh $t6, 0x0080($sp) -/* 0C678 808E2EE8 0C03F494 */ jal func_800FD250 +/* 0C678 808E2EE8 0C03F494 */ jal Math_atan2f /* 0C67C 808E2EEC E7AE008C */ swc1 $f14, 0x008C($sp) /* 0C680 808E2EF0 3C0145C0 */ lui $at, 0x45C0 ## $at = 45C00000 /* 0C684 808E2EF4 44816000 */ mtc1 $at, $f12 ## $f12 = 6144.00 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E3564.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E3564.s index d35c2da4e7..d3919b09a4 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E3564.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E3564.s @@ -123,14 +123,14 @@ glabel func_808E3564 /* 0CEC4 808E3734 46128581 */ sub.s $f22, $f16, $f18 /* 0CEC8 808E3738 4600A306 */ mov.s $f12, $f20 /* 0CECC 808E373C 46085601 */ sub.s $f24, $f10, $f8 -/* 0CED0 808E3740 0C03F494 */ jal func_800FD250 +/* 0CED0 808E3740 0C03F494 */ jal Math_atan2f /* 0CED4 808E3744 4600B386 */ mov.s $f14, $f22 /* 0CED8 808E3748 4614A682 */ mul.s $f26, $f20, $f20 /* 0CEDC 808E374C E7A000B0 */ swc1 $f0, 0x00B0($sp) /* 0CEE0 808E3750 4600C306 */ mov.s $f12, $f24 /* 0CEE4 808E3754 4616B702 */ mul.s $f28, $f22, $f22 /* 0CEE8 808E3758 461CD000 */ add.s $f0, $f26, $f28 -/* 0CEEC 808E375C 0C03F494 */ jal func_800FD250 +/* 0CEEC 808E375C 0C03F494 */ jal Math_atan2f /* 0CEF0 808E3760 46000384 */ sqrt.s $f14, $f0 /* 0CEF4 808E3764 C6040038 */ lwc1 $f4, 0x0038($s0) ## 00010038 /* 0CEF8 808E3768 46000507 */ neg.s $f20, $f0 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s index b6bde6a57c..b91180630f 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s @@ -151,7 +151,7 @@ glabel func_80912594 /* 0216C 809127AC 46125301 */ sub.s $f12, $f10, $f18 /* 02170 809127B0 46108282 */ mul.s $f10, $f16, $f16 /* 02174 809127B4 460A4000 */ add.s $f0, $f8, $f10 -/* 02178 809127B8 0C03F494 */ jal func_800FD250 +/* 02178 809127B8 0C03F494 */ jal Math_atan2f /* 0217C 809127BC 46000384 */ sqrt.s $f14, $f0 /* 02180 809127C0 3C018091 */ lui $at, %hi(D_80915448) ## $at = 80910000 /* 02184 809127C4 C4325448 */ lwc1 $f18, %lo(D_80915448)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s index 3f07a8c727..4869ec2a3c 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s @@ -346,7 +346,7 @@ glabel func_80917D98 /* 02884 80918294 460E7102 */ mul.s $f4, $f14, $f14 /* 02888 80918298 46049000 */ add.s $f0, $f18, $f4 /* 0288C 8091829C 46000004 */ sqrt.s $f0, $f0 -/* 02890 809182A0 0C03F494 */ jal func_800FD250 +/* 02890 809182A0 0C03F494 */ jal Math_atan2f /* 02894 809182A4 E6400228 */ swc1 $f0, 0x0228($s2) ## 00000228 /* 02898 809182A8 240F010E */ addiu $t7, $zero, 0x010E ## $t7 = 0000010E /* 0289C 809182AC 3C010001 */ lui $at, 0x0001 ## $at = 00010000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s index dbeb7cf17f..6e91dc824a 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s @@ -1377,7 +1377,7 @@ glabel L8091D430 /* 01DF0 8091D8F0 46109381 */ sub.s $f14, $f18, $f16 /* 01DF4 8091D8F4 AE480F78 */ sw $t0, 0x0F78($s2) ## 00000F78 /* 01DF8 8091D8F8 8E090058 */ lw $t1, 0x0058($s0) ## 00000058 -/* 01DFC 8091D8FC 0C03F494 */ jal func_800FD250 +/* 01DFC 8091D8FC 0C03F494 */ jal Math_atan2f /* 01E00 8091D900 AE490F7C */ sw $t1, 0x0F7C($s2) ## 00000F7C /* 01E04 8091D904 E6401004 */ swc1 $f0, 0x1004($s2) ## 00001004 /* 01E08 8091D908 10000003 */ beq $zero, $zero, .L8091D918 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091F5A8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091F5A8.s index cc06a33e48..69cc01760e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091F5A8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091F5A8.s @@ -292,7 +292,7 @@ glabel L8091F8F8 /* 03EE4 8091F9E4 C60401DC */ lwc1 $f4, 0x01DC($s0) ## 000001DC /* 03EE8 8091F9E8 E7AC0098 */ swc1 $f12, 0x0098($sp) /* 03EEC 8091F9EC 46062381 */ sub.s $f14, $f4, $f6 -/* 03EF0 8091F9F0 0C03F494 */ jal func_800FD250 +/* 03EF0 8091F9F0 0C03F494 */ jal Math_atan2f /* 03EF4 8091F9F4 E7AE0090 */ swc1 $f14, 0x0090($sp) /* 03EF8 8091F9F8 C7B00098 */ lwc1 $f16, 0x0098($sp) /* 03EFC 8091F9FC C7B20090 */ lwc1 $f18, 0x0090($sp) @@ -302,7 +302,7 @@ glabel L8091F8F8 /* 03F0C 8091FA0C 46129282 */ mul.s $f10, $f18, $f18 /* 03F10 8091FA10 460A4100 */ add.s $f4, $f8, $f10 /* 03F14 8091FA14 E7A4003C */ swc1 $f4, 0x003C($sp) -/* 03F18 8091FA18 0C03F494 */ jal func_800FD250 +/* 03F18 8091FA18 0C03F494 */ jal Math_atan2f /* 03F1C 8091FA1C 46002384 */ sqrt.s $f14, $f4 /* 03F20 8091FA20 3C018092 */ lui $at, %hi(D_80926D08) ## $at = 80920000 /* 03F24 8091FA24 C7A20088 */ lwc1 $f2, 0x0088($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809206C4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809206C4.s index d4d8297883..a5503439b6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809206C4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809206C4.s @@ -65,7 +65,7 @@ glabel L80920734 /* 04CB8 809207B8 C62A0F70 */ lwc1 $f10, 0x0F70($s1) ## 00000F70 /* 04CBC 809207BC E7AC0088 */ swc1 $f12, 0x0088($sp) /* 04CC0 809207C0 460A4381 */ sub.s $f14, $f8, $f10 -/* 04CC4 809207C4 0C03F494 */ jal func_800FD250 +/* 04CC4 809207C4 0C03F494 */ jal Math_atan2f /* 04CC8 809207C8 E7AE0084 */ swc1 $f14, 0x0084($sp) /* 04CCC 809207CC C7AC0088 */ lwc1 $f12, 0x0088($sp) /* 04CD0 809207D0 C7AE0084 */ lwc1 $f14, 0x0084($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809216D0.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809216D0.s index d620ebfcfa..03bf62d6e3 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809216D0.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_809216D0.s @@ -1121,7 +1121,7 @@ glabel L80921B08 /* 06BD4 809226D4 C62601DC */ lwc1 $f6, 0x01DC($s1) ## 000001DC /* 06BD8 809226D8 E7AC00DC */ swc1 $f12, 0x00DC($sp) /* 06BDC 809226DC 46123381 */ sub.s $f14, $f6, $f18 -/* 06BE0 809226E0 0C03F494 */ jal func_800FD250 +/* 06BE0 809226E0 0C03F494 */ jal Math_atan2f /* 06BE4 809226E4 E7AE00D4 */ swc1 $f14, 0x00D4($sp) /* 06BE8 809226E8 3C018092 */ lui $at, %hi(D_80926E28) ## $at = 80920000 /* 06BEC 809226EC C4286E28 */ lwc1 $f8, %lo(D_80926E28)($at) @@ -1140,7 +1140,7 @@ glabel L80921B08 /* 06C20 80922720 46044000 */ add.s $f0, $f8, $f4 /* 06C24 80922724 468034A0 */ cvt.s.w $f18, $f6 /* 06C28 80922728 46000384 */ sqrt.s $f14, $f0 -/* 06C2C 8092272C 0C03F494 */ jal func_800FD250 +/* 06C2C 8092272C 0C03F494 */ jal Math_atan2f /* 06C30 80922730 E7B200CC */ swc1 $f18, 0x00CC($sp) /* 06C34 80922734 3C018092 */ lui $at, %hi(D_80926E2C) ## $at = 80920000 /* 06C38 80922738 C42A6E2C */ lwc1 $f10, %lo(D_80926E2C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924228.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924228.s index d05706e6fd..57a454798e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924228.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924228.s @@ -444,7 +444,7 @@ glabel func_80924228 /* 08DEC 809248EC C6280F7C */ lwc1 $f8, 0x0F7C($s1) ## 00000F7C /* 08DF0 809248F0 E7AC008C */ swc1 $f12, 0x008C($sp) /* 08DF4 809248F4 46064381 */ sub.s $f14, $f8, $f6 -/* 08DF8 809248F8 0C03F494 */ jal func_800FD250 +/* 08DF8 809248F8 0C03F494 */ jal Math_atan2f /* 08DFC 809248FC E7AE0084 */ swc1 $f14, 0x0084($sp) /* 08E00 80924900 C7B0008C */ lwc1 $f16, 0x008C($sp) /* 08E04 80924904 C7A20084 */ lwc1 $f2, 0x0084($sp) @@ -453,7 +453,7 @@ glabel func_80924228 /* 08E10 80924910 C7AC0088 */ lwc1 $f12, 0x0088($sp) /* 08E14 80924914 46021482 */ mul.s $f18, $f2, $f2 /* 08E18 80924918 46125000 */ add.s $f0, $f10, $f18 -/* 08E1C 8092491C 0C03F494 */ jal func_800FD250 +/* 08E1C 8092491C 0C03F494 */ jal Math_atan2f /* 08E20 80924920 46000384 */ sqrt.s $f14, $f0 /* 08E24 80924924 3C014120 */ lui $at, 0x4120 ## $at = 41200000 /* 08E28 80924928 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924D70.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924D70.s index 80b5a085ce..41725f13de 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924D70.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_80924D70.s @@ -178,7 +178,7 @@ glabel func_80924D70 /* 09508 80925008 C6060034 */ lwc1 $f6, 0x0034($s0) ## 00000034 /* 0950C 8092500C 460A8301 */ sub.s $f12, $f16, $f10 /* 09510 80925010 E7A600A8 */ swc1 $f6, 0x00A8($sp) -/* 09514 80925014 0C03F494 */ jal func_800FD250 +/* 09514 80925014 0C03F494 */ jal Math_atan2f /* 09518 80925018 46049381 */ sub.s $f14, $f18, $f4 /* 0951C 8092501C 46000306 */ mov.s $f12, $f0 /* 09520 80925020 0C034348 */ jal Matrix_RotateY diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A2AC.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A2AC.s index 6897026329..874ec1ee87 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A2AC.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A2AC.s @@ -27,7 +27,7 @@ glabel func_8093A2AC /* 01634 8093A304 C60404B8 */ lwc1 $f4, 0x04B8($s0) ## 000004B8 /* 01638 8093A308 E7AC003C */ swc1 $f12, 0x003C($sp) /* 0163C 8093A30C 46062381 */ sub.s $f14, $f4, $f6 -/* 01640 8093A310 0C03F494 */ jal func_800FD250 +/* 01640 8093A310 0C03F494 */ jal Math_atan2f /* 01644 8093A314 E7AE0034 */ swc1 $f14, 0x0034($sp) /* 01648 8093A318 3C018095 */ lui $at, %hi(D_8094AECC) ## $at = 80950000 /* 0164C 8093A31C C428AECC */ lwc1 $f8, %lo(D_8094AECC)($at) @@ -47,7 +47,7 @@ glabel func_8093A2AC /* 01684 8093A354 46000384 */ sqrt.s $f14, $f0 /* 01688 8093A358 468021A0 */ cvt.s.w $f6, $f4 /* 0168C 8093A35C E7AE0028 */ swc1 $f14, 0x0028($sp) -/* 01690 8093A360 0C03F494 */ jal func_800FD250 +/* 01690 8093A360 0C03F494 */ jal Math_atan2f /* 01694 8093A364 E7A6002C */ swc1 $f6, 0x002C($sp) /* 01698 8093A368 3C018095 */ lui $at, %hi(D_8094AED0) ## $at = 80950000 /* 0169C 8093A36C C432AED0 */ lwc1 $f18, %lo(D_8094AED0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093B1AC.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093B1AC.s index 56a45afb99..b2e851404e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093B1AC.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093B1AC.s @@ -401,7 +401,7 @@ glabel func_8093B1AC /* 02A68 8093B738 46082601 */ sub.s $f24, $f4, $f8 /* 02A6C 8093B73C 4600A306 */ mov.s $f12, $f20 /* 02A70 8093B740 46123681 */ sub.s $f26, $f6, $f18 -/* 02A74 8093B744 0C03F494 */ jal func_800FD250 +/* 02A74 8093B744 0C03F494 */ jal Math_atan2f /* 02A78 8093B748 4600C386 */ mov.s $f14, $f24 /* 02A7C 8093B74C 4614A082 */ mul.s $f2, $f20, $f20 /* 02A80 8093B750 E6A0051C */ swc1 $f0, 0x051C($s5) ## 0000051C @@ -410,7 +410,7 @@ glabel func_8093B1AC /* 02A8C 8093B75C E7A20074 */ swc1 $f2, 0x0074($sp) /* 02A90 8093B760 46101000 */ add.s $f0, $f2, $f16 /* 02A94 8093B764 E7B00070 */ swc1 $f16, 0x0070($sp) -/* 02A98 8093B768 0C03F494 */ jal func_800FD250 +/* 02A98 8093B768 0C03F494 */ jal Math_atan2f /* 02A9C 8093B76C 46000384 */ sqrt.s $f14, $f0 /* 02AA0 8093B770 86A204FC */ lh $v0, 0x04FC($s5) ## 000004FC /* 02AA4 8093B774 46000287 */ neg.s $f10, $f0 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093EE10.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093EE10.s index 8f8b60f7af..bcd2349a12 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093EE10.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093EE10.s @@ -153,7 +153,7 @@ glabel func_8093EE10 /* 0635C 8093F02C C60804B8 */ lwc1 $f8, 0x04B8($s0) ## 000004B8 /* 06360 8093F030 E7AC0034 */ swc1 $f12, 0x0034($sp) /* 06364 8093F034 460A4381 */ sub.s $f14, $f8, $f10 -/* 06368 8093F038 0C03F494 */ jal func_800FD250 +/* 06368 8093F038 0C03F494 */ jal Math_atan2f /* 0636C 8093F03C E7AE002C */ swc1 $f14, 0x002C($sp) /* 06370 8093F040 3C018095 */ lui $at, %hi(D_8094AFD8) ## $at = 80950000 /* 06374 8093F044 C432AFD8 */ lwc1 $f18, %lo(D_8094AFD8)($at) @@ -168,7 +168,7 @@ glabel func_8093EE10 /* 06398 8093F068 460A4000 */ add.s $f0, $f8, $f10 /* 0639C 8093F06C 44183000 */ mfc1 $t8, $f6 /* 063A0 8093F070 46000384 */ sqrt.s $f14, $f0 -/* 063A4 8093F074 0C03F494 */ jal func_800FD250 +/* 063A4 8093F074 0C03F494 */ jal Math_atan2f /* 063A8 8093F078 A7B80024 */ sh $t8, 0x0024($sp) /* 063AC 8093F07C 3C018095 */ lui $at, %hi(D_8094AFDC) ## $at = 80950000 /* 063B0 8093F080 C432AFDC */ lwc1 $f18, %lo(D_8094AFDC)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809453EC.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809453EC.s index c9fbe55acd..a53d5b0c8c 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809453EC.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809453EC.s @@ -51,7 +51,7 @@ glabel func_809453EC /* 0C7D4 809454A4 C628002C */ lwc1 $f8, 0x002C($s1) ## 0000002C /* 0C7D8 809454A8 C446002C */ lwc1 $f6, 0x002C($v0) ## 0000002C /* 0C7DC 809454AC 46083381 */ sub.s $f14, $f6, $f8 -/* 0C7E0 809454B0 0C03F494 */ jal func_800FD250 +/* 0C7E0 809454B0 0C03F494 */ jal Math_atan2f /* 0C7E4 809454B4 E7AE00C0 */ swc1 $f14, 0x00C0($sp) /* 0C7E8 809454B8 3C018095 */ lui $at, %hi(D_8094B170) ## $at = 80950000 /* 0C7EC 809454BC C42AB170 */ lwc1 $f10, %lo(D_8094B170)($at) @@ -67,7 +67,7 @@ glabel func_809453EC /* 0C814 809454E4 00000000 */ nop /* 0C818 809454E8 A6280032 */ sh $t0, 0x0032($s1) ## 00000032 /* 0C81C 809454EC 46000384 */ sqrt.s $f14, $f0 -/* 0C820 809454F0 0C03F494 */ jal func_800FD250 +/* 0C820 809454F0 0C03F494 */ jal Math_atan2f /* 0C824 809454F4 C7AC00C4 */ lwc1 $f12, 0x00C4($sp) /* 0C828 809454F8 3C018095 */ lui $at, %hi(D_8094B174) ## $at = 80950000 /* 0C82C 809454FC C428B174 */ lwc1 $f8, %lo(D_8094B174)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_80945D14.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_80945D14.s index f0067506fb..36838d5466 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_80945D14.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_80945D14.s @@ -52,7 +52,7 @@ glabel func_80945D14 /* 0D100 80945DD0 C628002C */ lwc1 $f8, 0x002C($s1) ## 0000002C /* 0D104 80945DD4 C446002C */ lwc1 $f6, 0x002C($v0) ## 0000002C /* 0D108 80945DD8 46083381 */ sub.s $f14, $f6, $f8 -/* 0D10C 80945DDC 0C03F494 */ jal func_800FD250 +/* 0D10C 80945DDC 0C03F494 */ jal Math_atan2f /* 0D110 80945DE0 E7AE0118 */ swc1 $f14, 0x0118($sp) /* 0D114 80945DE4 3C018095 */ lui $at, %hi(D_8094B194) ## $at = 80950000 /* 0D118 80945DE8 C42AB194 */ lwc1 $f10, %lo(D_8094B194)($at) @@ -68,7 +68,7 @@ glabel func_80945D14 /* 0D140 80945E10 00000000 */ nop /* 0D144 80945E14 A6390032 */ sh $t9, 0x0032($s1) ## 00000032 /* 0D148 80945E18 46000384 */ sqrt.s $f14, $f0 -/* 0D14C 80945E1C 0C03F494 */ jal func_800FD250 +/* 0D14C 80945E1C 0C03F494 */ jal Math_atan2f /* 0D150 80945E20 C7AC011C */ lwc1 $f12, 0x011C($sp) /* 0D154 80945E24 3C018095 */ lui $at, %hi(D_8094B198) ## $at = 80950000 /* 0D158 80945E28 C428B198 */ lwc1 $f8, %lo(D_8094B198)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A1C0.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A1C0.s index fa8cafff5d..ca1fa878cc 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A1C0.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A1C0.s @@ -83,7 +83,7 @@ glabel func_8094A1C0 /* 11628 8094A2F8 E60004B4 */ swc1 $f0, 0x04B4($s0) ## 000004B4 /* 1162C 8094A2FC E61204C8 */ swc1 $f18, 0x04C8($s0) ## 000004C8 /* 11630 8094A300 E6120068 */ swc1 $f18, 0x0068($s0) ## 00000068 -/* 11634 8094A304 0C03F494 */ jal func_800FD250 +/* 11634 8094A304 0C03F494 */ jal Math_atan2f /* 11638 8094A308 460A0601 */ sub.s $f24, $f0, $f10 /* 1163C 8094A30C 3C018095 */ lui $at, %hi(D_8094B220) ## $at = 80950000 /* 11640 8094A310 C43AB220 */ lwc1 $f26, %lo(D_8094B220)($at) @@ -97,7 +97,7 @@ glabel func_8094A1C0 /* 11660 8094A330 46045000 */ add.s $f0, $f10, $f4 /* 11664 8094A334 440C4000 */ mfc1 $t4, $f8 /* 11668 8094A338 46000384 */ sqrt.s $f14, $f0 -/* 1166C 8094A33C 0C03F494 */ jal func_800FD250 +/* 1166C 8094A33C 0C03F494 */ jal Math_atan2f /* 11670 8094A340 A60C0032 */ sh $t4, 0x0032($s0) ## 00000032 /* 11674 8094A344 461A0182 */ mul.s $f6, $f0, $f26 /* 11678 8094A348 3C050603 */ lui $a1, 0x0603 ## $a1 = 06030000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A398.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A398.s index 951414fbca..cc5dcecc45 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A398.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8094A398.s @@ -21,7 +21,7 @@ glabel func_8094A398 /* 1170C 8094A3DC C60404B8 */ lwc1 $f4, 0x04B8($s0) ## 000004B8 /* 11710 8094A3E0 E7AC003C */ swc1 $f12, 0x003C($sp) /* 11714 8094A3E4 46062381 */ sub.s $f14, $f4, $f6 -/* 11718 8094A3E8 0C03F494 */ jal func_800FD250 +/* 11718 8094A3E8 0C03F494 */ jal Math_atan2f /* 1171C 8094A3EC E7AE0034 */ swc1 $f14, 0x0034($sp) /* 11720 8094A3F0 3C018095 */ lui $at, %hi(D_8094B224) ## $at = 80950000 /* 11724 8094A3F4 C428B224 */ lwc1 $f8, %lo(D_8094B224)($at) @@ -41,7 +41,7 @@ glabel func_8094A398 /* 1175C 8094A42C 46000384 */ sqrt.s $f14, $f0 /* 11760 8094A430 468021A0 */ cvt.s.w $f6, $f4 /* 11764 8094A434 E7AE0028 */ swc1 $f14, 0x0028($sp) -/* 11768 8094A438 0C03F494 */ jal func_800FD250 +/* 11768 8094A438 0C03F494 */ jal Math_atan2f /* 1176C 8094A43C E7A6002C */ swc1 $f6, 0x002C($sp) /* 11770 8094A440 3C018095 */ lui $at, %hi(D_8094B228) ## $at = 80950000 /* 11774 8094A444 C432B228 */ lwc1 $f18, %lo(D_8094B228)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_809764FC.s b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_809764FC.s index 63ea3ce6a8..0bad8a0dba 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_809764FC.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_809764FC.s @@ -15,7 +15,7 @@ glabel func_809764FC /* 055E0 80976530 460E7482 */ mul.s $f18, $f14, $f14 /* 055E4 80976534 46128000 */ add.s $f0, $f16, $f18 /* 055E8 80976538 46000004 */ sqrt.s $f0, $f0 -/* 055EC 8097653C 0C03F494 */ jal func_800FD250 +/* 055EC 8097653C 0C03F494 */ jal Math_atan2f /* 055F0 80976540 E7A00018 */ swc1 $f0, 0x0018($sp) /* 055F4 80976544 3C018097 */ lui $at, %hi(D_80976D80) ## $at = 80970000 /* 055F8 80976548 C4246D80 */ lwc1 $f4, %lo(D_80976D80)($at) @@ -29,7 +29,7 @@ glabel func_809764FC /* 05618 80976568 C7AA003C */ lwc1 $f10, 0x003C($sp) /* 0561C 8097656C C7AE0018 */ lwc1 $f14, 0x0018($sp) /* 05620 80976570 46105301 */ sub.s $f12, $f10, $f16 -/* 05624 80976574 0C03F494 */ jal func_800FD250 +/* 05624 80976574 0C03F494 */ jal Math_atan2f /* 05628 80976578 46006307 */ neg.s $f12, $f12 /* 0562C 8097657C 3C018097 */ lui $at, %hi(D_80976D84) ## $at = 80970000 /* 05630 80976580 C4326D84 */ lwc1 $f18, %lo(D_80976D84)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80979860.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80979860.s index 8a2669aaf5..333ee820d6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80979860.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80979860.s @@ -450,7 +450,7 @@ glabel L80979DE0 /* 01608 80979F38 45030014 */ bc1tl .L80979F8C /* 0160C 80979F3C 8FBF001C */ lw $ra, 0x001C($sp) .L80979F40: -/* 01610 80979F40 0C03F494 */ jal func_800FD250 +/* 01610 80979F40 0C03F494 */ jal Math_atan2f /* 01614 80979F44 00000000 */ nop /* 01618 80979F48 3C018098 */ lui $at, %hi(D_8097C220) ## $at = 80980000 /* 0161C 80979F4C C428C220 */ lwc1 $f8, %lo(D_8097C220)($at) @@ -460,7 +460,7 @@ glabel L80979DE0 /* 0162C 80979F5C 1000000A */ beq $zero, $zero, .L80979F88 /* 01630 80979F60 A6090032 */ sh $t1, 0x0032($s0) ## 00000032 .L80979F64: -/* 01634 80979F64 0C03F494 */ jal func_800FD250 +/* 01634 80979F64 0C03F494 */ jal Math_atan2f /* 01638 80979F68 00000000 */ nop /* 0163C 80979F6C 3C018098 */ lui $at, %hi(D_8097C224) ## $at = 80980000 /* 01640 80979F70 C432C224 */ lwc1 $f18, %lo(D_8097C224)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Anubice/func_809B11C0.s b/asm/non_matchings/overlays/actors/ovl_En_Anubice/func_809B11C0.s index 721e8a23f7..87b0d8af60 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Anubice/func_809B11C0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Anubice/func_809B11C0.s @@ -20,7 +20,7 @@ glabel func_809B11C0 /* 000E8 809B1208 46108482 */ mul.s $f18, $f16, $f16 /* 000EC 809B120C E7B00018 */ swc1 $f16, 0x0018($sp) /* 000F0 809B1210 46125000 */ add.s $f0, $f10, $f18 -/* 000F4 809B1214 0C03F494 */ jal func_800FD250 +/* 000F4 809B1214 0C03F494 */ jal Math_atan2f /* 000F8 809B1218 46000384 */ sqrt.s $f14, $f0 /* 000FC 809B121C 3C01809B */ lui $at, %hi(D_809B2414) ## $at = 809B0000 /* 00100 809B1220 C4242414 */ lwc1 $f4, %lo(D_809B2414)($at) @@ -37,7 +37,7 @@ glabel func_809B11C0 /* 0012C 809B124C 468054A0 */ cvt.s.w $f18, $f10 /* 00130 809B1250 E492028C */ swc1 $f18, 0x028C($a0) ## 0000028C /* 00134 809B1254 C7AE0018 */ lwc1 $f14, 0x0018($sp) -/* 00138 809B1258 0C03F494 */ jal func_800FD250 +/* 00138 809B1258 0C03F494 */ jal Math_atan2f /* 0013C 809B125C C7AC0020 */ lwc1 $f12, 0x0020($sp) /* 00140 809B1260 3C01809B */ lui $at, %hi(D_809B2418) ## $at = 809B0000 /* 00144 809B1264 C4242418 */ lwc1 $f4, %lo(D_809B2418)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5BA8.s b/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5BA8.s index 8b93b69a05..50fe411b1a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5BA8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5BA8.s @@ -41,7 +41,7 @@ glabel func_809C5BA8 /* 00414 809C5C44 00000000 */ nop /* 00418 809C5C48 4501005F */ bc1t .L809C5DC8 /* 0041C 809C5C4C 00000000 */ nop -/* 00420 809C5C50 0C03F4DA */ jal func_800FD368 +/* 00420 809C5C50 0C03F4DA */ jal Math_acosf /* 00424 809C5C54 00000000 */ nop /* 00428 809C5C58 3C01809C */ lui $at, %hi(D_809C6DE0) ## $at = 809C0000 /* 0042C 809C5C5C C4306DE0 */ lwc1 $f16, %lo(D_809C6DE0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bw/func_809CEA24.s b/asm/non_matchings/overlays/actors/ovl_En_Bw/func_809CEA24.s index 38ab861309..b39b41277a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bw/func_809CEA24.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bw/func_809CEA24.s @@ -237,7 +237,7 @@ glabel func_809CEA24 /* 006AC 809CED8C 44894000 */ mtc1 $t1, $f8 ## $f8 = -0.00 /* 006B0 809CED90 448A8000 */ mtc1 $t2, $f16 ## $f16 = -0.00 /* 006B4 809CED94 46804320 */ cvt.s.w $f12, $f8 -/* 006B8 809CED98 0C03F494 */ jal func_800FD250 +/* 006B8 809CED98 0C03F494 */ jal Math_atan2f /* 006BC 809CED9C 468083A0 */ cvt.s.w $f14, $f16 /* 006C0 809CEDA0 3C01809D */ lui $at, %hi(D_809D15EC) ## $at = 809D0000 /* 006C4 809CEDA4 C42A15EC */ lwc1 $f10, %lo(D_809D15EC)($at) @@ -512,7 +512,7 @@ glabel L809CEF9C /* 00A90 809CF170 44995000 */ mtc1 $t9, $f10 ## $f10 = -0.00 /* 00A94 809CF174 448A9000 */ mtc1 $t2, $f18 ## $f18 = -0.00 /* 00A98 809CF178 46805320 */ cvt.s.w $f12, $f10 -/* 00A9C 809CF17C 0C03F494 */ jal func_800FD250 +/* 00A9C 809CF17C 0C03F494 */ jal Math_atan2f /* 00AA0 809CF180 468093A0 */ cvt.s.w $f14, $f18 /* 00AA4 809CF184 3C01809D */ lui $at, %hi(D_809D1610) ## $at = 809D0000 /* 00AA8 809CF188 C4241610 */ lwc1 $f4, %lo(D_809D1610)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/EnClearTag_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/EnClearTag_Update.s index 207df15e69..9ff80e744e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/EnClearTag_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/EnClearTag_Update.s @@ -315,7 +315,7 @@ glabel EnClearTag_Update .L809D409C: /* 00AEC 809D409C C7AC00B0 */ lwc1 $f12, 0x00B0($sp) /* 00AF0 809D40A0 E7A2003C */ swc1 $f2, 0x003C($sp) -/* 00AF4 809D40A4 0C03F494 */ jal func_800FD250 +/* 00AF4 809D40A4 0C03F494 */ jal Math_atan2f /* 00AF8 809D40A8 E7B00038 */ swc1 $f16, 0x0038($sp) /* 00AFC 809D40AC 3C01809E */ lui $at, %hi(D_809DC0F0) ## $at = 809E0000 /* 00B00 809D40B0 C432C0F0 */ lwc1 $f18, %lo(D_809DC0F0)($at) @@ -329,7 +329,7 @@ glabel EnClearTag_Update /* 00B20 809D40D0 44103000 */ mfc1 $s0, $f6 /* 00B24 809D40D4 00000000 */ nop /* 00B28 809D40D8 00108400 */ sll $s0, $s0, 16 -/* 00B2C 809D40DC 0C03F494 */ jal func_800FD250 +/* 00B2C 809D40DC 0C03F494 */ jal Math_atan2f /* 00B30 809D40E0 00108403 */ sra $s0, $s0, 16 /* 00B34 809D40E4 3C01809E */ lui $at, %hi(D_809DC0F4) ## $at = 809E0000 /* 00B38 809D40E8 C428C0F4 */ lwc1 $f8, %lo(D_809DC0F4)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/func_809D3B80.s b/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/func_809D3B80.s index 32da0075c9..fa0ae54944 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/func_809D3B80.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Clear_Tag/func_809D3B80.s @@ -26,7 +26,7 @@ glabel func_809D3B80 /* 00630 809D3BE0 E7B00018 */ swc1 $f16, 0x0018($sp) /* 00634 809D3BE4 46000207 */ neg.s $f8, $f0 /* 00638 809D3BE8 46104302 */ mul.s $f12, $f8, $f16 -/* 0063C 809D3BEC 0C03F494 */ jal func_800FD250 +/* 0063C 809D3BEC 0C03F494 */ jal Math_atan2f /* 00640 809D3BF0 00000000 */ nop /* 00644 809D3BF4 8FA80020 */ lw $t0, 0x0020($sp) /* 00648 809D3BF8 46000287 */ neg.s $f10, $f0 @@ -37,7 +37,7 @@ glabel func_809D3B80 /* 0065C 809D3C0C 44817000 */ mtc1 $at, $f14 ## $f14 = 1.00 /* 00660 809D3C10 46009107 */ neg.s $f4, $f18 /* 00664 809D3C14 46102302 */ mul.s $f12, $f4, $f16 -/* 00668 809D3C18 0C03F494 */ jal func_800FD250 +/* 00668 809D3C18 0C03F494 */ jal Math_atan2f /* 0066C 809D3C1C 00000000 */ nop /* 00670 809D3C20 8FA90020 */ lw $t1, 0x0020($sp) /* 00674 809D3C24 E5200190 */ swc1 $f0, 0x0190($t1) ## 00000190 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Cs/func_809E1F20.s b/asm/non_matchings/overlays/actors/ovl_En_Cs/func_809E1F20.s index 92cda7030b..61bbbdeab4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Cs/func_809E1F20.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Cs/func_809E1F20.s @@ -25,7 +25,7 @@ glabel func_809E1F20 /* 006CC 809E1F7C 46062501 */ sub.s $f20, $f4, $f6 /* 006D0 809E1F80 460A4581 */ sub.s $f22, $f8, $f10 /* 006D4 809E1F84 4600A306 */ mov.s $f12, $f20 -/* 006D8 809E1F88 0C03F494 */ jal func_800FD250 +/* 006D8 809E1F88 0C03F494 */ jal Math_atan2f /* 006DC 809E1F8C 4600B386 */ mov.s $f14, $f22 /* 006E0 809E1F90 3C01809E */ lui $at, %hi(D_809E29CC) ## $at = 809E0000 /* 006E4 809E1F94 C43829CC */ lwc1 $f24, %lo(D_809E29CC)($at) @@ -77,7 +77,7 @@ glabel func_809E1F20 /* 00790 809E2040 46128501 */ sub.s $f20, $f16, $f18 /* 00794 809E2044 46062581 */ sub.s $f22, $f4, $f6 /* 00798 809E2048 4600A306 */ mov.s $f12, $f20 -/* 0079C 809E204C 0C03F494 */ jal func_800FD250 +/* 0079C 809E204C 0C03F494 */ jal Math_atan2f /* 007A0 809E2050 4600B386 */ mov.s $f14, $f22 /* 007A4 809E2054 46180202 */ mul.s $f8, $f0, $f24 /* 007A8 809E2058 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E349C.s b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E349C.s index 712aee4426..bfff7e6157 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E349C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E349C.s @@ -90,7 +90,7 @@ glabel func_809E349C /* 00AC8 809E35F8 460A4501 */ sub.s $f20, $f8, $f10 /* 00ACC 809E35FC 46049581 */ sub.s $f22, $f18, $f4 /* 00AD0 809E3600 4600A306 */ mov.s $f12, $f20 -/* 00AD4 809E3604 0C03F494 */ jal func_800FD250 +/* 00AD4 809E3604 0C03F494 */ jal Math_atan2f /* 00AD8 809E3608 4600B386 */ mov.s $f14, $f22 /* 00ADC 809E360C 46180182 */ mul.s $f6, $f0, $f24 /* 00AE0 809E3610 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3954.s b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3954.s index 7a489f5ccc..978b835a6c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3954.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3954.s @@ -36,7 +36,7 @@ glabel func_809E3954 /* 00EAC 809E39DC C7AC0040 */ lwc1 $f12, 0x0040($sp) /* 00EB0 809E39E0 C7AE0048 */ lwc1 $f14, 0x0048($sp) /* 00EB4 809E39E4 46006307 */ neg.s $f12, $f12 -/* 00EB8 809E39E8 0C03F494 */ jal func_800FD250 +/* 00EB8 809E39E8 0C03F494 */ jal Math_atan2f /* 00EBC 809E39EC 46007387 */ neg.s $f14, $f14 /* 00EC0 809E39F0 C6040344 */ lwc1 $f4, 0x0344($s0) ## 00000344 /* 00EC4 809E39F4 C7A60044 */ lwc1 $f6, 0x0044($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3A8C.s b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3A8C.s index 0b088520c6..b41d06b505 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3A8C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Daiku/func_809E3A8C.s @@ -42,7 +42,7 @@ glabel func_809E3A8C /* 00FFC 809E3B2C 46083301 */ sub.s $f12, $f6, $f8 /* 01000 809E3B30 46128381 */ sub.s $f14, $f16, $f18 /* 01004 809E3B34 E7AC0038 */ swc1 $f12, 0x0038($sp) -/* 01008 809E3B38 0C03F494 */ jal func_800FD250 +/* 01008 809E3B38 0C03F494 */ jal Math_atan2f /* 0100C 809E3B3C E7AE0034 */ swc1 $f14, 0x0034($sp) /* 01010 809E3B40 3C01809E */ lui $at, %hi(D_809E41C0) ## $at = 809E0000 /* 01014 809E3B44 C42441C0 */ lwc1 $f4, %lo(D_809E41C0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Daiku_Kakariko/func_809E4BC4.s b/asm/non_matchings/overlays/actors/ovl_En_Daiku_Kakariko/func_809E4BC4.s index 78e54c7573..73f1909b44 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Daiku_Kakariko/func_809E4BC4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Daiku_Kakariko/func_809E4BC4.s @@ -51,7 +51,7 @@ glabel func_809E4BC4 /* 00964 809E4C84 46083501 */ sub.s $f20, $f6, $f8 /* 00968 809E4C88 46128581 */ sub.s $f22, $f16, $f18 /* 0096C 809E4C8C 4600A306 */ mov.s $f12, $f20 -/* 00970 809E4C90 0C03F494 */ jal func_800FD250 +/* 00970 809E4C90 0C03F494 */ jal Math_atan2f /* 00974 809E4C94 4600B386 */ mov.s $f14, $f22 /* 00978 809E4C98 3C01809E */ lui $at, %hi(D_809E5618) ## $at = 809E0000 /* 0097C 809E4C9C C4245618 */ lwc1 $f4, %lo(D_809E5618)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F2A90.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F2A90.s index 889fad172e..c92bd490af 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F2A90.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F2A90.s @@ -14,7 +14,7 @@ glabel func_809F2A90 /* 00FDC 809F2ABC 46062301 */ sub.s $f12, $f4, $f6 /* 00FE0 809F2AC0 460A4381 */ sub.s $f14, $f8, $f10 /* 00FE4 809F2AC4 E7AC002C */ swc1 $f12, 0x002C($sp) -/* 00FE8 809F2AC8 0C03F494 */ jal func_800FD250 +/* 00FE8 809F2AC8 0C03F494 */ jal Math_atan2f /* 00FEC 809F2ACC E7AE0028 */ swc1 $f14, 0x0028($sp) /* 00FF0 809F2AD0 3C01809F */ lui $at, %hi(D_809F30F4) ## $at = 809F0000 /* 00FF4 809F2AD4 C43030F4 */ lwc1 $f16, %lo(D_809F30F4)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3BE4.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3BE4.s index b27c23d443..d7bc837d63 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3BE4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3BE4.s @@ -14,7 +14,7 @@ glabel func_809F3BE4 /* 00950 809F3C10 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 /* 00954 809F3C14 C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C /* 00958 809F3C18 46062301 */ sub.s $f12, $f4, $f6 -/* 0095C 809F3C1C 0C03F494 */ jal func_800FD250 +/* 0095C 809F3C1C 0C03F494 */ jal Math_atan2f /* 00960 809F3C20 460A4381 */ sub.s $f14, $f8, $f10 /* 00964 809F3C24 3C01809F */ lui $at, %hi(D_809F6040) ## $at = 809F0000 /* 00968 809F3C28 C4306040 */ lwc1 $f16, %lo(D_809F6040)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F40D4.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F40D4.s index 17d7a927ac..658c0305ac 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F40D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F40D4.s @@ -17,7 +17,7 @@ glabel func_809F40D4 /* 00E4C 809F410C 46062301 */ sub.s $f12, $f4, $f6 /* 00E50 809F4110 460A4381 */ sub.s $f14, $f8, $f10 /* 00E54 809F4114 E7AC0034 */ swc1 $f12, 0x0034($sp) -/* 00E58 809F4118 0C03F494 */ jal func_800FD250 +/* 00E58 809F4118 0C03F494 */ jal Math_atan2f /* 00E5C 809F411C E7AE0030 */ swc1 $f14, 0x0030($sp) /* 00E60 809F4120 3C01809F */ lui $at, %hi(D_809F6044) ## $at = 809F0000 /* 00E64 809F4124 C4306044 */ lwc1 $f16, %lo(D_809F6044)($at) @@ -34,7 +34,7 @@ glabel func_809F40D4 /* 00E90 809F4150 00052C03 */ sra $a1, $a1, 16 /* 00E94 809F4154 C7AC0034 */ lwc1 $f12, 0x0034($sp) -/* 00E98 809F4158 0C03F494 */ jal func_800FD250 +/* 00E98 809F4158 0C03F494 */ jal Math_atan2f /* 00E9C 809F415C C7AE0030 */ lwc1 $f14, 0x0030($sp) /* 00EA0 809F4160 3C01809F */ lui $at, %hi(D_809F6048) ## $at = 809F0000 /* 00EA4 809F4164 C4266048 */ lwc1 $f6, %lo(D_809F6048)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F44FC.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F44FC.s index 6bf301467d..4e2e720108 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F44FC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F44FC.s @@ -49,7 +49,7 @@ glabel func_809F44FC /* 012E4 809F45A4 C6040290 */ lwc1 $f4, 0x0290($s0) ## 00000290 /* 012E8 809F45A8 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C /* 012EC 809F45AC 46128301 */ sub.s $f12, $f16, $f18 -/* 012F0 809F45B0 0C03F494 */ jal func_800FD250 +/* 012F0 809F45B0 0C03F494 */ jal Math_atan2f /* 012F4 809F45B4 46082381 */ sub.s $f14, $f4, $f8 /* 012F8 809F45B8 3C01809F */ lui $at, %hi(D_809F604C) ## $at = 809F0000 /* 012FC 809F45BC C426604C */ lwc1 $f6, %lo(D_809F604C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F49A4.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F49A4.s index a76939933a..59524f1a0c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F49A4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F49A4.s @@ -48,7 +48,7 @@ glabel func_809F49A4 /* 01798 809F4A58 1000004D */ beq $zero, $zero, .L809F4B90 /* 0179C 809F4A5C E6100068 */ swc1 $f16, 0x0068($s0) ## 00000068 .L809F4A60: -/* 017A0 809F4A60 0C03F494 */ jal func_800FD250 +/* 017A0 809F4A60 0C03F494 */ jal Math_atan2f /* 017A4 809F4A64 00000000 */ nop /* 017A8 809F4A68 3C01809F */ lui $at, %hi(D_809F6050) ## $at = 809F0000 /* 017AC 809F4A6C C4326050 */ lwc1 $f18, %lo(D_809F6050)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F51B8.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F51B8.s index 5171576699..1f4d5844a8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F51B8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F51B8.s @@ -34,7 +34,7 @@ glabel func_809F51B8 /* 01F70 809F5230 46062301 */ sub.s $f12, $f4, $f6 /* 01F74 809F5234 46108102 */ mul.s $f4, $f16, $f16 /* 01F78 809F5238 46049000 */ add.s $f0, $f18, $f4 -/* 01F7C 809F523C 0C03F494 */ jal func_800FD250 +/* 01F7C 809F523C 0C03F494 */ jal Math_atan2f /* 01F80 809F5240 46000384 */ sqrt.s $f14, $f0 /* 01F84 809F5244 3C01809F */ lui $at, %hi(D_809F605C) ## $at = 809F0000 /* 01F88 809F5248 C426605C */ lwc1 $f6, %lo(D_809F605C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F551C.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F551C.s index 0c979b681d..50451e6230 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F551C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F551C.s @@ -14,7 +14,7 @@ glabel func_809F551C /* 02288 809F5548 46062301 */ sub.s $f12, $f4, $f6 /* 0228C 809F554C 460A4381 */ sub.s $f14, $f8, $f10 /* 02290 809F5550 E7AC002C */ swc1 $f12, 0x002C($sp) -/* 02294 809F5554 0C03F494 */ jal func_800FD250 +/* 02294 809F5554 0C03F494 */ jal Math_atan2f /* 02298 809F5558 E7AE0028 */ swc1 $f14, 0x0028($sp) /* 0229C 809F555C 3C01809F */ lui $at, %hi(D_809F6068) ## $at = 809F0000 /* 022A0 809F5560 C4306068 */ lwc1 $f16, %lo(D_809F6068)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C4F0.s b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C4F0.s index d551e5e082..23be35d824 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C4F0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C4F0.s @@ -36,7 +36,7 @@ glabel func_80A0C4F0 /* 00EAC 80A0C56C 0C282FA8 */ jal func_80A0BEA0 /* 00EB0 80A0C570 860704BA */ lh $a3, 0x04BA($s0) ## 000004BA /* 00EB4 80A0C574 C7AC002C */ lwc1 $f12, 0x002C($sp) -/* 00EB8 80A0C578 0C03F494 */ jal func_800FD250 +/* 00EB8 80A0C578 0C03F494 */ jal Math_atan2f /* 00EBC 80A0C57C C7AE0034 */ lwc1 $f14, 0x0034($sp) /* 00EC0 80A0C580 3C0180A1 */ lui $at, %hi(D_80A0E1C0) ## $at = 80A10000 /* 00EC4 80A0C584 C426E1C0 */ lwc1 $f6, %lo(D_80A0E1C0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C7EC.s b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C7EC.s index b00fdb3e15..ba241de404 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C7EC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0C7EC.s @@ -99,7 +99,7 @@ glabel func_80A0C7EC /* 01284 80A0C944 0C282FA8 */ jal func_80A0BEA0 /* 01288 80A0C948 860704BA */ lh $a3, 0x04BA($s0) ## 000004BA /* 0128C 80A0C94C C7AC0030 */ lwc1 $f12, 0x0030($sp) -/* 01290 80A0C950 0C03F494 */ jal func_800FD250 +/* 01290 80A0C950 0C03F494 */ jal Math_atan2f /* 01294 80A0C954 C7AE0038 */ lwc1 $f14, 0x0038($sp) /* 01298 80A0C958 3C0180A1 */ lui $at, %hi(D_80A0E1C4) ## $at = 80A10000 /* 0129C 80A0C95C C42AE1C4 */ lwc1 $f10, %lo(D_80A0E1C4)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/EnFhgFire_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/EnFhgFire_Init.s index 5577d9faca..2390aaf8a0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/EnFhgFire_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/EnFhgFire_Init.s @@ -219,7 +219,7 @@ glabel EnFhgFire_Init /* 00310 80A0F570 C452002C */ lwc1 $f18, 0x002C($v0) ## 0000002C /* 00314 80A0F574 E7AC0048 */ swc1 $f12, 0x0048($sp) /* 00318 80A0F578 46049381 */ sub.s $f14, $f18, $f4 -/* 0031C 80A0F57C 0C03F494 */ jal func_800FD250 +/* 0031C 80A0F57C 0C03F494 */ jal Math_atan2f /* 00320 80A0F580 E7AE0040 */ swc1 $f14, 0x0040($sp) /* 00324 80A0F584 3C0180A1 */ lui $at, %hi(D_80A119C8) ## $at = 80A10000 /* 00328 80A0F588 C42619C8 */ lwc1 $f6, %lo(D_80A119C8)($at) @@ -236,7 +236,7 @@ glabel EnFhgFire_Init /* 00354 80A0F5B4 00000000 */ nop /* 00358 80A0F5B8 A60D0032 */ sh $t5, 0x0032($s0) ## 00000032 /* 0035C 80A0F5BC 46000384 */ sqrt.s $f14, $f0 -/* 00360 80A0F5C0 0C03F494 */ jal func_800FD250 +/* 00360 80A0F5C0 0C03F494 */ jal Math_atan2f /* 00364 80A0F5C4 C7AC0044 */ lwc1 $f12, 0x0044($sp) /* 00368 80A0F5C8 3C0180A1 */ lui $at, %hi(D_80A119CC) ## $at = 80A10000 /* 0036C 80A0F5CC C42619CC */ lwc1 $f6, %lo(D_80A119CC)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s index c2a0948f21..31e226a05c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s @@ -372,7 +372,7 @@ glabel func_80A10220 .L80A10760: /* 01500 80A10760 C7AC00FC */ lwc1 $f12, 0x00FC($sp) /* 01504 80A10764 C7AE00F4 */ lwc1 $f14, 0x00F4($sp) -/* 01508 80A10768 0C03F494 */ jal func_800FD250 +/* 01508 80A10768 0C03F494 */ jal Math_atan2f /* 0150C 80A1076C A7A30098 */ sh $v1, 0x0098($sp) /* 01510 80A10770 3C0180A1 */ lui $at, %hi(D_80A119E4) ## $at = 80A10000 /* 01514 80A10774 C42819E4 */ lwc1 $f8, %lo(D_80A119E4)($at) @@ -390,7 +390,7 @@ glabel func_80A10220 /* 01544 80A107A4 00000000 */ nop /* 01548 80A107A8 460A5102 */ mul.s $f4, $f10, $f10 /* 0154C 80A107AC 46044000 */ add.s $f0, $f8, $f4 -/* 01550 80A107B0 0C03F494 */ jal func_800FD250 +/* 01550 80A107B0 0C03F494 */ jal Math_atan2f /* 01554 80A107B4 46000384 */ sqrt.s $f14, $f0 /* 01558 80A107B8 3C0180A1 */ lui $at, %hi(D_80A119E8) ## $at = 80A10000 /* 0155C 80A107BC C42619E8 */ lwc1 $f6, %lo(D_80A119E8)($at) @@ -481,7 +481,7 @@ glabel func_80A10220 /* 01694 80A108F4 29C10064 */ slti $at, $t6, 0x0064 /* 01698 80A108F8 50200024 */ beql $at, $zero, .L80A1098C /* 0169C 80A108FC 8608015A */ lh $t0, 0x015A($s0) ## 0000015A -/* 016A0 80A10900 0C03F494 */ jal func_800FD250 +/* 016A0 80A10900 0C03F494 */ jal Math_atan2f /* 016A4 80A10904 C7AE00F4 */ lwc1 $f14, 0x00F4($sp) /* 016A8 80A10908 3C0180A1 */ lui $at, %hi(D_80A119EC) ## $at = 80A10000 /* 016AC 80A1090C C42A19EC */ lwc1 $f10, %lo(D_80A119EC)($at) @@ -539,7 +539,7 @@ glabel func_80A10220 /* 01778 80A109D8 A16C01CA */ sb $t4, 0x01CA($t3) ## 000001CA .L80A109DC: /* 0177C 80A109DC E7A20050 */ swc1 $f2, 0x0050($sp) -/* 01780 80A109E0 0C03F494 */ jal func_800FD250 +/* 01780 80A109E0 0C03F494 */ jal Math_atan2f /* 01784 80A109E4 E7B0004C */ swc1 $f16, 0x004C($sp) /* 01788 80A109E8 3C0180A1 */ lui $at, %hi(D_80A119F0) ## $at = 80A10000 /* 0178C 80A109EC C42819F0 */ lwc1 $f8, %lo(D_80A119F0)($at) @@ -552,7 +552,7 @@ glabel func_80A10220 /* 017A8 80A10A08 440F5000 */ mfc1 $t7, $f10 /* 017AC 80A10A0C 00000000 */ nop /* 017B0 80A10A10 A60F0032 */ sh $t7, 0x0032($s0) ## 00000032 -/* 017B4 80A10A14 0C03F494 */ jal func_800FD250 +/* 017B4 80A10A14 0C03F494 */ jal Math_atan2f /* 017B8 80A10A18 C7AC00F8 */ lwc1 $f12, 0x00F8($sp) /* 017BC 80A10A1C 3C0180A1 */ lui $at, %hi(D_80A119F4) ## $at = 80A10000 /* 017C0 80A10A20 C42619F4 */ lwc1 $f6, %lo(D_80A119F4)($at) @@ -668,7 +668,7 @@ glabel func_80A10220 /* 01950 80A10BB0 1420FFE0 */ bne $at, $zero, .L80A10B34 /* 01954 80A10BB4 A7A20096 */ sh $v0, 0x0096($sp) /* 01958 80A10BB8 C7AC010C */ lwc1 $f12, 0x010C($sp) -/* 0195C 80A10BBC 0C03F494 */ jal func_800FD250 +/* 0195C 80A10BBC 0C03F494 */ jal Math_atan2f /* 01960 80A10BC0 C7AE0104 */ lwc1 $f14, 0x0104($sp) /* 01964 80A10BC4 3C0180A1 */ lui $at, %hi(D_80A119F8) ## $at = 80A10000 /* 01968 80A10BC8 C42A19F8 */ lwc1 $f10, %lo(D_80A119F8)($at) @@ -685,7 +685,7 @@ glabel func_80A10220 /* 01994 80A10BF4 00000000 */ nop /* 01998 80A10BF8 A6180032 */ sh $t8, 0x0032($s0) ## 00000032 /* 0199C 80A10BFC 46000384 */ sqrt.s $f14, $f0 -/* 019A0 80A10C00 0C03F494 */ jal func_800FD250 +/* 019A0 80A10C00 0C03F494 */ jal Math_atan2f /* 019A4 80A10C04 C7AC0108 */ lwc1 $f12, 0x0108($sp) /* 019A8 80A10C08 3C0180A1 */ lui $at, %hi(D_80A119FC) ## $at = 80A10000 /* 019AC 80A10C0C C42619FC */ lwc1 $f6, %lo(D_80A119FC)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fw/func_80A1ECD4.s b/asm/non_matchings/overlays/actors/ovl_En_Fw/func_80A1ECD4.s index 6b87704c49..6bcc4b02df 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fw/func_80A1ECD4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fw/func_80A1ECD4.s @@ -257,7 +257,7 @@ glabel func_80A1ECD4 /* 00AC4 80A1F064 0C2879D8 */ jal func_80A1E760 /* 00AC8 80A1F068 86070202 */ lh $a3, 0x0202($s0) ## 00000202 /* 00ACC 80A1F06C C7AC0048 */ lwc1 $f12, 0x0048($sp) -/* 00AD0 80A1F070 0C03F494 */ jal func_800FD250 +/* 00AD0 80A1F070 0C03F494 */ jal Math_atan2f /* 00AD4 80A1F074 C7AE0050 */ lwc1 $f14, 0x0050($sp) /* 00AD8 80A1F078 3C0180A2 */ lui $at, %hi(D_80A1FC78) ## $at = 80A20000 /* 00ADC 80A1F07C C42AFC78 */ lwc1 $f10, %lo(D_80A1FC78)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A3F300.s b/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A3F300.s index da9d224773..0cd15b0b4c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A3F300.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A3F300.s @@ -47,7 +47,7 @@ glabel func_80A3F300 /* 00E40 80A3F3B0 46083301 */ sub.s $f12, $f6, $f8 /* 00E44 80A3F3B4 46128381 */ sub.s $f14, $f16, $f18 /* 00E48 80A3F3B8 E7AC002C */ swc1 $f12, 0x002C($sp) -/* 00E4C 80A3F3BC 0C03F494 */ jal func_800FD250 +/* 00E4C 80A3F3BC 0C03F494 */ jal Math_atan2f /* 00E50 80A3F3C0 E7AE0028 */ swc1 $f14, 0x0028($sp) /* 00E54 80A3F3C4 3C0180A4 */ lui $at, %hi(D_80A420D8) ## $at = 80A40000 /* 00E58 80A3F3C8 C42420D8 */ lwc1 $f4, %lo(D_80A420D8)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4A964.s b/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4A964.s index 8af3ec1bee..7028518d91 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4A964.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4A964.s @@ -26,7 +26,7 @@ glabel func_80A4A964 /* 01B04 80A4A9C4 E7B00018 */ swc1 $f16, 0x0018($sp) /* 01B08 80A4A9C8 46000207 */ neg.s $f8, $f0 /* 01B0C 80A4A9CC 46104302 */ mul.s $f12, $f8, $f16 -/* 01B10 80A4A9D0 0C03F494 */ jal func_800FD250 +/* 01B10 80A4A9D0 0C03F494 */ jal Math_atan2f /* 01B14 80A4A9D4 00000000 */ nop /* 01B18 80A4A9D8 3C0180A5 */ lui $at, %hi(D_80A4B938) ## $at = 80A50000 /* 01B1C 80A4A9DC C432B938 */ lwc1 $f18, %lo(D_80A4B938)($at) @@ -49,7 +49,7 @@ glabel func_80A4A964 /* 01B5C 80A4AA1C 46004287 */ neg.s $f10, $f8 /* 01B60 80A4AA20 44817000 */ mtc1 $at, $f14 ## $f14 = 1.00 /* 01B64 80A4AA24 46125302 */ mul.s $f12, $f10, $f18 -/* 01B68 80A4AA28 0C03F494 */ jal func_800FD250 +/* 01B68 80A4AA28 0C03F494 */ jal Math_atan2f /* 01B6C 80A4AA2C 00000000 */ nop /* 01B70 80A4AA30 3C0180A5 */ lui $at, %hi(D_80A4B93C) ## $at = 80A50000 /* 01B74 80A4AA34 C424B93C */ lwc1 $f4, %lo(D_80A4B93C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi1/func_80A516E4.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi1/func_80A516E4.s index 513311652f..46b1752f34 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi1/func_80A516E4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Heishi1/func_80A516E4.s @@ -92,7 +92,7 @@ glabel func_80A516E4 /* 00560 80A51830 46105301 */ sub.s $f12, $f10, $f16 /* 00564 80A51834 46062381 */ sub.s $f14, $f4, $f6 /* 00568 80A51838 E7AC003C */ swc1 $f12, 0x003C($sp) -/* 0056C 80A5183C 0C03F494 */ jal func_800FD250 +/* 0056C 80A5183C 0C03F494 */ jal Math_atan2f /* 00570 80A51840 E7AE0038 */ swc1 $f14, 0x0038($sp) /* 00574 80A51844 3C0180A5 */ lui $at, %hi(D_80A52C2C) ## $at = 80A50000 /* 00578 80A51848 C4282C2C */ lwc1 $f8, %lo(D_80A52C2C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A62ACC.s b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A62ACC.s index 88b0dbbf2b..b12350d675 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A62ACC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A62ACC.s @@ -135,7 +135,7 @@ glabel func_80A62ACC /* 079CC 80A62CBC C6120248 */ lwc1 $f18, 0x0248($s0) ## 00000248 /* 079D0 80A62CC0 3C014270 */ lui $at, 0x4270 ## $at = 42700000 /* 079D4 80A62CC4 44817000 */ mtc1 $at, $f14 ## $f14 = 60.00 -/* 079D8 80A62CC8 0C03F494 */ jal func_800FD250 +/* 079D8 80A62CC8 0C03F494 */ jal Math_atan2f /* 079DC 80A62CCC 46128301 */ sub.s $f12, $f16, $f18 /* 079E0 80A62CD0 3C0180A6 */ lui $at, %hi(D_80A6695C) ## $at = 80A60000 /* 079E4 80A62CD4 C424695C */ lwc1 $f4, %lo(D_80A6695C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63148.s b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63148.s index 81a4c4391d..188fd13d70 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63148.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63148.s @@ -22,7 +22,7 @@ glabel func_80A63148 .L80A63194: /* 07EA4 80A63194 C48C0000 */ lwc1 $f12, 0x0000($a0) ## 00000000 /* 07EA8 80A63198 C48E0004 */ lwc1 $f14, 0x0004($a0) ## 00000004 -/* 07EAC 80A6319C 0C03F494 */ jal func_800FD250 +/* 07EAC 80A6319C 0C03F494 */ jal Math_atan2f /* 07EB0 80A631A0 46006307 */ neg.s $f12, $f12 /* 07EB4 80A631A4 3C0180A6 */ lui $at, %hi(D_80A6696C) ## $at = 80A60000 /* 07EB8 80A631A8 C42A696C */ lwc1 $f10, %lo(D_80A6696C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63210.s b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63210.s index fed7e4a794..dcb60229fa 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63210.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A63210.s @@ -24,7 +24,7 @@ glabel func_80A63210 /* 07F78 80A63268 00000000 */ nop /* 07F7C 80A6326C 468083A0 */ cvt.s.w $f14, $f16 /* 07F80 80A63270 46007582 */ mul.s $f22, $f14, $f0 -/* 07F84 80A63274 0C03F494 */ jal func_800FD250 +/* 07F84 80A63274 0C03F494 */ jal Math_atan2f /* 07F88 80A63278 00000000 */ nop /* 07F8C 80A6327C 3C0180A6 */ lui $at, %hi(D_80A66974) ## $at = 80A60000 /* 07F90 80A63280 C4326974 */ lwc1 $f18, %lo(D_80A66974)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A634A0.s b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A634A0.s index e2e2ad7a08..a904455757 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A634A0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A634A0.s @@ -227,7 +227,7 @@ glabel func_80A634A0 /* 08500 80A637F0 448B5000 */ mtc1 $t3, $f10 ## $f10 = 0.00 /* 08504 80A637F4 448C2000 */ mtc1 $t4, $f4 ## $f4 = 0.00 /* 08508 80A637F8 46805320 */ cvt.s.w $f12, $f10 -/* 0850C 80A637FC 0C03F494 */ jal func_800FD250 +/* 0850C 80A637FC 0C03F494 */ jal Math_atan2f /* 08510 80A63800 468023A0 */ cvt.s.w $f14, $f4 /* 08514 80A63804 3C0180A6 */ lui $at, %hi(D_80A66984) ## $at = 80A60000 /* 08518 80A63808 C4326984 */ lwc1 $f18, %lo(D_80A66984)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse_Ganon/func_80A68E14.s b/asm/non_matchings/overlays/actors/ovl_En_Horse_Ganon/func_80A68E14.s index e526918178..40ec54b49c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse_Ganon/func_80A68E14.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse_Ganon/func_80A68E14.s @@ -37,7 +37,7 @@ glabel func_80A68E14 /* 00838 80A68E98 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 /* 0083C 80A68E9C 44817000 */ mtc1 $at, $f14 ## $f14 = 30.00 /* 00840 80A68EA0 E60001F4 */ swc1 $f0, 0x01F4($s0) ## 000001F4 -/* 00844 80A68EA4 0C03F494 */ jal func_800FD250 +/* 00844 80A68EA4 0C03F494 */ jal Math_atan2f /* 00848 80A68EA8 46009301 */ sub.s $f12, $f18, $f0 /* 0084C 80A68EAC 3C0180A7 */ lui $at, %hi(D_80A692D0) ## $at = 80A70000 /* 00850 80A68EB0 C42492D0 */ lwc1 $f4, %lo(D_80A692D0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6B9D0.s b/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6B9D0.s index 9ca767c025..e70865093a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6B9D0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6B9D0.s @@ -40,7 +40,7 @@ glabel func_80A6B9D0 /* 00818 80A6BA68 46083301 */ sub.s $f12, $f6, $f8 /* 0081C 80A6BA6C 46128381 */ sub.s $f14, $f16, $f18 /* 00820 80A6BA70 E7AC0044 */ swc1 $f12, 0x0044($sp) -/* 00824 80A6BA74 0C03F494 */ jal func_800FD250 +/* 00824 80A6BA74 0C03F494 */ jal Math_atan2f /* 00828 80A6BA78 E7AE0040 */ swc1 $f14, 0x0040($sp) /* 0082C 80A6BA7C 3C0180A7 */ lui $at, %hi(D_80A6D5C8) ## $at = 80A70000 /* 00830 80A6BA80 C424D5C8 */ lwc1 $f4, %lo(D_80A6D5C8)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6C8E0.s b/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6C8E0.s index 6084dd212d..89ab9c877f 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6C8E0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse_Normal/func_80A6C8E0.s @@ -37,7 +37,7 @@ glabel func_80A6C8E0 /* 01714 80A6C964 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 /* 01718 80A6C968 44817000 */ mtc1 $at, $f14 ## $f14 = 30.00 /* 0171C 80A6C96C E6000220 */ swc1 $f0, 0x0220($s0) ## 00000220 -/* 01720 80A6C970 0C03F494 */ jal func_800FD250 +/* 01720 80A6C970 0C03F494 */ jal Math_atan2f /* 01724 80A6C974 46009301 */ sub.s $f12, $f18, $f0 /* 01728 80A6C978 3C0180A7 */ lui $at, %hi(D_80A6D5E4) ## $at = 80A70000 /* 0172C 80A6C97C C424D5E4 */ lwc1 $f4, %lo(D_80A6D5E4)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse_Zelda/func_80A6DE38.s b/asm/non_matchings/overlays/actors/ovl_En_Horse_Zelda/func_80A6DE38.s index e61317912e..1e8a304e7b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse_Zelda/func_80A6DE38.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse_Zelda/func_80A6DE38.s @@ -37,7 +37,7 @@ glabel func_80A6DE38 /* 005EC 80A6DEBC 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 /* 005F0 80A6DEC0 44817000 */ mtc1 $at, $f14 ## $f14 = 30.00 /* 005F4 80A6DEC4 E60001F4 */ swc1 $f0, 0x01F4($s0) ## 000001F4 -/* 005F8 80A6DEC8 0C03F494 */ jal func_800FD250 +/* 005F8 80A6DEC8 0C03F494 */ jal Math_atan2f /* 005FC 80A6DECC 46009301 */ sub.s $f12, $f18, $f0 /* 00600 80A6DED0 3C0180A7 */ lui $at, %hi(D_80A6E2C0) ## $at = 80A70000 /* 00604 80A6DED4 C424E2C0 */ lwc1 $f4, %lo(D_80A6E2C0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s index 7f7358afec..37cc654f9a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s @@ -1460,7 +1460,7 @@ glabel L80A930DC /* 0174C 80A936EC 46085182 */ mul.s $f6, $f10, $f8 /* 01750 80A936F0 E7A60074 */ swc1 $f6, 0x0074($sp) /* 01754 80A936F4 A2390154 */ sb $t9, 0x0154($s1) ## 00000154 -/* 01758 80A936F8 0C03F494 */ jal func_800FD250 +/* 01758 80A936F8 0C03F494 */ jal Math_atan2f /* 0175C 80A936FC E624006C */ swc1 $f4, 0x006C($s1) ## 0000006C /* 01760 80A93700 3C0180A9 */ lui $at, %hi(D_80A95100) ## $at = 80A90000 /* 01764 80A93704 C42A5100 */ lwc1 $f10, %lo(D_80A95100)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A91FA0.s b/asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A91FA0.s index d32c840f32..bee583262f 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A91FA0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A91FA0.s @@ -26,7 +26,7 @@ glabel func_80A91FA0 /* 00060 80A92000 E7B00018 */ swc1 $f16, 0x0018($sp) /* 00064 80A92004 46000207 */ neg.s $f8, $f0 /* 00068 80A92008 46104302 */ mul.s $f12, $f8, $f16 -/* 0006C 80A9200C 0C03F494 */ jal func_800FD250 +/* 0006C 80A9200C 0C03F494 */ jal Math_atan2f /* 00070 80A92010 00000000 */ nop /* 00074 80A92014 8FA80020 */ lw $t0, 0x0020($sp) /* 00078 80A92018 46000287 */ neg.s $f10, $f0 @@ -37,7 +37,7 @@ glabel func_80A91FA0 /* 0008C 80A9202C 44817000 */ mtc1 $at, $f14 ## $f14 = 1.00 /* 00090 80A92030 46009107 */ neg.s $f4, $f18 /* 00094 80A92034 46102302 */ mul.s $f12, $f4, $f16 -/* 00098 80A92038 0C03F494 */ jal func_800FD250 +/* 00098 80A92038 0C03F494 */ jal Math_atan2f /* 0009C 80A9203C 00000000 */ nop /* 000A0 80A92040 8FA90020 */ lw $t1, 0x0020($sp) /* 000A4 80A92044 E5200190 */ swc1 $f0, 0x0190($t1) ## 00000190 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kz/func_80A9CCD8.s b/asm/non_matchings/overlays/actors/ovl_En_Kz/func_80A9CCD8.s index 5e5a394dd8..8bfe49a29a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kz/func_80A9CCD8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kz/func_80A9CCD8.s @@ -46,7 +46,7 @@ glabel func_80A9CCD8 /* 00834 80A9CD84 46083301 */ sub.s $f12, $f6, $f8 /* 00838 80A9CD88 46128381 */ sub.s $f14, $f16, $f18 /* 0083C 80A9CD8C E7AC002C */ swc1 $f12, 0x002C($sp) -/* 00840 80A9CD90 0C03F494 */ jal func_800FD250 +/* 00840 80A9CD90 0C03F494 */ jal Math_atan2f /* 00844 80A9CD94 E7AE0028 */ swc1 $f14, 0x0028($sp) /* 00848 80A9CD98 3C0180AA */ lui $at, %hi(D_80A9D9C0) ## $at = 80AA0000 /* 0084C 80A9CD9C C424D9C0 */ lwc1 $f4, %lo(D_80A9D9C0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Md/func_80AAB370.s b/asm/non_matchings/overlays/actors/ovl_En_Md/func_80AAB370.s index a505343047..c791253fd3 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Md/func_80AAB370.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Md/func_80AAB370.s @@ -46,7 +46,7 @@ glabel func_80AAB370 /* 011CC 80AAB41C 46083301 */ sub.s $f12, $f6, $f8 /* 011D0 80AAB420 46128381 */ sub.s $f14, $f16, $f18 /* 011D4 80AAB424 E7AC002C */ swc1 $f12, 0x002C($sp) -/* 011D8 80AAB428 0C03F494 */ jal func_800FD250 +/* 011D8 80AAB428 0C03F494 */ jal Math_atan2f /* 011DC 80AAB42C E7AE0028 */ swc1 $f14, 0x0028($sp) /* 011E0 80AAB430 3C0180AB */ lui $at, %hi(D_80AAC584) ## $at = 80AB0000 /* 011E4 80AAB434 C424C584 */ lwc1 $f4, %lo(D_80AAC584)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADEF0.s b/asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADEF0.s index c98bf02d77..4a0e217bb6 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADEF0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADEF0.s @@ -24,7 +24,7 @@ glabel func_80AADEF0 /* 007D8 80AADF48 46062501 */ sub.s $f20, $f4, $f6 /* 007DC 80AADF4C 460A4581 */ sub.s $f22, $f8, $f10 /* 007E0 80AADF50 4600A306 */ mov.s $f12, $f20 -/* 007E4 80AADF54 0C03F494 */ jal func_800FD250 +/* 007E4 80AADF54 0C03F494 */ jal Math_atan2f /* 007E8 80AADF58 4600B386 */ mov.s $f14, $f22 /* 007EC 80AADF5C 3C0180AB */ lui $at, %hi(D_80AAEC6C) ## $at = 80AB0000 /* 007F0 80AADF60 C430EC6C */ lwc1 $f16, %lo(D_80AAEC6C)($at) @@ -149,7 +149,7 @@ glabel func_80AADEF0 /* 00994 80AAE104 46062501 */ sub.s $f20, $f4, $f6 /* 00998 80AAE108 460A4581 */ sub.s $f22, $f8, $f10 /* 0099C 80AAE10C 4600A306 */ mov.s $f12, $f20 -/* 009A0 80AAE110 0C03F494 */ jal func_800FD250 +/* 009A0 80AAE110 0C03F494 */ jal Math_atan2f /* 009A4 80AAE114 4600B386 */ mov.s $f14, $f22 /* 009A8 80AAE118 3C0180AB */ lui $at, %hi(D_80AAEC74) ## $at = 80AB0000 /* 009AC 80AAE11C C430EC74 */ lwc1 $f16, %lo(D_80AAEC74)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB0DAC.s b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB0DAC.s index e37a53c950..1883cd8de6 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB0DAC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB0DAC.s @@ -62,7 +62,7 @@ glabel func_80AB0DAC /* 0010C 80AB0E9C 468084A0 */ cvt.s.w $f18, $f16 /* 00110 80AB0EA0 E4D202F8 */ swc1 $f18, 0x02F8($a2) ## 000002F8 /* 00114 80AB0EA4 C4C802F8 */ lwc1 $f8, 0x02F8($a2) ## 000002F8 -/* 00118 80AB0EA8 0C03F494 */ jal func_800FD250 +/* 00118 80AB0EA8 0C03F494 */ jal Math_atan2f /* 0011C 80AB0EAC 460A4381 */ sub.s $f14, $f8, $f10 /* 00120 80AB0EB0 3C0180AB */ lui $at, %hi(D_80AB5200) ## $at = 80AB0000 /* 00124 80AB0EB4 C4305200 */ lwc1 $f16, %lo(D_80AB5200)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s index e00f727897..bb8d3ea06e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s @@ -307,7 +307,7 @@ glabel func_80AB6570 /* 01228 80AB69A8 A600025A */ sh $zero, 0x025A($s0) ## 0000025A /* 0122C 80AB69AC A60E029E */ sh $t6, 0x029E($s0) ## 0000029E .L80AB69B0: -/* 01230 80AB69B0 0C03F494 */ jal func_800FD250 +/* 01230 80AB69B0 0C03F494 */ jal Math_atan2f /* 01234 80AB69B4 00000000 */ nop /* 01238 80AB69B8 3C0180AC */ lui $at, %hi(D_80AB8AE0) ## $at = 80AC0000 /* 0123C 80AB69BC C4268AE0 */ lwc1 $f6, %lo(D_80AB8AE0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6A38.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6A38.s index 7947ca1e0e..4d822bd897 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6A38.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6A38.s @@ -69,7 +69,7 @@ glabel func_80AB6A38 /* 013C0 80AB6B40 46083301 */ sub.s $f12, $f6, $f8 /* 013C4 80AB6B44 46128381 */ sub.s $f14, $f16, $f18 /* 013C8 80AB6B48 E7AC001C */ swc1 $f12, 0x001C($sp) -/* 013CC 80AB6B4C 0C03F494 */ jal func_800FD250 +/* 013CC 80AB6B4C 0C03F494 */ jal Math_atan2f /* 013D0 80AB6B50 E7AE0018 */ swc1 $f14, 0x0018($sp) /* 013D4 80AB6B54 3C0180AC */ lui $at, %hi(D_80AB8AE4) ## $at = 80AC0000 /* 013D8 80AB6B58 C4248AE4 */ lwc1 $f4, %lo(D_80AB8AE4)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB7328.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB7328.s index 6e60a57452..d75bb2f170 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB7328.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB7328.s @@ -42,7 +42,7 @@ glabel func_80AB7328 /* 01C40 80AB73C0 C448002C */ lwc1 $f8, 0x002C($v0) ## 0000002C /* 01C44 80AB73C4 46109301 */ sub.s $f12, $f18, $f16 /* 01C48 80AB73C8 AFA40018 */ sw $a0, 0x0018($sp) -/* 01C4C 80AB73CC 0C03F494 */ jal func_800FD250 +/* 01C4C 80AB73CC 0C03F494 */ jal Math_atan2f /* 01C50 80AB73D0 46085381 */ sub.s $f14, $f10, $f8 /* 01C54 80AB73D4 3C0180AC */ lui $at, %hi(D_80AB8B04) ## $at = 80AC0000 /* 01C58 80AB73D8 C4308B04 */ lwc1 $f16, %lo(D_80AB8B04)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw_Girl/func_80AB9210.s b/asm/non_matchings/overlays/actors/ovl_En_Niw_Girl/func_80AB9210.s index 98a607c5a5..094c5a7961 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw_Girl/func_80AB9210.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw_Girl/func_80AB9210.s @@ -70,7 +70,7 @@ glabel func_80AB9210 /* 00390 80AB9310 8E0F0284 */ lw $t7, 0x0284($s0) ## 00000284 /* 00394 80AB9314 A5E002E8 */ sh $zero, 0x02E8($t7) ## 000002E8 .L80AB9318: -/* 00398 80AB9318 0C03F494 */ jal func_800FD250 +/* 00398 80AB9318 0C03F494 */ jal Math_atan2f /* 0039C 80AB931C 00000000 */ nop /* 003A0 80AB9320 3C0180AC */ lui $at, %hi(D_80AB9B18) ## $at = 80AC0000 /* 003A4 80AB9324 C4289B18 */ lwc1 $f8, %lo(D_80AB9B18)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ny/func_80ABCF4C.s b/asm/non_matchings/overlays/actors/ovl_En_Ny/func_80ABCF4C.s index f79959f248..b6a25830eb 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ny/func_80ABCF4C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ny/func_80ABCF4C.s @@ -49,7 +49,7 @@ glabel func_80ABCF4C /* 00444 80ABCFF4 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6 /* 00448 80ABCFF8 C60C0094 */ lwc1 $f12, 0x0094($s0) ## 00000094 /* 0044C 80ABCFFC C60E0090 */ lwc1 $f14, 0x0090($s0) ## 00000090 -/* 00450 80ABD000 0C03F494 */ jal func_800FD250 +/* 00450 80ABD000 0C03F494 */ jal Math_atan2f /* 00454 80ABD004 A6190032 */ sh $t9, 0x0032($s0) ## 00000032 /* 00458 80ABD008 E7A0002C */ swc1 $f0, 0x002C($sp) /* 0045C 80ABD00C 0C041184 */ jal cosf diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECF6C.s b/asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECF6C.s index 5b923f9700..98c6060336 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECF6C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECF6C.s @@ -34,7 +34,7 @@ glabel func_80AECF6C /* 023DC 80AECFEC C484002C */ lwc1 $f4, 0x002C($a0) ## 0000002C /* 023E0 80AECFF0 AFA30048 */ sw $v1, 0x0048($sp) /* 023E4 80AECFF4 46128301 */ sub.s $f12, $f16, $f18 -/* 023E8 80AECFF8 0C03F494 */ jal func_800FD250 +/* 023E8 80AECFF8 0C03F494 */ jal Math_atan2f /* 023EC 80AECFFC 46062381 */ sub.s $f14, $f4, $f6 /* 023F0 80AED000 3C0180AF */ lui $at, %hi(D_80AF1BF0) ## $at = 80AF0000 /* 023F4 80AED004 C4281BF0 */ lwc1 $f8, %lo(D_80AF1BF0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Siofuki/func_80AFBE8C.s b/asm/non_matchings/overlays/actors/ovl_En_Siofuki/func_80AFBE8C.s index 0ddec272b0..b6aadbf68a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Siofuki/func_80AFBE8C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Siofuki/func_80AFBE8C.s @@ -90,7 +90,7 @@ glabel func_80AFBE8C /* 00460 80AFBFE0 46000004 */ sqrt.s $f0, $f0 /* 00464 80AFBFE4 E7A00030 */ swc1 $f0, 0x0030($sp) /* 00468 80AFBFE8 AE090188 */ sw $t1, 0x0188($s0) ## 00000188 -/* 0046C 80AFBFEC 0C03F494 */ jal func_800FD250 +/* 0046C 80AFBFEC 0C03F494 */ jal Math_atan2f /* 00470 80AFBFF0 AE000184 */ sw $zero, 0x0184($s0) ## 00000184 /* 00474 80AFBFF4 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 /* 00478 80AFBFF8 44811000 */ mtc1 $at, $f2 ## $f2 = 1.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Stream/func_80B0B934.s b/asm/non_matchings/overlays/actors/ovl_En_Stream/func_80B0B934.s index 2b4782b61d..a31f7c8c64 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Stream/func_80B0B934.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Stream/func_80B0B934.s @@ -29,7 +29,7 @@ glabel func_80B0B934 /* 00200 80B0B9A0 46000084 */ sqrt.s $f2, $f0 /* 00204 80B0B9A4 46065401 */ sub.s $f16, $f10, $f6 /* 00208 80B0B9A8 E7A20038 */ swc1 $f2, 0x0038($sp) -/* 0020C 80B0B9AC 0C03F494 */ jal func_800FD250 +/* 0020C 80B0B9AC 0C03F494 */ jal Math_atan2f /* 00210 80B0B9B0 E7B00034 */ swc1 $f16, 0x0034($sp) /* 00214 80B0B9B4 3C014040 */ lui $at, 0x4040 ## $at = 40400000 /* 00218 80B0B9B8 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0BE20.s b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0BE20.s index 8141668b65..c5037912dc 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0BE20.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0BE20.s @@ -32,7 +32,7 @@ glabel func_80B0BE20 /* 000E8 80B0BE98 C492036C */ lwc1 $f18, 0x036C($a0) ## 0000036C /* 000EC 80B0BE9C 46125182 */ mul.s $f6, $f10, $f18 /* 000F0 80B0BEA0 46102200 */ add.s $f8, $f4, $f16 -/* 000F4 80B0BEA4 0C03F4DA */ jal func_800FD368 +/* 000F4 80B0BEA4 0C03F4DA */ jal Math_acosf /* 000F8 80B0BEA8 46064300 */ add.s $f12, $f8, $f6 /* 000FC 80B0BEAC 26040364 */ addiu $a0, $s0, 0x0364 ## $a0 = 00000364 /* 00100 80B0BEB0 E7A00034 */ swc1 $f0, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0DFFC.s b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0DFFC.s index 7a766afcdf..88e9ffcb1c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0DFFC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0DFFC.s @@ -150,7 +150,7 @@ glabel func_80B0DFFC /* 02478 80B0E228 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00 /* 0247C 80B0E22C 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00 /* 02480 80B0E230 46802320 */ cvt.s.w $f12, $f4 -/* 02484 80B0E234 0C03F494 */ jal func_800FD250 +/* 02484 80B0E234 0C03F494 */ jal Math_atan2f /* 02488 80B0E238 468033A0 */ cvt.s.w $f14, $f6 /* 0248C 80B0E23C 3C0180B1 */ lui $at, %hi(D_80B0F238) ## $at = 80B10000 /* 02490 80B0E240 C428F238 */ lwc1 $f8, %lo(D_80B0F238)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B11E78.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B11E78.s index 4f063c9aa4..f701bf9c26 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B11E78.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B11E78.s @@ -282,7 +282,7 @@ glabel func_80B11E78 /* 00980 80B12270 A600025C */ sh $zero, 0x025C($s0) ## 0000025C /* 00984 80B12274 A60F0294 */ sh $t7, 0x0294($s0) ## 00000294 .L80B12278: -/* 00988 80B12278 0C03F494 */ jal func_800FD250 +/* 00988 80B12278 0C03F494 */ jal Math_atan2f /* 0098C 80B1227C 00000000 */ nop /* 00990 80B12280 3C0180B1 */ lui $at, %hi(D_80B137D0) ## $at = 80B10000 /* 00994 80B12284 C43237D0 */ lwc1 $f18, %lo(D_80B137D0)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B12460.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B12460.s index e53808c323..a59bd49017 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B12460.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/func_80B12460.s @@ -252,7 +252,7 @@ glabel L80B12798 /* 00F14 80B12804 C606002C */ lwc1 $f6, 0x002C($s0) ## 0000002C /* 00F18 80B12808 460A9301 */ sub.s $f12, $f18, $f10 /* 00F1C 80B1280C E7B00028 */ swc1 $f16, 0x0028($sp) -/* 00F20 80B12810 0C03F494 */ jal func_800FD250 +/* 00F20 80B12810 0C03F494 */ jal Math_atan2f /* 00F24 80B12814 46064381 */ sub.s $f14, $f8, $f6 /* 00F28 80B12818 3C0180B1 */ lui $at, %hi(D_80B13818) ## $at = 80B10000 /* 00F2C 80B1281C C4283818 */ lwc1 $f8, %lo(D_80B13818)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Tk/func_80B1C3DC.s b/asm/non_matchings/overlays/actors/ovl_En_Tk/func_80B1C3DC.s index 95de9f79df..95dda85b92 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Tk/func_80B1C3DC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Tk/func_80B1C3DC.s @@ -41,7 +41,7 @@ glabel func_80B1C3DC /* 00B74 80B1C474 46083301 */ sub.s $f12, $f6, $f8 /* 00B78 80B1C478 46128381 */ sub.s $f14, $f16, $f18 /* 00B7C 80B1C47C E7AC002C */ swc1 $f12, 0x002C($sp) -/* 00B80 80B1C480 0C03F494 */ jal func_800FD250 +/* 00B80 80B1C480 0C03F494 */ jal Math_atan2f /* 00B84 80B1C484 E7AE0028 */ swc1 $f14, 0x0028($sp) /* 00B88 80B1C488 3C0180B2 */ lui $at, %hi(D_80B1D63C) ## $at = 80B20000 /* 00B8C 80B1C48C C424D63C */ lwc1 $f4, %lo(D_80B1D63C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Init.s index eee6740370..b159bba660 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Init.s @@ -21,7 +21,7 @@ glabel EnVbBall_Init /* 00044 80B28FE4 E600015C */ swc1 $f0, 0x015C($s0) ## 0000015C /* 00048 80B28FE8 E6000158 */ swc1 $f0, 0x0158($s0) ## 00000158 /* 0004C 80B28FEC C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024 -/* 00050 80B28FF0 0C03F494 */ jal func_800FD250 +/* 00050 80B28FF0 0C03F494 */ jal Math_atan2f /* 00054 80B28FF4 C60E002C */ lwc1 $f14, 0x002C($s0) ## 0000002C /* 00058 80B28FF8 3C014040 */ lui $at, 0x4040 ## $at = 40400000 /* 0005C 80B28FFC 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s index ae301b606d..707912020c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s @@ -242,7 +242,7 @@ glabel EnVbBall_Update /* 00980 80B29920 46004282 */ mul.s $f10, $f8, $f0 /* 00984 80B29924 E60A0158 */ swc1 $f10, 0x0158($s0) ## 00000158 /* 00988 80B29928 C7AE00F4 */ lwc1 $f14, 0x00F4($sp) -/* 0098C 80B2992C 0C03F494 */ jal func_800FD250 +/* 0098C 80B2992C 0C03F494 */ jal Math_atan2f /* 00990 80B29930 C7AC00EC */ lwc1 $f12, 0x00EC($sp) /* 00994 80B29934 3C0180B3 */ lui $at, %hi(D_80B2A100) ## $at = 80B30000 /* 00998 80B29938 C430A100 */ lwc1 $f16, %lo(D_80B2A100)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B292D0.s b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B292D0.s index 3eb7d2cebc..03ca52ddc3 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B292D0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B292D0.s @@ -52,7 +52,7 @@ glabel func_80B292D0 /* 003F0 80B29390 4600A306 */ mov.s $f12, $f20 /* 003F4 80B29394 E660015C */ swc1 $f0, 0x015C($s3) ## 0000015C /* 003F8 80B29398 C66C0024 */ lwc1 $f12, 0x0024($s3) ## 00000024 -/* 003FC 80B2939C 0C03F494 */ jal func_800FD250 +/* 003FC 80B2939C 0C03F494 */ jal Math_atan2f /* 00400 80B293A0 C66E002C */ lwc1 $f14, 0x002C($s3) ## 0000002C /* 00404 80B293A4 46000506 */ mov.s $f20, $f0 /* 00408 80B293A8 0C0400A4 */ jal sinf diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl2/func_80B50304.s b/asm/non_matchings/overlays/actors/ovl_En_Zl2/func_80B50304.s index bf0d349d09..ecc83072e0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl2/func_80B50304.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl2/func_80B50304.s @@ -37,7 +37,7 @@ glabel func_80B50304 /* 01A00 80B50390 A06C0014 */ sb $t4, 0x0014($v1) ## 000000C8 /* 01A04 80B50394 AFA30028 */ sw $v1, 0x0028($sp) /* 01A08 80B50398 C7AE0030 */ lwc1 $f14, 0x0030($sp) -/* 01A0C 80B5039C 0C03F494 */ jal func_800FD250 +/* 01A0C 80B5039C 0C03F494 */ jal Math_atan2f /* 01A10 80B503A0 C7AC0034 */ lwc1 $f12, 0x0034($sp) /* 01A14 80B503A4 3C0180B5 */ lui $at, %hi(D_80B52BD8) ## $at = 80B50000 /* 01A18 80B503A8 C4322BD8 */ lwc1 $f18, %lo(D_80B52BD8)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57034.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57034.s index 557edd1d67..b4b7567ac4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57034.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57034.s @@ -35,7 +35,7 @@ glabel func_80B57034 /* 03D08 80B570B8 1000000E */ beq $zero, $zero, .L80B570F4 /* 03D0C 80B570BC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 .L80B570C0: -/* 03D10 80B570C0 0C03F494 */ jal func_800FD250 +/* 03D10 80B570C0 0C03F494 */ jal Math_atan2f /* 03D14 80B570C4 00000000 */ nop /* 03D18 80B570C8 3C0180B6 */ lui $at, %hi(D_80B5AB84) ## $at = 80B60000 /* 03D1C 80B570CC C428AB84 */ lwc1 $f8, %lo(D_80B5AB84)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57104.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57104.s index 8cfa4749cf..1db94dbe80 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57104.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57104.s @@ -25,7 +25,7 @@ glabel func_80B57104 /* 03DB0 80B57160 4503000D */ bc1tl .L80B57198 /* 03DB4 80B57164 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 .L80B57168: -/* 03DB8 80B57168 0C03F494 */ jal func_800FD250 +/* 03DB8 80B57168 0C03F494 */ jal Math_atan2f /* 03DBC 80B5716C 00000000 */ nop /* 03DC0 80B57170 3C0180B6 */ lui $at, %hi(D_80B5AB88) ## $at = 80B60000 /* 03DC4 80B57174 C424AB88 */ lwc1 $f4, %lo(D_80B5AB88)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57458.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57458.s index df0d1732d4..d18e08adf7 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57458.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B57458.s @@ -35,7 +35,7 @@ glabel func_80B57458 /* 0412C 80B574DC 46001381 */ sub.s $f14, $f2, $f0 .L80B574E0: /* 04130 80B574E0 A7A3001C */ sh $v1, 0x001C($sp) -/* 04134 80B574E4 0C03F494 */ jal func_800FD250 +/* 04134 80B574E4 0C03F494 */ jal Math_atan2f /* 04138 80B574E8 AFA40048 */ sw $a0, 0x0048($sp) /* 0413C 80B574EC 3C0180B6 */ lui $at, %hi(D_80B5AB8C) ## $at = 80B60000 /* 04140 80B574F0 C432AB8C */ lwc1 $f18, %lo(D_80B5AB8C)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B577BC.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B577BC.s index 67402e6ead..eb2e354df8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B577BC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B577BC.s @@ -12,7 +12,7 @@ glabel func_80B577BC /* 04434 80B577E4 E7B00038 */ swc1 $f16, 0x0038($sp) /* 04438 80B577E8 46105301 */ sub.s $f12, $f10, $f16 /* 0443C 80B577EC E7B20030 */ swc1 $f18, 0x0030($sp) -/* 04440 80B577F0 0C03F494 */ jal func_800FD250 +/* 04440 80B577F0 0C03F494 */ jal Math_atan2f /* 04444 80B577F4 46124381 */ sub.s $f14, $f8, $f18 /* 04448 80B577F8 3C0180B6 */ lui $at, %hi(D_80B5AB90) ## $at = 80B60000 /* 0444C 80B577FC C432AB90 */ lwc1 $f18, %lo(D_80B5AB90)($at) diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B6D688.s b/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B6D688.s index 304bb2d02a..e0fcca3c39 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B6D688.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B6D688.s @@ -317,7 +317,7 @@ glabel func_80B6D688 /* 041B0 80B6DB50 E7AC006C */ swc1 $f12, 0x006C($sp) /* 041B4 80B6DB54 46062381 */ sub.s $f14, $f4, $f6 /* 041B8 80B6DB58 E7AA0068 */ swc1 $f10, 0x0068($sp) -/* 041BC 80B6DB5C 0C03F494 */ jal func_800FD250 +/* 041BC 80B6DB5C 0C03F494 */ jal Math_atan2f /* 041C0 80B6DB60 E7AE0064 */ swc1 $f14, 0x0064($sp) /* 041C4 80B6DB64 C7B2006C */ lwc1 $f18, 0x006C($sp) /* 041C8 80B6DB68 C7A80064 */ lwc1 $f8, 0x0064($sp) @@ -328,7 +328,7 @@ glabel func_80B6D688 /* 041DC 80B6DB7C E7A20030 */ swc1 $f2, 0x0030($sp) /* 041E0 80B6DB80 46101000 */ add.s $f0, $f2, $f16 /* 041E4 80B6DB84 E7B0002C */ swc1 $f16, 0x002C($sp) -/* 041E8 80B6DB88 0C03F494 */ jal func_800FD250 +/* 041E8 80B6DB88 0C03F494 */ jal Math_atan2f /* 041EC 80B6DB8C 46000384 */ sqrt.s $f14, $f0 /* 041F0 80B6DB90 C7B20068 */ lwc1 $f18, 0x0068($sp) /* 041F4 80B6DB94 C7A20030 */ lwc1 $f2, 0x0030($sp) @@ -424,7 +424,7 @@ glabel func_80B6D688 /* 04354 80B6DCF4 E7AC004C */ swc1 $f12, 0x004C($sp) /* 04358 80B6DCF8 AFA2002C */ sw $v0, 0x002C($sp) /* 0435C 80B6DCFC 46083381 */ sub.s $f14, $f6, $f8 -/* 04360 80B6DD00 0C03F494 */ jal func_800FD250 +/* 04360 80B6DD00 0C03F494 */ jal Math_atan2f /* 04364 80B6DD04 E7AE0044 */ swc1 $f14, 0x0044($sp) /* 04368 80B6DD08 C7B2004C */ lwc1 $f18, 0x004C($sp) /* 0436C 80B6DD0C C7AA0044 */ lwc1 $f10, 0x0044($sp) @@ -435,7 +435,7 @@ glabel func_80B6D688 /* 04380 80B6DD20 E7A20028 */ swc1 $f2, 0x0028($sp) /* 04384 80B6DD24 46101000 */ add.s $f0, $f2, $f16 /* 04388 80B6DD28 E7B00024 */ swc1 $f16, 0x0024($sp) -/* 0438C 80B6DD2C 0C03F494 */ jal func_800FD250 +/* 0438C 80B6DD2C 0C03F494 */ jal Math_atan2f /* 04390 80B6DD30 46000384 */ sqrt.s $f14, $f0 /* 04394 80B6DD34 C7B20048 */ lwc1 $f18, 0x0048($sp) /* 04398 80B6DD38 C7A20028 */ lwc1 $f2, 0x0028($sp) diff --git a/data/code_800FCE80.bss.s b/data/code_800FCE80.bss.s deleted file mode 100644 index df9e1e6f2a..0000000000 --- a/data/code_800FCE80.bss.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .bss - -glabel D_80175600 - .space 0x10 diff --git a/data/code_800FCE80.data.s b/data/code_800FCE80.data.s deleted file mode 100644 index 0b7263e616..0000000000 --- a/data/code_800FCE80.data.s +++ /dev/null @@ -1,14 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .data - -glabel D_801344A0 - .incbin "baserom.z64", 0xBAB640, 0x4 - -glabel D_801344A4 - .incbin "baserom.z64", 0xBAB644, 0xC diff --git a/data/code_800FCE80.rodata.s b/data/code_800FCE80.rodata.s deleted file mode 100644 index fad8418a7b..0000000000 --- a/data/code_800FCE80.rodata.s +++ /dev/null @@ -1,54 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata - -.align 4 - -glabel D_8014AAC0 - .float -0.33333334 - .float 0.2 - .float -0.14285715 - .float 0.11111111 - .float -0.09090909 - .float 0.07692308 - .float -0.06666667 - .float 0.05882353 - .float 0 - -glabel D_8014AAE4 - .float 0.41421354 - -glabel D_8014AAE8 - .float 2.4142137 - -glabel D_8014AAEC - .float 1.5707964 # M_PI / 2 - -glabel D_8014AAF0 - .float 0.7853982 # M_PI / 4 - -glabel D_8014AAF4 - .float 1.5707964 # M_PI / 2 - -glabel D_8014AAF8 - .float -1.5707964 # - M_PI / 2 - -glabel D_8014AAFC - .float 1.5707964 # M_PI / 2 - -glabel D_8014AB00 - .float -1.5707964 # - M_PI / 2 - -glabel D_8014AB04 - .float 3.1415927 # M_PI - -glabel D_8014AB08 - .float 3.1415927 # M_PI - -glabel D_8014AB0C - .float 1.5707964 # M_PI / 2 diff --git a/include/fp.h b/include/fp.h new file mode 100644 index 0000000000..7346d5e082 --- /dev/null +++ b/include/fp.h @@ -0,0 +1,34 @@ +#ifndef _FP_H_ +#define _FP_H_ +#include + +extern f32 qNaN0x3FFFFF; +extern f32 qNaN0x10000; +extern f32 sNaN0x3FFFFF; + +f32 floorf(f32 x); +f64 floor(f64 x); +s32 lfloorf(f32 x); +s32 lfloor(f64 x); + +f32 ceilf(f32 x); +f64 ceil(f64 x); +s32 lceilf(f32 x); +s32 lceil(f64 x); + +f32 truncf(f32 x); +f64 trunc(f64 x); +s32 ltruncf(f32 x); +s32 ltrunc(f64 x); + +f32 nearbyintf(f32 x); +f64 nearbyint(f64 x); +s32 lnearbyintf(f32 x); +s32 lnearbyint(f64 x); + +f32 roundf(f32 x); +f64 round(f64 x); +s32 lroundf(f32 x); +s32 lround(f64 x); + +#endif diff --git a/include/functions.h b/include/functions.h index 8c84fe9b62..62cd9dc51d 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2160,19 +2160,19 @@ void SystemHeap_Init(void *start, u32 size); // ? func_800FCC24(?); // ? func_800FCC6C(?); // ? func_800FCD40(?); -// ? func_800FCE80(?); -// ? func_800FCF34(?); -// ? func_800FCF54(?); -// ? func_800FCFA0(?); -// ? func_800FD0C4(?); -// ? func_800FD210(?); -f32 func_800FD250(f32 f12, f32 f14); -// ? func_800FD338(?); -// ? func_800FD390(?); -// ? func_800FD3C8(?); -// ? func_800FD400(?); -// ? func_800FD438(?); -// ? func_800FD470(?); +f32 Math_tanf(f32 x); +f32 Math_nearbyintf(f32 x); +f32 Math_atanf_taylor_q(f32 x); +f32 Math_atanf_taylor(f32 x); +f32 Math_atanf_cfrac(f32 x); +f32 Math_atanf(f32 x); +f32 Math_atan2f(f32 y, f32 x); +f32 Math_asinf(f32 x); +f32 Math_acosf(f32 x); +f32 ceilf(f32 x); +f32 truncf(f32 x); +f32 roundf(f32 x); +f32 nearbyintf(f32 x); void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action); void* SystemArena_Malloc(u32 size); void* SystemArena_MallocDebug(u32 size, const char* file, s32 line); diff --git a/include/math.h b/include/math.h index a2648c3352..1fbbe0ca77 100644 --- a/include/math.h +++ b/include/math.h @@ -2,6 +2,7 @@ #define _MATH_H_ #define M_PI 3.14159265358979323846f +#define M_SQRT2 1.41421356237309504880f #define FLT_MAX 340282346638528859811704183484516925440.0f float sinf(float); diff --git a/include/variables.h b/include/variables.h index b12c078d56..0f18f73848 100644 --- a/include/variables.h +++ b/include/variables.h @@ -3145,7 +3145,6 @@ extern char D_80146238[]; //extern ? D_8014AA38; //extern ? D_8014AA5C; //extern ? D_8014AA80; -//extern ? D_8014AAC0; //extern ? D_8014B210; //extern ? D_8014B280; //extern ? D_8014B2E0; @@ -3852,7 +3851,6 @@ extern u32 D_8016B5F5; //extern ? D_80174DBC; //extern ? D_80174DC0; //extern ? D_801755D0; -//extern ? D_80175600; extern u32 __osMalloc_FreeBlockTest_Enable; //extern ? D_80175640; //extern ? D_80175660; diff --git a/spec b/spec index 8c6f404508..c24cdd5409 100644 --- a/spec +++ b/spec @@ -509,10 +509,8 @@ beginseg include "build/src/code/code_800FC620.o" include "build/asm/code_800FCB50.o" include "build/asm/code_800FCD40.o" - include "build/asm/code_800FCE80.o" - include "build/data/code_800FCE80.data.o" - include "build/data/code_800FCE80.rodata.o" - include "build/data/code_800FCE80.bss.o" + include "build/src/code/code_800FCE80.o" + include "build/asm/fp.o" include "build/src/code/system_malloc.o" include "build/asm/code_800FD970.o" include "build/data/code_800FD970.data.o" diff --git a/src/code/code_8007BF90.c b/src/code/code_8007BF90.c index a7e1cca5be..f947e042b0 100644 --- a/src/code/code_8007BF90.c +++ b/src/code/code_8007BF90.c @@ -121,8 +121,8 @@ Vec3f* func_8007C4E0(Vec3f* dest, Vec3f* a, Vec3f* b) { Vec3f var; - var.x = func_800FD250(b->z - a->z, b->y - a->y); - var.y = func_800FD250(b->x - a->x, b->z - a->z); + var.x = Math_atan2f(b->z - a->z, b->y - a->y); + var.y = Math_atan2f(b->x - a->x, b->z - a->z); var.z = 0; *dest = var; diff --git a/src/code/code_800FCE80.c b/src/code/code_800FCE80.c new file mode 100644 index 0000000000..60afd1dfb7 --- /dev/null +++ b/src/code/code_800FCE80.c @@ -0,0 +1,229 @@ +#include +#include +#include + +s32 use_cfrac; + +f32 Math_tanf(f32 x) +{ + f32 sin = sinf(x); + f32 cos = cosf(x); + return sin / cos; +} + +f32 Math_floorf(f32 x) +{ + return floorf(x); +} + +f32 Math_ceilf(f32 x) +{ + return ceilf(x); +} + +f32 Math_roundf(f32 x) +{ + return roundf(x); +} + +f32 Math_truncf(f32 x) +{ + return truncf(x); +} + +f32 Math_nearbyintf(f32 x) +{ + return nearbyintf(x); +} + +/* Arctangent approximation using a Taylor series (one quadrant) */ +f32 Math_atanf_taylor_q(f32 x) +{ + static const f32 coeffs[] = + { + -1.f / 3, + +1.f / 5, + -1.f / 7, + +1.f / 9, + -1.f / 11, + +1.f / 13, + -1.f / 15, + +1.f / 17, + 0.f, + }; + + f32 poly = x; + f32 sq = SQ(x); + f32 exp = x * sq; + const f32 *c = coeffs; + f32 term; + + while (1) + { + term = *c++ * exp; + if (poly + term == poly) + { + break; + } + poly = poly + term; + exp = exp * sq; + } + + return poly; +} + +/* Ditto for two quadrants */ +f32 Math_atanf_taylor(f32 x) +{ + f32 t; + f32 q; + + if (x > 0.f) + { + t = x; + } + else if (x < 0.f) + { + t = -x; + } + else if (x == 0.f) + { + return 0.f; + } + else + { + return qNaN0x10000; + } + + if (t <= M_SQRT2 - 1.f) + { + return Math_atanf_taylor_q(x); + } + + if (t >= M_SQRT2 + 1.f) + { + q = M_PI / 2 - Math_atanf_taylor_q(1.f / t); + } + else + { + q = M_PI / 4 - Math_atanf_taylor_q((1.f - t) / (1.f + t)); + } + + if (x > 0.f) + { + return q; + } + else + { + return -q; + } +} + +/* Arctangent approximation using a continued fraction */ +f32 Math_atanf_cfrac(f32 x) +{ + s32 sector; + f32 z; + f32 conv; + f32 sq; + s32 i; + + if (x >= -1.f && x <= 1.f) + { + sector = 0; + } + else if (x > 1.f) + { + sector = 1; + x = 1.f / x; + } + else if (x < -1.f) + { + sector = -1; + x = 1.f / x; + } + else + { + return qNaN0x10000; + } + + sq = SQ(x); + conv = 0.f; + z = 8.f; + for (i = 8; i != 0; i--) + { + conv = SQ(z) * sq / (2.f * z + 1.f + conv); + z -= 1.f; + } + conv = x / (1.f + conv); + + if (sector == 0) + { + return conv; + } + else if (sector > 0) + { + return M_PI / 2 - conv; + } + else + { + return -M_PI / 2 - conv; + } +} + +f32 Math_atanf(f32 x) +{ + if (use_cfrac == 0) + { + return Math_atanf_taylor(x); + } + else + { + return Math_atanf_cfrac(x); + } +} + +f32 Math_atan2f(f32 y, f32 x) +{ + if (x == 0.f) + { + if (y == 0.f) + { + return 0.f; + } + else if (y > 0.f) + { + return M_PI / 2; + } + else if (y < 0.f) + { + return -M_PI / 2; + } + else + { + return qNaN0x10000; + } + } + else if (x >= 0.f) + { + return Math_atanf(y / x); + } + else if (y < 0.f) + { + return Math_atanf(y / x) - M_PI; + } + else + { + return M_PI - Math_atanf(-(y / x)); + } +} + +f32 Math_asinf(f32 x) +{ + return Math_atan2f(x, sqrtf(1.f - SQ(x))); +} + +f32 Math_acosf(f32 x) +{ + return M_PI / 2 - Math_asinf(x); +} diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index bd526cec71..75afbc5ee3 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -792,22 +792,22 @@ void func_800D1FD4(MtxF* mf) // same differences as func_800D2264 void func_800D20CC(MtxF* mf, Vec3s* vec, s32 flag) { - vec->x = func_800FD250(-mf->zy, sqrtf(SQ(mf->zx) + SQ(mf->zz))) * (32768 / M_PI); + vec->x = Math_atan2f(-mf->zy, sqrtf(SQ(mf->zx) + SQ(mf->zz))) * (32768 / M_PI); if ((vec->x == 0x4000) || (vec->x == -0x4000)) { vec->z = 0; - vec->y = func_800FD250(-mf->xz, mf->xx) * (32768 / M_PI); + vec->y = Math_atan2f(-mf->xz, mf->xx) * (32768 / M_PI); return; } - vec->y = func_800FD250(mf->zx, mf->zz) * (32768 / M_PI); + vec->y = Math_atan2f(mf->zx, mf->zz) * (32768 / M_PI); if (!flag) - vec->z = func_800FD250(mf->xy, mf->yy) * (32768 / M_PI); + vec->z = Math_atan2f(mf->xy, mf->yy) * (32768 / M_PI); else - vec->z = func_800FD250(mf->xy / sqrtf(SQ(mf->xx) + SQ(mf->xz) + SQ(mf->xy)), - mf->yy / sqrtf(SQ(mf->yx) + SQ(mf->yz) + SQ(mf->yy))) * (32768 / M_PI); + vec->z = Math_atan2f(mf->xy / sqrtf(SQ(mf->xx) + SQ(mf->xz) + SQ(mf->xy)), + mf->yy / sqrtf(SQ(mf->yx) + SQ(mf->yz) + SQ(mf->yy))) * (32768 / M_PI); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/func_800D20CC.s") @@ -817,22 +817,22 @@ void func_800D20CC(MtxF* mf, Vec3s* vec, s32 flag) // same differences as func_800D20CC void func_800D2264(MtxF* mf, Vec3s* vec, s32 flag) { - vec->y = func_800FD250(-mf->xz, sqrtf(SQ(mf->xx) + SQ(mf->xy))) * (32768 / M_PI); + vec->y = Math_atan2f(-mf->xz, sqrtf(SQ(mf->xx) + SQ(mf->xy))) * (32768 / M_PI); if ((vec->y == 0x4000) || (vec->y == -0x4000)) { vec->x = 0; - vec->z = func_800FD250(-mf->yx, mf->yy) * (32768 / M_PI); + vec->z = Math_atan2f(-mf->yx, mf->yy) * (32768 / M_PI); return; } - vec->z = func_800FD250(mf->xy, mf->xx) * (32768 / M_PI); + vec->z = Math_atan2f(mf->xy, mf->xx) * (32768 / M_PI); if (!flag) - vec->x = func_800FD250(mf->yz, mf->zz) * (32768 / M_PI); + vec->x = Math_atan2f(mf->yz, mf->zz) * (32768 / M_PI); else - vec->x = func_800FD250(mf->yz / sqrtf(SQ(mf->yx) + SQ(mf->yy) + SQ(mf->yz)), - mf->zz / sqrtf(SQ(mf->zx) + SQ(mf->zy) + SQ(mf->zz))) * (32768 / M_PI); + vec->x = Math_atan2f(mf->yz / sqrtf(SQ(mf->yx) + SQ(mf->yy) + SQ(mf->yz)), + mf->zz / sqrtf(SQ(mf->zx) + SQ(mf->zy) + SQ(mf->zz))) * (32768 / M_PI); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/func_800D2264.s") diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 71bba11f23..bf81336853 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -88,7 +88,7 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF); - sp58 = func_800FD250(light->l.dir[0], light->l.dir[2]); + sp58 = Math_atan2f(light->l.dir[0], light->l.dir[2]); arg6 *= (4.5f - (light->l.dir[1] * 0.035f)); arg6 = (arg6 < 1.0f) ? 1.0f : arg6; Matrix_Put(arg2); @@ -4699,12 +4699,12 @@ void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2) sp38 = Math_Sins(arg1); sp34 = Math_Coss(arg1); sp28 = (-(sp44 * sp38) - (sp3C * sp34)); - arg2->x = -(s16)(func_800FD250(sp28 * sp40, 1.0f) * (32768 / M_PI)); + arg2->x = -(s16)(Math_atan2f(sp28 * sp40, 1.0f) * (32768 / M_PI)); sp2C = Math_Sins(arg1 - 16375); sp30 = Math_Coss(arg1 - 16375); sp24 = (-(sp44 * sp2C) - (sp3C * sp30)); - arg2->z = -(s16)(func_800FD250(sp24 * sp40, 1.0f) * (32768 / M_PI)); + arg2->z = -(s16)(Math_atan2f(sp24 * sp40, 1.0f) * (32768 / M_PI)); } } diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 89a5e03347..aba96fe446 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -383,7 +383,7 @@ f32 func_800449AC(Camera *camera, Vec3f *b, s32 *arg2) s16 func_80044A74(Vec3f *a, Vec3f *b) { - return func_800FD250(b->x - a->x, b->z - a->z) * (180 / M_PI) * (32767.5f / 180) + 0.5f; + return Math_atan2f(b->x - a->x, b->z - a->z) * (180 / M_PI) * (32767.5f / 180) + 0.5f; } // 234 lines @@ -505,7 +505,7 @@ s32 func_800458D4(Camera *camera, struct_80045714 *b, f32 c, f32 *d, s16 e) sp60.y -= func_80045714(&camera->unk_108, temp_s1->rot.y, b->unk_06, OREG(9)); sp48 = temp_s1->pos.y - *d; - temp_ret = func_800FD250(sp48, func_8007C028(&camera->unk_50, &camera->unk_5C)); // f2 and f14 are swapped + temp_ret = Math_atan2f(sp48, func_8007C028(&camera->unk_50, &camera->unk_5C)); // f2 and f14 are swapped if (OREG(32) * (M_PI / 180) < temp_ret) phi_f2 = 1.0f - sinf(temp_ret - OREG(32) * (M_PI / 180)); @@ -600,8 +600,8 @@ s32 func_80045C74(Camera *camera, struct_80045714 *b, f32 c, f32 *d, s16 arg4) if (PREG(75) == 0) { sp54 = func_8007C028(&camera->unk_50, &camera->unk_5C); - func_800FD250(temp, sp54); - temp_f2 = func_800FCE80(camera->unk_FC * 0.4f * (M_PI / 180)) * sp54; + Math_atan2f(temp, sp54); + temp_f2 = Math_tanf(camera->unk_FC * 0.4f * (M_PI / 180)) * sp54; if (temp > temp_f2) { @@ -621,7 +621,7 @@ s32 func_80045C74(Camera *camera, struct_80045714 *b, f32 c, f32 *d, s16 arg4) } else { - temp_ret_3 = func_800FD250(temp, func_8007C028(&camera->unk_50, &camera->unk_5C)); + temp_ret_3 = Math_atan2f(temp, func_8007C028(&camera->unk_50, &camera->unk_5C)); if (OREG(32) * (M_PI / 180) < temp_ret_3) phi_f16 = 1.0f - sinf(temp_ret_3 - OREG(32) * (M_PI / 180)); From 3e8c79c6705ba6cb7de6f17dda45207eb2e2af47 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 21 Mar 2020 03:16:18 -0400 Subject: [PATCH 12/23] More --- .../actors/ovl_Demo_Geff/func_80977EA8.s | 73 ------------------- .../actors/ovl_Demo_Geff/func_809782A0.s | 30 -------- .../actors/ovl_Demo_Geff/func_80978370.s | 40 ---------- .../actors/ovl_Demo_Geff/z_demo_geff.c | 64 ++++++++-------- 4 files changed, 32 insertions(+), 175 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s deleted file mode 100644 index 628433d3fd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s +++ /dev/null @@ -1,73 +0,0 @@ -.rdata - -glabel D_8097861C - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978630 - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_80978644 - .asciz "../z_demo_geff.c" - .balign 4 - -.text - -glabel func_80977EA8 -/* 00068 80977EA8 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 0006C 80977EAC AFBF001C */ sw $ra, 0x001C($sp) -/* 00070 80977EB0 AFB00018 */ sw $s0, 0x0018($sp) -/* 00074 80977EB4 AFA40048 */ sw $a0, 0x0048($sp) -/* 00078 80977EB8 AFA5004C */ sw $a1, 0x004C($sp) -/* 0007C 80977EBC 8C900000 */ lw $s0, 0x0000($a0) ## 00000000 -/* 00080 80977EC0 3C068098 */ lui $a2, %hi(D_8097861C) ## $a2 = 80980000 -/* 00084 80977EC4 24C6861C */ addiu $a2, $a2, %lo(D_8097861C) ## $a2 = 8097861C -/* 00088 80977EC8 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 0008C 80977ECC 240700B5 */ addiu $a3, $zero, 0x00B5 ## $a3 = 000000B5 -/* 00090 80977ED0 0C031AB1 */ jal func_800C6AC4 -/* 00094 80977ED4 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00098 80977ED8 0C024F46 */ jal func_80093D18 -/* 0009C 80977EDC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000A0 80977EE0 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 000A4 80977EE4 3C18DA38 */ lui $t8, 0xDA38 ## $t8 = DA380000 -/* 000A8 80977EE8 37180002 */ ori $t8, $t8, 0x0002 ## $t8 = DA380002 -/* 000AC 80977EEC 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 000B0 80977EF0 AE0F02C0 */ sw $t7, 0x02C0($s0) ## 000002C0 -/* 000B4 80977EF4 3C058098 */ lui $a1, %hi(D_80978630) ## $a1 = 80980000 -/* 000B8 80977EF8 AC580000 */ sw $t8, 0x0000($v0) ## 00000000 -/* 000BC 80977EFC 24A58630 */ addiu $a1, $a1, %lo(D_80978630) ## $a1 = 80978630 -/* 000C0 80977F00 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000C4 80977F04 240600B7 */ addiu $a2, $zero, 0x00B7 ## $a2 = 000000B7 -/* 000C8 80977F08 0C0346A2 */ jal Matrix_NewMtx -/* 000CC 80977F0C AFA2002C */ sw $v0, 0x002C($sp) -/* 000D0 80977F10 8FA3002C */ lw $v1, 0x002C($sp) -/* 000D4 80977F14 3C08DE00 */ lui $t0, 0xDE00 ## $t0 = DE000000 -/* 000D8 80977F18 3C0BD838 */ lui $t3, 0xD838 ## $t3 = D8380000 -/* 000DC 80977F1C AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 000E0 80977F20 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 000E4 80977F24 356B0002 */ ori $t3, $t3, 0x0002 ## $t3 = D8380002 -/* 000E8 80977F28 240C0040 */ addiu $t4, $zero, 0x0040 ## $t4 = 00000040 -/* 000EC 80977F2C 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 000F0 80977F30 AE1902C0 */ sw $t9, 0x02C0($s0) ## 000002C0 -/* 000F4 80977F34 AC480000 */ sw $t0, 0x0000($v0) ## 00000000 -/* 000F8 80977F38 8FA9004C */ lw $t1, 0x004C($sp) -/* 000FC 80977F3C 3C068098 */ lui $a2, %hi(D_80978644) ## $a2 = 80980000 -/* 00100 80977F40 24C68644 */ addiu $a2, $a2, %lo(D_80978644) ## $a2 = 80978644 -/* 00104 80977F44 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00108 80977F48 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 0010C 80977F4C 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 00110 80977F50 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00114 80977F54 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00118 80977F58 AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0 -/* 0011C 80977F5C 240700BC */ addiu $a3, $zero, 0x00BC ## $a3 = 000000BC -/* 00120 80977F60 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004 -/* 00124 80977F64 0C031AD5 */ jal func_800C6B54 -/* 00128 80977F68 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 0012C 80977F6C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00130 80977F70 8FB00018 */ lw $s0, 0x0018($sp) -/* 00134 80977F74 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 00138 80977F78 03E00008 */ jr $ra -/* 0013C 80977F7C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s deleted file mode 100644 index f30ee56636..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel func_809782A0 -/* 00460 809782A0 AFA50004 */ sw $a1, 0x0004($sp) -/* 00464 809782A4 8C820158 */ lw $v0, 0x0158($a0) ## 00000158 -/* 00468 809782A8 8483001C */ lh $v1, 0x001C($a0) ## 0000001C -/* 0046C 809782AC 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006 -/* 00470 809782B0 10400013 */ beq $v0, $zero, .L80978300 -/* 00474 809782B4 00000000 */ nop -/* 00478 809782B8 10610011 */ beq $v1, $at, .L80978300 -/* 0047C 809782BC 24010007 */ addiu $at, $zero, 0x0007 ## $at = 00000007 -/* 00480 809782C0 1061000F */ beq $v1, $at, .L80978300 -/* 00484 809782C4 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -/* 00488 809782C8 1061000D */ beq $v1, $at, .L80978300 -/* 0048C 809782CC 00000000 */ nop -/* 00490 809782D0 C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024 -/* 00494 809782D4 C486015C */ lwc1 $f6, 0x015C($a0) ## 0000015C -/* 00498 809782D8 C4900160 */ lwc1 $f16, 0x0160($a0) ## 00000160 -/* 0049C 809782DC 46062200 */ add.s $f8, $f4, $f6 -/* 004A0 809782E0 C4860164 */ lwc1 $f6, 0x0164($a0) ## 00000164 -/* 004A4 809782E4 E4880024 */ swc1 $f8, 0x0024($a0) ## 00000024 -/* 004A8 809782E8 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028 -/* 004AC 809782EC 46105480 */ add.s $f18, $f10, $f16 -/* 004B0 809782F0 E4920028 */ swc1 $f18, 0x0028($a0) ## 00000028 -/* 004B4 809782F4 C444002C */ lwc1 $f4, 0x002C($v0) ## 0000002C -/* 004B8 809782F8 46062200 */ add.s $f8, $f4, $f6 -/* 004BC 809782FC E488002C */ swc1 $f8, 0x002C($a0) ## 0000002C -.L80978300: -/* 004C0 80978300 03E00008 */ jr $ra -/* 004C4 80978304 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s deleted file mode 100644 index 22f7325187..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s +++ /dev/null @@ -1,40 +0,0 @@ -.rdata - -glabel D_80978680 - .asciz " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" - .balign 4 - -.text - -glabel func_80978370 -/* 00530 80978370 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00534 80978374 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00538 80978378 8486001C */ lh $a2, 0x001C($a0) ## 0000001C -/* 0053C 8097837C 3C028098 */ lui $v0, %hi(D_80978584) ## $v0 = 80980000 -/* 00540 80978380 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00544 80978384 00067080 */ sll $t6, $a2, 2 -/* 00548 80978388 004E1021 */ addu $v0, $v0, $t6 -/* 0054C 8097838C 8C428584 */ lw $v0, %lo(D_80978584)($v0) -/* 00550 80978390 3C048098 */ lui $a0, %hi(D_80978680) ## $a0 = 80980000 -/* 00554 80978394 24848680 */ addiu $a0, $a0, %lo(D_80978680) ## $a0 = 80978680 -/* 00558 80978398 14400008 */ bne $v0, $zero, .L809783BC -/* 0055C 8097839C 00000000 */ nop -/* 00560 809783A0 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 -/* 00564 809783A4 0C00084C */ jal osSyncPrintf - -/* 00568 809783A8 AFA70018 */ sw $a3, 0x0018($sp) -/* 0056C 809783AC 0C00B55C */ jal Actor_Kill - -/* 00570 809783B0 8FA40018 */ lw $a0, 0x0018($sp) -/* 00574 809783B4 10000004 */ beq $zero, $zero, .L809783C8 -/* 00578 809783B8 8FBF0014 */ lw $ra, 0x0014($sp) -.L809783BC: -/* 0057C 809783BC 0040F809 */ jalr $ra, $v0 -/* 00580 809783C0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00584 809783C4 8FBF0014 */ lw $ra, 0x0014($sp) -.L809783C8: -/* 00588 809783C8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0058C 809783CC 03E00008 */ jr $ra -/* 00590 809783D0 00000000 */ nop - - diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 828bcd08ae..5dea81cff0 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -56,35 +56,36 @@ void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { this->drawConfig = 0; } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977EA8.s") -/*void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { - GraphicsContext* gfxCtx = &globalCtx->state.gfxCtx; +void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + s16 pad; Gfx* gfxArr[4]; - func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 181); - func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_geff.c", 183), + func_800C6AC4(gfxArr, gfxCtx, "../z_demo_geff.c", 181); + func_80093D18(gfxCtx); + + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfxCtx->polyOpa.p++, dlist); gSPPopMatrix(gfxCtx->polyOpa.p++, G_MTX_MODELVIEW); - func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 188); -}*/ + func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 188); +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s") /*void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { + s32 unk_154 = this->unk_154; + s32 pad[2]; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + ObjectContext* objCtx = &globalCtx->objectCtx; Gfx* gfxArr[4]; func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 204); + + gSPSegment(gfxCtx->polyOpa.p++, 0x06, objCtx->status[unk_154].segment); + gSegments[6] = PHYSICAL_TO_VIRTUAL(objCtx->status[unk_154].segment); - temp_a0 = (arg1 + (this->unk_154 * 0x44)) + 0x10000; - - gSPSegment(gfxCtx->polyOpa.p++, 0x06, temp_a0->unk17B4), - - *(void *)0x80166FC0 = (s32) (temp_a0->unk17B4 + 0x80000000); - - func_800C6B54(gfxArr, &globalCtx->state.gfxCtx, "../z_demo_geff.c", 212); + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 212); }*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s") @@ -140,18 +141,18 @@ void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { } } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_809782A0.s") -/*void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { - s16 params; - if (this->unk_158 != 0) { - params = this->actor.params; +void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { + Actor* unk_158 = this->unk_158; + s16 params = this->actor.params; + if (unk_158 != NULL) { if ((params != 6) && (params != 7) && (params != 8)) { - this->actor.posRot.pos.x = this->unk_158->posRot.pos.x + this->unk_15C; - this->actor.posRot.pos.y = this->unk_158->posRot.pos.y + this->unk_160; - this->actor.posRot.pos.z = this->unk_158->posRot.pos.z + this->unk_164; + this->actor.posRot.pos.x = unk_158->posRot.pos.x + this->unk_15C; + this->actor.posRot.pos.y = unk_158->posRot.pos.y + this->unk_160; + this->actor.posRot.pos.z = unk_158->posRot.pos.z + this->unk_164; } - } -}*/ + } + +} void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { func_809781FC(this, globalCtx); @@ -163,17 +164,16 @@ void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { func_80977EA8(globalCtx, &D_06000EA0); } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978370.s") -/*void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { - Actor* thisx = &this->actor; - ActorFunc actorFunc = D_80978584[thisx->params]; +void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { + s16 params = this->actor.params; + ActorFunc actorFunc = D_80978584[params]; if (actorFunc == NULL) { - osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, thisx->params); - Actor_Kill(thisx); + osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params); + Actor_Kill(&this->actor); return; } actorFunc(this, globalCtx); -}*/ +} void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { ObjectContext* objCtx = &globalCtx->objectCtx; From 5f04911e0098b073fb4ce5eca6905bf4ac92ead8 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Sat, 21 Mar 2020 18:19:49 +0100 Subject: [PATCH 13/23] Add script to generate REG macros from GameInfo offsets Also removed `asmdiff-old.sh` that I believe is no longer used by anyone. --- tools/asmdiff-old.sh | 7 ------- tools/regconvert.py | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 tools/asmdiff-old.sh create mode 100644 tools/regconvert.py diff --git a/tools/asmdiff-old.sh b/tools/asmdiff-old.sh deleted file mode 100644 index 66b986662b..0000000000 --- a/tools/asmdiff-old.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -OBJDUMP="${MIPS_BINUTILS_PREFIX}objdump -D -bbinary -mmips -EB" -OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" -$OBJDUMP $OPTIONS baserom.z64 > baserom.dump -$OBJDUMP $OPTIONS zelda_ocarina_mq_dbg.z64 > zelda_ocarina_mq_dbg.dump -diff baserom.dump zelda_ocarina_mq_dbg.dump | colordiff diff --git a/tools/regconvert.py b/tools/regconvert.py new file mode 100644 index 0000000000..fdc1090b67 --- /dev/null +++ b/tools/regconvert.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import argparse + +GROUP_SIZE = 0x60 +DATA_OFFSET = 0x14 + +REGISTER_NAMES = " SOPQMYDUIZCNKXcsiWAVHGmnBdkb" + +def get_reg_macro(offset): + reg = (offset - DATA_OFFSET) // 2 + group = reg // GROUP_SIZE + reg_in_group = reg % GROUP_SIZE + return "%cREG(%d)\n" % (REGISTER_NAMES[group], reg_in_group) + +def main(): + parser = argparse.ArgumentParser(description="Converts a GameInfo offset to a REG macro.") + parser.add_argument("offset", help="offset to GameInfo in hexadecimal") + args = parser.parse_args() + print(get_reg_macro(int(args.offset, 16))) + +if __name__ == "__main__": + main() From ea882fb46d55916c60667fc73823a3437a7c8d40 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random0666@users.noreply.github.com> Date: Sat, 21 Mar 2020 19:09:05 +0100 Subject: [PATCH 14/23] Decompiled code_800ACE70.c `code_800ACE70` : OK --- asm/code_800ACE70.s | 121 -------------------------------------- data/code_800ACE70.data.s | 20 ------- include/variables.h | 4 -- spec | 3 +- src/code/code_800ACE70.c | 109 ++++++++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+), 147 deletions(-) delete mode 100644 asm/code_800ACE70.s delete mode 100644 data/code_800ACE70.data.s create mode 100644 src/code/code_800ACE70.c diff --git a/asm/code_800ACE70.s b/asm/code_800ACE70.s deleted file mode 100644 index 0aa384aba7..0000000000 --- a/asm/code_800ACE70.s +++ /dev/null @@ -1,121 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .text - -.align 4 - -glabel func_800ACE70 -/* B24010 800ACE70 240200FF */ li $v0, 255 -/* B24014 800ACE74 AC800000 */ sw $zero, ($a0) -/* B24018 800ACE78 AC800004 */ sw $zero, 4($a0) -/* B2401C 800ACE7C A0820008 */ sb $v0, 8($a0) -/* B24020 800ACE80 A0820009 */ sb $v0, 9($a0) -/* B24024 800ACE84 A082000A */ sb $v0, 0xa($a0) -/* B24028 800ACE88 03E00008 */ jr $ra -/* B2402C 800ACE8C A082000B */ sb $v0, 0xb($a0) - -glabel func_800ACE90 -/* B24030 800ACE90 03E00008 */ jr $ra -/* B24034 800ACE94 AFA40000 */ sw $a0, ($sp) - -glabel func_800ACE98 -/* B24038 800ACE98 8CA20000 */ lw $v0, ($a1) -/* B2403C 800ACE9C 00803025 */ move $a2, $a0 -/* B24040 800ACEA0 3C03E700 */ lui $v1, 0xe700 -/* B24044 800ACEA4 00402025 */ move $a0, $v0 -/* B24048 800ACEA8 AC830000 */ sw $v1, ($a0) -/* B2404C 800ACEAC AC800004 */ sw $zero, 4($a0) -/* B24050 800ACEB0 24420008 */ addiu $v0, $v0, 8 -/* B24054 800ACEB4 00402025 */ move $a0, $v0 -/* B24058 800ACEB8 3C0EEE00 */ lui $t6, 0xee00 -/* B2405C 800ACEBC 240FFFFF */ li $t7, -1 -/* B24060 800ACEC0 AC8F0004 */ sw $t7, 4($a0) -/* B24064 800ACEC4 AC8E0000 */ sw $t6, ($a0) -/* B24068 800ACEC8 8CD80004 */ lw $t8, 4($a2) -/* B2406C 800ACECC 24420008 */ addiu $v0, $v0, 8 -/* B24070 800ACED0 24070001 */ li $a3, 1 -/* B24074 800ACED4 14F80007 */ bne $a3, $t8, .L800ACEF4 -/* B24078 800ACED8 00402025 */ move $a0, $v0 -/* B2407C 800ACEDC 3C080050 */ lui $t0, (0x005003C0 >> 16) # lui $t0, 0x50 -/* B24080 800ACEE0 350803C0 */ ori $t0, (0x005003C0 & 0xFFFF) # ori $t0, $t0, 0x3c0 -/* B24084 800ACEE4 3C19ED00 */ lui $t9, 0xed00 -/* B24088 800ACEE8 AC990000 */ sw $t9, ($a0) -/* B2408C 800ACEEC AC880004 */ sw $t0, 4($a0) -/* B24090 800ACEF0 24420008 */ addiu $v0, $v0, 8 -.L800ACEF4: -/* B24094 800ACEF4 8CC40000 */ lw $a0, ($a2) -/* B24098 800ACEF8 3C0A8013 */ lui $t2, %hi(D_8012AC40) # $t2, 0x8013 -/* B2409C 800ACEFC 254AAC40 */ addiu $t2, %lo(D_8012AC40) # addiu $t2, $t2, -0x53c0 -/* B240A0 800ACF00 1087000C */ beq $a0, $a3, .L800ACF34 -/* B240A4 800ACF04 3C09DE00 */ lui $t1, 0xde00 -/* B240A8 800ACF08 24010002 */ li $at, 2 -/* B240AC 800ACF0C 1081000E */ beq $a0, $at, .L800ACF48 -/* B240B0 800ACF10 3C0BFA00 */ lui $t3, 0xfa00 -/* B240B4 800ACF14 24010003 */ li $at, 3 -/* B240B8 800ACF18 10810018 */ beq $a0, $at, .L800ACF7C -/* B240BC 800ACF1C 3C0FF900 */ lui $t7, 0xf900 -/* B240C0 800ACF20 24010004 */ li $at, 4 -/* B240C4 800ACF24 10810022 */ beq $a0, $at, .L800ACFB0 -/* B240C8 800ACF28 3C09F800 */ lui $t1, 0xf800 -/* B240CC 800ACF2C 1000002D */ b .L800ACFE4 -/* B240D0 800ACF30 00402025 */ move $a0, $v0 -.L800ACF34: -/* B240D4 800ACF34 00402025 */ move $a0, $v0 -/* B240D8 800ACF38 AC890000 */ sw $t1, ($a0) -/* B240DC 800ACF3C AC8A0004 */ sw $t2, 4($a0) -/* B240E0 800ACF40 10000027 */ b .L800ACFE0 -/* B240E4 800ACF44 24420008 */ addiu $v0, $v0, 8 -.L800ACF48: -/* B240E8 800ACF48 00402025 */ move $a0, $v0 -/* B240EC 800ACF4C AC8B0000 */ sw $t3, ($a0) -/* B240F0 800ACF50 8CCC0008 */ lw $t4, 8($a2) -/* B240F4 800ACF54 24420008 */ addiu $v0, $v0, 8 -/* B240F8 800ACF58 3C0E8013 */ lui $t6, %hi(D_8012AC58) # $t6, 0x8013 -/* B240FC 800ACF5C AC8C0004 */ sw $t4, 4($a0) -/* B24100 800ACF60 00402025 */ move $a0, $v0 -/* B24104 800ACF64 25CEAC58 */ addiu $t6, %lo(D_8012AC58) # addiu $t6, $t6, -0x53a8 -/* B24108 800ACF68 3C0DDE00 */ lui $t5, 0xde00 -/* B2410C 800ACF6C AC8D0000 */ sw $t5, ($a0) -/* B24110 800ACF70 AC8E0004 */ sw $t6, 4($a0) -/* B24114 800ACF74 1000001A */ b .L800ACFE0 -/* B24118 800ACF78 24420008 */ addiu $v0, $v0, 8 -.L800ACF7C: -/* B2411C 800ACF7C 00402025 */ move $a0, $v0 -/* B24120 800ACF80 AC8F0000 */ sw $t7, ($a0) -/* B24124 800ACF84 8CD80008 */ lw $t8, 8($a2) -/* B24128 800ACF88 24420008 */ addiu $v0, $v0, 8 -/* B2412C 800ACF8C 3C088013 */ lui $t0, %hi(D_8012AC00) # $t0, 0x8013 -/* B24130 800ACF90 AC980004 */ sw $t8, 4($a0) -/* B24134 800ACF94 00402025 */ move $a0, $v0 -/* B24138 800ACF98 2508AC00 */ addiu $t0, %lo(D_8012AC00) # addiu $t0, $t0, -0x5400 -/* B2413C 800ACF9C 3C19DE00 */ lui $t9, 0xde00 -/* B24140 800ACFA0 AC990000 */ sw $t9, ($a0) -/* B24144 800ACFA4 AC880004 */ sw $t0, 4($a0) -/* B24148 800ACFA8 1000000D */ b .L800ACFE0 -/* B2414C 800ACFAC 24420008 */ addiu $v0, $v0, 8 -.L800ACFB0: -/* B24150 800ACFB0 00402025 */ move $a0, $v0 -/* B24154 800ACFB4 AC890000 */ sw $t1, ($a0) -/* B24158 800ACFB8 8CCA0008 */ lw $t2, 8($a2) -/* B2415C 800ACFBC 24420008 */ addiu $v0, $v0, 8 -/* B24160 800ACFC0 3C0C8013 */ lui $t4, %hi(D_8012AC28) # $t4, 0x8013 -/* B24164 800ACFC4 AC8A0004 */ sw $t2, 4($a0) -/* B24168 800ACFC8 00402025 */ move $a0, $v0 -/* B2416C 800ACFCC 258CAC28 */ addiu $t4, %lo(D_8012AC28) # addiu $t4, $t4, -0x53d8 -/* B24170 800ACFD0 3C0BDE00 */ lui $t3, 0xde00 -/* B24174 800ACFD4 AC8B0000 */ sw $t3, ($a0) -/* B24178 800ACFD8 AC8C0004 */ sw $t4, 4($a0) -/* B2417C 800ACFDC 24420008 */ addiu $v0, $v0, 8 -.L800ACFE0: -/* B24180 800ACFE0 00402025 */ move $a0, $v0 -.L800ACFE4: -/* B24184 800ACFE4 AC830000 */ sw $v1, ($a0) -/* B24188 800ACFE8 AC800004 */ sw $zero, 4($a0) -/* B2418C 800ACFEC 24420008 */ addiu $v0, $v0, 8 -/* B24190 800ACFF0 03E00008 */ jr $ra -/* B24194 800ACFF4 ACA20000 */ sw $v0, ($a1) diff --git a/data/code_800ACE70.data.s b/data/code_800ACE70.data.s deleted file mode 100644 index f3e9e74c73..0000000000 --- a/data/code_800ACE70.data.s +++ /dev/null @@ -1,20 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .data - -glabel D_8012AC00 - .incbin "baserom.z64", 0xBA1DA0, 0x28 - -glabel D_8012AC28 - .incbin "baserom.z64", 0xBA1DC8, 0x18 - -glabel D_8012AC40 - .incbin "baserom.z64", 0xBA1DE0, 0x18 - -glabel D_8012AC58 - .incbin "baserom.z64", 0xBA1DF8, 0x38 diff --git a/include/variables.h b/include/variables.h index b12c078d56..64c5d20761 100644 --- a/include/variables.h +++ b/include/variables.h @@ -565,10 +565,6 @@ extern Scene gSceneTable[110]; extern u8 gLetterTLUT[4][32]; // original name: "moji_tlut" extern u8 gFontFF[]; // original name: "font_ff" //extern ? D_8012ABF0; -//extern ? D_8012AC00; -//extern ? D_8012AC28; -//extern ? D_8012AC40; -//extern ? D_8012AC58; //extern ? D_8012AC90; //extern ? D_8012ACA0; //extern ? D_8012AD20; diff --git a/spec b/spec index 8c6f404508..379b4b9f22 100644 --- a/spec +++ b/spec @@ -383,8 +383,7 @@ beginseg include "build/src/code/z_view.o" include "build/data/z_view.data.o" include "build/src/code/z_vimode.o" - include "build/asm/code_800ACE70.o" - include "build/data/code_800ACE70.data.o" + include "build/src/code/code_800ACE70.o" include "build/src/code/z_vismono.o" include "build/asm/code_800AD920.o" include "build/src/code/z_vr_box.o" diff --git a/src/code/code_800ACE70.c b/src/code/code_800ACE70.c new file mode 100644 index 0000000000..d7a50a1574 --- /dev/null +++ b/src/code/code_800ACE70.c @@ -0,0 +1,109 @@ +#include + +typedef struct +{ + /* 0x00 */ u32 type; + /* 0x04 */ u32 setScissor; + /* 0x08 */ union + { + Color_RGBA8 c; + u32 rgba; + } color; + /* 0x0C */ u32 unk_0C; +} struct_801664F0; + +Gwords D_8012AC00[] = +{ + gsDPSetOtherMode(0, G_RM_VISCVG | G_RM_VISCVG2 | G_ZS_PRIM), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), + gsDPPipeSync(), + gsDPSetBlendColor(0, 0, 0, 8), + gsSPEndDisplayList(), +}; + +Gwords D_8012AC28[] = +{ + gsDPSetOtherMode(0, GBL_c1(3, 1, 1, 1) | GBL_c2(3, 1, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), + gsSPEndDisplayList(), +}; + +Gwords D_8012AC40[] = +{ + gsDPSetOtherMode(0, GBL_c1(0, 3, 1, 1) | GBL_c2(0, 3, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), + gsSPEndDisplayList(), +}; + +Gwords D_8012AC58[] = +{ + gsDPSetCombineLERP(K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE), + gsDPSetOtherMode(G_CD_DISABLE | G_AD_NOTPATTERN, G_ZS_PRIM | IM_RD | CVG_DST_WRAP | CVG_DST_FULL | FORCE_BL | GBL_c1(0, 0, 1, 0) | GBL_c2(0, 0, 1, 0)), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), + gsDPSetOtherMode(0, GBL_c1(0, 3, 1, 1) | GBL_c2(0, 3, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), + gsSPEndDisplayList(), +}; + +//Init func +void func_800ACE70(struct_801664F0* this) +{ + this->type = 0; + this->setScissor = false; + this->color.c.r = 0xFF; + this->color.c.g = 0xFF; + this->color.c.b = 0xFF; + this->color.c.a = 0xFF; +} + +//Destroy func +void func_800ACE90(struct_801664F0* this) +{ + +} + +//Update func +void func_800ACE98(struct_801664F0* this, Gfx** gfxp) +{ + Gfx* gfx; + + gfx = *gfxp; + + gDPPipeSync(gfx++); + gDPSetPrimDepth(gfx++, -1, -1); + + if (this->setScissor == true) + { + gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + } + + switch(this->type) + { + case 1: + { + gSPDisplayList(gfx++, D_8012AC40); + break; + } + case 2: + { + gDPSetColor(gfx++, G_SETPRIMCOLOR, this->color.rgba); + gSPDisplayList(gfx++, D_8012AC58); + break; + } + case 3: + { + gDPSetColor(gfx++, G_SETBLENDCOLOR, this->color.rgba); + gSPDisplayList(gfx++, D_8012AC00); + break; + } + case 4: + { + gDPSetColor(gfx++, G_SETFOGCOLOR, this->color.rgba); + gSPDisplayList(gfx++, D_8012AC28); + break; + } + } + + gDPPipeSync(gfx++); + *gfxp = gfx; +} From 61a32a58207328678928785c54d9f0cfb69141f5 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 21 Mar 2020 14:27:58 -0400 Subject: [PATCH 15/23] 1 more down, slight documentation --- .../actors/ovl_Demo_Geff/func_80978030.s | 156 ------------------ include/variables.h | 2 +- .../actors/ovl_Demo_Geff/z_demo_geff.c | 84 +++++----- .../actors/ovl_Demo_Geff/z_demo_geff.h | 12 +- 4 files changed, 51 insertions(+), 203 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s deleted file mode 100644 index 55c2987535..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s +++ /dev/null @@ -1,156 +0,0 @@ -.late_rodata - -glabel jtbl_80978778 -.word L80978064 -.word L809780E0 -.word L8097816C -.word L80978064 -.word L809780E0 -.word L8097816C -.word L80978064 -.word L809780E0 -glabel D_80978798 - .float 0.01 -glabel D_8097879C - .float 0.3 -glabel D_809787A0 - .float 0.01 -glabel D_809787A4 - .float 0.15 -glabel D_809787A8 - .float 0.29 -glabel D_809787AC - .float 0.12 -glabel D_809787B0 - .float 0.01 -glabel D_809787B4 - .float 0.1 -glabel D_809787B8 - .float 0.15 -glabel D_809787BC - .float 0.2 - -.text - -glabel func_80978030 -/* 001F0 80978030 AFA50004 */ sw $a1, 0x0004($sp) -/* 001F4 80978034 948E001C */ lhu $t6, 0x001C($a0) ## 0000001C -/* 001F8 80978038 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 001FC 8097803C AC82014C */ sw $v0, 0x014C($a0) ## 0000014C -/* 00200 80978040 2DC10008 */ sltiu $at, $t6, 0x0008 -/* 00204 80978044 10200049 */ beq $at, $zero, .L8097816C -/* 00208 80978048 AC820150 */ sw $v0, 0x0150($a0) ## 00000150 -/* 0020C 8097804C 000E7080 */ sll $t6, $t6, 2 -/* 00210 80978050 3C018098 */ lui $at, %hi(jtbl_80978778) ## $at = 80980000 -/* 00214 80978054 002E0821 */ addu $at, $at, $t6 -/* 00218 80978058 8C2E8778 */ lw $t6, %lo(jtbl_80978778)($at) -/* 0021C 8097805C 01C00008 */ jr $t6 -/* 00220 80978060 00000000 */ nop -glabel L80978064 -.L80978064: -/* 00224 80978064 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 00228 80978068 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 -/* 0022C 8097806C 8C6F0000 */ lw $t7, 0x0000($v1) ## 8015FA90 -/* 00230 80978070 3C018098 */ lui $at, %hi(D_80978798) ## $at = 80980000 -/* 00234 80978074 C4208798 */ lwc1 $f0, %lo(D_80978798)($at) -/* 00238 80978078 85F81462 */ lh $t8, 0x1462($t7) ## 00001462 -/* 0023C 8097807C 3C018098 */ lui $at, %hi(D_8097879C) ## $at = 80980000 -/* 00240 80978080 C422879C */ lwc1 $f2, %lo(D_8097879C)($at) -/* 00244 80978084 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00 -/* 00248 80978088 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 -/* 0024C 8097808C 468021A0 */ cvt.s.w $f6, $f4 -/* 00250 80978090 46003202 */ mul.s $f8, $f6, $f0 -/* 00254 80978094 46024280 */ add.s $f10, $f8, $f2 -/* 00258 80978098 E44A0000 */ swc1 $f10, 0x0000($v0) ## 00000050 -/* 0025C 8097809C 8C790000 */ lw $t9, 0x0000($v1) ## 8015FA90 -/* 00260 809780A0 87281464 */ lh $t0, 0x1464($t9) ## 00001464 -/* 00264 809780A4 44888000 */ mtc1 $t0, $f16 ## $f16 = 0.00 -/* 00268 809780A8 00000000 */ nop -/* 0026C 809780AC 468084A0 */ cvt.s.w $f18, $f16 -/* 00270 809780B0 46009102 */ mul.s $f4, $f18, $f0 -/* 00274 809780B4 46022180 */ add.s $f6, $f4, $f2 -/* 00278 809780B8 E4460004 */ swc1 $f6, 0x0004($v0) ## 00000054 -/* 0027C 809780BC 8C690000 */ lw $t1, 0x0000($v1) ## 8015FA90 -/* 00280 809780C0 852A1466 */ lh $t2, 0x1466($t1) ## 00001466 -/* 00284 809780C4 448A4000 */ mtc1 $t2, $f8 ## $f8 = 0.00 -/* 00288 809780C8 00000000 */ nop -/* 0028C 809780CC 468042A0 */ cvt.s.w $f10, $f8 -/* 00290 809780D0 46005402 */ mul.s $f16, $f10, $f0 -/* 00294 809780D4 46028480 */ add.s $f18, $f16, $f2 -/* 00298 809780D8 03E00008 */ jr $ra -/* 0029C 809780DC E4520008 */ swc1 $f18, 0x0008($v0) ## 00000058 -glabel L809780E0 -.L809780E0: -/* 002A0 809780E0 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 002A4 809780E4 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 -/* 002A8 809780E8 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 -/* 002AC 809780EC 3C018098 */ lui $at, %hi(D_809787A0) ## $at = 80980000 -/* 002B0 809780F0 C42087A0 */ lwc1 $f0, %lo(D_809787A0)($at) -/* 002B4 809780F4 856C1468 */ lh $t4, 0x1468($t3) ## 00001468 -/* 002B8 809780F8 3C018098 */ lui $at, %hi(D_809787A4) ## $at = 80980000 -/* 002BC 809780FC C42A87A4 */ lwc1 $f10, %lo(D_809787A4)($at) -/* 002C0 80978100 448C2000 */ mtc1 $t4, $f4 ## $f4 = 0.00 -/* 002C4 80978104 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 -/* 002C8 80978108 3C018098 */ lui $at, %hi(D_809787A8) ## $at = 80980000 -/* 002CC 8097810C 468021A0 */ cvt.s.w $f6, $f4 -/* 002D0 80978110 46003202 */ mul.s $f8, $f6, $f0 -/* 002D4 80978114 460A4400 */ add.s $f16, $f8, $f10 -/* 002D8 80978118 E4500000 */ swc1 $f16, 0x0000($v0) ## 00000050 -/* 002DC 8097811C 8C6D0000 */ lw $t5, 0x0000($v1) ## 8015FA90 -/* 002E0 80978120 C42887A8 */ lwc1 $f8, %lo(D_809787A8)($at) -/* 002E4 80978124 3C018098 */ lui $at, %hi(D_809787AC) ## $at = 80980000 -/* 002E8 80978128 85AE146A */ lh $t6, 0x146A($t5) ## 0000146A -/* 002EC 8097812C 448E9000 */ mtc1 $t6, $f18 ## $f18 = 0.00 -/* 002F0 80978130 00000000 */ nop -/* 002F4 80978134 46809120 */ cvt.s.w $f4, $f18 -/* 002F8 80978138 46002182 */ mul.s $f6, $f4, $f0 -/* 002FC 8097813C 46083280 */ add.s $f10, $f6, $f8 -/* 00300 80978140 E44A0004 */ swc1 $f10, 0x0004($v0) ## 00000054 -/* 00304 80978144 8C6F0000 */ lw $t7, 0x0000($v1) ## 8015FA90 -/* 00308 80978148 C42687AC */ lwc1 $f6, %lo(D_809787AC)($at) -/* 0030C 8097814C 85F8146C */ lh $t8, 0x146C($t7) ## 0000146C -/* 00310 80978150 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 -/* 00314 80978154 00000000 */ nop -/* 00318 80978158 468084A0 */ cvt.s.w $f18, $f16 -/* 0031C 8097815C 46009102 */ mul.s $f4, $f18, $f0 -/* 00320 80978160 46062200 */ add.s $f8, $f4, $f6 -/* 00324 80978164 03E00008 */ jr $ra -/* 00328 80978168 E4480008 */ swc1 $f8, 0x0008($v0) ## 00000058 -glabel L8097816C -.L8097816C: -/* 0032C 8097816C 3C038016 */ lui $v1, 0x8016 ## $v1 = 80160000 -/* 00330 80978170 2463FA90 */ addiu $v1, $v1, 0xFA90 ## $v1 = 8015FA90 -/* 00334 80978174 8C790000 */ lw $t9, 0x0000($v1) ## 8015FA90 -/* 00338 80978178 3C018098 */ lui $at, %hi(D_809787B0) ## $at = 80980000 -/* 0033C 8097817C C42087B0 */ lwc1 $f0, %lo(D_809787B0)($at) -/* 00340 80978180 8728146E */ lh $t0, 0x146E($t9) ## 0000146E -/* 00344 80978184 3C018098 */ lui $at, %hi(D_809787B4) ## $at = 80980000 -/* 00348 80978188 C42487B4 */ lwc1 $f4, %lo(D_809787B4)($at) -/* 0034C 8097818C 44885000 */ mtc1 $t0, $f10 ## $f10 = 0.00 -/* 00350 80978190 24820050 */ addiu $v0, $a0, 0x0050 ## $v0 = 00000050 -/* 00354 80978194 3C018098 */ lui $at, %hi(D_809787B8) ## $at = 80980000 -/* 00358 80978198 46805420 */ cvt.s.w $f16, $f10 -/* 0035C 8097819C 46008482 */ mul.s $f18, $f16, $f0 -/* 00360 809781A0 46049180 */ add.s $f6, $f18, $f4 -/* 00364 809781A4 E4460000 */ swc1 $f6, 0x0000($v0) ## 00000050 -/* 00368 809781A8 8C690000 */ lw $t1, 0x0000($v1) ## 8015FA90 -/* 0036C 809781AC C43287B8 */ lwc1 $f18, %lo(D_809787B8)($at) -/* 00370 809781B0 3C018098 */ lui $at, %hi(D_809787BC) ## $at = 80980000 -/* 00374 809781B4 852A1470 */ lh $t2, 0x1470($t1) ## 00001470 -/* 00378 809781B8 448A4000 */ mtc1 $t2, $f8 ## $f8 = 0.00 -/* 0037C 809781BC 00000000 */ nop -/* 00380 809781C0 468042A0 */ cvt.s.w $f10, $f8 -/* 00384 809781C4 46005402 */ mul.s $f16, $f10, $f0 -/* 00388 809781C8 46128100 */ add.s $f4, $f16, $f18 -/* 0038C 809781CC E4440004 */ swc1 $f4, 0x0004($v0) ## 00000054 -/* 00390 809781D0 8C6B0000 */ lw $t3, 0x0000($v1) ## 8015FA90 -/* 00394 809781D4 C43087BC */ lwc1 $f16, %lo(D_809787BC)($at) -/* 00398 809781D8 856C1472 */ lh $t4, 0x1472($t3) ## 00001472 -/* 0039C 809781DC 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00 -/* 003A0 809781E0 00000000 */ nop -/* 003A4 809781E4 46803220 */ cvt.s.w $f8, $f6 -/* 003A8 809781E8 46004282 */ mul.s $f10, $f8, $f0 -/* 003AC 809781EC 46105480 */ add.s $f18, $f10, $f16 -/* 003B0 809781F0 E4520008 */ swc1 $f18, 0x0008($v0) ## 00000058 -/* 003B4 809781F4 03E00008 */ jr $ra -/* 003B8 809781F8 00000000 */ nop diff --git a/include/variables.h b/include/variables.h index b12c078d56..23a368f7f9 100644 --- a/include/variables.h +++ b/include/variables.h @@ -3473,7 +3473,7 @@ extern GlobalContext* D_80157DA0; extern SaveContext gSaveContext; // 0x8015E660 extern u32 D_8015FA88; extern u32 D_8015FA8C; -extern GameInfo* gGameInfo; +extern GameInfo* gGameInfo; // 0x8015FA90 //extern ? D_8015FA98; //extern ? D_8015FA9B; //extern ? D_8015FC18; diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 5dea81cff0..6366df2438 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -1,3 +1,9 @@ +/* + * File: z_demo_geff.c + * Overlay: Demo_Geff + * Description: +*/ + #include "z_demo_geff.h" #include @@ -10,7 +16,7 @@ void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx); void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx); -void func_80978030(DemoGeff* this, GlobalContext* globalCtx); +void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx); void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); void func_80978308(DemoGeff* this, GlobalContext* globalCtx); @@ -21,10 +27,11 @@ 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, OBJECT_UNSET_0, }; -ActorFunc D_80978584[] = { func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, func_80978030, - func_80978030, func_80978030, func_80978030, }; -ActorFunc actionFuncs[] = { func_809783D4, func_80978308, }; -ActorFunc drawFuncs[] = { func_809784D4, func_80978344, }; +ActorFunc scaleFuncs[] = { (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, + (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, + (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, }; +ActorFunc actionFuncs[] = { (ActorFunc)func_809783D4, (ActorFunc)func_80978308, }; +ActorFunc drawFuncs[] = { (ActorFunc)func_809784D4, (ActorFunc)func_80978344, }; const ActorInit Demo_Geff_InitVars = { @@ -74,34 +81,33 @@ void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s") /*void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { - s32 unk_154 = this->unk_154; s32 pad[2]; + s32 objBankIndex = this->objBankIndex; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - ObjectContext* objCtx = &globalCtx->objectCtx; + s16 pad2; Gfx* gfxArr[4]; - func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 204); + func_800C6AC4(gfxArr, gfxCtx, "../z_demo_geff.c", 204); - gSPSegment(gfxCtx->polyOpa.p++, 0x06, objCtx->status[unk_154].segment); - gSegments[6] = PHYSICAL_TO_VIRTUAL(objCtx->status[unk_154].segment); + gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); + gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment); - func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_geff.c", 212); + func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 212); }*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80978030.s") -/*void func_80978030(DemoGeff* this, GlobalContext* globalCtx) { +void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { Vec3f* thisScale = &this->actor.scale; this->action = 1; this->drawConfig = 1; - switch ((u16)this->actor.params) { - default: + switch (this->actor.params) { + case 0: + case 3: + case 6: thisScale->x = ((f32) kREG(7) * 0.01f) + 0.3f; thisScale->y = ((f32) kREG(8) * 0.01f) + 0.3f; thisScale->z = ((f32) kREG(9) * 0.01f) + 0.3f; break; - case 8: - break; case 1: case 4: case 7: @@ -109,55 +115,51 @@ void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { thisScale->y = ((f32) kREG(11) * 0.01f) + 0.29f; thisScale->z = ((f32) kREG(12) * 0.01f) + 0.12f; break; - case 2: - case 5: + default: thisScale->x = ((f32) kREG(13) * 0.01f) + 0.1f; thisScale->y = ((f32) kREG(14) * 0.01f) + 0.15f; thisScale->z = ((f32) kREG(15) * 0.01f) + 0.2f; break; } -}*/ +} void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { s32 targetParams = 2; - Actor* demoGt; + Actor* propIt; - if (this->unk_158 == 0) { - demoGt = globalCtx->actorCtx.actorList[ACTORTYPE_PROP].first; + if (this->demoGt == NULL) { + propIt = globalCtx->actorCtx.actorList[ACTORTYPE_PROP].first; if ((this->actor.params != 0) && (this->actor.params != 1) && (this->actor.params != 2)) { targetParams = 2; } else { targetParams = 1; } - while (demoGt != 0) { - if (demoGt->id == ACTOR_DEMO_GT && demoGt->params == targetParams) { - this->unk_15C = (this->actor.posRot.pos.x - demoGt->posRot.pos.x); - this->unk_160 = (this->actor.posRot.pos.y - demoGt->posRot.pos.y); - this->unk_164 = (this->actor.posRot.pos.z - demoGt->posRot.pos.z); - this->unk_158 = demoGt; + while (propIt != NULL) { + if (propIt->id == ACTOR_DEMO_GT && propIt->params == targetParams) { + this->deltaPosX = this->actor.posRot.pos.x - propIt->posRot.pos.x; + this->deltaPosY = this->actor.posRot.pos.y - propIt->posRot.pos.y; + this->deltaPosZ = this->actor.posRot.pos.z - propIt->posRot.pos.z; + this->demoGt = propIt; } - demoGt = demoGt->next; + propIt = propIt->next; } } } void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { - Actor* unk_158 = this->unk_158; + DemoGt* demoGt = this->demoGt; s16 params = this->actor.params; - if (unk_158 != NULL) { - if ((params != 6) && (params != 7) && (params != 8)) { - this->actor.posRot.pos.x = unk_158->posRot.pos.x + this->unk_15C; - this->actor.posRot.pos.y = unk_158->posRot.pos.y + this->unk_160; - this->actor.posRot.pos.z = unk_158->posRot.pos.z + this->unk_164; - } + if (demoGt != NULL && (params != 6) && (params != 7) && (params != 8)) { + this->actor.posRot.pos.x = demoGt->actor.posRot.pos.x + this->deltaPosX; + this->actor.posRot.pos.y = demoGt->actor.posRot.pos.y + this->deltaPosY; + this->actor.posRot.pos.z = demoGt->actor.posRot.pos.z + this->deltaPosZ; } - } void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { func_809781FC(this, globalCtx); func_809782A0(this, globalCtx); - func_80978030(this, globalCtx); + DemoGeff_SetScale(this, globalCtx); } void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { @@ -166,7 +168,7 @@ void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { s16 params = this->actor.params; - ActorFunc actorFunc = D_80978584[params]; + ActorFunc actorFunc = scaleFuncs[params]; if (actorFunc == NULL) { osSyncPrintf(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params); Actor_Kill(&this->actor); @@ -189,7 +191,7 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { return; } if (Object_IsLoaded(objCtx, objBankIndex)) { - this->unk_154 = objBankIndex; + this->objBankIndex = objBankIndex; func_80978370(this, globalCtx); } } diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h index cbe4527bff..68c10d6b53 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h @@ -4,16 +4,18 @@ #include #include +#include "../ovl_Demo_Gt/z_demo_gt.h" + typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ s32 action; /* 0x0150 */ s32 drawConfig; - /* 0x0154 */ s32 unk_154; - /* 0x0158 */ Actor* unk_158; - /* 0x015C */ f32 unk_15C; - /* 0x0160 */ f32 unk_160; - /* 0x0164 */ f32 unk_164; + /* 0x0154 */ s32 objBankIndex; + /* 0x0158 */ DemoGt* demoGt; + /* 0x015C */ f32 deltaPosX; + /* 0x0160 */ f32 deltaPosY; + /* 0x0164 */ f32 deltaPosZ; } DemoGeff; // size = 0x0168 extern const ActorInit Demo_Geff_InitVars; From f374ac8d2bea87dbfeb3fc263c2e654aa96be4c0 Mon Sep 17 00:00:00 2001 From: Lucas Shaw Date: Sat, 21 Mar 2020 11:54:45 -0700 Subject: [PATCH 16/23] started ovl_bg_toki_swd --- .../actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s | 2 +- ...unc_808BAE40.s => BgTokiSwd_SetupAction.s} | 2 +- .../actors/ovl_Bg_Toki_Swd/func_808BAF40.s | 2 +- .../actors/ovl_Bg_Toki_Swd/func_808BB0AC.s | 2 +- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 130 ++++++++++++++++-- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h | 3 +- undefined_syms.txt | 5 +- 7 files changed, 131 insertions(+), 15 deletions(-) rename asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/{func_808BAE40.s => BgTokiSwd_SetupAction.s} (83%) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s index b1e064bbbb..6f6709d681 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s @@ -13,7 +13,7 @@ glabel BgTokiSwd_Init /* 00030 808BAE70 3C05808C */ lui $a1, %hi(func_808BAF40) ## $a1 = 808C0000 /* 00034 808BAE74 24A5AF40 */ addiu $a1, $a1, %lo(func_808BAF40) ## $a1 = 808BAF40 /* 00038 808BAE78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0003C 808BAE7C 0C22EB90 */ jal func_808BAE40 +/* 0003C 808BAE7C 0C22EB90 */ jal BgTokiSwd_SetupAction /* 00040 808BAE80 E60400BC */ swc1 $f4, 0x00BC($s0) ## 000000BC /* 00044 808BAE84 3C028016 */ lui $v0, 0x8016 ## $v0 = 80160000 /* 00048 808BAE88 2442E660 */ addiu $v0, $v0, 0xE660 ## $v0 = 8015E660 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAE40.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s similarity index 83% rename from asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAE40.s rename to asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s index cf2c1d0e52..9d8f50b116 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAE40.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s @@ -1,4 +1,4 @@ -glabel func_808BAE40 +glabel BgTokiSwd_SetupAction /* 00000 808BAE40 03E00008 */ jr $ra /* 00004 808BAE44 AC85014C */ sw $a1, 0x014C($a0) ## 0000014C diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s index 9a2cf736a8..ce23b22d65 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s @@ -71,7 +71,7 @@ glabel func_808BAF40 /* 001F8 808BB038 A2191414 */ sb $t9, 0x1414($s0) ## 8015FA74 /* 001FC 808BB03C 3C05808C */ lui $a1, %hi(func_808BB0AC) ## $a1 = 808C0000 /* 00200 808BB040 24A5B0AC */ addiu $a1, $a1, %lo(func_808BB0AC) ## $a1 = 808BB0AC -/* 00204 808BB044 0C22EB90 */ jal func_808BAE40 +/* 00204 808BB044 0C22EB90 */ jal BgTokiSwd_SetupAction /* 00208 808BB048 AC800118 */ sw $zero, 0x0118($a0) ## 00000118 /* 0020C 808BB04C 10000008 */ beq $zero, $zero, .L808BB070 /* 00210 808BB050 8E081360 */ lw $t0, 0x1360($s0) ## 8015F9C0 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s index 714956b3c3..1a0c1c6d90 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s @@ -22,7 +22,7 @@ glabel func_808BB0AC /* 002B4 808BB0F4 AC8F0134 */ sw $t7, 0x0134($a0) ## 00000134 .L808BB0F8: /* 002B8 808BB0F8 3C05808C */ lui $a1, %hi(func_808BB128) ## $a1 = 808C0000 -/* 002BC 808BB0FC 0C22EB90 */ jal func_808BAE40 +/* 002BC 808BB0FC 0C22EB90 */ jal BgTokiSwd_SetupAction /* 002C0 808BB100 24A5B128 */ addiu $a1, $a1, %lo(func_808BB128) ## $a1 = 808BB128 /* 002C4 808BB104 10000005 */ beq $zero, $zero, .L808BB11C /* 002C8 808BB108 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 4b75128177..57823bf2e0 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -7,7 +7,8 @@ void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx); void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx); void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx); void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx); - +void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx); +void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx); /* const ActorInit Bg_Toki_Swd_InitVars = { @@ -23,18 +24,129 @@ const ActorInit Bg_Toki_Swd_InitVars = (ActorFunc)BgTokiSwd_Draw, }; */ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAE40.s") +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s") +void BgTokiSwd_SetupAction(BgTokiSwd* this, ActorFunc actionFunc) +{ + this->actionFunc = actionFunc; +} +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s") +extern InitChainEntry D_808BC414; +extern ColliderCylinderInit D_808BC3E0; +extern SubActor98Init D_808BC40C; +void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx) +{ + ColliderCylinderMain* collision; + Actor* thisx = &this->actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s") + Actor_ProcessInitChain(thisx, &D_808BC414); + this->actor.shape.unk_08 = 800.0f; + BgTokiSwd_SetupAction(thisx, &func_808BAF40); + collision = &this->collider; + if (LINK_IS_ADULT) + { + thisx->draw = NULL; + } + if (gSaveContext.scene_setup_index == 5) + { + globalCtx->unk_11D30[0] = 0xFF; + } + ActorCollider_AllocCylinder(globalCtx, collision); + ActorCollider_InitCylinder(globalCtx, collision, thisx, &D_808BC3E0); + ActorCollider_Cylinder_Update(thisx, collision); + func_80061ED4(&thisx->sub_98, 0, &D_808BC40C); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s") +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s") +void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx) +{ + ColliderCylinderMain* collider = &this->collider; + ActorCollider_FreeCylinder(globalCtx, collider); +} +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s") +extern D_808BBD90; +extern D_808BB2F0; +extern D_808BB7A0; +void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) +{ + if (((gSaveContext.event_chk_inf[4] & 0x8000) == 0) && (gSaveContext.scene_setup_index < 4) && + (func_8002E12C(&this->actor, 800.0f, 0x7530) != 0) && (func_800BFC84(globalCtx) == 0)) + { + gSaveContext.event_chk_inf[4] |= 0x8000; + globalCtx->csCtx.segment = &D_808BBD90; + gSaveContext.cutscene_trigger = 1; + } + if (LINK_IS_CHILD || ((gSaveContext.event_chk_inf[5] & 0x20) != 0)) + { + if (func_8002F410(&this->actor, globalCtx) != 0) + { + if (LINK_IS_CHILD) + { + Item_Give(globalCtx, 0x3C); + globalCtx->csCtx.segment = &D_808BB2F0; + } + else + { + globalCtx->csCtx.segment = &D_808BB7A0; + } + Audio_SetBGM(NA_BGM_STOP); + Audio_SetBGM(NA_SE_PL_BOUND_DIRT); + gSaveContext.cutscene_trigger = (u8)1; + this->actor.attachedA = 0; + BgTokiSwd_SetupAction(this, &func_808BB0AC); + } + else + { + if (func_8002E084(&this->actor, 0x2000) != 0) + { + func_8002F580(&this->actor, globalCtx); + } + } + } + if (gSaveContext.scene_setup_index == 5) + { + if (globalCtx->unk_11D30[0] > 0) + { + globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] - 1; + return; + } + globalCtx->unk_11D30[0] = 0; + } +} #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s") +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s") +void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) +{ + if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) + { + globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] + 5; + } +} +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s") +void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx) +{ + this->actionFunc(&this->actor, globalCtx); + Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); +} +//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s") +extern char D_808BC420[]; +extern char D_808BC434[]; +extern D_06001BD0; +extern char D_808BC448[]; +void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx) { + Gfx* gfxArr[7]; + GraphicsContext* gfxCtx; + + + gfxCtx = globalCtx->state.gfxCtx; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s") + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, &D_808BC420, 0x2D7); + func_80093D18(globalCtx->state.gfxCtx); + func_8002EBCC(&this->actor, globalCtx, 0); + gSPSegment(gfxCtx->polyOpa.p++, 0x08, Draw_TexScroll(globalCtx->state.gfxCtx, 0, -(globalCtx->gameplayFrames & 0x7F), 0x20, 0x20)); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, D_808BC434, 0x2E6), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(gfxCtx->polyOpa.p++, &D_06001BD0); + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, D_808BC448, 0x308); +} diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h index 535268eb27..efc0f885d6 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h @@ -7,7 +7,8 @@ typedef struct { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x50]; + /* 0x014C */ ActorFunc actionFunc; + /* 0x0150 */ ColliderCylinderMain collider; } BgTokiSwd; // size = 0x019C extern const ActorInit Bg_Toki_Swd_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index 92837d0b73..0d5822881d 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -394,4 +394,7 @@ D_06008688 = 0x06008688; D_04049210 = 0x04049210; // z_obj_bombiwa -D_060009E0 = 0x060009E0; \ No newline at end of file +D_060009E0 = 0x060009E0; + +// z_bg_toki_swd +D_06001BD0 = 0x06001BD0; \ No newline at end of file From ec8889dc63ebcf89d63360cf078570f2b166f7c4 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random0666@users.noreply.github.com> Date: Sat, 21 Mar 2020 21:40:18 +0100 Subject: [PATCH 17/23] Changes in PR #19 - Replaced old `gsDPSetOtherMode`s with gfxdis' output - Replaced `Gwords` with `Gfx` --- src/code/code_800ACE70.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/src/code/code_800ACE70.c b/src/code/code_800ACE70.c index d7a50a1574..9f606cffac 100644 --- a/src/code/code_800ACE70.c +++ b/src/code/code_800ACE70.c @@ -12,35 +12,57 @@ typedef struct /* 0x0C */ u32 unk_0C; } struct_801664F0; -Gwords D_8012AC00[] = +Gfx D_8012AC00[] = { - gsDPSetOtherMode(0, G_RM_VISCVG | G_RM_VISCVG2 | G_ZS_PRIM), + gsDPSetOtherMode( + G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | + G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + G_AC_NONE | G_ZS_PRIM | G_RM_VISCVG | G_RM_VISCVG2), gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), gsDPPipeSync(), gsDPSetBlendColor(0, 0, 0, 8), gsSPEndDisplayList(), }; -Gwords D_8012AC28[] = +Gfx D_8012AC28[] = { - gsDPSetOtherMode(0, GBL_c1(3, 1, 1, 1) | GBL_c2(3, 1, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPSetOtherMode( + G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | + G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | + GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG,G_BL_CLR_MEM, G_BL_A_MEM) | + GBL_c2(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM)), gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), gsSPEndDisplayList(), }; -Gwords D_8012AC40[] = +Gfx D_8012AC40[] = { - gsDPSetOtherMode(0, GBL_c1(0, 3, 1, 1) | GBL_c2(0, 3, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPSetOtherMode( + G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | + G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | + GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) | + GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)), + gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), gsSPEndDisplayList(), }; -Gwords D_8012AC58[] = +Gfx D_8012AC58[] = { gsDPSetCombineLERP(K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE), - gsDPSetOtherMode(G_CD_DISABLE | G_AD_NOTPATTERN, G_ZS_PRIM | IM_RD | CVG_DST_WRAP | CVG_DST_FULL | FORCE_BL | GBL_c1(0, 0, 1, 0) | GBL_c2(0, 0, 1, 0)), + gsDPSetOtherMode( + G_AD_NOTPATTERN | G_CD_DISABLE | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | + G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + G_AC_NONE | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2), gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), - gsDPSetOtherMode(0, GBL_c1(0, 3, 1, 1) | GBL_c2(0, 3, 1, 1) | IM_RD | FORCE_BL | G_ZS_PRIM), + gsDPSetOtherMode( + G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | + G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | + GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) | + GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)), gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1), gsSPEndDisplayList(), }; From 9a04a762969dc486f2280d89555fc71d57f57969 Mon Sep 17 00:00:00 2001 From: shawlucas Date: Sat, 21 Mar 2020 14:30:05 -0700 Subject: [PATCH 18/23] ovl_bg_toki_swd OK --- .../ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s | 14 - .../actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s | 77 ---- .../actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s | 61 --- .../ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s | 5 - .../actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s | 22 - .../actors/ovl_Bg_Toki_Swd/func_808BAF40.s | 106 ----- .../actors/ovl_Bg_Toki_Swd/func_808BB0AC.s | 39 -- .../actors/ovl_Bg_Toki_Swd/func_808BB128.s | 26 -- data/overlays/actors/z_bg_toki_swd.data.s | 28 -- data/overlays/actors/z_bg_toki_swd.reloc.s | 11 - data/overlays/actors/z_bg_toki_swd.rodata.s | 23 - spec | 4 +- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 433 ++++++++++++++++-- 13 files changed, 385 insertions(+), 464 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s delete mode 100644 data/overlays/actors/z_bg_toki_swd.data.s delete mode 100644 data/overlays/actors/z_bg_toki_swd.reloc.s delete mode 100644 data/overlays/actors/z_bg_toki_swd.rodata.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s deleted file mode 100644 index 00f28795cd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel BgTokiSwd_Destroy -/* 000D8 808BAF18 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 000DC 808BAF1C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 000E0 808BAF20 AFBF0014 */ sw $ra, 0x0014($sp) -/* 000E4 808BAF24 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 000E8 808BAF28 0C0170EB */ jal ActorCollider_FreeCylinder - -/* 000EC 808BAF2C 24C50150 */ addiu $a1, $a2, 0x0150 ## $a1 = 00000150 -/* 000F0 808BAF30 8FBF0014 */ lw $ra, 0x0014($sp) -/* 000F4 808BAF34 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 000F8 808BAF38 03E00008 */ jr $ra -/* 000FC 808BAF3C 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s deleted file mode 100644 index 32b688400d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s +++ /dev/null @@ -1,77 +0,0 @@ -glabel BgTokiSwd_Draw -/* 00384 808BB1C4 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0 -/* 00388 808BB1C8 AFB0001C */ sw $s0, 0x001C($sp) -/* 0038C 808BB1CC 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00390 808BB1D0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00394 808BB1D4 AFB10020 */ sw $s1, 0x0020($sp) -/* 00398 808BB1D8 AFA40060 */ sw $a0, 0x0060($sp) -/* 0039C 808BB1DC 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 003A0 808BB1E0 3C06808C */ lui $a2, %hi(D_808BC420) ## $a2 = 808C0000 -/* 003A4 808BB1E4 24C6C420 */ addiu $a2, $a2, %lo(D_808BC420) ## $a2 = 808BC420 -/* 003A8 808BB1E8 27A40038 */ addiu $a0, $sp, 0x0038 ## $a0 = FFFFFFD8 -/* 003AC 808BB1EC 240702D7 */ addiu $a3, $zero, 0x02D7 ## $a3 = 000002D7 -/* 003B0 808BB1F0 0C031AB1 */ jal func_800C6AC4 -/* 003B4 808BB1F4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 003B8 808BB1F8 0C024F46 */ jal func_80093D18 -/* 003BC 808BB1FC 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 003C0 808BB200 8FA40060 */ lw $a0, 0x0060($sp) -/* 003C4 808BB204 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 003C8 808BB208 0C00BAF3 */ jal func_8002EBCC -/* 003CC 808BB20C 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 003D0 808BB210 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 003D4 808BB214 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000 -/* 003D8 808BB218 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020 -/* 003DC 808BB21C 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008 -/* 003E0 808BB220 AE2E02C0 */ sw $t6, 0x02C0($s1) ## 000002C0 -/* 003E4 808BB224 3C060001 */ lui $a2, 0x0001 ## $a2 = 00010000 -/* 003E8 808BB228 00D03021 */ addu $a2, $a2, $s0 -/* 003EC 808BB22C AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 003F0 808BB230 8CC61DE4 */ lw $a2, 0x1DE4($a2) ## 00011DE4 -/* 003F4 808BB234 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 003F8 808BB238 24180020 */ addiu $t8, $zero, 0x0020 ## $t8 = 00000020 -/* 003FC 808BB23C 30C6007F */ andi $a2, $a2, 0x007F ## $a2 = 00000000 -/* 00400 808BB240 00063023 */ subu $a2, $zero, $a2 -/* 00404 808BB244 AFB80010 */ sw $t8, 0x0010($sp) -/* 00408 808BB248 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 0040C 808BB24C 24070020 */ addiu $a3, $zero, 0x0020 ## $a3 = 00000020 -/* 00410 808BB250 0C0253A7 */ jal Draw_TexScroll -/* 00414 808BB254 AFA20034 */ sw $v0, 0x0034($sp) -/* 00418 808BB258 8FA30034 */ lw $v1, 0x0034($sp) -/* 0041C 808BB25C 3C08DA38 */ lui $t0, 0xDA38 ## $t0 = DA380000 -/* 00420 808BB260 35080003 */ ori $t0, $t0, 0x0003 ## $t0 = DA380003 -/* 00424 808BB264 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00428 808BB268 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 0042C 808BB26C 3C05808C */ lui $a1, %hi(D_808BC434) ## $a1 = 808C0000 -/* 00430 808BB270 24A5C434 */ addiu $a1, $a1, %lo(D_808BC434) ## $a1 = 808BC434 -/* 00434 808BB274 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 00438 808BB278 AE3902C0 */ sw $t9, 0x02C0($s1) ## 000002C0 -/* 0043C 808BB27C AC480000 */ sw $t0, 0x0000($v0) ## 00000000 -/* 00440 808BB280 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 00444 808BB284 240602E6 */ addiu $a2, $zero, 0x02E6 ## $a2 = 000002E6 -/* 00448 808BB288 0C0346A2 */ jal Matrix_NewMtx -/* 0044C 808BB28C AFA20030 */ sw $v0, 0x0030($sp) -/* 00450 808BB290 8FA30030 */ lw $v1, 0x0030($sp) -/* 00454 808BB294 3C0B0600 */ lui $t3, 0x0600 ## $t3 = 06000000 -/* 00458 808BB298 256B1BD0 */ addiu $t3, $t3, 0x1BD0 ## $t3 = 06001BD0 -/* 0045C 808BB29C AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00460 808BB2A0 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00464 808BB2A4 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000 -/* 00468 808BB2A8 3C06808C */ lui $a2, %hi(D_808BC448) ## $a2 = 808C0000 -/* 0046C 808BB2AC 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 00470 808BB2B0 AE2902C0 */ sw $t1, 0x02C0($s1) ## 000002C0 -/* 00474 808BB2B4 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004 -/* 00478 808BB2B8 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 0047C 808BB2BC 8E050000 */ lw $a1, 0x0000($s0) ## 00000000 -/* 00480 808BB2C0 24C6C448 */ addiu $a2, $a2, %lo(D_808BC448) ## $a2 = 808BC448 -/* 00484 808BB2C4 27A40038 */ addiu $a0, $sp, 0x0038 ## $a0 = FFFFFFD8 -/* 00488 808BB2C8 0C031AD5 */ jal func_800C6B54 -/* 0048C 808BB2CC 24070308 */ addiu $a3, $zero, 0x0308 ## $a3 = 00000308 -/* 00490 808BB2D0 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00494 808BB2D4 8FB0001C */ lw $s0, 0x001C($sp) -/* 00498 808BB2D8 8FB10020 */ lw $s1, 0x0020($sp) -/* 0049C 808BB2DC 03E00008 */ jr $ra -/* 004A0 808BB2E0 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000 -/* 004A4 808BB2E4 00000000 */ nop -/* 004A8 808BB2E8 00000000 */ nop -/* 004AC 808BB2EC 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s deleted file mode 100644 index 6f6709d681..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s +++ /dev/null @@ -1,61 +0,0 @@ -glabel BgTokiSwd_Init -/* 00008 808BAE48 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 0000C 808BAE4C AFA50034 */ sw $a1, 0x0034($sp) -/* 00010 808BAE50 AFBF001C */ sw $ra, 0x001C($sp) -/* 00014 808BAE54 AFB00018 */ sw $s0, 0x0018($sp) -/* 00018 808BAE58 3C05808C */ lui $a1, %hi(D_808BC414) ## $a1 = 808C0000 -/* 0001C 808BAE5C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00020 808BAE60 0C01E037 */ jal Actor_ProcessInitChain - -/* 00024 808BAE64 24A5C414 */ addiu $a1, $a1, %lo(D_808BC414) ## $a1 = 808BC414 -/* 00028 808BAE68 3C014448 */ lui $at, 0x4448 ## $at = 44480000 -/* 0002C 808BAE6C 44812000 */ mtc1 $at, $f4 ## $f4 = 800.00 -/* 00030 808BAE70 3C05808C */ lui $a1, %hi(func_808BAF40) ## $a1 = 808C0000 -/* 00034 808BAE74 24A5AF40 */ addiu $a1, $a1, %lo(func_808BAF40) ## $a1 = 808BAF40 -/* 00038 808BAE78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0003C 808BAE7C 0C22EB90 */ jal BgTokiSwd_SetupAction -/* 00040 808BAE80 E60400BC */ swc1 $f4, 0x00BC($s0) ## 000000BC -/* 00044 808BAE84 3C028016 */ lui $v0, 0x8016 ## $v0 = 80160000 -/* 00048 808BAE88 2442E660 */ addiu $v0, $v0, 0xE660 ## $v0 = 8015E660 -/* 0004C 808BAE8C 8C4E0004 */ lw $t6, 0x0004($v0) ## 8015E664 -/* 00050 808BAE90 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150 -/* 00054 808BAE94 55C00003 */ bnel $t6, $zero, .L808BAEA4 -/* 00058 808BAE98 8C4F1360 */ lw $t7, 0x1360($v0) ## 8015F9C0 -/* 0005C 808BAE9C AE000134 */ sw $zero, 0x0134($s0) ## 00000134 -/* 00060 808BAEA0 8C4F1360 */ lw $t7, 0x1360($v0) ## 8015F9C0 -.L808BAEA4: -/* 00064 808BAEA4 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 00068 808BAEA8 8FB90034 */ lw $t9, 0x0034($sp) -/* 0006C 808BAEAC 15E10004 */ bne $t7, $at, .L808BAEC0 -/* 00070 808BAEB0 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00074 808BAEB4 00390821 */ addu $at, $at, $t9 -/* 00078 808BAEB8 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF -/* 0007C 808BAEBC A4381D30 */ sh $t8, 0x1D30($at) ## 00011D30 -.L808BAEC0: -/* 00080 808BAEC0 8FA40034 */ lw $a0, 0x0034($sp) -/* 00084 808BAEC4 0C0170D9 */ jal ActorCollider_AllocCylinder - -/* 00088 808BAEC8 AFA50024 */ sw $a1, 0x0024($sp) -/* 0008C 808BAECC 3C07808C */ lui $a3, %hi(D_808BC3E0) ## $a3 = 808C0000 -/* 00090 808BAED0 24E7C3E0 */ addiu $a3, $a3, %lo(D_808BC3E0) ## $a3 = 808BC3E0 -/* 00094 808BAED4 8FA40034 */ lw $a0, 0x0034($sp) -/* 00098 808BAED8 8FA50024 */ lw $a1, 0x0024($sp) -/* 0009C 808BAEDC 0C01712B */ jal ActorCollider_InitCylinder - -/* 000A0 808BAEE0 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 000A4 808BAEE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000A8 808BAEE8 0C0189B7 */ jal ActorCollider_Cylinder_Update - -/* 000AC 808BAEEC 8FA50024 */ lw $a1, 0x0024($sp) -/* 000B0 808BAEF0 3C06808C */ lui $a2, %hi(D_808BC40C) ## $a2 = 808C0000 -/* 000B4 808BAEF4 24C6C40C */ addiu $a2, $a2, %lo(D_808BC40C) ## $a2 = 808BC40C -/* 000B8 808BAEF8 26040098 */ addiu $a0, $s0, 0x0098 ## $a0 = 00000098 -/* 000BC 808BAEFC 0C0187B5 */ jal func_80061ED4 -/* 000C0 808BAF00 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 000C4 808BAF04 8FBF001C */ lw $ra, 0x001C($sp) -/* 000C8 808BAF08 8FB00018 */ lw $s0, 0x0018($sp) -/* 000CC 808BAF0C 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 000D0 808BAF10 03E00008 */ jr $ra -/* 000D4 808BAF14 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s deleted file mode 100644 index 9d8f50b116..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s +++ /dev/null @@ -1,5 +0,0 @@ -glabel BgTokiSwd_SetupAction -/* 00000 808BAE40 03E00008 */ jr $ra -/* 00004 808BAE44 AC85014C */ sw $a1, 0x014C($a0) ## 0000014C - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s deleted file mode 100644 index 48df28b486..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel BgTokiSwd_Update -/* 0033C 808BB17C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00340 808BB180 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00344 808BB184 AFA5001C */ sw $a1, 0x001C($sp) -/* 00348 808BB188 AFA40018 */ sw $a0, 0x0018($sp) -/* 0034C 808BB18C 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C -/* 00350 808BB190 0320F809 */ jalr $ra, $t9 -/* 00354 808BB194 00000000 */ nop -/* 00358 808BB198 8FA4001C */ lw $a0, 0x001C($sp) -/* 0035C 808BB19C 8FA70018 */ lw $a3, 0x0018($sp) -/* 00360 808BB1A0 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00364 808BB1A4 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00368 808BB1A8 00812821 */ addu $a1, $a0, $at -/* 0036C 808BB1AC 0C017713 */ jal Actor_CollisionCheck_SetOT - ## CollisionCheck_setOT -/* 00370 808BB1B0 24E60150 */ addiu $a2, $a3, 0x0150 ## $a2 = 00000150 -/* 00374 808BB1B4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00378 808BB1B8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0037C 808BB1BC 03E00008 */ jr $ra -/* 00380 808BB1C0 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s deleted file mode 100644 index ce23b22d65..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s +++ /dev/null @@ -1,106 +0,0 @@ -glabel func_808BAF40 -/* 00100 808BAF40 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00104 808BAF44 AFB00014 */ sw $s0, 0x0014($sp) -/* 00108 808BAF48 3C108016 */ lui $s0, 0x8016 ## $s0 = 80160000 -/* 0010C 808BAF4C 2610E660 */ addiu $s0, $s0, 0xE660 ## $s0 = 8015E660 -/* 00110 808BAF50 960E0EDC */ lhu $t6, 0x0EDC($s0) ## 8015F53C -/* 00114 808BAF54 AFB10018 */ sw $s1, 0x0018($sp) -/* 00118 808BAF58 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 0011C 808BAF5C 31CF8000 */ andi $t7, $t6, 0x8000 ## $t7 = 00000000 -/* 00120 808BAF60 AFBF001C */ sw $ra, 0x001C($sp) -/* 00124 808BAF64 15E00015 */ bne $t7, $zero, .L808BAFBC -/* 00128 808BAF68 AFA40020 */ sw $a0, 0x0020($sp) -/* 0012C 808BAF6C 8E181360 */ lw $t8, 0x1360($s0) ## 8015F9C0 -/* 00130 808BAF70 3C054448 */ lui $a1, 0x4448 ## $a1 = 44480000 -/* 00134 808BAF74 2B010004 */ slti $at, $t8, 0x0004 -/* 00138 808BAF78 50200011 */ beql $at, $zero, .L808BAFC0 -/* 0013C 808BAF7C 8E0B0004 */ lw $t3, 0x0004($s0) ## 8015E664 -/* 00140 808BAF80 0C00B84B */ jal func_8002E12C -/* 00144 808BAF84 24067530 */ addiu $a2, $zero, 0x7530 ## $a2 = 00007530 -/* 00148 808BAF88 5040000D */ beql $v0, $zero, .L808BAFC0 -/* 0014C 808BAF8C 8E0B0004 */ lw $t3, 0x0004($s0) ## 8015E664 -/* 00150 808BAF90 0C02FF21 */ jal func_800BFC84 -/* 00154 808BAF94 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00158 808BAF98 14400008 */ bne $v0, $zero, .L808BAFBC -/* 0015C 808BAF9C 3C09808C */ lui $t1, %hi(D_808BBD90) ## $t1 = 808C0000 -/* 00160 808BAFA0 96190EDC */ lhu $t9, 0x0EDC($s0) ## 8015F53C -/* 00164 808BAFA4 2529BD90 */ addiu $t1, $t1, %lo(D_808BBD90) ## $t1 = 808BBD90 -/* 00168 808BAFA8 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 0016C 808BAFAC 37288000 */ ori $t0, $t9, 0x8000 ## $t0 = 00008000 -/* 00170 808BAFB0 A6080EDC */ sh $t0, 0x0EDC($s0) ## 8015F53C -/* 00174 808BAFB4 AE291D68 */ sw $t1, 0x1D68($s1) ## 00001D68 -/* 00178 808BAFB8 A20A1414 */ sb $t2, 0x1414($s0) ## 8015FA74 -.L808BAFBC: -/* 0017C 808BAFBC 8E0B0004 */ lw $t3, 0x0004($s0) ## 8015E664 -.L808BAFC0: -/* 00180 808BAFC0 8FA40020 */ lw $a0, 0x0020($sp) -/* 00184 808BAFC4 15600005 */ bne $t3, $zero, .L808BAFDC -/* 00188 808BAFC8 00000000 */ nop -/* 0018C 808BAFCC 960C0EDE */ lhu $t4, 0x0EDE($s0) ## 8015F53E -/* 00190 808BAFD0 318D0020 */ andi $t5, $t4, 0x0020 ## $t5 = 00000000 -/* 00194 808BAFD4 51A00026 */ beql $t5, $zero, .L808BB070 -/* 00198 808BAFD8 8E081360 */ lw $t0, 0x1360($s0) ## 8015F9C0 -.L808BAFDC: -/* 0019C 808BAFDC 0C00BD04 */ jal func_8002F410 -/* 001A0 808BAFE0 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 001A4 808BAFE4 1040001B */ beq $v0, $zero, .L808BB054 -/* 001A8 808BAFE8 8FA40020 */ lw $a0, 0x0020($sp) -/* 001AC 808BAFEC 8E0E0004 */ lw $t6, 0x0004($s0) ## 8015E664 -/* 001B0 808BAFF0 3C18808C */ lui $t8, %hi(D_808BB7A0) ## $t8 = 808C0000 -/* 001B4 808BAFF4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 001B8 808BAFF8 11C00007 */ beq $t6, $zero, .L808BB018 -/* 001BC 808BAFFC 2718B7A0 */ addiu $t8, $t8, %lo(D_808BB7A0) ## $t8 = 808BB7A0 -/* 001C0 808BB000 0C021344 */ jal Item_Give -/* 001C4 808BB004 2405003C */ addiu $a1, $zero, 0x003C ## $a1 = 0000003C -/* 001C8 808BB008 3C0F808C */ lui $t7, %hi(D_808BB2F0) ## $t7 = 808C0000 -/* 001CC 808BB00C 25EFB2F0 */ addiu $t7, $t7, %lo(D_808BB2F0) ## $t7 = 808BB2F0 -/* 001D0 808BB010 10000002 */ beq $zero, $zero, .L808BB01C -/* 001D4 808BB014 AE2F1D68 */ sw $t7, 0x1D68($s1) ## 00001D68 -.L808BB018: -/* 001D8 808BB018 AE381D68 */ sw $t8, 0x1D68($s1) ## 00001D68 -.L808BB01C: -/* 001DC 808BB01C 3C041000 */ lui $a0, 0x1000 ## $a0 = 10000000 -/* 001E0 808BB020 0C03E803 */ jal Audio_SetBGM - -/* 001E4 808BB024 348400FF */ ori $a0, $a0, 0x00FF ## $a0 = 100000FF -/* 001E8 808BB028 0C03E803 */ jal Audio_SetBGM - -/* 001EC 808BB02C 24040053 */ addiu $a0, $zero, 0x0053 ## $a0 = 00000053 -/* 001F0 808BB030 8FA40020 */ lw $a0, 0x0020($sp) -/* 001F4 808BB034 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 001F8 808BB038 A2191414 */ sb $t9, 0x1414($s0) ## 8015FA74 -/* 001FC 808BB03C 3C05808C */ lui $a1, %hi(func_808BB0AC) ## $a1 = 808C0000 -/* 00200 808BB040 24A5B0AC */ addiu $a1, $a1, %lo(func_808BB0AC) ## $a1 = 808BB0AC -/* 00204 808BB044 0C22EB90 */ jal BgTokiSwd_SetupAction -/* 00208 808BB048 AC800118 */ sw $zero, 0x0118($a0) ## 00000118 -/* 0020C 808BB04C 10000008 */ beq $zero, $zero, .L808BB070 -/* 00210 808BB050 8E081360 */ lw $t0, 0x1360($s0) ## 8015F9C0 -.L808BB054: -/* 00214 808BB054 0C00B821 */ jal func_8002E084 -/* 00218 808BB058 24052000 */ addiu $a1, $zero, 0x2000 ## $a1 = 00002000 -/* 0021C 808BB05C 10400003 */ beq $v0, $zero, .L808BB06C -/* 00220 808BB060 8FA40020 */ lw $a0, 0x0020($sp) -/* 00224 808BB064 0C00BD60 */ jal func_8002F580 -/* 00228 808BB068 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -.L808BB06C: -/* 0022C 808BB06C 8E081360 */ lw $t0, 0x1360($s0) ## 8015F9C0 -.L808BB070: -/* 00230 808BB070 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 00234 808BB074 15010008 */ bne $t0, $at, .L808BB098 -/* 00238 808BB078 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0023C 808BB07C 02211021 */ addu $v0, $s1, $at -/* 00240 808BB080 84431D30 */ lh $v1, 0x1D30($v0) ## 00001D30 -/* 00244 808BB084 18600003 */ blez $v1, .L808BB094 -/* 00248 808BB088 2469FFFF */ addiu $t1, $v1, 0xFFFF ## $t1 = FFFFFFFF -/* 0024C 808BB08C 10000002 */ beq $zero, $zero, .L808BB098 -/* 00250 808BB090 A4491D30 */ sh $t1, 0x1D30($v0) ## 00001D30 -.L808BB094: -/* 00254 808BB094 A4401D30 */ sh $zero, 0x1D30($v0) ## 00001D30 -.L808BB098: -/* 00258 808BB098 8FBF001C */ lw $ra, 0x001C($sp) -/* 0025C 808BB09C 8FB00014 */ lw $s0, 0x0014($sp) -/* 00260 808BB0A0 8FB10018 */ lw $s1, 0x0018($sp) -/* 00264 808BB0A4 03E00008 */ jr $ra -/* 00268 808BB0A8 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s deleted file mode 100644 index 1a0c1c6d90..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s +++ /dev/null @@ -1,39 +0,0 @@ -glabel func_808BB0AC -/* 0026C 808BB0AC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00270 808BB0B0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00274 808BB0B4 AFA5001C */ sw $a1, 0x001C($sp) -/* 00278 808BB0B8 0C00BD04 */ jal func_8002F410 -/* 0027C 808BB0BC AFA40018 */ sw $a0, 0x0018($sp) -/* 00280 808BB0C0 10400012 */ beq $v0, $zero, .L808BB10C -/* 00284 808BB0C4 8FA40018 */ lw $a0, 0x0018($sp) -/* 00288 808BB0C8 3C0E8016 */ lui $t6, 0x8016 ## $t6 = 80160000 -/* 0028C 808BB0CC 8DCEE664 */ lw $t6, -0x199C($t6) ## 8015E664 -/* 00290 808BB0D0 3C0F808C */ lui $t7, %hi(BgTokiSwd_Draw) ## $t7 = 808C0000 -/* 00294 808BB0D4 2405182D */ addiu $a1, $zero, 0x182D ## $a1 = 0000182D -/* 00298 808BB0D8 11C00006 */ beq $t6, $zero, .L808BB0F4 -/* 0029C 808BB0DC 25EFB1C4 */ addiu $t7, $t7, %lo(BgTokiSwd_Draw) ## $t7 = 808BB1C4 -/* 002A0 808BB0E0 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 002A4 808BB0E4 AFA40018 */ sw $a0, 0x0018($sp) -/* 002A8 808BB0E8 8FA40018 */ lw $a0, 0x0018($sp) -/* 002AC 808BB0EC 10000002 */ beq $zero, $zero, .L808BB0F8 -/* 002B0 808BB0F0 AC800134 */ sw $zero, 0x0134($a0) ## 00000134 -.L808BB0F4: -/* 002B4 808BB0F4 AC8F0134 */ sw $t7, 0x0134($a0) ## 00000134 -.L808BB0F8: -/* 002B8 808BB0F8 3C05808C */ lui $a1, %hi(func_808BB128) ## $a1 = 808C0000 -/* 002BC 808BB0FC 0C22EB90 */ jal BgTokiSwd_SetupAction -/* 002C0 808BB100 24A5B128 */ addiu $a1, $a1, %lo(func_808BB128) ## $a1 = 808BB128 -/* 002C4 808BB104 10000005 */ beq $zero, $zero, .L808BB11C -/* 002C8 808BB108 8FBF0014 */ lw $ra, 0x0014($sp) -.L808BB10C: -/* 002CC 808BB10C 8FB8001C */ lw $t8, 0x001C($sp) -/* 002D0 808BB110 8F021C44 */ lw $v0, 0x1C44($t8) ## 00001C44 -/* 002D4 808BB114 AC440438 */ sw $a0, 0x0438($v0) ## 00000438 -/* 002D8 808BB118 8FBF0014 */ lw $ra, 0x0014($sp) -.L808BB11C: -/* 002DC 808BB11C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 002E0 808BB120 03E00008 */ jr $ra -/* 002E4 808BB124 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s b/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s deleted file mode 100644 index 11b8e59c4e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_808BB128 -/* 002E8 808BB128 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 002EC 808BB12C AFA40018 */ sw $a0, 0x0018($sp) -/* 002F0 808BB130 AFBF0014 */ sw $ra, 0x0014($sp) -/* 002F4 808BB134 AFA5001C */ sw $a1, 0x001C($sp) -/* 002F8 808BB138 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 002FC 808BB13C 0C01B129 */ jal func_8006C4A4 -/* 00300 808BB140 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00304 808BB144 5040000A */ beql $v0, $zero, .L808BB170 -/* 00308 808BB148 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0030C 808BB14C 8FA2001C */ lw $v0, 0x001C($sp) -/* 00310 808BB150 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00314 808BB154 00411021 */ addu $v0, $v0, $at -/* 00318 808BB158 84431D30 */ lh $v1, 0x1D30($v0) ## 00001D30 -/* 0031C 808BB15C 286100FF */ slti $at, $v1, 0x00FF -/* 00320 808BB160 10200002 */ beq $at, $zero, .L808BB16C -/* 00324 808BB164 246E0005 */ addiu $t6, $v1, 0x0005 ## $t6 = 00000005 -/* 00328 808BB168 A44E1D30 */ sh $t6, 0x1D30($v0) ## 00001D30 -.L808BB16C: -/* 0032C 808BB16C 8FBF0014 */ lw $ra, 0x0014($sp) -.L808BB170: -/* 00330 808BB170 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00334 808BB174 03E00008 */ jr $ra -/* 00338 808BB178 00000000 */ nop - - diff --git a/data/overlays/actors/z_bg_toki_swd.data.s b/data/overlays/actors/z_bg_toki_swd.data.s deleted file mode 100644 index cce1248200..0000000000 --- a/data/overlays/actors/z_bg_toki_swd.data.s +++ /dev/null @@ -1,28 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .data - -glabel D_808BB2F0 - .word 0x00000009, 0x000001A9, 0x0000000A, 0x00000001, 0x000C0000, 0x01000000, 0x00000000, 0x00000000, 0x00000036, 0x00000034, 0x00000000, 0x00000036, 0x00000034, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x0002006E, 0x006F0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x000A006E, 0x006F0000, 0x00000000, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x00000000, 0x00000000, 0x000003E8, 0x00000001, 0x000800E6, 0x00E700E7, 0x0000002D, 0x00000001, 0x000100D2, 0x00E600E6, 0x00000001, 0x00010000, 0x00F10000, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD9018C, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD9019D, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD901AE, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD902A8, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD90000, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD9007A, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD90064, 0x00000000, 0x42700000, 0xFFD60048, 0xFFD90074, 0xFF000000, 0x42700000, 0xFFD60048, 0xFFD9005F, 0x00000001, 0x00010050, 0x01960000, 0x00000000, 0x42700000, 0xFFFF005F, 0xFFED2F73, 0x00000000, 0x42700000, 0xFFFF005F, 0xFFED6B2F, 0x00000000, 0x42700000, 0xFFFF005F, 0xFFED6169, 0x00000000, 0x42700000, 0xFFFF005F, 0xFFED0000, 0x00000000, 0x42700000, 0xFFFF005F, 0xFFED0005, 0x00000000, 0x42700000, 0xFFFF0081, 0xFFDE7961, 0x00000000, 0x42700000, 0xFFFF00AD, 0xFFED742F, 0x00000000, 0x42700000, 0xFFEF00D9, 0xFFEC2E64, 0x00000000, 0x42700000, 0xFFE80148, 0xFFF40000, 0x00000000, 0x42700000, 0xFFE501FD, 0xFFFE2F73, 0x00000000, 0x42700000, 0xFFD7032D, 0x000A6B2F, 0x00000000, 0x42700000, 0xFFC40505, 0x00266D61, 0x00000000, 0x42700000, 0xFFC60776, 0x005B0000, 0x00000000, 0x42700000, 0xFFCB09DE, 0x00850005, 0x00000000, 0x42700000, 0xFFDF0D75, 0x00C17961, 0x00000000, 0x42700000, 0x00000F78, 0x00E1742F, 0x00000000, 0x42700000, 0x000710DD, 0x00F56565, 0x00000000, 0x42700000, 0x000710DC, 0x00F50000, 0x00000000, 0x42700000, 0x000710DC, 0x00F52F73, 0xFF000000, 0x42700000, 0x000710DC, 0x00F56B2F, 0x00000002, 0x00010000, 0x010E0000, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF72F73, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF76B2F, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF76169, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF70000, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF70005, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF77961, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF7742F, 0x0000001E, 0x42700000, 0xFFEC0055, 0xFFF72E64, 0xFF00001E, 0x42700000, 0xFFEC0055, 0xFFF70000, 0x00000002, 0x00010050, 0x01A90000, 0x00000005, 0x42700000, 0xFFFF0070, 0x00072F73, 0x00000005, 0x42700000, 0xFFFF0070, 0x00076B2F, 0x00000005, 0x42700000, 0xFFFF0070, 0x00076169, 0x00000005, 0x42700000, 0xFFFF0070, 0x00070000, 0x0000000F, 0x42700000, 0xFFFF0070, 0x00070005, 0x00000014, 0x42700000, 0xFFFF0075, 0x00077961, 0x00000019, 0x42700000, 0xFFFF0075, 0x0007742F, 0x00000019, 0x42700000, 0xFFFF0075, 0x00072E64, 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, 0x00000014, 0x42700000, 0xFFFF0075, 0x00072F73, 0x00000014, 0x42700000, 0xFFFF0075, 0x00076B2F, 0x00000014, 0x42700000, 0xFFFF0075, 0x00076D61, 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, 0x00000014, 0x42700000, 0xFFFF0075, 0x00070005, 0x00000014, 0x42700000, 0xFFFF0075, 0x00077961, 0x00000014, 0x42700000, 0xFFFF0075, 0x0007742F, 0x00000014, 0x42700000, 0xFFFF0075, 0x00076565, 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, 0x00000014, 0x42700000, 0xFFFF0075, 0x00072F73, 0xFF000014, 0x42700000, 0xFFFF0075, 0x00076B2F, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000 -glabel D_808BB7A0 - .word 0x00000009, 0x00000170, 0x00000001, 0x00010000, 0x007E0000, 0x00000000, 0x42700000, 0xFFFF0065, 0xFF92616D, 0x00000000, 0x42200000, 0xFFFF0065, 0xFF926964, 0x00000000, 0x42200000, 0xFFFF0065, 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0065, 0xFF920111, 0x00000000, 0x42200000, 0xFFFF0065, 0xFF93012D, 0x00000000, 0x42200000, 0xFFFF0047, 0xFF920033, 0x00000000, 0x42200000, 0xFFFF0048, 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0048, 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0048, 0xFF922F68, 0xFF000000, 0x42200000, 0xFFFF0048, 0xFF92612F, 0x00000001, 0x0001003A, 0x01530000, 0x00000000, 0x42700001, 0xFFF7006A, 0xFFFDA1BC, 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5F3, 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5EB, 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5A2, 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBBAEE, 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBC9B8, 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCB0020, 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBA5A4, 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCB0020, 0x00000000, 0x42700000, 0xFFAD0066, 0xFFD6A5E1, 0x00000000, 0x42700000, 0xFF8C0051, 0xFFEDA5D0, 0x00000000, 0x42700000, 0xFF8A0051, 0x00360020, 0x00000000, 0x42700000, 0xFF96004E, 0x0074A5A6, 0x00000000, 0x42700000, 0xFFE5004B, 0x00E2A5E5, 0x00000000, 0x42700000, 0x00790052, 0x0138C0AE, 0x00000000, 0x42700000, 0x0128004C, 0x0176A5E5, 0x00000000, 0x42700000, 0x02350050, 0x01010020, 0x00000000, 0x42700000, 0x02660050, 0xFFFFA5EB, 0x00000000, 0x42700000, 0x02520050, 0xFF6FA5E1, 0x00000000, 0x42700000, 0x01DB0050, 0xFE840020, 0x00000000, 0x42700000, 0x01430050, 0xFDFFA5E1, 0x00000000, 0x42700000, 0x00C00050, 0xFDC2A5D0, 0x00000000, 0x42700000, 0xFFD30050, 0xFDA40020, 0x00000000, 0x42700000, 0xFF720050, 0xFDB3A5A6, 0x00000000, 0x42700000, 0xFF1C0050, 0xFDCEA5E5, 0x00000000, 0x42700000, 0xFE88005D, 0xFE23C0AE, 0x00000000, 0x42700000, 0xFDB8005F, 0xFF49A5E5, 0x00000000, 0x42700000, 0xFD9B005F, 0xFFDE0020, 0xFF000000, 0x42700000, 0xFDAD005F, 0x00A1A5EB, 0x00000002, 0x00010000, 0x009B0000, 0x00000005, 0x4221999A, 0xFFFF006F, 0x0005A1BC, 0x00000005, 0x42200000, 0xFFFF006F, 0x0005A5F3, 0x00000005, 0x42200000, 0xFFFF006F, 0x0005A5EB, 0x0000000F, 0x42200000, 0xFFFF006F, 0x0005A5A2, 0x0000000F, 0x42200000, 0xFFFF006F, 0x0005BAEE, 0x0000000F, 0x42200000, 0xFFFF0068, 0x0008C9B8, 0x00000005, 0x42200000, 0xFFFF0068, 0x00080020, 0x0000001E, 0x42200000, 0xFFFF0068, 0x0008A5A4, 0x0000001E, 0x42200000, 0xFFFF0068, 0x00080020, 0xFF00001E, 0x42200000, 0xFFFF0068, 0x0008A5E1, 0x00000002, 0x0001003A, 0x01700000, 0x00000005, 0x42700001, 0x00000078, 0x000CA1BC, 0x00000005, 0x42700000, 0x00000078, 0x000CA5F3, 0x00000005, 0x42700000, 0x00000078, 0x000CA5EB, 0x0000000A, 0x42700000, 0x00000078, 0x000CA5A2, 0x00000005, 0x42700000, 0xFFFF005F, 0x000BBAEE, 0x00000005, 0x42700000, 0xFFFF005F, 0x000BC9B8, 0x00000005, 0x42700000, 0xFFFF005F, 0x000B0020, 0x00000005, 0x42700000, 0xFFFF005F, 0x000BA5A4, 0x00000005, 0x42700000, 0xFFFF005F, 0x000B0020, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5E1, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5D0, 0x0000000A, 0x42700000, 0xFFFD005F, 0x00080020, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5A6, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5E5, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008C0AE, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5E5, 0x0000000A, 0x42700000, 0xFFFD005F, 0x00080020, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5EB, 0x0000000A, 0x42700000, 0xFFFD005F, 0x0008A5E1, 0x0000000A, 0x42700000, 0xFFFD005F, 0x00080020, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008A5E1, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008A5D0, 0x0000000F, 0x42700000, 0xFFFD005F, 0x00080020, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008A5A6, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008A5E5, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008C0AE, 0x0000000F, 0x42700000, 0xFFFD005F, 0x0008A5E5, 0x0000000F, 0x42700000, 0xFFFD005F, 0x00080020, 0xFF00001E, 0x42700000, 0xFFFD005F, 0x0008A5EB, 0x0000000A, 0x00000001, 0x000C0000, 0x00B40000, 0x00000000, 0x00000000, 0x0000001C, 0xFFFFFFF6, 0x00000000, 0xFFFFFFF2, 0x00000009, 0x00000000, 0xBE6EEEEF, 0x00000000, 0x00000004, 0x00000001, 0x0002005A, 0x005B0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x000A005A, 0x005B0000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0x00000000, 0x00000000, 0x0000002D, 0x00000001, 0x000100BE, 0x00D200D2, 0x000003E8, 0x00000001, 0x000800D2, 0x00D300D3, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000 -glabel D_808BBD90 - .word 0x0000000B, 0x00000BB8, 0x00000021, 0x00000001, 0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x0000000A, 0x00000003, 0x00050000, 0x00010000, 0x80000000, 0x00000000, 0x00000000, 0x00000334, 0x00000000, 0x00000000, 0x00000334, 0x00000000, 0x00000000, 0x00000001, 0x00020001, 0x00100000, 0x80000000, 0x00000000, 0x00000000, 0x00000334, 0x00000000, 0x00000000, 0x000002D0, 0x00000000, 0x00000000, 0x00000001, 0x00050010, 0x00B00000, 0x80000000, 0x00000000, 0x00000000, 0x000002D0, 0x00000000, 0x00000000, 0x000002D0, 0x00000000, 0x00000000, 0x00000001, 0x0000003E, 0x00000003, 0x00040028, 0x00467D74, 0x00000000, 0xFFFFFFFF, 0x00000031, 0x000002CF, 0x00000001, 0x0000002F, 0x000002AF, 0x3D888889, 0xBD888889, 0xBD888889, 0x00040046, 0x00DC8010, 0x00000000, 0x00000001, 0x0000002F, 0x000002AF, 0x00000000, 0x00000086, 0x00000015, 0xBBDA740E, 0x3F147AE1, 0x3BDA740E, 0x000200DC, 0x01108000, 0x00000000, 0x00000000, 0x00000086, 0x00000015, 0x00000000, 0x00000065, 0x00000002, 0x00000000, 0xBF227627, 0x00000000, 0x00000003, 0x00000001, 0x000C0154, 0x01550000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, 0x00000000, 0x00000000, 0x00000000, 0x00000013, 0x00000006, 0xFFFF0000, 0x0032FFFF, 0xFFFFFFFF, 0x70E60032, 0x003C0000, 0x00000000, 0xFFFF003C, 0x00FAFFFF, 0xFFFFFFFF, 0x70E700FA, 0x01040000, 0x00000000, 0xFFFF0104, 0x0122FFFF, 0xFFFFFFFF, 0x70E80122, 0x01400000, 0x00000000, 0x00000001, 0x00010000, 0x00FB0000, 0x00000000, 0x42700000, 0xFFC5000C, 0x02B20222, 0x00000000, 0x42700000, 0xFFC5000C, 0x02B200FA, 0x00000000, 0x42700000, 0xFFC5000C, 0x02B20000, 0x00000000, 0x42700000, 0xFFC5000C, 0x02B20000, 0x00000000, 0x42700000, 0xFFC5000C, 0x02B20000, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD2D70, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD0085, 0x00000000, 0x42700000, 0xFFE10018, 0x02BD01E6, 0xFF000000, 0x42700000, 0xFFE10018, 0x02BD0000, 0x00000001, 0x0001005A, 0x014B0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0222, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC00FA, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, 0xFF000000, 0x42700000, 0xFF66005C, 0x00EC2D70, 0x00000001, 0x000100DC, 0x01EB0000, 0x00000000, 0x42700001, 0xFFFE007A, 0x00270222, 0x00000000, 0x42700001, 0xFFFE007A, 0x002700FA, 0x00000000, 0x42700001, 0xFFFE0066, 0x00270000, 0x00000000, 0x42700001, 0xFFFE005A, 0x00270000, 0x00000000, 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, 0x42700001, 0xFFFE0051, 0x003E2D70, 0xFF000000, 0x42700001, 0xFFFE0051, 0x003E0085, 0x00000002, 0x00010000, 0x01180000, 0x0000001E, 0x42700000, 0x002B0034, 0x02CC0222, 0x0000001E, 0x42700000, 0x002B0034, 0x02CC00FA, 0x0000000A, 0x42700000, 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, 0x003F0056, 0x02D22D70, 0x0000001E, 0x42700000, 0x003F0055, 0x02D10085, 0x0000001E, 0x42700000, 0x003F0055, 0x02D101E6, 0xFF00001E, 0x42700000, 0x003E0055, 0x02D10000, 0x00000002, 0x0001005A, 0x01680000, 0x0000001E, 0x42700000, 0xFF970053, 0x016E0222, 0x0000001E, 0x42700000, 0xFF980053, 0x016C00FA, 0x0000001E, 0x42700000, 0xFFC10053, 0x01530000, 0x0000001E, 0x42700000, 0xFFF00063, 0x00FF0000, 0x0000001E, 0x42700000, 0xFFE2006F, 0x00B10000, 0x0000001E, 0x42700000, 0xFFB00070, 0x00790000, 0x0000001E, 0x42700000, 0xFFB00070, 0x00790000, 0x0000001E, 0x42700000, 0xFFB00070, 0x00790000, 0xFF00001E, 0x42700000, 0xFFB00070, 0x00792D70, 0x00000002, 0x000100DC, 0x02080000, 0x0000001E, 0x42700001, 0x00000089, 0xFFC90222, 0x0000001E, 0x42700001, 0x00000089, 0xFFC900FA, 0x0000001E, 0x42700001, 0x00000075, 0xFFC90000, 0x0000001E, 0x42700001, 0x00000069, 0xFFC90000, 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, 0x0000001E, 0x42700001, 0x00000062, 0xFFE12D70, 0xFF00001E, 0x42700001, 0x00000062, 0xFFE10085, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000 -glabel Bg_Toki_Swd_InitVars - .word 0x006C0600, 0x00000010, 0x005E0000, 0x0000019C -.word BgTokiSwd_Init -.word BgTokiSwd_Destroy -.word BgTokiSwd_Update -.word BgTokiSwd_Draw -glabel D_808BC3E0 - .word 0x0A000039, 0x12010000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x000A0046, 0x00000000, 0x00000000 -glabel D_808BC40C - .word 0x0A000023, 0x0064FF00 -glabel D_808BC414 - .word 0x48500019, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_toki_swd.reloc.s b/data/overlays/actors/z_bg_toki_swd.reloc.s deleted file mode 100644 index 11b803e8ca..0000000000 --- a/data/overlays/actors/z_bg_toki_swd.reloc.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata -glabel D_808BC460 - -.incbin "baserom/ovl_Bg_Toki_Swd", 0x1620, 0x000000A0 diff --git a/data/overlays/actors/z_bg_toki_swd.rodata.s b/data/overlays/actors/z_bg_toki_swd.rodata.s deleted file mode 100644 index 5d4e7c1725..0000000000 --- a/data/overlays/actors/z_bg_toki_swd.rodata.s +++ /dev/null @@ -1,23 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata - -glabel D_808BC420 - .asciz "../z_bg_toki_swd.c" - .balign 4 - -glabel D_808BC434 - .asciz "../z_bg_toki_swd.c" - .balign 4 - -glabel D_808BC448 - .asciz "../z_bg_toki_swd.c" - .balign 4 - -.balign 16 - diff --git a/spec b/spec index d3f55e9869..16f2923d2a 100644 --- a/spec +++ b/spec @@ -1595,9 +1595,7 @@ endseg beginseg name "ovl_Bg_Toki_Swd" include "build/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.o" - include "build/data/overlays/actors/z_bg_toki_swd.data.o" - include "build/data/overlays/actors/z_bg_toki_swd.rodata.o" - include "build/data/overlays/actors/z_bg_toki_swd.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 57823bf2e0..69384dded9 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -1,15 +1,306 @@ +/* + * File: z_bg_toki_swd.c + * Overlay: ovl_Bg_Toki_Swd + * Description: Master Sword (Contains Cutscenes) +*/ + #include "z_bg_toki_swd.h" #define ROOM 0x00 #define FLAGS 0x00000010 -void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx); -void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx); -void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx); -void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx); -void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx); -void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx); -/* +static void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx); +static void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx); +static void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx); +static void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx); +static void BgTokiSwd_SetupAction(BgTokiSwd* this, ActorFunc actionFunc); +static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx); +static void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx); +static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx); + +extern u32 D_06001BD0; + +static u32 D_808BB2F0[] = +{ + 0x00000009, 0x000001A9, 0x0000000A, 0x00000001, + 0x000C0000, 0x01000000, 0x00000000, 0x00000000, + 0x00000036, 0x00000034, 0x00000000, 0x00000036, + 0x00000034, 0x00000000, 0x00000000, 0x00000000, + 0x00000004, 0x00000001, 0x0002006E, 0x006F0000, + 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, + 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, + 0x000A006E, 0x006F0000, 0x00000000, 0x00000000, + 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x0000002E, + 0xFFFFFFE6, 0x00000000, 0x00000000, 0x00000000, + 0x000003E8, 0x00000001, 0x000800E6, 0x00E700E7, + 0x0000002D, 0x00000001, 0x000100D2, 0x00E600E6, + 0x00000001, 0x00010000, 0x00F10000, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD9018C, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD9019D, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD901AE, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD902A8, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD90000, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD9007A, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD90064, 0x00000000, + 0x42700000, 0xFFD60048, 0xFFD90074, 0xFF000000, + 0x42700000, 0xFFD60048, 0xFFD9005F, 0x00000001, + 0x00010050, 0x01960000, 0x00000000, 0x42700000, + 0xFFFF005F, 0xFFED2F73, 0x00000000, 0x42700000, + 0xFFFF005F, 0xFFED6B2F, 0x00000000, 0x42700000, + 0xFFFF005F, 0xFFED6169, 0x00000000, 0x42700000, + 0xFFFF005F, 0xFFED0000, 0x00000000, 0x42700000, + 0xFFFF005F, 0xFFED0005, 0x00000000, 0x42700000, + 0xFFFF0081, 0xFFDE7961, 0x00000000, 0x42700000, + 0xFFFF00AD, 0xFFED742F, 0x00000000, 0x42700000, + 0xFFEF00D9, 0xFFEC2E64, 0x00000000, 0x42700000, + 0xFFE80148, 0xFFF40000, 0x00000000, 0x42700000, + 0xFFE501FD, 0xFFFE2F73, 0x00000000, 0x42700000, + 0xFFD7032D, 0x000A6B2F, 0x00000000, 0x42700000, + 0xFFC40505, 0x00266D61, 0x00000000, 0x42700000, + 0xFFC60776, 0x005B0000, 0x00000000, 0x42700000, + 0xFFCB09DE, 0x00850005, 0x00000000, 0x42700000, + 0xFFDF0D75, 0x00C17961, 0x00000000, 0x42700000, + 0x00000F78, 0x00E1742F, 0x00000000, 0x42700000, + 0x000710DD, 0x00F56565, 0x00000000, 0x42700000, + 0x000710DC, 0x00F50000, 0x00000000, 0x42700000, + 0x000710DC, 0x00F52F73, 0xFF000000, 0x42700000, + 0x000710DC, 0x00F56B2F, 0x00000002, 0x00010000, + 0x010E0000, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF72F73, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF76B2F, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF76169, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF70000, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF70005, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF77961, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF7742F, 0x0000001E, 0x42700000, 0xFFEC0055, + 0xFFF72E64, 0xFF00001E, 0x42700000, 0xFFEC0055, + 0xFFF70000, 0x00000002, 0x00010050, 0x01A90000, + 0x00000005, 0x42700000, 0xFFFF0070, 0x00072F73, + 0x00000005, 0x42700000, 0xFFFF0070, 0x00076B2F, + 0x00000005, 0x42700000, 0xFFFF0070, 0x00076169, + 0x00000005, 0x42700000, 0xFFFF0070, 0x00070000, + 0x0000000F, 0x42700000, 0xFFFF0070, 0x00070005, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00077961, + 0x00000019, 0x42700000, 0xFFFF0075, 0x0007742F, + 0x00000019, 0x42700000, 0xFFFF0075, 0x00072E64, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00072F73, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00076B2F, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00076D61, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00070005, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00077961, + 0x00000014, 0x42700000, 0xFFFF0075, 0x0007742F, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00076565, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00070000, + 0x00000014, 0x42700000, 0xFFFF0075, 0x00072F73, + 0xFF000014, 0x42700000, 0xFFFF0075, 0x00076B2F, + 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, +}; + +static u32 D_808BB7A0[] = +{ + 0x00000009, 0x00000170, 0x00000001, 0x00010000, + 0x007E0000, 0x00000000, 0x42700000, 0xFFFF0065, + 0xFF92616D, 0x00000000, 0x42200000, 0xFFFF0065, + 0xFF926964, 0x00000000, 0x42200000, 0xFFFF0065, + 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0065, + 0xFF920111, 0x00000000, 0x42200000, 0xFFFF0065, + 0xFF93012D, 0x00000000, 0x42200000, 0xFFFF0047, + 0xFF920033, 0x00000000, 0x42200000, 0xFFFF0048, + 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0048, + 0xFF9200FB, 0x00000000, 0x42200000, 0xFFFF0048, + 0xFF922F68, 0xFF000000, 0x42200000, 0xFFFF0048, + 0xFF92612F, 0x00000001, 0x0001003A, 0x01530000, + 0x00000000, 0x42700001, 0xFFF7006A, 0xFFFDA1BC, + 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5F3, + 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5EB, + 0x00000000, 0x42700000, 0xFFF7006A, 0xFFFDA5A2, + 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBBAEE, + 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBC9B8, + 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCB0020, + 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCBA5A4, + 0x00000000, 0x42700000, 0xFFBD006C, 0xFFCB0020, + 0x00000000, 0x42700000, 0xFFAD0066, 0xFFD6A5E1, + 0x00000000, 0x42700000, 0xFF8C0051, 0xFFEDA5D0, + 0x00000000, 0x42700000, 0xFF8A0051, 0x00360020, + 0x00000000, 0x42700000, 0xFF96004E, 0x0074A5A6, + 0x00000000, 0x42700000, 0xFFE5004B, 0x00E2A5E5, + 0x00000000, 0x42700000, 0x00790052, 0x0138C0AE, + 0x00000000, 0x42700000, 0x0128004C, 0x0176A5E5, + 0x00000000, 0x42700000, 0x02350050, 0x01010020, + 0x00000000, 0x42700000, 0x02660050, 0xFFFFA5EB, + 0x00000000, 0x42700000, 0x02520050, 0xFF6FA5E1, + 0x00000000, 0x42700000, 0x01DB0050, 0xFE840020, + 0x00000000, 0x42700000, 0x01430050, 0xFDFFA5E1, + 0x00000000, 0x42700000, 0x00C00050, 0xFDC2A5D0, + 0x00000000, 0x42700000, 0xFFD30050, 0xFDA40020, + 0x00000000, 0x42700000, 0xFF720050, 0xFDB3A5A6, + 0x00000000, 0x42700000, 0xFF1C0050, 0xFDCEA5E5, + 0x00000000, 0x42700000, 0xFE88005D, 0xFE23C0AE, + 0x00000000, 0x42700000, 0xFDB8005F, 0xFF49A5E5, + 0x00000000, 0x42700000, 0xFD9B005F, 0xFFDE0020, + 0xFF000000, 0x42700000, 0xFDAD005F, 0x00A1A5EB, + 0x00000002, 0x00010000, 0x009B0000, 0x00000005, + 0x4221999A, 0xFFFF006F, 0x0005A1BC, 0x00000005, + 0x42200000, 0xFFFF006F, 0x0005A5F3, 0x00000005, + 0x42200000, 0xFFFF006F, 0x0005A5EB, 0x0000000F, + 0x42200000, 0xFFFF006F, 0x0005A5A2, 0x0000000F, + 0x42200000, 0xFFFF006F, 0x0005BAEE, 0x0000000F, + 0x42200000, 0xFFFF0068, 0x0008C9B8, 0x00000005, + 0x42200000, 0xFFFF0068, 0x00080020, 0x0000001E, + 0x42200000, 0xFFFF0068, 0x0008A5A4, 0x0000001E, + 0x42200000, 0xFFFF0068, 0x00080020, 0xFF00001E, + 0x42200000, 0xFFFF0068, 0x0008A5E1, 0x00000002, + 0x0001003A, 0x01700000, 0x00000005, 0x42700001, + 0x00000078, 0x000CA1BC, 0x00000005, 0x42700000, + 0x00000078, 0x000CA5F3, 0x00000005, 0x42700000, + 0x00000078, 0x000CA5EB, 0x0000000A, 0x42700000, + 0x00000078, 0x000CA5A2, 0x00000005, 0x42700000, + 0xFFFF005F, 0x000BBAEE, 0x00000005, 0x42700000, + 0xFFFF005F, 0x000BC9B8, 0x00000005, 0x42700000, + 0xFFFF005F, 0x000B0020, 0x00000005, 0x42700000, + 0xFFFF005F, 0x000BA5A4, 0x00000005, 0x42700000, + 0xFFFF005F, 0x000B0020, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5E1, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5D0, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x00080020, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5A6, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5E5, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008C0AE, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5E5, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x00080020, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5EB, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x0008A5E1, 0x0000000A, 0x42700000, + 0xFFFD005F, 0x00080020, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008A5E1, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008A5D0, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x00080020, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008A5A6, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008A5E5, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008C0AE, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x0008A5E5, 0x0000000F, 0x42700000, + 0xFFFD005F, 0x00080020, 0xFF00001E, 0x42700000, + 0xFFFD005F, 0x0008A5EB, 0x0000000A, 0x00000001, + 0x000C0000, 0x00B40000, 0x00000000, 0x00000000, + 0x0000001C, 0xFFFFFFF6, 0x00000000, 0xFFFFFFF2, + 0x00000009, 0x00000000, 0xBE6EEEEF, 0x00000000, + 0x00000004, 0x00000001, 0x0002005A, 0x005B0000, + 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, + 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, + 0x000A005A, 0x005B0000, 0x00000000, 0x00000000, + 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0xFFFFFFF8, + 0xFFFFFFDD, 0x00000000, 0x00000000, 0x00000000, + 0x0000002D, 0x00000001, 0x000100BE, 0x00D200D2, + 0x000003E8, 0x00000001, 0x000800D2, 0x00D300D3, + 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, +}; + +static u32 D_808BBD90[] = +{ + 0x0000000B, 0x00000BB8, 0x00000021, 0x00000001, + 0x00010000, 0x0BB80000, 0x00000000, 0x00000000, + 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0xFFFFFFF8, + 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, + 0x0000000A, 0x00000003, 0x00050000, 0x00010000, + 0x80000000, 0x00000000, 0x00000000, 0x00000334, + 0x00000000, 0x00000000, 0x00000334, 0x00000000, + 0x00000000, 0x00000001, 0x00020001, 0x00100000, + 0x80000000, 0x00000000, 0x00000000, 0x00000334, + 0x00000000, 0x00000000, 0x000002D0, 0x00000000, + 0x00000000, 0x00000001, 0x00050010, 0x00B00000, + 0x80000000, 0x00000000, 0x00000000, 0x000002D0, + 0x00000000, 0x00000000, 0x000002D0, 0x00000000, + 0x00000000, 0x00000001, 0x0000003E, 0x00000003, + 0x00040028, 0x00467D74, 0x00000000, 0xFFFFFFFF, + 0x00000031, 0x000002CF, 0x00000001, 0x0000002F, + 0x000002AF, 0x3D888889, 0xBD888889, 0xBD888889, + 0x00040046, 0x00DC8010, 0x00000000, 0x00000001, + 0x0000002F, 0x000002AF, 0x00000000, 0x00000086, + 0x00000015, 0xBBDA740E, 0x3F147AE1, 0x3BDA740E, + 0x000200DC, 0x01108000, 0x00000000, 0x00000000, + 0x00000086, 0x00000015, 0x00000000, 0x00000065, + 0x00000002, 0x00000000, 0xBF227627, 0x00000000, + 0x00000003, 0x00000001, 0x000C0154, 0x01550000, + 0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, + 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, 0x00000000, + 0x00000000, 0x00000000, 0x00000013, 0x00000006, + 0xFFFF0000, 0x0032FFFF, 0xFFFFFFFF, 0x70E60032, + 0x003C0000, 0x00000000, 0xFFFF003C, 0x00FAFFFF, + 0xFFFFFFFF, 0x70E700FA, 0x01040000, 0x00000000, + 0xFFFF0104, 0x0122FFFF, 0xFFFFFFFF, 0x70E80122, + 0x01400000, 0x00000000, 0x00000001, 0x00010000, + 0x00FB0000, 0x00000000, 0x42700000, 0xFFC5000C, + 0x02B20222, 0x00000000, 0x42700000, 0xFFC5000C, + 0x02B200FA, 0x00000000, 0x42700000, 0xFFC5000C, + 0x02B20000, 0x00000000, 0x42700000, 0xFFC5000C, + 0x02B20000, 0x00000000, 0x42700000, 0xFFC5000C, + 0x02B20000, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD0000, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD2D70, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD0085, 0x00000000, 0x42700000, 0xFFE10018, + 0x02BD01E6, 0xFF000000, 0x42700000, 0xFFE10018, + 0x02BD0000, 0x00000001, 0x0001005A, 0x014B0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0222, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC00FA, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0x00000000, 0x42700000, 0xFF66005C, 0x00EC0000, + 0xFF000000, 0x42700000, 0xFF66005C, 0x00EC2D70, + 0x00000001, 0x000100DC, 0x01EB0000, 0x00000000, + 0x42700001, 0xFFFE007A, 0x00270222, 0x00000000, + 0x42700001, 0xFFFE007A, 0x002700FA, 0x00000000, + 0x42700001, 0xFFFE0066, 0x00270000, 0x00000000, + 0x42700001, 0xFFFE005A, 0x00270000, 0x00000000, + 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, + 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, + 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, + 0x42700001, 0xFFFE0051, 0x003E0000, 0x00000000, + 0x42700001, 0xFFFE0051, 0x003E2D70, 0xFF000000, + 0x42700001, 0xFFFE0051, 0x003E0085, 0x00000002, + 0x00010000, 0x01180000, 0x0000001E, 0x42700000, + 0x002B0034, 0x02CC0222, 0x0000001E, 0x42700000, + 0x002B0034, 0x02CC00FA, 0x0000000A, 0x42700000, + 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, + 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, + 0x002B0034, 0x02CC0000, 0x0000000A, 0x42700000, + 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, + 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, + 0x003F0056, 0x02D20000, 0x0000001E, 0x42700000, + 0x003F0056, 0x02D22D70, 0x0000001E, 0x42700000, + 0x003F0055, 0x02D10085, 0x0000001E, 0x42700000, + 0x003F0055, 0x02D101E6, 0xFF00001E, 0x42700000, + 0x003E0055, 0x02D10000, 0x00000002, 0x0001005A, + 0x01680000, 0x0000001E, 0x42700000, 0xFF970053, + 0x016E0222, 0x0000001E, 0x42700000, 0xFF980053, + 0x016C00FA, 0x0000001E, 0x42700000, 0xFFC10053, + 0x01530000, 0x0000001E, 0x42700000, 0xFFF00063, + 0x00FF0000, 0x0000001E, 0x42700000, 0xFFE2006F, + 0x00B10000, 0x0000001E, 0x42700000, 0xFFB00070, + 0x00790000, 0x0000001E, 0x42700000, 0xFFB00070, + 0x00790000, 0x0000001E, 0x42700000, 0xFFB00070, + 0x00790000, 0xFF00001E, 0x42700000, 0xFFB00070, + 0x00792D70, 0x00000002, 0x000100DC, 0x02080000, + 0x0000001E, 0x42700001, 0x00000089, 0xFFC90222, + 0x0000001E, 0x42700001, 0x00000089, 0xFFC900FA, + 0x0000001E, 0x42700001, 0x00000075, 0xFFC90000, + 0x0000001E, 0x42700001, 0x00000069, 0xFFC90000, + 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, + 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, + 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, + 0x0000001E, 0x42700001, 0x00000062, 0xFFE10000, + 0x0000001E, 0x42700001, 0x00000062, 0xFFE12D70, + 0xFF00001E, 0x42700001, 0x00000062, 0xFFE10085, + 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, +}; + const ActorInit Bg_Toki_Swd_InitVars = { ACTOR_BG_TOKI_SWD, @@ -23,57 +314,78 @@ const ActorInit Bg_Toki_Swd_InitVars = (ActorFunc)BgTokiSwd_Update, (ActorFunc)BgTokiSwd_Draw, }; -*/ -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_SetupAction.s") -void BgTokiSwd_SetupAction(BgTokiSwd* this, ActorFunc actionFunc) + +static ColliderCylinderInit colliderInit = +{ + 0x0A, 0x00, 0x00, 0x39, + 0x12, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0xFFCFFFFF, + 0x00, 0x00, 0x00, 0x00, + 0xFFCFFFFF, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, + 0x000A, + 0x0046, + 0x0000000000000000, +}; + +static SubActor98Init subActor98Init = +{ + 0x0A, + 0x0023, + 0x0064, + 0xFF, +}; + +static InitChainEntry initChain[] = +{ + ICHAIN_VEC3F_DIV1000(scale, 0x19, ICHAIN_STOP), +}; + +static void BgTokiSwd_SetupAction(BgTokiSwd* this, ActorFunc actionFunc) { this->actionFunc = actionFunc; } -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Init.s") -extern InitChainEntry D_808BC414; -extern ColliderCylinderInit D_808BC3E0; -extern SubActor98Init D_808BC40C; -void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx) +static void BgTokiSwd_Init(BgTokiSwd* this, GlobalContext* globalCtx) { ColliderCylinderMain* collision; Actor* thisx = &this->actor; - Actor_ProcessInitChain(thisx, &D_808BC414); + Actor_ProcessInitChain(thisx, initChain); this->actor.shape.unk_08 = 800.0f; - BgTokiSwd_SetupAction(thisx, &func_808BAF40); + BgTokiSwd_SetupAction(thisx, func_808BAF40); collision = &this->collider; if (LINK_IS_ADULT) { thisx->draw = NULL; } + if (gSaveContext.scene_setup_index == 5) { globalCtx->unk_11D30[0] = 0xFF; } + ActorCollider_AllocCylinder(globalCtx, collision); - ActorCollider_InitCylinder(globalCtx, collision, thisx, &D_808BC3E0); + ActorCollider_InitCylinder(globalCtx, collision, thisx, &colliderInit); ActorCollider_Cylinder_Update(thisx, collision); - func_80061ED4(&thisx->sub_98, 0, &D_808BC40C); + func_80061ED4(&thisx->sub_98, 0, &subActor98Init); } -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Destroy.s") -void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx) +static void BgTokiSwd_Destroy(BgTokiSwd* this, GlobalContext* globalCtx) { ColliderCylinderMain* collider = &this->collider; ActorCollider_FreeCylinder(globalCtx, collider); } -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BAF40.s") -extern D_808BBD90; -extern D_808BB2F0; -extern D_808BB7A0; -void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) + +static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { if (((gSaveContext.event_chk_inf[4] & 0x8000) == 0) && (gSaveContext.scene_setup_index < 4) && (func_8002E12C(&this->actor, 800.0f, 0x7530) != 0) && (func_800BFC84(globalCtx) == 0)) { gSaveContext.event_chk_inf[4] |= 0x8000; - globalCtx->csCtx.segment = &D_808BBD90; + globalCtx->csCtx.segment = D_808BBD90; gSaveContext.cutscene_trigger = 1; } if (LINK_IS_CHILD || ((gSaveContext.event_chk_inf[5] & 0x20) != 0)) @@ -83,17 +395,17 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) if (LINK_IS_CHILD) { Item_Give(globalCtx, 0x3C); - globalCtx->csCtx.segment = &D_808BB2F0; + globalCtx->csCtx.segment = D_808BB2F0; } else { - globalCtx->csCtx.segment = &D_808BB7A0; + globalCtx->csCtx.segment = D_808BB7A0; } Audio_SetBGM(NA_BGM_STOP); Audio_SetBGM(NA_SE_PL_BOUND_DIRT); gSaveContext.cutscene_trigger = (u8)1; this->actor.attachedA = 0; - BgTokiSwd_SetupAction(this, &func_808BB0AC); + BgTokiSwd_SetupAction(this, func_808BB0AC); } else { @@ -114,39 +426,62 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) } } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB0AC.s") +static void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) +{ + Player* player; -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/func_808BB128.s") -void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) + //if attached is set, sword has been pulled/placed from the pedestal + if (func_8002F410(&this->actor, globalCtx) != 0) + { + if (LINK_IS_CHILD) + { + Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_PUTAWAY_STN); + this->actor.draw = NULL; //sword has been pulled, dont draw sword + } + else + { + this->actor.draw = BgTokiSwd_Draw; //sword has been placed, draw the master sword + } + BgTokiSwd_SetupAction(this, func_808BB128); + return; + } + player = PLAYER; + player->interactRangeActor = &this->actor; +} + +static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) { if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) { globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] + 5; } } -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Update.s") -void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx) + +static void BgTokiSwd_Update(BgTokiSwd* this, GlobalContext* globalCtx) { this->actionFunc(&this->actor, globalCtx); Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); } -//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Toki_Swd/BgTokiSwd_Draw.s") -extern char D_808BC420[]; -extern char D_808BC434[]; -extern D_06001BD0; -extern char D_808BC448[]; -void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx) { - Gfx* gfxArr[7]; - GraphicsContext* gfxCtx; - - + +static void BgTokiSwd_Draw(BgTokiSwd* this, GlobalContext* globalCtx) +{ + s32 pad[4]; + GameState* state; + GraphicsContext* gfxCtx; + Gfx* gfxArr[4]; + state = &globalCtx->state; gfxCtx = globalCtx->state.gfxCtx; - func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, &D_808BC420, 0x2D7); + func_800C6AC4(gfxArr, state->gfxCtx, "../z_bg_toki_swd.c", 727); func_80093D18(globalCtx->state.gfxCtx); + func_8002EBCC(&this->actor, globalCtx, 0); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, Draw_TexScroll(globalCtx->state.gfxCtx, 0, -(globalCtx->gameplayFrames & 0x7F), 0x20, 0x20)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, D_808BC434, 0x2E6), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + gSPSegment(gfxCtx->polyOpa.p++, 0x08, Draw_TexScroll(globalCtx->state.gfxCtx, 0, + -(globalCtx->gameplayFrames % 0x80), 32, 32)); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 742), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfxCtx->polyOpa.p++, &D_06001BD0); - func_800C6B54(gfxArr, globalCtx->state.gfxCtx, D_808BC448, 0x308); + + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 776); } From bb5ce4a656ec7476d215577328ef3fe571c0b4a8 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 21 Mar 2020 17:33:39 -0400 Subject: [PATCH 19/23] Finished --- .../actors/ovl_Demo_Geff/func_80977F80.s | 59 ------------------- data/overlays/actors/z_demo_geff.reloc.s | 11 ---- spec | 2 +- .../actors/ovl_Demo_Geff/z_demo_geff.c | 55 +++++++++-------- 4 files changed, 30 insertions(+), 97 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s delete mode 100644 data/overlays/actors/z_demo_geff.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s b/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s deleted file mode 100644 index ee035d3a8f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s +++ /dev/null @@ -1,59 +0,0 @@ -.rdata - -glabel D_80978658 - .asciz "../z_demo_geff.c" - .balign 4 - -glabel D_8097866C - .asciz "../z_demo_geff.c" - .balign 4 - -.text - -glabel func_80977F80 -/* 00140 80977F80 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 00144 80977F84 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00148 80977F88 AFA40048 */ sw $a0, 0x0048($sp) -/* 0014C 80977F8C AFA5004C */ sw $a1, 0x004C($sp) -/* 00150 80977F90 8C8F0154 */ lw $t7, 0x0154($a0) ## 00000154 -/* 00154 80977F94 3C068098 */ lui $a2, %hi(D_80978658) ## $a2 = 80980000 -/* 00158 80977F98 24C68658 */ addiu $a2, $a2, %lo(D_80978658) ## $a2 = 80978658 -/* 0015C 80977F9C AFAF003C */ sw $t7, 0x003C($sp) -/* 00160 80977FA0 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00164 80977FA4 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFDC -/* 00168 80977FA8 240700CC */ addiu $a3, $zero, 0x00CC ## $a3 = 000000CC -/* 0016C 80977FAC 0C031AB1 */ jal func_800C6AC4 -/* 00170 80977FB0 AFA50038 */ sw $a1, 0x0038($sp) -/* 00174 80977FB4 8FA50038 */ lw $a1, 0x0038($sp) -/* 00178 80977FB8 8FA6004C */ lw $a2, 0x004C($sp) -/* 0017C 80977FBC 3C08DB06 */ lui $t0, 0xDB06 ## $t0 = DB060000 -/* 00180 80977FC0 8CA302C0 */ lw $v1, 0x02C0($a1) ## 000002C0 -/* 00184 80977FC4 35080018 */ ori $t0, $t0, 0x0018 ## $t0 = DB060018 -/* 00188 80977FC8 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0018C 80977FCC 24790008 */ addiu $t9, $v1, 0x0008 ## $t9 = 00000008 -/* 00190 80977FD0 ACB902C0 */ sw $t9, 0x02C0($a1) ## 000002C0 -/* 00194 80977FD4 AC680000 */ sw $t0, 0x0000($v1) ## 00000000 -/* 00198 80977FD8 8FA9003C */ lw $t1, 0x003C($sp) -/* 0019C 80977FDC 240700D4 */ addiu $a3, $zero, 0x00D4 ## $a3 = 000000D4 -/* 001A0 80977FE0 00095100 */ sll $t2, $t1, 4 -/* 001A4 80977FE4 01495021 */ addu $t2, $t2, $t1 -/* 001A8 80977FE8 000A5080 */ sll $t2, $t2, 2 -/* 001AC 80977FEC 00CA2021 */ addu $a0, $a2, $t2 -/* 001B0 80977FF0 00812021 */ addu $a0, $a0, $at -/* 001B4 80977FF4 8C8B17B4 */ lw $t3, 0x17B4($a0) ## 000017B4 -/* 001B8 80977FF8 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 001BC 80977FFC 3C068098 */ lui $a2, %hi(D_8097866C) ## $a2 = 80980000 -/* 001C0 80978000 AC6B0004 */ sw $t3, 0x0004($v1) ## 00000004 -/* 001C4 80978004 8C8C17B4 */ lw $t4, 0x17B4($a0) ## 000017B4 -/* 001C8 80978008 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFDC -/* 001CC 8097800C 24C6866C */ addiu $a2, $a2, %lo(D_8097866C) ## $a2 = 8097866C -/* 001D0 80978010 01816821 */ addu $t5, $t4, $at -/* 001D4 80978014 3C018016 */ lui $at, 0x8016 ## $at = 80160000 -/* 001D8 80978018 0C031AD5 */ jal func_800C6B54 -/* 001DC 8097801C AC2D6FC0 */ sw $t5, 0x6FC0($at) ## 80166FC0 -/* 001E0 80978020 8FBF0014 */ lw $ra, 0x0014($sp) -/* 001E4 80978024 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 001E8 80978028 03E00008 */ jr $ra -/* 001EC 8097802C 00000000 */ nop - - diff --git a/data/overlays/actors/z_demo_geff.reloc.s b/data/overlays/actors/z_demo_geff.reloc.s deleted file mode 100644 index e71f06c6e9..0000000000 --- a/data/overlays/actors/z_demo_geff.reloc.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata -glabel D_809787C0 - -.incbin "baserom/ovl_Demo_Geff", 0x980, 0x00000170 diff --git a/spec b/spec index 4aeaa38353..d78c28933b 100644 --- a/spec +++ b/spec @@ -1789,7 +1789,7 @@ endseg beginseg name "ovl_Demo_Geff" include "build/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o" - include "build/data/overlays/actors/z_demo_geff.reloc.o" + include "build/src/overlays/actors/ovl_Demo_Geff/z_demo_geff_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 6366df2438..86eaa2f140 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -11,18 +11,18 @@ #define ROOM 0x00 #define FLAGS 0x00000030 -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 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_SetScale(DemoGeff* this, GlobalContext* globalCtx); +static void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx); -void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); -void func_80978308(DemoGeff* this, GlobalContext* globalCtx); +static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); +static void func_80978308(DemoGeff* this, GlobalContext* globalCtx); -void func_809784D4(DemoGeff* this, GlobalContext* globalCtx); -void func_80978344(DemoGeff* this, GlobalContext* globalCtx); +static void func_809784D4(DemoGeff* this, GlobalContext* globalCtx); +static 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, OBJECT_UNSET_0, }; @@ -49,11 +49,11 @@ const ActorInit Demo_Geff_InitVars = extern UNK_TYPE D_06000EA0; -void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx) { +static void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx) { } -void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { +static 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); @@ -63,7 +63,7 @@ void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { this->drawConfig = 0; } -void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { +static void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; s16 pad; Gfx* gfxArr[4]; @@ -79,8 +79,7 @@ void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 188); } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Geff/func_80977F80.s") -/*void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { +static void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { s32 pad[2]; s32 objBankIndex = this->objBankIndex; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; @@ -92,10 +91,14 @@ void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment); - func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 212); -}*/ + if (!globalCtx) { -void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { + } + + func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 212); +} + +static void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { Vec3f* thisScale = &this->actor.scale; this->action = 1; this->drawConfig = 1; @@ -123,7 +126,7 @@ void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { } } -void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { +static void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { s32 targetParams = 2; Actor* propIt; @@ -146,7 +149,7 @@ void func_809781FC(DemoGeff* this, GlobalContext* globalCtx) { } } -void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { +static 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)) { @@ -156,17 +159,17 @@ void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { } } -void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { +static void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { func_809781FC(this, globalCtx); func_809782A0(this, globalCtx); DemoGeff_SetScale(this, globalCtx); } -void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { +static void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { func_80977EA8(globalCtx, &D_06000EA0); } -void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { +static void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { s16 params = this->actor.params; ActorFunc actorFunc = scaleFuncs[params]; if (actorFunc == NULL) { @@ -177,7 +180,7 @@ void func_80978370(DemoGeff* this, GlobalContext* globalCtx) { actorFunc(this, globalCtx); } -void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { +static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { ObjectContext* objCtx = &globalCtx->objectCtx; Actor* thisx = &this->actor; s32 params = thisx->params; @@ -196,7 +199,7 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { } } -void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) { +static 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; @@ -204,11 +207,11 @@ void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx) { actionFuncs[this->action](this, globalCtx); } -void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) { +static void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) { } -void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx) { +static void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx) { s32 drawConfig = this->drawConfig; s16 pad; if (drawConfig < 0 || drawConfig >= 2 || drawFuncs[drawConfig] == NULL) { From 124c93c5a935b7e576f1c9d211a0ade76f63a082 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 21 Mar 2020 18:09:59 -0400 Subject: [PATCH 20/23] Made suggested changes --- blah.txt | 0 .../actors/ovl_Demo_Geff/z_demo_geff.c | 43 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 blah.txt diff --git a/blah.txt b/blah.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index 86eaa2f140..e39a5fbcf0 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -16,7 +16,7 @@ static void DemoGeff_Destroy(DemoGeff* this, GlobalContext* globalCtx); static void DemoGeff_Update(DemoGeff* this, GlobalContext* globalCtx); static void DemoGeff_Draw(DemoGeff* this, GlobalContext* globalCtx); -static void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx); +static void func_80978030(DemoGeff* this, GlobalContext* globalCtx); static void func_809783D4(DemoGeff* this, GlobalContext* globalCtx); static void func_80978308(DemoGeff* this, GlobalContext* globalCtx); @@ -25,11 +25,11 @@ static void func_809784D4(DemoGeff* this, GlobalContext* globalCtx); static 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, OBJECT_UNSET_0, }; + OBJECT_GEFF, OBJECT_GEFF, }; -ActorFunc scaleFuncs[] = { (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, - (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, - (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, (ActorFunc)DemoGeff_SetScale, }; +ActorFunc scaleFuncs[] = { (ActorFunc)func_80978030, (ActorFunc)func_80978030, (ActorFunc)func_80978030, + (ActorFunc)func_80978030, (ActorFunc)func_80978030, (ActorFunc)func_80978030, + (ActorFunc)func_80978030, (ActorFunc)func_80978030, (ActorFunc)func_80978030, }; ActorFunc actionFuncs[] = { (ActorFunc)func_809783D4, (ActorFunc)func_80978308, }; ActorFunc drawFuncs[] = { (ActorFunc)func_809784D4, (ActorFunc)func_80978344, }; @@ -65,8 +65,7 @@ static void DemoGeff_Init(DemoGeff* this, GlobalContext* globalCtx) { static void func_80977EA8(GlobalContext* globalCtx, u32 dlist) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - s16 pad; - Gfx* gfxArr[4]; + Gfx* gfxArr[5]; func_800C6AC4(gfxArr, gfxCtx, "../z_demo_geff.c", 181); func_80093D18(gfxCtx); @@ -83,22 +82,20 @@ static void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { s32 pad[2]; s32 objBankIndex = this->objBankIndex; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - s16 pad2; - Gfx* gfxArr[4]; + Gfx* gfxArr[5]; func_800C6AC4(gfxArr, gfxCtx, "../z_demo_geff.c", 204); gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment); - if (!globalCtx) { - - } + // Necessary to match + if (!globalCtx) {} func_800C6B54(gfxArr, gfxCtx, "../z_demo_geff.c", 212); } -static void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { +static void func_80978030(DemoGeff* this, GlobalContext* globalCtx) { Vec3f* thisScale = &this->actor.scale; this->action = 1; this->drawConfig = 1; @@ -107,21 +104,21 @@ static void DemoGeff_SetScale(DemoGeff* this, GlobalContext* globalCtx) { case 0: case 3: case 6: - thisScale->x = ((f32) kREG(7) * 0.01f) + 0.3f; - thisScale->y = ((f32) kREG(8) * 0.01f) + 0.3f; - thisScale->z = ((f32) kREG(9) * 0.01f) + 0.3f; + thisScale->x = (kREG(7) * 0.01f) + 0.3f; + thisScale->y = (kREG(8) * 0.01f) + 0.3f; + thisScale->z = (kREG(9) * 0.01f) + 0.3f; break; case 1: case 4: case 7: - thisScale->x = ((f32) kREG(10) * 0.01f) + 0.15f; - thisScale->y = ((f32) kREG(11) * 0.01f) + 0.29f; - thisScale->z = ((f32) kREG(12) * 0.01f) + 0.12f; + thisScale->x = (kREG(10) * 0.01f) + 0.15f; + thisScale->y = (kREG(11) * 0.01f) + 0.29f; + thisScale->z = (kREG(12) * 0.01f) + 0.12f; break; default: - thisScale->x = ((f32) kREG(13) * 0.01f) + 0.1f; - thisScale->y = ((f32) kREG(14) * 0.01f) + 0.15f; - thisScale->z = ((f32) kREG(15) * 0.01f) + 0.2f; + thisScale->x = (kREG(13) * 0.01f) + 0.1f; + thisScale->y = (kREG(14) * 0.01f) + 0.15f; + thisScale->z = (kREG(15) * 0.01f) + 0.2f; break; } } @@ -162,7 +159,7 @@ static void func_809782A0(DemoGeff* this, GlobalContext* globalCtx) { static void func_80978308(DemoGeff* this, GlobalContext* globalCtx) { func_809781FC(this, globalCtx); func_809782A0(this, globalCtx); - DemoGeff_SetScale(this, globalCtx); + func_80978030(this, globalCtx); } static void func_80978344(DemoGeff* this, GlobalContext* globalCtx) { From f1ae94c2f30fe0c96646b027b53c99418cb3f2da Mon Sep 17 00:00:00 2001 From: shawlucas Date: Sat, 21 Mar 2020 18:08:45 -0700 Subject: [PATCH 21/23] Made suggested changes to ovl_Bg_Toki_Swd --- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 69384dded9..759dde5eb9 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -394,7 +394,7 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { if (LINK_IS_CHILD) { - Item_Give(globalCtx, 0x3C); + Item_Give(globalCtx, ITEM_SWORD_MASTER); globalCtx->csCtx.segment = D_808BB2F0; } else @@ -403,7 +403,7 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) } Audio_SetBGM(NA_BGM_STOP); Audio_SetBGM(NA_SE_PL_BOUND_DIRT); - gSaveContext.cutscene_trigger = (u8)1; + gSaveContext.cutscene_trigger = 1; this->actor.attachedA = 0; BgTokiSwd_SetupAction(this, func_808BB0AC); } @@ -419,10 +419,12 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { if (globalCtx->unk_11D30[0] > 0) { - globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] - 1; - return; + globalCtx->unk_11D30[0]--; + } + else + { + globalCtx->unk_11D30[0] = 0; } - globalCtx->unk_11D30[0] = 0; } } @@ -453,7 +455,7 @@ static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) { if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) { - globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] + 5; + globalCtx->unk_11D30[0]+= 5; } } From fd2dae78a2f90af23a834f77bab7dfff2e05f5d6 Mon Sep 17 00:00:00 2001 From: shawlucas Date: Sat, 21 Mar 2020 18:11:02 -0700 Subject: [PATCH 22/23] added one space to a line --- src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 759dde5eb9..53b2ba7a35 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -455,7 +455,7 @@ static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) { if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) { - globalCtx->unk_11D30[0]+= 5; + globalCtx->unk_11D30[0] += 5; } } From 13e2c84dbf2535c31db55e1bedebab5ee128d43d Mon Sep 17 00:00:00 2001 From: shawlucas Date: Sat, 21 Mar 2020 20:37:35 -0700 Subject: [PATCH 23/23] Made suggested changes --- src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 53b2ba7a35..459d1d3360 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -445,10 +445,12 @@ static void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) this->actor.draw = BgTokiSwd_Draw; //sword has been placed, draw the master sword } BgTokiSwd_SetupAction(this, func_808BB128); - return; } - player = PLAYER; - player->interactRangeActor = &this->actor; + else + { + player = PLAYER; + player->interactRangeActor = &this->actor; + } } static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx)