Enum all the things (#241)

This commit is contained in:
Maide 2021-03-29 08:34:39 +01:00 committed by GitHub
parent a8e5d9b1d9
commit 21917eb3dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
134 changed files with 3219 additions and 2887 deletions

View File

@ -278,7 +278,7 @@ typedef struct ScriptInstance {
struct Actor* actor; ///< For battle scripts struct Actor* actor; ///< For battle scripts
} owner1; ///< Initially -1 } owner1; ///< Initially -1
/* 0x14C */ union { /* 0x14C */ union {
NpcId npcID; NpcID npcID;
s32 triggerID; s32 triggerID;
struct Npc* npc; ///< For overworld scripts owned by an Npc struct Npc* npc; ///< For overworld scripts owned by an Npc
struct Trigger* trigger; struct Trigger* trigger;
@ -1402,7 +1402,7 @@ typedef struct Actor {
/* 0x208 */ s8 unk_208; /* 0x208 */ s8 unk_208;
/* 0x209 */ char unk_209[3]; /* 0x209 */ char unk_209[3];
/* 0x20C */ u32* statusTable; /* 0x20C */ u32* statusTable;
/* 0x210 */ Debuff debuff; /* 0x210 */ Status debuff;
/* 0x211 */ s8 debuffDuration; /* 0x211 */ s8 debuffDuration;
/* 0x212 */ s8 staticStatus; /* 0B = yes */ /* 0x212 */ s8 staticStatus; /* 0B = yes */
/* 0x213 */ s8 staticDuration; /* 0x213 */ s8 staticDuration;

File diff suppressed because it is too large Load Diff

View File

@ -219,9 +219,9 @@ void disable_player_shadow(void);
void move_player(s32 duration, f32 heading, f32 speed); void move_player(s32 duration, f32 heading, f32 speed);
s32 enable_player_input(void); s32 enable_player_input(void);
Npc* get_npc_safe(NpcId npcId); Npc* get_npc_safe(NpcID npcId);
Npc* get_npc_unsafe(NpcId npcId); Npc* get_npc_unsafe(NpcID npcId);
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr); Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr);
void set_npc_yaw(Npc* npcPtr, f32 angle); void set_npc_yaw(Npc* npcPtr, f32 angle);
void npc_move_heading(Npc* npc, f32 speed, f32 yaw); void npc_move_heading(Npc* npc, f32 speed, f32 yaw);
void disable_npc_blur(Npc* npc); void disable_npc_blur(Npc* npc);
@ -246,8 +246,8 @@ void set_part_yaw(ActorID actorID, s32 partIndex, s32 value);
ActorPart* get_actor_part(Actor* actor, s32 partIndex); ActorPart* get_actor_part(Actor* actor, s32 partIndex);
void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType); void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType);
void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationId decorationType); void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType);
void remove_part_decoration(ActorPart* part, s32 decorationIndex); void remove_part_decoration(ActorPart* part, s32 decorationIndex);
void remove_actor_decoration(Actor* actor, s32 decorationIndex); void remove_actor_decoration(Actor* actor, s32 decorationIndex);
@ -283,8 +283,8 @@ s32 func_80071030(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
void func_80070CD0(s32, f32, f32, f32, f32, f32); void func_80070CD0(s32, f32, f32, f32, f32, f32);
// Dead functions: // Dead functions:
Npc* func_8003E4BC(NpcId npcId); // get_npc_safe Npc* func_8003E4BC(NpcID npcId); // get_npc_safe
Npc* func_8003E534(NpcId npcId); // get_npc_safe Npc* func_8003E534(NpcID npcId); // get_npc_safe
void func_80077BD0(s32, s32, s32, s32, s32, s32); void func_80077BD0(s32, s32, s32, s32, s32, s32);
void dead_func_8006FEF0(s32, f32, f32, f32, f32); void dead_func_8006FEF0(s32, f32, f32, f32, f32);

View File

@ -93,7 +93,7 @@ typedef struct NpcSettings {
} NpcSettings; // size = 0x2C } NpcSettings; // size = 0x2C
typedef struct ItemDrop { typedef struct ItemDrop {
/* 0x00 */ ItemId item; /* 0x00 */ ItemID item;
/* 0x02 */ s16 weight; /* 0x02 */ s16 weight;
/* 0x04 */ s16 unk_08; /* 0x04 */ s16 unk_08;
} ItemDrop; // size = 0x06 } ItemDrop; // size = 0x06
@ -173,7 +173,7 @@ typedef struct StatDrop {
#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1) #define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1)
typedef struct StaticNpc { typedef struct StaticNpc {
/* 0x000 */ NpcId id; /* 0x000 */ NpcID id;
/* 0x004 */ NpcSettings* settings; /* 0x004 */ NpcSettings* settings;
/* 0x008 */ Vec3f pos; /* 0x008 */ Vec3f pos;
/* 0x014 */ s32 flags; /* 0x014 */ s32 flags;
@ -275,7 +275,7 @@ typedef struct {
#define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battle } #define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battle }
Enemy* get_enemy(NpcId npcId); Enemy* get_enemy(NpcID npcId);
MapConfig* get_current_map_header(void); MapConfig* get_current_map_header(void);
s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, s32 arg3, s32 arg4); s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, s32 arg3, s32 arg4);

View File

@ -176,7 +176,7 @@ extern u8 gPauseMenuPageScrollInterpEasingLUT[16];
// Badges // Badges
extern s32 gBadgeMenuCurrentScrollPos; extern s32 gBadgeMenuCurrentScrollPos;
extern s32 gBadgeMenuTargetScrollPos; extern s32 gBadgeMenuTargetScrollPos;
extern ItemId gBadgeMenuItemIDs[128]; extern ItemID gBadgeMenuItemIDs[128];
extern s32 gBadgeMenuCurrentPage; extern s32 gBadgeMenuCurrentPage;
extern PauseItemPage gBadgeMenuPages[20]; extern PauseItemPage gBadgeMenuPages[20];
extern s32 gBadgeMenuSelectedIndex; extern s32 gBadgeMenuSelectedIndex;

View File

@ -52,7 +52,7 @@ ApiStatus func_802187F0_6DE5B0(ScriptInstance* script, s32 isInitialCall) {
SelectableTarget* selectableTarget; SelectableTarget* selectableTarget;
battleStatus->moveCategory = 2; battleStatus->moveCategory = 2;
battleStatus->selectedItemID = ItemId_THUNDER_RAGE; battleStatus->selectedItemID = ITEM_THUNDER_RAGE;
selectedItemID = battleStatus->selectedItemID; selectedItemID = battleStatus->selectedItemID;
battleStatus->selectedMoveID = 0; battleStatus->selectedMoveID = 0;
battleStatus->currentAttackElement = 0; battleStatus->currentAttackElement = 0;

View File

@ -5,6 +5,6 @@
ApiStatus func_80218000_47F0B0(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80218000_47F0B0(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->currentPartner = PartnerID_GOOMBARIO; playerData->currentPartner = PARTNER_GOOMBARIO;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -17,33 +17,33 @@ Script goomba_idle;
Script goomba_dispatch; Script goomba_dispatch;
s32 goomba_defense_table[] = { s32 goomba_defense_table[] = {
Element_NORMAL, 0, ELEMENT_NORMAL, 0,
Element_END, ELEMENT_END,
}; };
s32 goomba_status_table[] = { s32 goomba_status_table[] = {
Debuff_NORMAL, 0, STATUS_NORMAL, 0,
Debuff_DEFAULT, 0, STATUS_DEFAULT, 0,
Debuff_SLEEP, 100, STATUS_SLEEP, 100,
Debuff_POISON, 100, STATUS_POISON, 100,
Debuff_FROZEN, 100, STATUS_FROZEN, 100,
Debuff_DIZZY, 100, STATUS_DIZZY, 100,
Debuff_FEAR, 100, STATUS_FEAR, 100,
Debuff_STATIC, 100, STATUS_STATIC, 100,
Debuff_PARALYZE, 100, STATUS_PARALYZE, 100,
Debuff_SHRINK, 100, STATUS_SHRINK, 100,
Debuff_STOP, 100, STATUS_STOP, 100,
Debuff_DEFAULT_TURN_MOD, 0, STATUS_DEFAULT_TURN_MOD, 0,
Debuff_SLEEP_TURN_MOD, 0, STATUS_SLEEP_TURN_MOD, 0,
Debuff_POISON_TURN_MOD, 0, STATUS_POISON_TURN_MOD, 0,
Debuff_FROZEN_TURN_MOD, 0, STATUS_FROZEN_TURN_MOD, 0,
Debuff_DIZZY_TURN_MOD, 0, STATUS_DIZZY_TURN_MOD, 0,
Debuff_FEAR_TURN_MOD, 0, STATUS_FEAR_TURN_MOD, 0,
Debuff_STATIC_TURN_MOD, 0, STATUS_STATIC_TURN_MOD, 0,
Debuff_PARALYZE_TURN_MOD, 0, STATUS_PARALYZE_TURN_MOD, 0,
Debuff_SHRINK_TURN_MOD, 0, STATUS_SHRINK_TURN_MOD, 0,
Debuff_STOP_TURN_MOD, 0, STATUS_STOP_TURN_MOD, 0,
Debuff_END, STATUS_END,
}; };
ActorPartDesc goomba_parts[] = { ActorPartDesc goomba_parts[] = {
@ -85,37 +85,37 @@ ActorDesc goomba = {
}; };
s32 goomba_anims[] = { s32 goomba_anims[] = {
Debuff_NORMAL, NPC_ANIM(goomba, normal, idle), STATUS_NORMAL, NPC_ANIM(goomba, normal, idle),
Debuff_STONE, NPC_ANIM(goomba, normal, still), STATUS_STONE, NPC_ANIM(goomba, normal, still),
Debuff_SLEEP, NPC_ANIM(goomba, normal, asleep), STATUS_SLEEP, NPC_ANIM(goomba, normal, asleep),
Debuff_POISON, NPC_ANIM(goomba, normal, idle), STATUS_POISON, NPC_ANIM(goomba, normal, idle),
Debuff_STOP, NPC_ANIM(goomba, normal, still), STATUS_STOP, NPC_ANIM(goomba, normal, still),
Debuff_STATIC, NPC_ANIM(goomba, normal, idle), STATUS_STATIC, NPC_ANIM(goomba, normal, idle),
Debuff_PARALYZE, NPC_ANIM(goomba, normal, still), STATUS_PARALYZE, NPC_ANIM(goomba, normal, still),
Debuff_DIZZY, NPC_ANIM(goomba, normal, dizzy), STATUS_DIZZY, NPC_ANIM(goomba, normal, dizzy),
Debuff_FEAR, NPC_ANIM(goomba, normal, dizzy), STATUS_FEAR, NPC_ANIM(goomba, normal, dizzy),
Debuff_END, STATUS_END,
}; };
s32 goomba_anims_running[] = { s32 goomba_anims_running[] = {
Debuff_NORMAL, NPC_ANIM(goomba, normal, run), STATUS_NORMAL, NPC_ANIM(goomba, normal, run),
Debuff_STONE, NPC_ANIM(goomba, normal, still), STATUS_STONE, NPC_ANIM(goomba, normal, still),
Debuff_SLEEP, NPC_ANIM(goomba, normal, asleep), STATUS_SLEEP, NPC_ANIM(goomba, normal, asleep),
Debuff_POISON, NPC_ANIM(goomba, normal, idle), STATUS_POISON, NPC_ANIM(goomba, normal, idle),
Debuff_STOP, NPC_ANIM(goomba, normal, still), STATUS_STOP, NPC_ANIM(goomba, normal, still),
Debuff_STATIC, NPC_ANIM(goomba, normal, run), STATUS_STATIC, NPC_ANIM(goomba, normal, run),
Debuff_PARALYZE, NPC_ANIM(goomba, normal, still), STATUS_PARALYZE, NPC_ANIM(goomba, normal, still),
Debuff_DIZZY, NPC_ANIM(goomba, normal, dizzy), STATUS_DIZZY, NPC_ANIM(goomba, normal, dizzy),
Debuff_FEAR, NPC_ANIM(goomba, normal, dizzy), STATUS_FEAR, NPC_ANIM(goomba, normal, dizzy),
Debuff_END, STATUS_END,
}; };
Script goomba_init = SCRIPT({ Script goomba_init = SCRIPT({
BindTakeTurn(ActorID_SELF, goomba_turn); BindTakeTurn(ACTOR_SELF, goomba_turn);
BindIdle(ActorID_SELF, goomba_idle); BindIdle(ACTOR_SELF, goomba_idle);
BindHandleEvent(ActorID_SELF, goomba_dispatch); BindHandleEvent(ACTOR_SELF, goomba_dispatch);
}); });
Script goomba_idle = SCRIPT({ Script goomba_idle = SCRIPT({
@ -124,39 +124,39 @@ Script goomba_idle = SCRIPT({
SI_VAR(0) += 80; SI_VAR(0) += 80;
loop SI_VAR(0) { loop SI_VAR(0) {
0: 0:
GetStatusFlags(ActorID_SELF, SI_VAR(1)); GetStatusFlags(ACTOR_SELF, SI_VAR(1));
if (SI_VAR(1) & 0x35D000) { if (SI_VAR(1) & 0x35D000) {
sleep 1; sleep 1;
goto 0; goto 0;
} }
sleep 1; sleep 1;
} }
GetActorPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 5; SI_VAR(0) += 5;
SetActorIdleSpeed(ActorID_SELF, 1.0); SetActorIdleSpeed(ACTOR_SELF, 1.0);
SetIdleAnimations(ActorID_SELF, 1, goomba_anims_running); SetIdleAnimations(ACTOR_SELF, 1, goomba_anims_running);
SetIdleGoal(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
IdleRunToGoal(ActorID_SELF, 0); IdleRunToGoal(ACTOR_SELF, 0);
SetIdleAnimations(ActorID_SELF, 1, goomba_anims); SetIdleAnimations(ACTOR_SELF, 1, goomba_anims);
loop 20 { loop 20 {
1: 1:
GetStatusFlags(ActorID_SELF, SI_VAR(1)); GetStatusFlags(ACTOR_SELF, SI_VAR(1));
if (SI_VAR(1) & 0x35D000) { if (SI_VAR(1) & 0x35D000) {
sleep 1; sleep 1;
goto 1; goto 1;
} }
sleep 1; sleep 1;
} }
GetActorPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) -= 5; SI_VAR(0) -= 5;
SetActorIdleSpeed(ActorID_SELF, 1.0); SetActorIdleSpeed(ACTOR_SELF, 1.0);
SetIdleAnimations(ActorID_SELF, 1, goomba_anims_running); SetIdleAnimations(ACTOR_SELF, 1, goomba_anims_running);
SetIdleGoal(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
IdleRunToGoal(ActorID_SELF, 0); IdleRunToGoal(ACTOR_SELF, 0);
SetIdleAnimations(ActorID_SELF, 1, goomba_anims); SetIdleAnimations(ACTOR_SELF, 1, goomba_anims);
loop 80 { loop 80 {
2: 2:
GetStatusFlags(ActorID_SELF, SI_VAR(1)); GetStatusFlags(ACTOR_SELF, SI_VAR(1));
if (SI_VAR(1) & 0x35D000) { if (SI_VAR(1) & 0x35D000) {
sleep 1; sleep 1;
goto 2; goto 2;
@ -167,23 +167,23 @@ Script goomba_idle = SCRIPT({
}); });
Script goomba_dispatch = SCRIPT({ Script goomba_dispatch = SCRIPT({
UseIdleAnimation(ActorID_SELF, 0); UseIdleAnimation(ACTOR_SELF, 0);
EnableIdleScript(ActorID_SELF, 0); EnableIdleScript(ACTOR_SELF, 0);
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
GetLastEvent(ActorID_SELF, SI_VAR(0)); GetLastEvent(ACTOR_SELF, SI_VAR(0));
match SI_VAR(0) { match SI_VAR(0) {
Event_HIT_COMBO, Event_HIT { EVENT_HIT_COMBO, EVENT_HIT {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoNormalHit; await DoNormalHit;
} }
== Event_BURN_HIT { == EVENT_BURN_HIT {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain);
SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead); SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead);
await DoBurnHit; await DoBurnHit;
} }
== Event_BURN_DEATH { == EVENT_BURN_DEATH {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain);
SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead); SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead);
@ -193,12 +193,12 @@ Script goomba_dispatch = SCRIPT({
await DoDeath; await DoDeath;
return; return;
} }
== Event_SPIN_SMASH_HIT { == EVENT_SPIN_SMASH_HIT {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoSpinSmashHit; await DoSpinSmashHit;
} }
== Event_SPIN_SMASH_DEATH { == EVENT_SPIN_SMASH_DEATH {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoSpinSmashHit; await DoSpinSmashHit;
@ -207,26 +207,26 @@ Script goomba_dispatch = SCRIPT({
await DoDeath; await DoDeath;
return; return;
} }
== Event_SHOCK_HIT { == EVENT_SHOCK_HIT {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute); SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute);
await DoShockHit; await DoShockHit;
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoJumpBack; await DoJumpBack;
JumpToGoal(ActorID_SELF, 5, 0, 1, 0); JumpToGoal(ACTOR_SELF, 5, 0, 1, 0);
SetAnimationRate(ActorID_SELF, 1, 2.0); SetAnimationRate(ACTOR_SELF, 1, 2.0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy));
SetGoalToHome(ActorID_SELF); SetGoalToHome(ACTOR_SELF);
SetActorSpeed(ActorID_SELF, 8.0); SetActorSpeed(ACTOR_SELF, 8.0);
RunToGoal(ActorID_SELF, 0, 0); RunToGoal(ACTOR_SELF, 0, 0);
SetAnimationRate(ActorID_SELF, 1, 1.0); SetAnimationRate(ACTOR_SELF, 1, 1.0);
sleep 5; sleep 5;
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
SetActorJumpGravity(ActorID_SELF, 1.6); SetActorJumpGravity(ACTOR_SELF, 1.6);
JumpToGoal(ActorID_SELF, 5, 0, 1, 0); JumpToGoal(ACTOR_SELF, 5, 0, 1, 0);
} }
== Event_SHOCK_DEATH { == EVENT_SHOCK_DEATH {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute); SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute);
await DoShockHit; await DoShockHit;
@ -235,12 +235,12 @@ Script goomba_dispatch = SCRIPT({
await DoDeath; await DoDeath;
return; return;
} }
== Event_STAR_BEAM, 23, Event_IMMUNE, Event_AIR_LIFT_FAILED { == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, idle); SI_VAR(1) = c NPC_ANIM(goomba, normal, idle);
await DoImmune; await DoImmune;
} }
== Event_DEATH { == EVENT_DEATH {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoNormalHit; await DoNormalHit;
@ -250,33 +250,33 @@ Script goomba_dispatch = SCRIPT({
await DoDeath; await DoDeath;
return; return;
} }
== Event_END_FIRST_STRIKE { == EVENT_END_FIRST_STRIKE {
SetAnimationRate(ActorID_SELF, 1, 2.0); SetAnimationRate(ACTOR_SELF, 1, 2.0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run));
SetGoalToHome(ActorID_SELF); SetGoalToHome(ACTOR_SELF);
SetActorSpeed(ActorID_SELF, 4.0); SetActorSpeed(ACTOR_SELF, 4.0);
RunToGoal(ActorID_SELF, 0, 0); RunToGoal(ACTOR_SELF, 0, 0);
SetAnimationRate(ActorID_SELF, 1, 1.0); SetAnimationRate(ACTOR_SELF, 1, 1.0);
HPBarToHome(ActorID_SELF); HPBarToHome(ACTOR_SELF);
} }
== Event_RECOVER_STATUS { == EVENT_RECOVER_STATUS {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, idle); SI_VAR(1) = c NPC_ANIM(goomba, normal, idle);
await DoRecover; await DoRecover;
} }
== Event_SCARE_AWAY { == EVENT_SCARE_AWAY {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, run); SI_VAR(1) = c NPC_ANIM(goomba, normal, run);
SI_VAR(2) = c NPC_ANIM(goomba, normal, pain); SI_VAR(2) = c NPC_ANIM(goomba, normal, pain);
await DoScareAway; await DoScareAway;
return; return;
} }
== Event_BEGIN_AIR_LIFT { == EVENT_BEGIN_AIR_LIFT {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, run); SI_VAR(1) = c NPC_ANIM(goomba, normal, run);
await DoAirLift; await DoAirLift;
} }
== Event_BLOW_AWAY { == EVENT_BLOW_AWAY {
SI_VAR(0) = c 1; SI_VAR(0) = c 1;
SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); SI_VAR(1) = c NPC_ANIM(goomba, normal, pain);
await DoBlowAway; await DoBlowAway;
@ -284,9 +284,9 @@ Script goomba_dispatch = SCRIPT({
} else { } else {
} }
} }
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
EnableIdleScript(ActorID_SELF, 1); EnableIdleScript(ACTOR_SELF, 1);
UseIdleAnimation(ActorID_SELF, 1); UseIdleAnimation(ACTOR_SELF, 1);
}); });
f32 D_8021A194_432B34[] = { f32 D_8021A194_432B34[] = {
@ -305,42 +305,42 @@ f32 D_8021A194_432B34[] = {
}; };
Script goomba_turn = SCRIPT({ Script goomba_turn = SCRIPT({
UseIdleAnimation(ActorID_SELF, 0); UseIdleAnimation(ACTOR_SELF, 0);
EnableIdleScript(ActorID_SELF, 0); EnableIdleScript(ACTOR_SELF, 0);
SetTargetActor(ActorID_SELF, 0); SetTargetActor(ACTOR_SELF, 0);
UseCamPreset(63); UseCamPreset(63);
BattleCamTargetActor(ActorID_SELF); BattleCamTargetActor(ACTOR_SELF);
0x8024ECF8(-1, 1, 0); 0x8024ECF8(-1, 1, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run));
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
AddGoalPos(ActorID_SELF, 50, 0, 0); AddGoalPos(ACTOR_SELF, 50, 0, 0);
SetActorSpeed(ActorID_SELF, 6.0); SetActorSpeed(ACTOR_SELF, 6.0);
RunToGoal(ActorID_SELF, 0, 0); RunToGoal(ACTOR_SELF, 0, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
SetActorDispOffset(ActorID_SELF, 0, -1, 0); SetActorDispOffset(ACTOR_SELF, 0, -1, 0);
sleep 1; sleep 1;
SetActorDispOffset(ActorID_SELF, 0, -2, 0); SetActorDispOffset(ACTOR_SELF, 0, -2, 0);
sleep 5; sleep 5;
SetActorDispOffset(ActorID_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk));
EnemyTestTarget(ActorID_SELF, SI_VAR(0), 0, 0, 1, 16); EnemyTestTarget(ACTOR_SELF, SI_VAR(0), 0, 0, 1, 16);
match SI_VAR(0) { match SI_VAR(0) {
6, 5 { 6, 5 {
SI_VAR(10) = SI_VAR(0); SI_VAR(10) = SI_VAR(0);
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) -= 10; SI_VAR(0) -= 10;
SI_VAR(1) = 10; SI_VAR(1) = 10;
SI_VAR(2) += 3; SI_VAR(2) += 3;
SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetActorJumpGravity(ActorID_SELF, 1.2); SetActorJumpGravity(ACTOR_SELF, 1.2);
spawn { spawn {
GetActorPos(ActorID_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0));
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 16 { loop 16 {
GetActorPos(ActorID_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6));
func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0));
SetActorRotation(ActorID_SELF, 0, 0, SI_VAR(0)); SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0));
SI_VAR(1) = SI_VAR(4); SI_VAR(1) = SI_VAR(4);
SI_VAR(2) = SI_VAR(5); SI_VAR(2) = SI_VAR(5);
SI_VAR(3) = SI_VAR(6); SI_VAR(3) = SI_VAR(6);
@ -349,73 +349,73 @@ Script goomba_turn = SCRIPT({
} }
spawn { spawn {
sleep 6; sleep 6;
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk));
} }
JumpToGoal(ActorID_SELF, 16, 0, 1, 0); JumpToGoal(ACTOR_SELF, 16, 0, 1, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, asleep)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, asleep));
SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0);
SetActorDispOffset(ActorID_SELF, 0, 5, 0); SetActorDispOffset(ACTOR_SELF, 0, 5, 0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.3, 0.5, 1.0); SetActorScale(ACTOR_SELF, 1.3, 0.5, 1.0);
SetActorDispOffset(ActorID_SELF, 0, -2, 0); SetActorDispOffset(ACTOR_SELF, 0, -2, 0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
SetActorDispOffset(ActorID_SELF, 0, 7, 0); SetActorDispOffset(ACTOR_SELF, 0, 7, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, pain)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, pain));
sleep 5; sleep 5;
if (SI_VAR(10) == 5) { if (SI_VAR(10) == 5) {
EnemyTestTarget(ActorID_SELF, SI_VAR(0), 0x80000000, 0, 0, 0); EnemyTestTarget(ACTOR_SELF, SI_VAR(0), 0x80000000, 0, 0, 0);
} }
sleep 5; sleep 5;
SetActorDispOffset(ActorID_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk));
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) = 0; SI_VAR(1) = 0;
SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetActorJumpGravity(ActorID_SELF, 2.0); SetActorJumpGravity(ACTOR_SELF, 2.0);
spawn { spawn {
sleep 4; sleep 4;
SI_VAR(0) = 180; SI_VAR(0) = 180;
loop 4 { loop 4 {
SI_VAR(0) -= 45; SI_VAR(0) -= 45;
SetActorRotation(ActorID_SELF, 0, 0, SI_VAR(0)); SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0));
sleep 1; sleep 1;
} }
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk));
} }
JumpToGoal(ActorID_SELF, 15, 0, 1, 0); JumpToGoal(ACTOR_SELF, 15, 0, 1, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy));
sleep 5; sleep 5;
UseCamPreset(2); UseCamPreset(2);
YieldTurn(); YieldTurn();
SetActorYaw(ActorID_SELF, 180); SetActorYaw(ACTOR_SELF, 180);
AddActorDecoration(ActorID_SELF, 1, 0, 2); AddActorDecoration(ACTOR_SELF, 1, 0, 2);
SetAnimationRate(ActorID_SELF, 1, 2.0); SetAnimationRate(ACTOR_SELF, 1, 2.0);
SetGoalToHome(ActorID_SELF); SetGoalToHome(ACTOR_SELF);
SetActorSpeed(ActorID_SELF, 8.0); SetActorSpeed(ACTOR_SELF, 8.0);
RunToGoal(ActorID_SELF, 0, 0); RunToGoal(ACTOR_SELF, 0, 0);
SetAnimationRate(ActorID_SELF, 1, 1.0); SetAnimationRate(ACTOR_SELF, 1, 1.0);
SetActorYaw(ActorID_SELF, 0); SetActorYaw(ACTOR_SELF, 0);
sleep 5; sleep 5;
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
SetActorJumpGravity(ActorID_SELF, 1.6); SetActorJumpGravity(ACTOR_SELF, 1.6);
JumpToGoal(ActorID_SELF, 5, 0, 1, 0); JumpToGoal(ACTOR_SELF, 5, 0, 1, 0);
RemoveActorDecoration(ActorID_SELF, 1, 0); RemoveActorDecoration(ACTOR_SELF, 1, 0);
EnableIdleScript(ActorID_SELF, 1); EnableIdleScript(ACTOR_SELF, 1);
UseIdleAnimation(ActorID_SELF, 1); UseIdleAnimation(ACTOR_SELF, 1);
return; return;
} else { } else {
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
SetActorJumpGravity(ActorID_SELF, 1.2); SetActorJumpGravity(ACTOR_SELF, 1.2);
spawn { spawn {
GetActorPos(ActorID_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0));
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 16 { loop 16 {
GetActorPos(ActorID_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6));
func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0));
SetActorRotation(ActorID_SELF, 0, 0, SI_VAR(0)); SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0));
SI_VAR(1) = SI_VAR(4); SI_VAR(1) = SI_VAR(4);
SI_VAR(2) = SI_VAR(5); SI_VAR(2) = SI_VAR(5);
SI_VAR(3) = SI_VAR(6); SI_VAR(3) = SI_VAR(6);
@ -424,51 +424,51 @@ Script goomba_turn = SCRIPT({
} }
spawn { spawn {
sleep 6; sleep 6;
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk));
} }
JumpToGoal(ActorID_SELF, 16, 0, 1, 0); JumpToGoal(ACTOR_SELF, 16, 0, 1, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, pre_headbonk)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, pre_headbonk));
SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.3, 0.5, 1.0); SetActorScale(ACTOR_SELF, 1.3, 0.5, 1.0);
sleep 1; sleep 1;
} }
} }
EnemyDamageTarget(ActorID_SELF, SI_VAR(0), 0, 0, 0, 1, 32); EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), 0, 0, 0, 1, 32);
match SI_VAR(0) { match SI_VAR(0) {
0, 2 { 0, 2 {
UseCamPreset(2); UseCamPreset(2);
SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
sleep 1; sleep 1;
SetActorRotation(ActorID_SELF, 0, 0, 0); SetActorRotation(ACTOR_SELF, 0, 0, 0);
SetActorDispOffset(ActorID_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 40; SI_VAR(0) += 40;
SI_VAR(1) = 0; SI_VAR(1) = 0;
SetActorJumpGravity(ActorID_SELF, 1.8); SetActorJumpGravity(ACTOR_SELF, 1.8);
SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
JumpToGoal(ActorID_SELF, 10, 0, 1, 0); JumpToGoal(ACTOR_SELF, 10, 0, 1, 0);
SI_VAR(0) += 30; SI_VAR(0) += 30;
SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
JumpToGoal(ActorID_SELF, 8, 0, 1, 0); JumpToGoal(ACTOR_SELF, 8, 0, 1, 0);
SI_VAR(0) += 20; SI_VAR(0) += 20;
SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
JumpToGoal(ActorID_SELF, 6, 0, 1, 0); JumpToGoal(ACTOR_SELF, 6, 0, 1, 0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle));
sleep 3; sleep 3;
YieldTurn(); YieldTurn();
SetAnimationRate(ActorID_SELF, 1, 2.0); SetAnimationRate(ACTOR_SELF, 1, 2.0);
SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run));
SetGoalToHome(ActorID_SELF); SetGoalToHome(ACTOR_SELF);
SetActorSpeed(ActorID_SELF, 8.0); SetActorSpeed(ACTOR_SELF, 8.0);
RunToGoal(ActorID_SELF, 0, 0); RunToGoal(ACTOR_SELF, 0, 0);
SetAnimationRate(ActorID_SELF, 1, 1.0); SetAnimationRate(ACTOR_SELF, 1, 1.0);
} }
} }
EnableIdleScript(ActorID_SELF, 1); EnableIdleScript(ACTOR_SELF, 1);
UseIdleAnimation(ActorID_SELF, 1); UseIdleAnimation(ACTOR_SELF, 1);
}); });

View File

@ -37,15 +37,15 @@ s32 N(modelCommandList)[] = {
}; };
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_COCONUT; SI_VAR(10) = c ITEM_COCONUT;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SoundId_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
@ -54,7 +54,7 @@ Script N(main) = SCRIPT({
MultiplyByActorScale($x); MultiplyByActorScale($x);
func_802D38EC(SI_VAR(10), $x, $x, $x); func_802D38EC(SI_VAR(10), $x, $x, $x);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
SI_VAR(5) = 5; SI_VAR(5) = 5;
@ -65,8 +65,8 @@ Script N(main) = SCRIPT({
func_802D36E0(SI_VAR(10), $x, $y, $z); func_802D36E0(SI_VAR(10), $x, $y, $z);
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, $x, $y, $z); GetGoalPos(ACTOR_SELF, $x, $y, $z);
spawn { spawn {
$x = 0; $x = 0;
@ -81,7 +81,7 @@ Script N(main) = SCRIPT({
$z += 5; $z += 5;
func_802D3C58(SI_VAR(10), $x, $y, $z, 18); func_802D3C58(SI_VAR(10), $x, $y, $z, 18);
GetItemPower(ItemId_COCONUT, $damage, SI_VAR(4)); GetItemPower(ITEM_COCONUT, $damage, SI_VAR(4));
ApplyShrinkFromOwner($damage); ApplyShrinkFromOwner($damage);
ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, $damage, 32); ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, $damage, 32);

View File

@ -14,7 +14,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 facingAngleSign = 0.0f; f32 facingAngleSign = 0.0f;
s32 sleepTime = 0; s32 sleepTime = 0;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 iconX; s32 iconX;
s32 iconY; s32 iconY;
s32 iconZ; s32 iconZ;
@ -27,7 +27,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, 1 + 3 * i, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, 1 + 3 * i, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(battleStatus->playerActor, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E80); free_icon(D_802A1E80);
} }
@ -66,12 +66,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); // Nice UseCamPreset(69); // Nice
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -92,9 +92,9 @@ Script N(UseItemWithEffect) = SCRIPT({
} else { } else {
// No refund. // No refund.
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -118,8 +118,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -134,34 +134,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "dizzy_dial.h" #include "dizzy_dial.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_DIZZY_DIAL; SI_VAR(10) = c ITEM_DIZZY_DIAL;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
@ -32,12 +32,12 @@ Script N(main) = SCRIPT({
} }
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetItemPower(ItemId_DIZZY_DIAL, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_DIZZY_DIAL, SI_VAR(0), SI_VAR(1));
MakeStatusField(SI_VAR(0), 0x40000, 100, SI_VAR(0)); MakeStatusField(SI_VAR(0), 0x40000, 100, SI_VAR(0));
func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32);
1: 1:

View File

@ -13,7 +13,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -23,7 +23,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -48,7 +48,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1CD4); free_icon(D_802A1CD4);
} }
@ -98,12 +98,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -122,9 +122,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -148,8 +148,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -164,35 +164,35 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,24 +1,24 @@
#include "dried_shroom.h" #include "dried_shroom.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_DRIED_SHROOM; SI_VAR(10) = c ITEM_DRIED_SHROOM;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1);
N(func_802A12FC_71CFDC)(); N(func_802A12FC_71CFDC)();
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1A90); free_icon(D_802A1A90);
} }
@ -81,12 +81,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -105,9 +105,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -131,8 +131,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -147,34 +147,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -40,14 +40,14 @@ Script N(main) = SCRIPT({
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SoundId_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
SI_VAR(5) = 5; SI_VAR(5) = 5;
@ -57,8 +57,8 @@ Script N(main) = SCRIPT({
SI_VAR(2) += SI_VAR(5); SI_VAR(2) += SI_VAR(5);
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
@ -70,7 +70,7 @@ Script N(main) = SCRIPT({
func_802D39FC(SI_VAR(10), 0.80078125); func_802D39FC(SI_VAR(10), 0.80078125);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
GetItemPower(ItemId_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4)); GetItemPower(ITEM_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4));
ApplyShrinkFromOwner(SI_VAR(3)); ApplyShrinkFromOwner(SI_VAR(3));
ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32); ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32);
SI_VAR(0) += 40; SI_VAR(0) += 40;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E80); free_icon(D_802A1E80);
} }
@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -125,35 +125,35 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -112,22 +112,22 @@ s32 N(modelCommandList)[] = {
}; };
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_EGG_MISSILE; SI_VAR(10) = c ITEM_EGG_MISSILE;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SoundId_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 42; SI_VAR(1) += 42;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
@ -140,7 +140,7 @@ Script N(main) = SCRIPT({
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
func_802D3624(SI_VAR(10)); func_802D3624(SI_VAR(10));
PlaySound(SoundId_2010); PlaySound(SOUND_UNKNOWN_2010);
N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
StartRumble(5); StartRumble(5);
@ -149,7 +149,7 @@ Script N(main) = SCRIPT({
ShakeCam(1, 0, 4, 1.2001953125); ShakeCam(1, 0, 4, 1.2001953125);
ShakeCam(1, 0, 2, 0.4501953125); ShakeCam(1, 0, 2, 0.4501953125);
} }
GetItemPower(ItemId_EGG_MISSILE, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_EGG_MISSILE, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x18000202, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x18000202, 0, SI_VAR(0), 32);
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2890); free_icon(D_802A2890);
} }
@ -71,12 +71,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -95,9 +95,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -121,8 +121,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -137,34 +137,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,31 +1,31 @@
#include "electro_pop.h" #include "electro_pop.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_ELECTRO_POP; SI_VAR(10) = c ITEM_ELECTRO_POP;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
PlaySound(SoundId_379); PlaySound(SOUND_UNKNOWN_379);
GetItemPower(ItemId_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1));
N(func_802A123C_7307DC)(); N(func_802A123C_7307DC)();
sleep 40; sleep 40;
N(func_802A14F0_730A90)(); N(func_802A14F0_730A90)();
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 25; SI_VAR(1) += 25;
N(func_802A133C_7308DC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); N(func_802A133C_7308DC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
N(AddFP)(SI_VAR(3)); N(AddFP)(SI_VAR(3));
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
ShowMessageBox(16, 60); ShowMessageBox(16, 60);
WaitForMessageBoxDone(); WaitForMessageBoxDone();

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1D60); free_icon(D_802A1D60);
} }
@ -58,7 +58,7 @@ ApiStatus N(func_802A123C_7307DC)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
inflict_status(player, Debuff_STATIC, script->varTable[0]); inflict_status(player, STATUS_STATIC, script->varTable[0]);
player->status = 0; player->status = 0;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -90,7 +90,7 @@ ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall) {
#include "common/AddHP.inc.c" #include "common/AddHP.inc.c"
ApiStatus N(func_802A1450_7309F0)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_802A1450_7309F0)(ScriptInstance* script, s32 isInitialCall) {
StaticItem* item = &gItemTable[ItemId_ELECTRO_POP]; StaticItem* item = &gItemTable[ITEM_ELECTRO_POP];
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curHP += item->potencyA; playerData->curHP += item->potencyA;
@ -120,7 +120,7 @@ ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall) {
} }
ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) {
StaticItem* item = &gItemTable[ItemId_ELECTRO_POP]; StaticItem* item = &gItemTable[ITEM_ELECTRO_POP];
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curFP += item->potencyA; playerData->curFP += item->potencyA;
@ -138,12 +138,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -162,9 +162,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -188,8 +188,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -204,34 +204,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,40 +1,40 @@
#include "fire_flower.h" #include "fire_flower.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_FIRE_FLOWER; SI_VAR(10) = c ITEM_FIRE_FLOWER;
await N(UseItemWithEffect); await N(UseItemWithEffect);
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
PlaySound(SoundId_377); PlaySound(SOUND_UNKNOWN_377);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_PLANT); SetAnimation(ACTOR_PLAYER, 0, ANIM_PLANT);
spawn { spawn {
sleep 50; sleep 50;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
sleep 35; sleep 35;
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 10; sleep 10;
GetActorPos(ActorID_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); GetActorPos(ACTOR_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5));
SI_VAR(0) = 40; SI_VAR(0) = 40;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
SI_VAR(3) += SI_VAR(0); SI_VAR(3) += SI_VAR(0);
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) -= 10; SI_VAR(0) -= 10;
SetActorSpeed(ActorID_PLAYER, 2.0); SetActorSpeed(ACTOR_PLAYER, 2.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
spawn { spawn {
N(func_802A123C_716E9C)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); N(func_802A123C_716E9C)(SI_VAR(3), SI_VAR(4), SI_VAR(5));
sleep 25; sleep 25;
loop 12 { loop 12 {
sleep 1; sleep 1;
PlaySound(SoundId_202C); PlaySound(SOUND_UNKNOWN_202C);
sleep 2; sleep 2;
PlaySound(SoundId_202D); PlaySound(SOUND_UNKNOWN_202D);
sleep 1; sleep 1;
} }
} }
@ -43,13 +43,13 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
GetItemPower(ItemId_FIRE_FLOWER, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_FIRE_FLOWER, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x38000002, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x38000002, 0, SI_VAR(0), 32);
1: 1:
sleep 5; sleep 5;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1D70); free_icon(D_802A1D70);
} }
@ -88,12 +88,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -112,9 +112,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -138,8 +138,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -154,34 +154,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,35 +1,35 @@
#include "food.h" #include "food.h"
Script N(script6) = SCRIPT({ Script N(script6) = SCRIPT({
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 180); SetActorYaw(ACTOR_PLAYER, 180);
sleep 10; sleep 10;
SI_VAR(1) = SI_VAR(15); SI_VAR(1) = SI_VAR(15);
await N(UseItem); await N(UseItem);
SI_VAR(14) = SI_VAR(10); SI_VAR(14) = SI_VAR(10);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
spawn { spawn {
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
func_802D3474(SI_VAR(10), 0x80283EE8); func_802D3474(SI_VAR(10), 0x80283EE8);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 30; SI_VAR(1) += 30;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3F74(SI_VAR(10), 32); func_802D3F74(SI_VAR(10), 32);
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45; SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0); SI_VAR(14) = SI_VAR(0);
@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({
RemoveItemEntity(SI_VAR(14)); RemoveItemEntity(SI_VAR(14));
} }
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamTarget(0xFFFFFF83, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);
@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25);
AddBattleCamZoom(100); AddBattleCamZoom(100);
MoveBattleCamOver(30); MoveBattleCamOver(30);
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
N(func_802A12EC_7333BC)(SI_VAR(11)); N(func_802A12EC_7333BC)(SI_VAR(11));
} }
sleep 30; sleep 30;
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
sleep 20; sleep 20;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 0); SetActorYaw(ACTOR_PLAYER, 0);
sleep 10; sleep 10;
}); });
@ -83,7 +83,7 @@ Script N(main) = SCRIPT({
N(func_802A15A0_733670)(SI_VAR(10)); N(func_802A15A0_733670)(SI_VAR(10));
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
if (SI_VAR(0) == ActorID_PARTNER) { if (SI_VAR(0) == ACTOR_PARTNER) {
await N(script6); await N(script6);
return; return;
} }
@ -95,27 +95,27 @@ Script N(main) = SCRIPT({
await N(DrinkItem); await N(DrinkItem);
} }
if (SI_VAR(15) == 1) { if (SI_VAR(15) == 1) {
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE);
} }
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
} }
if (SI_VAR(11) < 0) { if (SI_VAR(11) < 0) {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
} }
if (SI_VAR(12) > 0) { if (SI_VAR(12) > 0) {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 25; SI_VAR(1) += 25;
N(func_802A1438_733508)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12)); N(func_802A1438_733508)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12));
} }
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) != 0) { if (SI_VAR(11) != 0) {
@ -126,14 +126,14 @@ Script N(main) = SCRIPT({
} }
if (SI_VAR(15) == 0) { if (SI_VAR(15) == 0) {
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
} else { } else {
sleep 30; sleep 30;
} }
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A24D0); free_icon(D_802A24D0);
} }
@ -145,12 +145,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -169,9 +169,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -195,8 +195,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -211,34 +211,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "fright_jar.h" #include "fright_jar.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_FRIGHT_JAR; SI_VAR(10) = c ITEM_FRIGHT_JAR;
await N(UseItemWithEffect); await N(UseItemWithEffect);
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
spawn { spawn {
@ -9,9 +9,9 @@ Script N(main) = SCRIPT({
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(50); MoveBattleCamOver(50);
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_CROUCH); SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH);
PlaySoundAtActor(ActorID_PLAYER, SoundId_367); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_367);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0xFFFFFFD8; SI_VAR(0) += 0xFFFFFFD8;
SI_VAR(1) += 5; SI_VAR(1) += 5;
SI_VAR(3) = 0.7001953125; SI_VAR(3) = 0.7001953125;
@ -35,7 +35,7 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
@ -48,7 +48,7 @@ Script N(main) = SCRIPT({
goto 0; goto 0;
} }
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_WALKING); SetAnimation(ACTOR_PLAYER, 0, ANIM_WALKING);
N(func_802A12D4_72BBE4)(); N(func_802A12D4_72BBE4)();
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1CA0); free_icon(D_802A1CA0);
} }
@ -77,12 +77,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -101,9 +101,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -127,8 +127,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -143,34 +143,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,77 +1,77 @@
#include "hustle_drink.h" #include "hustle_drink.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_HUSTLE_DRINK; SI_VAR(10) = c ITEM_HUSTLE_DRINK;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(DrinkItem); await N(DrinkItem);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_SQUISH); SetAnimation(ACTOR_PLAYER, 0, ANIM_SQUISH);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
N(func_802A12C4_726224)(); N(func_802A12C4_726224)();
N(func_802A123C_72619C)(); N(func_802A123C_72619C)();
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
UseCamPreset(13); UseCamPreset(13);
BattleCamTargetActor(ActorID_SELF); BattleCamTargetActor(ACTOR_SELF);
MoveBattleCamOver(20); MoveBattleCamOver(20);
PlaySoundAtActor(ActorID_PLAYER, SoundId_369); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369);
spawn { spawn {
loop 2 { loop 2 {
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.1005859375, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.1005859375, 1.0, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.2001953125, 0.9501953125, 1.0); SetActorScale(ACTOR_SELF, 1.2001953125, 0.9501953125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.30078125, 0.900390625, 1.0); SetActorScale(ACTOR_SELF, 1.30078125, 0.900390625, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.3505859375, 0.8505859375, 1.0); SetActorScale(ACTOR_SELF, 1.3505859375, 0.8505859375, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.380859375, 0.80078125, 1.0); SetActorScale(ACTOR_SELF, 1.380859375, 0.80078125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.400390625, 0.80078125, 1.0); SetActorScale(ACTOR_SELF, 1.400390625, 0.80078125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.30078125, 0.8505859375, 1.0); SetActorScale(ACTOR_SELF, 1.30078125, 0.8505859375, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.2001953125, 0.900390625, 1.0); SetActorScale(ACTOR_SELF, 1.2001953125, 0.900390625, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.1005859375, 0.9501953125, 1.0); SetActorScale(ACTOR_SELF, 1.1005859375, 0.9501953125, 1.0);
sleep 1; sleep 1;
} }
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.1005859375, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.1005859375, 1.0, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.2001953125, 0.9501953125, 1.0); SetActorScale(ACTOR_SELF, 1.2001953125, 0.9501953125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.30078125, 0.900390625, 1.0); SetActorScale(ACTOR_SELF, 1.30078125, 0.900390625, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.3505859375, 0.8505859375, 1.0); SetActorScale(ACTOR_SELF, 1.3505859375, 0.8505859375, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.380859375, 0.80078125, 1.0); SetActorScale(ACTOR_SELF, 1.380859375, 0.80078125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.400390625, 0.80078125, 1.0); SetActorScale(ACTOR_SELF, 1.400390625, 0.80078125, 1.0);
sleep 1; sleep 1;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208E);
SetActorScale(ActorID_SELF, 0.900390625, 1.30078125, 1.0); SetActorScale(ACTOR_SELF, 0.900390625, 1.30078125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 0.900390625, 1.2001953125, 1.0); SetActorScale(ACTOR_SELF, 0.900390625, 1.2001953125, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 0.9501953125, 1.1005859375, 1.0); SetActorScale(ACTOR_SELF, 0.9501953125, 1.1005859375, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);
sleep 1; sleep 1;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
loop 10 { loop 10 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_369); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369);
PlayEffect(0x6, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
PlayEffect(0x6, 1, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 1, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
sleep 4; sleep 4;
} }
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 20; sleep 20;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E70); free_icon(D_802A1E70);
} }
@ -91,12 +91,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -115,9 +115,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -141,8 +141,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -157,34 +157,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -36,18 +36,18 @@ s32 N(modelCommandList)[] = {
}; };
Script script = SCRIPT({ Script script = SCRIPT({
SI_VAR(10) = c ItemId_INSECTICIDE_HERB; SI_VAR(10) = c ITEM_INSECTICIDE_HERB;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SoundId_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
SI_VAR(5) = 5; SI_VAR(5) = 5;
@ -57,8 +57,8 @@ Script script = SCRIPT({
SI_VAR(2) += SI_VAR(5); SI_VAR(2) += SI_VAR(5);
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
@ -83,14 +83,14 @@ Script script = SCRIPT({
N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
} }
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
N(func_802A123C_72A98C)(); N(func_802A123C_72A98C)();
func_802D3624(SI_VAR(10)); func_802D3624(SI_VAR(10));
if (SI_VAR(9) == 0) { if (SI_VAR(9) == 0) {
ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32); ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32);
} else { } else {
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
N(func_802A1280_72A9D0)(); N(func_802A1280_72A9D0)();
} }
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A21C0); free_icon(D_802A21C0);
} }
@ -123,12 +123,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -147,9 +147,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -173,8 +173,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -189,34 +189,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A21F0); free_icon(D_802A21F0);
} }
@ -105,7 +105,7 @@ ApiStatus N(func_802A1378_72E8A8)(ScriptInstance* script, s32 isInitialCall) {
} }
ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall) {
StaticItem* item = &gItemTable[ItemId_LIFE_SHROOM]; StaticItem* item = &gItemTable[ITEM_LIFE_SHROOM];
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curHP += item->potencyA; playerData->curHP += item->potencyA;
@ -138,12 +138,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -162,9 +162,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -188,8 +188,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -204,34 +204,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,35 +1,35 @@
#include "life_shroom.h" #include "life_shroom.h"
Script N(script6) = SCRIPT({ Script N(script6) = SCRIPT({
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 180); SetActorYaw(ACTOR_PLAYER, 180);
sleep 10; sleep 10;
SI_VAR(1) = SI_VAR(15); SI_VAR(1) = SI_VAR(15);
await N(UseItem); await N(UseItem);
SI_VAR(14) = SI_VAR(10); SI_VAR(14) = SI_VAR(10);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
spawn { spawn {
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
func_802D3474(SI_VAR(10), 0x80283EE8); func_802D3474(SI_VAR(10), 0x80283EE8);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 30; SI_VAR(1) += 30;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3F74(SI_VAR(10), 32); func_802D3F74(SI_VAR(10), 32);
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45; SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0); SI_VAR(14) = SI_VAR(0);
@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({
RemoveItemEntity(SI_VAR(14)); RemoveItemEntity(SI_VAR(14));
} }
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamTarget(0xFFFFFF83, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);
@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25);
AddBattleCamZoom(100); AddBattleCamZoom(100);
MoveBattleCamOver(30); MoveBattleCamOver(30);
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
N(func_802A12EC_72E81C)(SI_VAR(11)); N(func_802A12EC_72E81C)(SI_VAR(11));
} }
sleep 30; sleep 30;
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
sleep 20; sleep 20;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 0); SetActorYaw(ACTOR_PLAYER, 0);
sleep 10; sleep 10;
}); });
@ -83,28 +83,28 @@ Script N(main) = SCRIPT({
N(func_802A1484_72E9B4)(SI_VAR(10)); N(func_802A1484_72E9B4)(SI_VAR(10));
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
if (SI_VAR(0) == ActorID_PARTNER) { if (SI_VAR(0) == ACTOR_PARTNER) {
await N(script6); await N(script6);
return; return;
} }
SI_VAR(10) = c ItemId_LIFE_SHROOM; SI_VAR(10) = c ITEM_LIFE_SHROOM;
SI_VAR(1) = SI_VAR(15); SI_VAR(1) = SI_VAR(15);
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
N(func_802A1438_72E968)(); N(func_802A1438_72E968)();
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A1378_72E8A8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); N(func_802A1378_72E8A8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2410); free_icon(D_802A2410);
} }
@ -137,12 +137,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -161,9 +161,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -187,8 +187,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -203,34 +203,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,35 +1,35 @@
#include "mushroom.h" #include "mushroom.h"
Script N(script6) = SCRIPT({ Script N(script6) = SCRIPT({
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 180); SetActorYaw(ACTOR_PLAYER, 180);
sleep 10; sleep 10;
SI_VAR(1) = SI_VAR(15); SI_VAR(1) = SI_VAR(15);
await N(UseItem); await N(UseItem);
SI_VAR(14) = SI_VAR(10); SI_VAR(14) = SI_VAR(10);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
spawn { spawn {
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
func_802D3474(SI_VAR(10), 0x80283EE8); func_802D3474(SI_VAR(10), 0x80283EE8);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 30; SI_VAR(1) += 30;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3F74(SI_VAR(10), 32); func_802D3F74(SI_VAR(10), 32);
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45; SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0); SI_VAR(14) = SI_VAR(0);
@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({
RemoveItemEntity(SI_VAR(14)); RemoveItemEntity(SI_VAR(14));
} }
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamTarget(0xFFFFFF83, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);
@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25);
AddBattleCamZoom(100); AddBattleCamZoom(100);
MoveBattleCamOver(30); MoveBattleCamOver(30);
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
N(func_802A12EC_715B3C)(SI_VAR(11)); N(func_802A12EC_715B3C)(SI_VAR(11));
} }
sleep 30; sleep 30;
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
sleep 20; sleep 20;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 0); SetActorYaw(ACTOR_PLAYER, 0);
sleep 10; sleep 10;
}); });
@ -83,7 +83,7 @@ Script N(main) = SCRIPT({
N(func_802A15A0_715DF0)(SI_VAR(10)); N(func_802A15A0_715DF0)(SI_VAR(10));
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
if (SI_VAR(0) == ActorID_PARTNER) { if (SI_VAR(0) == ACTOR_PARTNER) {
await N(script6); await N(script6);
return; return;
} }
@ -91,21 +91,21 @@ Script N(main) = SCRIPT({
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
if (SI_VAR(15) == 1) { if (SI_VAR(15) == 1) {
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE);
} }
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A1378_715BC8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); N(func_802A1378_715BC8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
} }
if (SI_VAR(12) > 0) { if (SI_VAR(12) > 0) {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 25; SI_VAR(1) += 25;
N(func_802A1438_715C88)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12)); N(func_802A1438_715C88)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12));
} }
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) != 0) { if (SI_VAR(11) != 0) {
@ -116,14 +116,14 @@ Script N(main) = SCRIPT({
} }
if (SI_VAR(15) == 0) { if (SI_VAR(15) == 0) {
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
} else { } else {
sleep 30; sleep 30;
} }
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A25C0); free_icon(D_802A25C0);
} }
@ -277,12 +277,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -301,9 +301,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -327,8 +327,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -343,34 +343,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -46,26 +46,26 @@ s32 N(D_802A229C_72D84C)[8] = {
}; };
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_MYSTERY; SI_VAR(10) = c ITEM_MYSTERY;
await N(UseItemWithEffect); await N(UseItemWithEffect);
spawn { spawn {
sleep 220; sleep 220;
PlaySoundAtActor(ActorID_PLAYER, SoundId_3F3); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_3F3);
} }
PlaySoundAtActor(ActorID_PLAYER, SoundId_368); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368);
N(func_802A13E4_72C994)(); N(func_802A13E4_72C994)();
sleep 2; sleep 2;
if (SI_VAR(0) != ItemId_PEBBLE) { if (SI_VAR(0) != ITEM_PEBBLE) {
jump UseMystery; jump UseMystery;
return; return;
} }
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 150; SI_VAR(1) += 150;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetOwnerTarget(0, 0); SetOwnerTarget(0, 0);
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
@ -83,10 +83,10 @@ Script N(main) = SCRIPT({
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16);
func_802D3624(SI_VAR(10)); func_802D3624(SI_VAR(10));
} }
SetTargetActor(ActorID_SELF, 0); SetTargetActor(ACTOR_SELF, 0);
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
N(func_802A188C_72CE3C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A188C_72CE3C)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetBattleFlagBits(32, 1); SetBattleFlagBits(32, 1);
DispatchDamagePlayerEvent(1, Event_HIT); DispatchDamagePlayerEvent(1, EVENT_HIT);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E80); free_icon(D_802A1E80);
} }
@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -125,35 +125,35 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -36,18 +36,18 @@ s32 N(modelCommandList)[] = {
}; };
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_PEBBLE; SI_VAR(10) = c ITEM_PEBBLE;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SoundId_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
SI_VAR(5) = 5; SI_VAR(5) = 5;
@ -57,8 +57,8 @@ Script N(main) = SCRIPT({
SI_VAR(2) += SI_VAR(5); SI_VAR(2) += SI_VAR(5);
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
@ -70,7 +70,7 @@ Script N(main) = SCRIPT({
func_802D39FC(SI_VAR(10), 0.80078125); func_802D39FC(SI_VAR(10), 0.80078125);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
GetItemPower(ItemId_PEBBLE, SI_VAR(3), SI_VAR(4)); GetItemPower(ITEM_PEBBLE, SI_VAR(3), SI_VAR(4));
ApplyShrinkFromOwner(SI_VAR(3)); ApplyShrinkFromOwner(SI_VAR(3));
ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32); ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32);
SI_VAR(0) += 60; SI_VAR(0) += 60;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A18E0); free_icon(D_802A18E0);
} }
@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -125,34 +125,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,15 +1,15 @@
#include "please_come_back.h" #include "please_come_back.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_DIZZY_DIAL; SI_VAR(10) = c ITEM_DIZZY_DIAL;
await N(UseItemWithEffect); await N(UseItemWithEffect);
SetGoalToHome(0); SetGoalToHome(0);
SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_MIDAIR_STILL, PlayerAnim_MIDAIR, PlayerAnim_9); SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009);
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetActorJumpGravity(ActorID_PLAYER, 1.80078125); SetActorJumpGravity(ACTOR_PLAYER, 1.80078125);
func_80273444(4, 0, 0); func_80273444(4, 0, 0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_8000B); SetAnimation(ACTOR_PLAYER, 0, ANIM_8000B);
sleep 8; sleep 8;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2120); free_icon(D_802A2120);
} }
@ -102,12 +102,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -126,9 +126,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -152,8 +152,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -168,34 +168,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "pow_block.h" #include "pow_block.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_P_O_W_BLOCK; SI_VAR(10) = c ITEM_P_O_W_BLOCK;
await N(UseItemWithEffect); await N(UseItemWithEffect);
sleep 10; sleep 10;
MakeEntity(0x802EA2E0, 0xFFFFFFD8, 60, 0, 0, 0x80000000); MakeEntity(0x802EA2E0, 0xFFFFFFD8, 60, 0, 0, 0x80000000);
@ -11,13 +11,13 @@ Script N(main) = SCRIPT({
PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0);
PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0);
PlayEffect(0x7, 2, 0xFFFFFFD8, 55, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFD8, 55, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
spawn { spawn {
sleep 15; sleep 15;
PlaySoundAtActor(ActorID_PLAYER, SoundId_HIT_BLOCK); PlaySoundAtActor(ACTOR_PLAYER, SOUND_HIT_BLOCK);
N(func_802A123C_718A8C)(); N(func_802A123C_718A8C)();
PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0);
PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -29,35 +29,35 @@ Script N(main) = SCRIPT({
ShakeCam(1, 0, 2, 6.0); ShakeCam(1, 0, 2, 6.0);
ShakeCam(1, 0, 2, 5.0); ShakeCam(1, 0, 2, 5.0);
ShakeCam(1, 0, 2, 4.0); ShakeCam(1, 0, 2, 4.0);
PlaySoundAtActor(ActorID_PLAYER, SoundId_2030); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2030);
ShakeCam(1, 0, 2, 3.0); ShakeCam(1, 0, 2, 3.0);
ShakeCam(1, 0, 2, 2.0); ShakeCam(1, 0, 2, 2.0);
ShakeCam(1, 0, 2, 1.0); ShakeCam(1, 0, 2, 1.0);
ShakeCam(1, 0, 2, 0.5); ShakeCam(1, 0, 2, 0.5);
ShakeCam(1, 0, 2, 0.2001953125); ShakeCam(1, 0, 2, 0.2001953125);
} }
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 30; SI_VAR(0) += 30;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
PlayerRunToGoal(0); PlayerRunToGoal(0);
sleep 5; sleep 5;
SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_MIDAIR_STILL, PlayerAnim_MIDAIR, PlayerAnim_9); SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009);
SetActorJumpGravity(ActorID_PLAYER, 0.6005859375); SetActorJumpGravity(ACTOR_PLAYER, 0.6005859375);
SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_80273444(20, 0, 0); func_80273444(20, 0, 0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetItemPower(ItemId_P_O_W_BLOCK, SI_VAR(3), SI_VAR(4)); GetItemPower(ITEM_P_O_W_BLOCK, SI_VAR(3), SI_VAR(4));
ApplyShrinkFromOwner(SI_VAR(3)); ApplyShrinkFromOwner(SI_VAR(3));
func_80269EAC(22); func_80269EAC(22);
ItemDamageEnemy(SI_VAR(0), 0x38000400, 0, SI_VAR(3), 32); ItemDamageEnemy(SI_VAR(0), 0x38000400, 0, SI_VAR(3), 32);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A19C0); free_icon(D_802A19C0);
} }
@ -59,7 +59,7 @@ ApiStatus N(func_802A123C_72DDAC)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
ActorPart* part = player->partsTable; ActorPart* part = player->partsTable;
inflict_status(player, Debuff_0xE, script->varTable[0]); inflict_status(player, STATUS_E, script->varTable[0]);
player->status = 0; player->status = 0;
part->flags |= 0x100; part->flags |= 0x100;
@ -71,12 +71,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -95,9 +95,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -121,8 +121,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -137,34 +137,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,17 +1,17 @@
#include "repel_gel.h" #include "repel_gel.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_REPEL_GEL; SI_VAR(10) = c ITEM_REPEL_GEL;
await N(UseItemWithEffect); await N(UseItemWithEffect);
PlaySoundAtActor(ActorID_PLAYER, SoundId_375); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_375);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30008); SetAnimation(ACTOR_PLAYER, 0, ANIM_30008);
sleep 45; sleep 45;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
PlayEffect(0x33, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x33, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
PlaySoundAtActor(ActorID_PLAYER, SoundId_376); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_376);
GetItemPower(ItemId_REPEL_GEL, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_REPEL_GEL, SI_VAR(0), SI_VAR(1));
N(func_802A123C_72DDAC)(); N(func_802A123C_72DDAC)();
sleep 20; sleep 20;
ShowMessageBox(17, 60); ShowMessageBox(17, 60);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1EE0); free_icon(D_802A1EE0);
} }
@ -150,12 +150,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -174,9 +174,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -200,8 +200,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -216,34 +216,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "shooting_star.h" #include "shooting_star.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_SHOOTING_STAR; SI_VAR(10) = c ITEM_SHOOTING_STAR;
await N(UseItemWithEffect); await N(UseItemWithEffect);
spawn { spawn {
sleep 5; sleep 5;
@ -12,11 +12,11 @@ Script N(main) = SCRIPT({
spawn { spawn {
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 10 { loop 10 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_259); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_259);
N(func_802A123C_71D9AC)(); N(func_802A123C_71D9AC)();
SI_VAR(0) += 1; SI_VAR(0) += 1;
sleep 5; sleep 5;
PlaySoundAtActor(ActorID_PLAYER, SoundId_25A); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25A);
N(func_802A123C_71D9AC)(); N(func_802A123C_71D9AC)();
SI_VAR(0) += 1; SI_VAR(0) += 1;
sleep 5; sleep 5;
@ -26,10 +26,10 @@ Script N(main) = SCRIPT({
SI_VAR(0) = 0; SI_VAR(0) = 0;
sleep 50; sleep 50;
loop 10 { loop 10 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_25C); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25C);
SI_VAR(0) += 1; SI_VAR(0) += 1;
sleep 5; sleep 5;
PlaySoundAtActor(ActorID_PLAYER, SoundId_25D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25D);
SI_VAR(0) += 1; SI_VAR(0) += 1;
sleep 5; sleep 5;
} }
@ -46,14 +46,14 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
N(func_802A1388_71DAF8)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A1388_71DAF8)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
GetItemPower(ItemId_SHOOTING_STAR, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_SHOOTING_STAR, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x38000100, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x38000100, 0, SI_VAR(0), 32);
1: 1:
sleep 10; sleep 10;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A3F50); free_icon(D_802A3F50);
} }
@ -278,12 +278,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -302,9 +302,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -328,8 +328,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -344,34 +344,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -101,7 +101,7 @@ s32 N(modelCommandList)[] = {
}; };
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) =c ItemId_SLEEPY_SHEEP; SI_VAR(10) =c ITEM_SLEEPY_SHEEP;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(19); UseCamPreset(19);
SetBattleCamTarget(0xFFFFFFBD, 0xFFFFFFF1, 0xFFFFFFFB); SetBattleCamTarget(0xFFFFFFBD, 0xFFFFFFF1, 0xFFFFFFFB);
@ -109,7 +109,7 @@ Script N(main) = SCRIPT({
SetBattleCamZoom(169); SetBattleCamZoom(169);
MoveBattleCamOver(50); MoveBattleCamOver(50);
spawn { spawn {
PlaySoundAtActor(ActorID_PLAYER, SoundId_364); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_364);
loop 7 { loop 7 {
StartRumble(2); StartRumble(2);
ShakeCam(1, 0, 2, 0.5); ShakeCam(1, 0, 2, 0.5);
@ -130,22 +130,22 @@ Script N(main) = SCRIPT({
} }
} }
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 32; SI_VAR(1) += 32;
ShowEmote(0, 2, 0xFFFFFFD3, 20, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); ShowEmote(0, 2, 0xFFFFFFD3, 20, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
sleep 30; sleep 30;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 180); SetActorYaw(ACTOR_PLAYER, 180);
spawn { spawn {
N(func_802A123C_71E88C)(); N(func_802A123C_71E88C)();
} }
@ -158,24 +158,24 @@ Script N(main) = SCRIPT({
UseCamPreset(2); UseCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 8; sleep 8;
SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_1002B, PlayerAnim_1002B, PlayerAnim_MIDAIR); SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_1002B, ANIM_1002B, ANIM_MIDAIR);
SetActorJumpGravity(ActorID_PLAYER, 1.80078125); SetActorJumpGravity(ACTOR_PLAYER, 1.80078125);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_80273444(15, 0, 0); func_80273444(15, 0, 0);
spawn { spawn {
sleep 5; sleep 5;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 0); SetActorYaw(ACTOR_PLAYER, 0);
} }
sleep 40; sleep 40;
func_802D3474(SI_VAR(10), N(modelCommandList)); func_802D3474(SI_VAR(10), N(modelCommandList));
@ -187,31 +187,31 @@ Script N(main) = SCRIPT({
func_802D3998(SI_VAR(10), 7.0); func_802D3998(SI_VAR(10), 7.0);
func_802D39FC(SI_VAR(10), 1.400390625); func_802D39FC(SI_VAR(10), 1.400390625);
SetOwnerTarget(0, 0); SetOwnerTarget(0, 0);
SetGoalToTarget(ActorID_PLAYER); SetGoalToTarget(ACTOR_PLAYER);
GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) -= 60; SI_VAR(0) -= 60;
func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0);
GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0);
PlaySoundAtActor(ActorID_PLAYER, SoundId_HIT_BLOCK); PlaySoundAtActor(ACTOR_PLAYER, SOUND_HIT_BLOCK);
spawn { spawn {
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_SHOCK_STILL); SetAnimation(ACTOR_PLAYER, 0, ANIM_SHOCK_STILL);
SetActorScale(ActorID_PLAYER, 1.2001953125, 0.900390625, 1.0); SetActorScale(ACTOR_PLAYER, 1.2001953125, 0.900390625, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_PLAYER, 1.30078125, 0.80078125, 1.0); SetActorScale(ACTOR_PLAYER, 1.30078125, 0.80078125, 1.0);
sleep 3; sleep 3;
SetActorScale(ActorID_PLAYER, 1.2001953125, 0.900390625, 1.0); SetActorScale(ACTOR_PLAYER, 1.2001953125, 0.900390625, 1.0);
sleep 1; sleep 1;
SetActorScale(ActorID_PLAYER, 1.0, 1.0, 1.0); SetActorScale(ACTOR_PLAYER, 1.0, 1.0, 1.0);
} }
PlayEffect(0x6, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
sleep 2; sleep 2;
func_802D39FC(SI_VAR(10), 1.400390625); func_802D39FC(SI_VAR(10), 1.400390625);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 60; SI_VAR(0) += 60;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0);
PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
SI_VAR(0) += 20; SI_VAR(0) += 20;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0);
PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -220,7 +220,7 @@ Script N(main) = SCRIPT({
PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
sleep 5; sleep 5;
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 270; SI_VAR(0) += 270;
func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0);
func_802D3624(SI_VAR(10)); func_802D3624(SI_VAR(10));
@ -230,12 +230,12 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetItemPower(ItemId_SLEEPY_SHEEP, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_SLEEPY_SHEEP, SI_VAR(0), SI_VAR(1));
MakeStatusField(SI_VAR(0), 4096, 100, SI_VAR(0)); MakeStatusField(SI_VAR(0), 4096, 100, SI_VAR(0));
func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32);
1: 1:

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1EB0); free_icon(D_802A1EB0);
} }
@ -89,12 +89,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -113,9 +113,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -139,8 +139,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -155,34 +155,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,10 +1,10 @@
#include "snowman_doll.h" #include "snowman_doll.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_SNOWMAN_DOLL; SI_VAR(10) = c ITEM_SNOWMAN_DOLL;
await N(UseItemWithEffect); await N(UseItemWithEffect);
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
PlaySoundAtActor(ActorID_PLAYER, SoundId_363); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_363);
spawn { spawn {
loop 45 { loop 45 {
RandInt(300, SI_VAR(0)); RandInt(300, SI_VAR(0));
@ -23,19 +23,19 @@ Script N(main) = SCRIPT({
PlayEffect(0x60, 0, 0, 0, 20, 1.0, 160, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x60, 0, 0, 0, 20, 1.0, 160, 0, 0, 0, 0, 0, 0, 0);
spawn { spawn {
sleep 17; sleep 17;
PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E);
StartRumble(9); StartRumble(9);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
sleep 46; sleep 46;
PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E);
StartRumble(9); StartRumble(9);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
sleep 25; sleep 25;
PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E);
StartRumble(9); StartRumble(9);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
sleep 25; sleep 25;
PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E);
StartRumble(9); StartRumble(9);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
} }
@ -47,14 +47,14 @@ Script N(main) = SCRIPT({
sleep 110; sleep 110;
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
N(func_802A123C_71C06C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A123C_71C06C)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
GetItemPower(ItemId_SNOWMAN_DOLL, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_SNOWMAN_DOLL, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x38000008, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x38000008, 0, SI_VAR(0), 32);
sleep 5; sleep 5;
1: 1:
@ -62,7 +62,7 @@ Script N(main) = SCRIPT({
if (SI_VAR(0) != -1) { if (SI_VAR(0) != -1) {
goto 0; goto 0;
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 30; sleep 30;
N(func_802A13B8_71C1E8)(); N(func_802A13B8_71C1E8)();
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1A60); free_icon(D_802A1A60);
} }
@ -65,7 +65,7 @@ ApiStatus N(func_802A123C_7217DC)(ScriptInstance* script, s32 isInitialCall) {
switch (script->functionTemp[0].s) { switch (script->functionTemp[0].s) {
case 0: case 0:
inflict_status(player, Debuff_STONE, script->varTable[0]); inflict_status(player, STATUS_STONE, script->varTable[0]);
player->status = 0; player->status = 0;
script->functionTemp[1].s = 3; script->functionTemp[1].s = 3;
script->functionTemp[0].s = 1; script->functionTemp[0].s = 1;
@ -101,12 +101,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -125,9 +125,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -151,8 +151,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -167,34 +167,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,15 +1,15 @@
#include "stone_cap.h" #include "stone_cap.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_STONE_CAP; SI_VAR(10) = c ITEM_STONE_CAP;
await N(UseItemWithEffect); await N(UseItemWithEffect);
PlaySound(SoundId_361); PlaySound(SOUND_UNKNOWN_361);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30009); SetAnimation(ACTOR_PLAYER, 0, ANIM_30009);
sleep 30; sleep 30;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_CROUCH); SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH);
GetItemPower(ItemId_STONE_CAP, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_STONE_CAP, SI_VAR(0), SI_VAR(1));
PlaySound(SoundId_362); PlaySound(SOUND_UNKNOWN_362);
N(func_802A123C_7217DC)(); N(func_802A123C_7217DC)();
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
sleep 20; sleep 20;
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1B40); free_icon(D_802A1B40);
} }
@ -77,12 +77,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -101,9 +101,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -127,8 +127,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -143,34 +143,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "stop_watch.h" #include "stop_watch.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_STOP_WATCH; SI_VAR(10) = c ITEM_STOP_WATCH;
await N(UseItemWithEffect); await N(UseItemWithEffect);
spawn { spawn {
sleep 5; sleep 5;
@ -10,18 +10,18 @@ Script N(main) = SCRIPT({
} }
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
PlayEffect(0x62, 0, 0, 0, 0, 1.0, 200, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x62, 0, 0, 0, 0, 1.0, 200, 0, 0, 0, 0, 0, 0, 0);
PlaySoundAtActor(ActorID_PLAYER, SoundId_246); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_246);
sleep 200; sleep 200;
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
} }
GetItemPower(ItemId_STOP_WATCH, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_STOP_WATCH, SI_VAR(0), SI_VAR(1));
MakeStatusField(SI_VAR(0), 0x200000, 100, SI_VAR(0)); MakeStatusField(SI_VAR(0), 0x200000, 100, SI_VAR(0));
func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32);
1: 1:

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2DD0); free_icon(D_802A2DD0);
} }
@ -280,7 +280,7 @@ ApiStatus N(func_802A18D8_731BD8)(ScriptInstance* script, s32 isInitialCall) {
#include "common/AddFP.inc.c" #include "common/AddFP.inc.c"
ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) {
StaticItem* item = &gItemTable[ItemId_KOOKY_COOKIE]; StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE];
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curHP += item->potencyA; playerData->curHP += item->potencyA;
@ -294,7 +294,7 @@ ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) {
} }
ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance* script, s32 isInitialCall) {
StaticItem* item = &gItemTable[ItemId_KOOKY_COOKIE]; StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE];
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curFP += item->potencyB; playerData->curFP += item->potencyB;
@ -311,7 +311,7 @@ ApiStatus N(func_802A1AD8_731DD8)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
inflict_status(player, Debuff_STATIC, 3); inflict_status(player, STATUS_STATIC, 3);
player->status = 0; player->status = 0;
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -322,7 +322,7 @@ ApiStatus N(func_802A1B14_731E14)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
ActorPart* part = player->partsTable; ActorPart* part = player->partsTable;
inflict_status(player, Debuff_0xE, 3); inflict_status(player, STATUS_E, 3);
player->status = 0; player->status = 0;
part->flags |= 0x100; part->flags |= 0x100;
@ -333,7 +333,7 @@ ApiStatus N(func_802A1B68_731E68)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
inflict_status(player, Debuff_SLEEP, 3); inflict_status(player, STATUS_SLEEP, 3);
player->status = 0; player->status = 0;
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -344,12 +344,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -368,9 +368,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -394,8 +394,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -410,34 +410,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -25,40 +25,40 @@ s32 N(D_802A2858_732B58)[] = {
Script N(script6) = SCRIPT({ Script N(script6) = SCRIPT({
GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2));
if (SI_VAR(1) == 211) { if (SI_VAR(1) == 211) {
SI_VAR(10) = c ItemId_KOOKY_COOKIE; SI_VAR(10) = c ITEM_KOOKY_COOKIE;
SI_VAR(1) = 0; SI_VAR(1) = 0;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
N(func_802A1A8C_731D8C)(); N(func_802A1A8C_731D8C)();
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 25; SI_VAR(1) += 25;
N(func_802A18D8_731BD8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); N(func_802A18D8_731BD8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
N(AddFP)(SI_VAR(3)); N(AddFP)(SI_VAR(3));
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3));
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
} else { } else {
SI_VAR(10) = c ItemId_STRANGE_CAKE; SI_VAR(10) = c ITEM_STRANGE_CAKE;
SI_VAR(1) = 0; SI_VAR(1) = 0;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
} }
sleep 10; sleep 10;
spawn { spawn {
sleep 220; sleep 220;
PlaySoundAtActor(ActorID_PLAYER, SoundId_3F3); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_3F3);
} }
PlaySoundAtActor(ActorID_PLAYER, SoundId_368); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368);
N(func_802A13E4_7316E4)(); N(func_802A13E4_7316E4)();
sleep 2; sleep 2;
match SI_VAR(0) { match SI_VAR(0) {
@ -76,8 +76,8 @@ Script N(script6) = SCRIPT({
}); });
Script N(script7) = SCRIPT({ Script N(script7) = SCRIPT({
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
N(func_802A1AD8_731DD8)(); N(func_802A1AD8_731DD8)();
@ -87,8 +87,8 @@ Script N(script7) = SCRIPT({
}); });
Script N(script8) = SCRIPT({ Script N(script8) = SCRIPT({
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
PlayEffect(0x33, 6, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x33, 6, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0);
N(func_802A1B14_731E14)(); N(func_802A1B14_731E14)();
@ -98,9 +98,9 @@ Script N(script8) = SCRIPT({
}); });
Script N(script9) = SCRIPT({ Script N(script9) = SCRIPT({
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30004); SetAnimation(ACTOR_PLAYER, 0, ANIM_30004);
SetGoalToTarget(ActorID_PLAYER); SetGoalToTarget(ACTOR_PLAYER);
GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn DoSleepHit; spawn DoSleepHit;
N(func_802A1B68_731E68)(); N(func_802A1B68_731E68)();
sleep 20; sleep 20;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2280); free_icon(D_802A2280);
} }
@ -97,7 +97,7 @@ ApiStatus N(func_802A1378_725058)(ScriptInstance* script, s32 isInitialCall) {
Actor* actor = get_actor(actorId); Actor* actor = get_actor(actorId);
s32 id = actor->actorID & 0x700; s32 id = actor->actorID & 0x700;
if (actor->debuff != Debuff_END) { if (actor->debuff != STATUS_END) {
actor->debuffDuration = 0; actor->debuffDuration = 0;
actor->debuff = 0; actor->debuff = 0;
func_80047898(actor->unk_436); func_80047898(actor->unk_436);
@ -137,12 +137,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -161,9 +161,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -187,8 +187,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -203,34 +203,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,35 +1,35 @@
#include "super_soda.h" #include "super_soda.h"
Script N(script6) = SCRIPT({ Script N(script6) = SCRIPT({
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 180); SetActorYaw(ACTOR_PLAYER, 180);
sleep 10; sleep 10;
SI_VAR(1) = SI_VAR(15); SI_VAR(1) = SI_VAR(15);
await N(UseItem); await N(UseItem);
SI_VAR(14) = SI_VAR(10); SI_VAR(14) = SI_VAR(10);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
spawn { spawn {
sleep 20; sleep 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
func_802D3474(SI_VAR(10), 0x80283EE8); func_802D3474(SI_VAR(10), 0x80283EE8);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 30; SI_VAR(1) += 30;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3F74(SI_VAR(10), 32); func_802D3F74(SI_VAR(10), 32);
spawn { spawn {
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45; SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0); SI_VAR(14) = SI_VAR(0);
@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({
RemoveItemEntity(SI_VAR(14)); RemoveItemEntity(SI_VAR(14));
} }
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamTarget(0xFFFFFF83, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);
@ -52,57 +52,57 @@ Script N(script6) = SCRIPT({
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25);
AddBattleCamZoom(100); AddBattleCamZoom(100);
MoveBattleCamOver(30); MoveBattleCamOver(30);
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
if (SI_VAR(11) > 0) { if (SI_VAR(11) > 0) {
N(func_802A12EC_724FCC)(SI_VAR(11)); N(func_802A12EC_724FCC)(SI_VAR(11));
} }
sleep 30; sleep 30;
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11));
sleep 20; sleep 20;
SetActorYaw(ActorID_PLAYER, 150); SetActorYaw(ACTOR_PLAYER, 150);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 120); SetActorYaw(ACTOR_PLAYER, 120);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 90); SetActorYaw(ACTOR_PLAYER, 90);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 60); SetActorYaw(ACTOR_PLAYER, 60);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 30); SetActorYaw(ACTOR_PLAYER, 30);
sleep 1; sleep 1;
SetActorYaw(ActorID_PLAYER, 0); SetActorYaw(ACTOR_PLAYER, 0);
sleep 10; sleep 10;
}); });
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_SUPER_SODA; SI_VAR(10) = c ITEM_SUPER_SODA;
await N(UseItemWithEffect); await N(UseItemWithEffect);
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
if (SI_VAR(0) == ActorID_PLAYER) { if (SI_VAR(0) == ACTOR_PLAYER) {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A1418_7250F8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); N(func_802A1418_7250F8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
N(AddFP)(5); N(AddFP)(5);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
N(func_802A1378_725058)(ActorID_PLAYER); N(func_802A1378_725058)(ACTOR_PLAYER);
sleep 20; sleep 20;
} else { } else {
SI_VAR(11) = 0; SI_VAR(11) = 0;

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1B40); free_icon(D_802A1B40);
} }
@ -59,7 +59,7 @@ ApiStatus N(func_802A123C_72223C)(ScriptInstance* script, s32 isInitialCall) {
Actor* actor = get_actor(actorId); Actor* actor = get_actor(actorId);
s32 id = actor->actorID & 0x700; s32 id = actor->actorID & 0x700;
if (actor->debuff != Debuff_END) { if (actor->debuff != STATUS_END) {
actor->debuffDuration = 0; actor->debuffDuration = 0;
actor->debuff = 0; actor->debuff = 0;
func_80047898(actor->unk_436); func_80047898(actor->unk_436);
@ -84,12 +84,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -108,9 +108,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -134,8 +134,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -150,34 +150,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,38 +1,38 @@
#include "tasty_tonic.h" #include "tasty_tonic.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_TASTY_TONIC; SI_VAR(10) = c ITEM_TASTY_TONIC;
await N(UseItemWithEffect); await N(UseItemWithEffect);
InitTargetIterator(); InitTargetIterator();
GetOwnerTarget(SI_VAR(0), SI_VAR(1)); GetOwnerTarget(SI_VAR(0), SI_VAR(1));
if (SI_VAR(0) == 0) { if (SI_VAR(0) == 0) {
await N(DrinkItem); await N(DrinkItem);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
N(func_802A123C_72223C)(ActorID_PLAYER); N(func_802A123C_72223C)(ACTOR_PLAYER);
sleep 20; sleep 20;
} else { } else {
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
sleep 30; sleep 30;
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5);
N(func_802A123C_72223C)(ActorID_PARTNER); N(func_802A123C_72223C)(ACTOR_PARTNER);
sleep 20; sleep 20;
} }
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1C40); free_icon(D_802A1C40);
} }
@ -105,12 +105,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -129,9 +129,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -155,8 +155,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -171,34 +171,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "thunder_bolt.h" #include "thunder_bolt.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_THUNDER_BOLT; SI_VAR(10) = c ITEM_THUNDER_BOLT;
await N(UseItemWithEffect); await N(UseItemWithEffect);
spawn { spawn {
sleep 5; sleep 5;
@ -9,10 +9,10 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
} }
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
PlaySound(SoundId_365); PlaySound(SOUND_UNKNOWN_365);
sleep 10; sleep 10;
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
@ -21,13 +21,13 @@ Script N(main) = SCRIPT({
sleep 5; sleep 5;
StartRumble(10); StartRumble(10);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
GetItemPower(ItemId_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32);
1: 1:
sleep 5; sleep 5;
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 30; sleep 30;
N(func_802A1420_722F60)(); N(func_802A1420_722F60)();
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1C90); free_icon(D_802A1C90);
} }
@ -105,12 +105,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -129,9 +129,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -155,8 +155,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -171,34 +171,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,7 +1,7 @@
#include "thunder_rage.h" #include "thunder_rage.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_THUNDER_RAGE; SI_VAR(10) = c ITEM_THUNDER_RAGE;
await N(UseItemWithEffect); await N(UseItemWithEffect);
parallel { parallel {
sleep 5; sleep 5;
@ -9,11 +9,11 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(20); MoveBattleCamOver(20);
} }
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
PlaySound(SoundId_365); PlaySound(SOUND_UNKNOWN_365);
sleep 10; sleep 10;
InitTargetIterator(); InitTargetIterator();
0: 0:
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0);
if (SI_VAR(0) == 6) { if (SI_VAR(0) == 6) {
goto 1; goto 1;
@ -22,8 +22,8 @@ Script N(main) = SCRIPT({
sleep 5; sleep 5;
StartRumble(10); StartRumble(10);
ShakeCam(1, 0, 5, 1.0); ShakeCam(1, 0, 5, 1.0);
SetGoalToTarget(ActorID_SELF); SetGoalToTarget(ACTOR_SELF);
GetItemPower(ItemId_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1));
ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32);
1: 1:
sleep 5; sleep 5;
@ -33,7 +33,7 @@ Script N(main) = SCRIPT({
} }
UseCamPreset(3); UseCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 30; sleep 30;
N(func_802A12D4_71B474)(); N(func_802A12D4_71B474)();
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1AC0); free_icon(D_802A1AC0);
} }
@ -80,12 +80,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -104,9 +104,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -130,8 +130,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -146,34 +146,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,27 +1,27 @@
#include "ultra_shroom.h" #include "ultra_shroom.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_SUPER_SHROOM; SI_VAR(10) = c ITEM_SUPER_SHROOM;
await N(UseItemWithEffect); await N(UseItemWithEffect);
AddBattleCamZoom(50); AddBattleCamZoom(50);
MoveBattleCamOver(20); MoveBattleCamOver(20);
await N(EatItem); await N(EatItem);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A123C_7239BC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); N(func_802A123C_7239BC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
N(func_802A12FC_723A7C)(); N(func_802A12FC_723A7C)();
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1AA0); free_icon(D_802A1AA0);
} }
@ -80,12 +80,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -104,9 +104,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -130,8 +130,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -146,34 +146,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,25 +1,25 @@
#include "unknown_item.h" #include "unknown_item.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_ULTRA_SHROOM; SI_VAR(10) = c ITEM_ULTRA_SHROOM;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 35; SI_VAR(1) += 35;
N(func_802A123C_72447C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); N(func_802A123C_72447C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20);
N(func_802A12FC_72453C)(); N(func_802A12FC_72453C)();
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP);
sleep 30; sleep 30;
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posX = player->currentPos.x; posX = player->currentPos.x;
posZ = player->currentPos.z; posZ = player->currentPos.z;
make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0);
add_coins(1); add_coins(1);
facingAngleSign += 30.0f; facingAngleSign += 30.0f;
} }
@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A19B0); free_icon(D_802A19B0);
} }
@ -58,7 +58,7 @@ ApiStatus N(func_802A123C_71AA2C)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
inflict_status(player, Debuff_STATIC, script->varTable[0]); inflict_status(player, STATUS_STATIC, script->varTable[0]);
player->status = 0; player->status = 0;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -68,12 +68,12 @@ Script N(UseItemWithEffect) = SCRIPT({
UseCamPreset(69); UseCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$x += 18; $x += 18;
SetActorSpeed(ActorID_PLAYER, 4.0); SetActorSpeed(ACTOR_PLAYER, 4.0);
SetGoalPos(ActorID_PLAYER, $x, $y, $z); SetGoalPos(ACTOR_PLAYER, $x, $y, $z);
PlayerRunToGoal(0); PlayerRunToGoal(0);
$y += 45; $y += 45;
@ -92,9 +92,9 @@ Script N(UseItemWithEffect) = SCRIPT({
N(GiveRefundCleanup)(); N(GiveRefundCleanup)();
RemoveItemEntity(SI_VAR(10)); RemoveItemEntity(SI_VAR(10));
} else { } else {
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
sleep 4; sleep 4;
$y += 45; $y += 45;
@ -118,8 +118,8 @@ Script N(UseItem) = SCRIPT({
MoveBattleCamOver(30); MoveBattleCamOver(30);
sleep 10; sleep 10;
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM);
GetActorPos(ActorID_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
$y += 45; $y += 45;
MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0);
SI_VAR(14) = $x; SI_VAR(14) = $x;
@ -134,34 +134,34 @@ Script N(UseItem) = SCRIPT({
}); });
Script N(PlayerGoHome) = SCRIPT({ Script N(PlayerGoHome) = SCRIPT({
UseIdleAnimation(ActorID_PLAYER, 0); UseIdleAnimation(ACTOR_PLAYER, 0);
SetGoalToHome(ActorID_PLAYER); SetGoalToHome(ACTOR_PLAYER);
SetActorSpeed(ActorID_PLAYER, 8.0); SetActorSpeed(ACTOR_PLAYER, 8.0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
PlayerRunToGoal(0); PlayerRunToGoal(0);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
UseIdleAnimation(ActorID_PLAYER, 1); UseIdleAnimation(ACTOR_PLAYER, 1);
}); });
Script N(EatItem) = SCRIPT({ Script N(EatItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT);
sleep 45; sleep 45;
}); });
Script N(DrinkItem) = SCRIPT({ Script N(DrinkItem) = SCRIPT({
spawn { spawn {
loop 4 { loop 4 {
PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095);
sleep 10; sleep 10;
} }
} }
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK);
sleep 45; sleep 45;
}); });

View File

@ -1,19 +1,19 @@
#include "volt_shroom.h" #include "volt_shroom.h"
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = c ItemId_VOLT_SHROOM; SI_VAR(10) = c ITEM_VOLT_SHROOM;
await N(UseItemWithEffect); await N(UseItemWithEffect);
await N(EatItem); await N(EatItem);
SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
MultiplyByActorScale(SI_VAR(3)); MultiplyByActorScale(SI_VAR(3));
SI_VAR(1) += SI_VAR(3); SI_VAR(1) += SI_VAR(3);
SI_VAR(3) = 1.0; SI_VAR(3) = 1.0;
MultiplyByActorScale(SI_VAR(3)); MultiplyByActorScale(SI_VAR(3));
PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3), 30, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3), 30, 0, 0, 0, 0, 0, 0, 0);
PlaySound(SoundId_379); PlaySound(SOUND_UNKNOWN_379);
GetItemPower(ItemId_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1));
N(func_802A123C_71AA2C)(); N(func_802A123C_71AA2C)();
sleep 20; sleep 20;
ShowMessageBox(16, 60); ShowMessageBox(16, 60);

View File

@ -15,7 +15,7 @@ ApiStatus func_802A10E4_743ED4(ScriptInstance* script, s32 isInitialCall) {
script->varTable[0] = 99; script->varTable[0] = 99;
powerBounceChance = targetActor->staticActorData->powerBounceChance; powerBounceChance = targetActor->staticActorData->powerBounceChance;
if (is_ability_active(Ability_DODGE_MASTER)) { if (is_ability_active(ABILITY_DODGE_MASTER)) {
powerBounceChance += 7; powerBounceChance += 7;
} }

View File

@ -47,12 +47,12 @@ ApiStatus func_802380E4_710FD4(ScriptInstance* script, s32 isInitialCall) {
ApiStatus N(IsPartnerImmobile)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(IsPartnerImmobile)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* playerActor = battleStatus->playerActor; Actor* playerActor = battleStatus->playerActor;
s32 isImmobile = playerActor->debuff == Debuff_FEAR s32 isImmobile = playerActor->debuff == STATUS_FEAR
|| playerActor->debuff == Debuff_DIZZY || playerActor->debuff == STATUS_DIZZY
|| playerActor->debuff == Debuff_PARALYZE || playerActor->debuff == STATUS_PARALYZE
|| playerActor->debuff == Debuff_SLEEP || playerActor->debuff == STATUS_SLEEP
|| playerActor->debuff == Debuff_FROZEN || playerActor->debuff == STATUS_FROZEN
|| playerActor->debuff == Debuff_STOP; || playerActor->debuff == STATUS_STOP;
if (playerActor->stoneStatus == 12) { if (playerActor->stoneStatus == 12) {
isImmobile = TRUE; isImmobile = TRUE;

View File

@ -52,7 +52,7 @@ ApiStatus N(AverageTargetDizzyChance)(ScriptInstance* script, s32 isInitialCall)
for (i = 0; i < partnerActor->targetListLength; i++) { for (i = 0; i < partnerActor->targetListLength; i++) {
targetActor = get_actor(partnerActor->targetData[i].actorID); targetActor = get_actor(partnerActor->targetData[i].actorID);
targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID);
targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, Debuff_DIZZY); targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_DIZZY);
if (targetActor->transStatus == 14) { if (targetActor->transStatus == 14) {
targetActorDescBaseStatusChance = 0; targetActorDescBaseStatusChance = 0;

View File

@ -51,7 +51,7 @@ ApiStatus N(AverageTargetParalyzeChance)(ScriptInstance* script, s32 isInitialCa
for (i = 0; i < partnerActor->targetListLength; i++) { for (i = 0; i < partnerActor->targetListLength; i++) {
targetActor = get_actor(partnerActor->targetData[i].actorID); targetActor = get_actor(partnerActor->targetData[i].actorID);
targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID);
targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, Debuff_PARALYZE); targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_PARALYZE);
if (targetActor->transStatus == 14) { if (targetActor->transStatus == 14) {
targetActorDescBaseStatusChance = 0; targetActorDescBaseStatusChance = 0;

View File

@ -27,8 +27,8 @@ ApiStatus func_802A1518_78A378(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
deepFocusSP = is_ability_active(Ability_DEEP_FOCUS) * 64; deepFocusSP = is_ability_active(ABILITY_DEEP_FOCUS) * 64;
superFocusSP = is_ability_active(Ability_SUPER_FOCUS) * 128; superFocusSP = is_ability_active(ABILITY_SUPER_FOCUS) * 128;
add_SP(deepFocusSP + superFocusSP + 128); add_SP(deepFocusSP + superFocusSP + 128);

View File

@ -18,10 +18,10 @@ ApiStatus func_802A1518_79DDB8(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
PlayerData* playerData2 = &gPlayerData; PlayerData* playerData2 = &gPlayerData;
if (is_ability_active(Ability_DEEP_FOCUS)) { if (is_ability_active(ABILITY_DEEP_FOCUS)) {
playerData->specialBarsFilled += 128; playerData->specialBarsFilled += 128;
} }
if (is_ability_active(Ability_SUPER_FOCUS)) { if (is_ability_active(ABILITY_SUPER_FOCUS)) {
playerData->specialBarsFilled += 256; playerData->specialBarsFilled += 256;
} }

View File

@ -19,7 +19,7 @@ INCLUDE_ASM(s32, "battle/star/refresh_78B600", func_802A1518_78BB18);
ApiStatus func_802A17D4_78BDD4(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802A17D4_78BDD4(ScriptInstance* script, s32 isInitialCall) {
Actor* actor = gBattleStatus.playerActor; Actor* actor = gBattleStatus.playerActor;
if (actor->debuff != Debuff_END) { if (actor->debuff != STATUS_END) {
actor->debuffDuration = 0; actor->debuffDuration = 0;
actor->debuff = 0; actor->debuff = 0;
func_80047898(actor->unk_436); func_80047898(actor->unk_436);

View File

@ -7,7 +7,7 @@ void func_802E1400(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
if (entity->unk_06 & 1) { if (entity->unk_06 & 1) {
if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
exec_entity_updatecmd(entity); exec_entity_updatecmd(entity);
temp->unk_22 = 8; temp->unk_22 = 8;
} }
@ -67,8 +67,8 @@ void func_802E1614(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (entity->unk_06 & 1) { if (entity->unk_06 & 1) {
if ((playerStatus->actionState == ActionState_GROUND_POUND) if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|| (playerStatus->actionState == ActionState_ULTRA_POUND)) { || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
exec_entity_updatecmd(entity); exec_entity_updatecmd(entity);
} }
} }
@ -82,7 +82,7 @@ void func_802E1660(Entity* entity) {
func_802E153C(entity); func_802E153C(entity);
if (entity->unk_06 & 0x40) { if (entity->unk_06 & 0x40) {
if (playerStatus->actionState == ActionState_HAMMER) { if (playerStatus->actionState == ACTION_STATE_HAMMER) {
if (gPlayerData.hammerLevel < 0) { if (gPlayerData.hammerLevel < 0) {
return; return;
} }
@ -97,7 +97,7 @@ void func_802E1660(Entity* entity) {
} }
} }
if (playerStatus->actionState == ActionState_SPIN_JUMP) { if (playerStatus->actionState == ACTION_STATE_SPIN_JUMP) {
return; return;
} }

View File

@ -53,8 +53,8 @@ s32 func_802E8858(Entity* entity) {
s32 phi_a0 = FALSE; s32 phi_a0 = FALSE;
if (entity->unk_06 & 1) { if (entity->unk_06 & 1) {
if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
set_action_state(ActionState_FALLING); set_action_state(ACTION_STATE_FALLING);
phi_a0 = TRUE; phi_a0 = TRUE;
} }
} }

View File

@ -84,9 +84,9 @@ void npc_move_heading(Npc* npc, f32 speed, f32 yaw) {
npc->pos.z += -speed * cos; npc->pos.z += -speed * cos;
} }
INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_unsafe, NpcId npcId); INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_unsafe, NpcID npcId);
INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_safe, NpcId npcId); INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_safe, NpcID npcId);
void enable_npc_shadow(Npc* npc) { void enable_npc_shadow(Npc* npc) {
Shadow* shadow; Shadow* shadow;
@ -326,6 +326,6 @@ INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_aux);
INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_interact); INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_interact);
INCLUDE_ASM(Enemy*, "code_13870_len_6980", get_enemy, NpcId npcId); INCLUDE_ASM(Enemy*, "code_13870_len_6980", get_enemy, NpcID npcId);
INCLUDE_ASM(s32, "code_13870_len_6980", get_enemy_safe); INCLUDE_ASM(s32, "code_13870_len_6980", get_enemy_safe);

View File

@ -16,22 +16,22 @@ void* D_802809FC[] = {
s32 D_80280A30 = 0xFF; s32 D_80280A30 = 0xFF;
Script BtlPutPartnerAway = SCRIPT({ Script BtlPutPartnerAway = SCRIPT({
DispatchEvent(ActorID_PARTNER, 62); DispatchEvent(ACTOR_PARTNER, 62);
parallel { parallel {
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
loop 10 { loop 10 {
SetActorScale(ActorID_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0);
SI_VAR(0) -= 0.1005859375; SI_VAR(0) -= 0.1005859375;
sleep 1; sleep 1;
} }
} }
EnablePartnerBlur(); EnablePartnerBlur();
PlaySoundAtActor(ActorID_PLAYER, SoundId_E); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_E);
GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 25; SI_VAR(1) += 25;
SetActorJumpGravity(ActorID_PARTNER, 1.0); SetActorJumpGravity(ACTOR_PARTNER, 1.0);
SetGoalPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
JumpToGoal(ActorID_PARTNER, 10, 0, 0, 1); JumpToGoal(ACTOR_PARTNER, 10, 0, 0, 1);
DisablePartnerBlur(); DisablePartnerBlur();
}); });
@ -39,22 +39,22 @@ Script BtlBringPartnerOut = SCRIPT({
parallel { parallel {
SI_VAR(0) = 0.1005859375; SI_VAR(0) = 0.1005859375;
loop 20 { loop 20 {
SetActorScale(ActorID_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0);
SI_VAR(0) += 0.05078125; SI_VAR(0) += 0.05078125;
sleep 1; sleep 1;
} }
SetActorScale(ActorID_PARTNER, 1.0, 1.0, 1.0); SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0);
} }
PlaySoundAtActor(ActorID_PLAYER, SoundId_D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_D);
GetGoalPos(256, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(256, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetActorJumpGravity(ActorID_PARTNER, 1.0); SetActorJumpGravity(ACTOR_PARTNER, 1.0);
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
JumpToGoal(ActorID_PARTNER, 20, 0, 0, 1); JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1);
} else { } else {
JumpToGoal(ActorID_PARTNER, 20, 0, 0, 1); JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1);
} }
GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
ForceHomePos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); ForceHomePos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
}); });
s8 D_80280CE0[] = { 0, 0, 0, 0 }; s8 D_80280CE0[] = { 0, 0, 0, 0 };
@ -120,16 +120,16 @@ Script D_80280E54 = SCRIPT({
}); });
Script D_80280EB8 = SCRIPT({ Script D_80280EB8 = SCRIPT({
SetCamPerspective(Cam_BATTLE, 6, 25, 16, 1024); SetCamPerspective(CAM_BATTLE, 6, 25, 16, 1024);
SetCamViewport(Cam_BATTLE, 12, 20, 296, 200); SetCamViewport(CAM_BATTLE, 12, 20, 296, 200);
SetCamBGColor(Cam_BATTLE, 0, 0, 0); SetCamBGColor(CAM_BATTLE, 0, 0, 0);
SetCamEnabled(Cam_BATTLE, TRUE); SetCamEnabled(CAM_BATTLE, TRUE);
sleep 1; sleep 1;
func_802D3398(); func_802D3398();
func_802CCCB0(); func_802CCCB0();
func_802CABE8(Cam_BATTLE, 0, 240, 100, 8); func_802CABE8(CAM_BATTLE, 0, 240, 100, 8);
func_802CAE50(Cam_BATTLE, -75, 35, 0); func_802CAE50(CAM_BATTLE, -75, 35, 0);
BattleCamTargetActor(ActorID_PLAYER); BattleCamTargetActor(ACTOR_PLAYER);
func_8024CE9C(); func_8024CE9C();
}); });

View File

@ -20,21 +20,21 @@ HitResult calc_item_check_hit(void) {
if (!(actorPart->eventFlags & 0x20)) { if (!(actorPart->eventFlags & 0x20)) {
if (actor->transStatus == 0xE) { if (actor->transStatus == 0xE) {
return HitResult_MISS; return HIT_RESULT_MISS;
} }
if (actor->stoneStatus == 0xC) { if (actor->stoneStatus == 0xC) {
sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
return HitResult_IMMUNE; return HIT_RESULT_IMMUNE;
} }
if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) { if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) {
sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
return HitResult_LANDED_ON_SPIKE; return HIT_RESULT_LANDED_ON_SPIKE;
} }
} else { } else {
return HitResult_MISS; return HIT_RESULT_MISS;
} }
} }
return HitResult_HIT; return HIT_RESULT_HIT;
} }
INCLUDE_ASM(s32, "code_17FEB0", calc_item_damage_enemy); INCLUDE_ASM(s32, "code_17FEB0", calc_item_damage_enemy);

View File

@ -32,7 +32,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
gSpeakingActorIdleAnim = get_variable(script, *args++); gSpeakingActorIdleAnim = get_variable(script, *args++);
stringID2 = stringID; stringID2 = stringID;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -49,7 +49,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
headY = actor->currentPos.y + tmp + (actor->size.y / 2); headY = actor->currentPos.y + tmp + (actor->size.y / 2);
} }
headZ = actor->currentPos.z + actor->headOffset.z; headZ = actor->currentPos.z + actor->headOffset.z;
get_screen_coords(Cam_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ);
{ {
s32* isPrintDone = &gSpeakingActorPrintIsDone; s32* isPrintDone = &gSpeakingActorPrintIsDone;
@ -78,7 +78,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2); headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2);
} }
headZ = actor->currentPos.z + actor->headOffset.z; headZ = actor->currentPos.z + actor->headOffset.z;
get_screen_coords(Cam_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ);
printContext = &gSpeakingActorPrintCtx; printContext = &gSpeakingActorPrintCtx;
clamp_printer_coords(*printContext, screenX, screenY); clamp_printer_coords(*printContext, screenX, screenY);
@ -215,7 +215,7 @@ ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall) {
Bytecode soundID = *args++; Bytecode soundID = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -232,7 +232,7 @@ ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall) {
Bytecode soundID = *args++; Bytecode soundID = *args++;
ActorPart* part; ActorPart* part;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -249,7 +249,7 @@ ApiStatus PlayLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) {
Bytecode soundID = *args++; Bytecode soundID = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -266,7 +266,7 @@ ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) {
s32 idx = get_variable(script, *args++); s32 idx = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -324,7 +324,7 @@ s32 is_actor_hp_bar_visible(Actor* actor) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 flags; s32 flags;
if (is_ability_active(Ability_PEEKABOO)) { if (is_ability_active(ABILITY_PEEKABOO)) {
return TRUE; return TRUE;
} }
@ -339,7 +339,7 @@ s32 is_actortype_hpbar_visible(s32 actorType) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 idx; s32 idx;
if (is_ability_active(Ability_PEEKABOO)) { if (is_ability_active(ABILITY_PEEKABOO)) {
return TRUE; return TRUE;
} }
@ -392,7 +392,7 @@ ApiStatus ApplyShrinkFromOwner(ScriptInstance* script, s32 isInitialCall) {
Actor* actor = get_actor(script->owner1.actorID); Actor* actor = get_actor(script->owner1.actorID);
s32 amt = get_variable(script, *args); s32 amt = get_variable(script, *args);
if (actor->debuff == Debuff_SHRINK && amt > 0) { if (actor->debuff == STATUS_SHRINK && amt > 0) {
amt /= 2; amt /= 2;
} }

View File

@ -5,12 +5,12 @@ INCLUDE_ASM(s32, "code_18F340", func_80260A60);
ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) { ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* playerActor = battleStatus->playerActor; Actor* playerActor = battleStatus->playerActor;
s32 isImmobile = playerActor->debuff == Debuff_FEAR s32 isImmobile = playerActor->debuff == STATUS_FEAR
|| playerActor->debuff == Debuff_DIZZY || playerActor->debuff == STATUS_DIZZY
|| playerActor->debuff == Debuff_PARALYZE || playerActor->debuff == STATUS_PARALYZE
|| playerActor->debuff == Debuff_SLEEP || playerActor->debuff == STATUS_SLEEP
|| playerActor->debuff == Debuff_FROZEN || playerActor->debuff == STATUS_FROZEN
|| playerActor->debuff == Debuff_STOP; || playerActor->debuff == STATUS_STOP;
if (playerActor->stoneStatus == 12) { if (playerActor->stoneStatus == 12) {
isImmobile = TRUE; isImmobile = TRUE;
@ -83,7 +83,7 @@ ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) {
} }
ApiStatus func_802613A8(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802613A8(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.selectedItemID = ItemId_LIFE_SHROOM; gBattleStatus.selectedItemID = ITEM_LIFE_SHROOM;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -869,108 +869,108 @@ ActorOffsets bActorOffsets[ACTOR_TYPE_COUNT] = {
}; };
s32 bMarioIdleAnims[] = { s32 bMarioIdleAnims[] = {
Debuff_NORMAL, PlayerAnim_WALKING, STATUS_NORMAL, ANIM_WALKING,
Debuff_DANGER, PlayerAnim_PANTING, STATUS_DANGER, ANIM_PANTING,
Debuff_STONE, 0x00050001, STATUS_STONE, 0x00050001,
Debuff_SLEEP, 0x00030004, STATUS_SLEEP, 0x00030004,
Debuff_DIZZY, 0x00030006, STATUS_DIZZY, 0x00030006,
Debuff_STOP, PlayerAnim_STAND_STILL, STATUS_STOP, ANIM_STAND_STILL,
Debuff_HUSTLE, PlayerAnim_RUNNING, STATUS_HUSTLE, ANIM_RUNNING,
Debuff_BERSERK, 0x00040028, STATUS_BERSERK, 0x00040028,
Debuff_PARALYZE, 0x00030004, STATUS_PARALYZE, 0x00030004,
Debuff_FROZEN, 0x0001000E, STATUS_FROZEN, 0x0001000E,
0xE, 0x00010002, 0xE, 0x00010002,
Debuff_TURN_DONE, PlayerAnim_STAND_STILL, STATUS_TURN_DONE, ANIM_STAND_STILL,
0x13, 0x00040029, 0x13, 0x00040029,
0x14, 0x0004002A, 0x14, 0x0004002A,
0x15, 0x00030003, 0x15, 0x00030003,
0x18, 0x00030005, 0x18, 0x00030005,
0x16, 0x0010001, 0x16, 0x0010001,
Debuff_THINKING, PlayerAnim_THINKING, STATUS_THINKING, ANIM_THINKING,
Debuff_WEARY, 0x0001000D, STATUS_WEARY, 0x0001000D,
Debuff_END, STATUS_END,
}; };
s32 bMarioDefendAnims[] = { s32 bMarioDefendAnims[] = {
Debuff_NORMAL, PlayerAnim_CROUCH, STATUS_NORMAL, ANIM_CROUCH,
Debuff_DANGER, PlayerAnim_PANTING, STATUS_DANGER, ANIM_PANTING,
Debuff_STONE, 0x00050001, STATUS_STONE, 0x00050001,
Debuff_SLEEP, 0x00030004, STATUS_SLEEP, 0x00030004,
Debuff_DIZZY, 0x00030006, STATUS_DIZZY, 0x00030006,
Debuff_STOP, PlayerAnim_STAND_STILL, STATUS_STOP, ANIM_STAND_STILL,
Debuff_HUSTLE, PlayerAnim_CROUCH, STATUS_HUSTLE, ANIM_CROUCH,
Debuff_BERSERK, PlayerAnim_CROUCH, STATUS_BERSERK, ANIM_CROUCH,
Debuff_PARALYZE, 0x00030004, STATUS_PARALYZE, 0x00030004,
Debuff_FROZEN, 0x0001000E, STATUS_FROZEN, 0x0001000E,
0xE, 0x00010002, 0xE, 0x00010002,
Debuff_TURN_DONE, PlayerAnim_STAND_STILL, STATUS_TURN_DONE, ANIM_STAND_STILL,
0x13, 0x00040029, 0x13, 0x00040029,
0x14, 0x0004002A, 0x14, 0x0004002A,
0x15, 0x00030003, 0x15, 0x00030003,
0x18, 0x00030005, 0x18, 0x00030005,
0x16, 0x0010001, 0x16, 0x0010001,
Debuff_THINKING, PlayerAnim_THINKING, STATUS_THINKING, ANIM_THINKING,
Debuff_WEARY, 0x0001000D, STATUS_WEARY, 0x0001000D,
Debuff_END, STATUS_END,
}; };
s32 bMarioHideAnims[] = { s32 bMarioHideAnims[] = {
Debuff_NORMAL, PlayerAnim_CROUCH, STATUS_NORMAL, ANIM_CROUCH,
Debuff_DANGER, PlayerAnim_PANTING, STATUS_DANGER, ANIM_PANTING,
Debuff_STONE, 0x00050001, STATUS_STONE, 0x00050001,
Debuff_SLEEP, 0x00030004, STATUS_SLEEP, 0x00030004,
Debuff_DIZZY, 0x00030006, STATUS_DIZZY, 0x00030006,
Debuff_STOP, PlayerAnim_STAND_STILL, STATUS_STOP, ANIM_STAND_STILL,
Debuff_HUSTLE, 0x0008000E, STATUS_HUSTLE, 0x0008000E,
Debuff_BERSERK, 0x0008000E, STATUS_BERSERK, 0x0008000E,
Debuff_PARALYZE, 0x00030004, STATUS_PARALYZE, 0x00030004,
Debuff_FROZEN, 0x0001000E, STATUS_FROZEN, 0x0001000E,
0xE, 0x00010002, 0xE, 0x00010002,
Debuff_TURN_DONE, PlayerAnim_CROUCH, STATUS_TURN_DONE, ANIM_CROUCH,
0x13, 0x00040029, 0x13, 0x00040029,
0x14, 0x0004002A, 0x14, 0x0004002A,
0x15, 0x00030003, 0x15, 0x00030003,
0x18, 0x00030005, 0x18, 0x00030005,
0x16, 0x0010001, 0x16, 0x0010001,
Debuff_THINKING, PlayerAnim_THINKING, STATUS_THINKING, ANIM_THINKING,
Debuff_WEARY, 0x0001000D, STATUS_WEARY, 0x0001000D,
Debuff_END, STATUS_END,
}; };
s32 bPeachIdleAnims[] = { s32 bPeachIdleAnims[] = {
Debuff_NORMAL, 0x000A0002, STATUS_NORMAL, 0x000A0002,
Debuff_TURN_DONE, 0x000C0028, STATUS_TURN_DONE, 0x000C0028,
Debuff_END, STATUS_END,
}; };
s32 bMarioDefenseTable[] = { s32 bMarioDefenseTable[] = {
Element_NORMAL, 0, ELEMENT_NORMAL, 0,
Element_END, ELEMENT_END,
}; };
s32 bPlayerStatusTable[] = { s32 bPlayerStatusTable[] = {
Debuff_NORMAL, 100, STATUS_NORMAL, 100,
Debuff_DEFAULT, 100, STATUS_DEFAULT, 100,
Debuff_SLEEP, 100, STATUS_SLEEP, 100,
Debuff_POISON, 100, STATUS_POISON, 100,
Debuff_FROZEN, 100, STATUS_FROZEN, 100,
Debuff_DIZZY, 100, STATUS_DIZZY, 100,
Debuff_FEAR, 100, STATUS_FEAR, 100,
Debuff_STATIC, 100, STATUS_STATIC, 100,
Debuff_PARALYZE, 100, STATUS_PARALYZE, 100,
Debuff_SHRINK, 100, STATUS_SHRINK, 100,
Debuff_STOP, 100, STATUS_STOP, 100,
Debuff_DEFAULT_TURN_MOD, 0, STATUS_DEFAULT_TURN_MOD, 0,
Debuff_SLEEP_TURN_MOD, 0, STATUS_SLEEP_TURN_MOD, 0,
Debuff_POISON_TURN_MOD, 0, STATUS_POISON_TURN_MOD, 0,
Debuff_FROZEN_TURN_MOD, 0, STATUS_FROZEN_TURN_MOD, 0,
Debuff_DIZZY_TURN_MOD, 0, STATUS_DIZZY_TURN_MOD, 0,
Debuff_FEAR_TURN_MOD, 0, STATUS_FEAR_TURN_MOD, 0,
Debuff_STATIC_TURN_MOD, 0, STATUS_STATIC_TURN_MOD, 0,
Debuff_PARALYZE_TURN_MOD, 0, STATUS_PARALYZE_TURN_MOD, 0,
Debuff_SHRINK_TURN_MOD, 0, STATUS_SHRINK_TURN_MOD, 0,
Debuff_STOP_TURN_MOD, 0, STATUS_STOP_TURN_MOD, 0,
Debuff_END, STATUS_END,
}; };
ActorDesc bPlayerActorDesc = { ActorDesc bPlayerActorDesc = {
@ -1149,8 +1149,8 @@ s32 lookup_defense(DefenseTableEntry* defenseTable, Element elementKey) {
DefenseTableEntry* row; DefenseTableEntry* row;
s32 normalDefense = 0; s32 normalDefense = 0;
for (row = defenseTable; row->element != Element_END; row++, defenseTable++) { for (row = defenseTable; row->element != ELEMENT_END; row++, defenseTable++) {
if (row->element == Element_NORMAL) { if (row->element == ELEMENT_NORMAL) {
normalDefense = defenseTable->defense; normalDefense = defenseTable->defense;
} }
@ -1171,9 +1171,9 @@ INCLUDE_ASM(s32, "code_190B20", lookup_status_duration_mod); // exactly (?) the
INCLUDE_ASM(s32, "code_190B20", inflict_status); INCLUDE_ASM(s32, "code_190B20", inflict_status);
s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) { s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == Debuff_DAZE) { if (statusTypeKey == STATUS_DAZE) {
if (statusTypeKey != target->koStatus) { if (statusTypeKey != target->koStatus) {
inflict_status(target, Debuff_DAZE, duration); inflict_status(target, STATUS_DAZE, duration);
sfx_play_sound(0x2107); sfx_play_sound(0x2107);
} else { } else {
target->koDuration += duration; target->koDuration += duration;
@ -1192,68 +1192,68 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
if (defenseTable != NULL) { if (defenseTable != NULL) {
if (elementFlags & 2) { if (elementFlags & 2) {
defense = lookup_defense(defenseTable, Element_FIRE); defense = lookup_defense(defenseTable, ELEMENT_FIRE);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 4) { if (elementFlags & 4) {
defense = lookup_defense(defenseTable, Element_WATER); defense = lookup_defense(defenseTable, ELEMENT_WATER);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 8) { if (elementFlags & 8) {
defense = lookup_defense(defenseTable, Element_ICE); defense = lookup_defense(defenseTable, ELEMENT_ICE);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
// Element_MYSTERY missing? // ELEMENT_MYSTERY missing?
if (elementFlags & 0x10) { if (elementFlags & 0x10) {
defense = lookup_defense(defenseTable, Element_MAGIC); defense = lookup_defense(defenseTable, ELEMENT_MAGIC);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x40) { if (elementFlags & 0x40) {
defense = lookup_defense(defenseTable, Element_HAMMER); defense = lookup_defense(defenseTable, ELEMENT_HAMMER);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x80) { if (elementFlags & 0x80) {
defense = lookup_defense(defenseTable, Element_JUMP); defense = lookup_defense(defenseTable, ELEMENT_JUMP);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x100) { if (elementFlags & 0x100) {
defense = lookup_defense(defenseTable, Element_COSMIC); defense = lookup_defense(defenseTable, ELEMENT_COSMIC);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x200) { if (elementFlags & 0x200) {
defense = lookup_defense(defenseTable, Element_BLAST); defense = lookup_defense(defenseTable, ELEMENT_BLAST);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x20) { if (elementFlags & 0x20) {
defense = lookup_defense(defenseTable, Element_SHOCK); defense = lookup_defense(defenseTable, ELEMENT_SHOCK);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x800) { if (elementFlags & 0x800) {
defense = lookup_defense(defenseTable, Element_QUAKE); defense = lookup_defense(defenseTable, ELEMENT_QUAKE);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
} }
if (elementFlags & 0x40000) { if (elementFlags & 0x40000) {
defense = lookup_defense(defenseTable, Element_THROW); defense = lookup_defense(defenseTable, ELEMENT_THROW);
if (defense < minDefense) { if (defense < minDefense) {
minDefense = defense; minDefense = defense;
} }
@ -1262,7 +1262,7 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
// If no element flags were set, fall back to normal defense. // If no element flags were set, fall back to normal defense.
if (minDefense == 0xFF) { if (minDefense == 0xFF) {
defense = lookup_defense(defenseTable, Element_NORMAL); defense = lookup_defense(defenseTable, ELEMENT_NORMAL);
if (defense < 0xFF) { if (defense < 0xFF) {
minDefense = defense; minDefense = defense;
} }
@ -1328,7 +1328,7 @@ INCLUDE_ASM(s32, "code_190B20", func_8026709C);
INCLUDE_ASM(s32, "code_190B20", func_802670C8); INCLUDE_ASM(s32, "code_190B20", func_802670C8);
void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType) { void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType) {
if ((part->idleAnimations) && !(part->flags & 2)) { if ((part->idleAnimations) && !(part->flags & 2)) {
DecorationTable* decorationTable = part->decorationTable; DecorationTable* decorationTable = part->decorationTable;
@ -1340,7 +1340,7 @@ void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId deco
} }
} }
void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationId decorationType) { void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType) {
ActorPart* part; ActorPart* part;
for (part = actor->partsTable; part != NULL; part = part->nextPart) { for (part = actor->partsTable; part != NULL; part = part->nextPart) {
if ((part->flags & 0x100001) == 0 && part->idleAnimations && (part->flags & 2) == 0) { if ((part->flags & 0x100001) == 0 && part->idleAnimations && (part->flags & 2) == 0) {

View File

@ -127,7 +127,7 @@ ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -143,7 +143,7 @@ ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -163,7 +163,7 @@ ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) {
s32 a1 = *args++; s32 a1 = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -179,7 +179,7 @@ ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall) {
s32 a1 = *args++; s32 a1 = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -196,7 +196,7 @@ ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall) {
s32 outVar = *args++; s32 outVar = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -213,7 +213,7 @@ ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall) {
f32 x, y, z; f32 x, y, z;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -238,7 +238,7 @@ ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall) {
f32 x, y, z; f32 x, y, z;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -259,7 +259,7 @@ ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -275,7 +275,7 @@ ApiStatus SetPartGoalToTarget(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -291,7 +291,7 @@ ApiStatus SetGoalToFirstTarget(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
SelectableTarget* target; SelectableTarget* target;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -309,7 +309,7 @@ ApiStatus SetGoalPos(ScriptInstance* script, s32 isInitialCall) {
ActorMovement* walk; ActorMovement* walk;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -349,7 +349,7 @@ ApiStatus SetIdleGoal(ScriptInstance* script, s32 isInitialCall) {
ActorMovement* fly; ActorMovement* fly;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -387,7 +387,7 @@ ApiStatus AddGoalPos(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -410,7 +410,7 @@ ApiStatus GetGoalPos(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -439,7 +439,7 @@ ApiStatus GetIdleGoal(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -469,7 +469,7 @@ ApiStatus GetPartTarget(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -498,7 +498,7 @@ ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -527,7 +527,7 @@ ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -563,7 +563,7 @@ ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -592,7 +592,7 @@ ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -619,7 +619,7 @@ ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -643,7 +643,7 @@ ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall) {
f32 x, y, z; f32 x, y, z;
ActorPart* actorPart; ActorPart* actorPart;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -687,7 +687,7 @@ ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall) {
f32 x, y; f32 x, y;
ActorPart* actorPart; ActorPart* actorPart;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -716,7 +716,7 @@ ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -732,7 +732,7 @@ ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 a1; s32 a1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
var1 = get_variable(script, *args++); var1 = get_variable(script, *args++);
@ -751,7 +751,7 @@ ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -764,7 +764,7 @@ ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -777,7 +777,7 @@ ApiStatus GetActorYaw(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 a1; s32 a1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -791,7 +791,7 @@ ApiStatus SetPartYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -805,7 +805,7 @@ ApiStatus GetPartYaw(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 a1; s32 a1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -821,7 +821,7 @@ ApiStatus SetActorJumpGravity(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
f32 jumpAccel; f32 jumpAccel;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -835,7 +835,7 @@ ApiStatus SetActorIdleJumpGravity(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
f32 flyJumpAccel; f32 flyJumpAccel;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -849,7 +849,7 @@ ApiStatus SetActorSpeed(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
f32 moveSpeed; f32 moveSpeed;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -864,7 +864,7 @@ ApiStatus SetActorIdleSpeed(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
f32 flySpeed; f32 flySpeed;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -879,7 +879,7 @@ ApiStatus SetPartJumpGravity(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
f32 jumpScale; f32 jumpScale;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -896,7 +896,7 @@ ApiStatus SetPartMoveSpeed(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
f32 moveSpeed; f32 moveSpeed;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -916,7 +916,7 @@ ApiStatus SetJumpAnimations(ScriptInstance* script, s32 isInitialCall) {
s32 animJumpFall; s32 animJumpFall;
s32 animJumpLand; s32 animJumpLand;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -940,7 +940,7 @@ ApiStatus AddActorPos(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -962,7 +962,7 @@ ApiStatus SetActorDispOffset(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -986,7 +986,7 @@ ApiStatus GetPartDispOffset(ScriptInstance* script, s32 isInitialCall) {
s32 outX, outY, outZ; s32 outX, outY, outZ;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1021,7 +1021,7 @@ ApiStatus SetPartDispOffset(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1052,7 +1052,7 @@ ApiStatus AddPartDispOffset(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1096,7 +1096,7 @@ ApiStatus GetActorVar(ScriptInstance* script, s32 isInitialCall) {
s32 var1; s32 var1;
s32 a2; s32 a2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1114,7 +1114,7 @@ ApiStatus SetActorVar(ScriptInstance* script, s32 isInitialCall) {
s32 index; s32 index;
s32 val; s32 val;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1133,7 +1133,7 @@ ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall) {
s32 index; s32 index;
s32 val; s32 val;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1155,7 +1155,7 @@ ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall) {
s32 tableIndex; s32 tableIndex;
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1175,7 +1175,7 @@ ApiStatus SetPartMovementVar(ScriptInstance* script, s32 isInitialCall) {
s32 tableIndex; s32 tableIndex;
s32 val; s32 val;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1195,7 +1195,7 @@ ApiStatus AddPartMovementVar(ScriptInstance* script, s32 isInitialCall) {
s32 tableIndex; s32 tableIndex;
s32 val; s32 val;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1214,7 +1214,7 @@ ApiStatus SetActorRotation(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1245,7 +1245,7 @@ ApiStatus SetActorRotationOffset(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1268,7 +1268,7 @@ ApiStatus GetActorRotation(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1292,7 +1292,7 @@ ApiStatus SetPartRotation(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1316,7 +1316,7 @@ ApiStatus SetPartRotationOffset(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1340,7 +1340,7 @@ ApiStatus GetPartRotation(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1363,7 +1363,7 @@ ApiStatus SetActorScale(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1386,7 +1386,7 @@ ApiStatus SetActorScaleModifier(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1409,7 +1409,7 @@ ApiStatus GetActorScale(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1433,7 +1433,7 @@ ApiStatus SetPartScale(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
f32 x, y, z; f32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1457,7 +1457,7 @@ ApiStatus GetPartScale(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 x, y, z; s32 x, y, z;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1517,7 +1517,7 @@ ApiStatus SetActorFlags(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 a1; s32 a1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1534,7 +1534,7 @@ ApiStatus SetActorFlagBits(ScriptInstance* script, s32 isInitialCall) {
s32 var1; s32 var1;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1556,7 +1556,7 @@ ApiStatus GetActorFlags(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 a1; s32 a1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1573,7 +1573,7 @@ ApiStatus SetPartFlags(ScriptInstance* script, s32 isInitialCall) {
s32 a1; s32 a1;
s32 partIndex; s32 partIndex;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1593,7 +1593,7 @@ ApiStatus SetPartFlagBits(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1620,7 +1620,7 @@ ApiStatus SetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1640,7 +1640,7 @@ ApiStatus SetPartTargetFlagBits(ScriptInstance* script, s32 isInitialCall) {
s32 bits; s32 bits;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1666,7 +1666,7 @@ ApiStatus GetPartFlags(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 a2; s32 a2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1685,7 +1685,7 @@ ApiStatus GetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 a2; s32 a2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1705,7 +1705,7 @@ ApiStatus SetPartEventFlags(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1725,7 +1725,7 @@ ApiStatus SetPartEventBits(ScriptInstance* script, s32 isInitialCall) {
s32 bits; s32 bits;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1751,7 +1751,7 @@ ApiStatus GetPartEventFlags(ScriptInstance* script, s32 isInitialCall) {
ActorPart* actorPart; ActorPart* actorPart;
s32 a2; s32 a2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1771,7 +1771,7 @@ ApiStatus func_8026D51C(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1791,7 +1791,7 @@ ApiStatus func_8026D5A4(ScriptInstance* script, s32 isInitialCall) {
s32 bits; s32 bits;
s32 cond; s32 cond;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1815,7 +1815,7 @@ ApiStatus HPBarToHome(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1838,7 +1838,7 @@ ApiStatus HPBarToCurrent(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1860,7 +1860,7 @@ ApiStatus func_8026D8EC(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1875,7 +1875,7 @@ ApiStatus func_8026D940(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
s32 x, y; s32 x, y;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1903,7 +1903,7 @@ ApiStatus func_8026DA94(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
s32 a, b, c, d; s32 a, b, c, d;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1939,12 +1939,12 @@ ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
isExist = get_actor(actorID) != NULL; isExist = get_actor(actorID) != NULL;
if ((actorID == ActorID_PARTNER) && (partner == NULL)) { if ((actorID == ACTOR_PARTNER) && (partner == NULL)) {
isExist = FALSE; isExist = FALSE;
} }
@ -1958,7 +1958,7 @@ ApiStatus func_8026DEF0(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++);
s32 a2 = *args++; s32 a2 = *args++;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -1973,7 +1973,7 @@ ApiStatus func_8026DF88(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++);
s32 a2 = *args++; s32 a2 = *args++;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -2161,7 +2161,7 @@ INCLUDE_ASM(s32, "code_197F40", GetBattleVar);
ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) { ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -2180,7 +2180,7 @@ INCLUDE_ASM(s32, "code_197F40", SetActorType);
ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) { ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }

View File

@ -39,7 +39,7 @@ INCLUDE_ASM(s32, "code_19FAF0", dispatch_damage_event_player);
void dispatch_damage_event_player_0(s32 damageAmount, Event event) { void dispatch_damage_event_player_0(s32 damageAmount, Event event) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
battleStatus->currentAttackElement = Element_END; battleStatus->currentAttackElement = ELEMENT_END;
battleStatus->unk_19A = 0; battleStatus->unk_19A = 0;
dispatch_damage_event_player(damageAmount, event, FALSE); dispatch_damage_event_player(damageAmount, event, FALSE);
} }

View File

@ -21,13 +21,13 @@ s32 func_80276F50(Actor* actor) {
void dispatch_event_general(Actor* actor, Event event) { void dispatch_event_general(Actor* actor, Event event) {
switch (actor->actorID & 0x700) { switch (actor->actorID & 0x700) {
case ActorID_PLAYER: case ACTOR_PLAYER:
dispatch_event_player(event); dispatch_event_player(event);
break; break;
case ActorID_PARTNER: case ACTOR_PARTNER:
dispatch_event_partner(event); dispatch_event_partner(event);
break; break;
case ActorID_ENEMY0: case ACTOR_ENEMY0:
dispatch_event_actor(actor, event); dispatch_event_actor(actor, event);
break; break;
} }
@ -79,7 +79,7 @@ ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 var1; s32 var1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -92,7 +92,7 @@ ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -105,7 +105,7 @@ ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -121,7 +121,7 @@ ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) {
Actor* actor; Actor* actor;
ScriptInstance* newScriptContext; ScriptInstance* newScriptContext;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -147,7 +147,7 @@ ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall) {
s32 var1; s32 var1;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -177,7 +177,7 @@ ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 var1; s32 var1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -191,7 +191,7 @@ ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 var1; s32 var1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -237,7 +237,7 @@ ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -252,7 +252,7 @@ ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall) {
s32 targetActorID; s32 targetActorID;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -269,7 +269,7 @@ ApiStatus SetEnemyHP(ScriptInstance* script, s32 isInitialCall) {
s8 newHP; s8 newHP;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -294,7 +294,7 @@ ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) {
s32 outVar; s32 outVar;
s32 outVal; s32 outVal;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
outVar = *args++; outVar = *args++;
@ -302,10 +302,10 @@ ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) {
actor = get_actor(actorID); actor = get_actor(actorID);
switch (actorID & 0x700) { switch (actorID & 0x700) {
case ActorID_PLAYER: case ACTOR_PLAYER:
outVal = playerData->curHP; outVal = playerData->curHP;
break; break;
case ActorID_PARTNER: case ACTOR_PARTNER:
outVal = 99; outVal = 99;
break; break;
default: default:
@ -322,7 +322,7 @@ ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -341,7 +341,7 @@ ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 var2; s32 var2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -356,7 +356,7 @@ ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 var1; s32 var1;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -371,7 +371,7 @@ ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
s32 var2; s32 var2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -386,7 +386,7 @@ ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 partIndex; s32 partIndex;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -411,7 +411,7 @@ ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall)
s32 hitResults; s32 hitResults;
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -450,7 +450,7 @@ ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) {
s32 damageAmount; s32 damageAmount;
s32 scriptExists; s32 scriptExists;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -469,7 +469,7 @@ ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -480,7 +480,7 @@ ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -491,7 +491,7 @@ ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -507,7 +507,7 @@ ApiStatus SetTargetOffset(ScriptInstance* script, s32 isInitialCall) {
s32 x; s32 x;
s32 y; s32 y;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -529,7 +529,7 @@ ApiStatus func_8027D434(ScriptInstance* script, s32 isInitialCall) {
s32 partIndex; s32 partIndex;
ActorPart* part; ActorPart* part;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -547,7 +547,7 @@ ApiStatus func_8027D4C8(ScriptInstance* script, s32 isInitialCall) {
s32 temp; s32 temp;
s32 temp2; s32 temp2;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -569,7 +569,7 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) {
s32 enable = get_variable(script, *args++); s32 enable = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -588,7 +588,7 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos); ActorID actorID = get_variable(script, *script->ptrReadPos);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -607,7 +607,7 @@ ApiStatus AfflictActor(ScriptInstance* script, s32 isInitialCall) {
statusTypeKey = get_variable(script, *args++); statusTypeKey = get_variable(script, *args++);
duration = get_variable(script, *args++); duration = get_variable(script, *args++);
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
@ -640,7 +640,7 @@ ApiStatus func_8027D75C(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -665,7 +665,7 @@ ApiStatus SetActorSize(ScriptInstance* script, s32 isInitialCall) {
s32 x = get_variable(script, *args++); s32 x = get_variable(script, *args++);
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -689,7 +689,7 @@ ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) {
s32 outX = *args++; s32 outX = *args++;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -706,7 +706,7 @@ ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -719,7 +719,7 @@ ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -732,7 +732,7 @@ ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
outVar = *args++; outVar = *args++;
@ -747,7 +747,7 @@ ApiStatus EnableActorGlow(ScriptInstance* script, s32 isInitialCall) {
s32 flag; s32 flag;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
@ -795,13 +795,13 @@ ApiStatus CopyStatusEffects(ScriptInstance* script, s32 isInitialCall) {
Actor* actorFrom; Actor* actorFrom;
actorIDFrom = get_variable(script, *args++); actorIDFrom = get_variable(script, *args++);
if (actorIDFrom == ActorID_SELF) { if (actorIDFrom == ACTOR_SELF) {
actorIDFrom = script->owner1.actorID; actorIDFrom = script->owner1.actorID;
} }
actorFrom = get_actor(actorIDFrom); actorFrom = get_actor(actorIDFrom);
actorIDTo = get_variable(script, *args++); actorIDTo = get_variable(script, *args++);
if (actorIDTo == ActorID_SELF) { if (actorIDTo == ACTOR_SELF) {
actorIDTo = script->owner1.actorID; actorIDTo = script->owner1.actorID;
} }
actorTo = get_actor(actorIDTo); actorTo = get_actor(actorIDTo);
@ -824,15 +824,15 @@ ApiStatus ClearStatusEffects(ScriptInstance* script, s32 isInitialCall) {
s32 flag; s32 flag;
Actor* actor; Actor* actor;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID; actorID = script->owner1.actorID;
} }
actor = get_actor(actorID); actor = get_actor(actorID);
if (actor->debuff != Debuff_END) { if (actor->debuff != STATUS_END) {
actor->debuffDuration = 0; actor->debuffDuration = 0;
actor->debuff = Debuff_END; actor->debuff = STATUS_END;
func_80047898(actor->unk_436); func_80047898(actor->unk_436);
} }

View File

@ -12,7 +12,7 @@ void dispatch_event_partner(s8 lastEventType) {
script = start_script(partnerActor->onHitCode, 10, 0x20); script = start_script(partnerActor->onHitCode, 10, 0x20);
partnerActor->onHitScript = script; partnerActor->onHitScript = script;
partnerActor->onHitID = script->id; partnerActor->onHitID = script->id;
script->owner1.actorID = ActorID_PARTNER; script->owner1.actorID = ACTOR_PARTNER;
if (partnerActor->takeTurnScript != NULL) { if (partnerActor->takeTurnScript != NULL) {
kill_script_by_ID(partnerActor->takeTurnID); kill_script_by_ID(partnerActor->takeTurnID);
@ -35,7 +35,7 @@ void dispatch_event_partner_continue_turn(s8 lastEventType) {
script = start_script(partnerActor->onHitCode, 10, 0x20); script = start_script(partnerActor->onHitCode, 10, 0x20);
partnerActor->onHitScript = script; partnerActor->onHitScript = script;
partnerActor->onHitID = script->id; partnerActor->onHitID = script->id;
script->owner1.actorID = ActorID_PARTNER; script->owner1.actorID = ACTOR_PARTNER;
if (onHitScript != NULL) { if (onHitScript != NULL) {
kill_script_by_ID(onHitID); kill_script_by_ID(onHitID);
@ -96,7 +96,7 @@ ApiStatus func_8027FC90(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
s32 outVar; s32 outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.enemyID; actorID = script->owner1.enemyID;
} }
@ -117,7 +117,7 @@ ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *args++); ActorID actorID = get_variable(script, *args++);
Bytecode* outVar; Bytecode* outVar;
if (actorID == ActorID_SELF) { if (actorID == ACTOR_SELF) {
actorID = script->owner1.enemyID; actorID = script->owner1.enemyID;
} }

View File

@ -165,7 +165,7 @@ ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) {
} }
if (script->functionTemp[1].s == 15) { if (script->functionTemp[1].s == 15) {
sfx_play_sound(SoundId_DEATH); sfx_play_sound(SOUND_DEATH);
func_80070190(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10); func_80070190(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10);
} }
@ -202,7 +202,7 @@ ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall) {
if (rand_int(100) < 50) { if (rand_int(100) < 50) {
if (playerData->coins != 0) { if (playerData->coins != 0) {
playerData->coins--; playerData->coins--;
make_item_entity_delayed(ItemId_COIN, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, make_item_entity_delayed(ITEM_COIN, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight,
playerStatus->position.z, 3, 0, 0); playerStatus->position.z, 3, 0, 0);
} }
} }
@ -280,8 +280,8 @@ void update_encounters_conversation(void) {
enable_player_input(); enable_player_input();
func_800EF600(); func_800EF600();
if (playerStatus->actionState == ActionState_CONVERSATION) { if (playerStatus->actionState == ACTION_STATE_CONVERSATION) {
set_action_state(ActionState_IDLE); set_action_state(ACTION_STATE_IDLE);
} }
func_800EF3D4(0); func_800EF3D4(0);

View File

@ -128,10 +128,10 @@ INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 i
ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
Bytecode* aiBytecode = (Bytecode*)get_variable(script, *args); Bytecode* aiBytecode = (Bytecode*)get_variable(script, *args);
if (npcID == NpcId_SELF) { if (npcID == NPC_SELF) {
npcID = owner->npcID; npcID = owner->npcID;
} }
@ -144,11 +144,11 @@ ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) {
ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) { ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
ScriptInstance* newScript; ScriptInstance* newScript;
s32 groupFlags; s32 groupFlags;
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -178,10 +178,10 @@ ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) {
ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
s32 var2 = get_variable(script, *args); s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -203,10 +203,10 @@ INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 i
ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode* auxBytecode = (Bytecode*)get_variable(script, *args); Bytecode* auxBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -219,11 +219,11 @@ ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) {
ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
ScriptInstance* newScript; ScriptInstance* newScript;
s32 groupFlags; s32 groupFlags;
if (npcID == NpcId_SELF) { if (npcID == NPC_SELF) {
npcID = npc->npcID; npcID = npc->npcID;
} }
@ -252,10 +252,10 @@ ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) {
ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
s32 var2 = get_variable(script, *args); s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -275,10 +275,10 @@ ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) {
ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode* interactBytecode = (Bytecode*)get_variable(script, *args); Bytecode* interactBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -295,10 +295,10 @@ ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) {
ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode* hitBytecode = (Bytecode*)get_variable(script, *args); Bytecode* hitBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -348,11 +348,11 @@ ApiStatus GetSelfVar(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
s32 varIdx = get_variable(script, *args++); s32 varIdx = get_variable(script, *args++);
s32 val = get_variable(script, *args); s32 val = get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -365,11 +365,11 @@ ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
s32 varIdx = get_variable(script, *args++); s32 varIdx = get_variable(script, *args++);
s32 var3 = *args; s32 var3 = *args;
if (npcID == NpcId_SELF) { if (npcID == NPC_SELF) {
npcID = npc->npcID; npcID = npc->npcID;
} }
@ -445,11 +445,11 @@ ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
s32 bits = *args++; s32 bits = *args++;
s32 var2 = get_variable(script, *args); s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) { if (npcId == NPC_SELF) {
npcId = npc->npcID; npcId = npc->npcID;
} }
@ -554,7 +554,7 @@ ApiStatus func_80045900(ScriptInstance* script) {
ApiStatus SetTattleString(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetTattleString(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId enemyId = get_variable(script, *args++); NpcID enemyId = get_variable(script, *args++);
u32 tattleString = get_variable(script, *args); u32 tattleString = get_variable(script, *args);
Enemy* npc = get_enemy(enemyId); Enemy* npc = get_enemy(enemyId);

View File

@ -37,7 +37,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {
amt = 0; amt = 0;
} }
if (is_ability_active(Ability_PAY_OFF)) { if (is_ability_active(ABILITY_PAY_OFF)) {
amt += currentEncounter->damageTaken / 2; amt += currentEncounter->damageTaken / 2;
} }
@ -45,7 +45,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {
amt *= 3; amt *= 3;
} }
if (is_ability_active(Ability_MONEY_MONEY)) { if (is_ability_active(ABILITY_MONEY_MONEY)) {
amt *= 2; amt *= 2;
} }

View File

@ -441,7 +441,7 @@ s32 func_802A58D0(void) {
s8 partnerDebuff; s8 partnerDebuff;
s32 ret; s32 ret;
if (battleStatus->flags2 & 4 || partner == PartnerID_NONE || partner->flags & 0x200000) { if (battleStatus->flags2 & 4 || partner == PARTNER_NONE || partner->flags & 0x200000) {
return FALSE; return FALSE;
} }

View File

@ -53,7 +53,7 @@ void update_player(void) {
Npc* partner; Npc* partner;
playerStatus->animFlags |= 0x20000004; playerStatus->animFlags |= 0x20000004;
partner = get_npc_unsafe(NpcId_PARTNER); partner = get_npc_unsafe(NPC_PARTNER);
partner->pos.x = playerStatus->lastGoodPosition.x; partner->pos.x = playerStatus->lastGoodPosition.x;
partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight; partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight;
partner->pos.z = playerStatus->lastGoodPosition.z; partner->pos.z = playerStatus->lastGoodPosition.z;
@ -78,7 +78,7 @@ void update_player(void) {
if (func_800E0208() == 0) { if (func_800E0208() == 0) {
collision_main_lateral(); collision_main_lateral();
} }
} else if (playerStatus->actionState != ActionState_HIT_LAVA) { } else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
func_800DFAAC(); func_800DFAAC();
} else { } else {
func_800DFBE8(); func_800DFBE8();
@ -145,7 +145,7 @@ void func_800DFAAC(void) {
check_input_midair_jump(); check_input_midair_jump();
if (playerStatus->actionState != ActionState_SLIDING) { if (playerStatus->actionState != ACTION_STATE_SLIDING) {
collision_main_lateral(); collision_main_lateral();
func_800E4508(); func_800E4508();
@ -153,8 +153,8 @@ void func_800DFAAC(void) {
func_800E4F10(); func_800E4F10();
} }
if ((playerStatus->actionState != ActionState_ENEMY_FIRST_STRIKE) if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE)
&& (playerStatus->actionState != ActionState_STEP_UP)) { && (playerStatus->actionState != ACTION_STATE_STEP_UP)) {
func_800E4744(); func_800E4744();
} }
} }
@ -311,7 +311,7 @@ s32 func_800E0208(void) {
if (gGameStatusPtr->disableScripts && (gGameStatusPtr->currentButtons & 0x10)) { if (gGameStatusPtr->disableScripts && (gGameStatusPtr->currentButtons & 0x10)) {
if (D_8010EBB0.unk_00 == 0) { if (D_8010EBB0.unk_00 == 0) {
set_action_state(ActionState_IDLE); set_action_state(ACTION_STATE_IDLE);
} }
ret = 1; ret = 1;
} }

View File

@ -19,16 +19,16 @@ s32 func_800E26C4(void) {
s32 actionState = playerStatus->actionState; s32 actionState = playerStatus->actionState;
Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0; Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0;
if (actionState == ActionState_IDLE || if (actionState == ACTION_STATE_IDLE ||
actionState == ActionState_WALK || actionState == ACTION_STATE_WALK ||
actionState == ActionState_RUN || actionState == ACTION_STATE_RUN ||
actionState == ActionState_USE_TWEESTER || actionState == ACTION_STATE_USE_TWEESTER ||
actionState == ActionState_SPIN) { actionState == ACTION_STATE_SPIN) {
return 1; return 1;
} }
if (actionState == ActionState_RIDE) { if (actionState == ACTION_STATE_RIDE) {
if (playerData->currentPartner == PartnerID_LAKILESTER || playerData->currentPartner == PartnerID_BOW) { if (playerData->currentPartner == PARTNER_LAKILESTER || playerData->currentPartner == PARTNER_BOW) {
if (temp_8010EBB0->unk_00 != 0) { if (temp_8010EBB0->unk_00 != 0) {
return 1; return 1;
} else { } else {
@ -59,7 +59,7 @@ void move_player(s32 duration, f32 heading, f32 speed) {
playerStatus->currentSpeed = speed; playerStatus->currentSpeed = speed;
if (!(playerStatus->animFlags & 0x400000)) { if (!(playerStatus->animFlags & 0x400000)) {
set_action_state(speed > playerStatus->walkSpeed ? ActionState_RUN : ActionState_WALK); set_action_state(speed > playerStatus->walkSpeed ? ACTION_STATE_RUN : ACTION_STATE_WALK);
} }
} }
@ -97,7 +97,7 @@ void gravity_use_fall_params(void) {
void func_800E3100(void) { void func_800E3100(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (playerStatus->actionState != ActionState_7 && playerStatus->actionState != ActionState_BOUNCE) { if (playerStatus->actionState != ACTION_STATE_7 && playerStatus->actionState != ACTION_STATE_BOUNCE) {
f32* temp; f32* temp;
playerStatus->position.y = func_800E3514(func_800E34D8(), &temp); playerStatus->position.y = func_800E3514(func_800E34D8(), &temp);
@ -245,8 +245,8 @@ void func_800E4F10(void) {
playerStatus->position.x = x; playerStatus->position.x = x;
playerStatus->position.z = z; playerStatus->position.z = z;
if (tempB != 0 && temp < 0 && playerStatus->actionState != ActionState_18 && playerStatus->currentSpeed != 0.0f) { if (tempB != 0 && temp < 0 && playerStatus->actionState != ACTION_STATE_18 && playerStatus->currentSpeed != 0.0f) {
set_action_state(ActionState_18); set_action_state(ACTION_STATE_18);
} }
} }
@ -260,11 +260,11 @@ void check_input_midair_jump(void) {
case 0: case 0:
break; break;
case 1: case 1:
set_action_state(ActionState_SPIN_JUMP); set_action_state(ACTION_STATE_SPIN_JUMP);
gPlayerStatus.flags |= 8; gPlayerStatus.flags |= 8;
break; break;
case 2: case 2:
set_action_state(ActionState_ULTRA_JUMP); set_action_state(ACTION_STATE_ULTRA_JUMP);
gPlayerStatus.flags |= 8; gPlayerStatus.flags |= 8;
break; break;
} }
@ -286,8 +286,8 @@ void func_800E5098(s32 arg0) {
soundID = 0x143; soundID = 0x143;
soundID2 = 0x144; soundID2 = 0x144;
} else { } else {
soundID = SoundId_STEP1; soundID = SOUND_STEP1;
soundID2 = SoundId_STEP2; soundID2 = SOUND_STEP2;
} }
temp_800F7B80 = &D_800F7B80; temp_800F7B80 = &D_800F7B80;
@ -358,7 +358,7 @@ void set_action_state(s32 actionState) {
} }
if (playerStatus->animFlags & 0x4000) { if (playerStatus->animFlags & 0x4000) {
if (actionState < ActionState_CONVERSATION) { if (actionState < ACTION_STATE_CONVERSATION) {
if (actionState >= 0) { if (actionState >= 0) {
playerStatus->prevActionState = playerStatus->actionState; playerStatus->prevActionState = playerStatus->actionState;
playerStatus->actionState = actionState; playerStatus->actionState = actionState;
@ -368,17 +368,17 @@ void set_action_state(s32 actionState) {
return; return;
} }
if (actionState == ActionState_HIT_HAZARD || actionState == ActionState_HIT_LAVA) { if (actionState == ACTION_STATE_HIT_HAZARD || actionState == ACTION_STATE_HIT_LAVA) {
PartnerID partner; PartnerID partner;
if (playerStatus->unk_BF == 3) { if (playerStatus->unk_BF == 3) {
actionState = ActionState_HIT_HAZARD; actionState = ACTION_STATE_HIT_HAZARD;
} }
// Whilst Sushie, Lakilester, Parakarry's ability is active, hazards have no effect. // Whilst Sushie, Lakilester, Parakarry's ability is active, hazards have no effect.
partner = playerData->currentPartner; partner = playerData->currentPartner;
if (partner == PartnerID_SUSHIE || partner == PartnerID_LAKILESTER || partner == PartnerID_PARAKARRY) { if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
if (D_8010EBB0.unk_00 != 0) { if (D_8010EBB0.unk_00 != 0) {
playerStatus->animFlags |= 0x4; playerStatus->animFlags |= 0x4;
playerStatus->flags |= 0x800; playerStatus->flags |= 0x800;
@ -387,24 +387,24 @@ void set_action_state(s32 actionState) {
} }
} }
if (actionState == ActionState_SLIDING) { if (actionState == ACTION_STATE_SLIDING) {
playerStatus->flags |= 0x10; playerStatus->flags |= 0x10;
playerStatus->moveFrames = 0; playerStatus->moveFrames = 0;
playerStatus->flags &= ~0x4000; playerStatus->flags &= ~0x4000;
} }
playerStatus->prevActionState = playerStatus->actionState; playerStatus->prevActionState = playerStatus->actionState;
if (actionState == ActionState_USE_TWEESTER) { if (actionState == ACTION_STATE_USE_TWEESTER) {
playerStatus->prevActionState = ActionState_IDLE; playerStatus->prevActionState = ACTION_STATE_IDLE;
} }
if (actionState == ActionState_ENEMY_FIRST_STRIKE) { if (actionState == ACTION_STATE_ENEMY_FIRST_STRIKE) {
playerStatus->animFlags |= 4; playerStatus->animFlags |= 4;
} }
playerStatus->actionState = actionState; playerStatus->actionState = actionState;
playerStatus->flags |= 0x80000000; playerStatus->flags |= 0x80000000;
if (playerStatus->actionState == ActionState_SPIN) { if (playerStatus->actionState == ACTION_STATE_SPIN) {
return; return;
} }
@ -425,14 +425,14 @@ void update_locomotion_state(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
do { } while (0); // required to match do { } while (0); // required to match
set_action_state((!is_ability_active(Ability_SLOW_GO) set_action_state((!is_ability_active(ABILITY_SLOW_GO)
&& (SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) >= 0xBD2)) ? ActionState_RUN : ActionState_WALK); && (SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) >= 0xBD2)) ? ACTION_STATE_RUN : ACTION_STATE_WALK);
} }
void start_falling(void) { void start_falling(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
set_action_state(ActionState_FALLING); set_action_state(ACTION_STATE_FALLING);
playerStatus->gravityIntegrator[0] = 0.1143f; playerStatus->gravityIntegrator[0] = 0.1143f;
playerStatus->gravityIntegrator[1] = -0.2871f; playerStatus->gravityIntegrator[1] = -0.2871f;
playerStatus->gravityIntegrator[2] = -0.1823f; playerStatus->gravityIntegrator[2] = -0.1823f;
@ -442,7 +442,7 @@ void start_falling(void) {
void start_bounce_a(void) { void start_bounce_a(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
set_action_state(ActionState_BOUNCE); set_action_state(ACTION_STATE_BOUNCE);
playerStatus->gravityIntegrator[0] = 10.0f; playerStatus->gravityIntegrator[0] = 10.0f;
playerStatus->gravityIntegrator[1] = -2.0f; playerStatus->gravityIntegrator[1] = -2.0f;
playerStatus->gravityIntegrator[2] = 0.8f; playerStatus->gravityIntegrator[2] = 0.8f;
@ -452,7 +452,7 @@ void start_bounce_a(void) {
void start_bounce_b(void) { void start_bounce_b(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
set_action_state(ActionState_BOUNCE); set_action_state(ACTION_STATE_BOUNCE);
playerStatus->gravityIntegrator[0] = 8.0f; playerStatus->gravityIntegrator[0] = 8.0f;
playerStatus->gravityIntegrator[1] = -1.0f; playerStatus->gravityIntegrator[1] = -1.0f;
playerStatus->gravityIntegrator[2] = 0; playerStatus->gravityIntegrator[2] = 0;
@ -464,11 +464,11 @@ s32 check_input_hammer(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
if (playerStatus->pressedButtons & Button_B) { if (playerStatus->pressedButtons & BUTTON_B) {
if (!(playerStatus->flags & 4)) { if (!(playerStatus->flags & 4)) {
if (D_8010EBB0.unk_00 != 1 || playerData->currentPartner != PartnerID_WATT) { if (D_8010EBB0.unk_00 != 1 || playerData->currentPartner != PARTNER_WATT) {
if (playerData->hammerLevel != -1) { if (playerData->hammerLevel != -1) {
set_action_state(ActionState_HAMMER); set_action_state(ACTION_STATE_HAMMER);
return TRUE; return TRUE;
} }
} }
@ -488,7 +488,7 @@ void check_input_spin(void) {
if (!(playerStatus->flags & 0x5000) && if (!(playerStatus->flags & 0x5000) &&
!(playerStatus->animFlags & 1) && !(playerStatus->animFlags & 1) &&
!(playerStatus->currentButtons & D_CBUTTONS) && !(playerStatus->currentButtons & D_CBUTTONS) &&
!is_ability_active(Ability_SLOW_GO)) { !is_ability_active(ABILITY_SLOW_GO)) {
s32 actionState = playerStatus->actionState; s32 actionState = playerStatus->actionState;
s32 btnPressed = playerStatus->pressedButtons & Z_TRIG; s32 btnPressed = playerStatus->pressedButtons & Z_TRIG;
@ -498,12 +498,12 @@ void check_input_spin(void) {
if (actionState < 3) { if (actionState < 3) {
if (actionState >= 0 && !(playerStatus->animFlags & 0x10000)) { if (actionState >= 0 && !(playerStatus->animFlags & 0x10000)) {
if (btnPressed || temp_8010F250->unk_01) { if (btnPressed || temp_8010F250->unk_01) {
set_action_state(ActionState_SPIN); set_action_state(ACTION_STATE_SPIN);
if (temp_8010F250->unk_01 != 0) { if (temp_8010F250->unk_01 != 0) {
if (temp_8010F250->unk_08 != 0 || temp_8010F250->unk_0C != 0) { if (temp_8010F250->unk_08 != 0 || temp_8010F250->unk_0C != 0) {
playerStatus->prevActionState = temp2->unk_07; playerStatus->prevActionState = temp2->unk_07;
} else { } else {
playerStatus->prevActionState = ActionState_IDLE; playerStatus->prevActionState = ACTION_STATE_IDLE;
} }
} }
} }
@ -532,7 +532,7 @@ void func_800E63A4(s32 arg0) {
gGameStatusPtr->peachFlags &= ~0x2; gGameStatusPtr->peachFlags &= ~0x2;
playerStatus->peachDisguise = 0; playerStatus->peachDisguise = 0;
free_npc_by_index(D_8010C96C); free_npc_by_index(D_8010C96C);
set_action_state(ActionState_IDLE); set_action_state(ACTION_STATE_IDLE);
playerStatus->colliderHeight = 55; playerStatus->colliderHeight = 55;
playerStatus->colliderDiameter = 38; playerStatus->colliderDiameter = 38;
} }
@ -544,7 +544,7 @@ void func_800E6428(void) {
s32 actionState = playerStatus->actionState; s32 actionState = playerStatus->actionState;
Npc* disguiseNpc; Npc* disguiseNpc;
if (actionState == ActionState_IDLE || actionState == ActionState_WALK || actionState == ActionState_RUN) { if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) {
s32* temp_8010C92C = &D_8010C92C; s32* temp_8010C92C = &D_8010C92C;
if (*temp_8010C92C != 0) { if (*temp_8010C92C != 0) {

View File

@ -4,7 +4,7 @@ void func_800E6860(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (D_8010EBB0.unk_00 != 0 && D_8010EBB0.unk_03 == 9) { if (D_8010EBB0.unk_00 != 0 && D_8010EBB0.unk_03 == 9) {
Npc* partner = get_npc_unsafe(NpcId_PARTNER); Npc* partner = get_npc_unsafe(NPC_PARTNER);
func_802DDEE4(0, -1, 7, 0, 0, 0, playerStatus->unk_0E, 0); func_802DDEE4(0, -1, 7, 0, 0, 0, playerStatus->unk_0E, 0);
func_8003D624(partner, 7, playerStatus->unk_0E, 0, 0, 0, 0); func_8003D624(partner, 7, playerStatus->unk_0E, 0, 0, 0, 0);
@ -22,7 +22,7 @@ s32 func_800E6904(void) {
if (!(playerStatus->animFlags & 0x100000)) { if (!(playerStatus->animFlags & 0x100000)) {
if (temp_8010EBB0->unk_00 == 0) { if (temp_8010EBB0->unk_00 == 0) {
if (!(playerStatus->flags & 0x1000)) { if (!(playerStatus->flags & 0x1000)) {
if (actionState == ActionState_IDLE || actionState == ActionState_WALK || actionState == ActionState_RUN) { if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) {
return 1; return 1;
} }
} }
@ -30,11 +30,11 @@ s32 func_800E6904(void) {
if (temp_8010EBB0->unk_03 == 6) { if (temp_8010EBB0->unk_03 == 6) {
return 1; return 1;
} else if (temp_8010EBB0->unk_03 == 9) { } else if (temp_8010EBB0->unk_03 == 9) {
if (actionState == ActionState_RIDE) { if (actionState == ACTION_STATE_RIDE) {
return 1; return 1;
} }
} else if (temp_8010EBB0->unk_03 == 8) { } else if (temp_8010EBB0->unk_03 == 8) {
if (actionState != ActionState_RIDE) { if (actionState != ACTION_STATE_RIDE) {
sfx_play_sound(0x21D); sfx_play_sound(0x21D);
} else { } else {
return 1; return 1;
@ -66,7 +66,7 @@ void check_input_status_menu(void) {
s32 pressedButtons; s32 pressedButtons;
if (get_variable(NULL, SI_SAVE_VAR(0)) < STORY_EPILOGUE) { if (get_variable(NULL, SI_SAVE_VAR(0)) < STORY_EPILOGUE) {
if (playerStatus->actionState != ActionState_RIDE) { if (playerStatus->actionState != ACTION_STATE_RIDE) {
pressedButtons = playerStatus->pressedButtons; pressedButtons = playerStatus->pressedButtons;
} else { } else {
pressedButtons = gGameStatusPtr->pressedButtons; pressedButtons = gGameStatusPtr->pressedButtons;

View File

@ -4,7 +4,7 @@ s32 func_802B7000_2(void) {
Temp8010EBB0* something = &D_8010EBB0; Temp8010EBB0* something = &D_8010EBB0;
ActionState* actionState = gPlayerActionState; ActionState* actionState = gPlayerActionState;
if (actionState != ActionState_USE_TWEESTER) { if (actionState != ACTION_STATE_USE_TWEESTER) {
if (something->unk_00 != 1 || (something->unk_03 != 9 && something->unk_03 != 4)) { if (something->unk_00 != 1 || (something->unk_03 != 9 && something->unk_03 != 4)) {
return 0; return 0;
} }

View File

@ -52,7 +52,7 @@ ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) {
func_800EF628(); func_800EF628();
close_status_menu(); close_status_menu();
func_800E984C(); func_800E984C();
if (playerStatus->actionState == ActionState_SPIN) { if (playerStatus->actionState == ACTION_STATE_SPIN) {
playerStatus->animFlags |= 0x40000; playerStatus->animFlags |= 0x40000;
} }
OVERRIDE_FLAG_SET(0x40); OVERRIDE_FLAG_SET(0x40);

View File

@ -17,8 +17,8 @@ MusicPlayer D_8014F6F0 = {
.unk_2C = 0 .unk_2C = 0
}; };
SongID gSongsUsingVariationFlag[] = { Song_SPECIAL_BATTLE, Song_TUBBA_BLUBBA_BATTLE, Song_JR_TROOPA_BATTLE, SongID gSongsUsingVariationFlag[] = { SONG_SPECIAL_BATTLE, SONG_TUBBA_BLUBBA_BATTLE, SONG_JR_TROOPA_BATTLE,
Song_YOSHI_KIDS_FOUND, Song_ITEM_UPGRADE, Song_NEW_PARTNER, SONG_YOSHI_KIDS_FOUND, SONG_ITEM_UPGRADE, SONG_NEW_PARTNER,
}; };
s16 D_8014F738 = 0; s16 D_8014F738 = 0;

View File

@ -1,8 +1,8 @@
#include "common.h" #include "common.h"
#include "map.h" #include "map.h"
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr) { Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr) {
if (npcIdOrPtr == NpcId_SELF) { if (npcIdOrPtr == NPC_SELF) {
return get_npc_safe(script->owner2.npcID); return get_npc_safe(script->owner2.npcID);
} else if (npcIdOrPtr >= -270000000) { } else if (npcIdOrPtr >= -270000000) {
return get_npc_safe(npcIdOrPtr); return get_npc_safe(npcIdOrPtr);
@ -40,7 +40,7 @@ ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
Bytecode varNPC = *args++; Bytecode varNPC = *args++;
set_variable(script, varNPC, (s32)get_npc_safe(npcID)); set_variable(script, varNPC, (s32)get_npc_safe(npcID));
@ -49,7 +49,7 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
f32 x = get_variable(script, *args++); f32 x = get_variable(script, *args++);
f32 y = get_variable(script, *args++); f32 y = get_variable(script, *args++);
f32 z = get_variable(script, *args++); f32 z = get_variable(script, *args++);
@ -72,7 +72,7 @@ ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
f32 rotX = get_float_variable(script, *args++); f32 rotX = get_float_variable(script, *args++);
f32 rotY = get_float_variable(script, *args++); f32 rotY = get_float_variable(script, *args++);
f32 rotZ = get_float_variable(script, *args++); f32 rotZ = get_float_variable(script, *args++);
@ -90,7 +90,7 @@ ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
f32 var1 = get_float_variable(script, *args++); f32 var1 = get_float_variable(script, *args++);
Npc* npc; Npc* npc;
@ -105,7 +105,7 @@ ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
f32 sizeX = get_float_variable(script, *ptrReadPos++); f32 sizeX = get_float_variable(script, *ptrReadPos++);
f32 sizeY = get_float_variable(script, *ptrReadPos++); f32 sizeY = get_float_variable(script, *ptrReadPos++);
f32 sizeZ = get_float_variable(script, *ptrReadPos++); f32 sizeZ = get_float_variable(script, *ptrReadPos++);
@ -123,7 +123,7 @@ ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
s32 height = get_variable(script, *ptrReadPos++); s32 height = get_variable(script, *ptrReadPos++);
s32 radius = get_variable(script, *ptrReadPos++); s32 radius = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -139,7 +139,7 @@ ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
f32 speed = get_float_variable(script, *ptrReadPos); f32 speed = get_float_variable(script, *ptrReadPos);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -153,7 +153,7 @@ ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
f32 jumpScale = get_float_variable(script, *ptrReadPos); f32 jumpScale = get_float_variable(script, *ptrReadPos);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -167,7 +167,7 @@ ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
s32 animation = get_variable(script, *ptrReadPos); s32 animation = get_variable(script, *ptrReadPos);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -181,7 +181,7 @@ ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++; Bytecode outVar = *ptrReadPos++;
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -195,7 +195,7 @@ ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
f32 animationSpeed = get_float_variable(script, *ptrReadPos++); f32 animationSpeed = get_float_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -223,7 +223,7 @@ INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFlyTo, ScriptInstance* script, s32 is
ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++; Bytecode outVar = *ptrReadPos++;
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -237,7 +237,7 @@ ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
if (npc == NULL) { if (npc == NULL) {
@ -256,7 +256,7 @@ INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFaceNpc, ScriptInstance* script, s32
ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
s32 flagBits = *args++; s32 flagBits = *args++;
s32 enable = get_variable(script, *args++); s32 enable = get_variable(script, *args++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -276,7 +276,7 @@ ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcID npcID = get_variable(script, *args++);
s32 a1 = *args++; s32 a1 = *args++;
s32 a2 = *args++; s32 a2 = *args++;
s32 a3 = *args++; s32 a3 = *args++;
@ -294,7 +294,7 @@ ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode arg1 = *args; Bytecode arg1 = *args;
Npc* npc = resolve_npc(script, npcId); Npc* npc = resolve_npc(script, npcId);
@ -308,7 +308,7 @@ ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode arg1 = *args; Bytecode arg1 = *args;
Npc* npc = resolve_npc(script, npcId); Npc* npc = resolve_npc(script, npcId);
@ -322,7 +322,7 @@ ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) {
ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
s32 enableShadow = get_variable(script, *ptrReadPos++); s32 enableShadow = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -340,7 +340,7 @@ ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) {
ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
s32 enableBlur = get_variable(script, *ptrReadPos++); s32 enableBlur = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -358,7 +358,7 @@ ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) {
ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) { ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
if (npc == NULL) { if (npc == NULL) {
@ -457,7 +457,7 @@ ApiStatus PartnerIsFlying(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode var1 = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++);
Bytecode var2 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++);
Bytecode var3 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++);
@ -475,7 +475,7 @@ ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode arg1 = *args; Bytecode arg1 = *args;
Npc* npc = resolve_npc(script, npcId); Npc* npc = resolve_npc(script, npcId);
@ -489,7 +489,7 @@ ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode var1 = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++);
Npc* npc = resolve_npc(script, npcId); Npc* npc = resolve_npc(script, npcId);
@ -503,7 +503,7 @@ ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode var1 = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++);
Bytecode var2 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++);
Bytecode var3 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++);
@ -520,7 +520,7 @@ ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcId = get_variable(script, *args++); NpcID npcId = get_variable(script, *args++);
Bytecode var1 = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++);
Bytecode var2 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++);
Bytecode var3 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++);
@ -542,7 +542,7 @@ ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
s32 value1 = get_variable(script, *ptrReadPos++); s32 value1 = get_variable(script, *ptrReadPos++);
s32 value2 = get_variable(script, *ptrReadPos++); s32 value2 = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -557,7 +557,7 @@ ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) {
ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) { ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(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++); s32 value2 = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -572,7 +572,7 @@ ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802D0244(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802D0244(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++); NpcID npcID = get_variable(script, *ptrReadPos++);
u8 renderMode = get_variable(script, *ptrReadPos++); u8 renderMode = get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);

Some files were not shown because too many files have changed in this diff Show More