Mystic Miscellaneous Matches (#732)

* Some random functions

* fixed a flag, oops

* classic coverage.py blunder

* Fixed the warning + style changes

* More warning fixes

* Remove the NON_EQUIVALENT wrapper
This commit is contained in:
JaThePlayer 2022-06-13 17:00:53 +02:00 committed by GitHub
parent e324092e0a
commit d65d58af35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 154 additions and 502 deletions

View File

@ -801,6 +801,8 @@ typedef struct ThunderboltRingFXData {
typedef struct BulbGlowFXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ Vec3f pos;
/* 0x10 */ char unk_10[0x4];
/* 0x14 */ s32 unk_14;
} BulbGlowFXData; // size = ?
// fx_quizmo_stage
@ -979,7 +981,7 @@ EffectInstance* fx_shimmer_burst(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_energy_shockwave(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_shimmer_wave(s32, f32, f32, f32, f32, f32, s32, s32);
void fx_aura(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_bulb_glow(s32, f32, f32, f32, f32, s32*);
EffectInstance* fx_bulb_glow(s32, f32, f32, f32, f32, EffectInstance**);
void fx_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*);
EffectInstance* fx_blast(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_fire_flower(s32, f32, f32, f32, s32);

View File

@ -903,7 +903,7 @@ void disable_actor_blur(Actor*);
void reset_actor_blur(Actor*);
void enable_actor_blur(Actor*);
void func_80251474(Actor*);
s32 func_8025C8A0(s32, ActorPart*);
void func_8025C8A0(s32, ActorPart*);
void func_8025CD28(s32, ActorPart*);
void func_8025CEC8(ActorPart*);
void _remove_part_decoration(ActorPart* part, s32 decorationIndex);

View File

@ -1839,14 +1839,14 @@ s32 func_8025C840(s32 arg0, ActorPart* arg1) {
return 0;
}
s32 func_8025C8A0(s32 arg0, ActorPart* arg1) {
void func_8025C8A0(s32 arg0, ActorPart* arg1) {
if (arg1->decorationTable->unk_751 != 0) {
arg1->decorationTable->unk_751 = 0;
if (arg0 == 0) {
return func_802DDFF8(0, 0, 0, 0, 0, 0, 0);
func_802DDFF8(0, 0, 0, 0, 0, 0, 0);
} else {
func_802DE894(arg1->unk_84, 0, 0, 0, 0, 0, 0);
}
return func_802DE894(arg1->unk_84, 0, 0, 0, 0, 0, 0);
}
}

View File

@ -4,41 +4,34 @@
extern f64 D_8023C060_70BD00;
extern s32 D_8023C070;
#ifdef NON_EQUIVALENT
ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partnerActor = battleStatus->partnerActor;
ActorPart* partsTable;
f32 temp_f0;
f32 temp_f2;
f32 temp_f4;
f32 temp_f4_2;
f32 temp_f6;
ActorPart* targetPart;
set_goal_pos_to_part(partnerActor + 10, partnerActor->targetActorID, partnerActor->targetPartIndex);
partsTable = get_actor_part(get_actor(partnerActor->targetActorID), partnerActor->targetPartIndex);
temp_f2 = partnerActor->walk.goalPos.x + partsTable->unk_75;
temp_f6 = partnerActor->currentPos.x + 8;
temp_f4 = partnerActor->currentPos.y + 16;
partnerActor->walk.goalPos.x = temp_f2;
partnerActor->walk.currentPos.x = temp_f6;
partnerActor->walk.currentPos.y = temp_f4;
partnerActor->walk.goalPos.y = (f32) (partnerActor->walk.goalPos.y + (f32) partsTable->unk_76);
partnerActor->walk.currentPos.z = (f32) partnerActor->currentPos.z;
temp_f0 = atan2(temp_f6, temp_f4, temp_f2, partnerActor->walk.goalPos.y);
temp_f4_2 = (temp_f0 - 90.0f) * 0.25f;
partnerActor->walk.distance = temp_f0;
partnerActor->rotation.z = temp_f4_2;
Actor* partner = gBattleStatus.partnerActor;
set_goal_pos_to_part(&partner->state, partner->targetActorID, partner->targetPartIndex);
targetPart = get_actor_part(get_actor(partner->targetActorID), partner->targetPartIndex);
if (temp_f4_2 < 0) {
partnerActor->rotation.z = 0;
partner->state.goalPos.x += targetPart->unk_75;
partner->state.goalPos.y += targetPart->unk_76;
partner->state.goalPos.z = partner->state.goalPos.z; // required to match
partner->state.currentPos.x = partner->currentPos.x + 8.0f;
partner->state.currentPos.y = partner->currentPos.y + 16.0f;
partner->state.currentPos.z = partner->currentPos.z;
partner->state.angle = atan2(
partner->state.currentPos.x, partner->state.currentPos.y,
partner->state.goalPos.x, partner->state.goalPos.y
);
partner->rotation.z = (partner->state.angle - 90.0f) * 0.25f;
if (partner->rotation.z < 0.0f) {
partner->rotation.z = 0.0f;
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "battle/partner/sushie", func_80238000_707CA0);
#endif
INCLUDE_ASM(s32, "battle/partner/sushie", func_80238114_707DB4);

View File

@ -3,6 +3,7 @@
#define NAMESPACE battle_partner_watt
extern EffectInstance* D_8023C1B0;
extern EffectInstance* D_8023C1B4;
extern s32 D_8023C1B8;
extern s32 D_8023C1BC;
@ -91,7 +92,26 @@ ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "battle/partner/watt", func_80238668_704158);
ApiStatus func_80238668_704158(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* partner = gBattleStatus.partnerActor;
f32 x = partner->currentPos.x + partner->headOffset.x;
f32 y = partner->currentPos.y + partner->headOffset.y + partner->unk_19A + 12.0f;
f32 z = partner->currentPos.z + partner->headOffset.z;
if (isInitialCall) {
script->functionTemp[0] = evt_get_variable(script, *args++);
fx_bulb_glow(0, x, y, z, 1.0f, &D_8023C1B0);
}
script->functionTemp[0]--;
if (script->functionTemp[0] == 0) {
((BulbGlowFXData*)D_8023C1B0->data)->unk_14 = 5;
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
ApiStatus func_80238784_704274(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;

View File

@ -51,8 +51,53 @@ ApiStatus func_802A163C_79070C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_802A16F4_7907C4(Evt* script, s32 isInitialCall);
INCLUDE_ASM(s32, "battle/star/chill_out/7900D0", func_802A16F4_7907C4);
ApiStatus func_802A16F4_7907C4(Evt* script, s32 isInitialCall) {
Actor* enemy = get_actor(script->owner1.enemyID);
Actor* target = get_actor(enemy->targetActorID);
ActorPart* targetPart = get_actor_part(target, enemy->targetPartIndex);
f32 x, y, z;
if (target->flags & ACTOR_FLAG_TARGET_ONLY) {
return ApiStatus_DONE2;
}
if (target->flags & ACTOR_FLAG_NO_DMG_APPLY) {
return ApiStatus_DONE2;
}
if (target->flags & ACTOR_FLAG_2000) {
return ApiStatus_DONE2;
}
if (targetPart->eventFlags & ACTOR_PART_FLAG_40000) {
return ApiStatus_DONE2;
}
if (targetPart->eventFlags & ACTOR_PART_FLAG_80000) {
return ApiStatus_DONE2;
}
target->chillOutTurns = 4;
target->chillOutAmount = 3;
dispatch_damage_event_actor_0(target, 0, 10);
x = target->currentPos.x + target->headOffset.x + (target->size.x / 2);
if (target->flags & ACTOR_FLAG_HP_OFFSET_BELOW) {
y = target->currentPos.y + target->headOffset.y - target->size.y;
} else if (!(target->flags & ACTOR_FLAG_8000)) {
y = target->currentPos.y + target->headOffset.y + target->size.y;
} else {
y = target->currentPos.y + target->headOffset.y + target->size.y * 2;
}
z = target->currentPos.z + target->headOffset.z + 5.0f;
fx_stat_change(5, x, y, z, 1.0f, 60);
sfx_play_sound(SOUND_2106);
D_802A2CC0 = 1;
return ApiStatus_DONE2;
}
EvtScript N(802A18F0) = {
EVT_CALL(GetOwnerID, LW(10))

View File

@ -501,7 +501,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_steam_burst(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STARS_ORBITING:
fx_stars_orbiting(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, &sp38);
fx_stars_orbiting(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, (EffectInstance**)&sp38);
evt_set_variable(script, a7, sp38);
break;
case EFFECT_BIG_SNOWFLAKES:
@ -540,11 +540,11 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_shimmer_wave(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
break;
case EFFECT_AURA:
fx_aura(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
fx_aura(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_BULB_GLOW:
fx_bulb_glow(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
fx_bulb_glow(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_3D:

View File

@ -4,7 +4,7 @@
Npc* playerNpc = (Npc*) 0x802DB270; // TODO: raw ptr, shiftability
extern s16 D_802DB5B0;
extern u16 D_802DB5B0;
extern VirtualEntityList D_802DB5C0;
extern VirtualEntityList D_802DB6C0;
extern VirtualEntityList* D_802DB7C0;

View File

@ -226,7 +226,20 @@ void spr_init_component_anim_state(SpriteComponent* comp, s16*** anim) {
comp->scale.z = 1.0f;
}
INCLUDE_ASM(s32, "sprite", spr_init_anim_state);
// very questionable cast, spr_init_component_anim_state args are probably wrong
void spr_init_anim_state(SpriteComponent** compList, s16** cmdList) {
SpriteComponent* component;
SpriteComponent** compListIt = compList;
s16** cmdListIt = cmdList;
while (*compListIt != (SpriteComponent*)-1) {
component = *compListIt++;
spr_init_component_anim_state(component, (s16***)*cmdListIt);
if (*cmdListIt != (s16*)-1) {
cmdListIt++;
}
}
}
void spr_set_anim_timescale(f32 timescale) {
spr_animUpdateTimeScale = timescale * 2.0f;
@ -316,24 +329,45 @@ s32 func_802DDEC4(s32 arg0) {
return D_802DF590[arg0 * 3]; // The struct of D_802DF590 is probably 0xC in size with this taking the first field.
}
INCLUDE_ASM(s32, "sprite", func_802DDEE4);
void func_802DDEE4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
SpriteComponent* component;
SpriteComponent** componentListIt;
s32 i;
#ifdef NON_EQUIVALENT
// There's a problem here: this matches if arg6 is an s32, but the uses of this function match if it is a u16...
s32 func_802DDFF8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, u16 arg6) {
return func_802DDEE4(0, -1, arg1, arg2, arg3, arg4, arg5, arg6);
if (spr_playerCurrentAnimInfo[arg0].componentList != NULL) {
componentListIt = spr_playerCurrentAnimInfo[arg0].componentList;
i = 0;
while (*componentListIt != (SpriteComponent*)-1) {
component = *componentListIt;
if (arg1 == -1 || i == arg1) {
fold_update(component->unk_4C & 0xFF, arg2, arg3, arg4, arg5, arg6, arg7);
if (arg2 != 0) {
component->unk_4C |= 0x10000000;
} else {
component->unk_4C &= ~0xF0000000;
}
}
componentListIt++;
i++;
}
}
}
#else
INCLUDE_ASM(s32, "sprite", func_802DDFF8);
#endif
void func_802DDFF8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) {
func_802DDEE4(0, -1, arg1, arg2, arg3, arg4, arg5, arg6);
}
INCLUDE_ASM(s32, "sprite", spr_get_player_raster_info);
INCLUDE_ASM(s32, "sprite", spr_get_player_palettes);
u16** spr_get_player_palettes(s32 spriteIndex) {
SpriteAnimData* sprites = spr_playerSprites[spriteIndex - 1];
if (sprites == NULL) {
return NULL;
}
return sprites->palettesOffset;
}
INCLUDE_ASM(s32, "sprite", spr_load_npc_sprite);
@ -354,7 +388,7 @@ s32 func_802DE748(s32 arg0, s32 arg1) {
return -1;
}
return componentList[arg1]->unk_4F;
return componentList[arg1]->unk_4C & 0xFF;
}
INCLUDE_ASM(s32, "sprite", func_802DE780);
@ -376,7 +410,7 @@ typedef struct UnkSpriteStruct {
s32 spr_get_npc_raster_info(SpriteRasterInfo* out, s32 npcSpriteID, s32 rasterIndex) {
SpriteAnimData* sprite = spr_npcSprites[npcSpriteID];
UnkSpriteStruct* temp_v1;
s32** paletteOffsetCopy;
u16** paletteOffsetCopy;
s32 newVar;
if (sprite != NULL) {

View File

@ -15,8 +15,7 @@ typedef struct SpriteComponent {
/* 0x28 */ Vec3f compPos;
/* 0x34 */ Vec3f rotation;
/* 0x40 */ Vec3f scale;
/* 0x4C */ char unk_4C[3];
/* 0x4F */ u8 unk_4F;
/* 0x4C */ s32 unk_4C;
} SpriteComponent; // size = 0x50
typedef struct PlayerCurrentAnimInfo {
@ -71,7 +70,7 @@ typedef struct PlayerSpriteSet {
/// Sprite data header.
typedef struct SpriteAnimData {
/* 0x00 */ s32** rastersOffset;
/* 0x04 */ s32** palettesOffset;
/* 0x04 */ u16** palettesOffset;
/* 0x08 */ s32 maxComponents;
/* 0x0C */ s32 colorVariations;
} SpriteAnimData; // size = 0x10
@ -166,10 +165,9 @@ s32 spr_draw_player_sprite(s32 arg0, s32 yaw, s32 arg2, s16** paletteList, Matri
s32 func_802DDEC4(s32 arg0);
s32 func_802DDEE4(s32, s32, s32, s32, s32, s32, s32, s32);
void func_802DDEE4(s32, s32, s32, s32, s32, s32, s32, s32);
// TODO: problem with arg6, see the NON_MATCHING in sprite.c
s32 func_802DDFF8(s32, s32, s32, s32, s32, s32, u16);
void func_802DDFF8(s32, s32, s32, s32, s32, s32, s32);
void spr_get_player_raster_info(SpriteRasterInfo* out, s32 playerSpriteID, s32 rasterIndex);

View File

@ -1,74 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80238000_707CA0
/* 707CA0 80238000 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 707CA4 80238004 AFB00010 */ sw $s0, 0x10($sp)
/* 707CA8 80238008 3C10800E */ lui $s0, %hi(gBattleStatus+0xDC)
/* 707CAC 8023800C 8E10C14C */ lw $s0, %lo(gBattleStatus+0xDC)($s0)
/* 707CB0 80238010 AFBF0014 */ sw $ra, 0x14($sp)
/* 707CB4 80238014 86050428 */ lh $a1, 0x428($s0)
/* 707CB8 80238018 82060426 */ lb $a2, 0x426($s0)
/* 707CBC 8023801C 0C09A5D5 */ jal set_goal_pos_to_part
/* 707CC0 80238020 2604000C */ addiu $a0, $s0, 0xc
/* 707CC4 80238024 86040428 */ lh $a0, 0x428($s0)
/* 707CC8 80238028 0C09A75B */ jal get_actor
/* 707CCC 8023802C 00000000 */ nop
/* 707CD0 80238030 82050426 */ lb $a1, 0x426($s0)
/* 707CD4 80238034 0C099117 */ jal get_actor_part
/* 707CD8 80238038 0040202D */ daddu $a0, $v0, $zero
/* 707CDC 8023803C 80430075 */ lb $v1, 0x75($v0)
/* 707CE0 80238040 C6020018 */ lwc1 $f2, 0x18($s0)
/* 707CE4 80238044 C6060144 */ lwc1 $f6, 0x144($s0)
/* 707CE8 80238048 44830000 */ mtc1 $v1, $f0
/* 707CEC 8023804C 00000000 */ nop
/* 707CF0 80238050 46800020 */ cvt.s.w $f0, $f0
/* 707CF4 80238054 46001080 */ add.s $f2, $f2, $f0
/* 707CF8 80238058 3C014100 */ lui $at, 0x4100
/* 707CFC 8023805C 44810000 */ mtc1 $at, $f0
/* 707D00 80238060 C6040148 */ lwc1 $f4, 0x148($s0)
/* 707D04 80238064 46003180 */ add.s $f6, $f6, $f0
/* 707D08 80238068 3C014180 */ lui $at, 0x4180
/* 707D0C 8023806C 44810000 */ mtc1 $at, $f0
/* 707D10 80238070 00000000 */ nop
/* 707D14 80238074 46002100 */ add.s $f4, $f4, $f0
/* 707D18 80238078 E6020018 */ swc1 $f2, 0x18($s0)
/* 707D1C 8023807C 44061000 */ mfc1 $a2, $f2
/* 707D20 80238080 80420076 */ lb $v0, 0x76($v0)
/* 707D24 80238084 C602001C */ lwc1 $f2, 0x1c($s0)
/* 707D28 80238088 44820000 */ mtc1 $v0, $f0
/* 707D2C 8023808C 00000000 */ nop
/* 707D30 80238090 46800020 */ cvt.s.w $f0, $f0
/* 707D34 80238094 46001080 */ add.s $f2, $f2, $f0
/* 707D38 80238098 C6000020 */ lwc1 $f0, 0x20($s0)
/* 707D3C 8023809C E606000C */ swc1 $f6, 0xc($s0)
/* 707D40 802380A0 46003306 */ mov.s $f12, $f6
/* 707D44 802380A4 E6040010 */ swc1 $f4, 0x10($s0)
/* 707D48 802380A8 E602001C */ swc1 $f2, 0x1c($s0)
/* 707D4C 802380AC C602014C */ lwc1 $f2, 0x14c($s0)
/* 707D50 802380B0 8E07001C */ lw $a3, 0x1c($s0)
/* 707D54 802380B4 46002386 */ mov.s $f14, $f4
/* 707D58 802380B8 0C00A720 */ jal atan2
/* 707D5C 802380BC E6020014 */ swc1 $f2, 0x14($s0)
/* 707D60 802380C0 3C0142B4 */ lui $at, 0x42b4
/* 707D64 802380C4 44812000 */ mtc1 $at, $f4
/* 707D68 802380C8 00000000 */ nop
/* 707D6C 802380CC 46040101 */ sub.s $f4, $f0, $f4
/* 707D70 802380D0 3C013E80 */ lui $at, 0x3e80
/* 707D74 802380D4 44811000 */ mtc1 $at, $f2
/* 707D78 802380D8 00000000 */ nop
/* 707D7C 802380DC 46022102 */ mul.s $f4, $f4, $f2
/* 707D80 802380E0 00000000 */ nop
/* 707D84 802380E4 44801000 */ mtc1 $zero, $f2
/* 707D88 802380E8 E6000054 */ swc1 $f0, 0x54($s0)
/* 707D8C 802380EC 4602203C */ c.lt.s $f4, $f2
/* 707D90 802380F0 00000000 */ nop
/* 707D94 802380F4 45000002 */ bc1f .L80238100
/* 707D98 802380F8 E6040164 */ swc1 $f4, 0x164($s0)
/* 707D9C 802380FC E6020164 */ swc1 $f2, 0x164($s0)
.L80238100:
/* 707DA0 80238100 8FBF0014 */ lw $ra, 0x14($sp)
/* 707DA4 80238104 8FB00010 */ lw $s0, 0x10($sp)
/* 707DA8 80238108 24020002 */ addiu $v0, $zero, 2
/* 707DAC 8023810C 03E00008 */ jr $ra
/* 707DB0 80238110 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,78 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80238668_704158
/* 704158 80238668 3C03800E */ lui $v1, %hi(gBattleStatus+0xDC)
/* 70415C 8023866C 8C63C14C */ lw $v1, %lo(gBattleStatus+0xDC)($v1)
/* 704160 80238670 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 704164 80238674 AFBF001C */ sw $ra, 0x1c($sp)
/* 704168 80238678 AFB00018 */ sw $s0, 0x18($sp)
/* 70416C 8023867C F7B80030 */ sdc1 $f24, 0x30($sp)
/* 704170 80238680 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 704174 80238684 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 704178 80238688 84620150 */ lh $v0, 0x150($v1)
/* 70417C 8023868C C4620144 */ lwc1 $f2, 0x144($v1)
/* 704180 80238690 44820000 */ mtc1 $v0, $f0
/* 704184 80238694 00000000 */ nop
/* 704188 80238698 46800020 */ cvt.s.w $f0, $f0
/* 70418C 8023869C 46001600 */ add.s $f24, $f2, $f0
/* 704190 802386A0 84620152 */ lh $v0, 0x152($v1)
/* 704194 802386A4 C4620148 */ lwc1 $f2, 0x148($v1)
/* 704198 802386A8 44820000 */ mtc1 $v0, $f0
/* 70419C 802386AC 00000000 */ nop
/* 7041A0 802386B0 46800020 */ cvt.s.w $f0, $f0
/* 7041A4 802386B4 46001080 */ add.s $f2, $f2, $f0
/* 7041A8 802386B8 8062019A */ lb $v0, 0x19a($v1)
/* 7041AC 802386BC 0080802D */ daddu $s0, $a0, $zero
/* 7041B0 802386C0 44820000 */ mtc1 $v0, $f0
/* 7041B4 802386C4 00000000 */ nop
/* 7041B8 802386C8 46800020 */ cvt.s.w $f0, $f0
/* 7041BC 802386CC 46001080 */ add.s $f2, $f2, $f0
/* 7041C0 802386D0 3C014140 */ lui $at, 0x4140
/* 7041C4 802386D4 44810000 */ mtc1 $at, $f0
/* 7041C8 802386D8 84620154 */ lh $v0, 0x154($v1)
/* 7041CC 802386DC 46001580 */ add.s $f22, $f2, $f0
/* 7041D0 802386E0 44820000 */ mtc1 $v0, $f0
/* 7041D4 802386E4 00000000 */ nop
/* 7041D8 802386E8 46800020 */ cvt.s.w $f0, $f0
/* 7041DC 802386EC C462014C */ lwc1 $f2, 0x14c($v1)
/* 7041E0 802386F0 8E02000C */ lw $v0, 0xc($s0)
/* 7041E4 802386F4 10A00010 */ beqz $a1, .L80238738
/* 7041E8 802386F8 46001500 */ add.s $f20, $f2, $f0
/* 7041EC 802386FC 8C450000 */ lw $a1, ($v0)
/* 7041F0 80238700 0C0B1EAF */ jal evt_get_variable
/* 7041F4 80238704 00000000 */ nop
/* 7041F8 80238708 4405C000 */ mfc1 $a1, $f24
/* 7041FC 8023870C 3C013F80 */ lui $at, 0x3f80
/* 704200 80238710 44810000 */ mtc1 $at, $f0
/* 704204 80238714 4406B000 */ mfc1 $a2, $f22
/* 704208 80238718 4407A000 */ mfc1 $a3, $f20
/* 70420C 8023871C 0000202D */ daddu $a0, $zero, $zero
/* 704210 80238720 AE020070 */ sw $v0, 0x70($s0)
/* 704214 80238724 3C028024 */ lui $v0, %hi(D_8023C1B0)
/* 704218 80238728 2442C1B0 */ addiu $v0, $v0, %lo(D_8023C1B0)
/* 70421C 8023872C AFA20014 */ sw $v0, 0x14($sp)
/* 704220 80238730 0C01C3C4 */ jal fx_bulb_glow
/* 704224 80238734 E7A00010 */ swc1 $f0, 0x10($sp)
.L80238738:
/* 704228 80238738 8E020070 */ lw $v0, 0x70($s0)
/* 70422C 8023873C 2442FFFF */ addiu $v0, $v0, -1
/* 704230 80238740 10400003 */ beqz $v0, .L80238750
/* 704234 80238744 AE020070 */ sw $v0, 0x70($s0)
/* 704238 80238748 0808E1DA */ j .L80238768
/* 70423C 8023874C 0000102D */ daddu $v0, $zero, $zero
.L80238750:
/* 704240 80238750 3C038024 */ lui $v1, %hi(D_8023C1B0)
/* 704244 80238754 8C63C1B0 */ lw $v1, %lo(D_8023C1B0)($v1)
/* 704248 80238758 24020002 */ addiu $v0, $zero, 2
/* 70424C 8023875C 8C64000C */ lw $a0, 0xc($v1)
/* 704250 80238760 24030005 */ addiu $v1, $zero, 5
/* 704254 80238764 AC830014 */ sw $v1, 0x14($a0)
.L80238768:
/* 704258 80238768 8FBF001C */ lw $ra, 0x1c($sp)
/* 70425C 8023876C 8FB00018 */ lw $s0, 0x18($sp)
/* 704260 80238770 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 704264 80238774 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 704268 80238778 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 70426C 8023877C 03E00008 */ jr $ra
/* 704270 80238780 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,136 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802A16F4_7907C4
/* 7907C4 802A16F4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 7907C8 802A16F8 AFBF001C */ sw $ra, 0x1c($sp)
/* 7907CC 802A16FC AFB00018 */ sw $s0, 0x18($sp)
/* 7907D0 802A1700 0C09A75B */ jal get_actor
/* 7907D4 802A1704 8C840148 */ lw $a0, 0x148($a0)
/* 7907D8 802A1708 0040802D */ daddu $s0, $v0, $zero
/* 7907DC 802A170C 0C09A75B */ jal get_actor
/* 7907E0 802A1710 86040428 */ lh $a0, 0x428($s0)
/* 7907E4 802A1714 82050426 */ lb $a1, 0x426($s0)
/* 7907E8 802A1718 0040802D */ daddu $s0, $v0, $zero
/* 7907EC 802A171C 0C099117 */ jal get_actor_part
/* 7907F0 802A1720 0200202D */ daddu $a0, $s0, $zero
/* 7907F4 802A1724 8E030000 */ lw $v1, ($s0)
/* 7907F8 802A1728 0040202D */ daddu $a0, $v0, $zero
/* 7907FC 802A172C 30624000 */ andi $v0, $v1, 0x4000
/* 790800 802A1730 14400069 */ bnez $v0, .L802A18D8
/* 790804 802A1734 24020002 */ addiu $v0, $zero, 2
/* 790808 802A1738 3C020040 */ lui $v0, 0x40
/* 79080C 802A173C 00621024 */ and $v0, $v1, $v0
/* 790810 802A1740 10400003 */ beqz $v0, .L802A1750
/* 790814 802A1744 30622000 */ andi $v0, $v1, 0x2000
/* 790818 802A1748 080A8636 */ j .L802A18D8
/* 79081C 802A174C 24020002 */ addiu $v0, $zero, 2
.L802A1750:
/* 790820 802A1750 14400061 */ bnez $v0, .L802A18D8
/* 790824 802A1754 24020002 */ addiu $v0, $zero, 2
/* 790828 802A1758 8C83007C */ lw $v1, 0x7c($a0)
/* 79082C 802A175C 3C020004 */ lui $v0, 4
/* 790830 802A1760 00621024 */ and $v0, $v1, $v0
/* 790834 802A1764 1440005C */ bnez $v0, .L802A18D8
/* 790838 802A1768 24020002 */ addiu $v0, $zero, 2
/* 79083C 802A176C 3C020008 */ lui $v0, 8
/* 790840 802A1770 00621024 */ and $v0, $v1, $v0
/* 790844 802A1774 14400058 */ bnez $v0, .L802A18D8
/* 790848 802A1778 24020002 */ addiu $v0, $zero, 2
/* 79084C 802A177C 0200202D */ daddu $a0, $s0, $zero
/* 790850 802A1780 0000282D */ daddu $a1, $zero, $zero
/* 790854 802A1784 2406000A */ addiu $a2, $zero, 0xa
/* 790858 802A1788 24020004 */ addiu $v0, $zero, 4
/* 79085C 802A178C A2020224 */ sb $v0, 0x224($s0)
/* 790860 802A1790 24020003 */ addiu $v0, $zero, 3
/* 790864 802A1794 0C09E23E */ jal dispatch_damage_event_actor_0
/* 790868 802A1798 A2020223 */ sb $v0, 0x223($s0)
/* 79086C 802A179C 86020150 */ lh $v0, 0x150($s0)
/* 790870 802A17A0 C6000144 */ lwc1 $f0, 0x144($s0)
/* 790874 802A17A4 8E030000 */ lw $v1, ($s0)
/* 790878 802A17A8 44821000 */ mtc1 $v0, $f2
/* 79087C 802A17AC 00000000 */ nop
/* 790880 802A17B0 468010A0 */ cvt.s.w $f2, $f2
/* 790884 802A17B4 92020190 */ lbu $v0, 0x190($s0)
/* 790888 802A17B8 46020000 */ add.s $f0, $f0, $f2
/* 79088C 802A17BC 00021042 */ srl $v0, $v0, 1
/* 790890 802A17C0 44821000 */ mtc1 $v0, $f2
/* 790894 802A17C4 00000000 */ nop
/* 790898 802A17C8 468010A0 */ cvt.s.w $f2, $f2
/* 79089C 802A17CC 30620800 */ andi $v0, $v1, 0x800
/* 7908A0 802A17D0 1040000D */ beqz $v0, .L802A1808
/* 7908A4 802A17D4 46020100 */ add.s $f4, $f0, $f2
/* 7908A8 802A17D8 86020152 */ lh $v0, 0x152($s0)
/* 7908AC 802A17DC C6000148 */ lwc1 $f0, 0x148($s0)
/* 7908B0 802A17E0 44821000 */ mtc1 $v0, $f2
/* 7908B4 802A17E4 00000000 */ nop
/* 7908B8 802A17E8 468010A0 */ cvt.s.w $f2, $f2
/* 7908BC 802A17EC 92020191 */ lbu $v0, 0x191($s0)
/* 7908C0 802A17F0 46020000 */ add.s $f0, $f0, $f2
/* 7908C4 802A17F4 44821000 */ mtc1 $v0, $f2
/* 7908C8 802A17F8 00000000 */ nop
/* 7908CC 802A17FC 468010A0 */ cvt.s.w $f2, $f2
/* 7908D0 802A1800 080A861D */ j .L802A1874
/* 7908D4 802A1804 46020001 */ sub.s $f0, $f0, $f2
.L802A1808:
/* 7908D8 802A1808 30628000 */ andi $v0, $v1, 0x8000
/* 7908DC 802A180C 1440000D */ bnez $v0, .L802A1844
/* 7908E0 802A1810 00000000 */ nop
/* 7908E4 802A1814 86020152 */ lh $v0, 0x152($s0)
/* 7908E8 802A1818 C6000148 */ lwc1 $f0, 0x148($s0)
/* 7908EC 802A181C 44821000 */ mtc1 $v0, $f2
/* 7908F0 802A1820 00000000 */ nop
/* 7908F4 802A1824 468010A0 */ cvt.s.w $f2, $f2
/* 7908F8 802A1828 92020191 */ lbu $v0, 0x191($s0)
/* 7908FC 802A182C 46020000 */ add.s $f0, $f0, $f2
/* 790900 802A1830 44821000 */ mtc1 $v0, $f2
/* 790904 802A1834 00000000 */ nop
/* 790908 802A1838 468010A0 */ cvt.s.w $f2, $f2
/* 79090C 802A183C 080A861D */ j .L802A1874
/* 790910 802A1840 46001000 */ add.s $f0, $f2, $f0
.L802A1844:
/* 790914 802A1844 86020152 */ lh $v0, 0x152($s0)
/* 790918 802A1848 C6020148 */ lwc1 $f2, 0x148($s0)
/* 79091C 802A184C 44820000 */ mtc1 $v0, $f0
/* 790920 802A1850 00000000 */ nop
/* 790924 802A1854 46800020 */ cvt.s.w $f0, $f0
/* 790928 802A1858 92020191 */ lbu $v0, 0x191($s0)
/* 79092C 802A185C 46001080 */ add.s $f2, $f2, $f0
/* 790930 802A1860 00021040 */ sll $v0, $v0, 1
/* 790934 802A1864 44820000 */ mtc1 $v0, $f0
/* 790938 802A1868 00000000 */ nop
/* 79093C 802A186C 46800020 */ cvt.s.w $f0, $f0
/* 790940 802A1870 46001000 */ add.s $f0, $f2, $f0
.L802A1874:
/* 790944 802A1874 86020154 */ lh $v0, 0x154($s0)
/* 790948 802A1878 44060000 */ mfc1 $a2, $f0
/* 79094C 802A187C C600014C */ lwc1 $f0, 0x14c($s0)
/* 790950 802A1880 44821000 */ mtc1 $v0, $f2
/* 790954 802A1884 00000000 */ nop
/* 790958 802A1888 468010A0 */ cvt.s.w $f2, $f2
/* 79095C 802A188C 46020000 */ add.s $f0, $f0, $f2
/* 790960 802A1890 3C0140A0 */ lui $at, 0x40a0
/* 790964 802A1894 44811000 */ mtc1 $at, $f2
/* 790968 802A1898 24040005 */ addiu $a0, $zero, 5
/* 79096C 802A189C 46020000 */ add.s $f0, $f0, $f2
/* 790970 802A18A0 44052000 */ mfc1 $a1, $f4
/* 790974 802A18A4 3C013F80 */ lui $at, 0x3f80
/* 790978 802A18A8 44812000 */ mtc1 $at, $f4
/* 79097C 802A18AC 44070000 */ mfc1 $a3, $f0
/* 790980 802A18B0 2402003C */ addiu $v0, $zero, 0x3c
/* 790984 802A18B4 AFA20014 */ sw $v0, 0x14($sp)
/* 790988 802A18B8 0C01C634 */ jal fx_stat_change
/* 79098C 802A18BC E7A40010 */ swc1 $f4, 0x10($sp)
/* 790990 802A18C0 0C05272D */ jal sfx_play_sound
/* 790994 802A18C4 24042106 */ addiu $a0, $zero, 0x2106
/* 790998 802A18C8 24020002 */ addiu $v0, $zero, 2
/* 79099C 802A18CC 24030001 */ addiu $v1, $zero, 1
/* 7909A0 802A18D0 3C01802A */ lui $at, %hi(D_802A2CC0)
/* 7909A4 802A18D4 AC232CC0 */ sw $v1, %lo(D_802A2CC0)($at)
.L802A18D8:
/* 7909A8 802A18D8 8FBF001C */ lw $ra, 0x1c($sp)
/* 7909AC 802A18DC 8FB00018 */ lw $s0, 0x18($sp)
/* 7909B0 802A18E0 03E00008 */ jr $ra
/* 7909B4 802A18E4 27BD0020 */ addiu $sp, $sp, 0x20
/* 7909B8 802A18E8 00000000 */ nop
/* 7909BC 802A18EC 00000000 */ nop

View File

@ -1,79 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802DDEE4
/* 100FD4 802DDEE4 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 100FD8 802DDEE8 AFB40030 */ sw $s4, 0x30($sp)
/* 100FDC 802DDEEC 00A0A02D */ daddu $s4, $a1, $zero
/* 100FE0 802DDEF0 AFB50034 */ sw $s5, 0x34($sp)
/* 100FE4 802DDEF4 00041040 */ sll $v0, $a0, 1
/* 100FE8 802DDEF8 00441021 */ addu $v0, $v0, $a0
/* 100FEC 802DDEFC 00021080 */ sll $v0, $v0, 2
/* 100FF0 802DDF00 AFBF0044 */ sw $ra, 0x44($sp)
/* 100FF4 802DDF04 AFBE0040 */ sw $fp, 0x40($sp)
/* 100FF8 802DDF08 AFB7003C */ sw $s7, 0x3c($sp)
/* 100FFC 802DDF0C AFB60038 */ sw $s6, 0x38($sp)
/* 101000 802DDF10 AFB3002C */ sw $s3, 0x2c($sp)
/* 101004 802DDF14 AFB20028 */ sw $s2, 0x28($sp)
/* 101008 802DDF18 AFB10024 */ sw $s1, 0x24($sp)
/* 10100C 802DDF1C AFB00020 */ sw $s0, 0x20($sp)
/* 101010 802DDF20 AFA70054 */ sw $a3, 0x54($sp)
/* 101014 802DDF24 3C01802E */ lui $at, %hi(spr_playerCurrentAnimInfo)
/* 101018 802DDF28 00220821 */ addu $at, $at, $v0
/* 10101C 802DDF2C 8C22F588 */ lw $v0, %lo(spr_playerCurrentAnimInfo)($at)
/* 101020 802DDF30 8FBE0064 */ lw $fp, 0x64($sp)
/* 101024 802DDF34 10400024 */ beqz $v0, .L802DDFC8
/* 101028 802DDF38 00C0A82D */ daddu $s5, $a2, $zero
/* 10102C 802DDF3C 0040882D */ daddu $s1, $v0, $zero
/* 101030 802DDF40 8E230000 */ lw $v1, ($s1)
/* 101034 802DDF44 2402FFFF */ addiu $v0, $zero, -1
/* 101038 802DDF48 1062001F */ beq $v1, $v0, .L802DDFC8
/* 10103C 802DDF4C 0000902D */ daddu $s2, $zero, $zero
/* 101040 802DDF50 0040982D */ daddu $s3, $v0, $zero
/* 101044 802DDF54 3C171000 */ lui $s7, 0x1000
/* 101048 802DDF58 3C160FFF */ lui $s6, 0xfff
/* 10104C 802DDF5C 36D6FFFF */ ori $s6, $s6, 0xffff
.L802DDF60:
/* 101050 802DDF60 12930003 */ beq $s4, $s3, .L802DDF70
/* 101054 802DDF64 8E300000 */ lw $s0, ($s1)
/* 101058 802DDF68 56540014 */ bnel $s2, $s4, .L802DDFBC
/* 10105C 802DDF6C 26310004 */ addiu $s1, $s1, 4
.L802DDF70:
/* 101060 802DDF70 8FA8005C */ lw $t0, 0x5c($sp)
/* 101064 802DDF74 9204004F */ lbu $a0, 0x4f($s0)
/* 101068 802DDF78 8FA60054 */ lw $a2, 0x54($sp)
/* 10106C 802DDF7C 8FA70058 */ lw $a3, 0x58($sp)
/* 101070 802DDF80 AFA80010 */ sw $t0, 0x10($sp)
/* 101074 802DDF84 8FA80060 */ lw $t0, 0x60($sp)
/* 101078 802DDF88 02A0282D */ daddu $a1, $s5, $zero
/* 10107C 802DDF8C AFBE0018 */ sw $fp, 0x18($sp)
/* 101080 802DDF90 0C04EAA7 */ jal fold_update
/* 101084 802DDF94 AFA80014 */ sw $t0, 0x14($sp)
/* 101088 802DDF98 12A00004 */ beqz $s5, .L802DDFAC
/* 10108C 802DDF9C 00000000 */ nop
/* 101090 802DDFA0 8E02004C */ lw $v0, 0x4c($s0)
/* 101094 802DDFA4 080B77ED */ j .L802DDFB4
/* 101098 802DDFA8 00571025 */ or $v0, $v0, $s7
.L802DDFAC:
/* 10109C 802DDFAC 8E02004C */ lw $v0, 0x4c($s0)
/* 1010A0 802DDFB0 00561024 */ and $v0, $v0, $s6
.L802DDFB4:
/* 1010A4 802DDFB4 AE02004C */ sw $v0, 0x4c($s0)
/* 1010A8 802DDFB8 26310004 */ addiu $s1, $s1, 4
.L802DDFBC:
/* 1010AC 802DDFBC 8E220000 */ lw $v0, ($s1)
/* 1010B0 802DDFC0 1453FFE7 */ bne $v0, $s3, .L802DDF60
/* 1010B4 802DDFC4 26520001 */ addiu $s2, $s2, 1
.L802DDFC8:
/* 1010B8 802DDFC8 8FBF0044 */ lw $ra, 0x44($sp)
/* 1010BC 802DDFCC 8FBE0040 */ lw $fp, 0x40($sp)
/* 1010C0 802DDFD0 8FB7003C */ lw $s7, 0x3c($sp)
/* 1010C4 802DDFD4 8FB60038 */ lw $s6, 0x38($sp)
/* 1010C8 802DDFD8 8FB50034 */ lw $s5, 0x34($sp)
/* 1010CC 802DDFDC 8FB40030 */ lw $s4, 0x30($sp)
/* 1010D0 802DDFE0 8FB3002C */ lw $s3, 0x2c($sp)
/* 1010D4 802DDFE4 8FB20028 */ lw $s2, 0x28($sp)
/* 1010D8 802DDFE8 8FB10024 */ lw $s1, 0x24($sp)
/* 1010DC 802DDFEC 8FB00020 */ lw $s0, 0x20($sp)
/* 1010E0 802DDFF0 03E00008 */ jr $ra
/* 1010E4 802DDFF4 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,23 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802DDFF8
/* 1010E8 802DDFF8 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 1010EC 802DDFFC 00A0402D */ daddu $t0, $a1, $zero
/* 1010F0 802DE000 00C0482D */ daddu $t1, $a2, $zero
/* 1010F4 802DE004 2405FFFF */ addiu $a1, $zero, -1
/* 1010F8 802DE008 8FA20038 */ lw $v0, 0x38($sp)
/* 1010FC 802DE00C 8FA3003C */ lw $v1, 0x3c($sp)
/* 101100 802DE010 8FA40040 */ lw $a0, 0x40($sp)
/* 101104 802DE014 0100302D */ daddu $a2, $t0, $zero
/* 101108 802DE018 AFA70010 */ sw $a3, 0x10($sp)
/* 10110C 802DE01C 0120382D */ daddu $a3, $t1, $zero
/* 101110 802DE020 AFBF0020 */ sw $ra, 0x20($sp)
/* 101114 802DE024 AFA4001C */ sw $a0, 0x1c($sp)
/* 101118 802DE028 0000202D */ daddu $a0, $zero, $zero
/* 10111C 802DE02C AFA20014 */ sw $v0, 0x14($sp)
/* 101120 802DE030 0C0B77B9 */ jal func_802DDEE4
/* 101124 802DE034 AFA30018 */ sw $v1, 0x18($sp)
/* 101128 802DE038 8FBF0020 */ lw $ra, 0x20($sp)
/* 10112C 802DE03C 03E00008 */ jr $ra
/* 101130 802DE040 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,16 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel spr_get_player_palettes
/* 1011B0 802DE0C0 2484FFFF */ addiu $a0, $a0, -1
/* 1011B4 802DE0C4 00042080 */ sll $a0, $a0, 2
/* 1011B8 802DE0C8 3C02802E */ lui $v0, %hi(spr_playerSprites)
/* 1011BC 802DE0CC 00441021 */ addu $v0, $v0, $a0
/* 1011C0 802DE0D0 8C42F548 */ lw $v0, %lo(spr_playerSprites)($v0)
/* 1011C4 802DE0D4 10400003 */ beqz $v0, .L802DE0E4
/* 1011C8 802DE0D8 00000000 */ nop
/* 1011CC 802DE0DC 03E00008 */ jr $ra
/* 1011D0 802DE0E0 8C420004 */ lw $v0, 4($v0)
.L802DE0E4:
/* 1011D4 802DE0E4 03E00008 */ jr $ra
/* 1011D8 802DE0E8 0000102D */ daddu $v0, $zero, $zero

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel spr_init_anim_state
/* 100910 802DD820 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 100914 802DD824 AFB00010 */ sw $s0, 0x10($sp)
/* 100918 802DD828 0080802D */ daddu $s0, $a0, $zero
/* 10091C 802DD82C AFB10014 */ sw $s1, 0x14($sp)
/* 100920 802DD830 AFBF001C */ sw $ra, 0x1c($sp)
/* 100924 802DD834 AFB20018 */ sw $s2, 0x18($sp)
/* 100928 802DD838 8E030000 */ lw $v1, ($s0)
/* 10092C 802DD83C 2402FFFF */ addiu $v0, $zero, -1
/* 100930 802DD840 1062000C */ beq $v1, $v0, .L802DD874
/* 100934 802DD844 00A0882D */ daddu $s1, $a1, $zero
/* 100938 802DD848 0040902D */ daddu $s2, $v0, $zero
.L802DD84C:
/* 10093C 802DD84C 8E040000 */ lw $a0, ($s0)
/* 100940 802DD850 8E250000 */ lw $a1, ($s1)
/* 100944 802DD854 0C0B75EC */ jal spr_init_component_anim_state
/* 100948 802DD858 26100004 */ addiu $s0, $s0, 4
/* 10094C 802DD85C 8E220000 */ lw $v0, ($s1)
/* 100950 802DD860 54520001 */ bnel $v0, $s2, .L802DD868
/* 100954 802DD864 26310004 */ addiu $s1, $s1, 4
.L802DD868:
/* 100958 802DD868 8E020000 */ lw $v0, ($s0)
/* 10095C 802DD86C 1452FFF7 */ bne $v0, $s2, .L802DD84C
/* 100960 802DD870 00000000 */ nop
.L802DD874:
/* 100964 802DD874 8FBF001C */ lw $ra, 0x1c($sp)
/* 100968 802DD878 8FB20018 */ lw $s2, 0x18($sp)
/* 10096C 802DD87C 8FB10014 */ lw $s1, 0x14($sp)
/* 100970 802DD880 8FB00010 */ lw $s0, 0x10($sp)
/* 100974 802DD884 03E00008 */ jr $ra
/* 100978 802DD888 27BD0020 */ addiu $sp, $sp, 0x20