pra2 battle map (#720)

* area_pra2

* finish

* sound enum

* renamed enum member

* fixed alignment
This commit is contained in:
Unnunu 2022-05-30 21:39:42 +03:00 committed by GitHub
parent b4ee2f8a75
commit d8837960b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 2660 additions and 512 deletions

View File

@ -674,6 +674,30 @@ typedef struct Effect6BFXData {
/* 0x40 */ char unk_40[0x4]; /* 0x40 */ char unk_40[0x4];
} Effect6BFXData; // size = 0x44 } Effect6BFXData; // size = 0x44
typedef struct HuffPuffBreathFXData {
/* 0x00 */ char unk_00[0x18];
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ char unk_24[0x4];
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
} HuffPuffBreathFXData; // size = ?
typedef struct LightningBoltFXData {
/* 0x00 */ char unk_00[0xC];
/* 0x0C */ f32 unk_0C;
/* 0x10 */ char unk_10[0x20];
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ char unk_3C[0x4];
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
/* 0x48 */ s32 unk_48;
} LightningBoltFXData; // size = ?
typedef struct ColdBreathFXData { typedef struct ColdBreathFXData {
/* 0x00 */ char unk_00[0x18]; /* 0x00 */ char unk_00[0x18];
/* 0x18 */ s32 unk_18; /* 0x18 */ s32 unk_18;
@ -709,7 +733,11 @@ typedef struct Effect6FFXData {
} Effect6FFXData; // size = 0x44 } Effect6FFXData; // size = 0x44
typedef struct MiscParticlesFXData { typedef struct MiscParticlesFXData {
char unk_00[0x38]; char unk_00[0x4];
Vec3f pos;
f32 scaleX;
f32 scaleY;
char unk_18[0x20];
s32 unk_38; s32 unk_38;
s32 unk_3C; s32 unk_3C;
s32 unk_40; s32 unk_40;

View File

@ -591,11 +591,15 @@ enum SoundIDs {
SOUND_SMOKE_BURST = 0x000002CD, SOUND_SMOKE_BURST = 0x000002CD,
SOUND_DAYZEE_SONG = 0x000002D7, SOUND_DAYZEE_SONG = 0x000002D7,
SOUND_POWER_UP = 0x000002D8, SOUND_POWER_UP = 0x000002D8,
SOUND_2DE = 0x000002DE,
SOUND_2DF = 0x000002DF,
SOUND_2E0 = 0x000002E0,
SOUND_2F1 = 0x000002F1, SOUND_2F1 = 0x000002F1,
SOUND_2F4 = 0x000002F4, SOUND_2F4 = 0x000002F4,
SOUND_2F6 = 0x000002F6, SOUND_2F6 = 0x000002F6,
SOUND_2F7 = 0x000002F7, SOUND_2F7 = 0x000002F7,
SOUND_CLOSE_SHELL = 0x000002FF, SOUND_CLOSE_SHELL = 0x000002FF,
SOUND_301 = 0x00000301,
SOUND_SHY_GUY_SCREAMS1 = 0x0000030C, SOUND_SHY_GUY_SCREAMS1 = 0x0000030C,
SOUND_SHY_GUY_SCREAMS2 = 0x0000030D, SOUND_SHY_GUY_SCREAMS2 = 0x0000030D,
SOUND_SHY_GUY_SCREAMS3 = 0x0000030E, SOUND_SHY_GUY_SCREAMS3 = 0x0000030E,
@ -610,6 +614,7 @@ enum SoundIDs {
SOUND_32E = 0x0000032E, SOUND_32E = 0x0000032E,
SOUND_32F = 0x0000032F, SOUND_32F = 0x0000032F,
SOUND_359 = 0x00000359, SOUND_359 = 0x00000359,
SOUND_35D = 0x0000035D,
SOUND_361 = 0x00000361, SOUND_361 = 0x00000361,
SOUND_362 = 0x00000362, SOUND_362 = 0x00000362,
SOUND_363 = 0x00000363, SOUND_363 = 0x00000363,
@ -627,7 +632,9 @@ enum SoundIDs {
SOUND_HIT_PLAYER_SHOCK = 0x0000037A, SOUND_HIT_PLAYER_SHOCK = 0x0000037A,
SOUND_HIT_SHOCK = 0x0000037B, SOUND_HIT_SHOCK = 0x0000037B,
SOUND_GENERAL_WHISTLE = 0x00000395, SOUND_GENERAL_WHISTLE = 0x00000395,
SOUND_3AF = 0x000003AF,
SOUND_OPEN_SHELL = 0x000003D4, SOUND_OPEN_SHELL = 0x000003D4,
SOUND_3D9 = 0x000003D9,
SOUND_3E1 = 0x000003E1, SOUND_3E1 = 0x000003E1,
SOUND_JUMP_3E2 = 0x000003E2, SOUND_JUMP_3E2 = 0x000003E2,
SOUND_MISS_JUMP = 0x000003E3, SOUND_MISS_JUMP = 0x000003E3,
@ -660,6 +667,7 @@ enum SoundIDs {
SOUND_2038 = 0x00002038, SOUND_2038 = 0x00002038,
SOUND_2039 = 0x00002039, SOUND_2039 = 0x00002039,
SOUND_205B = 0x0000205B, SOUND_205B = 0x0000205B,
SOUND_206D = 0x0000206D,
SOUND_2072 = 0x00002072, SOUND_2072 = 0x00002072,
SOUND_2073 = 0x00002073, SOUND_2073 = 0x00002073,
SOUND_BOMB_BLAST = 0x00002076, SOUND_BOMB_BLAST = 0x00002076,
@ -677,6 +685,8 @@ enum SoundIDs {
SOUND_SPELL_CAST3 = 0x000020D6, SOUND_SPELL_CAST3 = 0x000020D6,
SOUND_SPELL_CAST4 = 0x000020D7, SOUND_SPELL_CAST4 = 0x000020D7,
SOUND_SPELL_CAST5 = 0x000020D8, SOUND_SPELL_CAST5 = 0x000020D8,
SOUND_20E3 = 0x000020E3,
SOUND_20E7 = 0x000020E7,
SOUND_20F6 = 0x000020F6, SOUND_20F6 = 0x000020F6,
SOUND_2101 = 0x00002101, SOUND_2101 = 0x00002101,
SOUND_2102 = 0x00002102, SOUND_2102 = 0x00002102,

View File

@ -1,40 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_pra2
#include "common/StartRumbleWithParams.inc.c"
#include "common/UnkFloatFunc.inc.c"
ApiStatus GetActorPartOpacity(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex = evt_get_variable(script, *args++);
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
evt_set_variable(script, *args++, get_actor_part(get_actor(actorID), partIndex)->opacity);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "battle/area_pra2/660750", func_80218280_6609D0);
INCLUDE_ASM(s32, "battle/area_pra2/660750", func_802182E4_660A34);
INCLUDE_ASM(s32, "battle/area_pra2/660750", func_80218344_660A94);
ApiStatus func_802183A4_660AF4(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode arg0 = *args++;
f32 startX = evt_get_variable(script, *args++);
f32 startZ = evt_get_variable(script, *args++);
f32 endX = evt_get_variable(script, *args++);
f32 endZ = evt_get_variable(script, *args++);
evt_set_variable(script, arg0, atan2(startX, startZ, endX, endZ));
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "battle/area_pra2/660750", func_8021848C_660BDC);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "battle/area_pra2/660D20", func_802185D0_660D20);

View File

@ -1,13 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_pra2
INCLUDE_ASM(s32, "battle/area_pra2/660E10", func_802186C0_660E10);
#include "common/Set80071270_0_16.inc.c"
#include "common/UnkFloatFunc2.inc.c"
void func_802189E0_661130(void) {
enable_background_wave();
}

View File

@ -0,0 +1,412 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#include "sprite/npc/crystal_king.h"
#define NAMESPACE b_area_pra2_crystal_bit
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
s32 N(idleAnimations_1)[] = {
STATUS_NORMAL, NPC_ANIM_crystal_king_Palette_00_Anim_A,
STATUS_END,
};
s32 N(idleAnimations_2)[] = {
STATUS_NORMAL, NPC_ANIM_crystal_king_Palette_00_Anim_B,
STATUS_END,
};
s32 N(idleAnimations_3)[] = {
STATUS_NORMAL, NPC_ANIM_crystal_king_Palette_00_Anim_C,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_FIRE, 0,
ELEMENT_ICE, 99,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 0,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts_1)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations_1),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -34 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
};
ActorPartBlueprint N(parts_2)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations_2),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -34 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
};
ActorPartBlueprint N(parts_3)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations_3),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -34 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_ICY,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
};
ActorBlueprint N(1) = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_CRYSTAL_BIT,
.level = 0,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(parts_1)),
.partsData = N(parts_1),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 0,
.size = { 18, 15 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
ActorBlueprint N(2) = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_CRYSTAL_BIT,
.level = 0,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(parts_2)),
.partsData = N(parts_2),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 0,
.size = { 18, 15 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
ActorBlueprint N(3) = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_CRYSTAL_BIT,
.level = 0,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(parts_3)),
.partsData = N(parts_3),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 0,
.size = { 18, 15 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_ADDR(N(nextTurn)))
EVT_RETURN
EVT_END
};
ApiStatus UpdateCrystalBitEffect(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
ActorPart* actorPart = get_actor_part(actor, 1);
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
((MiscParticlesFXData*)effect->data)->scaleX = actorPart->scale.x * 24.0f;
((MiscParticlesFXData*)effect->data)->scaleY = actorPart->scale.y * 24.0f;
if (actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) {
((MiscParticlesFXData*)effect->data)->pos.x = actor->currentPos.x;
((MiscParticlesFXData*)effect->data)->pos.y = -1000.0f;
((MiscParticlesFXData*)effect->data)->pos.z = actor->currentPos.z;
} else {
((MiscParticlesFXData*)effect->data)->pos.x = actor->currentPos.x;
((MiscParticlesFXData*)effect->data)->pos.y = actor->currentPos.y;
((MiscParticlesFXData*)effect->data)->pos.z = actor->currentPos.z;
}
return ApiStatus_BLOCK;
}
EvtScript N(idle) = {
EVT_CALL(PlayEffect, EFFECT_MISC_PARTICLES, 1, 0, -1000, 0, 24, 24, EVT_FLOAT(1.0), 5, 0, 0, 0, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LW(15))
EVT_CHILD_THREAD
EVT_CALL(UpdateCrystalBitEffect, LW(15))
EVT_END_CHILD_THREAD
EVT_LOOP(0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LW(1))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetOwnerID, LW(0))
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 4, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_22)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 5, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_23)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 6, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_24)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LW(0), 1)
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LW(1))
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LW(1))
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(GetOwnerID, LW(0))
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 4, LW(1))
EVT_IF_EQ(LW(0), LW(1))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_crystal_king_Palette_00_Anim_5)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 5, LW(1))
EVT_IF_EQ(LW(0), LW(1))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_crystal_king_Palette_00_Anim_6)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 6, LW(1))
EVT_IF_EQ(LW(0), LW(1))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_crystal_king_Palette_00_Anim_7)
EVT_END_IF
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(RandInt, 360, LW(0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(30.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(20.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(10.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SET(LW(0), 255)
EVT_LOOP(20)
EVT_SUB(LW(0), 12)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_CALL(RemoveEffect, LW(0))
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetOwnerID, LW(0))
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 4, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_22)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 5, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_23)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 6, LW(3))
EVT_IF_EQ(LW(0), LW(3))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_crystal_king_Palette_00_Anim_24)
EVT_SET_CONST(LW(2), -1)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(RandInt, 360, LW(0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(30.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(20.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(AddVectorPolar, LW(1), LW(3), EVT_FLOAT(10.0), LW(0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), 0, LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SET(LW(0), 255)
EVT_LOOP(20)
EVT_SUB(LW(0), 12)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_CALL(RemoveEffect, LW(0))
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_CALL(RemoveEffect, LW(0))
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn) = {
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_pra2
extern ActorBlueprint N(crystal_king);
extern ActorBlueprint N(crystal_bit_1);
extern ActorBlueprint N(crystal_bit_2);
extern ActorBlueprint N(crystal_bit_3);
extern Stage N(sam_04);
Vec3i N(pos_crystal_king) = { 70, 0, 5 };
Vec3i N(pos_crystal_bit_1) = { 10, 35, -5 };
Vec3i N(pos_crystal_bit_2) = { 112, 52, -5 };
Vec3i N(pos_crystal_bit_3) = { 42, 85, -10 };
Formation N(formation_01) = {
{ .actor = &N(crystal_king), .home = { .vec = &N(pos_crystal_king) }, .priority = 10 },
{ .actor = &N(crystal_bit_1), .home = { .vec = &N(pos_crystal_bit_1) }, .priority = 9 },
{ .actor = &N(crystal_bit_2), .home = { .vec = &N(pos_crystal_bit_2) }, .priority = 8 },
{ .actor = &N(crystal_bit_3), .home = { .vec = &N(pos_crystal_bit_3) }, .priority = 7 },
};
BattleList N(formationTable) = {
BATTLE("パラレラー", N(formation_01), &N(sam_04)),
{},
};
StageList N(stageTable) = {
{ "sam_04", &N(sam_04) },
{},
};

View File

@ -0,0 +1,96 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_pra2_sam_04
u16 D_802211E0_669930[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
INCLUDE_ASM(s32, "battle/area_pra2/660E10", func_802186C0_660E10);
#include "common/Set80071270_0_16.inc.c"
#include "common/UnkFloatFunc2.inc.c"
void func_802189E0_661130(void) {
enable_background_wave();
}
EvtScript N(802211F0) = {
EVT_CALL(N(Set80071270_0_16))
EVT_LOOP(0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022122C) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_SET(LW(1), 0)
EVT_LOOP(10)
EVT_ADD(LW(1), 36)
EVT_CALL(RotateModel, LW(10), LW(1), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802212F4) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(11), LW(1))
EVT_EXEC(N(8022122C))
EVT_SET(LW(7), 0)
EVT_LABEL(0)
EVT_ADD(LW(7), 4)
EVT_IF_GT(LW(7), 3599)
EVT_SUB(LW(7), 3600)
EVT_END_IF
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802213D4) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(7), 0)
EVT_LABEL(0)
EVT_ADD(LW(7), 4)
EVT_IF_GT(LW(7), 3599)
EVT_SUB(LW(7), 3600)
EVT_END_IF
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_EXEC(N(802211F0))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "sam_tex",
.shape = "sam_bt04_shape",
.hit = "sam_bt04_hit",
.bg = "sam_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -1,11 +1,6 @@
#include "common.h" #include "common.h"
#include "effects_internal.h" #include "effects_internal.h"
typedef struct LightningBoltFXData {
/* 0x00 */ char unk_00[0xC];
/* 0x0C */ f32 unk_0C;
} LightningBoltFXData; // size = 0x??
s32 D_E00BCC30[] = { 0x05050505, 0x05050505, 0x05050505, 0x0A090301, 0x00000000, 0x00000000, 0x05050505, 0x05050505, 0x05050505, 0x08070605, 0x04030201, 0x00000000, 0x23051905, 0x00192305, 0x0F000000, 0x0A0D0F0C, 0x0B0D0A0C, 0x05010000, 0x2D0F230F, 0x00232D37, 0x19050200, 0x0D0A0C0A, 0x0D0A0D0A, 0x0C090501, 0x0F0F0F0F, 0x0F0F000F, 0x0F050200, 0x0E0A0F0A, 0x0D1E201E, 0x1832283C, 0x01050F0F, 0x232D2823, 0x19050200, 0x04060A05, 0x080E060A, 0x0E233232, 0x010F190F, 0x19232D28, 0x230F0500, 0x0202170C, 0x080F0F05, 0x0612263C, 0x1E190F05, 0x0F0F191E, 0x23190500, 0x0303030B, 0x030C0405, 0x020C2A32, 0x2121140C, 0x19110F14, 0x16140500, 0x03030302, 0x0A02020C, 0x02020214, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x02020202, 0x02020602, 0x02020605, 0x1B1B1616, 0x20110C07, 0x0C0C0200, 0x02020202, 0x02020202, 0x02020200 }; s32 D_E00BCC30[] = { 0x05050505, 0x05050505, 0x05050505, 0x0A090301, 0x00000000, 0x00000000, 0x05050505, 0x05050505, 0x05050505, 0x08070605, 0x04030201, 0x00000000, 0x23051905, 0x00192305, 0x0F000000, 0x0A0D0F0C, 0x0B0D0A0C, 0x05010000, 0x2D0F230F, 0x00232D37, 0x19050200, 0x0D0A0C0A, 0x0D0A0D0A, 0x0C090501, 0x0F0F0F0F, 0x0F0F000F, 0x0F050200, 0x0E0A0F0A, 0x0D1E201E, 0x1832283C, 0x01050F0F, 0x232D2823, 0x19050200, 0x04060A05, 0x080E060A, 0x0E233232, 0x010F190F, 0x19232D28, 0x230F0500, 0x0202170C, 0x080F0F05, 0x0612263C, 0x1E190F05, 0x0F0F191E, 0x23190500, 0x0303030B, 0x030C0405, 0x020C2A32, 0x2121140C, 0x19110F14, 0x16140500, 0x03030302, 0x0A02020C, 0x02020214, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x02020202, 0x02020602, 0x02020605, 0x1B1B1616, 0x20110C07, 0x0C0C0200, 0x02020202, 0x02020202, 0x02020200 };
s32 D_E00BCD38[] = { 0x19191905, 0x19051919, 0x05191919, 0x04030201, 0x00000000, 0x00000000, 0x0F0F0F19, 0x0F0F0519, 0x190F1919, 0x04040404, 0x04030201, 0x00000000, 0x19191905, 0x0F190505, 0x0F050500, 0x04040404, 0x04040604, 0x04040000, 0x19191905, 0x19051919, 0x050F0500, 0x04040404, 0x04040604, 0x04040605, 0x0F0F0F2D, 0x232D2323, 0x19230F00, 0x04040404, 0x04040604, 0x04040605, 0x2D372319, 0x370F2D19, 0x2D230F00, 0x04040404, 0x04040604, 0x04040605, 0x55190F4B, 0x1941232D, 0x4B550F00, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x04040404, 0x04040404, 0x04040200 }; s32 D_E00BCD38[] = { 0x19191905, 0x19051919, 0x05191919, 0x04030201, 0x00000000, 0x00000000, 0x0F0F0F19, 0x0F0F0519, 0x190F1919, 0x04040404, 0x04030201, 0x00000000, 0x19191905, 0x0F190505, 0x0F050500, 0x04040404, 0x04040604, 0x04040000, 0x19191905, 0x19051919, 0x050F0500, 0x04040404, 0x04040604, 0x04040605, 0x0F0F0F2D, 0x232D2323, 0x19230F00, 0x04040404, 0x04040604, 0x04040605, 0x2D372319, 0x370F2D19, 0x2D230F00, 0x04040404, 0x04040604, 0x04040605, 0x55190F4B, 0x1941232D, 0x4B550F00, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x04040404, 0x04040404, 0x04040200 };

File diff suppressed because one or more lines are too long

View File

@ -1,29 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80218280_6609D0
/* 6609D0 80218280 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 6609D4 80218284 AFBF0010 */ sw $ra, 0x10($sp)
/* 6609D8 80218288 8C82000C */ lw $v0, 0xc($a0)
/* 6609DC 8021828C 0C0B1EAF */ jal evt_get_variable
/* 6609E0 80218290 8C450000 */ lw $a1, ($v0)
/* 6609E4 80218294 8C43000C */ lw $v1, 0xc($v0)
/* 6609E8 80218298 240400F8 */ addiu $a0, $zero, 0xf8
/* 6609EC 8021829C AC640018 */ sw $a0, 0x18($v1)
/* 6609F0 802182A0 8C43000C */ lw $v1, 0xc($v0)
/* 6609F4 802182A4 AC64001C */ sw $a0, 0x1c($v1)
/* 6609F8 802182A8 8C43000C */ lw $v1, 0xc($v0)
/* 6609FC 802182AC 240500FF */ addiu $a1, $zero, 0xff
/* 660A00 802182B0 AC650020 */ sw $a1, 0x20($v1)
/* 660A04 802182B4 8C44000C */ lw $a0, 0xc($v0)
/* 660A08 802182B8 24030080 */ addiu $v1, $zero, 0x80
/* 660A0C 802182BC AC830028 */ sw $v1, 0x28($a0)
/* 660A10 802182C0 8C44000C */ lw $a0, 0xc($v0)
/* 660A14 802182C4 240300E0 */ addiu $v1, $zero, 0xe0
/* 660A18 802182C8 AC83002C */ sw $v1, 0x2c($a0)
/* 660A1C 802182CC 8C43000C */ lw $v1, 0xc($v0)
/* 660A20 802182D0 AC650030 */ sw $a1, 0x30($v1)
/* 660A24 802182D4 8FBF0010 */ lw $ra, 0x10($sp)
/* 660A28 802182D8 24020002 */ addiu $v0, $zero, 2
/* 660A2C 802182DC 03E00008 */ jr $ra
/* 660A30 802182E0 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802182E4_660A34
/* 660A34 802182E4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 660A38 802182E8 AFBF0010 */ sw $ra, 0x10($sp)
/* 660A3C 802182EC 8C82000C */ lw $v0, 0xc($a0)
/* 660A40 802182F0 0C0B1EAF */ jal evt_get_variable
/* 660A44 802182F4 8C450000 */ lw $a1, ($v0)
/* 660A48 802182F8 8C43000C */ lw $v1, 0xc($v0)
/* 660A4C 802182FC 240500FF */ addiu $a1, $zero, 0xff
/* 660A50 80218300 AC650030 */ sw $a1, 0x30($v1)
/* 660A54 80218304 8C43000C */ lw $v1, 0xc($v0)
/* 660A58 80218308 AC650034 */ sw $a1, 0x34($v1)
/* 660A5C 8021830C 8C43000C */ lw $v1, 0xc($v0)
/* 660A60 80218310 AC650038 */ sw $a1, 0x38($v1)
/* 660A64 80218314 8C44000C */ lw $a0, 0xc($v0)
/* 660A68 80218318 240300C8 */ addiu $v1, $zero, 0xc8
/* 660A6C 8021831C AC830040 */ sw $v1, 0x40($a0)
/* 660A70 80218320 8C44000C */ lw $a0, 0xc($v0)
/* 660A74 80218324 240300F0 */ addiu $v1, $zero, 0xf0
/* 660A78 80218328 AC830044 */ sw $v1, 0x44($a0)
/* 660A7C 8021832C 8C43000C */ lw $v1, 0xc($v0)
/* 660A80 80218330 AC650048 */ sw $a1, 0x48($v1)
/* 660A84 80218334 8FBF0010 */ lw $ra, 0x10($sp)
/* 660A88 80218338 24020002 */ addiu $v0, $zero, 2
/* 660A8C 8021833C 03E00008 */ jr $ra
/* 660A90 80218340 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80218344_660A94
/* 660A94 80218344 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 660A98 80218348 AFBF0010 */ sw $ra, 0x10($sp)
/* 660A9C 8021834C 8C82000C */ lw $v0, 0xc($a0)
/* 660AA0 80218350 0C0B1EAF */ jal evt_get_variable
/* 660AA4 80218354 8C450000 */ lw $a1, ($v0)
/* 660AA8 80218358 8C43000C */ lw $v1, 0xc($v0)
/* 660AAC 8021835C 240500FF */ addiu $a1, $zero, 0xff
/* 660AB0 80218360 AC650018 */ sw $a1, 0x18($v1)
/* 660AB4 80218364 8C43000C */ lw $v1, 0xc($v0)
/* 660AB8 80218368 AC65001C */ sw $a1, 0x1c($v1)
/* 660ABC 8021836C 8C43000C */ lw $v1, 0xc($v0)
/* 660AC0 80218370 AC650020 */ sw $a1, 0x20($v1)
/* 660AC4 80218374 8C44000C */ lw $a0, 0xc($v0)
/* 660AC8 80218378 240300C8 */ addiu $v1, $zero, 0xc8
/* 660ACC 8021837C AC830028 */ sw $v1, 0x28($a0)
/* 660AD0 80218380 8C44000C */ lw $a0, 0xc($v0)
/* 660AD4 80218384 240300F0 */ addiu $v1, $zero, 0xf0
/* 660AD8 80218388 AC83002C */ sw $v1, 0x2c($a0)
/* 660ADC 8021838C 8C43000C */ lw $v1, 0xc($v0)
/* 660AE0 80218390 AC650030 */ sw $a1, 0x30($v1)
/* 660AE4 80218394 8FBF0010 */ lw $ra, 0x10($sp)
/* 660AE8 80218398 24020002 */ addiu $v0, $zero, 2
/* 660AEC 8021839C 03E00008 */ jr $ra
/* 660AF0 802183A0 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,85 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8021848C_660BDC
/* 660BDC 8021848C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 660BE0 80218490 AFB20018 */ sw $s2, 0x18($sp)
/* 660BE4 80218494 0080902D */ daddu $s2, $a0, $zero
/* 660BE8 80218498 AFBF001C */ sw $ra, 0x1c($sp)
/* 660BEC 8021849C AFB10014 */ sw $s1, 0x14($sp)
/* 660BF0 802184A0 AFB00010 */ sw $s0, 0x10($sp)
/* 660BF4 802184A4 8E50000C */ lw $s0, 0xc($s2)
/* 660BF8 802184A8 8E050000 */ lw $a1, ($s0)
/* 660BFC 802184AC 0C0B1EAF */ jal evt_get_variable
/* 660C00 802184B0 26100004 */ addiu $s0, $s0, 4
/* 660C04 802184B4 8E050000 */ lw $a1, ($s0)
/* 660C08 802184B8 26100004 */ addiu $s0, $s0, 4
/* 660C0C 802184BC 0240202D */ daddu $a0, $s2, $zero
/* 660C10 802184C0 0C0B1EAF */ jal evt_get_variable
/* 660C14 802184C4 0040882D */ daddu $s1, $v0, $zero
/* 660C18 802184C8 44820000 */ mtc1 $v0, $f0
/* 660C1C 802184CC 00000000 */ nop
/* 660C20 802184D0 46800020 */ cvt.s.w $f0, $f0
/* 660C24 802184D4 E6200000 */ swc1 $f0, ($s1)
/* 660C28 802184D8 8E050000 */ lw $a1, ($s0)
/* 660C2C 802184DC 26100004 */ addiu $s0, $s0, 4
/* 660C30 802184E0 0C0B1EAF */ jal evt_get_variable
/* 660C34 802184E4 0240202D */ daddu $a0, $s2, $zero
/* 660C38 802184E8 44820000 */ mtc1 $v0, $f0
/* 660C3C 802184EC 00000000 */ nop
/* 660C40 802184F0 46800020 */ cvt.s.w $f0, $f0
/* 660C44 802184F4 E6200004 */ swc1 $f0, 4($s1)
/* 660C48 802184F8 8E050000 */ lw $a1, ($s0)
/* 660C4C 802184FC 26100004 */ addiu $s0, $s0, 4
/* 660C50 80218500 0C0B1EAF */ jal evt_get_variable
/* 660C54 80218504 0240202D */ daddu $a0, $s2, $zero
/* 660C58 80218508 24040014 */ addiu $a0, $zero, 0x14
/* 660C5C 8021850C 44820000 */ mtc1 $v0, $f0
/* 660C60 80218510 00000000 */ nop
/* 660C64 80218514 46800020 */ cvt.s.w $f0, $f0
/* 660C68 80218518 0C00A67F */ jal rand_int
/* 660C6C 8021851C E6200008 */ swc1 $f0, 8($s1)
/* 660C70 80218520 24040028 */ addiu $a0, $zero, 0x28
/* 660C74 80218524 00021023 */ negu $v0, $v0
/* 660C78 80218528 44820000 */ mtc1 $v0, $f0
/* 660C7C 8021852C 00000000 */ nop
/* 660C80 80218530 46800020 */ cvt.s.w $f0, $f0
/* 660C84 80218534 0C00A67F */ jal rand_int
/* 660C88 80218538 E620000C */ swc1 $f0, 0xc($s1)
/* 660C8C 8021853C 24420028 */ addiu $v0, $v0, 0x28
/* 660C90 80218540 44820000 */ mtc1 $v0, $f0
/* 660C94 80218544 00000000 */ nop
/* 660C98 80218548 46800020 */ cvt.s.w $f0, $f0
/* 660C9C 8021854C E6200010 */ swc1 $f0, 0x10($s1)
/* 660CA0 80218550 AE200014 */ sw $zero, 0x14($s1)
/* 660CA4 80218554 8E050000 */ lw $a1, ($s0)
/* 660CA8 80218558 26100004 */ addiu $s0, $s0, 4
/* 660CAC 8021855C 0C0B1EAF */ jal evt_get_variable
/* 660CB0 80218560 0240202D */ daddu $a0, $s2, $zero
/* 660CB4 80218564 44820000 */ mtc1 $v0, $f0
/* 660CB8 80218568 00000000 */ nop
/* 660CBC 8021856C 46800020 */ cvt.s.w $f0, $f0
/* 660CC0 80218570 E6200018 */ swc1 $f0, 0x18($s1)
/* 660CC4 80218574 8E050000 */ lw $a1, ($s0)
/* 660CC8 80218578 26100004 */ addiu $s0, $s0, 4
/* 660CCC 8021857C 0C0B1EAF */ jal evt_get_variable
/* 660CD0 80218580 0240202D */ daddu $a0, $s2, $zero
/* 660CD4 80218584 44820000 */ mtc1 $v0, $f0
/* 660CD8 80218588 00000000 */ nop
/* 660CDC 8021858C 46800020 */ cvt.s.w $f0, $f0
/* 660CE0 80218590 E620001C */ swc1 $f0, 0x1c($s1)
/* 660CE4 80218594 8E050000 */ lw $a1, ($s0)
/* 660CE8 80218598 0C0B1EAF */ jal evt_get_variable
/* 660CEC 8021859C 0240202D */ daddu $a0, $s2, $zero
/* 660CF0 802185A0 44820000 */ mtc1 $v0, $f0
/* 660CF4 802185A4 00000000 */ nop
/* 660CF8 802185A8 46800020 */ cvt.s.w $f0, $f0
/* 660CFC 802185AC E6200020 */ swc1 $f0, 0x20($s1)
/* 660D00 802185B0 8FBF001C */ lw $ra, 0x1c($sp)
/* 660D04 802185B4 8FB20018 */ lw $s2, 0x18($sp)
/* 660D08 802185B8 8FB10014 */ lw $s1, 0x14($sp)
/* 660D0C 802185BC 8FB00010 */ lw $s0, 0x10($sp)
/* 660D10 802185C0 24020002 */ addiu $v0, $zero, 2
/* 660D14 802185C4 03E00008 */ jr $ra
/* 660D18 802185C8 27BD0020 */ addiu $sp, $sp, 0x20
/* 660D1C 802185CC 00000000 */ nop

View File

@ -1,66 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802185D0_660D20
/* 660D20 802185D0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 660D24 802185D4 AFB00010 */ sw $s0, 0x10($sp)
/* 660D28 802185D8 0080802D */ daddu $s0, $a0, $zero
/* 660D2C 802185DC AFBF001C */ sw $ra, 0x1c($sp)
/* 660D30 802185E0 AFB20018 */ sw $s2, 0x18($sp)
/* 660D34 802185E4 AFB10014 */ sw $s1, 0x14($sp)
/* 660D38 802185E8 8E040148 */ lw $a0, 0x148($s0)
/* 660D3C 802185EC 0C09A75B */ jal get_actor
/* 660D40 802185F0 8E11000C */ lw $s1, 0xc($s0)
/* 660D44 802185F4 0040902D */ daddu $s2, $v0, $zero
/* 660D48 802185F8 0240202D */ daddu $a0, $s2, $zero
/* 660D4C 802185FC 0C099117 */ jal get_actor_part
/* 660D50 80218600 24050001 */ addiu $a1, $zero, 1
/* 660D54 80218604 0200202D */ daddu $a0, $s0, $zero
/* 660D58 80218608 8E250000 */ lw $a1, ($s1)
/* 660D5C 8021860C 0C0B1EAF */ jal evt_get_variable
/* 660D60 80218610 0040802D */ daddu $s0, $v0, $zero
/* 660D64 80218614 C600004C */ lwc1 $f0, 0x4c($s0)
/* 660D68 80218618 3C0141C0 */ lui $at, 0x41c0
/* 660D6C 8021861C 44811000 */ mtc1 $at, $f2
/* 660D70 80218620 00000000 */ nop
/* 660D74 80218624 46020002 */ mul.s $f0, $f0, $f2
/* 660D78 80218628 00000000 */ nop
/* 660D7C 8021862C 0040182D */ daddu $v1, $v0, $zero
/* 660D80 80218630 8C62000C */ lw $v0, 0xc($v1)
/* 660D84 80218634 E4400010 */ swc1 $f0, 0x10($v0)
/* 660D88 80218638 C6000050 */ lwc1 $f0, 0x50($s0)
/* 660D8C 8021863C 46020002 */ mul.s $f0, $f0, $f2
/* 660D90 80218640 00000000 */ nop
/* 660D94 80218644 8C62000C */ lw $v0, 0xc($v1)
/* 660D98 80218648 E4400014 */ swc1 $f0, 0x14($v0)
/* 660D9C 8021864C 8E020000 */ lw $v0, ($s0)
/* 660DA0 80218650 30420001 */ andi $v0, $v0, 1
/* 660DA4 80218654 10400009 */ beqz $v0, .L8021867C
/* 660DA8 80218658 00000000 */ nop
/* 660DAC 8021865C 8C62000C */ lw $v0, 0xc($v1)
/* 660DB0 80218660 C6400144 */ lwc1 $f0, 0x144($s2)
/* 660DB4 80218664 E4400004 */ swc1 $f0, 4($v0)
/* 660DB8 80218668 8C62000C */ lw $v0, 0xc($v1)
/* 660DBC 8021866C 3C01C47A */ lui $at, 0xc47a
/* 660DC0 80218670 44810000 */ mtc1 $at, $f0
/* 660DC4 80218674 080861A5 */ j .L80218694
/* 660DC8 80218678 E4400008 */ swc1 $f0, 8($v0)
.L8021867C:
/* 660DCC 8021867C 8C62000C */ lw $v0, 0xc($v1)
/* 660DD0 80218680 C6400144 */ lwc1 $f0, 0x144($s2)
/* 660DD4 80218684 E4400004 */ swc1 $f0, 4($v0)
/* 660DD8 80218688 8C62000C */ lw $v0, 0xc($v1)
/* 660DDC 8021868C C6400148 */ lwc1 $f0, 0x148($s2)
/* 660DE0 80218690 E4400008 */ swc1 $f0, 8($v0)
.L80218694:
/* 660DE4 80218694 8C62000C */ lw $v0, 0xc($v1)
/* 660DE8 80218698 C640014C */ lwc1 $f0, 0x14c($s2)
/* 660DEC 8021869C E440000C */ swc1 $f0, 0xc($v0)
/* 660DF0 802186A0 8FBF001C */ lw $ra, 0x1c($sp)
/* 660DF4 802186A4 8FB20018 */ lw $s2, 0x18($sp)
/* 660DF8 802186A8 8FB10014 */ lw $s1, 0x14($sp)
/* 660DFC 802186AC 8FB00010 */ lw $s0, 0x10($sp)
/* 660E00 802186B0 0000102D */ daddu $v0, $zero, $zero
/* 660E04 802186B4 03E00008 */ jr $ra
/* 660E08 802186B8 27BD0020 */ addiu $sp, $sp, 0x20
/* 660E0C 802186BC 00000000 */ nop

View File

@ -4401,12 +4401,13 @@ segments:
type: code type: code
start: 0x660750 start: 0x660750
vram: 0x80218000 vram: 0x80218000
subalign: 16 # BSS alignment hack
overlay: True overlay: True
subsegments: subsegments:
- [0x660750, c] - [0x660750, c, actor/crystal_king]
- [0x660D20, c] - [0x660D20, c, actor/crystal_bit]
- [0x660E10, c] - [0x660E10, c, stage/sam_04]
- [0x661150, data] - [0x661150, c, area]
- dir: battle/area_pra3 - dir: battle/area_pra3
type: code type: code
start: 0x669D80 start: 0x669D80