Misc decomp 3 (#202)

* data fixes, SoundID rename

* ?

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "36030366ce"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "36030366ce"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
This commit is contained in:
Ethan Roseman 2021-03-10 00:13:02 -05:00 committed by GitHub
parent f0585ec87c
commit 555102c17c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 385 additions and 285 deletions

View File

@ -1175,7 +1175,9 @@ typedef struct CollisionStatus {
/* 0x06 */ s16 floorBelow;
/* 0x08 */ s16 currentCeiling; /* valid on touching with head */
/* 0x0A */ s16 unk_0A;
/* 0x0C */ char unk_0C[0x6];
/* 0x0C */ s16 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 currentWall;
/* 0x14 */ s16 lastWallHammered; /* valid when smashing */
/* 0x16 */ s16 touchingWallTrigger; /* 0/1 */
@ -1476,7 +1478,9 @@ typedef struct PlayerStatus {
/* 0x080 */ f32 targetYaw;
/* 0x084 */ f32 currentYaw;
/* 0x088 */ f32 unk_88;
/* 0x08C */ char unk_8C[20];
/* 0x08C */ char unk_8C[4];
/* 0x090 */ f32 unk_90;
/* 0x094 */ char unk_94[12];
/* 0x0A0 */ f32 heading;
/* 0x0A4 */ char unk_A4[4];
/* 0x0A8 */ f32 spriteFacingAngle; /* angle of sprite, relative to camera, from 0 to 180 */
@ -1741,7 +1745,8 @@ typedef struct Temp8010EBB0 {
/* 0x003 */ s8 unk_03;
/* 0x004 */ char unk_04[0x4];
/* 0x008 */ s32 unk_08;
/* 0x009 */ char unk_0C[0x8];
/* 0x009 */ s32 unk_0C;
/* 0x010 */ char unk_10[0x4];
/* 0x014 */ s8 unk_14;
/* 0x015 */ char unk_15[0x343];
/* 0x358 */ s32 unk_358;

View File

@ -237,7 +237,7 @@ typedef UNK_TYPE Easing;
#define Easing_SIN_OUT 0x0000000B
#define Easing_COS_IN 0x0000000C
typedef UNK_TYPE SoundId;
typedef UNK_TYPE SoundID;
#define SoundId_JR_TROOPA_SPLASH 0x00000045
#define SoundId_JR_TROOPA_SWIM 0x00000046
#define SoundId_BOO_SPOOK 0x00000047

View File

@ -202,6 +202,7 @@ s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode item
void set_item_entity_flags(s32 itemEntityIndex, s32 flag);
s32 bind_dynamic_entity_7(s32* updateFunc, s32* drawFunc);
s32 get_dynamic_entity(s32 arg0);
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height);

View File

@ -285,10 +285,10 @@ typedef struct ActorPartDesc {
} ActorPartDesc; // size = 0x24
typedef struct ActorSounds {
/* 0x00 */ SoundId walk[2];
/* 0x08 */ SoundId fly[2];
/* 0x10 */ SoundId jump;
/* 0x14 */ SoundId hurt;
/* 0x00 */ SoundID walk[2];
/* 0x08 */ SoundID fly[2];
/* 0x10 */ SoundID jump;
/* 0x14 */ SoundID hurt;
/* 0x18 */ s16 delay[2]; ///< Number of frames to wait between walk/fly sounds. Negative values are in distance.
} ActorSounds; // size = 0x20

View File

@ -1,5 +1,70 @@
#include "common.h"
s32 D_8014F2D0[] = { 0x00000287, 0x000002A8, 0x00000054, 0x00000056, 0x00000024, 0x00000027, 0x00000021, 0x00000022,
0x00000349, 0x00000273, 0x00000275, 0x00000275, 0x00000274, 0x00000273, 0x00000274, 0x00000099,
0x0000009E, 0x0000032E, 0x0000008E, 0x00000089, 0x00000083, 0x00000388, 0x000000A0, 0x0000004A,
0x0000009F, 0x00000168, 0x00000185, 0x00000052, 0x0000004E, 0x0000004F, 0x00000189, 0x00000000,
0x00000000, 0x00000198, 0x00000199, 0x00000194, 0x0000019A, 0x00000091, 0x00000164, 0x00000271,
0x00000271, 0x00000274, 0x00000275, 0x00000271, 0x00000273, 0x00000271, 0x00000273, 0x00000271,
0x00000274, 0x00000275, 0x00000276, 0x00000271, 0x00000273, 0x00000271, 0x00000274, 0x00000276,
0x00000275, 0x00000271, 0x00000271, 0x00000271, 0x00000271, 0x00000276, 0x00000275, 0x00000274,
0x0000039E, 0x00000341, 0x00000207, 0x00000271, 0x00000271, 0x00000275, 0x00000276, 0x00000271,
0x00000271, 0x00000271, 0x00000050, 0x00000070, 0x0000036C, 0x0000036D, 0x00000295, 0x00000043,
0x00000197, 0x00000221, 0x0000022A, 0x0000022B, 0x00002040, 0x00000046, 0x00000033, 0x00000034,
0x00000039, 0x0000004C, 0x0000004D, 0x000001B1, 0x000001B2, 0x00000094, 0x0000005D, 0x0000005B,
0x00000060, 0x000001B3, 0x00000000, 0x000000AD, 0x000000AE, 0x000000AF, 0x0000023D, 0x000000A2,
0x00000248, 0x00000249, 0x00000391, 0x000003BC, 0x000003AD, 0x0000022C, 0x0000022D, };
s32 D_8014F48C[] = { 0x00000336, 0x00000316 };
s32 D_8014F494[] = { 0x00000337, 0x00000317 };
s32 D_8014F49C[] = { 0x00000338, 0x00000318 };
s32 D_8014F4A4[] = { 0x00000339, 0x00000319 };
s32 D_8014F4AC[] = { 0x0000033A, 0x0000031A };
s32 D_8014F4B4[] = { 0x0000033B, 0x0000031B };
s32 D_8014F4BC[] = { 0x0000033C, 0x0000031C };
s32 D_8014F4C4[] = { 0x0000033D, 0x0000031D };
s32 D_8014F4CC[] = { 0x0000033E, 0x0000031E };
s32 D_8014F4D4[] = { 0x0000033F, 0x0000031F };
s32 D_8014F4DC[] = { 0x00000340, 0x00000340 };
s32 D_8014F4E4[] = { 0x000002F4, 0x000002F5 };
s32 D_8014F4EC[] = { 0x0000032F, 0x00000330 };
s32 D_8014F4F4[] = { 0x00000334, 0x00000335 };
s32 D_8014F4FC[] = { 0x000002F1, 0x000002F2 };
s32 D_8014F504[] = { 0x000000C1, 0x000000C2 };
s32 D_8014F50C[] = { 0x000000C3, 0x000000C4 };
s32 D_8014F514[] = { 0x000001CB, 0x000001CD };
s32 D_8014F51C[] = { 0x000001CC, 0x000001CE };
s32 D_8014F524[] = { 0x000002A6, 0x000002A7 };
s32 D_8014F52C[] = { 0x0000020C, 0x0000020D, 0x0000020E };
s32 D_8014F538[] = { 0x00000259, 0x0000025A };
s32 D_8014F540[] = { 0x0000025C, 0x0000025D };
s32 D_8014F548[] = { 0x00000331, 0x00000332, 0x00000333 };
s32 D_8014F554[] = { 0x00002078, 0x00002079 };
s32 D_8014F55C[] = { 0x00000179, 0x0000017A };
s32 D_8014F564[] = { 0x000001FB, 0x000001FC };
s32 D_8014F56C[] = { 0x0000203A, 0x0000203B };
s32 D_8014F574[] = { 0x0000022E, 0x0000022F };
s32 D_8014F57C[] = { 0x0000202A, 0x0000202B };
s32 D_8014F584[] = { 0x00002041, 0x00002042 };
s32 D_8014F58C[] = { 0x00002043, 0x00002044 };
s32 D_8014F594[] = { 0x00002078, 0x00002079 };
s32 D_8014F59C[] = { 0x000003B6, 0x000003B7 };
s32 D_8014F5A4[] = { &D_8014F48C, 0x00020000, &D_8014F494, 0x00020000, &D_8014F49C, 0x00020000, &D_8014F4A4, 0x00020000,
&D_8014F4AC, 0x00020000, &D_8014F4B4, 0x00020000, &D_8014F4BC, 0x00020000, &D_8014F4C4, 0x00020000,
&D_8014F4CC, 0x00020000, &D_8014F4D4, 0x00020000, &D_8014F4DC, 0x00020000, &D_8014F4E4, 0x00020000,
&D_8014F4EC, 0x00020000, &D_8014F4F4, 0x00020000, &D_8014F4FC, 0x00020000, &D_8014F504, 0x00020000,
&D_8014F50C, 0x00020000, &D_8014F514, 0x00020000, &D_8014F51C, 0x00020000, &D_8014F524, 0x00020000,
&D_8014F52C, 0x00030000, &D_8014F538, 0x00020000, &D_8014F540, 0x00020000, &D_8014F548, 0x00030000,
&D_8014F554, 0x00020000, &D_8014F55C, 0x00020000, &D_8014F564, 0x00020000, &D_8014F56C, 0x00020000,
&D_8014F574, 0x00020000, &D_8014F57C, 0x00020000, &D_8014F584, 0x00020000, &D_8014F58C, 0x00020000,
&D_8014F594, 0x00020000, &D_8014F59C, 0x00020000, };
s32 D_8014F6B4[] = { 0x000001C1, 0x000001C2, 0x000001C3, 0x000001C4, 0x000001C5, 0x000001C6, 0x000001C7, 0x000001C8,
0x000001C9, 0x000001CA, 0x000001CB, 0x000001CC, 0x000020A3, 0x000020A4, 0x00000000, };
extern s32 D_80159AD4;
INCLUDE_ASM(s32, "code_DF950", func_80149250);
void use_default_door_sounds(void) {
@ -13,9 +78,14 @@ INCLUDE_ASM(s32, "code_DF950", func_80149670);
INCLUDE_ASM(s32, "code_DF950", func_80149734);
INCLUDE_ASM(s32, "code_DF950", func_801497FC);
void func_801497FC(s32 arg0) {
func_800561E4();
D_80159AD4 = arg0;
}
INCLUDE_ASM(s32, "code_DF950", func_80149828);
s32 func_80149828(void) {
return D_80159AD4;
}
INCLUDE_ASM(s32, "code_DF950", func_80149838);

View File

@ -400,7 +400,7 @@ ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall) {
ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 modelID = get_variable(script, *args++);
SoundId soundID = get_variable(script, *args++);
SoundID soundID = get_variable(script, *args++);
s32 var3 = get_variable(script, *args++);
f32 x, y, z;
f32 n1, n2, n3;
@ -414,7 +414,7 @@ ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) {
ApiStatus PlaySoundAtCollider(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 colliderID = get_variable(script, *args++);
SoundId soundID = get_variable(script, *args++);
SoundID soundID = get_variable(script, *args++);
s32 var3 = get_variable(script, *args++);
f32 x, y, z;

View File

@ -4,7 +4,37 @@ void default_trigger_delegate(s32* arg0) {
arg0[0] |= 2;
}
INCLUDE_ASM(s32, "code_dbd70_len_700", clear_trigger_data);
void clear_trigger_data(void) {
CollisionStatus* collisionStatus = &gCollisionStatus;
s32 i;
if (!(*gGameStatusPtr)->isBattle) {
gCurrentTriggerListPtr = &gTriggerList1;
} else {
gCurrentTriggerListPtr = &gTriggerList2;
}
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
(*gCurrentTriggerListPtr)[i] = NULL;
}
gTriggerCount = 0;
collisionStatus->pushingAgainstWall = -1;
collisionStatus->currentFloor = -1;
collisionStatus->lastTouchedFloor = -1;
collisionStatus->currentCeiling = -1;
collisionStatus->unk_0A = -1;
collisionStatus->unk_0C = -1;
collisionStatus->unk_0E = -1;
collisionStatus->unk_10 = -1;
collisionStatus->currentWall = -1;
collisionStatus->lastWallHammered = -1;
collisionStatus->touchingWallTrigger = 0;
collisionStatus->bombetteExploded = -1;
collisionStatus->bombetteExplositionPos[0] = 0.0f;
collisionStatus->bombetteExplositionPos[1] = 0.0f;
collisionStatus->bombetteExplositionPos[2] = 0.0f;
}
void init_trigger_list(void) {
if (!(*gGameStatusPtr)->isBattle) {

View File

@ -3,26 +3,27 @@
char gCloudyFlowerFieldsBg[] = "fla_bg";
char gSunnyFlowerFieldsBg[] = "flb_bg";
s8 D_8014F12F = 0;
s32 D_8014F130 = 0;
f32 D_8014F134[] = { 0.0f, 0.0f, 0.0f };
void load_map_bg(char* optAssetName) {
UNK_PTR compressedData;
u32 assetSize;
char* assetName;
if (optAssetName != NULL) {
UNK_PTR compressedData;
u32 assetSize;
char* assetName = optAssetName;
if (optAssetName == NULL) return;
assetName = optAssetName;
// StoryProgress check
if (get_variable(0, 0xF5DE0180) >= 0x35) {
// Use sunny Flower Fields bg rather than cloudy
if (!strcmp(assetName, gCloudyFlowerFieldsBg)) {
assetName = gSunnyFlowerFieldsBg;
// StoryProgress check
if (get_variable(0, SI_SAVE_VAR(0)) >= 0x35) {
// Use sunny Flower Fields bg rather than cloudy
if (!strcmp(assetName, gCloudyFlowerFieldsBg)) {
assetName = gSunnyFlowerFieldsBg;
}
}
}
compressedData = load_asset_by_name(assetName, &assetSize);
decode_yay0(compressedData, &gBackgroundImage);
general_heap_free(compressedData);
compressedData = load_asset_by_name(assetName, &assetSize);
decode_yay0(compressedData, &gBackgroundImage);
general_heap_free(compressedData);
}
}
void use_default_background_settings(void) {

View File

@ -9,7 +9,14 @@ typedef struct {
/* 0xC */ s32 unkC;
} struct_80147230;
extern struct_80147230 D_8014F140;
struct_80147230 D_8014F140 = {
.fadeFlags = 0,
.fadeState = 0,
.fadeOutTime = 0,
.fadeInTime = -1,
.unkC = -1
};
extern struct_80147230 D_8015C7C0;
void reset_ambient_sounds(void) {

View File

@ -1,5 +1,32 @@
#include "common.h"
s32 D_8014F150[] = { 0x00000003, 0x00000003, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x00000003, 0x00000015,
0x00000003, 0x00000000, 0x00000009, 0x00000003, 0x00000000, 0x00000001, 0x00000003, 0x00000009,
0x0000000A, 0x00000007, 0x00000008, 0x00000003, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x0000000B, 0x0000000C, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, };
s32 D_8014F250[] = { 0x00000800, 0x0000000C, 0x00000004, 0x08000001, 0x00080000, 0x04000864, 0x00040008, 0x00000200,
0x0800B802, 0x000800FF, 0x02000C00, 0xB804000C, 0x64000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, };
s32 D_8014F298[] = { 0x32506469, 0x64000000, };
s8 D_8014F2A0[] = { 0x01, 0x01, 0x01, 0x01, };
s8 D_8014F2A4[] = { 0x00, 0x00, 0x00, 0x00, };
s32 D_8014F2A8[] = { 0x69644D39, 0x281B1008, 0x03000000, };
s8 D_8014F2B4[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
s8 D_8014F2BD = 0;
s32 D_8014F2C0[] = { 0x003F0809, 0x162B2C3F, 0x00000000, 0x00000000, };
// this is definitely wrong but I had issues trying to use an array accessor
void clear_windows(void) {
UIPanel* panelIt = gUIPanels;

View File

@ -11,7 +11,7 @@ INCLUDE_ASM(s32, "code_de740_len_23f0", render_shaded_sprite);
INCLUDE_ASM(s32, "code_de740_len_23f0", appendGfx_shaded_sprite);
void func_801491E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 alpha) {
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0x00, 0x00, 0x00, alpha);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha);
if (alpha == 255) {
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL1, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);

View File

@ -1,6 +1,27 @@
#include "common.h"
#include "map.h"
MusicPlayer D_8014F6F0 = {
.flags = 0,
.unk_02 = 0,
.fadeOutTime = -1,
.fadeInTime = 0,
.unk_0C = 0,
.unk_0E = 0,
.songID = -1,
.variation = -1,
.unk_18 = -1,
.unk_20 = 0,
.unk_24 = 0,
.unk_28 = 0,
.unk_2C = 0
};
SongID gSongsUsingVariationFlag[] = { Song_SPECIAL_BATTLE, Song_TUBBA_BLUBBA_BATTLE, Song_JR_TROOPA_BATTLE,
Song_YOSHI_KIDS_FOUND, Song_ITEM_UPGRADE, Song_NEW_PARTNER, };
s16 D_8014F738 = 0;
void transition_music_volume_to(s16 volume);
/// If the given song ID is present in gSongsUsingVariationFlag, returns the current
@ -211,7 +232,37 @@ void transition_music_volume_to(s16 volume) {
gMusicTargetVolume = volume;
}
//Data loading shenanigans
#ifdef NON_MATCHING
void func_8014AC94(void) {
s16* currentVolume;
s16 compareVolume;
s16 toVolume;
if (D_8014F738 != 0) {
D_8014F738--;
return;
}
compareVolume = gMusicTargetVolume;
if (gMusicUnkVolume2 < gMusicTargetVolume) {
compareVolume = gMusicUnkVolume2;
}
currentVolume = &gMusicCurrentVolume;
if (*currentVolume != compareVolume) {
toVolume = *currentVolume + 1;
if (*currentVolume >= compareVolume) {
toVolume = *currentVolume - 1;
}
*currentVolume = toVolume;
func_800561A4(gMusicCurrentVolume);
D_8014F738 = 3;
}
}
#else
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94);
#endif
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AD40);

View File

@ -558,7 +558,7 @@ ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) {
ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
SoundId soundID = get_variable(script, *ptrReadPos++);
SoundID soundID = get_variable(script, *ptrReadPos++);
s32 value2 = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID);

View File

@ -64,6 +64,11 @@ f32 D_800F8030 = 0.0f;
s8 D_800F8034[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
s16 D_800F803A = 0;
extern f32 D_8010CFC0;
extern s16 D_8010CFC8;
extern s16 D_8010CFCA;
extern s16 D_8010CFCE;
WorldPartner wPartners[12] = {
{}, // None
{
@ -437,7 +442,44 @@ s32 partner_can_use_ability(void) {
return FALSE;
}
// Stack size issue - something's probably up with these data vars
#ifdef NON_MATCHING
void partner_reset_data(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32* temp8010CFD8 = &D_8010CFD8;
s32* temp8010CFE8 = &D_8010CFE8;
s32 temp_s0;
temp_s0 = gPlayerData.currentPartner;
mem_clear(&D_8010EBB0, sizeof(D_8010EBB0));
get_dynamic_entity(bind_dynamic_entity_7(_use_partner_ability, NULL));
D_8010CFE0 = 1;
*temp8010CFE8 = 9;
*temp8010CFD8 = temp_s0;
if ((*gGameStatusPtr)->unk_7D != 0) {
D_8010EBB0.unk_00 = 1;
(*gGameStatusPtr)->unk_7D = 0;
}
wPartner = NULL;
D_800F833C = playerStatus->position.x;
D_800F8340 = playerStatus->position.y;
D_800F8344 = playerStatus->position.z;
if (*temp8010CFD8 == 0) {
*temp8010CFE8 = 1;
} else {
load_partner_npc();
wPartnerNpc->scale.x = 1.0f;
wPartnerNpc->scale.y = 1.0f;
wPartnerNpc->scale.z = 1.0f;
_use_partner_ability();
}
}
#else
INCLUDE_ASM(s32, "world/partners", partner_reset_data);
#endif
void partner_initialize_data(void) {
Temp8010EBB0* unk8010EBB0 = &D_8010EBB0;
@ -551,7 +593,33 @@ INCLUDE_ASM(void, "world/partners", enable_partner_walking, Npc* partner, s32 va
INCLUDE_ASM(void, "world/partners", func_800EBA3C, Npc* partner);
INCLUDE_ASM(void, "world/partners", func_800EBB40, Npc* partner);
void func_800EBB40(Npc *partner) {
PlayerStatus* playerStatus = &gPlayerStatus;
Temp8010EBB0* temp8010EBB0 = &D_8010EBB0;
if ((*gGameStatusPtr)->unk_81 == 0 || playerStatus->flags & 0x3000 || temp8010EBB0->unk_14 != 0 || temp8010EBB0->unk_02 != 0) {
if (!(playerStatus->animFlags & 0x800)) {
func_800EBC74(partner);
}
if (temp8010EBB0->unk_0C & 0x6006) {
temp8010EBB0->unk_02 = 0;
}
}
if (D_8010CFC8 != 50 && fabsf(partner->pos.y - playerStatus->position.y) > 1000.0f) {
partner->pos.x = playerStatus->position.x;
partner->pos.y = playerStatus->position.y;
partner->pos.z = playerStatus->position.z;
partner->jumpVelocity = 0.0f;
partner->jumpScale = 0.0f;
partner->flags = partner->flags & ~0x800;
}
func_800EF640(partner);
D_800F833C = partner->pos.x;
D_800F8340 = partner->pos.y;
D_800F8344 = partner->pos.z;
}
INCLUDE_ASM(s32, "world/partners", func_800EBC74);
@ -563,11 +631,6 @@ INCLUDE_ASM(void, "world/partners", func_800ED5D0, Npc* partner);
INCLUDE_ASM(s32, "world/partners", func_800ED9F8);
extern f32 D_8010CFC0;
extern s16 D_8010CFC8;
extern s16 D_8010CFCA;
extern s16 D_8010CFCE;
s32 func_800EE994(Npc* arg0) {
arg0->unk_80 = 0x10000;
D_8010CFC8 = 0;
@ -644,7 +707,37 @@ void func_800EF43C(void) {
INCLUDE_ASM(void, "world/partners", clear_partner_move_history, Npc* partner);
// Some branching / merging stuff causing issues
#ifdef NON_MATCHING
s32 func_800EF4E0(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
Camera* cameras = &gCameras;
f32 yaw;
s32 ret;
if (playerStatus->unk_90 == 0.0f) {
if (!(playerStatus->spriteFacingAngle >= 90.0f) || !(playerStatus->spriteFacingAngle < 270.0f)) {
yaw = cameras[0].currentYaw - 90.0f;
ret = 1;
} else {
yaw = cameras[0].currentYaw + 90.0f;
ret = 0;
}
} else if (get_clamped_angle_diff(cameras[0].currentYaw, playerStatus->targetYaw) < 0.0f) {
yaw = cameras[0].currentYaw - 90.0f;
ret = 1;
} else {
yaw = cameras[0].currentYaw + 90.0f;
ret = 0;
}
playerStatus->targetYaw = clamp_angle(yaw);
playerStatus->currentYaw = playerStatus->targetYaw;
return ret;
}
#else
INCLUDE_ASM(s32, "world/partners", func_800EF4E0);
#endif
void func_800EF600(void) {
Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0;

View File

@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/ethteck/splat.git
branch = master
commit = 53370e3217fb075e196c9ad4ecfdecfeac52bceb
parent = 0488245e2733bcca986dc68c5abeeeb04de3b50f
commit = 36030366ceb13038b0d4debde96df4734fd8cba9
parent = e40cb32054c2b6130598c61891560eb21836d5f0
method = merge
cmdver = 0.4.3

View File

@ -1,5 +1,6 @@
import os
import re
import subprocess
import sys
from collections import OrderedDict
from pathlib import Path, PurePath
@ -80,6 +81,13 @@ class Subsegment():
return "pal.png"
return self.type
def get_ld_file(self, options):
subdir = self.get_out_subdir(options)
obj_type = self.get_ld_obj_type(".text")
ext = self.get_ext()
return subdir, f"{self.name}.{ext}", obj_type, self.rom_start
def should_run(self, options):
return self.type in options["modes"] or "all" in options["modes"]
@ -90,12 +98,12 @@ class Subsegment():
self.name + "." + self.get_ext()
)
def scan_inner(self, segment, rom_bytes):
def scan_inner(self, segment, rom_bytes, base_path, generic_out_path):
pass
def scan(self, segment, rom_bytes):
def scan(self, segment, rom_bytes, base_path):
if self.should_run(segment.options) and not self.name.startswith("."):
self.scan_inner(segment, rom_bytes)
self.scan_inner(segment, rom_bytes, base_path, self.get_generic_out_path(base_path, segment.options))
def split_inner(self, segment, rom_bytes, base_path, generic_out_path):
pass
@ -118,10 +126,13 @@ class Subsegment():
return PaletteSubsegment
elif typ == "rgba32":
return RGBA32Subsegment
elif typ == "linker":
return LinkerSubsegment
else:
return Subsegment
class CodeSubsegment(Subsegment):
defined_funcs = set()
md = Cs(CS_ARCH_MIPS, CS_MODE_MIPS64 + CS_MODE_BIG_ENDIAN)
md.detail = True
md.skipdata = True
@ -146,10 +157,7 @@ class CodeSubsegment(Subsegment):
return re.sub(CodeSubsegment.STRIP_C_COMMENTS_RE, replacer, text)
@staticmethod
def get_funcs_defined_in_c(c_file):
with open(c_file, "r") as f:
text = CodeSubsegment.strip_c_comments(f.read())
def get_funcs_defined_in_c(text):
return set(m.group(2) for m in CodeSubsegment.C_FUNC_RE.finditer(text))
@staticmethod
@ -168,8 +176,21 @@ class CodeSubsegment(Subsegment):
return ret
def scan_inner(self, segment, rom_bytes):
@staticmethod
def get_funcs_defined_in_c(c_file):
with open(c_file, "r") as f:
text = CodeSubsegment.strip_c_comments(f.read())
return set(m.group(2) for m in CodeSubsegment.C_FUNC_RE.finditer(text))
def scan_inner(self, segment, rom_bytes, base_path, generic_out_path):
if not self.rom_start == self.rom_end:
if self.type == "c":
if segment.options.get("do_c_func_detection", True) and os.path.exists(generic_out_path):
# TODO run cpp?
self.defined_funcs = CodeSubsegment.get_funcs_defined_in_c(generic_out_path)
segment.mark_c_funcs_as_defined(self.defined_funcs)
insns = [insn for insn in CodeSubsegment.md.disasm(rom_bytes[self.rom_start : self.rom_end], self.vram_start)]
funcs = segment.process_insns(insns, self.rom_start)
@ -185,17 +206,12 @@ class CodeSubsegment(Subsegment):
def split_inner(self, segment, rom_bytes, base_path, generic_out_path):
if not self.rom_start == self.rom_end:
if self.type == "c":
defined_funcs = set()
if segment.options.get("do_c_func_detection", True) and os.path.exists(generic_out_path):
defined_funcs = CodeSubsegment.get_funcs_defined_in_c(generic_out_path)
segment.mark_c_funcs_as_defined(defined_funcs)
asm_out_dir = Segment.create_split_dir(base_path, os.path.join("asm", "nonmatchings"))
for func in self.funcs_text:
func_name = segment.get_symbol(func, type="func", local_only=True).name
if func_name not in defined_funcs:
if func_name not in self.defined_funcs:
segment.create_c_asm_file(self.funcs_text, func, asm_out_dir, self, func_name)
if not os.path.exists(generic_out_path) and segment.options.get("create_new_c_files", True):
@ -214,7 +230,7 @@ class CodeSubsegment(Subsegment):
f.write("\n".join(out_lines))
class DataSubsegment(Subsegment):
def scan_inner(self, segment, rom_bytes):
def scan_inner(self, segment, rom_bytes, base_path, generic_out_path):
if not self.type.startswith(".") or self.type == ".rodata":
self.file_text = segment.disassemble_data(self, rom_bytes)
@ -243,6 +259,10 @@ class BinSubsegment(Subsegment):
with open(generic_out_path, "wb") as f:
f.write(rom_bytes[self.rom_start : self.rom_end])
class LinkerSubsegment(Subsegment):
def get_ld_file(self, options):
return "", self.name, self.type, self.rom_start
class PaletteSubsegment(Subsegment):
def should_run(self, options):
return super().should_run(options) or "img" in options["modes"]
@ -338,8 +358,15 @@ class N64SegCode(N64Segment):
def __init__(self, segment, next_segment, options):
super().__init__(segment, next_segment, options)
self.rodata_vram_start = -1
self.rodata_vram_end = -1
# TODO Note: These start/end vram options don't really do anything yet
self.data_vram_start = segment.get("data_vram_start", -1)
self.data_vram_end = segment.get("data_vram_end", -1)
self.rodata_vram_start = segment.get("rodata_vram_start", -1)
self.rodata_vram_end = segment.get("rodata_vram_end", -1)
self.bss_vram_start = segment.get("bss_vram_start", -1)
self.bss_vram_end = segment.get("bss_vram_end", -1)
self.subsegments = self.parse_subsegments(segment)
self.is_overlay = segment.get("overlay", False)
self.all_symbols = ()
@ -360,14 +387,7 @@ class N64SegCode(N64Segment):
return f"code_{addr:X}"
def get_ld_files(self):
def transform(sub):
subdir = sub.get_out_subdir(self.options)
obj_type = sub.get_ld_obj_type(".text")
ext = sub.get_ext()
return subdir, f"{sub.name}.{ext}", obj_type, sub.rom_start
return [transform(file) for file in self.subsegments]
return [sub.get_ld_file(self.options) for sub in self.subsegments]
def get_ld_section_name(self):
path = PurePath(self.name)
@ -1013,7 +1033,7 @@ class N64SegCode(N64Segment):
def split(self, rom_bytes, base_path):
for sub in self.subsegments:
sub.scan(self, rom_bytes)
sub.scan(self, rom_bytes, base_path)
for sub in self.subsegments:
sub.split(self, rom_bytes, base_path)

View File

@ -127,20 +127,25 @@ class Segment:
i = 0
do_next = False
for subdir, path, obj_type, start in self.get_ld_files():
# Hack for non-0x10 alignment START
# Manual linker segment creation
if obj_type == "linker":
s += (
"}\n"
f"SPLAT_BEGIN_SEG({path}, 0x{start:X}, 0x{self.rom_to_ram(start):X}, {subalign_str})\n"
)
# Create new sections for non-0x10 alignment (hack)
if start % 0x10 != 0 and i != 0 or do_next:
tmp_sect_name = path.replace(".", "_")
tmp_sect_name = tmp_sect_name.replace("/", "_")
tmp_vram = start - self.rom_start + self.vram_start
s += (
"}\n"
f"SPLAT_BEGIN_SEG({tmp_sect_name}, 0x{start:X}, 0x{tmp_vram:X}, {subalign_str})\n"
f"SPLAT_BEGIN_SEG({tmp_sect_name}, 0x{start:X}, 0x{self.rom_to_ram(start):X}, {subalign_str})\n"
)
do_next = False
if start % 0x10 != 0 and i != 0:
do_next = True
# Hack for non-0x10 alignment END
path_cname = re.sub(r"[^0-9a-zA-Z_]", "_", path)
s += f" {path_cname} = .;\n"
@ -156,7 +161,8 @@ class Segment:
path = path.with_suffix(".o" if replace_ext else path.suffix + ".o")
s += f" BUILD_DIR/{path}({obj_type});\n"
if obj_type != "linker":
s += f" BUILD_DIR/{path}({obj_type});\n"
i += 1
s += (

View File

@ -1,57 +0,0 @@
.include "macro.inc"
.section .data
glabel D_8014F130
.short 0x0000, 0x0000
glabel D_8014F134
.float 0.0, 0.0, 0.0
glabel D_8014F140
.word 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF
glabel D_8014F150
.word 0x00000003, 0x00000003, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x00000003, 0x00000015, 0x00000003, 0x00000000, 0x00000009, 0x00000003, 0x00000000, 0x00000001, 0x00000003, 0x00000009, 0x0000000A, 0x00000007, 0x00000008, 0x00000003, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x0000000B, 0x0000000C, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001
glabel D_8014F250
.word 0x00000800, 0x0000000C, 0x00000004, 0x08000001, 0x00080000, 0x04000864, 0x00040008, 0x00000200, 0x0800B802, 0x000800FF, 0x02000C00, 0xB804000C, 0x64000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
glabel D_8014F298
.word 0x32506469, 0x64000000
glabel D_8014F2A0
.byte 0x01, 0x01, 0x01, 0x01
glabel D_8014F2A4
.byte 0x00, 0x00, 0x00, 0x00
glabel D_8014F2A8
.word 0x69644D39, 0x281B1008, 0x03000000
glabel D_8014F2B4
.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
glabel D_8014F2BD
.byte 0x00, 0x00, 0x00
glabel D_8014F2C0
.word 0x003F0809, 0x162B2C3F, 0x00000000, 0x00000000
glabel D_8014F2D0
.word 0x00000287, 0x000002A8, 0x00000054, 0x00000056, 0x00000024, 0x00000027, 0x00000021, 0x00000022, 0x00000349, 0x00000273, 0x00000275, 0x00000275, 0x00000274, 0x00000273, 0x00000274, 0x00000099, 0x0000009E, 0x0000032E, 0x0000008E, 0x00000089, 0x00000083, 0x00000388, 0x000000A0, 0x0000004A, 0x0000009F, 0x00000168, 0x00000185, 0x00000052, 0x0000004E, 0x0000004F, 0x00000189, 0x00000000, 0x00000000, 0x00000198, 0x00000199, 0x00000194, 0x0000019A, 0x00000091, 0x00000164, 0x00000271, 0x00000271, 0x00000274, 0x00000275, 0x00000271, 0x00000273, 0x00000271, 0x00000273, 0x00000271, 0x00000274, 0x00000275, 0x00000276, 0x00000271, 0x00000273, 0x00000271, 0x00000274, 0x00000276, 0x00000275, 0x00000271, 0x00000271, 0x00000271, 0x00000271, 0x00000276, 0x00000275, 0x00000274, 0x0000039E, 0x00000341, 0x00000207, 0x00000271, 0x00000271, 0x00000275, 0x00000276, 0x00000271, 0x00000271, 0x00000271, 0x00000050, 0x00000070, 0x0000036C, 0x0000036D, 0x00000295, 0x00000043, 0x00000197, 0x00000221, 0x0000022A, 0x0000022B, 0x00002040, 0x00000046, 0x00000033, 0x00000034, 0x00000039, 0x0000004C, 0x0000004D, 0x000001B1, 0x000001B2, 0x00000094, 0x0000005D, 0x0000005B, 0x00000060, 0x000001B3, 0x00000000, 0x000000AD, 0x000000AE, 0x000000AF, 0x0000023D, 0x000000A2, 0x00000248, 0x00000249, 0x00000391, 0x000003BC, 0x000003AD, 0x0000022C, 0x0000022D, 0x00000336, 0x00000316, 0x00000337, 0x00000317, 0x00000338, 0x00000318, 0x00000339, 0x00000319, 0x0000033A, 0x0000031A, 0x0000033B, 0x0000031B, 0x0000033C, 0x0000031C, 0x0000033D, 0x0000031D, 0x0000033E, 0x0000031E, 0x0000033F, 0x0000031F, 0x00000340, 0x00000340, 0x000002F4, 0x000002F5, 0x0000032F, 0x00000330, 0x00000334, 0x00000335, 0x000002F1, 0x000002F2, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000001CB, 0x000001CD, 0x000001CC, 0x000001CE, 0x000002A6, 0x000002A7, 0x0000020C, 0x0000020D, 0x0000020E, 0x00000259, 0x0000025A, 0x0000025C, 0x0000025D, 0x00000331, 0x00000332, 0x00000333, 0x00002078, 0x00002079, 0x00000179, 0x0000017A, 0x000001FB, 0x000001FC, 0x0000203A, 0x0000203B, 0x0000022E, 0x0000022F, 0x0000202A, 0x0000202B, 0x00002041, 0x00002042, 0x00002043, 0x00002044, 0x00002078, 0x00002079, 0x000003B6, 0x000003B7
glabel D_8014F5A4
.word 0x8014F48C, 0x00020000, 0x8014F494, 0x00020000, 0x8014F49C, 0x00020000, 0x8014F4A4, 0x00020000, 0x8014F4AC, 0x00020000, 0x8014F4B4, 0x00020000, 0x8014F4BC, 0x00020000, 0x8014F4C4, 0x00020000, 0x8014F4CC, 0x00020000, 0x8014F4D4, 0x00020000, 0x8014F4DC, 0x00020000, 0x8014F4E4, 0x00020000, 0x8014F4EC, 0x00020000, 0x8014F4F4, 0x00020000, 0x8014F4FC, 0x00020000, 0x8014F504, 0x00020000, 0x8014F50C, 0x00020000, 0x8014F514, 0x00020000, 0x8014F51C, 0x00020000, 0x8014F524, 0x00020000, 0x8014F52C, 0x00030000, 0x8014F538, 0x00020000, 0x8014F540, 0x00020000, 0x8014F548, 0x00030000, 0x8014F554, 0x00020000, 0x8014F55C, 0x00020000, 0x8014F564, 0x00020000, 0x8014F56C, 0x00020000, 0x8014F574, 0x00020000, 0x8014F57C, 0x00020000, 0x8014F584, 0x00020000, 0x8014F58C, 0x00020000, 0x8014F594, 0x00020000, 0x8014F59C, 0x00020000
glabel D_8014F6B4
.word 0x000001C1, 0x000001C2, 0x000001C3, 0x000001C4, 0x000001C5, 0x000001C6, 0x000001C7, 0x000001C8, 0x000001C9, 0x000001CA, 0x000001CB, 0x000001CC, 0x000020A3, 0x000020A4, 0x00000000
glabel D_8014F6F0
.word 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
glabel gSongsUsingVariationFlag
.word 0x00000003, 0x0000000B, 0x00000004, 0x0000004E, 0x00000042, 0x00000082
glabel D_8014F738
.short 0x0000, 0x0000, 0x0000, 0x0000

View File

@ -1,15 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_801497FC
/* DFEFC 801497FC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* DFF00 80149800 AFB00010 */ sw $s0, 0x10($sp)
/* DFF04 80149804 AFBF0014 */ sw $ra, 0x14($sp)
/* DFF08 80149808 0C015879 */ jal func_800561E4
/* DFF0C 8014980C 0080802D */ daddu $s0, $a0, $zero
/* DFF10 80149810 8FBF0014 */ lw $ra, 0x14($sp)
/* DFF14 80149814 3C018016 */ lui $at, %hi(D_80159AD4)
/* DFF18 80149818 AC309AD4 */ sw $s0, %lo(D_80159AD4)($at)
/* DFF1C 8014981C 8FB00010 */ lw $s0, 0x10($sp)
/* DFF20 80149820 03E00008 */ jr $ra
/* DFF24 80149824 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80149828
/* DFF28 80149828 3C028016 */ lui $v0, %hi(D_80159AD4)
/* DFF2C 8014982C 8C429AD4 */ lw $v0, %lo(D_80159AD4)($v0)
/* DFF30 80149830 03E00008 */ jr $ra
/* DFF34 80149834 00000000 */ nop

View File

@ -1,49 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel clear_trigger_data
/* DBD80 80145680 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DBD84 80145684 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DBD88 80145688 80420070 */ lb $v0, 0x70($v0)
/* DBD8C 8014568C 3C048016 */ lui $a0, %hi(gCollisionStatus)
/* DBD90 80145690 2484A550 */ addiu $a0, $a0, %lo(gCollisionStatus)
/* DBD94 80145694 14400005 */ bnez $v0, .L801456AC
/* DBD98 80145698 00000000 */ nop
/* DBD9C 8014569C 3C028016 */ lui $v0, %hi(gTriggerList1)
/* DBDA0 801456A0 24429190 */ addiu $v0, $v0, %lo(gTriggerList1)
/* DBDA4 801456A4 080515AD */ j .L801456B4
/* DBDA8 801456A8 00000000 */ nop
.L801456AC:
/* DBDAC 801456AC 3C028016 */ lui $v0, %hi(gTriggerList2)
/* DBDB0 801456B0 24429290 */ addiu $v0, $v0, %lo(gTriggerList2)
.L801456B4:
/* DBDB4 801456B4 3C018016 */ lui $at, %hi(gCurrentTriggerListPtr)
/* DBDB8 801456B8 AC229390 */ sw $v0, %lo(gCurrentTriggerListPtr)($at)
/* DBDBC 801456BC 3C028016 */ lui $v0, %hi(gCurrentTriggerListPtr)
/* DBDC0 801456C0 8C429390 */ lw $v0, %lo(gCurrentTriggerListPtr)($v0)
/* DBDC4 801456C4 2403003F */ addiu $v1, $zero, 0x3f
/* DBDC8 801456C8 244200FC */ addiu $v0, $v0, 0xfc
.L801456CC:
/* DBDCC 801456CC AC400000 */ sw $zero, ($v0)
/* DBDD0 801456D0 2463FFFF */ addiu $v1, $v1, -1
/* DBDD4 801456D4 0461FFFD */ bgez $v1, .L801456CC
/* DBDD8 801456D8 2442FFFC */ addiu $v0, $v0, -4
/* DBDDC 801456DC 2402FFFF */ addiu $v0, $zero, -1
/* DBDE0 801456E0 3C018015 */ lui $at, %hi(gTriggerCount)
/* DBDE4 801456E4 A4201334 */ sh $zero, %lo(gTriggerCount)($at)
/* DBDE8 801456E8 A4820000 */ sh $v0, ($a0)
/* DBDEC 801456EC A4820002 */ sh $v0, 2($a0)
/* DBDF0 801456F0 A4820004 */ sh $v0, 4($a0)
/* DBDF4 801456F4 A4820008 */ sh $v0, 8($a0)
/* DBDF8 801456F8 A482000A */ sh $v0, 0xa($a0)
/* DBDFC 801456FC A482000C */ sh $v0, 0xc($a0)
/* DBE00 80145700 A482000E */ sh $v0, 0xe($a0)
/* DBE04 80145704 A4820010 */ sh $v0, 0x10($a0)
/* DBE08 80145708 A4820012 */ sh $v0, 0x12($a0)
/* DBE0C 8014570C A4820014 */ sh $v0, 0x14($a0)
/* DBE10 80145710 A4800016 */ sh $zero, 0x16($a0)
/* DBE14 80145714 A4820018 */ sh $v0, 0x18($a0)
/* DBE18 80145718 AC80001C */ sw $zero, 0x1c($a0)
/* DBE1C 8014571C AC800020 */ sw $zero, 0x20($a0)
/* DBE20 80145720 03E00008 */ jr $ra
/* DBE24 80145724 AC800024 */ sw $zero, 0x24($a0)

View File

@ -1,85 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800EBB40
/* 84FF0 800EBB40 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 84FF4 800EBB44 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 84FF8 800EBB48 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 84FFC 800EBB4C AFB00010 */ sw $s0, 0x10($sp)
/* 85000 800EBB50 AFB20018 */ sw $s2, 0x18($sp)
/* 85004 800EBB54 3C128011 */ lui $s2, %hi(gPlayerStatus)
/* 85008 800EBB58 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus)
/* 8500C 800EBB5C AFBF001C */ sw $ra, 0x1c($sp)
/* 85010 800EBB60 AFB10014 */ sw $s1, 0x14($sp)
/* 85014 800EBB64 80420081 */ lb $v0, 0x81($v0)
/* 85018 800EBB68 3C118011 */ lui $s1, %hi(D_8010EBB0)
/* 8501C 800EBB6C 2631EBB0 */ addiu $s1, $s1, %lo(D_8010EBB0)
/* 85020 800EBB70 1040000B */ beqz $v0, .L800EBBA0
/* 85024 800EBB74 0080802D */ daddu $s0, $a0, $zero
/* 85028 800EBB78 8E420000 */ lw $v0, ($s2)
/* 8502C 800EBB7C 30423000 */ andi $v0, $v0, 0x3000
/* 85030 800EBB80 14400007 */ bnez $v0, .L800EBBA0
/* 85034 800EBB84 00000000 */ nop
/* 85038 800EBB88 82220014 */ lb $v0, 0x14($s1)
/* 8503C 800EBB8C 14400004 */ bnez $v0, .L800EBBA0
/* 85040 800EBB90 00000000 */ nop
/* 85044 800EBB94 82220002 */ lb $v0, 2($s1)
/* 85048 800EBB98 1040000B */ beqz $v0, .L800EBBC8
/* 8504C 800EBB9C 00000000 */ nop
.L800EBBA0:
/* 85050 800EBBA0 8E420004 */ lw $v0, 4($s2)
/* 85054 800EBBA4 30420800 */ andi $v0, $v0, 0x800
/* 85058 800EBBA8 14400003 */ bnez $v0, .L800EBBB8
/* 8505C 800EBBAC 00000000 */ nop
/* 85060 800EBBB0 0C03AF1D */ jal func_800EBC74
/* 85064 800EBBB4 0200202D */ daddu $a0, $s0, $zero
.L800EBBB8:
/* 85068 800EBBB8 8E22000C */ lw $v0, 0xc($s1)
/* 8506C 800EBBBC 30426006 */ andi $v0, $v0, 0x6006
/* 85070 800EBBC0 54400001 */ bnel $v0, $zero, .L800EBBC8
/* 85074 800EBBC4 A2200002 */ sb $zero, 2($s1)
.L800EBBC8:
/* 85078 800EBBC8 3C038011 */ lui $v1, %hi(D_8010CFC8)
/* 8507C 800EBBCC 8463CFC8 */ lh $v1, %lo(D_8010CFC8)($v1)
/* 85080 800EBBD0 24020032 */ addiu $v0, $zero, 0x32
/* 85084 800EBBD4 10620016 */ beq $v1, $v0, .L800EBC30
/* 85088 800EBBD8 00000000 */ nop
/* 8508C 800EBBDC C600003C */ lwc1 $f0, 0x3c($s0)
/* 85090 800EBBE0 C642002C */ lwc1 $f2, 0x2c($s2)
/* 85094 800EBBE4 46020001 */ sub.s $f0, $f0, $f2
/* 85098 800EBBE8 3C01447A */ lui $at, 0x447a
/* 8509C 800EBBEC 44811000 */ mtc1 $at, $f2
/* 850A0 800EBBF0 46000005 */ abs.s $f0, $f0
/* 850A4 800EBBF4 4600103C */ c.lt.s $f2, $f0
/* 850A8 800EBBF8 00000000 */ nop
/* 850AC 800EBBFC 4500000C */ bc1f .L800EBC30
/* 850B0 800EBC00 2403F7FF */ addiu $v1, $zero, -0x801
/* 850B4 800EBC04 C6400028 */ lwc1 $f0, 0x28($s2)
/* 850B8 800EBC08 8E020000 */ lw $v0, ($s0)
/* 850BC 800EBC0C E6000038 */ swc1 $f0, 0x38($s0)
/* 850C0 800EBC10 C640002C */ lwc1 $f0, 0x2c($s2)
/* 850C4 800EBC14 E600003C */ swc1 $f0, 0x3c($s0)
/* 850C8 800EBC18 C6400030 */ lwc1 $f0, 0x30($s2)
/* 850CC 800EBC1C 00431024 */ and $v0, $v0, $v1
/* 850D0 800EBC20 AE00001C */ sw $zero, 0x1c($s0)
/* 850D4 800EBC24 AE000014 */ sw $zero, 0x14($s0)
/* 850D8 800EBC28 AE020000 */ sw $v0, ($s0)
/* 850DC 800EBC2C E6000040 */ swc1 $f0, 0x40($s0)
.L800EBC30:
/* 850E0 800EBC30 0C03BD90 */ jal func_800EF640
/* 850E4 800EBC34 0200202D */ daddu $a0, $s0, $zero
/* 850E8 800EBC38 C6000038 */ lwc1 $f0, 0x38($s0)
/* 850EC 800EBC3C C602003C */ lwc1 $f2, 0x3c($s0)
/* 850F0 800EBC40 C6040040 */ lwc1 $f4, 0x40($s0)
/* 850F4 800EBC44 8FBF001C */ lw $ra, 0x1c($sp)
/* 850F8 800EBC48 8FB20018 */ lw $s2, 0x18($sp)
/* 850FC 800EBC4C 8FB10014 */ lw $s1, 0x14($sp)
/* 85100 800EBC50 8FB00010 */ lw $s0, 0x10($sp)
/* 85104 800EBC54 3C018010 */ lui $at, %hi(D_800F833C)
/* 85108 800EBC58 E420833C */ swc1 $f0, %lo(D_800F833C)($at)
/* 8510C 800EBC5C 3C018010 */ lui $at, %hi(D_800F8340)
/* 85110 800EBC60 E4228340 */ swc1 $f2, %lo(D_800F8340)($at)
/* 85114 800EBC64 3C018010 */ lui $at, %hi(D_800F8344)
/* 85118 800EBC68 E4248344 */ swc1 $f4, %lo(D_800F8344)($at)
/* 8511C 800EBC6C 03E00008 */ jr $ra
/* 85120 800EBC70 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -356,7 +356,10 @@ segments:
- [0xE5510, .data, code_d0a70_len_4fe0]
- [0xE56C0, .data, code_d5a50_len_5fd0]
- [0xE5820, .data, code_dc470_len_14c0]
- [0xE5830, data]
- [0xE5840, .data, code_dd930_len_1c0]
- [0xE5850, .data, code_ddaf0_len_c50]
- [0xE59D0, .data, code_DF950]
- [0xE5DF0, .data, code_e0b30_len_b80]
- [0xE5E40, rodata]
- type: code
start: 0xE79B0