mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
add remaining opcode support to script DSL (#329)
* update dsl caserange and bind syntax * add bind_padlock * use dsl buf and arr commands * clean up foliage.inc.c * disasm rest of battle/partner/goombario scripts * fix rest of SI_CMD uses
This commit is contained in:
parent
ed2665a934
commit
cbb656f3c9
@ -91,7 +91,7 @@ typedef enum ScriptOpcode {
|
||||
ScriptOpcode_RESUME_OTHERS, ///< Args: group
|
||||
ScriptOpcode_SUSPEND_SCRIPT, ///< Args: ScriptID
|
||||
ScriptOpcode_RESUME_SCRIPT, ///< Args: ScriptID
|
||||
ScriptOpcode_SCRIPT_EXISTS, ///< Args: ScriptID, container
|
||||
ScriptOpcode_DOES_SCRIPT_EXIST, ///< Args: ScriptID, container
|
||||
ScriptOpcode_SPAWN_THREAD,
|
||||
ScriptOpcode_END_SPAWN_THREAD,
|
||||
ScriptOpcode_PARALLEL_THREAD, ///< Parallel threads are killed as soon as the parent script returns.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1446,7 +1446,7 @@ s32 si_execute_next_command(ScriptInstance *script) {
|
||||
case ScriptOpcode_RESUME_SCRIPT:
|
||||
status = si_handle_resume(script);
|
||||
break;
|
||||
case ScriptOpcode_SCRIPT_EXISTS:
|
||||
case ScriptOpcode_DOES_SCRIPT_EXIST:
|
||||
status = si_handle_does_script_exist(script);
|
||||
break;
|
||||
case ScriptOpcode_SPAWN_THREAD:
|
||||
|
@ -7,8 +7,8 @@ Script N(exitWalk_802410F0) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1);
|
||||
Script N(exitWalk_8024114C) = EXIT_WALK_SCRIPT(60, 1, "arn_04", 0);
|
||||
|
||||
Script N(802411A8) = SCRIPT({
|
||||
bind N(exitWalk_802410F0) to TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024114C) to TRIGGER_FLOOR_ABOVE 6;
|
||||
bind N(exitWalk_802410F0) TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024114C) TRIGGER_FLOOR_ABOVE 6;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -9,8 +9,8 @@ Script N(exitWalk_80241830) = EXIT_WALK_SCRIPT(60, 0, "arn_07", 1);
|
||||
Script N(exitWalk_8024188C) = EXIT_WALK_SCRIPT(60, 1, "arn_05", 0);
|
||||
|
||||
Script N(802418E8) = SCRIPT({
|
||||
bind N(exitWalk_80241830) to TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024188C) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_80241830) TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024188C) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(enterWalk_80241930) = SCRIPT({
|
||||
@ -135,13 +135,11 @@ Script N(80241CD4) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80241E18) = {
|
||||
SI_CMD(ScriptOpcode_CALL, (Bytecode) N(func_80241680_BE0410), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, (Bytecode) N(80241CD4), 0x10, 0, (Bytecode) N(D_80244A20), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, (Bytecode) N(func_802415F4_BE0384), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80241E18) = SCRIPT({
|
||||
N(func_80241680_BE0410)(SI_VAR(0));
|
||||
bind_padlock N(80241CD4) 0x10 0 N(D_80244A20);
|
||||
N(func_802415F4_BE0384)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(80241E68) = SCRIPT({
|
||||
SetPlayerAnimation(ANIM_10002);
|
||||
|
@ -8,8 +8,8 @@ Script N(exitWalk_80243480) = EXIT_WALK_SCRIPT(60, 0, "arn_02", 1);
|
||||
Script N(exitWalk_802434DC) = EXIT_WALK_SCRIPT(60, 1, "dgb_00", 0);
|
||||
|
||||
Script N(80243538) = SCRIPT({
|
||||
bind N(exitWalk_80243480) to TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_802434DC) to TRIGGER_FLOOR_ABOVE 6;
|
||||
bind N(exitWalk_80243480) TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_802434DC) TRIGGER_FLOOR_ABOVE 6;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -21,8 +21,8 @@ Script N(exitWalk_80241430) = EXIT_WALK_SCRIPT(60, 0, "arn_03", 1);
|
||||
Script N(exitWalk_8024148C) = EXIT_WALK_SCRIPT(60, 1, "arn_02", 0);
|
||||
|
||||
Script N(802414E8) = SCRIPT({
|
||||
bind N(exitWalk_80241430) to TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024148C) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_80241430) TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_8024148C) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(enterWalk_80241530) = SCRIPT({
|
||||
|
@ -506,19 +506,15 @@ Script N(80242A30) = SCRIPT({
|
||||
DisablePlayerInput(FALSE);
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(802433C8) = {
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitWalk_80242978), TRIGGER_FLOOR_ABOVE, 5, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitWalk_802429D4), TRIGGER_FLOOR_ABOVE, 1, 1, 0),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), -24),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(802439B0), TRIGGER_WALL_PRESS_A, 16384, N(itemList_80242040), 0, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitSingleDoor_802428D4), TRIGGER_WALL_PRESS_A, 10, 1, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(802433C8) = SCRIPT({
|
||||
bind N(exitWalk_80242978) TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_802429D4) TRIGGER_FLOOR_ABOVE 1;
|
||||
if (STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) {
|
||||
bind_padlock N(802439B0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80242040);
|
||||
} else {
|
||||
bind N(exitSingleDoor_802428D4) TRIGGER_WALL_PRESS_A 10;
|
||||
}
|
||||
});
|
||||
|
||||
Script N(enterWalk_8024346C) = SCRIPT({
|
||||
GetEntryID(SI_VAR(0));
|
||||
|
@ -74,7 +74,7 @@ Script N(802439B0) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80243B28) = SCRIPT({
|
||||
bind N(exitSingleDoor_802428D4) to TRIGGER_WALL_PRESS_A 10;
|
||||
bind N(exitSingleDoor_802428D4) TRIGGER_WALL_PRESS_A 10;
|
||||
});
|
||||
|
||||
Script N(makeEntities) = SCRIPT({
|
||||
|
@ -27,7 +27,7 @@ Script N(802403B0) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80240470) = SCRIPT({
|
||||
bind N(802403B0) to TRIGGER_WALL_PRESS_A 6;
|
||||
bind N(802403B0) TRIGGER_WALL_PRESS_A 6;
|
||||
});
|
||||
|
||||
Script N(8024049C) = SCRIPT({
|
||||
|
@ -18,7 +18,7 @@ Script N(80240140) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(802401F4) = SCRIPT({
|
||||
bind N(80240140) to TRIGGER_WALL_PRESS_A 5;
|
||||
bind N(80240140) TRIGGER_WALL_PRESS_A 5;
|
||||
});
|
||||
|
||||
Script N(80240220) = SCRIPT({
|
||||
|
@ -29,8 +29,8 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80240248) = SCRIPT({
|
||||
bind N(exitSingleDoor_80240100) to TRIGGER_WALL_PRESS_A 6;
|
||||
bind N(exitSingleDoor_802401A4) to TRIGGER_WALL_PRESS_A 11;
|
||||
bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 6;
|
||||
bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 11;
|
||||
});
|
||||
|
||||
Script N(enterSingleDoor_80240290) = SCRIPT({
|
||||
|
@ -65,7 +65,7 @@ Script N(exitSingleDoor_80240428) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(802404CC) = SCRIPT({
|
||||
bind N(exitSingleDoor_80240428) to TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(exitSingleDoor_80240428) TRIGGER_WALL_PRESS_A 2;
|
||||
});
|
||||
|
||||
Script N(enterSingleDoor_802404F8) = SCRIPT({
|
||||
@ -171,75 +171,71 @@ s32 N(intTable_80240988)[] = {
|
||||
0x00000000, 0x00000000, 0xFFFFD8F0, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(defeat_802409DC) = {
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamType, 0, 6, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(90.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 50),
|
||||
SI_CMD(ScriptOpcode_CALL, UseSettingsFrom, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPanTarget, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamDistance, 0, 450),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayerFaceNpc, 0, 1),
|
||||
SI_CMD(ScriptOpcode_LOOP, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcJumpscale, 0, SI_FIXED(2.5)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, -1, 8392, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcJump0, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamType, 0, 4, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(2.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPitch, 0, SI_FIXED(17.0), SI_FIXED(-7.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamDistance, 0, 450),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPosA, 0, -56, 70),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPosB, 0, -90, 40),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPosC, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayerFaceNpc, 0, 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80240988)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), -10000),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, -1, 8392, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcJump0, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(8024081C)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), -10000),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, -1, 8392, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcJump0, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(802408D8)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamType, 0, 6, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(90.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, UseSettingsFrom, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPanTarget, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamDistance, 0, 450),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, WaitForCam, 0, SI_FIXED(1.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(0), -22),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(defeat_802409DC) = SCRIPT({
|
||||
spawn {
|
||||
SetCamType(0, 6, 1);
|
||||
SetCamSpeed(0, 90.0);
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SI_VAR(0) += 50;
|
||||
UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SetCamDistance(0, 450);
|
||||
PanToTarget(0, 0, 1);
|
||||
}
|
||||
sleep 10;
|
||||
PlayerFaceNpc(0, 1);
|
||||
loop 2 {
|
||||
GetNpcPos(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SetNpcJumpscale(NPC_TUBBAS_HEART, 2.5);
|
||||
PlaySoundAtNpc(NPC_SELF, 0x20C8, 0);
|
||||
NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12);
|
||||
sleep 1;
|
||||
}
|
||||
spawn {
|
||||
sleep 10;
|
||||
SetCamType(0, 4, 1);
|
||||
SetCamSpeed(0, 2.0);
|
||||
SetCamPitch(0, 17.0, -7.0);
|
||||
SetCamDistance(0, 450);
|
||||
SetCamPosA(0, -56, 70);
|
||||
SetCamPosB(0, -90, 40);
|
||||
SetCamPosC(0, 0, 0);
|
||||
PanToTarget(0, 0, 1);
|
||||
}
|
||||
PlayerFaceNpc(0, 1);
|
||||
buf_use N(intTable_80240988);
|
||||
loop {
|
||||
buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2);
|
||||
if (SI_VAR(0) == -10000) {
|
||||
break loop;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_SELF, 0x20C8, 0);
|
||||
NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12);
|
||||
sleep 1;
|
||||
}
|
||||
spawn N(8024081C);
|
||||
loop {
|
||||
buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2);
|
||||
if (SI_VAR(0) == -10000) {
|
||||
break loop;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_SELF, 0x20C8, 0);
|
||||
NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12);
|
||||
sleep 1;
|
||||
}
|
||||
spawn N(802408D8);
|
||||
sleep 30;
|
||||
SetCamType(0, 6, 1);
|
||||
SetCamSpeed(0, 90.0);
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SetCamDistance(0, 450);
|
||||
PanToTarget(0, 0, 1);
|
||||
WaitForCam(0, 1.0);
|
||||
PanToTarget(0, 0, 0);
|
||||
STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL;
|
||||
});
|
||||
|
||||
Script N(init_80240E70) = SCRIPT({
|
||||
if (STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) {
|
||||
|
@ -29,8 +29,8 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80240248) = SCRIPT({
|
||||
bind N(exitSingleDoor_80240100) to TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(exitSingleDoor_802401A4) to TRIGGER_WALL_PRESS_A 7;
|
||||
bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 7;
|
||||
});
|
||||
|
||||
Script N(enterSingleDoor_80240290) = SCRIPT({
|
||||
|
@ -29,8 +29,8 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80240248) = SCRIPT({
|
||||
bind N(exitSingleDoor_80240100) to TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(exitSingleDoor_802401A4) to TRIGGER_WALL_PRESS_A 7;
|
||||
bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 7;
|
||||
});
|
||||
|
||||
Script N(enterSingleDoor_80240290) = SCRIPT({
|
||||
|
@ -56,17 +56,17 @@ Script N(exitDoubleDoor_8024021C) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(802402D0) = SCRIPT({
|
||||
bind N(exitWalk_802401C0) to TRIGGER_FLOOR_ABOVE 15;
|
||||
bind N(exitWalk_802401C0) TRIGGER_FLOOR_ABOVE 15;
|
||||
match STORY_PROGRESS {
|
||||
< STORY_CH3_TUBBA_SMASHED_THE_BRIDGES {
|
||||
bind N(exitDoubleDoor_8024021C) to TRIGGER_WALL_PRESS_A 18;
|
||||
bind N(exitDoubleDoor_8024021C) TRIGGER_WALL_PRESS_A 18;
|
||||
}
|
||||
< STORY_CH3_ESCAPED_TUBBAS_MANOR {}
|
||||
< STORY_CH3_DEFEATED_TUBBA_BLUBBA {
|
||||
spawn N(80240F50);
|
||||
await N(80241AA0);
|
||||
} else {
|
||||
bind N(exitDoubleDoor_8024021C) to TRIGGER_WALL_PRESS_A 18;
|
||||
bind N(exitDoubleDoor_8024021C) TRIGGER_WALL_PRESS_A 18;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -187,48 +187,49 @@ s32 N(itemList_80243C40)[] = {
|
||||
ITEM_NONE,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(main) = {
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(425), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSpriteShading, -1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPerspective, 0, 3, 25, 16, 4096),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamBGColor, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamEnabled, 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamLeadPlayer, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1978), 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(makeEntities)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(802449C4)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(802434A0)),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80243550), TRIGGER_WALL_PRESS_A, 4, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80243604), TRIGGER_WALL_PRESS_A, 8, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_8024376C), TRIGGER_WALL_PRESS_A, 12, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80243820), TRIGGER_WALL_PRESS_A, 24, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_802438D4), TRIGGER_WALL_PRESS_A, 16, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80243988), TRIGGER_WALL_PRESS_A, 28, 1, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1040), 0),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80244AD0), TRIGGER_WALL_PRESS_A, 16384, N(itemList_80243C40), 0, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_802436B8), TRIGGER_WALL_PRESS_A, 20, 1, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_SAVE_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CASE_LT, -29),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeNpcs, 1, N(npcGroupList_80246E50)),
|
||||
SI_CMD(ScriptOpcode_CASE_LT, -16),
|
||||
SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CASE_EQ, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeNpcs, 1, N(npcGroupList_80246F1C)),
|
||||
SI_CMD(ScriptOpcode_CASE_EQ, 4),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeNpcs, 1, N(npcGroupList_80246ED4)),
|
||||
SI_CMD(ScriptOpcode_CASE_EQ, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeNpcs, 1, N(npcGroupList_80246E8C)),
|
||||
SI_CMD(ScriptOpcode_END_MATCH),
|
||||
SI_CMD(ScriptOpcode_END_MATCH),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(enterDoubleDoor_80243A3C)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(main) = SCRIPT({
|
||||
WORLD_LOCATION = LOCATION_TUBBAS_MANOR;
|
||||
SetSpriteShading(-1);
|
||||
SetCamPerspective(0, 3, 25, 16, 4096);
|
||||
SetCamBGColor(0, 0, 0, 0);
|
||||
SetCamEnabled(0, 1);
|
||||
SetCamLeadPlayer(0, 0);
|
||||
SI_SAVE_FLAG(1978) = 1;
|
||||
await N(makeEntities);
|
||||
spawn N(802449C4);
|
||||
spawn N(802434A0);
|
||||
bind N(exitDoubleDoor_80243550) TRIGGER_WALL_PRESS_A 4;
|
||||
bind N(exitDoubleDoor_80243604) TRIGGER_WALL_PRESS_A 8;
|
||||
bind N(exitDoubleDoor_8024376C) TRIGGER_WALL_PRESS_A 12;
|
||||
bind N(exitDoubleDoor_80243820) TRIGGER_WALL_PRESS_A 24;
|
||||
bind N(exitDoubleDoor_802438D4) TRIGGER_WALL_PRESS_A 16;
|
||||
bind N(exitDoubleDoor_80243988) TRIGGER_WALL_PRESS_A 28;
|
||||
if (SI_SAVE_FLAG(1040) == 0) {
|
||||
bind_padlock N(80244AD0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80243C40);
|
||||
} else {
|
||||
bind N(exitDoubleDoor_802436B8) TRIGGER_WALL_PRESS_A 20;
|
||||
}
|
||||
match STORY_PROGRESS {
|
||||
< STORY_CH3_TUBBA_WOKE_UP {
|
||||
MakeNpcs(1, N(npcGroupList_80246E50));
|
||||
}
|
||||
< STORY_CH3_DEFEATED_TUBBA_BLUBBA {
|
||||
GetEntryID(SI_VAR(0));
|
||||
match SI_VAR(0) {
|
||||
== 2 {
|
||||
MakeNpcs(1, N(npcGroupList_80246F1C));
|
||||
}
|
||||
== 4 {
|
||||
MakeNpcs(1, N(npcGroupList_80246ED4));
|
||||
}
|
||||
== 6 {
|
||||
MakeNpcs(1, N(npcGroupList_80246E8C));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
spawn N(enterDoubleDoor_80243A3C);
|
||||
});
|
||||
|
||||
static s32 N(pad_3EE4)[] = {
|
||||
0x00000000, 0x00000000, 0x00000000,
|
||||
@ -451,7 +452,7 @@ Script N(80244AD0) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80244C38) = SCRIPT({
|
||||
bind N(exitDoubleDoor_802436B8) to TRIGGER_WALL_PRESS_A 20;
|
||||
bind N(exitDoubleDoor_802436B8) TRIGGER_WALL_PRESS_A 20;
|
||||
});
|
||||
|
||||
Script N(makeEntities) = SCRIPT({
|
||||
|
@ -138,10 +138,10 @@ Script N(main) = SCRIPT({
|
||||
if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) {
|
||||
MakeNpcs(1, N(npcGroupList_802425C8));
|
||||
}
|
||||
bind N(exitDoubleDoor_80241550) to TRIGGER_WALL_PRESS_A 5;
|
||||
bind N(exitDoubleDoor_80241604) to TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitSingleDoor_802416B8) to TRIGGER_WALL_PRESS_A 9;
|
||||
bind N(exitSingleDoor_8024176C) to TRIGGER_WALL_PRESS_A 13;
|
||||
bind N(exitDoubleDoor_80241550) TRIGGER_WALL_PRESS_A 5;
|
||||
bind N(exitDoubleDoor_80241604) TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitSingleDoor_802416B8) TRIGGER_WALL_PRESS_A 9;
|
||||
bind N(exitSingleDoor_8024176C) TRIGGER_WALL_PRESS_A 13;
|
||||
spawn N(802414B0);
|
||||
spawn N(enterSingleDoor_80241820);
|
||||
});
|
||||
|
@ -120,7 +120,7 @@ Script N(exitDoubleDoor_80242C3C) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80242CF0) = SCRIPT({
|
||||
bind N(exitWalk_80242B2C) to TRIGGER_FLOOR_ABOVE 35;
|
||||
bind N(exitWalk_80242B2C) TRIGGER_FLOOR_ABOVE 35;
|
||||
});
|
||||
|
||||
Script N(enterDoubleDoor_80242D1C) = SCRIPT({
|
||||
@ -174,33 +174,29 @@ s32 N(itemList_80242F28)[] = {
|
||||
ITEM_NONE,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(main) = {
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(425), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSpriteShading, -1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPerspective, 0, 3, 25, 16, 4096),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamBGColor, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamEnabled, 0, 1),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), -15),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeNpcs, 1, N(npcGroupList_80244988)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(makeEntities)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80243608)),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80242910), TRIGGER_WALL_PRESS_A, 25, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_802429C4), TRIGGER_WALL_PRESS_A, 21, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80242A78), TRIGGER_WALL_PRESS_A, 13, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitSingleDoor_80242B88), TRIGGER_WALL_PRESS_A, 33, 1, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1043), 0),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80243740), TRIGGER_WALL_PRESS_A, 16384, N(itemList_80242F28), 0, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80242C3C), TRIGGER_WALL_PRESS_A, 17, 1, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80242870)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(enterDoubleDoor_80242D1C)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(main) = SCRIPT({
|
||||
WORLD_LOCATION = LOCATION_TUBBAS_MANOR;
|
||||
SetSpriteShading(-1);
|
||||
SetCamPerspective(0, 3, 25, 16, 4096);
|
||||
SetCamBGColor(0, 0, 0, 0);
|
||||
SetCamEnabled(0, 1);
|
||||
if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) {
|
||||
MakeNpcs(1, N(npcGroupList_80244988));
|
||||
}
|
||||
await N(makeEntities);
|
||||
spawn N(80243608);
|
||||
bind N(exitDoubleDoor_80242910) TRIGGER_WALL_PRESS_A 25;
|
||||
bind N(exitDoubleDoor_802429C4) TRIGGER_WALL_PRESS_A 21;
|
||||
bind N(exitDoubleDoor_80242A78) TRIGGER_WALL_PRESS_A 13;
|
||||
bind N(exitSingleDoor_80242B88) TRIGGER_WALL_PRESS_A 33;
|
||||
if (SI_SAVE_FLAG(1043) == 0) {
|
||||
bind_padlock N(80243740) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80242F28);
|
||||
} else {
|
||||
bind N(exitDoubleDoor_80242C3C) TRIGGER_WALL_PRESS_A 17;
|
||||
}
|
||||
spawn N(80242870);
|
||||
spawn N(enterDoubleDoor_80242D1C);
|
||||
});
|
||||
|
||||
static s32 N(pad_30D8)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
@ -312,8 +308,8 @@ Script N(80243608) = SCRIPT({
|
||||
ParentColliderToModel(28, 51);
|
||||
ParentColliderToModel(29, 51);
|
||||
if (SI_SAVE_FLAG(1044) == 0) {
|
||||
bind N(80243470) to TRIGGER_WALL_PUSH 27;
|
||||
bind N(8024353C) to TRIGGER_WALL_PUSH 28;
|
||||
bind N(80243470) TRIGGER_WALL_PUSH 27;
|
||||
bind N(8024353C) TRIGGER_WALL_PUSH 28;
|
||||
} else {
|
||||
if (SI_SAVE_FLAG(1045) == 0) {
|
||||
SI_VAR(0) = 48;
|
||||
@ -359,7 +355,7 @@ Script N(80243740) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(802438A8) = SCRIPT({
|
||||
bind N(exitDoubleDoor_80242C3C) to TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitDoubleDoor_80242C3C) TRIGGER_WALL_PRESS_A 17;
|
||||
});
|
||||
|
||||
Script N(makeEntities) = SCRIPT({
|
||||
|
@ -96,8 +96,8 @@ Script N(main) = SCRIPT({
|
||||
MakeNpcs(1, N(npcGroupList_80243D18));
|
||||
}
|
||||
await N(makeEntities);
|
||||
bind N(exitSingleDoor_80243210) to TRIGGER_WALL_PRESS_A 16;
|
||||
bind N(exitDoubleDoor_802432C4) to TRIGGER_WALL_PRESS_A 20;
|
||||
bind N(exitSingleDoor_80243210) TRIGGER_WALL_PRESS_A 16;
|
||||
bind N(exitDoubleDoor_802432C4) TRIGGER_WALL_PRESS_A 20;
|
||||
spawn N(80243170);
|
||||
spawn N(enterSingleDoor_80243378);
|
||||
});
|
||||
|
@ -80,7 +80,7 @@ Script N(main) = SCRIPT({
|
||||
spawn N(802417F0);
|
||||
ModifyColliderFlags(0, 18, 0x7FFFFE00);
|
||||
EnableModel(20, 0);
|
||||
bind N(exitSingleDoor_80241580) to TRIGGER_WALL_PRESS_A 16;
|
||||
bind N(exitSingleDoor_80241580) TRIGGER_WALL_PRESS_A 16;
|
||||
spawn N(802414E0);
|
||||
spawn N(enterSingleDoor_80241634);
|
||||
});
|
||||
|
@ -75,7 +75,7 @@ Script N(main) = SCRIPT({
|
||||
} else {
|
||||
EnableGroup(25, 0);
|
||||
}
|
||||
bind N(exitSingleDoor_802403C0) to TRIGGER_WALL_PRESS_A 12;
|
||||
bind N(exitSingleDoor_802403C0) TRIGGER_WALL_PRESS_A 12;
|
||||
spawn N(80240320);
|
||||
spawn N(enterSingleDoor_80240474);
|
||||
});
|
||||
|
@ -76,7 +76,7 @@ Script N(main) = SCRIPT({
|
||||
MakeNpcs(1, N(npcGroupList_80241E5C));
|
||||
}
|
||||
await N(makeEntities);
|
||||
bind N(exitSingleDoor_80241530) to TRIGGER_WALL_PRESS_A 6;
|
||||
bind N(exitSingleDoor_80241530) TRIGGER_WALL_PRESS_A 6;
|
||||
spawn N(80241490);
|
||||
spawn N(enterSingleDoor_802415E4);
|
||||
});
|
||||
|
@ -116,8 +116,8 @@ Script N(main) = SCRIPT({
|
||||
}
|
||||
}
|
||||
await N(802469E0);
|
||||
bind N(exitDoubleDoor_80243D90) to TRIGGER_WALL_PRESS_A 14;
|
||||
bind N(exitDoubleDoor_80243E44) to TRIGGER_WALL_PRESS_A 18;
|
||||
bind N(exitDoubleDoor_80243D90) TRIGGER_WALL_PRESS_A 14;
|
||||
bind N(exitDoubleDoor_80243E44) TRIGGER_WALL_PRESS_A 18;
|
||||
spawn N(80243CF0);
|
||||
spawn N(enterDoubleDoor_80243EF8);
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ Script N(exitSingleDoor_80243A88) = SCRIPT({
|
||||
Script N(exitWalk_80243B3C) = EXIT_WALK_SCRIPT(40, 3, "dgb_10", 0);
|
||||
|
||||
Script N(80243B98) = SCRIPT({
|
||||
bind N(exitWalk_80243B3C) to TRIGGER_FLOOR_ABOVE 11;
|
||||
bind N(exitWalk_80243B3C) TRIGGER_FLOOR_ABOVE 11;
|
||||
});
|
||||
|
||||
Script N(enterWalk_80243BC4) = SCRIPT({
|
||||
@ -135,9 +135,9 @@ Script N(main) = SCRIPT({
|
||||
MakeNpcs(1, N(npcGroupList_8024533C));
|
||||
}
|
||||
spawn N(80243F6C);
|
||||
bind N(exitDoubleDoor_80243920) to TRIGGER_WALL_PRESS_A 5;
|
||||
bind N(exitDoubleDoor_802439D4) to TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitSingleDoor_80243A88) to TRIGGER_WALL_PRESS_A 9;
|
||||
bind N(exitDoubleDoor_80243920) TRIGGER_WALL_PRESS_A 5;
|
||||
bind N(exitDoubleDoor_802439D4) TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitSingleDoor_80243A88) TRIGGER_WALL_PRESS_A 9;
|
||||
spawn N(80243880);
|
||||
spawn N(enterWalk_80243BC4);
|
||||
});
|
||||
@ -166,7 +166,7 @@ Script N(80243E60) = SCRIPT({
|
||||
|
||||
Script N(80243F6C) = SCRIPT({
|
||||
if (SI_SAVE_FLAG(1051) == 0) {
|
||||
bind N(80243E60) to TRIGGER_POINT_BOMB N(triggerCoord_80243E50);
|
||||
bind N(80243E60) TRIGGER_POINT_BOMB N(triggerCoord_80243E50);
|
||||
EnableModel(29, 0);
|
||||
} else {
|
||||
EnableModel(25, 0);
|
||||
|
@ -33,7 +33,7 @@ static s32 N(pad_2E8)[] = {
|
||||
Script N(exitWalk_802402F0) = EXIT_WALK_SCRIPT(40, 0, "dgb_09", 3);
|
||||
|
||||
Script N(8024034C) = SCRIPT({
|
||||
bind N(exitWalk_802402F0) to TRIGGER_FLOOR_ABOVE 8;
|
||||
bind N(exitWalk_802402F0) TRIGGER_FLOOR_ABOVE 8;
|
||||
});
|
||||
|
||||
Script N(enterWalk_80240378) = SCRIPT({
|
||||
@ -88,168 +88,150 @@ static s32 N(pad_66C) = {
|
||||
0x00000000,
|
||||
};
|
||||
|
||||
Script N(80240670) = {
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_NEW_ARRAY, 6, SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(0), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(2), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(3), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(5), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(80240770), TRIGGER_FLOOR_TOUCH, SI_ARRAY(0), 1, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80240670) = SCRIPT({
|
||||
buf_use SI_VAR(0);
|
||||
arr_new 6 SI_VAR(10);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(0) = SI_VAR(0);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(1) = SI_VAR(0);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(2) = SI_VAR(0);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(3) = SI_VAR(0);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(4) = SI_VAR(0);
|
||||
buf_read SI_VAR(0);
|
||||
SI_ARRAY(5) = SI_VAR(0);
|
||||
SI_VAR(0) = SI_VAR(10);
|
||||
bind N(80240770) TRIGGER_FLOOR_TOUCH 0xF4ACD480; // TODO: what is this id? see also below TODO
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80240770) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240000_C4C390)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 1, SI_ARRAY(0), 2147483136),
|
||||
SI_CMD(ScriptOpcode_CALL, EnableModel, SI_ARRAY(1), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 0, SI_ARRAY(0), 2147483136),
|
||||
SI_CMD(ScriptOpcode_CALL, EnableModel, SI_ARRAY(1), 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_ARRAY(5), 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, 0xF4ACD485),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80240770) = SCRIPT({
|
||||
arr_use SI_VAR(0);
|
||||
N(func_80240000_C4C390)();
|
||||
if (SI_VAR(0) == 0) {
|
||||
return;
|
||||
}
|
||||
loop 5 {
|
||||
ModifyColliderFlags(1, SI_ARRAY(0), 0x7FFFFE00);
|
||||
EnableModel(SI_ARRAY(1), 1);
|
||||
sleep 1;
|
||||
ModifyColliderFlags(0, SI_ARRAY(0), 0x7FFFFE00);
|
||||
EnableModel(SI_ARRAY(1), 0);
|
||||
sleep 1;
|
||||
}
|
||||
if (SI_ARRAY(5) != 0) {
|
||||
await 0xF4ACD485; // TODO: what is this?
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80240860) = {
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_NEW_ARRAY, 6, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(0), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(1), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(2), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(3), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(5), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, ParentColliderToModel, SI_ARRAY(1), SI_ARRAY(0)),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_LABEL, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerActionState, SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(10), 13),
|
||||
SI_CMD(ScriptOpcode_GOTO, 2),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(10), 15),
|
||||
SI_CMD(ScriptOpcode_GOTO, 2),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_LABEL, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(2), SI_ARRAY(3)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 2),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802400A0_C4C430)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80240AF4)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 2),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80240CB8)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_LABEL, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerActionState, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 13),
|
||||
SI_CMD(ScriptOpcode_GOTO, 3),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 15),
|
||||
SI_CMD(ScriptOpcode_GOTO, 3),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80240860) = SCRIPT({
|
||||
buf_use SI_VAR(0);
|
||||
arr_new 6 SI_VAR(9);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(0) = SI_VAR(1);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(1) = SI_VAR(1);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(2) = SI_VAR(1);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(3) = SI_VAR(1);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(4) = SI_VAR(1);
|
||||
buf_read SI_VAR(1);
|
||||
SI_ARRAY(5) = SI_VAR(1);
|
||||
ParentColliderToModel(SI_ARRAY(1), SI_ARRAY(0));
|
||||
0:
|
||||
1:
|
||||
GetPlayerActionState(SI_VAR(10));
|
||||
if (SI_VAR(10) == 13) {
|
||||
goto 2;
|
||||
}
|
||||
if (SI_VAR(10) == 15) {
|
||||
goto 2;
|
||||
}
|
||||
sleep 1;
|
||||
goto 0;
|
||||
2:
|
||||
GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3));
|
||||
sleep 1;
|
||||
if (SI_VAR(2) != SI_ARRAY(3)) {
|
||||
goto 2;
|
||||
}
|
||||
N(func_802400A0_C4C430)();
|
||||
if (SI_VAR(0) == 1) {
|
||||
await N(80240AF4);
|
||||
}
|
||||
if (SI_VAR(0) == 2) {
|
||||
await N(80240CB8);
|
||||
}
|
||||
3:
|
||||
GetPlayerActionState(SI_VAR(0));
|
||||
sleep 1;
|
||||
if (SI_VAR(0) == 13) {
|
||||
goto 3;
|
||||
}
|
||||
if (SI_VAR(0) == 15) {
|
||||
goto 3;
|
||||
}
|
||||
goto 0;
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80240AF4) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 0, 5, 3, 1),
|
||||
SI_CMD(ScriptOpcode_LABEL, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_ARRAY(0), 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(5), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(5), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_VAR(2), SI_VAR(5), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateColliderTransform, SI_ARRAY(1)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 2),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 5, 0, 3, 1),
|
||||
SI_CMD(ScriptOpcode_LABEL, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_ARRAY(0), 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(5), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(5), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_VAR(2), SI_VAR(5), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateColliderTransform, SI_ARRAY(1)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 3),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80240AF4) = SCRIPT({
|
||||
arr_use SI_VAR(9);
|
||||
GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4));
|
||||
MakeLerp(0, 5, 3, 1);
|
||||
2:
|
||||
UpdateLerp();
|
||||
TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0);
|
||||
SI_VAR(5) = SI_VAR(3);
|
||||
SI_VAR(5) += SI_VAR(0);
|
||||
SetPlayerPos(SI_VAR(2), SI_VAR(5), SI_VAR(4));
|
||||
UpdateColliderTransform(SI_ARRAY(1));
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 1) {
|
||||
goto 2;
|
||||
}
|
||||
MakeLerp(5, 0, 3, 1);
|
||||
3:
|
||||
UpdateLerp();
|
||||
TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0);
|
||||
SI_VAR(5) = SI_VAR(3);
|
||||
SI_VAR(5) += SI_VAR(0);
|
||||
SetPlayerPos(SI_VAR(2), SI_VAR(5), SI_VAR(4));
|
||||
UpdateColliderTransform(SI_ARRAY(1));
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 1) {
|
||||
goto 3;
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80240CB8) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeItemEntity, SI_ARRAY(5), SI_ARRAY(2), SI_ARRAY(3), SI_ARRAY(4), 3, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(2), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 0, 150, 19, 4),
|
||||
SI_CMD(ScriptOpcode_LABEL, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_ARRAY(0), 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(2), 45),
|
||||
SI_CMD(ScriptOpcode_CALL, RotateModel, SI_ARRAY(0), SI_VAR(2), 1, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 2),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 150, 0, 19, 4),
|
||||
SI_CMD(ScriptOpcode_LABEL, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_ARRAY(0), 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(2), 45),
|
||||
SI_CMD(ScriptOpcode_CALL, RotateModel, SI_ARRAY(0), SI_VAR(2), 1, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 3),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80240CB8) = SCRIPT({
|
||||
arr_use SI_VAR(9);
|
||||
MakeItemEntity(SI_ARRAY(5), SI_ARRAY(2), SI_ARRAY(3), SI_ARRAY(4), 3, 0);
|
||||
SI_VAR(2) = 0;
|
||||
MakeLerp(0, 150, 19, 4);
|
||||
2:
|
||||
UpdateLerp();
|
||||
TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0);
|
||||
SI_VAR(2) += 45;
|
||||
RotateModel(SI_ARRAY(0), SI_VAR(2), 1, 0, 0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 1) {
|
||||
goto 2;
|
||||
}
|
||||
MakeLerp(150, 0, 19, 4);
|
||||
3:
|
||||
UpdateLerp();
|
||||
TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0);
|
||||
SI_VAR(2) += 45;
|
||||
RotateModel(SI_ARRAY(0), SI_VAR(2), 1, 0, 0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 1) {
|
||||
goto 3;
|
||||
}
|
||||
});
|
||||
|
||||
Script N(80240E68) = SCRIPT({
|
||||
N(func_8024013C_C4C4CC)();
|
||||
|
@ -100,7 +100,7 @@ Script N(main) = SCRIPT({
|
||||
SetCamEnabled(0, 1);
|
||||
await N(makeEntities);
|
||||
spawn N(802400D0);
|
||||
bind N(exitSingleDoor_80240170) to TRIGGER_WALL_PRESS_A 11;
|
||||
bind N(exitSingleDoor_80240170) TRIGGER_WALL_PRESS_A 11;
|
||||
spawn N(enterSingleDoor_80240224);
|
||||
});
|
||||
|
||||
|
@ -65,7 +65,7 @@ Script N(main) = SCRIPT({
|
||||
await N(makeEntities);
|
||||
spawn N(802405E0);
|
||||
spawn N(80240310);
|
||||
bind N(exitSingleDoor_802403B0) to TRIGGER_WALL_PRESS_A 8;
|
||||
bind N(exitSingleDoor_802403B0) TRIGGER_WALL_PRESS_A 8;
|
||||
spawn N(enterSingleDoor_80240464);
|
||||
});
|
||||
|
||||
|
@ -32,7 +32,7 @@ static s32 N(pad_E8)[] = {
|
||||
Script N(exitWalk_802400F0) = EXIT_WALK_SCRIPT(26, 0, "dgb_03", 5);
|
||||
|
||||
Script N(8024014C) = SCRIPT({
|
||||
bind N(exitWalk_802400F0) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_802400F0) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -130,5 +130,5 @@ Script N(80240610) = SCRIPT({
|
||||
|
||||
Script N(80240680) = SCRIPT({
|
||||
ParentColliderToModel(13, 44);
|
||||
bind N(80240610) to TRIGGER_WALL_PRESS_A 13;
|
||||
bind N(80240610) TRIGGER_WALL_PRESS_A 13;
|
||||
});
|
||||
|
@ -92,8 +92,8 @@ Script N(main) = SCRIPT({
|
||||
SetCamEnabled(0, 1);
|
||||
await N(makeEntities);
|
||||
spawn N(80240060);
|
||||
bind N(exitDoubleDoor_80240100) to TRIGGER_WALL_PRESS_A 14;
|
||||
bind N(exitDoubleDoor_802401B4) to TRIGGER_WALL_PRESS_A 18;
|
||||
bind N(exitDoubleDoor_80240100) TRIGGER_WALL_PRESS_A 14;
|
||||
bind N(exitDoubleDoor_802401B4) TRIGGER_WALL_PRESS_A 18;
|
||||
spawn N(enterDoubleDoor_80240268);
|
||||
});
|
||||
|
||||
|
@ -91,19 +91,15 @@ Script N(exitSingleDoor_80241B30) = SCRIPT({
|
||||
|
||||
const N(pad_XXXX)[] = { 0, 0 };
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80241BE4) = {
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_802419C8), TRIGGER_WALL_PRESS_A, 19, 1, 0),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitSingleDoor_80241B30), TRIGGER_WALL_PRESS_A, 6, 1, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1066), 0),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80242AD0), TRIGGER_WALL_PRESS_A, 16384, N(itemList_802419C0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_BIND_TRIGGER, N(exitDoubleDoor_80241A7C), TRIGGER_WALL_PRESS_A, 10, 1, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80241BE4) = SCRIPT({
|
||||
bind N(exitDoubleDoor_802419C8) TRIGGER_WALL_PRESS_A 19;
|
||||
bind N(exitSingleDoor_80241B30) TRIGGER_WALL_PRESS_A 6;
|
||||
if (SI_SAVE_FLAG(1066) == 0) {
|
||||
bind_padlock N(80242AD0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_802419C0);
|
||||
} else {
|
||||
bind N(exitDoubleDoor_80241A7C) TRIGGER_WALL_PRESS_A 10;
|
||||
}
|
||||
});
|
||||
|
||||
Script N(enterSingleDoor_80241C88) = SCRIPT({
|
||||
GetEntryID(SI_VAR(0));
|
||||
@ -432,7 +428,7 @@ Script N(80242AD0) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80242C38) = SCRIPT({
|
||||
bind N(exitDoubleDoor_80241A7C) to TRIGGER_WALL_PRESS_A 10;
|
||||
bind N(exitDoubleDoor_80241A7C) TRIGGER_WALL_PRESS_A 10;
|
||||
});
|
||||
|
||||
Script N(makeEntities) = SCRIPT({
|
||||
|
@ -91,7 +91,7 @@ Script N(main) = SCRIPT({
|
||||
}
|
||||
await N(80241780);
|
||||
spawn N(80241480);
|
||||
bind N(exitSingleDoor_80241520) to TRIGGER_WALL_PRESS_A 6;
|
||||
bind N(exitSingleDoor_80241520) TRIGGER_WALL_PRESS_A 6;
|
||||
spawn N(enterSingleDoor_802415D4);
|
||||
});
|
||||
|
||||
|
@ -59,8 +59,8 @@ Script N(exitDoubleDoor_802401B4) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80240268) = SCRIPT({
|
||||
bind N(exitDoubleDoor_80240100) to TRIGGER_WALL_PRESS_A 7;
|
||||
bind N(exitDoubleDoor_802401B4) to TRIGGER_WALL_PRESS_A 11;
|
||||
bind N(exitDoubleDoor_80240100) TRIGGER_WALL_PRESS_A 7;
|
||||
bind N(exitDoubleDoor_802401B4) TRIGGER_WALL_PRESS_A 11;
|
||||
});
|
||||
|
||||
Script N(enterDoubleDoor_802402B0) = SCRIPT({
|
||||
|
@ -77,7 +77,7 @@ Script N(main) = SCRIPT({
|
||||
MakeNpcs(1, N(npcGroupList_802436B4));
|
||||
await N(makeEntities);
|
||||
spawn N(802412C0);
|
||||
bind N(exitDoubleDoor_80241360) to TRIGGER_WALL_PRESS_A 17;
|
||||
bind N(exitDoubleDoor_80241360) TRIGGER_WALL_PRESS_A 17;
|
||||
spawn N(enterDoubleDoor_80241414);
|
||||
});
|
||||
|
||||
|
@ -107,7 +107,18 @@ MapConfig N(config) = {
|
||||
.tattle = { MSG_dro_01_tattle },
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
// Extraneous END_CASE_MULTI
|
||||
#ifdef NON_MATCHING
|
||||
Script N(80243BB0) = SCRIPT({
|
||||
GetEntryID(SI_VAR(0));
|
||||
match SI_VAR(0) {
|
||||
3, 4 {}
|
||||
else {
|
||||
SetMusicTrack(0, SONG_DRY_DRY_OUTPOST, 0, 8);
|
||||
}
|
||||
}
|
||||
});
|
||||
#else
|
||||
Script N(80243BB0) = {
|
||||
SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)),
|
||||
@ -115,13 +126,13 @@ Script N(80243BB0) = {
|
||||
SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 4),
|
||||
SI_CMD(ScriptOpcode_END_CASE_MULTI),
|
||||
SI_CMD(ScriptOpcode_CASE_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, 21, 0, 8),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8),
|
||||
SI_CMD(ScriptOpcode_END_CASE_MULTI),
|
||||
SI_CMD(ScriptOpcode_END_MATCH),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(80243C30) = SCRIPT({
|
||||
DisablePlayerInput(TRUE);
|
||||
@ -362,8 +373,8 @@ Script N(exitWalk_80244960) = SCRIPT({
|
||||
Script N(exitWalk_802449CC) = EXIT_WALK_SCRIPT(60, 1, "dro_02", 0);
|
||||
|
||||
Script N(80244A28) = SCRIPT({
|
||||
bind N(exitWalk_80244960) to TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_802449CC) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_80244960) TRIGGER_FLOOR_ABOVE 1;
|
||||
bind N(exitWalk_802449CC) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(80244A70) = SCRIPT({
|
||||
@ -446,7 +457,7 @@ Script N(main) = SCRIPT({
|
||||
STORY_PROGRESS = STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST;
|
||||
}
|
||||
match STORY_PROGRESS {
|
||||
-53..6 {
|
||||
-53 ... 6 {
|
||||
MakeNpcs(0, N(npcGroupList_8024B47C));
|
||||
} else {
|
||||
MakeNpcs(0, N(npcGroupList_8024B464));
|
||||
@ -936,209 +947,205 @@ Script N(80246848) = SCRIPT({
|
||||
await N(802466BC);
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(802468F8) = {
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, -1, 16),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524298),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1767), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524297),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524296),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1767), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, 1966093),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 11468804, 11468801, 0, 524300),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802452AC)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1793), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(Set80151310_1)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkAlphaFunc)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(8024535C)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePartnerAI, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, -4, 512, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 10, 512, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, -4, 328, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 10, 256, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, -4, 262),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(80245A84), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 11468804, 11468801, 0, 524299),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 137),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241BE0_95CDE0)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 2883584),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), SI_SAVE_VAR(352)),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468805, 11468806, 0, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 65576),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 2949120),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), SI_SAVE_VAR(352)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 142),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_KILL_SCRIPT, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, StopSound, 142),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80245AF8)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 141),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EE0_95D0E0), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802424D4_95D6D4)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 40),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241B5C_95CD5C)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 110),
|
||||
SI_CMD(ScriptOpcode_CALL, CloseChoice),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 0),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468807),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 1),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EAC_95D0AC), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EAC_95D0AC), 2),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 138),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241F78_95D178)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 50),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 83, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), -3),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 58, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 30),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 93, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(80246798), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_SAVE_VAR(352), 1),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524304),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468806),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468805),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 348),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 3),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802451BC)),
|
||||
SI_CMD(ScriptOpcode_CALL, AddStarPieces, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EAC_95D0AC), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241F60_95D160)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageValue, SI_SAVE_VAR(352), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524305),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524302),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468806),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468805),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 348),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802451BC)),
|
||||
SI_CMD(ScriptOpcode_CALL, AddStarPieces, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EAC_95D0AC), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241F60_95D160)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageValue, SI_SAVE_VAR(352), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(352), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageString, &MessageSingular, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageString, &MessagePlural, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524303),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468809),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 541),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 139),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(80246848), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 43, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524301),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468810),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241EE0_95D0E0), -1),
|
||||
SI_CMD(ScriptOpcode_CALL, EnablePartnerAI),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 143),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_CALL, StopSound, 137),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241F94_95D194)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241DF8_95CFF8)),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802452AC)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(802455F4)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkFunc29)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(Set80151310_0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1793), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(802468F8) = SCRIPT({
|
||||
if (SI_SAVE_VAR(352) > 63) {
|
||||
SI_VAR(0) = 0;
|
||||
return;
|
||||
}
|
||||
GetPlayerPos(SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3));
|
||||
NpcFacePlayer(NPC_SELF, 16);
|
||||
if (SI_SAVE_VAR(352) == 63) {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000A));
|
||||
} else {
|
||||
if (SI_SAVE_FLAG(1767) == 1) {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0009));
|
||||
} else {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0008));
|
||||
SI_SAVE_FLAG(1767) = 1;
|
||||
}
|
||||
}
|
||||
ShowChoice(MESSAGE_ID(0x1E, 0x000D));
|
||||
if (SI_VAR(0) == 1) {
|
||||
ContinueSpeech(-1, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000C));
|
||||
await N(802452AC);
|
||||
SI_VAR(0) = 0;
|
||||
return;
|
||||
}
|
||||
SI_SAVE_FLAG(1793) = 1;
|
||||
N(Set80151310_1)();
|
||||
N(UnkAlphaFunc)();
|
||||
spawn N(8024535C);
|
||||
DisablePartnerAI(0);
|
||||
SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE);
|
||||
SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_GRAVITY)), FALSE);
|
||||
SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100)), TRUE);
|
||||
SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_100)), TRUE);
|
||||
SetNpcAnimation(NPC_PARTNER, 0x106);
|
||||
SI_VAR(1) = spawn N(80245A84);
|
||||
ContinueSpeech(-1, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000B));
|
||||
PlaySound(0x89);
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
N(func_80241BE0_95CDE0)();
|
||||
loop 5 {
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SI_VAR(1) += 1;
|
||||
SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
sleep 2;
|
||||
}
|
||||
SI_VAR(0) = 2883584;
|
||||
SI_VAR(0) += SI_SAVE_VAR(352);
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5), NPC_ANIM(chuck_quizmo, Palette_00, Anim_6), 0, SI_VAR(0));
|
||||
SetPlayerAnimation(ANIM_QUESTION);
|
||||
SI_VAR(0) = 2949120;
|
||||
SI_VAR(0) += SI_SAVE_VAR(352);
|
||||
PlaySound(0x8E);
|
||||
ShowChoice(SI_VAR(0));
|
||||
kill SI_VAR(1);
|
||||
StopSound(142);
|
||||
spawn N(80245AF8);
|
||||
sleep 15;
|
||||
PlaySound(0x8D);
|
||||
N(func_80241EE0_95D0E0)(SI_VAR(0));
|
||||
SI_ARRAY(4) = 0;
|
||||
N(func_802424D4_95D6D4)();
|
||||
sleep 40;
|
||||
N(func_80241B5C_95CD5C)();
|
||||
spawn {
|
||||
sleep 110;
|
||||
CloseChoice();
|
||||
SI_ARRAY(4) = 0;
|
||||
}
|
||||
if (SI_VAR(0) == 1) {
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_7));
|
||||
SI_ARRAY(4) = 1;
|
||||
spawn {
|
||||
N(func_80241EAC_95D0AC)(1);
|
||||
sleep 6;
|
||||
sleep 6;
|
||||
sleep 6;
|
||||
N(func_80241EAC_95D0AC)(2);
|
||||
}
|
||||
spawn {
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
}
|
||||
PlaySound(0x8A);
|
||||
N(func_80241F78_95D178)();
|
||||
spawn {
|
||||
sleep 15;
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SI_VAR(1) += 50;
|
||||
N(UnkCameraFunc)(0, 0, 83, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
SI_VAR(1) += -3;
|
||||
N(UnkCameraFunc)(0, 0, 58, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
SI_VAR(1) += 30;
|
||||
N(UnkCameraFunc)(0, 0, 93, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
}
|
||||
sleep 20;
|
||||
SI_VAR(1) = spawn N(80246798);
|
||||
SI_SAVE_VAR(352) += 1;
|
||||
if (SI_SAVE_VAR(352) > 63) {
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x0010));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_6));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5));
|
||||
SI_VAR(0) = 348;
|
||||
SI_VAR(1) = 3;
|
||||
await N(802451BC);
|
||||
AddStarPieces(1);
|
||||
N(func_80241EAC_95D0AC)(15);
|
||||
N(func_80241F60_95D160)();
|
||||
SetMessageValue(SI_SAVE_VAR(352), 0);
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0011));
|
||||
} else {
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000E));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_6));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5));
|
||||
SI_VAR(0) = 348;
|
||||
SI_VAR(1) = 1;
|
||||
await N(802451BC);
|
||||
AddStarPieces(1);
|
||||
N(func_80241EAC_95D0AC)(15);
|
||||
N(func_80241F60_95D160)();
|
||||
SetMessageValue(SI_SAVE_VAR(352), 0);
|
||||
if (SI_SAVE_VAR(352) == 1) {
|
||||
SetMessageString(2148844180, 1);
|
||||
} else {
|
||||
SetMessageString(2148844176, 1);
|
||||
}
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000F));
|
||||
}
|
||||
SI_VAR(0) = 1;
|
||||
} else {
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_9));
|
||||
SI_ARRAY(4) = 2;
|
||||
PlaySound(0x21D);
|
||||
PlaySound(0x8B);
|
||||
SI_VAR(1) = spawn N(80246848);
|
||||
GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4));
|
||||
PlayEffect(0x2B, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000D));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_A));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SI_VAR(0) = 0;
|
||||
}
|
||||
N(func_80241EE0_95D0E0)(-1);
|
||||
EnablePartnerAI();
|
||||
spawn {
|
||||
sleep 30;
|
||||
PlaySound(0x8F);
|
||||
}
|
||||
spawn {
|
||||
sleep 45;
|
||||
StopSound(137);
|
||||
}
|
||||
N(func_80241F94_95D194)();
|
||||
N(func_80241DF8_95CFF8)();
|
||||
await N(802452AC);
|
||||
spawn N(802455F4);
|
||||
N(UnkFunc29)();
|
||||
N(Set80151310_0)();
|
||||
SI_SAVE_FLAG(1793) = 0;
|
||||
});
|
||||
|
||||
Script N(80247628) = SCRIPT({
|
||||
N(func_802415AC_95C7AC)();
|
||||
@ -1150,17 +1157,15 @@ Script N(80247628) = SCRIPT({
|
||||
N(UnkFunc31)();
|
||||
});
|
||||
|
||||
Script N(8024769C) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, 0x8024DFC8),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1769), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerFlagBits, 4194304, 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802468F8)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerFlagBits, 4194304, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(8024769C) = SCRIPT({
|
||||
arr_use 0x8024DFC8; // TODO rawptr
|
||||
SI_SAVE_FLAG(1769) = 1;
|
||||
DisablePlayerPhysics(TRUE);
|
||||
SetPlayerFlagBits(4194304, 1);
|
||||
await N(802468F8);
|
||||
DisablePlayerPhysics(FALSE);
|
||||
SetPlayerFlagBits(4194304, 0);
|
||||
});
|
||||
|
||||
Script N(8024771C) = SCRIPT({
|
||||
N(GetNpcUnsafeOwner2)();
|
||||
@ -1234,13 +1239,11 @@ Script N(802477E8) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(8024792C) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802427BC_95D9BC), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(802477E8), 0x10, 0, N(D_8024DFF0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80242730_95D930), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(8024792C) = SCRIPT({
|
||||
N(func_802427BC_95D9BC)(SI_VAR(0));
|
||||
bind_padlock N(802477E8) 0x10 0 N(D_8024DFF0);
|
||||
N(func_80242730_95D930)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(8024797C) = SCRIPT({
|
||||
loop {
|
||||
@ -1300,15 +1303,13 @@ Script N(802479FC) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80247D20) = {
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), SI_VAR(11)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802427BC_95D9BC), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(802479FC), 0x10, 0, N(D_8024DFF0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80242730_95D930), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80247D20) = SCRIPT({
|
||||
SI_VAR(0) = SI_VAR(11);
|
||||
SI_VAR(1) = SI_VAR(2);
|
||||
N(func_802427BC_95D9BC)(SI_VAR(0));
|
||||
bind_padlock N(802479FC) 0x10 0 N(D_8024DFF0);
|
||||
N(func_80242730_95D930)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(80247D90) = SCRIPT({
|
||||
SI_VAR(12) = 0;
|
||||
@ -2306,8 +2307,8 @@ Script N(8024B664) = SCRIPT({
|
||||
NpcJump0(NPC_MOUSER1, 20, 0, -259, 4);
|
||||
});
|
||||
|
||||
// extra END_IF
|
||||
/*
|
||||
// Extraneous END_IF
|
||||
#ifdef NON_MATCHING
|
||||
Script N(8024B6B4) = SCRIPT({
|
||||
N(func_80243578_95E778)();
|
||||
func_802D2C14(1);
|
||||
@ -2323,11 +2324,8 @@ Script N(8024B6B4) = SCRIPT({
|
||||
STORY_PROGRESS = STORY_CH2_BOUGHT_SECRET_ITEMS;
|
||||
func_802D2C14(0);
|
||||
await N(8024B664);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
// *INDENT-OFF*
|
||||
#else
|
||||
Script N(8024B6B4) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80243578_95E778)),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 1),
|
||||
@ -2347,7 +2345,7 @@ SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(8024B7B0) = SCRIPT({
|
||||
if (SI_SAVE_FLAG(758) == 0) {
|
||||
|
@ -58,6 +58,6 @@ Vec4f N(triggerCoord_8024DD68) = { 120.0f, 0.0f, -43.0f, 0.0f };
|
||||
|
||||
Script N(8024DD78) = SCRIPT({
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 11;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_8024DD68);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 11;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_8024DD68);
|
||||
});
|
||||
|
@ -89,7 +89,18 @@ MapConfig N(config) = {
|
||||
.tattle = { MSG_dro_02_tattle },
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
// Extraneous END_CASE_MULTI
|
||||
#ifdef NON_MATCHING
|
||||
Script N(80243AF0) = SCRIPT({
|
||||
GetEntryID(SI_VAR(0));
|
||||
match SI_VAR(0) {
|
||||
2, 3 {}
|
||||
else {
|
||||
SetMusicTrack(0, SONG_DRY_DRY_OUTPOST, 0, 8);
|
||||
}
|
||||
}
|
||||
});
|
||||
#else
|
||||
Script N(80243AF0) = {
|
||||
SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)),
|
||||
@ -103,7 +114,7 @@ Script N(80243AF0) = {
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(80243B70) = SCRIPT({
|
||||
SetMusicTrack(0, SONG_TAKING_REST, 0, 8);
|
||||
@ -130,7 +141,7 @@ static s32 N(pad_3C3C) = {
|
||||
Script N(exitWalk_80243C40) = EXIT_WALK_SCRIPT(60, 0, "dro_01", 1);
|
||||
|
||||
Script N(80243C9C) = SCRIPT({
|
||||
bind N(exitWalk_80243C40) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80243C40) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(80243CC8) = SCRIPT({
|
||||
@ -201,7 +212,7 @@ Script N(main) = SCRIPT({
|
||||
goto 123;
|
||||
}
|
||||
SI_MAP_FLAG(0) = 0;
|
||||
bind N(80243CC8) to TRIGGER_WALL_PRESS_A 56;
|
||||
bind N(80243CC8) TRIGGER_WALL_PRESS_A 56;
|
||||
spawn {
|
||||
loop {
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
@ -416,8 +427,8 @@ Script N(80244C78) = SCRIPT({
|
||||
}
|
||||
MakeDoorAdvanced(4, N(openDoor_80244340), N(moveWalls_80244390), N(dropDoor_80244474), N(toggleVis_8024468C), 15, 16, 133, N(npcList_80244C64));
|
||||
if (STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) {
|
||||
bind N(8024486C) to TRIGGER_WALL_PRESS_A 8;
|
||||
bind N(80244A68) to TRIGGER_WALL_PRESS_A 10;
|
||||
bind N(8024486C) TRIGGER_WALL_PRESS_A 8;
|
||||
bind N(80244A68) TRIGGER_WALL_PRESS_A 10;
|
||||
}
|
||||
MakeDoorAdvanced(4101, N(openDoor_8024451C), N(moveWalls_8024454C), 0, N(toggleVis_80244600), 12, 13, 94, N(npcList_80244C70));
|
||||
SI_VAR(0) = 3;
|
||||
@ -834,209 +845,205 @@ Script N(80246470) = SCRIPT({
|
||||
await N(802462E4);
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80246520) = {
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, -1, 16),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524298),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1767), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524297),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524296),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1767), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, 1966093),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 11468804, 11468801, 0, 524300),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80244ED4)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1793), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(Set80151310_1)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkAlphaFunc)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80244F84)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePartnerAI, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, -4, 512, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 10, 512, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, -4, 328, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 10, 256, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, -4, 262),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(802456AC), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 11468804, 11468801, 0, 524299),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 137),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240A70_969C30)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 2883584),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), SI_SAVE_VAR(352)),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468805, 11468806, 0, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 65576),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 2949120),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), SI_SAVE_VAR(352)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 142),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_KILL_SCRIPT, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, StopSound, 142),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80245720)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 141),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D70_969F30), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241364_96A524)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 40),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802409EC_969BAC)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 110),
|
||||
SI_CMD(ScriptOpcode_CALL, CloseChoice),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 0),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468807),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 1),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D3C_969EFC), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D3C_969EFC), 2),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 540),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 138),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240E08_969FC8)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 50),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 83, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), -3),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 58, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 30),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkCameraFunc), 0, 0, 93, SI_VAR(0), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 68, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(802463C0), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_SAVE_VAR(352), 1),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_SAVE_VAR(352), 63),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524304),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468806),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468805),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 348),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 3),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80244DE4)),
|
||||
SI_CMD(ScriptOpcode_CALL, AddStarPieces, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D3C_969EFC), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240DF0_969FB0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageValue, SI_SAVE_VAR(352), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524305),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524302),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468806),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468805),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 348),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80244DE4)),
|
||||
SI_CMD(ScriptOpcode_CALL, AddStarPieces, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D3C_969EFC), 15),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240DF0_969FB0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageValue, SI_SAVE_VAR(352), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(352), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageString, &MessageSingular, 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMessageString, &MessagePlural, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 11468804, 11468801, 0, 524303),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468809),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(4), 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 541),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 139),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(80246470), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 43, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, -1, -1, 0, 524301),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 10, 11468810),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(1), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240D70_969F30), -1),
|
||||
SI_CMD(ScriptOpcode_CALL, EnablePartnerAI),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 143),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_CALL, StopSound, 137),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240E24_969FE4)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80240C88_969E48)),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80244ED4)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(8024521C)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(UnkFunc29)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(Set80151310_0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1793), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80246520) = SCRIPT({
|
||||
if (SI_SAVE_VAR(352) > 63) {
|
||||
SI_VAR(0) = 0;
|
||||
return;
|
||||
}
|
||||
GetPlayerPos(SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3));
|
||||
NpcFacePlayer(NPC_SELF, 16);
|
||||
if (SI_SAVE_VAR(352) == 63) {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000A));
|
||||
} else {
|
||||
if (SI_SAVE_FLAG(1767) == 1) {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0009));
|
||||
} else {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0008));
|
||||
SI_SAVE_FLAG(1767) = 1;
|
||||
}
|
||||
}
|
||||
ShowChoice(MESSAGE_ID(0x1E, 0x000D));
|
||||
if (SI_VAR(0) == 1) {
|
||||
ContinueSpeech(-1, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000C));
|
||||
await N(80244ED4);
|
||||
SI_VAR(0) = 0;
|
||||
return;
|
||||
}
|
||||
SI_SAVE_FLAG(1793) = 1;
|
||||
N(Set80151310_1)();
|
||||
N(UnkAlphaFunc)();
|
||||
spawn N(80244F84);
|
||||
DisablePartnerAI(0);
|
||||
SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE);
|
||||
SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_GRAVITY)), FALSE);
|
||||
SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100)), TRUE);
|
||||
SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_100)), TRUE);
|
||||
SetNpcAnimation(NPC_PARTNER, 0x106);
|
||||
SI_VAR(1) = spawn N(802456AC);
|
||||
ContinueSpeech(-1, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000B));
|
||||
PlaySound(0x89);
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
N(func_80240A70_969C30)();
|
||||
loop 5 {
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SI_VAR(1) += 1;
|
||||
SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
sleep 2;
|
||||
}
|
||||
SI_VAR(0) = 2883584;
|
||||
SI_VAR(0) += SI_SAVE_VAR(352);
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5), NPC_ANIM(chuck_quizmo, Palette_00, Anim_6), 0, SI_VAR(0));
|
||||
SetPlayerAnimation(ANIM_QUESTION);
|
||||
SI_VAR(0) = 2949120;
|
||||
SI_VAR(0) += SI_SAVE_VAR(352);
|
||||
PlaySound(0x8E);
|
||||
ShowChoice(SI_VAR(0));
|
||||
kill SI_VAR(1);
|
||||
StopSound(142);
|
||||
spawn N(80245720);
|
||||
sleep 15;
|
||||
PlaySound(0x8D);
|
||||
N(func_80240D70_969F30)(SI_VAR(0));
|
||||
SI_ARRAY(4) = 0;
|
||||
N(func_80241364_96A524)();
|
||||
sleep 40;
|
||||
N(func_802409EC_969BAC)();
|
||||
spawn {
|
||||
sleep 110;
|
||||
CloseChoice();
|
||||
SI_ARRAY(4) = 0;
|
||||
}
|
||||
if (SI_VAR(0) == 1) {
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_7));
|
||||
SI_ARRAY(4) = 1;
|
||||
spawn {
|
||||
N(func_80240D3C_969EFC)(1);
|
||||
sleep 6;
|
||||
sleep 6;
|
||||
sleep 6;
|
||||
N(func_80240D3C_969EFC)(2);
|
||||
}
|
||||
spawn {
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
sleep 6;
|
||||
PlaySound(0x21C);
|
||||
}
|
||||
PlaySound(0x8A);
|
||||
N(func_80240E08_969FC8)();
|
||||
spawn {
|
||||
sleep 15;
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
SI_VAR(1) += 50;
|
||||
N(UnkCameraFunc)(0, 0, 83, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
SI_VAR(1) += -3;
|
||||
N(UnkCameraFunc)(0, 0, 58, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
SI_VAR(1) += 30;
|
||||
N(UnkCameraFunc)(0, 0, 93, SI_VAR(0), SI_VAR(2));
|
||||
PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
}
|
||||
sleep 20;
|
||||
SI_VAR(1) = spawn N(802463C0);
|
||||
SI_SAVE_VAR(352) += 1;
|
||||
if (SI_SAVE_VAR(352) > 63) {
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x0010));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_6));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5));
|
||||
SI_VAR(0) = 348;
|
||||
SI_VAR(1) = 3;
|
||||
await N(80244DE4);
|
||||
AddStarPieces(1);
|
||||
N(func_80240D3C_969EFC)(15);
|
||||
N(func_80240DF0_969FB0)();
|
||||
SetMessageValue(SI_SAVE_VAR(352), 0);
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x0011));
|
||||
} else {
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000E));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_6));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_5));
|
||||
SI_VAR(0) = 348;
|
||||
SI_VAR(1) = 1;
|
||||
await N(80244DE4);
|
||||
AddStarPieces(1);
|
||||
N(func_80240D3C_969EFC)(15);
|
||||
N(func_80240DF0_969FB0)();
|
||||
SetMessageValue(SI_SAVE_VAR(352), 0);
|
||||
if (SI_SAVE_VAR(352) == 1) {
|
||||
SetMessageString(2148844180, 1);
|
||||
} else {
|
||||
SetMessageString(2148844176, 1);
|
||||
}
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(chuck_quizmo, Palette_00, Anim_4), NPC_ANIM(chuck_quizmo, Palette_00, Anim_1), 0, MESSAGE_ID(0x08, 0x000F));
|
||||
}
|
||||
SI_VAR(0) = 1;
|
||||
} else {
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_9));
|
||||
SI_ARRAY(4) = 2;
|
||||
PlaySound(0x21D);
|
||||
PlaySound(0x8B);
|
||||
SI_VAR(1) = spawn N(80246470);
|
||||
GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4));
|
||||
PlayEffect(0x2B, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000D));
|
||||
SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_A));
|
||||
loop {
|
||||
SI_VAR(0) = does_script_exist SI_VAR(1);
|
||||
if (SI_VAR(0) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SI_VAR(0) = 0;
|
||||
}
|
||||
N(func_80240D70_969F30)(-1);
|
||||
EnablePartnerAI();
|
||||
spawn {
|
||||
sleep 30;
|
||||
PlaySound(0x8F);
|
||||
}
|
||||
spawn {
|
||||
sleep 45;
|
||||
StopSound(137);
|
||||
}
|
||||
N(func_80240E24_969FE4)();
|
||||
N(func_80240C88_969E48)();
|
||||
await N(80244ED4);
|
||||
spawn N(8024521C);
|
||||
N(UnkFunc29)();
|
||||
N(Set80151310_0)();
|
||||
SI_SAVE_FLAG(1793) = 0;
|
||||
});
|
||||
|
||||
Script N(80247250) = SCRIPT({
|
||||
N(func_8024043C_9695FC)();
|
||||
@ -1048,17 +1055,15 @@ Script N(80247250) = SCRIPT({
|
||||
N(UnkFunc31)();
|
||||
});
|
||||
|
||||
Script N(802472C4) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, &gPauseMenuTargetPosX),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(1769), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerFlagBits, 4194304, 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80246520)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerFlagBits, 4194304, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(802472C4) = SCRIPT({
|
||||
arr_use gPauseMenuTargetPosX;
|
||||
SI_SAVE_FLAG(1769) = 1;
|
||||
DisablePlayerPhysics(TRUE);
|
||||
SetPlayerFlagBits(4194304, 1);
|
||||
await N(80246520);
|
||||
DisablePlayerPhysics(FALSE);
|
||||
SetPlayerFlagBits(4194304, 0);
|
||||
});
|
||||
|
||||
Script N(80247344) = SCRIPT({
|
||||
N(GetNpcUnsafeOwner2)();
|
||||
@ -1286,144 +1291,142 @@ Script N(npcAI_80247A90) = SCRIPT({
|
||||
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80247AA0) = {
|
||||
SI_CMD(ScriptOpcode_USE_ARRAY, N(D_8024EFD0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(9), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 4, SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_ARRAY(4), 60),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_ARRAY(6), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 4, 513, 0),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 720, 0, 60, 0),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcRotation, 4, 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_VAR(0), 360),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), -360),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CASE_RANGE, 90, 270),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(2), 12189697),
|
||||
SI_CMD(ScriptOpcode_CASE_ELSE),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(2), 12189698),
|
||||
SI_CMD(ScriptOpcode_END_MATCH),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcRotation, 4, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 12189706),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 200),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 12189705),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 40),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 12189706),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 75),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 12189707),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 60),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 4, 514, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), SI_ARRAY(5)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 25),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 79, 0, SI_ARRAY(4), SI_VAR(0), SI_ARRAY(6), 1, -1, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_ARRAY(8), SI_VAR(15)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D7B10, SI_ARRAY(8)),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802414C0_96A680)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, InterpPlayerYaw, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802416FC_96A8BC)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_ARRAY(9), 2),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 9),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 4),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 4),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, -1342177251),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_GE, SI_ARRAY(9), 3),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 9),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_8024303C_96C1FC)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80243068_96C228)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_GE, SI_ARRAY(9), 10),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 516),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_GE, SI_ARRAY(9), 11),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 517),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_ARRAY(9), 13),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 65567),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPlayerPos, SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241874_96AA34)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802415CC_96A78C)),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80247AA0) = SCRIPT({
|
||||
arr_use N(D_8024EFD0);
|
||||
SI_ARRAY(9) = 0;
|
||||
GetNpcPos(NPC_WORLD_MERLEE, SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6));
|
||||
SI_ARRAY(4) += 60;
|
||||
SI_ARRAY(6) += 0;
|
||||
PlaySoundAtNpc(NPC_WORLD_MERLEE, 513, 0);
|
||||
spawn {
|
||||
MakeLerp(720, 0, 60, 0);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
SetNpcRotation(NPC_WORLD_MERLEE, 0, SI_VAR(0), 0);
|
||||
if (SI_VAR(0) > 360) {
|
||||
SI_VAR(0) += -360;
|
||||
}
|
||||
match SI_VAR(0) {
|
||||
90 ... 270 {
|
||||
SI_VAR(2) = 12189697;
|
||||
}
|
||||
else {
|
||||
SI_VAR(2) = 12189698;
|
||||
}
|
||||
}
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, SI_VAR(2));
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
SetNpcRotation(NPC_WORLD_MERLEE, 0, 0, 0);
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, NPC_ANIM(world_merlee, Palette_00, Anim_A));
|
||||
sleep 200;
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, NPC_ANIM(world_merlee, Palette_00, Anim_9));
|
||||
sleep 40;
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, NPC_ANIM(world_merlee, Palette_00, Anim_A));
|
||||
sleep 75;
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, NPC_ANIM(world_merlee, Palette_00, Anim_B));
|
||||
}
|
||||
sleep 60;
|
||||
PlaySoundAtNpc(NPC_WORLD_MERLEE, 514, 0);
|
||||
SI_VAR(0) = SI_ARRAY(5);
|
||||
SI_VAR(0) += 25;
|
||||
PlayEffect(0x4F, 0, SI_ARRAY(4), SI_VAR(0), SI_ARRAY(6), 1, -1, 0, 0, 0, 0, 0, 0, 0);
|
||||
SI_ARRAY(8) = SI_VAR(15);
|
||||
spawn {
|
||||
sleep 30;
|
||||
func_802D7B10(SI_ARRAY(8));
|
||||
}
|
||||
N(func_802414C0_96A680)();
|
||||
DisablePlayerPhysics(TRUE);
|
||||
InterpPlayerYaw(0, 0);
|
||||
N(func_802416FC_96A8BC)();
|
||||
spawn {
|
||||
loop {
|
||||
if (SI_ARRAY(9) == 2) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
PlaySound(-1342177251);
|
||||
sleep 10;
|
||||
PlaySound(-1342177251);
|
||||
sleep 9;
|
||||
PlaySound(-1342177251);
|
||||
sleep 4;
|
||||
PlaySound(-1342177251);
|
||||
sleep 4;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
sleep 2;
|
||||
PlaySound(-1342177251);
|
||||
sleep 2;
|
||||
PlaySound(-1342177251);
|
||||
sleep 2;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
sleep 2;
|
||||
PlaySound(-1342177251);
|
||||
sleep 6;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
sleep 3;
|
||||
PlaySound(-1342177251);
|
||||
}
|
||||
spawn {
|
||||
loop {
|
||||
if (SI_ARRAY(9) >= 3) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
sleep 9;
|
||||
N(func_8024303C_96C1FC)();
|
||||
sleep 2;
|
||||
N(func_80243068_96C228)();
|
||||
loop {
|
||||
if (SI_ARRAY(9) >= 10) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
sleep 3;
|
||||
PlaySound(516);
|
||||
loop {
|
||||
if (SI_ARRAY(9) >= 11) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
sleep 15;
|
||||
PlaySound(517);
|
||||
}
|
||||
loop {
|
||||
if (SI_ARRAY(9) == 13) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
SetPlayerPos(SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6));
|
||||
SetPlayerAnimation(ANIM_GOT_ITEM);
|
||||
sleep 1;
|
||||
SetPlayerPos(SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6));
|
||||
sleep 1;
|
||||
DisablePlayerPhysics(FALSE);
|
||||
N(func_80241874_96AA34)();
|
||||
spawn {
|
||||
N(func_802415CC_96A78C)();
|
||||
}
|
||||
});
|
||||
|
||||
Script N(802481D8) = SCRIPT({
|
||||
GetNpcPos(NPC_WORLD_MERLEE, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
@ -1442,81 +1445,77 @@ Script N(802482A8) = SCRIPT({
|
||||
WaitForCam(0, 1.0);
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(802482F8) = {
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802481D8)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(348), 8),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(536), 1),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(759), 0),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 3),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 12189703, 12189700, 0, 852188),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 39),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 1),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80244DE4)),
|
||||
SI_CMD(ScriptOpcode_CALL, AddKeyItem, 39),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_FLAG(759), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802482A8)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 12189703, 12189700, 0, 852182),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, 1966097),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 12189703, 12189700, 0, 852183),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802482A8)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 12189703, 12189700, 0, 852184),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowCoinCounter, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowChoice, 1966104),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowCoinCounter, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 3),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 12189703, 12189700, 0, 852183),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802482A8)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241394_96A554), SI_VAR(0), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 12189703, 12189700, 0, 852185),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802482A8)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, ContinueSpeech, -1, 12189703, 12189700, 0, 852186),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, 124, 0, 8),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePartnerAI, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, -4, 262),
|
||||
SI_CMD(ScriptOpcode_SPAWN_GET_ID, N(80247AA0), SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SCRIPT_EXISTS, SI_VAR(9), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 60),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 12189700),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayerMoveTo, -100, -370, 8),
|
||||
SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, -1, 12189703, 12189700, 0, 852187),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80243AF0)),
|
||||
SI_CMD(ScriptOpcode_CALL, EnablePartnerAI),
|
||||
SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802482A8)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(802482F8) = SCRIPT({
|
||||
func_802D2C14(1);
|
||||
await N(802481D8);
|
||||
SI_VAR(0) = 0;
|
||||
if (SI_SAVE_VAR(348) == 8) {
|
||||
SI_VAR(0) += 1;
|
||||
}
|
||||
if (SI_SAVE_FLAG(536) == 1) {
|
||||
SI_VAR(0) += 1;
|
||||
}
|
||||
if (SI_SAVE_FLAG(759) == 0) {
|
||||
SI_VAR(0) += 1;
|
||||
}
|
||||
if (SI_VAR(0) == 3) {
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00DC));
|
||||
SI_VAR(0) = 39;
|
||||
SI_VAR(1) = 1;
|
||||
await N(80244DE4);
|
||||
AddKeyItem(ITEM_CRYSTAL_BALL);
|
||||
SI_SAVE_FLAG(759) = 1;
|
||||
sleep 20;
|
||||
func_802D2C14(0);
|
||||
await N(802482A8);
|
||||
return;
|
||||
}
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00D6));
|
||||
ShowChoice(MESSAGE_ID(0x1E, 0x0011));
|
||||
if (SI_VAR(0) != 0) {
|
||||
ContinueSpeech(-1, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00D7));
|
||||
func_802D2C14(0);
|
||||
await N(802482A8);
|
||||
return;
|
||||
}
|
||||
ContinueSpeech(-1, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00D8));
|
||||
ShowCoinCounter(1);
|
||||
ShowChoice(MESSAGE_ID(0x1E, 0x0018));
|
||||
ShowCoinCounter(0);
|
||||
if (SI_VAR(0) == 3) {
|
||||
ContinueSpeech(-1, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00D7));
|
||||
func_802D2C14(0);
|
||||
await N(802482A8);
|
||||
return;
|
||||
}
|
||||
N(func_80241394_96A554)(SI_VAR(0), SI_VAR(1));
|
||||
if (SI_VAR(1) != 0) {
|
||||
ContinueSpeech(-1, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00D9));
|
||||
func_802D2C14(0);
|
||||
await N(802482A8);
|
||||
return;
|
||||
}
|
||||
ContinueSpeech(-1, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00DA));
|
||||
SetMusicTrack(0, SONG_MERLEE_SPELL, 0, 8);
|
||||
DisablePartnerAI(0);
|
||||
SetNpcAnimation(NPC_PARTNER, 0x106);
|
||||
SI_VAR(9) = spawn N(80247AA0);
|
||||
loop {
|
||||
SI_VAR(1) = does_script_exist SI_VAR(9);
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
sleep 60;
|
||||
SetNpcAnimation(NPC_WORLD_MERLEE, NPC_ANIM(world_merlee, Palette_00, Anim_4));
|
||||
PlayerMoveTo(-100, -370, 8);
|
||||
SpeakToPlayer(NPC_SELF, NPC_ANIM(world_merlee, Palette_00, Anim_7), NPC_ANIM(world_merlee, Palette_00, Anim_4), 0, MESSAGE_ID(0x0D, 0x00DB));
|
||||
spawn N(80243AF0);
|
||||
EnablePartnerAI();
|
||||
func_802D2C14(0);
|
||||
await N(802482A8);
|
||||
});
|
||||
|
||||
NpcSettings N(npcSettings_80248754) = {
|
||||
.height = 32,
|
||||
@ -1559,13 +1558,11 @@ Script N(80248788) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(802488CC) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_8024334C_96C50C), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80248788), 0x10, 0, N(D_8024F080), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802432C0_96C480), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(802488CC) = SCRIPT({
|
||||
N(func_8024334C_96C50C)(SI_VAR(0));
|
||||
bind_padlock N(80248788) 0x10 0 N(D_8024F080);
|
||||
N(func_802432C0_96C480)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(8024891C) = SCRIPT({
|
||||
SI_VAR(9) = SI_VAR(1);
|
||||
@ -1590,13 +1587,11 @@ Script N(8024891C) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80248A50) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802433E8_96C5A8), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(8024891C), 0x10, 0, N(D_8024F248), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802432C0_96C480), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80248A50) = SCRIPT({
|
||||
N(func_802433E8_96C5A8)(SI_VAR(0));
|
||||
bind_padlock N(8024891C) 0x10 0 N(D_8024F248);
|
||||
N(func_802432C0_96C480)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Gfx N(D_8024A3B8_973578)[];
|
||||
s32 N(D_80248DD8_971F98)[];
|
||||
@ -2131,15 +2126,13 @@ Script N(8024B20C) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(8024B530) = {
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), SI_VAR(11)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_8024334C_96C50C), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(8024B20C), 0x10, 0, N(D_8024F080), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802432C0_96C480), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(8024B530) = SCRIPT({
|
||||
SI_VAR(0) = SI_VAR(11);
|
||||
SI_VAR(1) = SI_VAR(2);
|
||||
N(func_8024334C_96C50C)(SI_VAR(0));
|
||||
bind_padlock N(8024B20C) 0x10 0 N(D_8024F080);
|
||||
N(func_802432C0_96C480)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(8024B5A0) = SCRIPT({
|
||||
SI_VAR(12) = 0;
|
||||
|
@ -204,12 +204,12 @@ Script N(exitWalk_80241F48) = EXIT_WALK_SCRIPT(60, 6, "flo_08", 0);
|
||||
const s32 N(pad_XXXX)[] = { 0, 0};
|
||||
|
||||
Script N(80241FA4) = SCRIPT({
|
||||
bind N(exitWalk_80241D7C) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_80241DD8) to TRIGGER_FLOOR_ABOVE 9;
|
||||
bind N(exitWalk_80241E34) to TRIGGER_FLOOR_ABOVE 13;
|
||||
bind N(exitWalk_80241E90) to TRIGGER_FLOOR_ABOVE 17;
|
||||
bind N(exitWalk_80241EEC) to TRIGGER_FLOOR_ABOVE 21;
|
||||
bind N(exitWalk_80241F48) to TRIGGER_FLOOR_ABOVE 25;
|
||||
bind N(exitWalk_80241D7C) TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_80241DD8) TRIGGER_FLOOR_ABOVE 9;
|
||||
bind N(exitWalk_80241E34) TRIGGER_FLOOR_ABOVE 13;
|
||||
bind N(exitWalk_80241E90) TRIGGER_FLOOR_ABOVE 17;
|
||||
bind N(exitWalk_80241EEC) TRIGGER_FLOOR_ABOVE 21;
|
||||
bind N(exitWalk_80241F48) TRIGGER_FLOOR_ABOVE 25;
|
||||
});
|
||||
|
||||
Script N(enterWalk_8024205C) = SCRIPT({
|
||||
@ -229,7 +229,7 @@ Script N(enterWalk_8024205C) = SCRIPT({
|
||||
spawn N(80241FA4);
|
||||
}
|
||||
}
|
||||
1..6 {
|
||||
1 ... 6 {
|
||||
SI_VAR(0) = N(80241FA4);
|
||||
spawn EnterWalk;
|
||||
}
|
||||
@ -258,7 +258,7 @@ Script N(enterWalk_8024205C) = SCRIPT({
|
||||
}
|
||||
}
|
||||
}
|
||||
bind N(80242FCC) to TRIGGER_WALL_PRESS_A 2;
|
||||
bind N(80242FCC) TRIGGER_WALL_PRESS_A 2;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -2016,32 +2016,28 @@ Script N(80248D3C) = SCRIPT({
|
||||
N(func_802413BC_C9F2DC)();
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80248E30) = {
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 55),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(0), 54),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1371), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1372), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeItemEntity, 89, -83, 0, 87, 1, 0),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeItemEntity, 88, -83, 0, 87, 1, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_VAR(11), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80248D3C), 0x10, 0, N(itemList_80248598), 0, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80248E30) = SCRIPT({
|
||||
if (STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) {
|
||||
loop {
|
||||
sleep 1;
|
||||
if (STORY_PROGRESS == STORY_CH6_WISTERWOOD_GAVE_HINT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (SI_SAVE_FLAG(1371) == 1) {
|
||||
if (SI_SAVE_FLAG(1372) == 0) {
|
||||
MakeItemEntity(ITEM_FERTILE_SOIL, -83, 0, 87, 1, 0);
|
||||
} else {
|
||||
MakeItemEntity(ITEM_MAGICAL_BEAN, -83, 0, 87, 1, 0);
|
||||
}
|
||||
SI_MAP_VAR(11) = SI_VAR(0);
|
||||
}
|
||||
bind_padlock N(80248D3C) 0x10 0 N(itemList_80248598);
|
||||
}
|
||||
});
|
||||
|
||||
Script N(80248F48) = SCRIPT({
|
||||
bind N(802477EC) to TRIGGER_FLOOR_TOUCH 46;
|
||||
bind N(802477EC) TRIGGER_FLOOR_TOUCH 46;
|
||||
EnableGroup(121, 1);
|
||||
EnableGroup(80, 1);
|
||||
match STORY_PROGRESS {
|
||||
|
@ -111,8 +111,8 @@ Script N(exitWalk_80240B2C) = EXIT_WALK_SCRIPT(60, 0, "flo_09", 1);
|
||||
Script N(exitWalk_80240B88) = EXIT_WALK_SCRIPT(60, 1, "flo_22", 0);
|
||||
|
||||
Script N(80240BE4) = SCRIPT({
|
||||
bind N(exitWalk_80240B2C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240B88) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80240B2C) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240B88) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -481,325 +481,309 @@ Script N(hit_80242138) = SCRIPT({
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(idle_8024219C) = {
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(10), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(23), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, IsPlayerWithin, SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetCurrentPartner, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(9), 9),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(14), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(23), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 2, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 2, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(23), 1),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_MAP_VAR(10), 0),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 44),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 4),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 10),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 2, 610, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowEmote, 2, 0, 0, SI_VAR(1), 1, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 2, 802, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 2, 3080465),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1367), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 2, 0, -50, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(23), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1367), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 2, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80240F6C)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 2, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 2, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(23), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 2, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 2, 801, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 2, 3080464),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 30, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 60),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_VAR(10), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_MAP_VAR(10), 0),
|
||||
SI_CMD(ScriptOpcode_SUB, SI_MAP_VAR(10), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(idle_8024219C) = SCRIPT({
|
||||
loop {
|
||||
if (SI_MAP_VAR(10) == 0) {
|
||||
if (SI_AREA_FLAG(23) == 1) {
|
||||
goto 0;
|
||||
}
|
||||
SI_VAR(3) = 1;
|
||||
} else {
|
||||
0:
|
||||
GetNpcPos(NPC_MONTY_MOLE0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3));
|
||||
}
|
||||
GetCurrentPartner(SI_VAR(9));
|
||||
if (SI_VAR(9) == 9) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_MAP_VAR(14) == 1) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_VAR(3) == 1) {
|
||||
if (SI_AREA_FLAG(23) == 0) {
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE0, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
NpcFacePlayer(NPC_MONTY_MOLE0, 1);
|
||||
sleep 1;
|
||||
SI_AREA_FLAG(23) = 1;
|
||||
if (SI_MAP_VAR(10) != 0) {
|
||||
if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) {
|
||||
SI_VAR(1) = 4;
|
||||
} else {
|
||||
SI_VAR(1) = 10;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_UNKNOWN_262, 0);
|
||||
ShowEmote(2, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0);
|
||||
sleep SI_VAR(1);
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_MOLE_DIG, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM(monty_mole, Palette_01, Anim_11));
|
||||
sleep 20;
|
||||
if (SI_SAVE_FLAG(1367) == 0) {
|
||||
SetNpcPos(NPC_MONTY_MOLE0, 0, -50, 0);
|
||||
}
|
||||
sleep 45;
|
||||
}
|
||||
} else {
|
||||
if (SI_AREA_FLAG(23) == 1) {
|
||||
if (SI_SAVE_FLAG(1367) == 0) {
|
||||
RandInt(2, SI_VAR(0));
|
||||
SI_VAR(0) += 1;
|
||||
buf_use N(intTable_80240F6C);
|
||||
loop SI_VAR(0) {
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3);
|
||||
}
|
||||
SetNpcPos(NPC_MONTY_MOLE0, SI_VAR(1), SI_VAR(2), SI_VAR(3));
|
||||
}
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE0, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
SI_AREA_FLAG(23) = 0;
|
||||
NpcFacePlayer(NPC_MONTY_MOLE0, 1);
|
||||
sleep 1;
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_MOLE_SURFACE, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM(monty_mole, Palette_01, Anim_10));
|
||||
sleep 10;
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE);
|
||||
RandInt(30, SI_VAR(0));
|
||||
SI_VAR(0) += 60;
|
||||
SI_MAP_VAR(10) = SI_VAR(0);
|
||||
} else {
|
||||
if (SI_MAP_VAR(10) > 0) {
|
||||
SI_MAP_VAR(10) -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(idle_80242618) = {
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(11), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(24), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, IsPlayerWithin, SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetCurrentPartner, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(9), 9),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(14), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(24), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 3, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 3, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(24), 1),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_MAP_VAR(11), 0),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 44),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 4),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 10),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 3, 610, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowEmote, 3, 0, 0, SI_VAR(1), 1, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 3, 802, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 3, 3080465),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1368), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 3, 0, -50, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(24), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1368), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 2, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80240F90)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 3, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 3, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(24), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 3, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 3, 801, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 3, 3080464),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 35, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 55),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_VAR(11), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_MAP_VAR(11), 0),
|
||||
SI_CMD(ScriptOpcode_SUB, SI_MAP_VAR(11), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(idle_80242618) = SCRIPT({
|
||||
loop {
|
||||
if (SI_MAP_VAR(11) == 0) {
|
||||
if (SI_AREA_FLAG(24) == 1) {
|
||||
goto 0;
|
||||
}
|
||||
SI_VAR(3) = 1;
|
||||
} else {
|
||||
0:
|
||||
GetNpcPos(NPC_MONTY_MOLE1, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3));
|
||||
}
|
||||
GetCurrentPartner(SI_VAR(9));
|
||||
if (SI_VAR(9) == 9) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_MAP_VAR(14) == 1) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_VAR(3) == 1) {
|
||||
if (SI_AREA_FLAG(24) == 0) {
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE1, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
NpcFacePlayer(NPC_MONTY_MOLE1, 1);
|
||||
sleep 1;
|
||||
SI_AREA_FLAG(24) = 1;
|
||||
if (SI_MAP_VAR(11) != 0) {
|
||||
if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) {
|
||||
SI_VAR(1) = 4;
|
||||
} else {
|
||||
SI_VAR(1) = 10;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_UNKNOWN_262, 0);
|
||||
ShowEmote(3, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0);
|
||||
sleep SI_VAR(1);
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_MOLE_DIG, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM(monty_mole, Palette_01, Anim_11));
|
||||
sleep 20;
|
||||
if (SI_SAVE_FLAG(1368) == 0) {
|
||||
SetNpcPos(NPC_MONTY_MOLE1, 0, -50, 0);
|
||||
}
|
||||
sleep 45;
|
||||
}
|
||||
} else {
|
||||
if (SI_AREA_FLAG(24) == 1) {
|
||||
if (SI_SAVE_FLAG(1368) == 0) {
|
||||
RandInt(2, SI_VAR(0));
|
||||
SI_VAR(0) += 1;
|
||||
buf_use N(intTable_80240F90);
|
||||
loop SI_VAR(0) {
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3);
|
||||
}
|
||||
SetNpcPos(NPC_MONTY_MOLE1, SI_VAR(1), SI_VAR(2), SI_VAR(3));
|
||||
}
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE1, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
SI_AREA_FLAG(24) = 0;
|
||||
NpcFacePlayer(NPC_MONTY_MOLE1, 1);
|
||||
sleep 1;
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_MOLE_SURFACE, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM(monty_mole, Palette_01, Anim_10));
|
||||
sleep 10;
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE);
|
||||
RandInt(35, SI_VAR(0));
|
||||
SI_VAR(0) += 55;
|
||||
SI_MAP_VAR(11) = SI_VAR(0);
|
||||
} else {
|
||||
if (SI_MAP_VAR(11) > 0) {
|
||||
SI_MAP_VAR(11) -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(idle_80242A94) = {
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(12), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(25), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, IsPlayerWithin, SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetCurrentPartner, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(9), 9),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(14), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(25), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 4, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 4, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(25), 1),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_MAP_VAR(12), 0),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 44),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 4),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 10),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 4, 610, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowEmote, 4, 0, 0, SI_VAR(1), 1, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 4, 802, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 3080465),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1369), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 4, 0, -50, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(25), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1369), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 2, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80240FB4)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 4, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 4, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(25), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 4, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 4, 801, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 4, 3080464),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 40, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 50),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_VAR(12), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_MAP_VAR(12), 0),
|
||||
SI_CMD(ScriptOpcode_SUB, SI_MAP_VAR(12), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(idle_80242A94) = SCRIPT({
|
||||
loop {
|
||||
if (SI_MAP_VAR(12) == 0) {
|
||||
if (SI_AREA_FLAG(25) == 1) {
|
||||
goto 0;
|
||||
}
|
||||
SI_VAR(3) = 1;
|
||||
} else {
|
||||
0:
|
||||
GetNpcPos(NPC_MONTY_MOLE2, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3));
|
||||
}
|
||||
GetCurrentPartner(SI_VAR(9));
|
||||
if (SI_VAR(9) == 9) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_MAP_VAR(14) == 1) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_VAR(3) == 1) {
|
||||
if (SI_AREA_FLAG(25) == 0) {
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
NpcFacePlayer(NPC_MONTY_MOLE2, 1);
|
||||
sleep 1;
|
||||
SI_AREA_FLAG(25) = 1;
|
||||
if (SI_MAP_VAR(12) != 0) {
|
||||
if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) {
|
||||
SI_VAR(1) = 4;
|
||||
} else {
|
||||
SI_VAR(1) = 10;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_UNKNOWN_262, 0);
|
||||
ShowEmote(4, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0);
|
||||
sleep SI_VAR(1);
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_MOLE_DIG, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM(monty_mole, Palette_01, Anim_11));
|
||||
sleep 20;
|
||||
if (SI_SAVE_FLAG(1369) == 0) {
|
||||
SetNpcPos(NPC_MONTY_MOLE2, 0, -50, 0);
|
||||
}
|
||||
sleep 45;
|
||||
}
|
||||
} else {
|
||||
if (SI_AREA_FLAG(25) == 1) {
|
||||
if (SI_SAVE_FLAG(1369) == 0) {
|
||||
RandInt(2, SI_VAR(0));
|
||||
SI_VAR(0) += 1;
|
||||
buf_use N(intTable_80240FB4);
|
||||
loop SI_VAR(0) {
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3);
|
||||
}
|
||||
SetNpcPos(NPC_MONTY_MOLE2, SI_VAR(1), SI_VAR(2), SI_VAR(3));
|
||||
}
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
SI_AREA_FLAG(25) = 0;
|
||||
NpcFacePlayer(NPC_MONTY_MOLE2, 1);
|
||||
sleep 1;
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_MOLE_SURFACE, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM(monty_mole, Palette_01, Anim_10));
|
||||
sleep 10;
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE);
|
||||
RandInt(40, SI_VAR(0));
|
||||
SI_VAR(0) += 50;
|
||||
SI_MAP_VAR(12) = SI_VAR(0);
|
||||
} else {
|
||||
if (SI_MAP_VAR(12) > 0) {
|
||||
SI_MAP_VAR(12) -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(idle_80242F10) = {
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(13), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(26), 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, GetNpcPos, 5, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, IsPlayerWithin, SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, GetCurrentPartner, SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(9), 9),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_VAR(14), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(26), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 5, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 5, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(26), 1),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_MAP_VAR(13), 0),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 44),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 4),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 10),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 5, 610, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShowEmote, 5, 0, 0, SI_VAR(1), 1, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 5, 802, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 5, 3080465),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1370), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 5, 0, -50, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 45),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(26), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1370), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 2, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80240FD8)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 5, SI_VAR(1), SI_VAR(2), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcFlagBits, 5, 32840, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_AREA_FLAG(26), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcFacePlayer, 5, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 5, 801, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcAnimation, 5, 3080464),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetSelfEnemyFlagBits, 386924544, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 45, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 45),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_VAR(13), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_MAP_VAR(13), 0),
|
||||
SI_CMD(ScriptOpcode_SUB, SI_MAP_VAR(13), 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(idle_80242F10) = SCRIPT({
|
||||
loop {
|
||||
if (SI_MAP_VAR(13) == 0) {
|
||||
if (SI_AREA_FLAG(26) == 1) {
|
||||
goto 0;
|
||||
}
|
||||
SI_VAR(3) = 1;
|
||||
} else {
|
||||
0:
|
||||
GetNpcPos(NPC_MONTY_MOLE3, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3));
|
||||
}
|
||||
GetCurrentPartner(SI_VAR(9));
|
||||
if (SI_VAR(9) == 9) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_MAP_VAR(14) == 1) {
|
||||
SI_VAR(3) = 0;
|
||||
}
|
||||
if (SI_VAR(3) == 1) {
|
||||
if (SI_AREA_FLAG(26) == 0) {
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
NpcFacePlayer(NPC_MONTY_MOLE3, 1);
|
||||
sleep 1;
|
||||
SI_AREA_FLAG(26) = 1;
|
||||
if (SI_MAP_VAR(13) != 0) {
|
||||
if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) {
|
||||
SI_VAR(1) = 4;
|
||||
} else {
|
||||
SI_VAR(1) = 10;
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_UNKNOWN_262, 0);
|
||||
ShowEmote(5, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0);
|
||||
sleep SI_VAR(1);
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
|
||||
}
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_MOLE_DIG, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM(monty_mole, Palette_01, Anim_11));
|
||||
sleep 20;
|
||||
if (SI_SAVE_FLAG(1370) == 0) {
|
||||
SetNpcPos(NPC_MONTY_MOLE3, 0, -50, 0);
|
||||
}
|
||||
sleep 45;
|
||||
}
|
||||
} else {
|
||||
if (SI_AREA_FLAG(26) == 1) {
|
||||
if (SI_SAVE_FLAG(1370) == 0) {
|
||||
RandInt(2, SI_VAR(0));
|
||||
SI_VAR(0) += 1;
|
||||
buf_use N(intTable_80240FD8);
|
||||
loop SI_VAR(0) {
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3);
|
||||
}
|
||||
SetNpcPos(NPC_MONTY_MOLE3, SI_VAR(1), SI_VAR(2), SI_VAR(3));
|
||||
}
|
||||
SetNpcFlagBits(NPC_MONTY_MOLE3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE);
|
||||
SI_AREA_FLAG(26) = 0;
|
||||
NpcFacePlayer(NPC_MONTY_MOLE3, 1);
|
||||
sleep 1;
|
||||
PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_MOLE_SURFACE, 0);
|
||||
SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM(monty_mole, Palette_01, Anim_10));
|
||||
sleep 10;
|
||||
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE);
|
||||
RandInt(45, SI_VAR(0));
|
||||
SI_VAR(0) += 45;
|
||||
SI_MAP_VAR(13) = SI_VAR(0);
|
||||
} else {
|
||||
if (SI_MAP_VAR(13) > 0) {
|
||||
SI_MAP_VAR(13) -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
});
|
||||
|
||||
Script N(init_8024338C) = SCRIPT({
|
||||
BindNpcHit(-1, N(hit_80242138));
|
||||
@ -1199,8 +1183,8 @@ Script N(80244E54) = SCRIPT({
|
||||
SI_AREA_FLAG(27) = 0;
|
||||
SI_AREA_FLAG(28) = 0;
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80244E44);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80244E44);
|
||||
});
|
||||
|
||||
static s32 N(pad_4ECC) = {
|
||||
|
@ -106,7 +106,7 @@ Script N(8024096C) = SCRIPT({
|
||||
Script N(exitWalk_80240C18) = EXIT_WALK_SCRIPT(60, 0, "flo_25", 1);
|
||||
|
||||
Script N(80240C74) = SCRIPT({
|
||||
bind N(exitWalk_80240C18) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240C18) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -460,8 +460,8 @@ Vec4f N(triggerCoord_802428B4) = { -309.0f, 0.0f, 31.0f, 0.0f };
|
||||
|
||||
Script N(802428C4) = SCRIPT({
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 4;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_802428B4);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 4;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_802428B4);
|
||||
});
|
||||
|
||||
StaticNpc N(npcGroup_8024291C) = {
|
||||
|
@ -229,8 +229,8 @@ Script N(exitWalk_8024292C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 6);
|
||||
Script N(exitWalk_80242988) = EXIT_WALK_SCRIPT(60, 1, "flo_24", 0);
|
||||
|
||||
Script N(802429E4) = SCRIPT({
|
||||
bind N(exitWalk_8024292C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80242988) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_8024292C) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80242988) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
s32 N(lavaResetList_80242A2C)[] = {
|
||||
@ -411,13 +411,11 @@ Script N(80243090) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(802431C4) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802419FC_CB073C), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80243090), 0x10, 0, N(D_802462C0_B4AA30), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241970_CB06B0), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(802431C4) = SCRIPT({
|
||||
N(func_802419FC_CB073C)(SI_VAR(0));
|
||||
bind_padlock N(80243090) 0x10 0 N(D_802462C0_B4AA30);
|
||||
N(func_80241970_CB06B0)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(interact_80243214) = SCRIPT({
|
||||
DisablePlayerInput(TRUE);
|
||||
@ -1286,8 +1284,8 @@ Script N(80245914) = SCRIPT({
|
||||
SI_AREA_FLAG(29) = 0;
|
||||
SI_AREA_FLAG(30) = 0;
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 22;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80245904);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 22;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80245904);
|
||||
});
|
||||
|
||||
static s32 N(pad_598C) = {
|
||||
|
@ -77,8 +77,8 @@ Script N(exitWalk_80241B9C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 5);
|
||||
Script N(exitWalk_80241BF8) = EXIT_WALK_SCRIPT(60, 1, "flo_03", 0);
|
||||
|
||||
Script N(80241C54) = SCRIPT({
|
||||
bind N(exitWalk_80241B9C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80241BF8) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80241B9C) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80241BF8) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -383,14 +383,14 @@ Script N(802434A8) = SCRIPT({
|
||||
SI_AREA_VAR(4) = 0;
|
||||
SI_AREA_VAR(5) = 0;
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 15;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80243428);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 15;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243428);
|
||||
SI_VAR(0) = N(tree2);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80243460);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243460);
|
||||
SI_VAR(0) = N(tree3);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 17;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80243498);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 17;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243498);
|
||||
});
|
||||
|
||||
NpcAISettings N(npcAISettings_802435B0) = {
|
||||
|
@ -104,7 +104,7 @@ Script N(80241680) = SCRIPT({
|
||||
Script N(exitWalk_8024192C) = EXIT_WALK_SCRIPT(60, 0, "flo_24", 1);
|
||||
|
||||
Script N(80241988) = SCRIPT({
|
||||
bind N(exitWalk_8024192C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024192C) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -614,11 +614,9 @@ Script N(8024339C) = SCRIPT({
|
||||
}
|
||||
});
|
||||
|
||||
Script N(802435F8) = {
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(8024339C), TRIGGER_FLOOR_TOUCH, 15, N(itemList_80243394), 0, 1),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(802435F8) = SCRIPT({
|
||||
bind_padlock N(8024339C) TRIGGER_FLOOR_TOUCH 15 N(itemList_80243394);
|
||||
});
|
||||
|
||||
Script N(80243628) = SCRIPT({
|
||||
sleep 10;
|
||||
@ -634,7 +632,7 @@ Script N(80243628) = SCRIPT({
|
||||
SI_VAR(1) -= SI_VAR(6);
|
||||
SI_VAR(4) += SI_VAR(6);
|
||||
match SI_VAR(3) {
|
||||
SI_VAR(1)..SI_VAR(4) {
|
||||
SI_VAR(1) ... SI_VAR(4) {
|
||||
spawn {
|
||||
if (SI_VAR(3) < SI_VAR(0)) {
|
||||
SI_VAR(0) -= 40;
|
||||
|
@ -34,6 +34,6 @@ Vec4f N(triggerCoord_80244A40) = { 137.0f, 0.0f, -283.0f, 0.0f };
|
||||
|
||||
Script N(80244A50) = SCRIPT({
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 9;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80244A40);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 9;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80244A40);
|
||||
});
|
||||
|
@ -350,32 +350,32 @@ Script N(8024164C) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80241698) = SCRIPT({
|
||||
bind N(exitWalk_80241488) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024142C) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80241488) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024142C) TRIGGER_FLOOR_ABOVE 4;
|
||||
SI_VAR(0) = 2;
|
||||
SI_VAR(1) = 35;
|
||||
SI_VAR(2) = N(802414E4);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
SI_VAR(0) = 3;
|
||||
SI_VAR(1) = 34;
|
||||
SI_VAR(2) = N(80241520);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
SI_VAR(0) = 4;
|
||||
SI_VAR(1) = 33;
|
||||
SI_VAR(2) = N(8024155C);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
SI_VAR(0) = 5;
|
||||
SI_VAR(1) = 32;
|
||||
SI_VAR(2) = N(80241598);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
SI_VAR(0) = 6;
|
||||
SI_VAR(1) = 31;
|
||||
SI_VAR(2) = N(802415D4);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
SI_VAR(0) = 7;
|
||||
SI_VAR(1) = 30;
|
||||
SI_VAR(2) = N(80241610);
|
||||
bind N(8024164C) to TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1);
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -93,7 +93,7 @@ Script N(80240870) = SCRIPT({
|
||||
Script N(exitWalk_80240B1C) = EXIT_WALK_SCRIPT(60, 0, "flo_11", 1);
|
||||
|
||||
Script N(80240B78) = SCRIPT({
|
||||
bind N(exitWalk_80240B1C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240B1C) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -200,13 +200,11 @@ Script N(80241858) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(8024199C) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_8024064C_CC147C), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80241858), 0x10, 0, N(D_802429E0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802405C0_CC13F0), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(8024199C) = SCRIPT({
|
||||
N(func_8024064C_CC147C)(SI_VAR(0));
|
||||
bind_padlock N(80241858) 0x10 0 N(D_802429E0);
|
||||
N(func_802405C0_CC13F0)(SI_VAR(0));
|
||||
});
|
||||
|
||||
s32 N(D_802419EC_CC281C)[] = {
|
||||
0x0000001E, 0x00000000,
|
||||
|
@ -151,8 +151,8 @@ Script N(exitWalk_80243CEC) = EXIT_WALK_SCRIPT(60, 0, "flo_14", 1);
|
||||
Script N(exitWalk_80243D48) = EXIT_WALK_SCRIPT(60, 1, "flo_15", 0);
|
||||
|
||||
Script N(80243DA4) = SCRIPT({
|
||||
bind N(exitWalk_80243D48) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80243CEC) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80243D48) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80243CEC) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -44,8 +44,8 @@ Script N(exitWalk_802424FC) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 1);
|
||||
Script N(exitWalk_80242558) = EXIT_WALK_SCRIPT(60, 1, "flo_13", 0);
|
||||
|
||||
Script N(802425B4) = SCRIPT({
|
||||
bind N(exitWalk_80242558) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_802424FC) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80242558) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_802424FC) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
s32 N(lavaResetList_802425FC)[] = {
|
||||
@ -395,66 +395,63 @@ s32 N(D_80243B18_CCEE28) = {
|
||||
0x0000005A,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80243B1C) = {
|
||||
SI_CMD(ScriptOpcode_SET_GROUP, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(15), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_AREA_FLAG(35), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, &N(D_802431CC_CCE4DC)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 10, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, EnableModel, SI_VAR(15), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 4, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(0), SI_FIXED(4.0)),
|
||||
SI_CMD(ScriptOpcode_MUL_F, SI_VAR(0), SI_FIXED(-1.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), SI_FIXED(2.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(2), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(2), SI_FIXED(10.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(3), SI_FIXED(0.400390625)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(591.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(5), SI_FIXED(60.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(6), SI_FIXED(121.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 3, SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(7), SI_FIXED(3.0)),
|
||||
SI_CMD(ScriptOpcode_MUL_F, SI_VAR(7), SI_FIXED(0.0400390625)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(9), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(9), SI_FIXED(5.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 50, SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(8), 50),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(14), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_SUB_F, SI_VAR(14), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_MUL_F, SI_VAR(14), SI_FIXED(0.046875)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(0), SI_VAR(14)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(14), SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_SUB_F, SI_VAR(14), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_MUL_F, SI_VAR(14), SI_FIXED(0.046875)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(1), SI_VAR(14)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(4), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(5), SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(14), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_SUB_F, SI_VAR(14), SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_MUL_F, SI_VAR(14), SI_FIXED(0.203125)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(9), SI_VAR(14)),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_VAR(15), SI_VAR(4), SI_VAR(5), SI_VAR(6)),
|
||||
SI_CMD(ScriptOpcode_CALL, ScaleModel, SI_VAR(15), SI_VAR(9), SI_VAR(9), SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, EnableModel, SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80243B1C) = SCRIPT({
|
||||
group 0;
|
||||
SI_VAR(15) = SI_VAR(0);
|
||||
0:
|
||||
if (SI_AREA_FLAG(35) == 1) {
|
||||
sleep 10;
|
||||
goto 0;
|
||||
}
|
||||
buf_use N(D_802431CC_CCE4DC);
|
||||
buf_read SI_VAR(0);
|
||||
if (SI_VAR(0) == 0) {
|
||||
RandInt(10, SI_VAR(0));
|
||||
SI_VAR(0) += 1;
|
||||
sleep SI_VAR(0);
|
||||
goto 0;
|
||||
}
|
||||
EnableModel(SI_VAR(15), 1);
|
||||
RandInt(4, SI_VAR(0));
|
||||
SI_VAR(0) += 4.0;
|
||||
SI_VAR(0) *= -1.0;
|
||||
SI_VAR(1) = 2.0;
|
||||
SI_VAR(2) = (float) SI_VAR(0);
|
||||
SI_VAR(2) /= 10.0;
|
||||
SI_VAR(3) = 0.4;
|
||||
SI_VAR(4) = 591.0;
|
||||
SI_VAR(5) = 60.0;
|
||||
SI_VAR(6) = 121.0;
|
||||
RandInt(3, SI_VAR(7));
|
||||
SI_VAR(7) += 3.0;
|
||||
SI_VAR(7) *= 0.04;
|
||||
SI_VAR(9) = (float) SI_VAR(7);
|
||||
SI_VAR(9) /= 5.0;
|
||||
RandInt(50, SI_VAR(8));
|
||||
SI_VAR(8) += 50;
|
||||
loop SI_VAR(8) {
|
||||
SI_VAR(14) = (float) SI_VAR(2);
|
||||
SI_VAR(14) -= (float) SI_VAR(0);
|
||||
SI_VAR(14) *= 0.046875;
|
||||
SI_VAR(0) += (float) SI_VAR(14);
|
||||
SI_VAR(14) = (float) SI_VAR(3);
|
||||
SI_VAR(14) -= (float) SI_VAR(1);
|
||||
SI_VAR(14) *= 0.046875;
|
||||
SI_VAR(1) += (float) SI_VAR(14);
|
||||
SI_VAR(4) += (float) SI_VAR(0);
|
||||
SI_VAR(5) += (float) SI_VAR(1);
|
||||
SI_VAR(14) = (float) SI_VAR(7);
|
||||
SI_VAR(14) -= (float) SI_VAR(9);
|
||||
SI_VAR(14) *= 0.203125;
|
||||
SI_VAR(9) += (float) SI_VAR(14);
|
||||
TranslateModel(SI_VAR(15), SI_VAR(4), SI_VAR(5), SI_VAR(6));
|
||||
ScaleModel(SI_VAR(15), SI_VAR(9), SI_VAR(9), SI_VAR(9));
|
||||
sleep 1;
|
||||
}
|
||||
EnableModel(SI_VAR(15), 0);
|
||||
goto 0;
|
||||
});
|
||||
|
||||
|
||||
Script N(80243E78) = SCRIPT({
|
||||
ModifyColliderFlags(3, 31, 0x00000006);
|
||||
|
@ -89,13 +89,12 @@ Script N(80244604) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80244738) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802422C0_CCD5D0), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80244604), 0x10, 0, N(D_802453B0_EF79C0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80242234_CCD544), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80244738) = SCRIPT({
|
||||
N(func_802422C0_CCD5D0)(SI_VAR(0));
|
||||
bind_padlock N(80244604) 0x10 0 N(D_802453B0_EF79C0);
|
||||
N(func_80242234_CCD544)(SI_VAR(0));
|
||||
});
|
||||
|
||||
|
||||
s32 N(D_80244788_CCFA98)[] = {
|
||||
0x000000A1, 0x00000000,
|
||||
@ -145,7 +144,7 @@ Script N(interact_80244790) = SCRIPT({
|
||||
ResetCam(0, 4.0);
|
||||
SpeakToPlayer(NPC_SELF, -1, -1, 5, MESSAGE_ID(0x11, 0x0063));
|
||||
SI_SAVE_FLAG(1412) = 1;
|
||||
bind N(8024352C) to TRIGGER_FLOOR_PRESS_A 30;
|
||||
bind N(8024352C) TRIGGER_FLOOR_PRESS_A 30;
|
||||
}
|
||||
}
|
||||
SI_AREA_FLAG(35) = 0;
|
||||
|
@ -42,7 +42,7 @@ static s32 N(pad_11C) = {
|
||||
Script N(exitWalk_80240120) = EXIT_WALK_SCRIPT(60, 0, "flo_13", 1);
|
||||
|
||||
Script N(8024017C) = SCRIPT({
|
||||
bind N(exitWalk_80240120) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240120) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -357,61 +357,57 @@ s32 N(intTable_80241360)[] = {
|
||||
0x00000018, 0xF24A7CE7, 0x0000000A, 0xF24A814D,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(802413B0) = {
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1401), 0),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1401), 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerInput, 1),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80241360)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 10),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_2, SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, ShakeCam, 0, 0, SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, UseSettingsFrom, 0, -170, 0, 35),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPanTarget, 0, -170, 0, 35),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamDistance, 0, 600),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPitch, 0, SI_FIXED(25.0), SI_FIXED(-9.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamPosA, 0, SI_FIXED(-50.0), SI_FIXED(25.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(1.5)),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, WaitForCam, 0, SI_FIXED(1.0)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 100),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 6, 4, -180, 0, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 6, 4, -190, 0, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_LOOP, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtCollider, 11, 391, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 20),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, 0, -50, 120, 2),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateGroup, 16, 0, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 0, 12, 2147483136),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 1, 14, 2147483136),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, ResetCam, 0, SI_FIXED(90.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerInput, 0),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 0, 12, 2147483136),
|
||||
SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 1, 14, 2147483136),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateGroup, 16, 0, -50, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(802413B0) = SCRIPT({
|
||||
if (SI_SAVE_FLAG(1401) == 0) {
|
||||
0:
|
||||
if (SI_SAVE_FLAG(1401) == 0) {
|
||||
sleep 1;
|
||||
goto 0;
|
||||
}
|
||||
DisablePlayerInput(TRUE);
|
||||
spawn {
|
||||
buf_use N(intTable_80241360);
|
||||
loop 10 {
|
||||
buf_read SI_VAR(1) SI_VAR(2);
|
||||
ShakeCam(0, 0, SI_VAR(1), SI_VAR(2));
|
||||
}
|
||||
}
|
||||
UseSettingsFrom(0, -170, 0, 35);
|
||||
SetPanTarget(0, -170, 0, 35);
|
||||
SetCamDistance(0, 600);
|
||||
SetCamPitch(0, 25.0, -9.0);
|
||||
SetCamPosA(0, -50.0, 25.0);
|
||||
SetCamSpeed(0, 1.5);
|
||||
PanToTarget(0, 0, 1);
|
||||
WaitForCam(0, 1.0);
|
||||
spawn {
|
||||
sleep 100;
|
||||
PlayEffect(0x6, 4, -180, 0, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x6, 4, -190, 0, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
spawn {
|
||||
loop 6 {
|
||||
PlaySoundAtCollider(11, 391, 0);
|
||||
sleep 20;
|
||||
}
|
||||
}
|
||||
MakeLerp(0, -50, 120, 2);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
TranslateGroup(16, 0, SI_VAR(0), 0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
ModifyColliderFlags(0, 12, 0x7FFFFE00);
|
||||
ModifyColliderFlags(1, 14, 0x7FFFFE00);
|
||||
sleep 15;
|
||||
ResetCam(0, 90.0);
|
||||
DisablePlayerInput(FALSE);
|
||||
} else {
|
||||
ModifyColliderFlags(0, 12, 0x7FFFFE00);
|
||||
ModifyColliderFlags(1, 14, 0x7FFFFE00);
|
||||
TranslateGroup(16, 0, -50, 0);
|
||||
}
|
||||
});
|
||||
|
@ -33,8 +33,8 @@ Script N(exitWalk_80242A40) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 4);
|
||||
Script N(exitWalk_80242A9C) = EXIT_WALK_SCRIPT(60, 1, "flo_17", 0);
|
||||
|
||||
Script N(80242AF8) = SCRIPT({
|
||||
bind N(exitWalk_80242A40) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80242A9C) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_80242A40) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80242A9C) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
s32 N(lavaResetList_80242B40)[] = {
|
||||
@ -392,7 +392,7 @@ Script N(80243E80) = SCRIPT({
|
||||
}
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
match SI_VAR(0) {
|
||||
620..660 {
|
||||
620 ... 660 {
|
||||
MakeItemEntity(ITEM_STAR_PIECE, 640, 145, -100, 13, SI_SAVE_FLAG(1388));
|
||||
SI_AREA_FLAG(39) = 1;
|
||||
}
|
||||
@ -402,7 +402,7 @@ Script N(80243E80) = SCRIPT({
|
||||
|
||||
Script N(makeEntities) = SCRIPT({
|
||||
SI_AREA_FLAG(39) = 0;
|
||||
bind N(80243E80) to TRIGGER_FLOOR_TOUCH 20;
|
||||
bind N(80243E80) TRIGGER_FLOOR_TOUCH 20;
|
||||
MakeEntity(0x802EA910, 350, 240, -100, 0, MAKE_ENTITY_END);
|
||||
SI_MAP_VAR(0) = SI_VAR(0);
|
||||
AssignBlockFlag(SI_SAVE_FLAG(1403));
|
||||
|
@ -332,13 +332,13 @@ Script N(802451C4) = SCRIPT({
|
||||
ParentColliderToModel(42, 129);
|
||||
ParentColliderToModel(44, 136);
|
||||
ParentColliderToModel(45, 136);
|
||||
bind N(80244500) to TRIGGER_FLOOR_TOUCH 26;
|
||||
bind N(802448FC) to TRIGGER_FLOOR_TOUCH 29;
|
||||
bind N(80244500) to TRIGGER_FLOOR_TOUCH 32;
|
||||
bind N(802448FC) to TRIGGER_FLOOR_TOUCH 35;
|
||||
bind N(80244DC8) to TRIGGER_FLOOR_TOUCH 38;
|
||||
bind N(802448FC) to TRIGGER_FLOOR_TOUCH 41;
|
||||
bind N(80244DC8) to TRIGGER_FLOOR_TOUCH 44;
|
||||
bind N(80244500) TRIGGER_FLOOR_TOUCH 26;
|
||||
bind N(802448FC) TRIGGER_FLOOR_TOUCH 29;
|
||||
bind N(80244500) TRIGGER_FLOOR_TOUCH 32;
|
||||
bind N(802448FC) TRIGGER_FLOOR_TOUCH 35;
|
||||
bind N(80244DC8) TRIGGER_FLOOR_TOUCH 38;
|
||||
bind N(802448FC) TRIGGER_FLOOR_TOUCH 41;
|
||||
bind N(80244DC8) TRIGGER_FLOOR_TOUCH 44;
|
||||
});
|
||||
|
||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
||||
|
@ -79,8 +79,8 @@ Script N(exitWalk_8024359C) = EXIT_WALK_SCRIPT(60, 0, "flo_16", 1);
|
||||
Script N(exitWalk_802435F8) = EXIT_WALK_SCRIPT(60, 1, "flo_18", 0);
|
||||
|
||||
Script N(80243654) = SCRIPT({
|
||||
bind N(exitWalk_8024359C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_802435F8) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_8024359C) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_802435F8) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
s32 N(lavaResetList_8024369C)[] = {
|
||||
|
@ -59,7 +59,7 @@ Script N(updateTexturePan_802408C0) = SCRIPT({
|
||||
Script N(exitWalk_8024095C) = EXIT_WALK_SCRIPT(60, 0, "flo_17", 1);
|
||||
|
||||
Script N(802409B8) = SCRIPT({
|
||||
bind N(exitWalk_8024095C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024095C) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
s32 N(lavaResetList_802409E4)[] = {
|
||||
@ -357,7 +357,7 @@ Script N(802413F0) = SCRIPT({
|
||||
SI_MAP_FLAG(2) = 0;
|
||||
});
|
||||
|
||||
/*
|
||||
#ifdef NON_MATCHING
|
||||
Script N(80241ED4) = SCRIPT({
|
||||
SI_VAR(0) = 0;
|
||||
SI_VAR(1) = 0;
|
||||
@ -398,8 +398,7 @@ Script N(80241ED4) = SCRIPT({
|
||||
sleep 30;
|
||||
ModifyColliderFlags(0, 19, 0x7FFFFE00);
|
||||
});
|
||||
*/
|
||||
// *INDENT-OFF*
|
||||
#else
|
||||
Script N(80241ED4) = {
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), 0),
|
||||
@ -425,7 +424,7 @@ Script N(80241ED4) = {
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF), // BUG: extraneous END_IF
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, 31, -78, 19, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, 32, -78, 19, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, 31, SI_VAR(0), SI_VAR(1), 0),
|
||||
@ -442,7 +441,7 @@ SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 0, 19, 0x7FFFFE00),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(80242174) = SCRIPT({
|
||||
SI_VAR(0) = (float) 0;
|
||||
@ -559,7 +558,7 @@ Script N(80242620) = SCRIPT({
|
||||
sleep 30;
|
||||
});
|
||||
|
||||
/*
|
||||
#ifdef NON_MATCHING
|
||||
Script N(80242910) = SCRIPT({
|
||||
SI_VAR(0) = 0;
|
||||
SI_VAR(1) = 0;
|
||||
@ -593,9 +592,10 @@ Script N(80242910) = SCRIPT({
|
||||
sleep 1;
|
||||
}
|
||||
0:
|
||||
return;
|
||||
break;
|
||||
});
|
||||
*/
|
||||
// *INDENT-OFF*
|
||||
#else
|
||||
Script N(80242910) = {
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), 0),
|
||||
@ -621,7 +621,7 @@ Script N(80242910) = {
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF), // BUG: extraneous END_IF
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, 29, 124, 17, 3),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, 29, SI_VAR(0), SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, RotateModel, 29, SI_VAR(2), 0, 0, -1),
|
||||
@ -632,7 +632,7 @@ SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(80242B18) = SCRIPT({
|
||||
ModifyColliderFlags(0, 18, 0x7FFFFE00);
|
||||
@ -682,127 +682,123 @@ s32 N(intTable_80242DC8)[] = {
|
||||
0x00000000, 0x0000001B, 0x00000055, 0x00000000, 0x0000001B, 0x00000050, 0x00000023, 0x0000001B,
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80242E28) = {
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(10), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_VAR(0), -210),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 485),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802413F0)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), 52),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_FLAG(1), 1),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_MAP_FLAG(3), 1),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_FLAG(3), 1),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_VAR(0), 2),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 2),
|
||||
SI_CMD(ScriptOpcode_GOTO, 11),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_LABEL, 11),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(252), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(252), 1),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80241ED4)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(253), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(253), 1),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80242174)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(252), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(252), 2),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80242474)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(252), 2),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(253), 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(253), 2),
|
||||
SI_CMD(ScriptOpcode_SPAWN_SCRIPT, N(80242620)),
|
||||
SI_CMD(ScriptOpcode_GOTO, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(252), 2),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_VAR(253), 2),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerInput, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, UseSettingsFrom, 0, 40, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetPanTarget, 0, 40, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(1.5)),
|
||||
SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(253), 3),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802413F0)),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802413F0)),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(802413F0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, GetModelCenter, 27),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 29, 0, SI_VAR(0), 50, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 29, 0, SI_VAR(0), 30, SI_VAR(2), 120, 20, 0, 30, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 29, 0, SI_VAR(0), 10, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(3), 6),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80242DC8)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 8),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAt, 400, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 39, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 6, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 2),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 5),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAt, 400, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 39, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 2, 15, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(3), 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(2.0)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 2),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_80242DC8)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 8),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAt, 400, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 39, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 25, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_ADD_F, SI_VAR(4), SI_FIXED(0.5)),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAt, 416, 0, 70, 40, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 36, 0, 70, 40, 10, SI_FIXED(3.0), 30, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShakeCam, 0, 0, 20, SI_FIXED(1.0)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAt, 416, 0, 0, 30, 30),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 36, 0, 0, 30, 30, SI_FIXED(4.0), 40, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, ShakeCam, 0, 0, 20, SI_FIXED(2.0)),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80242910)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtCollider, 20, 1169, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, FadeOutMusic, 0, 1000),
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerPhysics, 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(80242B18)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(0), 53),
|
||||
SI_CMD(ScriptOpcode_CALL, GotoMap, "flo_15", 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 70),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_LABEL, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_MAP_FLAG(3), 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80242E28) = SCRIPT({
|
||||
SI_VAR(10) = SI_VAR(0);
|
||||
GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
if (SI_VAR(0) < -210) {
|
||||
return;
|
||||
}
|
||||
PlaySound(0x1E5);
|
||||
await N(802413F0);
|
||||
SI_VAR(0) = SI_VAR(10);
|
||||
if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) {
|
||||
SI_MAP_FLAG(1) = 1;
|
||||
return;
|
||||
}
|
||||
if (SI_MAP_FLAG(3) == 1) {
|
||||
return;
|
||||
}
|
||||
SI_MAP_FLAG(3) = 1;
|
||||
if (SI_VAR(0) > 2) {
|
||||
goto 0;
|
||||
}
|
||||
if (SI_VAR(0) == 2) {
|
||||
goto 11;
|
||||
}
|
||||
if (SI_VAR(0) == 0) {
|
||||
11:
|
||||
if (SI_SAVE_VAR(252) == 0) {
|
||||
SI_SAVE_VAR(252) = 1;
|
||||
spawn N(80241ED4);
|
||||
goto 0;
|
||||
}
|
||||
}
|
||||
if (SI_VAR(0) == 1) {
|
||||
if (SI_SAVE_VAR(253) == 0) {
|
||||
SI_SAVE_VAR(253) = 1;
|
||||
spawn N(80242174);
|
||||
goto 0;
|
||||
}
|
||||
}
|
||||
if (SI_VAR(0) == 0) {
|
||||
if (SI_SAVE_VAR(252) == 1) {
|
||||
SI_SAVE_VAR(252) = 2;
|
||||
spawn N(80242474);
|
||||
goto 0;
|
||||
}
|
||||
}
|
||||
if (SI_SAVE_VAR(252) == 2) {
|
||||
if (SI_SAVE_VAR(253) == 1) {
|
||||
SI_SAVE_VAR(253) = 2;
|
||||
spawn N(80242620);
|
||||
goto 0;
|
||||
}
|
||||
}
|
||||
if (SI_SAVE_VAR(252) == 2) {
|
||||
if (SI_SAVE_VAR(253) == 2) {
|
||||
DisablePlayerInput(TRUE);
|
||||
UseSettingsFrom(0, 40, 0, 0);
|
||||
SetPanTarget(0, 40, 0, 0);
|
||||
SetCamSpeed(0, 1.5);
|
||||
PanToTarget(0, 0, 1);
|
||||
SI_SAVE_VAR(253) = 3;
|
||||
await N(802413F0);
|
||||
await N(802413F0);
|
||||
await N(802413F0);
|
||||
sleep 30;
|
||||
GetModelCenter(27);
|
||||
PlayEffect(0x1D, 0, SI_VAR(0), 50, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x1D, 0, SI_VAR(0), 30, SI_VAR(2), 120, 20, 0, 30, 0, 0, 0, 0, 0);
|
||||
PlayEffect(0x1D, 0, SI_VAR(0), 10, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0);
|
||||
sleep 15;
|
||||
spawn {
|
||||
SI_VAR(3) = 6;
|
||||
buf_use N(intTable_80242DC8);
|
||||
loop 8 {
|
||||
buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2);
|
||||
PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 6, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep 2;
|
||||
SI_VAR(1) += 5;
|
||||
PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 2, 15, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep SI_VAR(3);
|
||||
SI_VAR(3) += 1;
|
||||
}
|
||||
SI_VAR(4) = 2.0;
|
||||
loop 2 {
|
||||
buf_use N(intTable_80242DC8);
|
||||
loop 8 {
|
||||
buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2);
|
||||
PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2));
|
||||
PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 25, 0, 0, 0, 0, 0, 0, 0);
|
||||
sleep SI_VAR(3);
|
||||
SI_VAR(3) += SI_VAR(4);
|
||||
SI_VAR(4) += 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
PlaySoundAt(0x1A0, 0, 70, 40, 10);
|
||||
PlayEffect(0x24, 0, 70, 40, 10, 3.0, 30, 0, 0, 0, 0, 0, 0, 0);
|
||||
ShakeCam(0, 0, 20, 1.0);
|
||||
PlaySoundAt(0x1A0, 0, 0, 30, 30);
|
||||
PlayEffect(0x24, 0, 0, 30, 30, 4.0, 40, 0, 0, 0, 0, 0, 0, 0);
|
||||
ShakeCam(0, 0, 20, 2.0);
|
||||
await N(80242910);
|
||||
PlaySoundAtCollider(20, 1169, 0);
|
||||
FadeOutMusic(0, 1000);
|
||||
DisablePlayerPhysics(TRUE);
|
||||
sleep 30;
|
||||
await N(80242B18);
|
||||
STORY_PROGRESS = STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE;
|
||||
GotoMap("flo_15", 1);
|
||||
sleep 70;
|
||||
return;
|
||||
}
|
||||
}
|
||||
0:
|
||||
SI_MAP_FLAG(3) = 0;
|
||||
});
|
||||
|
||||
Vec4f N(triggerCoord_8024367C) = { 5.0f, 0.0f, -10.0, 0.0f };
|
||||
|
||||
@ -861,17 +857,17 @@ Script N(802436BC) = SCRIPT({
|
||||
return;
|
||||
}
|
||||
SI_VAR(0) = 0;
|
||||
bind N(80242E28) to TRIGGER_WALL_HAMMER 23;
|
||||
bind N(80242E28) to TRIGGER_POINT_BOMB N(triggerCoord_8024367C);
|
||||
bind N(80242E28) to TRIGGER_POINT_BOMB N(triggerCoord_8024368C);
|
||||
bind N(80242E28) TRIGGER_WALL_HAMMER 23;
|
||||
bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024367C);
|
||||
bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024368C);
|
||||
SI_VAR(0) = 1;
|
||||
bind N(80242E28) to TRIGGER_WALL_HAMMER 22;
|
||||
bind N(80242E28) to TRIGGER_POINT_BOMB N(triggerCoord_8024369C);
|
||||
bind N(80242E28) to TRIGGER_POINT_BOMB N(triggerCoord_802436AC);
|
||||
bind N(80242E28) TRIGGER_WALL_HAMMER 22;
|
||||
bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024369C);
|
||||
bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_802436AC);
|
||||
SI_VAR(0) = 3;
|
||||
bind N(80242E28) to TRIGGER_WALL_HAMMER 19;
|
||||
bind N(80242E28) TRIGGER_WALL_HAMMER 19;
|
||||
SI_VAR(0) = 4;
|
||||
bind N(80242E28) to TRIGGER_WALL_HAMMER 18;
|
||||
bind N(80242E28) TRIGGER_WALL_HAMMER 18;
|
||||
SI_VAR(0) = 0;
|
||||
loop 16 {
|
||||
SI_VAR(1) = SI_VAR(0);
|
||||
@ -1372,14 +1368,14 @@ Vec4f N(triggerCoord_802456C4) = { 105.0f, 0.0f, -10.0, 0.0f };
|
||||
|
||||
Script N(802456D4) = SCRIPT({
|
||||
SI_MAP_VAR(10) = -1;
|
||||
bind N(80245228) to TRIGGER_WALL_HAMMER 23;
|
||||
bind N(80245228) to TRIGGER_WALL_HAMMER 19;
|
||||
bind N(802454D4) to TRIGGER_POINT_BOMB N(triggerCoord_802456A4);
|
||||
bind N(80245544) to TRIGGER_POINT_BOMB N(triggerCoord_80245694);
|
||||
bind N(802452D0) to TRIGGER_WALL_HAMMER 22;
|
||||
bind N(802455B4) to TRIGGER_POINT_BOMB N(triggerCoord_802456B4);
|
||||
bind N(80245324) to TRIGGER_WALL_HAMMER 18;
|
||||
bind N(80245624) to TRIGGER_POINT_BOMB N(triggerCoord_802456C4);
|
||||
bind N(80245228) TRIGGER_WALL_HAMMER 23;
|
||||
bind N(80245228) TRIGGER_WALL_HAMMER 19;
|
||||
bind N(802454D4) TRIGGER_POINT_BOMB N(triggerCoord_802456A4);
|
||||
bind N(80245544) TRIGGER_POINT_BOMB N(triggerCoord_80245694);
|
||||
bind N(802452D0) TRIGGER_WALL_HAMMER 22;
|
||||
bind N(802455B4) TRIGGER_POINT_BOMB N(triggerCoord_802456B4);
|
||||
bind N(80245324) TRIGGER_WALL_HAMMER 18;
|
||||
bind N(80245624) TRIGGER_POINT_BOMB N(triggerCoord_802456C4);
|
||||
});
|
||||
|
||||
Script N(interact_802457D4) = SCRIPT({
|
||||
|
@ -16,13 +16,31 @@ MapConfig N(config) = {
|
||||
.tattle = { MSG_flo_19_tattle },
|
||||
};
|
||||
|
||||
// *INDENT-OFF*
|
||||
// Extraneous END_CASE_MULTI
|
||||
#ifdef NON_MATCHING
|
||||
Script N(802409C0) = SCRIPT({
|
||||
GetEntryID(SI_VAR(0));
|
||||
match SI_VAR(0) {
|
||||
0, 1 {
|
||||
SetMusicTrack(0, SONG_CLOUDY_CLIMB, 0, 8);
|
||||
}
|
||||
2, 7 {}
|
||||
== 3 {
|
||||
if (SI_AREA_FLAG(44) != 0) {
|
||||
} else {
|
||||
FadeOutMusic(1, 3000);
|
||||
FadeInMusic(0, 50, 0, 3000, 0, 127);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
#else
|
||||
Script N(802409C0) = {
|
||||
SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 0),
|
||||
SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, 50, 0, 8),
|
||||
SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8),
|
||||
SI_CMD(ScriptOpcode_END_CASE_MULTI),
|
||||
SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 2),
|
||||
SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 7),
|
||||
@ -38,7 +56,7 @@ Script N(802409C0) = {
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
static s32 N(pad_ABC) = {
|
||||
0x00000000,
|
||||
@ -70,7 +88,7 @@ Script N(updateTexturePan_80240B00) = SCRIPT({
|
||||
Script N(exitWalk_80240B9C) = EXIT_WALK_SCRIPT(60, 1, "flo_21", 0);
|
||||
|
||||
Script N(80240BF8) = SCRIPT({
|
||||
bind N(exitWalk_80240B9C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240B9C) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -281,10 +299,10 @@ Script N(80241780) = SCRIPT({
|
||||
SetModelFlags(36, 256, 1);
|
||||
SetModelFlags(40, 256, 1);
|
||||
spawn N(80241050);
|
||||
bind N(80241650) to TRIGGER_FLOOR_TOUCH 8;
|
||||
bind N(8024169C) to TRIGGER_FLOOR_TOUCH 9;
|
||||
bind N(802416E8) to TRIGGER_FLOOR_TOUCH 7;
|
||||
bind N(80241734) to TRIGGER_FLOOR_TOUCH 10;
|
||||
bind N(80241650) TRIGGER_FLOOR_TOUCH 8;
|
||||
bind N(8024169C) TRIGGER_FLOOR_TOUCH 9;
|
||||
bind N(802416E8) TRIGGER_FLOOR_TOUCH 7;
|
||||
bind N(80241734) TRIGGER_FLOOR_TOUCH 10;
|
||||
spawn {
|
||||
SI_VAR(15) = 0;
|
||||
0:
|
||||
@ -637,7 +655,7 @@ Script N(80242A2C) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80242FD0) = SCRIPT({
|
||||
bind N(802423F8) to TRIGGER_FLOOR_TOUCH 12;
|
||||
bind N(802423F8) TRIGGER_FLOOR_TOUCH 12;
|
||||
});
|
||||
|
||||
#include "world/common/UnkTexturePanFunc.inc.c"
|
||||
|
@ -376,7 +376,7 @@ Script N(80240E3C) = SCRIPT({
|
||||
Script N(exitWalk_802412F4) = EXIT_WALK_SCRIPT(60, 0, "flo_19", 1);
|
||||
|
||||
Script N(80241350) = SCRIPT({
|
||||
bind N(exitWalk_802412F4) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_802412F4) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -756,135 +756,127 @@ Script N(8024263C) = SCRIPT({
|
||||
sleep 100;
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80242918) = {
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(11), SI_FIXED(1.0)),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(12), SI_FIXED(1.0)),
|
||||
SI_CMD(ScriptOpcode_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_8024258C)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 6),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 0, 8374, 0),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(6), SI_VAR(7), SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, SI_VAR(6), SI_VAR(7), SI_VAR(8), 11),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(0), 10),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(11), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_802425D4)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 2),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, 0, 8374, 0),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_2, SI_VAR(6), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, SI_VAR(6), SI_VAR(7), 4, 11),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(0), 10),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(11), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_802425E4)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 6),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(6), SI_VAR(7), SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, SI_VAR(6), SI_VAR(7), SI_VAR(8), 11),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(0), 10),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(12), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_8024262C)),
|
||||
SI_CMD(ScriptOpcode_LOOP, 2),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_2, SI_VAR(6), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeLerp, SI_VAR(6), SI_VAR(7), 4, 11),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, UpdateLerp),
|
||||
SI_CMD(ScriptOpcode_DIV_F, SI_VAR(0), 10),
|
||||
SI_CMD(ScriptOpcode_SET_F, SI_MAP_VAR(12), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_BREAK_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_LOOP, 100),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcScale, 0, SI_MAP_VAR(11), SI_MAP_VAR(12), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcScale, 1, SI_MAP_VAR(11), SI_MAP_VAR(12), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcScale, 2, SI_MAP_VAR(11), SI_MAP_VAR(12), 1),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80242918) = SCRIPT({
|
||||
SI_MAP_VAR(11) = 1.0;
|
||||
SI_MAP_VAR(12) = 1.0;
|
||||
parallel {
|
||||
buf_use N(intTable_8024258C);
|
||||
loop 6 {
|
||||
PlaySoundAtNpc(NPC_HUFF_N_PUFF0, 0x20B6, 0);
|
||||
buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8);
|
||||
MakeLerp(SI_VAR(6), SI_VAR(7), SI_VAR(8), 11);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
SI_VAR(0) /= (float) 10;
|
||||
SI_MAP_VAR(11) = (float) SI_VAR(0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
loop {
|
||||
buf_use N(intTable_802425D4);
|
||||
loop 2 {
|
||||
PlaySoundAtNpc(NPC_HUFF_N_PUFF0, 0x20B6, 0);
|
||||
buf_read SI_VAR(6) SI_VAR(7);
|
||||
MakeLerp(SI_VAR(6), SI_VAR(7), 4, 11);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
SI_VAR(0) /= (float) 10;
|
||||
SI_MAP_VAR(11) = (float) SI_VAR(0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parallel {
|
||||
buf_use N(intTable_802425E4);
|
||||
loop 6 {
|
||||
buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8);
|
||||
MakeLerp(SI_VAR(6), SI_VAR(7), SI_VAR(8), 11);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
SI_VAR(0) /= (float) 10;
|
||||
SI_MAP_VAR(12) = (float) SI_VAR(0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
loop {
|
||||
buf_use N(intTable_8024262C);
|
||||
loop 2 {
|
||||
buf_read SI_VAR(6) SI_VAR(7);
|
||||
MakeLerp(SI_VAR(6), SI_VAR(7), 4, 11);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
SI_VAR(0) /= (float) 10;
|
||||
SI_MAP_VAR(12) = (float) SI_VAR(0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
loop 100 {
|
||||
SetNpcScale(NPC_HUFF_N_PUFF0, SI_MAP_VAR(11), SI_MAP_VAR(12), 1);
|
||||
SetNpcScale(NPC_HUFF_N_PUFF1, SI_MAP_VAR(11), SI_MAP_VAR(12), 1);
|
||||
SetNpcScale(NPC_HUFF_N_PUFF2, SI_MAP_VAR(11), SI_MAP_VAR(12), 1);
|
||||
sleep 1;
|
||||
}
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80242D34) = {
|
||||
SI_CMD(ScriptOpcode_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_LOOP, 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(0), 3),
|
||||
SI_CMD(ScriptOpcode_LOOP, 15),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcRotation, SI_VAR(0), 0, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(0), 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), 60),
|
||||
SI_CMD(ScriptOpcode_IF_GT, SI_VAR(1), 360),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(1), -360),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_PARALLEL_THREAD),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, N(intTable_8024249C)),
|
||||
SI_CMD(ScriptOpcode_SET, SI_VAR(8), 3),
|
||||
SI_CMD(ScriptOpcode_LOOP, 14),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_4, SI_VAR(1), SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 5, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, SI_VAR(8), SI_VAR(1), SI_VAR(2), -30),
|
||||
SI_CMD(ScriptOpcode_CALL, RandInt, 2, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(5), 8),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, SI_VAR(8), 981, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcJump0, SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, SI_VAR(8), 0, -1000, 0),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_ADD, SI_VAR(8), 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 0, 0, -1000, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 1, 0, -1000, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, 2, 0, -1000, 0),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_4, SI_VAR(1), SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 5),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, SI_VAR(8), SI_VAR(1), SI_VAR(2), -30),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtNpc, SI_VAR(8), 982, 0),
|
||||
SI_CMD(ScriptOpcode_CALL, NpcJump0, SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, 10),
|
||||
SI_CMD(ScriptOpcode_CALL, SetNpcPos, SI_VAR(8), 0, -1000, 0),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80242D34) = SCRIPT({
|
||||
parallel {
|
||||
SI_VAR(1) = 0;
|
||||
loop {
|
||||
SI_VAR(0) = 3;
|
||||
loop 15 {
|
||||
SetNpcRotation(SI_VAR(0), 0, SI_VAR(1), 0);
|
||||
SI_VAR(0) += 1;
|
||||
}
|
||||
SI_VAR(1) += 60;
|
||||
if (SI_VAR(1) > 360) {
|
||||
SI_VAR(1) += -360;
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
}
|
||||
buf_use N(intTable_8024249C);
|
||||
SI_VAR(8) = 3;
|
||||
loop 14 {
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4);
|
||||
spawn {
|
||||
RandInt(5, SI_VAR(5));
|
||||
sleep SI_VAR(5);
|
||||
SetNpcPos(SI_VAR(8), SI_VAR(1), SI_VAR(2), -30);
|
||||
RandInt(2, SI_VAR(5));
|
||||
SI_VAR(5) += 8;
|
||||
PlaySoundAtNpc(SI_VAR(8), 0x3D5, 0);
|
||||
NpcJump0(SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, SI_VAR(5));
|
||||
SetNpcPos(SI_VAR(8), 0, -1000, 0);
|
||||
}
|
||||
SI_VAR(8) += 1;
|
||||
}
|
||||
SetNpcPos(NPC_HUFF_N_PUFF0, 0, -1000, 0);
|
||||
SetNpcPos(NPC_HUFF_N_PUFF1, 0, -1000, 0);
|
||||
SetNpcPos(NPC_HUFF_N_PUFF2, 0, -1000, 0);
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4);
|
||||
sleep 5;
|
||||
SetNpcPos(SI_VAR(8), SI_VAR(1), SI_VAR(2), -30);
|
||||
PlaySoundAtNpc(SI_VAR(8), 0x3D6, 0);
|
||||
NpcJump0(SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, 10);
|
||||
SetNpcPos(SI_VAR(8), 0, -1000, 0);
|
||||
});
|
||||
|
||||
Script N(80243010) = SCRIPT({
|
||||
SetNpcAnimation(NPC_HUFF_N_PUFF1, NPC_ANIM(huff_n_puff, Palette_00, Anim_4));
|
||||
|
@ -33,7 +33,7 @@ Script N(802402E0) = SCRIPT({
|
||||
Script N(exitWalk_80240350) = EXIT_WALK_SCRIPT(60, 0, "flo_03", 1);
|
||||
|
||||
Script N(802403AC) = SCRIPT({
|
||||
bind N(exitWalk_80240350) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240350) TRIGGER_FLOOR_ABOVE 0;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -356,16 +356,12 @@ Script N(80241028) = SCRIPT({
|
||||
DisablePlayerInput(FALSE);
|
||||
});
|
||||
|
||||
// *INDENT-OFF*
|
||||
Script N(80241528) = {
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80241028), TRIGGER_WALL_PRESS_A, 9, N(itemList_80240E10), 0, 1),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_SAVE_FLAG(1395), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, MakeItemEntity, 312, -83, 0, 0, 0, SI_SAVE_FLAG(1392)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
Script N(80241528) = SCRIPT({
|
||||
bind_padlock N(80241028) TRIGGER_WALL_PRESS_A 9 N(itemList_80240E10);
|
||||
if (SI_SAVE_FLAG(1395) == 1) {
|
||||
MakeItemEntity(ITEM_FLOWER_SAVER_B, -83, 0, 0, 0, SI_SAVE_FLAG(1392));
|
||||
}
|
||||
});
|
||||
|
||||
static s32 N(pad_1594)[] = {
|
||||
0x00000000, 0x00000000, 0x00000000,
|
||||
|
@ -26,9 +26,9 @@ Vec4f N(triggerCoord_80241F5C) = { 150.0f, 0.0f, 135.0f, 0.0f };
|
||||
|
||||
Script N(80241F6C) = SCRIPT({
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 14;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80241F28);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 14;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241F28);
|
||||
SI_VAR(0) = N(tree2);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80241F5C);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 16;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241F5C);
|
||||
});
|
||||
|
@ -81,8 +81,8 @@ Script N(exitWalk_8024104C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 2);
|
||||
Script N(exitWalk_802410A8) = EXIT_WALK_SCRIPT(60, 1, "flo_11", 0);
|
||||
|
||||
Script N(80241104) = SCRIPT({
|
||||
bind N(exitWalk_802410A8) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024104C) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_802410A8) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024104C) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -151,13 +151,11 @@ Script N(80241314) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80241448) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802402F8_CEE558), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80241314), 0x10, 0, N(D_802426E0), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_8024026C_CEE4CC), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80241448) = SCRIPT({
|
||||
N(func_802402F8_CEE558)(SI_VAR(0));
|
||||
bind_padlock N(80241314) 0x10 0 0x802426E0; // TODO: fix raw ptr
|
||||
N(func_8024026C_CEE4CC)(SI_VAR(0));
|
||||
});
|
||||
|
||||
NpcAISettings N(npcAISettings_80241498) = {
|
||||
.moveSpeed = 1.5f,
|
||||
|
@ -70,8 +70,8 @@ Script N(exitWalk_8024093C) = EXIT_WALK_SCRIPT(60, 0, "flo_08", 1);
|
||||
Script N(exitWalk_80240998) = EXIT_WALK_SCRIPT(60, 1, "flo_10", 0);
|
||||
|
||||
Script N(802409F4) = SCRIPT({
|
||||
bind N(exitWalk_8024093C) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240998) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_8024093C) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_80240998) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -167,8 +167,8 @@ Script N(80241728) = SCRIPT({
|
||||
SI_AREA_FLAG(31) = 0;
|
||||
SI_AREA_FLAG(32) = 0;
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 13;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_80241718);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 13;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241718);
|
||||
});
|
||||
|
||||
Script N(updateTexturePan_802417A0) = SCRIPT({
|
||||
@ -188,7 +188,48 @@ Script N(updateTexturePan_802417A0) = SCRIPT({
|
||||
|
||||
const char N(flo_10_name_hack)[];
|
||||
|
||||
// *INDENT-OFF*
|
||||
// BUG: missing END_SPAWN_THREADs
|
||||
#ifdef NON_MATCHING
|
||||
Script N(8024183C) = SCRIPT({
|
||||
DisablePlayerInput(TRUE);
|
||||
TranslateGroup(100, 0, 45, 0);
|
||||
UseSettingsFrom(0, 170, 0, 160);
|
||||
SetPanTarget(0, 170, -90, 160);
|
||||
SetCamDistance(0, 800);
|
||||
SetCamPitch(0, 18.5, -7.5);
|
||||
SetCamPosA(0, -300.0, 200.0);
|
||||
SetCamPosB(0, 300.0, -150.0);
|
||||
SetCamSpeed(0, 90.0);
|
||||
PanToTarget(0, 0, 1);
|
||||
PlaySound(0x80000050);
|
||||
spawn {
|
||||
MakeLerp(80, 90, 10, 0);
|
||||
0:
|
||||
UpdateLerp();
|
||||
RotateModel(101, SI_VAR(0), 1, 0, 0);
|
||||
RotateModel(103, SI_VAR(0), 1, 0, 0);
|
||||
if (SI_VAR(1) == 1) {
|
||||
sleep 1;
|
||||
goto 0;
|
||||
}
|
||||
spawn {
|
||||
MakeLerp(45, 100, 150, 0);
|
||||
loop {
|
||||
UpdateLerp();
|
||||
TranslateGroup(100, 0, SI_VAR(0), 0);
|
||||
sleep 1;
|
||||
if (SI_VAR(1) == 0) {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
sleep 30;
|
||||
STORY_PROGRESS = STORY_CH6_FILLED_SPRING_WITH_WATER;
|
||||
GotoMap("flo_10", 2);
|
||||
sleep 100;
|
||||
}
|
||||
}
|
||||
});
|
||||
#else
|
||||
Script N(8024183C) = {
|
||||
SI_CMD(ScriptOpcode_CALL, DisablePlayerInput, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateGroup, 100, 0, 45, 0),
|
||||
@ -222,13 +263,13 @@ Script N(8024183C) = {
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30),
|
||||
SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(0), 49),
|
||||
SI_CMD(ScriptOpcode_SET, STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER),
|
||||
SI_CMD(ScriptOpcode_CALL, GotoMap, N(flo_10_name_hack), 2),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 100),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
// *INDENT-ON*
|
||||
#endif
|
||||
|
||||
Script N(80241ABC) = SCRIPT({
|
||||
if (STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) {
|
||||
|
@ -82,8 +82,8 @@ Script N(exitWalk_8024264C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 3);
|
||||
Script N(exitWalk_802426A8) = EXIT_WALK_SCRIPT(60, 1, "flo_07", 0);
|
||||
|
||||
Script N(80242704) = SCRIPT({
|
||||
bind N(exitWalk_802426A8) to TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024264C) to TRIGGER_FLOOR_ABOVE 4;
|
||||
bind N(exitWalk_802426A8) TRIGGER_FLOOR_ABOVE 0;
|
||||
bind N(exitWalk_8024264C) TRIGGER_FLOOR_ABOVE 4;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -217,13 +217,11 @@ Script N(80242AD4) = SCRIPT({
|
||||
unbind;
|
||||
});
|
||||
|
||||
Script N(80242C08) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241DE4_CF49B4), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80242AD4), 0x10, 0, N(D_80244A20), 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241D58_CF4928), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(80242C08) = SCRIPT({
|
||||
N(func_80241DE4_CF49B4)(SI_VAR(0));
|
||||
bind_padlock N(80242AD4) 0x10 0 N(D_80244A20);
|
||||
N(func_80241D58_CF4928)(SI_VAR(0));
|
||||
});
|
||||
|
||||
Script N(interact_80242C58) = SCRIPT({
|
||||
DisablePlayerInput(TRUE);
|
||||
|
@ -42,8 +42,8 @@ Script N(802446BC) = SCRIPT({
|
||||
SI_AREA_FLAG(33) = 0;
|
||||
SI_AREA_FLAG(34) = 0;
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 12;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(triggerCoord_802446AC);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 12;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_802446AC);
|
||||
});
|
||||
|
||||
static s32 N(pad_4734)[] = {
|
||||
|
@ -19,8 +19,8 @@ Script N(exitWalk_802406F0) = EXIT_WALK_SCRIPT(60, 0, "kmr_04", 0);
|
||||
Script N(exitWalk_8024074C) = EXIT_WALK_SCRIPT(60, 1, "kmr_05", 0);
|
||||
|
||||
Script N(802407A8) = SCRIPT({
|
||||
bind N(exitWalk_802406F0) to TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_8024074C) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_802406F0) TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_8024074C) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -65,10 +65,10 @@ Vec4f N(tree1Point) = { -42.0f, 0.0f, -13.0f, 0.0f };
|
||||
|
||||
Script N(802422B8) = SCRIPT({
|
||||
SI_VAR(0) = N(bush1);
|
||||
bind N(searchBush) to TRIGGER_WALL_PRESS_A 53;
|
||||
bind N(searchBush) TRIGGER_WALL_PRESS_A 53;
|
||||
|
||||
SI_VAR(0) = N(tree1);
|
||||
bind N(shakeTree) to TRIGGER_WALL_HAMMER 52;
|
||||
bind N(shakeTree) to TRIGGER_POINT_BOMB N(tree1Point);
|
||||
bind N(shakeTree) TRIGGER_WALL_HAMMER 52;
|
||||
bind N(shakeTree) TRIGGER_POINT_BOMB N(tree1Point);
|
||||
});
|
||||
|
||||
|
@ -6,8 +6,8 @@ Script N(ExitWest) = EXIT_WALK_SCRIPT(60, 0, "kmr_07", 1);
|
||||
Script N(ExitEast) = EXIT_WALK_SCRIPT(60, 1, "kmr_11", 0);
|
||||
|
||||
Script N(BindExits) = SCRIPT({
|
||||
bind N(ExitWest) to TRIGGER_FLOOR_ABOVE 0; // deili1
|
||||
bind N(ExitEast) to TRIGGER_FLOOR_ABOVE 3; // deili2
|
||||
bind N(ExitWest) TRIGGER_FLOOR_ABOVE 0; // deili1
|
||||
bind N(ExitEast) TRIGGER_FLOOR_ABOVE 3; // deili2
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
@ -22,7 +22,7 @@ Script N(main) = SCRIPT({
|
||||
SI_VAR(0) = N(BindExits);
|
||||
spawn EnterWalk;
|
||||
sleep 1;
|
||||
bind N(ReadWestSign) to TRIGGER_WALL_PRESS_A 10;
|
||||
bind N(ReadWestSign) TRIGGER_WALL_PRESS_A 10;
|
||||
});
|
||||
|
||||
NpcAISettings N(goombaAISettings) = {
|
||||
@ -92,10 +92,12 @@ Script N(GoombaIdle) = SCRIPT({
|
||||
SetSelfEnemyFlagBits(NPC_FLAG_NO_AI, TRUE);
|
||||
|
||||
// Wait until read_sign sets NPC var 0
|
||||
loop {
|
||||
0:
|
||||
GetSelfVar(0, SI_VAR(0));
|
||||
sleep 1;
|
||||
} until(SI_VAR(0) == FALSE)
|
||||
if (SI_VAR(0) == FALSE) {
|
||||
goto 0;
|
||||
}
|
||||
|
||||
// Peel and jump off the sign
|
||||
SetNpcFlagBits(NPC_SELF, 0x240000, TRUE);
|
||||
@ -131,7 +133,7 @@ Script N(GoombaIdle) = SCRIPT({
|
||||
SetSelfEnemyFlagBits(NPC_FLAG_NO_ANIMS_LOADED, TRUE);
|
||||
|
||||
// We're done jumping off; the player can read the sign again
|
||||
bind N(ReadWestSign) to TRIGGER_WALL_PRESS_A 10;
|
||||
bind N(ReadWestSign) TRIGGER_WALL_PRESS_A 10;
|
||||
|
||||
// Behave like a normal enemy from now on
|
||||
BindNpcAI(NPC_SELF, N(GoombaAI));
|
||||
|
@ -23,8 +23,8 @@ Script N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 1, "sbk_01", 0);
|
||||
Script N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 3, "sbk_10", 2);
|
||||
|
||||
Script N(80240198) = SCRIPT({
|
||||
bind N(exitWalk_802400E0) to TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_8024013C) to TRIGGER_FLOOR_ABOVE 6;
|
||||
bind N(exitWalk_802400E0) TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_8024013C) TRIGGER_FLOOR_ABOVE 6;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -28,9 +28,9 @@ Script N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 1, "sbk_02", 0);
|
||||
Script N(exitWalk_80240198) = EXIT_WALK_SCRIPT(60, 3, "sbk_11", 2);
|
||||
|
||||
Script N(802401F4) = SCRIPT({
|
||||
bind N(exitWalk_802400E0) to TRIGGER_FLOOR_ABOVE 7;
|
||||
bind N(exitWalk_8024013C) to TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_80240198) to TRIGGER_FLOOR_ABOVE 5;
|
||||
bind N(exitWalk_802400E0) TRIGGER_FLOOR_ABOVE 7;
|
||||
bind N(exitWalk_8024013C) TRIGGER_FLOOR_ABOVE 3;
|
||||
bind N(exitWalk_80240198) TRIGGER_FLOOR_ABOVE 5;
|
||||
});
|
||||
|
||||
Script N(main) = SCRIPT({
|
||||
|
@ -78,177 +78,173 @@ ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
Script N(searchBush) = {
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_4, SI_VAR(1), SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(5), SI_VAR(15), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(3), SI_FIXED(0.1005859375), 1, SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtModel, SI_VAR(3), 339, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(3), SI_FIXED(0.1005859375), -1, SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_VAR(3), 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(2), 0),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(5), SI_VAR(6), SI_VAR(7)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(8), SI_VAR(9), SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(10), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, DropItemEntity, SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, GetValueByRef, SI_VAR(10), SI_VAR(11)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(11), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetValueByRef, SI_VAR(10), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, DropItemEntity, SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(4), 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, 0xFE363C84),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(searchBush) = SCRIPT({
|
||||
buf_use SI_VAR(0);
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4);
|
||||
GetPlayerPos(SI_VAR(5), SI_VAR(15), SI_VAR(7));
|
||||
spawn {
|
||||
SI_FLAG(0) = 0;
|
||||
if (SI_VAR(1) != NULL) {
|
||||
loop 5 {
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
N(TransformFoliage)(SI_VAR(3), 0.1, 1, SI_VAR(15), 0);
|
||||
if (SI_FLAG(0) == 0) {
|
||||
SI_FLAG(0) = 1;
|
||||
PlaySoundAtModel(SI_VAR(3), 339, 0);
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
N(TransformFoliage)(SI_VAR(3), 0.1, -1, SI_VAR(15), 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
TranslateModel(SI_VAR(3), 0, 0, 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
}
|
||||
spawn {
|
||||
if (SI_VAR(2) != NULL) {
|
||||
buf_use SI_VAR(2);
|
||||
buf_read SI_VAR(3);
|
||||
loop SI_VAR(3) {
|
||||
buf_read SI_VAR(4);
|
||||
buf_read SI_VAR(5) SI_VAR(6) SI_VAR(7);
|
||||
buf_read SI_VAR(8) SI_VAR(9) SI_VAR(10);
|
||||
if (SI_VAR(10) == 0) {
|
||||
DropItemEntity(SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9));
|
||||
} else {
|
||||
GetValueByRef(SI_VAR(10), SI_VAR(11));
|
||||
if (SI_VAR(11) == 0) {
|
||||
SetValueByRef(SI_VAR(10), 1);
|
||||
DropItemEntity(SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sleep 15;
|
||||
if (SI_VAR(4) != NULL) {
|
||||
await SI_VAR(4);
|
||||
}
|
||||
});
|
||||
|
||||
Script N(shakeTree) = {
|
||||
SI_CMD(ScriptOpcode_SET_TIMESCALE, SI_FIXED(2.0)),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_4, SI_VAR(1), SI_VAR(2), SI_VAR(3), SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_CALL, GetPlayerPos, SI_VAR(6), SI_VAR(15), SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 357),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySound, 358),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(1), 0),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(3), SI_FIXED(0.1005859375), SI_FIXED(0.2001953125), SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtModel, SI_VAR(3), 358, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(3), SI_FIXED(0.1005859375), SI_FIXED(-0.19921875), SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(1)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_VAR(3), 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(2), 0),
|
||||
SI_CMD(ScriptOpcode_LOOP, 5),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(4), SI_FIXED(0.1005859375), SI_FIXED(0.2001953125), SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_FLAG(0), 0),
|
||||
SI_CMD(ScriptOpcode_SET, SI_FLAG(0), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, PlaySoundAtModel, SI_VAR(4), 357, 0),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, N(TransformFoliage), SI_VAR(4), SI_FIXED(0.1005859375), SI_FIXED(-0.19921875), SI_VAR(15), 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(2)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_CALL, TranslateModel, SI_VAR(4), 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(3), 0),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(3)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(6), SI_VAR(7), SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(9), SI_VAR(10), SI_VAR(11)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(11), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, DropItemEntity, SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_ELSE),
|
||||
SI_CMD(ScriptOpcode_CALL, GetValueByRef, SI_VAR(11), SI_VAR(12)),
|
||||
SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(12), 0),
|
||||
SI_CMD(ScriptOpcode_CALL, SetValueByRef, SI_VAR(11), 1),
|
||||
SI_CMD(ScriptOpcode_CALL, DropItemEntity, SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(4), 0),
|
||||
SI_CMD(ScriptOpcode_USE_BUFFER, SI_VAR(4)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_1, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_LOOP, SI_VAR(5)),
|
||||
SI_CMD(ScriptOpcode_BUFFER_READ_3, SI_VAR(6), SI_VAR(7), SI_VAR(8)),
|
||||
SI_CMD(ScriptOpcode_CALL, PlayEffect, 20, 0, SI_VAR(6), SI_VAR(7), SI_VAR(8), 100, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
SI_CMD(ScriptOpcode_END_LOOP),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_END_SPAWN_THREAD),
|
||||
SI_CMD(ScriptOpcode_IF_NE, SI_VAR(5), 0),
|
||||
SI_CMD(ScriptOpcode_AWAIT_SCRIPT, 0xFE363C85),
|
||||
SI_CMD(ScriptOpcode_END_IF),
|
||||
SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
Script N(shakeTree) = SCRIPT({
|
||||
timescale 2.0;
|
||||
buf_use SI_VAR(0);
|
||||
buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4);
|
||||
buf_read SI_VAR(5);
|
||||
GetPlayerPos(SI_VAR(6), SI_VAR(15), SI_VAR(8));
|
||||
PlaySound(0x165);
|
||||
PlaySound(0x166);
|
||||
spawn {
|
||||
SI_FLAG(0) = 0;
|
||||
if (SI_VAR(1) != NULL) {
|
||||
sleep 1;
|
||||
loop 5 {
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
N(TransformFoliage)(SI_VAR(3), 0.1, 0.2, SI_VAR(15), 0);
|
||||
if (SI_FLAG(0) == 0) {
|
||||
SI_FLAG(0) = 1;
|
||||
PlaySoundAtModel(SI_VAR(3), 358, 0);
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
N(TransformFoliage)(SI_VAR(3), 0.1, -0.2, SI_VAR(15), 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
buf_use SI_VAR(1);
|
||||
buf_read SI_VAR(2);
|
||||
loop SI_VAR(2) {
|
||||
buf_read SI_VAR(3);
|
||||
TranslateModel(SI_VAR(3), 0, 0, 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
}
|
||||
spawn {
|
||||
SI_FLAG(0) = 0;
|
||||
if (SI_VAR(2) != NULL) {
|
||||
loop 5 {
|
||||
buf_use SI_VAR(2);
|
||||
buf_read SI_VAR(3);
|
||||
loop SI_VAR(3) {
|
||||
buf_read SI_VAR(4);
|
||||
N(TransformFoliage)(SI_VAR(4), 0.1, 0.2, SI_VAR(15), 0);
|
||||
if (SI_FLAG(0) == 0) {
|
||||
SI_FLAG(0) = 1;
|
||||
PlaySoundAtModel(SI_VAR(4), 357, 0);
|
||||
}
|
||||
}
|
||||
sleep 1;
|
||||
buf_use SI_VAR(2);
|
||||
buf_read SI_VAR(3);
|
||||
loop SI_VAR(3) {
|
||||
buf_read SI_VAR(4);
|
||||
N(TransformFoliage)(SI_VAR(4), 0.1, -0.2, SI_VAR(15), 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
buf_use SI_VAR(2);
|
||||
buf_read SI_VAR(3);
|
||||
loop SI_VAR(3) {
|
||||
buf_read SI_VAR(4);
|
||||
TranslateModel(SI_VAR(4), 0, 0, 0);
|
||||
}
|
||||
sleep 1;
|
||||
}
|
||||
}
|
||||
spawn {
|
||||
if (SI_VAR(3) != NULL) {
|
||||
buf_use SI_VAR(3);
|
||||
buf_read SI_VAR(4);
|
||||
loop SI_VAR(4) {
|
||||
buf_read SI_VAR(5);
|
||||
buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8);
|
||||
buf_read SI_VAR(9) SI_VAR(10) SI_VAR(11);
|
||||
if (SI_VAR(11) == 0) {
|
||||
DropItemEntity(SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10));
|
||||
} else {
|
||||
GetValueByRef(SI_VAR(11), SI_VAR(12));
|
||||
if (SI_VAR(12) == 0) {
|
||||
SetValueByRef(SI_VAR(11), 1);
|
||||
DropItemEntity(SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
spawn {
|
||||
if (SI_VAR(4) != NULL) {
|
||||
buf_use SI_VAR(4);
|
||||
buf_read SI_VAR(5);
|
||||
loop SI_VAR(5) {
|
||||
buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8);
|
||||
PlayEffect(0x14, 0, SI_VAR(6), SI_VAR(7), SI_VAR(8), 100, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SI_VAR(5) != NULL) {
|
||||
await SI_VAR(5);
|
||||
}
|
||||
sleep 15;
|
||||
});
|
||||
|
@ -53,23 +53,35 @@ script_parser = Lark(r"""
|
||||
| "await" expr -> await_stmt
|
||||
| "jump" expr -> jump_stmt
|
||||
| lhs "=" "spawn" expr -> spawn_set_stmt
|
||||
| lhs "=" "does_script_exist" expr -> does_script_exist
|
||||
| lhs set_op expr -> set_stmt
|
||||
| lhs set_op "(int)" expr -> set_int_stmt
|
||||
| lhs set_op "(float)" expr -> set_float_stmt
|
||||
| lhs set_op "(const)" expr -> set_const_stmt
|
||||
| bind_stmt
|
||||
| bind_set_stmt
|
||||
| "bind_padlock" expr expr collider_id expr -> bind_padlock_stmt
|
||||
| "unbind" -> unbind_stmt
|
||||
| "priority" expr -> set_priority
|
||||
| "timescale" expr -> set_timescale
|
||||
| "group" expr -> set_group
|
||||
| suspend_stmt
|
||||
| resume_stmt
|
||||
| kill_stmt
|
||||
| "buf_use" expr -> buf_use
|
||||
| "buf_read" expr+ -> buf_read
|
||||
| "buf_peek" expr expr -> buf_peek
|
||||
| "buf_usef" expr -> buf_usef
|
||||
| "buf_readf" expr+ -> buf_readf
|
||||
| "buf_peekf" expr expr -> buf_peekf
|
||||
| "arr_use" expr -> use_array
|
||||
| "flags_use" expr -> use_flags
|
||||
| "arr_new" expr expr -> new_array
|
||||
|
||||
?stmt_no_semi: label ":" -> label_decl
|
||||
| if_stmt
|
||||
| match_stmt
|
||||
| loop_stmt
|
||||
| loop_until_stmt
|
||||
| ["await"] block -> block_stmt
|
||||
| "spawn" block -> spawn_block_stmt
|
||||
| "parallel" block -> parallel_block_stmt
|
||||
@ -93,7 +105,7 @@ script_parser = Lark(r"""
|
||||
| match_case
|
||||
?match_case: "else" block -> case_else
|
||||
| cond_op expr ["," multi_case] block -> case_op
|
||||
| expr ".." expr ["," multi_case] block -> case_range
|
||||
| expr "..." expr ["," multi_case] block -> case_range
|
||||
| multi_case block -> case_multi
|
||||
multi_case: expr ("," expr)*
|
||||
|
||||
@ -104,14 +116,16 @@ script_parser = Lark(r"""
|
||||
| "others" -> control_type_others
|
||||
| ["script"] -> control_type_script
|
||||
|
||||
bind_stmt: "bind" expr "to" expr expr
|
||||
bind_set_stmt: lhs "=" "bind" expr "to" expr expr
|
||||
bind_stmt: "bind" expr expr collider_id
|
||||
bind_set_stmt: lhs "=" "bind" expr expr collider_id
|
||||
|
||||
loop_stmt: "loop" [expr] block
|
||||
loop_until_stmt: "loop" block "until" "(" expr cond_op expr ")"
|
||||
|
||||
var_decl: ("int"|"float") variable
|
||||
|
||||
?collider_id: "entity" "(" expr ")" -> entity_id
|
||||
| expr
|
||||
|
||||
?expr: c_const_expr
|
||||
| ESCAPED_STRING
|
||||
| SIGNED_INT
|
||||
@ -224,10 +238,6 @@ class LoopCtx(CmdCtx):
|
||||
def break_opcode(self, meta):
|
||||
return "ScriptOpcode_BREAK_LOOP"
|
||||
|
||||
class LoopUntilCtx(CmdCtx):
|
||||
def break_opcode(self, meta):
|
||||
raise CompileError("breaking out of a loop..until is not supported (hint: use a label)", meta)
|
||||
|
||||
class LabelCtx(CmdCtx):
|
||||
def __init__(self, label):
|
||||
super().__init__()
|
||||
@ -442,24 +452,6 @@ class Compile(Transformer):
|
||||
|
||||
return [ Cmd("ScriptOpcode_LOOP", expr, meta=tree.meta), *block, Cmd("ScriptOpcode_END_LOOP") ]
|
||||
|
||||
# loop..until pseudoinstruction
|
||||
def loop_until_stmt(self, tree):
|
||||
block, a, op, b = tree.children
|
||||
|
||||
for cmd in block:
|
||||
if isinstance(cmd, BaseCmd):
|
||||
cmd.add_context(LoopUntilCtx())
|
||||
|
||||
label = self.alloc.gen_label()
|
||||
|
||||
return [
|
||||
Cmd("ScriptOpcode_LABEL", label, meta=tree.meta),
|
||||
*block,
|
||||
Cmd(op["if"], a, b, meta=tree.meta),
|
||||
Cmd("ScriptOpcode_GOTO", label, meta=tree.meta),
|
||||
Cmd("ScriptOpcode_END_IF", meta=tree.meta),
|
||||
]
|
||||
|
||||
def return_stmt(self, tree):
|
||||
return Cmd("ScriptOpcode_RETURN", meta=tree.meta)
|
||||
|
||||
@ -472,6 +464,12 @@ class Compile(Transformer):
|
||||
def break_loop_stmt(self, tree):
|
||||
return Cmd("ScriptOpcode_BREAK_LOOP", meta=tree.meta)
|
||||
|
||||
def set_priority(self, tree):
|
||||
return Cmd("ScriptOpcode_SET_PRIORITY", tree.children[0], meta=tree.meta)
|
||||
|
||||
def set_timescale(self, tree):
|
||||
return Cmd("ScriptOpcode_SET_TIMESCALE", tree.children[0], meta=tree.meta)
|
||||
|
||||
def set_group(self, tree):
|
||||
return Cmd("ScriptOpcode_SET_GROUP", tree.children[0], meta=tree.meta)
|
||||
|
||||
@ -527,6 +525,9 @@ class Compile(Transformer):
|
||||
def bind_set_stmt(self, tree):
|
||||
ret, script, trigger, target = tree.children
|
||||
return Cmd("ScriptOpcode_BIND_TRIGGER", script, trigger, target, 1, ret, meta=tree.meta)
|
||||
def bind_padlock_stmt(self, tree):
|
||||
script, trigger, target, items = tree.children
|
||||
return Cmd("ScriptOpcode_BIND_PADLOCK", script, trigger, target, items, 0, 1, meta=tree.meta)
|
||||
def unbind_stmt(self, tree):
|
||||
return Cmd("ScriptOpcode_UNBIND", meta=tree.meta)
|
||||
|
||||
@ -671,6 +672,64 @@ class Compile(Transformer):
|
||||
cmd.add_context(ParallelCtx())
|
||||
return [ Cmd("ScriptOpcode_PARALLEL_THREAD", meta=tree.meta), *block, Cmd("ScriptOpcode_END_PARALLEL_THREAD") ]
|
||||
|
||||
def entity_id(self, tree):
|
||||
expr, = tree.children
|
||||
return f"({expr} + 0x4000)"
|
||||
|
||||
def buf_use(self, tree):
|
||||
return Cmd("ScriptOpcode_USE_BUFFER", tree.children[0], meta=tree.meta)
|
||||
def buf_read(self, tree):
|
||||
args = tree.children
|
||||
cmds = []
|
||||
|
||||
while args:
|
||||
if len(args) >= 4:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_4", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 3:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_3", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 2:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_2", args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 1:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_1", args.pop(0), meta=tree.meta))
|
||||
else:
|
||||
break
|
||||
|
||||
return cmds
|
||||
def buf_peek(self, tree):
|
||||
return Cmd("ScriptOpcode_BUFFER_PEEK", tree.children[0], tree.children[1], meta=tree.meta)
|
||||
|
||||
def buf_usef(self, tree):
|
||||
return Cmd("ScriptOpcode_USE_BUFFER_F", tree.children[0], meta=tree.meta)
|
||||
def buf_readf(self, tree):
|
||||
args = tree.children
|
||||
cmds = []
|
||||
|
||||
while args:
|
||||
if len(args) >= 4:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_4_F", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 3:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_3_F", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 2:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_2_F", args.pop(0), args.pop(0), meta=tree.meta))
|
||||
elif len(args) == 1:
|
||||
cmds.append(Cmd("ScriptOpcode_BUFFER_READ_1_F", args.pop(0), meta=tree.meta))
|
||||
else:
|
||||
break
|
||||
|
||||
return cmds
|
||||
def buf_peekf(self, tree):
|
||||
return Cmd("ScriptOpcode_BUFFER_PEEK_F", tree.children[0], tree.children[1], meta=tree.meta)
|
||||
|
||||
def use_array(self, tree):
|
||||
return Cmd("ScriptOpcode_USE_ARRAY", tree.children[0], meta=tree.meta)
|
||||
def use_flags(self, tree):
|
||||
return Cmd("ScriptOpcode_USE_FLAGS", tree.children[0], meta=tree.meta)
|
||||
def new_array(self, tree):
|
||||
return Cmd("ScriptOpcode_NEW_ARRAY", tree.children[0], tree.children[1], meta=tree.meta)
|
||||
|
||||
def does_script_exist(self, tree):
|
||||
return Cmd("ScriptOpcode_DOES_SCRIPT_EXIST", tree.children[1], tree.children[0], meta=tree.meta)
|
||||
|
||||
def compile_script(s):
|
||||
tree = script_parser.parse(s)
|
||||
|
||||
|
@ -322,7 +322,7 @@ class Configure:
|
||||
else:
|
||||
with entry.src_paths[0].open() as f:
|
||||
s = f.read()
|
||||
if "SCRIPT(" in s or "#pragma SCRIPT" in s:
|
||||
if "SCRIPT(" in s or "#pragma SCRIPT" or "#include \"world/common/foliage.inc.c\"" in s:
|
||||
task = "cc_dsl"
|
||||
|
||||
build(entry.object_path, entry.src_paths, task)
|
||||
|
@ -297,7 +297,7 @@ def fix_args(self, func, args, info):
|
||||
new_args.append(f"{int(argNum)}")
|
||||
else:
|
||||
#Print the unknowns in hex
|
||||
new_args.append(f"0x{int(argNum):X}")
|
||||
new_args.append(self.var(argNum))
|
||||
|
||||
else:
|
||||
new_args.append(f"{arg}")
|
||||
@ -569,7 +569,7 @@ class ScriptDisassembler:
|
||||
def addr_ref(self, addr, isArg=False):
|
||||
if addr in self.symbol_map:
|
||||
return self.replace_star_rod_prefix(addr, isArg)
|
||||
return f"0x{addr:08X}"
|
||||
return self.var(addr) #f"0x{addr:08X}"
|
||||
|
||||
def trigger(self, trigger):
|
||||
if trigger == 0x00000040: trigger = "TRIGGER_WALL_PUSH"
|
||||
@ -780,7 +780,7 @@ class ScriptDisassembler:
|
||||
elif opcode == 0x52: self.write_line(f"SI_CMD(ScriptOpcode_RESUME_OTHERS, {self.var(argv[0])}),")
|
||||
elif opcode == 0x53: self.write_line(f"SI_CMD(ScriptOpcode_SUSPEND_SCRIPT, {self.var(argv[0])}),")
|
||||
elif opcode == 0x54: self.write_line(f"SI_CMD(ScriptOpcode_RESUME_SCRIPT, {self.var(argv[0])}),")
|
||||
elif opcode == 0x55: self.write_line(f"SI_CMD(ScriptOpcode_SCRIPT_EXISTS, {self.var(argv[0])}, {self.var(argv[1])}),")
|
||||
elif opcode == 0x55: self.write_line(f"SI_CMD(ScriptOpcode_DOES_SCRIPT_EXIST, {self.var(argv[0])}, {self.var(argv[1])}),")
|
||||
elif opcode == 0x56:
|
||||
self.write_line("SI_CMD(ScriptOpcode_SPAWN_THREAD),")
|
||||
self.indent += 1
|
||||
@ -858,6 +858,13 @@ class ScriptDSLDisassembler(ScriptDisassembler):
|
||||
else:
|
||||
return f"{arg}"
|
||||
|
||||
# TODO: use map's collider names when split
|
||||
def collider_id(self, arg):
|
||||
if arg >= 0x4000 and arg <= 0x5000:
|
||||
return f"entity({arg - 0x4000})"
|
||||
else:
|
||||
return arg
|
||||
|
||||
def is_float(self, var):
|
||||
try:
|
||||
float(var)
|
||||
@ -1067,12 +1074,12 @@ class ScriptDSLDisassembler(ScriptDisassembler):
|
||||
self.case_stack.append("CASE")
|
||||
self.write_line(f"? {self.replace_enum(argv[0], True)}")
|
||||
elif opcode == 0x20:
|
||||
if not self.was_multi_case:
|
||||
raise UnsupportedScript("unexpected SI_END_MULTI_CASE")
|
||||
#if not self.was_multi_case:
|
||||
# raise UnsupportedScript("unexpected END_MULTI_CASE")
|
||||
pass
|
||||
elif opcode == 0x21:
|
||||
self.indent -= 1
|
||||
self.write_line(f"{self.replace_enum(argv[0], True)}..{self.replace_enum(argv[1], True)}")
|
||||
self.indent += 1
|
||||
self.case_stack.append("CASE")
|
||||
self.write(f"{self.replace_enum(argv[0], True)} ... {self.replace_enum(argv[1], True)}")
|
||||
elif opcode == 0x22: self.write_line("break match;")
|
||||
elif opcode == 0x23:
|
||||
# close open case if needed
|
||||
@ -1143,6 +1150,21 @@ class ScriptDSLDisassembler(ScriptDisassembler):
|
||||
self.write_line(f"{self.var(argv[0])} /= {lhs};")
|
||||
else:
|
||||
self.write_line(f"{self.var(argv[0])} /= (float) {lhs};")
|
||||
elif opcode == 0x30: self.write_line(f"buf_use {self.addr_ref(argv[0])};")
|
||||
elif opcode == 0x31: self.write_line(f"buf_read {self.var(argv[0])};")
|
||||
elif opcode == 0x32: self.write_line(f"buf_read {self.var(argv[0])} {self.var(argv[1])};")
|
||||
elif opcode == 0x33: self.write_line(f"buf_read {self.var(argv[0])} {self.var(argv[1])} {self.var(argv[2])};")
|
||||
elif opcode == 0x34: self.write_line(f"buf_read {self.var(argv[0])} {self.var(argv[1])} {self.var(argv[2])} {self.var(argv[3])};")
|
||||
elif opcode == 0x35: self.write_line(f"buf_peek {self.var(argv[0])} {self.var(argv[1])};")
|
||||
elif opcode == 0x36: self.write_line(f"buf_usef {self.var(argv[0])};")
|
||||
elif opcode == 0x37: self.write_line(f"buf_readf {self.var(argv[0])};")
|
||||
elif opcode == 0x38: self.write_line(f"buf_readf {self.var(argv[0])} {self.var(argv[1])};")
|
||||
elif opcode == 0x39: self.write_line(f"buf_readf {self.var(argv[0])} {self.var(argv[1])} {self.var(argv[2])};")
|
||||
elif opcode == 0x3A: self.write_line(f"buf_readf {self.var(argv[0])} {self.var(argv[1])} {self.var(argv[2])} {self.var(argv[3])};")
|
||||
elif opcode == 0x3B: self.write_line(f"buf_peekf {self.var(argv[0])} {self.var(argv[1])};")
|
||||
elif opcode == 0x3C: self.write_line(f"arr_use {self.addr_ref(argv[0])};")
|
||||
elif opcode == 0x3D: self.write_line(f"flags_use {self.addr_ref(argv[0])};")
|
||||
elif opcode == 0x3E: self.write_line(f"arr_new {self.var(argv[0])} {self.addr_ref(argv[1])};")
|
||||
elif opcode == 0x3F: self.write_line(f"{self.var(argv[0])} &= {self.var(argv[1])};")
|
||||
elif opcode == 0x40: self.write_line(f"{self.var(argv[0])} |= {self.var(argv[1])};")
|
||||
elif opcode == 0x41: self.write_line(f"{self.var(argv[0])} &= (const) 0x{argv[1]:X};")
|
||||
@ -1174,19 +1196,26 @@ class ScriptDSLDisassembler(ScriptDisassembler):
|
||||
elif opcode == 0x47:
|
||||
assert argv[3] == 1
|
||||
if argv[4] != 0:
|
||||
self.write_line(f"{self.var(argv[4])} = bind {self.addr_ref(argv[0])} to {self.trigger(argv[1])} {self.var(argv[2])};")
|
||||
self.write_line(f"{self.var(argv[4])} = bind {self.addr_ref(argv[0])} {self.trigger(argv[1])} {self.collider_id(argv[2])};")
|
||||
else:
|
||||
self.write_line(f"bind {self.addr_ref(argv[0])} to {self.trigger(argv[1])} {self.var(argv[2])};")
|
||||
self.write_line(f"bind {self.addr_ref(argv[0])} {self.trigger(argv[1])} {self.collider_id(argv[2])};")
|
||||
elif opcode == 0x48: self.write_line(f"unbind;")
|
||||
elif opcode == 0x49: self.write_line(f"kill {self.var(argv[0])};")
|
||||
elif opcode == 0x4A: self.write_line(f"jump {self.var(argv[0])};")
|
||||
elif opcode == 0x4B: self.write_line(f"priority ({self.var(argv[0])};")
|
||||
elif opcode == 0x4C: self.write_line(f"timescale {self.var(argv[0])};")
|
||||
elif opcode == 0x4D: self.write_line(f"group {self.var(argv[0])};")
|
||||
elif opcode == 0x4E:
|
||||
assert argv[4] == 0
|
||||
assert argv[5] == 1
|
||||
self.write_line(f"bind_padlock {self.addr_ref(argv[0])} {self.trigger(argv[1])} {self.collider_id(argv[2])} {self.addr_ref(argv[3])};")
|
||||
elif opcode == 0x4F: self.write_line(f"suspend group {self.var(argv[0])};")
|
||||
elif opcode == 0x50: self.write_line(f"resume group {self.var(argv[0])};")
|
||||
elif opcode == 0x51: self.write_line(f"suspend others {self.var(argv[0])};")
|
||||
elif opcode == 0x52: self.write_line(f"resume others {self.var(argv[0])};")
|
||||
elif opcode == 0x53: self.write_line(f"suspend {self.var(argv[0])};")
|
||||
elif opcode == 0x54: self.write_line(f"resume {self.var(argv[0])};")
|
||||
elif opcode == 0x55: self.write_line(f"{self.var(argv[1])} = does_script_exist {self.var(argv[0])};")
|
||||
elif opcode == 0x56:
|
||||
self.write_line("spawn {")
|
||||
self.indent += 1
|
||||
|
@ -163,7 +163,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
script_text = f"// Unable to use DSL: {e}\n"
|
||||
|
||||
bytes.seek(pos)
|
||||
script_text = disasm_script.ScriptDisassembler(bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED).disassemble()
|
||||
script_text += disasm_script.ScriptDisassembler(bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED).disassemble()
|
||||
|
||||
if "shakeTree" in name or "searchBush" in name:
|
||||
symbol_map[struct["vaddr"]][0][1] = name.split("_",1)[0] + ")"
|
||||
|
Loading…
Reference in New Issue
Block a user