summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_npc_ks.cpp
diff options
context:
space:
mode:
authorCarco_21 <144170194+carter-ktb21@users.noreply.github.com>2025-06-07 12:41:01 -0400
committerGitHub <noreply@github.com>2025-06-07 19:41:01 +0300
commit3318b5e93660b5fc1ae5a6ab29e01d22d21105ff (patch)
treea2aebc982934d29965778f1534ac02ec39a30685 /src/d/actor/d_a_npc_ks.cpp
parent372d7822823643eb290fe5e0ba9a733d29776b81 (diff)
Continued monkey work (monkey business if you will) - Monkey-related TUs (#2469)
* Initial work * Work on ori2 and others * Work on npc_ks_home * Work on npc_ks_demo_022 * Chugging through * Started on demo_camera * More demo_camera work * 51% equivalent * General cleanup * Fixed compile error in d_a_e_mk * Small d_a_e_mk fix * d_a_e_fs fix * PR cleanup * Started work on d_a_obj_sw * d_a_obj_sw work * Small fixes * d_a_obj_so work * d_a_obj_so almost equivalent and small work on d_a_npc_ks * Work on npc_ks_guide_00 * Work on guide functions * 80% matching * Almost have all functions worked on * All functions worked on * Initial d_a_npc_saru work * Tiny bit more work * daNpc_Saru almost matching * fixed array issue * obj_kago work * d_a_obj_kago almost matching * sare_npc brief fix * PR cleanup
Diffstat (limited to 'src/d/actor/d_a_npc_ks.cpp')
-rw-r--r--src/d/actor/d_a_npc_ks.cpp4473
1 files changed, 3343 insertions, 1130 deletions
diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp
index 9c2a704427..641e7596da 100644
--- a/src/d/actor/d_a_npc_ks.cpp
+++ b/src/d/actor/d_a_npc_ks.cpp
@@ -4,8 +4,8 @@
*/
#include "d/actor/d_a_npc_ks.h"
+#include "d/actor/d_a_obj_kago.h"
#include "d/d_cc_d.h"
-#include "dol2asm.h"
#include "d/d_camera.h"
#include "d/d_com_inf_game.h"
#include "d/d_bomb.h"
@@ -23,6 +23,7 @@
#include "d/d_meter2_info.h"
#include "cmath.h"
#include "d/actor/d_a_e_oc.h"
+#include "d/d_stage.h"
#include "Z2AudioLib/Z2Instances.h"
UNK_REL_DATA;
@@ -32,425 +33,171 @@ static npc_ks_class* saru_p[8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+struct path {
+ int field_0x0;
+ f32 field_0x4;
+ f32 field_0x8;
+ f32 field_0xc;
+ u32 field_0x10;
+ u32 field_0x14;
+ u32 field_0x18;
+ u32 field_0x1c;
+ u32 field_0x20;
+ u32 field_0x24;
+ u32 field_0x28;
+ u32 field_0x2c;
+ u32 field_0x30;
+};
+
/* 80A5E4D0-80A5E63C 000078 016C+00 1/1 0/0 0/0 .data guide_path_04 */
-static f32 guide_path_04[91] = {
- // 0, -4554.0f, 3893.0f, -2377.0f, 0, 0, 0
- // 0, 0, 0, 0, 0, 0, 1,
- // -3379.0f, 3944.0f, -2314.0f, 0, 0, 0, 0,
- // 0, 0, 0, 0, 0, 1, -1887.0f,
- // 3944.0f, -2184.0f, 0, 0, 0, 0, 0,
- // 0, 0, 0, 0, 1, -912.0f, 3907.0f,
- // -2243.0f, 0, 0, 0, 0, 0, 0,
- // 0, 0, 0, 0, 100.0f, 3900.0f, -2536.0f,
- // 0, 0, 0, 0, 0, 0, 0,
- // 0, 0, 1, 519.0f, 4590.0f, -2889.0f, 0,
- // 0, 0, 0, 0, 0, 0, 0,
- // 0, -1, 0, 0, 0, 0, 0,
- // 0, 0, 0, 0, 0, 0, 0,
- 0x00000000, 0xC58E5000, 0x45735000, 0xC5149000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
- 0xC5533000, 0x45768000, 0xC510A000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4EBE000,
- 0x45768000, 0xC5088000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4640000, 0x45743000,
- 0xC50C3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x42C80000, 0x4573C000, 0xC51E8000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000001, 0x4401C000, 0x458F7000, 0xC5349000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+static path guide_path_04[7] = {
+ { 0, -4554.0f, 3893.0f, -2377.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, -3379.0f, 3944.0f, -2314.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, -1887.0f, 3944.0f, -2184.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, -912.0f, 3907.0f, -2243.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 100.0f, 3900.0f, -2536.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 519.0f, 4590.0f, -2889.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
/* 80A5E67C-80A5E780 000224 0104+00 1/1 0/0 0/0 .data move_path_02 */
-static f32 move_path_02[65] = {
- 0x00000000, 0x462A7800, 0x456A4000, 0x4590B000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x462BE800, 0x456A4000,
- 0x457F5000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x46334800,
- 0x456A4000, 0x4567D000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x463B9C00, 0x45672000, 0x455E1000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x463D1C00, 0x4544C000, 0x4594C000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000,
+static path move_path_02[5] = {
+ { 0, 10910.0f, 3748.0f, 4630.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 11002.0f, 3748.0f, 4085.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 11474.0f, 3748.0f, 3709.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 12007.0f, 3698.0f, 3553.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 12103.0f, 3148.0f, 4760.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5E948-80A5E94C 0004F0 0004+00 1/1 0/0 0/0 .data yuka_jump_x */
static f32 yuka_jump_x = 80.0f;
/* 80A5EA24-80A5EC2C 0005CC 0208+00 1/1 0/0 0/0 .data guide_path_00 */
-static u8 guide_path_00[520] = {
- 0x00, 0x00, 0x00, 0x00, 0x42, 0x58, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xA6, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x1C, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00,
- 0x45, 0xAE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x70, 0x00, 0x00,
- 0x45, 0x4C, 0xC0, 0x00, 0x45, 0xB6, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x41, 0x00, 0x00, 0x00, 0x45, 0x4A, 0x20, 0x00, 0x45, 0xBF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xBF, 0x80, 0x00, 0x00, 0x45, 0x47, 0xE0, 0x00, 0x45, 0xC7, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x45, 0x45, 0xA0, 0x00,
- 0x45, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00,
- 0x45, 0x44, 0xE0, 0x00, 0x45, 0xD6, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x43, 0x1F, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xDD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x43, 0x92, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xE1, 0x98, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path guide_path_00[10] = {
+ { 0, 54.0f, 3300.0f, 5328.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 39.0f, 3300.0f, 5592.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 15.0f, 3276.0f, 5849.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 8.0f, 3234.0f, 6132.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -1.0f, 3198.0f, 6372.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 5.0f, 3162.0f, 6620.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 46.0f, 3150.0f, 6877.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 159.0f, 3150.0f, 7102.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 292.0f, 3150.0f, 7219.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5EC2C-80A5ED98 0007D4 016C+00 1/1 0/0 0/0 .data guide_path_00_2 */
-SECTION_DATA static u8 guide_path_00_2[364] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xD3, 0xB8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00, 0x00, 0x45, 0x47, 0xB0, 0x00,
- 0x45, 0xC9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00,
- 0x45, 0x4B, 0x70, 0x00, 0x45, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x3F, 0x80, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xAF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x9F, 0xA0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path guide_path_00_2[7] = {
+ { 0, 0.0f, 3150.0f, 6775.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 9.0f, 3195.0f, 6449.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 1.0f, 3255.0f, 6044.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 1.0f, 3300.0f, 5612.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -2.0f, 3300.0f, 5108.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
/* 80A5ED98-80A5EED0 000940 0138+00 1/1 0/0 0/0 .data guide_path_00_3 */
-SECTION_DATA static u8 guide_path_00_3[312] = {
- 0x00, 0x00, 0x00, 0x00, 0xC2, 0xA2, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xCA, 0xE0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xAE, 0x00, 0x00, 0x45, 0x48, 0x00, 0x00,
- 0x45, 0xC1, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xF2, 0x00, 0x00,
- 0x45, 0x4B, 0x20, 0x00, 0x45, 0xB7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x43, 0x20, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x42, 0x40, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x99, 0x50, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path guide_path_00_3[6] = {
+ { 0, -81.0f, 3150.0f, 6492.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 87.0f, 3200.0f, 6191.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 121.0f, 3250.0f, 5857.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 160.0f, 3300.0f, 5622.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 48.0f, 3300.0f, 4906.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5EED0-80A5F140 000A78 0270+00 1/1 0/0 0/0 .data guide_path_01 */
-SECTION_DATA static u8 guide_path_01[624] = {
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xA4, 0x70, 0x00, 0x45, 0x48, 0xD0, 0x00, 0x45, 0xF0, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xBA, 0x80, 0x00, 0x45, 0x4B, 0x20, 0x00,
- 0x45, 0xDF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xC3, 0x50, 0x00,
- 0x45, 0x4F, 0x80, 0x00, 0x45, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0xC5, 0x88, 0x00, 0x45, 0x55, 0xC0, 0x00, 0x45, 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x45, 0xCB, 0x50, 0x00, 0x45, 0x55, 0xC0, 0x00, 0x45, 0xBA, 0x50, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xD8, 0x90, 0x00, 0x45, 0x55, 0xF0, 0x00,
- 0x45, 0xAB, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xDB, 0xA8, 0x00,
- 0x45, 0x51, 0xC0, 0x00, 0x45, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0xF5, 0x38, 0x00, 0x45, 0x52, 0xD0, 0x00, 0x45, 0x8D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x03, 0x68, 0x00, 0x45, 0x59, 0x50, 0x00, 0x45, 0x8D, 0x90, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0xC0, 0x00, 0x45, 0x57, 0xD0, 0x00,
- 0x45, 0x97, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x20, 0x00, 0x00,
- 0x45, 0x6A, 0x70, 0x00, 0x45, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path guide_path_01[12] = {
+ { 0, 5262.0f, 3213.0f, 7710.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 5968.0f, 3250.0f, 7167.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 6250.0f, 3320.0f, 6656.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 6321.0f, 3420.0f, 6432.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 6506.0f, 3420.0f, 5962.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 6930.0f, 3423.0f, 5477.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 7029.0f, 3356.0f, 4814.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7847.0f, 3373.0f, 4538.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 8410.0f, 3477.0f, 4530.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 9200.0f, 3453.0f, 4839.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 10240.0f, 3751.0f, 4888.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5F140-80A5F584 000CE8 0444+00 1/1 0/0 0/0 .data guide_path_02 */
-SECTION_DATA static u8 guide_path_02[1092] = {
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x40, 0x4C, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0xA3, 0xA8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x4A, 0x04, 0x00, 0x45, 0x45, 0x00, 0x00,
- 0x45, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x52, 0xC8, 0x00,
- 0x45, 0x48, 0x20, 0x00, 0x45, 0xAA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x58, 0xF4, 0x00, 0x45, 0x51, 0x80, 0x00, 0x45, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x5B, 0x94, 0x00, 0x45, 0x54, 0xA0, 0x00, 0x45, 0x95, 0xE0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x5B, 0x10, 0x00, 0x45, 0x5A, 0x60, 0x00,
- 0x45, 0x87, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x56, 0x34, 0x00,
- 0x45, 0x5F, 0xB0, 0x00, 0x45, 0x72, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x52, 0x84, 0x00, 0x45, 0x66, 0xF0, 0x00, 0x45, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x4C, 0x60, 0x00, 0x45, 0x6A, 0x80, 0x00, 0x45, 0x57, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x49, 0x64, 0x00, 0x45, 0x6B, 0x40, 0x00,
- 0x45, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x47, 0x30, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x4C, 0xA4, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0xA5, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x54, 0x48, 0x00, 0x45, 0x48, 0x20, 0x00,
- 0x45, 0xAE, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x59, 0x9C, 0x00,
- 0x45, 0x4E, 0x60, 0x00, 0x45, 0xA9, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x5E, 0x08, 0x00, 0x45, 0x54, 0xA0, 0x00, 0x45, 0x99, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x5C, 0x80, 0x00, 0x45, 0x5A, 0x60, 0x00, 0x45, 0x83, 0xC8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x55, 0x84, 0x00, 0x45, 0x64, 0x80, 0x00,
- 0x45, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x74, 0x00,
- 0x45, 0x69, 0x70, 0x00, 0x45, 0x52, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x4B, 0x6C, 0x00, 0x45, 0x6A, 0x80, 0x00, 0x45, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+static path guide_path_02[21] = {
+ { 0, 12307.0f, 3152.0f, 5237.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 12929.0f, 3152.0f, 5512.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13490.0f, 3202.0f, 5456.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13885.0f, 3352.0f, 5122.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 14053.0f, 3402.0f, 4796.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 14020.0f, 3494.0f, 4337.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13709.0f, 3579.0f, 3878.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13473.0f, 3695.0f, 3649.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13080.0f, 3752.0f, 3455.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 12889.0f, 3764.0f, 3265.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 12748.0f, 3152.0f, 4865.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13097.0f, 3152.0f, 5282.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13586.0f, 3202.0f, 5575.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13927.0f, 3302.0f, 5421.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 14210.0f, 3402.0f, 4899.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 14112.0f, 3494.0f, 4217.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13665.0f, 3656.0f, 3593.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13341.0f, 3735.0f, 3363.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 13019.0f, 3752.0f, 3436.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5F584-80A5F6BC 00112C 0138+00 1/1 0/0 0/0 .data guide_path_22 */
-SECTION_DATA static u8 guide_path_22[312] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x13, 0x20, 0x00, 0x46, 0x4A, 0x34, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x45, 0x3B, 0x80, 0x00,
- 0x46, 0x49, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0x44, 0xE0, 0x00, 0x46, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x46, 0x3E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x46, 0x36, 0xBC, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path guide_path_22[6] = {
+ { 0, 0.0f, 2354.0f, 12941.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 0.0f, 3000.0f, 12879.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0.0f, 3150.0f, 12556.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0.0f, 3150.0f, 12164.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0.0f, 3150.0f, 11695.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5F6BC-80A5F890 001264 01D4+00 1/1 0/0 0/0 .data guide_path_09 */
-SECTION_DATA static u8 guide_path_09[468] = {
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x18, 0x00, 0x45, 0x4C, 0x90, 0x00, 0xC5, 0x98, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x60, 0x00, 0x45, 0x4C, 0x90, 0x00,
- 0xC5, 0xAC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x60, 0x00,
- 0x45, 0x49, 0x90, 0x00, 0xC5, 0xC3, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0xE7, 0xB8, 0x00, 0x45, 0x49, 0x90, 0x00, 0xC5, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x45, 0xE6, 0xD0, 0x00, 0x45, 0x54, 0xF0, 0x00, 0xC5, 0xD1, 0x18, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE5, 0x38, 0x00, 0x45, 0x5C, 0x10, 0x00,
- 0xC5, 0xDA, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE1, 0xE8, 0x00,
- 0x45, 0x61, 0x00, 0x00, 0xC5, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0xE4, 0xB8, 0x00, 0x45, 0x61, 0x20, 0x00, 0xC6, 0x03, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+static path guide_path_09[9] = {
+ { 0, 7395.0f, 3273.0f, -4866.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7404.0f, 3273.0f, -5527.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7404.0f, 3225.0f, -6251.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7415.0f, 3225.0f, -6578.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 7386.0f, 3407.0f, -6691.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7335.0f, 3521.0f, -7005.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7229.0f, 3600.0f, -7728.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7319.0f, 3602.0f, -8395.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5F890-80A5F994 001438 0104+00 1/1 0/0 0/0 .data guide_path_12 */
-SECTION_DATA static u8 guide_path_12[260] = {
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xE6, 0x50, 0x00, 0x45, 0x61, 0x00, 0x00, 0xC6, 0x14, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xEA, 0x60, 0x00, 0x45, 0x67, 0x20, 0x00,
- 0xC6, 0x1A, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xFE, 0x10, 0x00,
- 0x45, 0x53, 0x20, 0x00, 0xC6, 0x28, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x46, 0x08, 0xB8, 0x00, 0x45, 0x65, 0xB0, 0x00, 0xC6, 0x27, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+static path guide_path_12[5] = {
+ { 0, 7370.0f, 3600.0f, -9473.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7500.0f, 3698.0f, -9867.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 8130.0f, 3378.0f, -10770.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 8750.0f, 3675.0f, -10744.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5F994-80A5FA98 00153C 0104+00 1/1 0/0 0/0 .data guide_path_0409 */
-SECTION_DATA static u8 guide_path_0409[260] = {
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xD8, 0xD8, 0x00, 0x45, 0x58, 0x60, 0x00, 0xC3, 0x66, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xDD, 0x28, 0x00, 0x45, 0x5B, 0xE0, 0x00,
- 0xC4, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xDE, 0x80, 0x00,
- 0x45, 0x60, 0x70, 0x00, 0xC4, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x45, 0xE3, 0xE0, 0x00, 0x45, 0x61, 0xD0, 0x00, 0xC5, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+static path guide_path_0409[5] = {
+ { 0, 6939.0f, 3462.0f, -230.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7077.0f, 3518.0f, -866.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7120.0f, 3591.0f, -1596.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 7292.0f, 3613.0f, -2636.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A5FA98-80A5FC04 001640 016C+00 1/1 0/0 0/0 .data guide_path_fs */
-SECTION_DATA static u8 guide_path_fs[364] = {
- 0x00, 0x00, 0x00, 0x01, 0xC7, 0x17, 0x82, 0x00, 0x44, 0x8E, 0x80, 0x00, 0xC6, 0xB6, 0x32, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC7, 0x15, 0x33, 0x00, 0x44, 0x3B, 0x80, 0x00,
- 0xC6, 0xB0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x14, 0x41, 0x00,
- 0x44, 0x2D, 0x80, 0x00, 0xC6, 0xAB, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xC7, 0x12, 0xE6, 0x00, 0x44, 0x08, 0x40, 0x00, 0xC6, 0xA9, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xC7, 0x11, 0x26, 0x00, 0x43, 0x99, 0x00, 0x00, 0xC6, 0xA8, 0xF8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x0E, 0xC4, 0x00, 0x43, 0xAE, 0x00, 0x00,
- 0xC6, 0xA7, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 80A5FCB0-80A5FCBC 001858 000C+00 0/0 0/0 0/0 .data dx$11146 */
-static f32 dx[3] = {
- 0x45E32000, 0x45A17000, 0x46104400,
-};
-
-/* 80A5FCBC-80A5FCC8 001864 000C+00 0/0 0/0 0/0 .data dy$11147 */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 dy[12] = {
- 0x45, 0x61, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x4E, 0x40, 0x00,
-};
-#pragma pop
-
-/* 80A5FCC8-80A5FCD4 001870 000C+00 0/0 0/0 0/0 .data dz$11148 */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 dz[12] = {
- 0xC5, 0x53, 0xD0, 0x00, 0xC5, 0xA6, 0x78, 0x00, 0xC5, 0xA6, 0x58, 0x00,
-};
-#pragma pop
-
-/* 80A5FD30-80A5FD74 0018D8 0044+00 1/1 0/0 0/0 .data cc_cyl_src$11445 */
-static dCcD_SrcCyl cc_cyl_src = {
- {
- {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x3}, 0x79}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {0.0f, 0.0f, 0.0f}, // mCenter
- 30.0f, // mRadius
- 20.0f // mHeight
- } // mCyl
+static path guide_path_fs[7] = {
+ { 1, -38786.0f, 1140.0f, -23321.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, -38195.0f, 750.0f, -22650.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -37953.0f, 694.0f, -22015.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -37606.0f, 545.0f, -21748.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -37158.0f, 306.0f, -21628.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, -36548.0f, 348.0f, -21429.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
/* 80A48F8C-80A49000 0000EC 0074+00 1/1 0/0 0/0 .text __ct__14daNpc_Ks_HIO_cFv */
@@ -507,7 +254,6 @@ static BOOL otherBgCheck(fopAc_ac_c* p_actor, fopAc_ac_c* p_actor2) {
/* 80A491A4-80A4932C 000304 0188+00 29/29 0/0 0/0 .text anm_init__FP12npc_ks_classifUcf */
static void anm_init(npc_ks_class* i_this, int param_2, f32 i_morf, u8 i_attr, f32 i_rate) {
- // NONMATCHING - REGALLOC
if (i_this->field_0x94c != 0 && (param_2 == 51 || param_2 == 53)) {
if (cM_rndF(1.0f) < 0.5f) {
param_2 = 11;
@@ -519,30 +265,30 @@ static void anm_init(npc_ks_class* i_this, int param_2, f32 i_morf, u8 i_attr, f
int i_index = param_2;
if (i_this->field_0xc17 != 0) {
if (param_2 == 51) {
- i_index = 52;
+ param_2 = 52;
} else if (param_2 == 8) {
- i_index = 9;
+ param_2 = 9;
} else if (param_2 == 28) {
- i_index = 29;
+ param_2 = 29;
} else if (param_2 == 26) {
- i_index = 27;
+ param_2 = 27;
} else if (param_2 == 8) {
- i_index = 9;
+ param_2 = 9;
} else if (param_2 == 7) {
- i_index = 10;
+ param_2 = 10;
} else if (param_2 == 43) {
- i_index = 40;
+ param_2 = 40;
} else if (param_2 == 39) {
- i_index = 42;
+ param_2 = 42;
} else if (param_2 == 39) {
- i_index = 42;
+ param_2 = 42;
} else {
dComIfGs_shake_kandelaar();
}
}
- i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, i_index), i_attr, i_morf, i_rate, 0.0f, -1.0f);
- i_this->field_0x5d0 = param_2;
+ i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, param_2), i_attr, i_morf, i_rate, 0.0f, -1.0f);
+ i_this->field_0x5d0 = i_index;
}
/* 80A4932C-80A49660 00048C 0334+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
@@ -655,12 +401,6 @@ static void* s_resq_sub(void* i_actor, void* i_data) {
UNK_REL_BSS;
-/* 80A5FE88-80A5FE94 000048 000C+00 0/1 0/0 0/0 .bss @4022 */
-#pragma push
-#pragma force_active on
-static u8 lit_4022[12];
-#pragma pop
-
/* 80A5FE94-80A5FEA0 000054 000C+00 1/5 0/0 0/0 .bss obj_pos */
static cXyz obj_pos;
@@ -668,16 +408,10 @@ static cXyz obj_pos;
static npc_ks_class* leader;
/* 80A5FEA4-80A5FEA8 000064 0004+00 7/9 0/0 0/0 .bss call_pt */
-static u8 call_pt[4];
+static u32 call_pt;
/* 80A5FEA8-80A5FEAC 000068 0004+00 1/2 0/0 0/0 .bss None */
-static u8 data_80A5FEA8[4];
-
-/* 80A5FEAC-80A5FEB8 00006C 000C+00 0/1 0/0 0/0 .bss @4025 */
-#pragma push
-#pragma force_active on
-static u8 lit_4025[12];
-#pragma pop
+static u8 data_80A5FEA8;
/* 80A5FEB8-80A5FEF0 000078 0038+00 16/22 0/0 0/0 .bss l_HIO */
static daNpc_Ks_HIO_c l_HIO;
@@ -695,6 +429,7 @@ static void* s_b_sub(void* i_actor, void* i_data) {
target_info[target_info_count] = i_actor;
target_info_count++;
}
+
return NULL;
}
@@ -705,7 +440,9 @@ static int target_bgc[10];
static fopAc_ac_c* search_bomb(npc_ks_class* i_this, int param_2) {
// NONMATCHING
fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* actor_p;
target_info_count = 0;
+
for (int i = 0; i < 10; i++) {
target_info[i] = NULL;
target_bgc[i] = 0;
@@ -715,16 +452,14 @@ static fopAc_ac_c* search_bomb(npc_ks_class* i_this, int param_2) {
f32 fVar1 = 50.0f;
if (target_info_count != 0) {
- cXyz sp4c, sp58;
- fopAc_ac_c* actor_p;
+ cXyz sp4c;
int i = 0;
while (i < target_info_count) {
actor_p = (fopAc_ac_c*)target_info[i];
sp4c.x = actor_p->current.pos.x - a_this->eyePos.x;
sp4c.y = (actor_p->current.pos.y + 50.0f) - a_this->eyePos.y;
sp4c.z = actor_p->current.pos.z - a_this->eyePos.z;
- f32 fVar2 = JMAFastSqrt(sp4c.x * sp4c.x + sp4c.z * sp4c.z);
- if (fVar2 < fVar1) {
+ if (JMAFastSqrt(sp4c.x * sp4c.x + sp4c.z * sp4c.z) < fVar1) {
if (param_2 == 0) {
return actor_p;
}
@@ -782,9 +517,9 @@ static void* s_e_sub(void* i_actor, void* i_data) {
static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3) {
// NONMATCHING
fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* enemy_p;
if (dComIfGp_event_runCheck()) {
- daMidna_c* midnaActor = daPy_py_c::getMidnaActor();
- if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) != (fopAc_ac_c *)midnaActor) {
+ if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) != (fopAc_ac_c *)daPy_py_c::getMidnaActor()) {
return NULL;
}
}
@@ -806,17 +541,16 @@ static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3)
cXyz sp68;
int i = 0;
while (i < target_info_count) {
- fopAc_ac_c* pEnemy = (fopAc_ac_c*)target_info[i];
- sp68.x = pEnemy->current.pos.x - a_this->eyePos.x;
- sp68.y = (pEnemy->current.pos.y + 50.0f) - a_this->eyePos.y;
- sp68.z = pEnemy->current.pos.z - a_this->eyePos.z;
- f32 fVar3 = JMAFastSqrt(sp68.x * sp68.x + sp68.z * sp68.z);
- if (fVar3 < fVar1) {
+ enemy_p = (fopAc_ac_c*)target_info[i];
+ sp68.x = enemy_p->current.pos.x - a_this->eyePos.x;
+ sp68.y = (enemy_p->current.pos.y + 50.0f) - a_this->eyePos.y;
+ sp68.z = enemy_p->current.pos.z - a_this->eyePos.z;
+ if (JMAFastSqrt(sp68.x * sp68.x + sp68.z * sp68.z) < fVar1) {
if (param_2 == 0) {
- return pEnemy;
+ return enemy_p;
}
- if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, pEnemy)) {
+ if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, enemy_p)) {
target_bgc[i] = 1;
} else if (fabsf(sp68.y) <= fVar2) {
s16 sVar1 = a_this->shape_angle.y - cM_atan2s(sp68.x, sp68.z);
@@ -825,7 +559,7 @@ static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3)
}
if ((u16)sVar1 < 20000) {
- return pEnemy;
+ return enemy_p;
}
}
}
@@ -916,40 +650,41 @@ static void npc_ks_pole_ori(npc_ks_class* i_this) {
fopAc_ac_c* a_this = &i_this->actor;
if (leader != NULL) {
if (i_this->mMode == 0) {
- obj_so_class* cage_p = (obj_so_class*)fpcM_Search(s_ori_sub, i_this);
- if (cage_p == NULL) {
+ fopAc_ac_c* actor = (fopAc_ac_c*)fpcM_Search(s_ori_sub, i_this);
+ if (actor != NULL) {
+ a_this->parentActorID = fopAcM_GetID(actor);
+ anm_init(i_this, 20, 5.0f, 2, 1.0f);
+ i_this->mMode++;
+ i_this->mMode = 1;
+ } else {
return;
}
-
- a_this->parentActorID = fopAcM_GetID(cage_p);
- anm_init(i_this, 20, 5.0f, 2, 1.0f);
- i_this->mMode++;
- i_this->mMode = 1;
}
obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
if (cage_p != NULL) {
- if (cage_p->health == 0) {
+ if (cage_p->actor.health == 0) {
i_this->mActionID = 201;
i_this->mMode = 10;
- dComIfGs_onTbox(i_this->field_0x5bc);
+ dComIfGs_onTbox(i_this->bitTRB);
} else {
if (i_this->mMode < 10 && cage_p->field_0xdae != 0) {
i_this->mMode = 10;
i_this->mpModelMorf->setPlaySpeed(0.0f);
}
- if (((i_this->mMode != 10 && i_this->mMode < 10) && i_this->mMode == 1) &&
- (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f))) {
+ if (i_this->mMode != 10 && i_this->mMode < 10 && i_this->mMode != 1) {
+ if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) {
cage_p->field_0xdc8 += 400.0f;
cage_p->field_0xdac = 0;
i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1);
i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1);
+ }
}
- a_this->current.angle.y = cage_p->shape_angle.y;
- a_this->current.angle.x = cage_p->shape_angle.x;
- a_this->current.pos = cage_p->current.pos;
+ a_this->current.angle.y = cage_p->actor.shape_angle.y;
+ a_this->current.angle.x = cage_p->actor.shape_angle.x;
+ a_this->current.pos = cage_p->actor.current.pos;
if (leader->field_0xb42 == 0) {
if (!dComIfGs_isSwitch(20, fopAcM_GetRoomNo(a_this))) {
@@ -1083,7 +818,7 @@ static int npc_ks_ori(npc_ks_class* i_this) {
int swBit = fopAcM_GetParam(a_this) >> 24;
if (swBit != 0xFF) {
if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) {
- dComIfGs_onTbox(i_this->field_0x5bc);
+ dComIfGs_onTbox(i_this->bitTRB);
if (i_this->field_0x5b6 >= 5) {
i_this->mMode = 11;
i_this->mTimers[0] = 80;
@@ -1141,14 +876,14 @@ static int npc_ks_ori2(npc_ks_class* i_this) {
return rv;
}
- a_this->home.angle.y = cage_p->shape_angle.y;
+ a_this->home.angle.y = cage_p->actor.shape_angle.y;
if (i_this->mMode <= 2 && cage_p->field_0x1054 != 0) {
i_this->mMode = 3;
i_this->mTimers[0] = 90;
int swBit = fopAcM_GetParam(a_this) >> 24;
dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(a_this));
- dComIfGs_onTbox(i_this->field_0x5bc);
+ dComIfGs_onTbox(i_this->bitTRB);
s8 roomNo = fopAcM_GetRoomNo(a_this);
if (roomNo == 4) {
@@ -1164,12 +899,11 @@ static int npc_ks_ori2(npc_ks_class* i_this) {
cXyz sp40;
s16 sVar1 = i_this->field_0xbde + (a_this->home.angle.y - 1000);
- // sVar1 += -1000;
f32 fVar1 = 0.0f;
switch (i_this->mMode) {
case 1:
if (i_this->mpModelMorf->checkFrame(46.0f)) {
- i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y & 0xE000;
+ i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y & -0x2000;
}
if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) {
@@ -1287,18 +1021,18 @@ static int npc_ks_ori2(npc_ks_class* i_this) {
a_this->speedF = 0.0f;
// fallthrough
case 11:
- if ((int)guide_path_04[i_this->field_0x904 * 13] != 0) {
- i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1];
- i_this->field_0x8f0.y = guide_path_04[i_this->field_0x904 * 13 + 2];
- i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3];
+ if (guide_path_04[i_this->field_0x904].field_0x0 != 0) {
+ i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_04[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904].field_0xc;
i_this->field_0x910 = a_this->current.pos;
i_this->field_0x91c = i_this->field_0x8f0;
i_this->mMode = 12;
anm_init(i_this, 32, 2.0f, 0, 1.0f);
a_this->speedF = 0.0f;
} else {
- i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1];
- i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3];
+ i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904].field_0xc;
i_this->mMode = 15;
a_this->speedF = l_HIO.field_0x1c;
if (i_this->field_0x5d0 != 26) {
@@ -1320,13 +1054,13 @@ static int npc_ks_ori2(npc_ks_class* i_this) {
sp40 = i_this->field_0x8f0 - a_this->current.pos;
i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z);
- i_this->field_0x8fc.x = -cM_atan2s(sp40.x, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z));
- if (sp40.abs() < (a_this->speedF * 1.2f)) {
+ i_this->field_0x8fc.x = -cM_atan2s(sp40.y, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z));
+ if (sp40.abs() < a_this->speedF * 1.2f) {
a_this->current.pos = i_this->field_0x8f0;
i_this->mMode = 11;
i_this->field_0xbe0 = 1;
i_this->field_0x904++;
- if ((int)guide_path_04[i_this->field_0x904 * 13] < 0) {
+ if (guide_path_04[i_this->field_0x904].field_0x0 < 0) {
fopAcM_delete(a_this);
}
}
@@ -1353,8 +1087,8 @@ static int npc_ks_ori2(npc_ks_class* i_this) {
cLib_addCalcAngleS2(&a_this->current.angle.y, sVar1, 2, 0x2000);
if (i_this->mMode < 7) {
- a_this->current.angle.x = cage_p->shape_angle.x;
- a_this->current.pos = cage_p->current.pos;
+ a_this->current.angle.x = cage_p->actor.shape_angle.x;
+ a_this->current.pos = cage_p->actor.current.pos;
a_this->current.pos.y += fVar1;
}
@@ -1471,9 +1205,9 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
i_this->field_0x904 = 0;
// fallthrough
case 1:
- i_this->field_0x8f0.x = move_path_02[i_this->field_0x904 * 13 + 1];
- i_this->field_0x8f0.y = move_path_02[i_this->field_0x904 * 13 + 2];
- i_this->field_0x8f0.z = move_path_02[i_this->field_0x904 * 13 + 3];
+ i_this->field_0x8f0.x = move_path_02[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = move_path_02[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = move_path_02[i_this->field_0x904].field_0xc;
i_this->mMode = 2;
// fallthrough
case 2:
@@ -1495,7 +1229,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
break;
case 10:
- cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000);
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y + 0x8000, 2, 0x1000);
if (i_this->mTimers[0] == 0) {
i_this->mMode = 11;
anm_init(i_this, 26, 5.0f, 2, 1.0f);
@@ -1504,12 +1238,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
case 11:
rv = 0;
- cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y);
sp3c.x = 0.0f;
sp3c.y = 0.0f;
- sp3c.z = cage_p->scale.x * 90.0f;
+ sp3c.z = cage_p->actor.scale.x * 90.0f;
MtxPosition(&sp3c, &sp48);
- sp48 += cage_p->current.pos;
+ sp48 += cage_p->actor.current.pos;
cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF);
cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF);
sp3c.x = sp48.x - a_this->current.pos.x;
@@ -1521,19 +1255,19 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
if (sp3c.y < 1.0f) {
i_this->mMode = 12;
- a_this->current.angle.y = cage_p->shape_angle.y + 0x8000;
+ a_this->current.angle.y = cage_p->actor.shape_angle.y + 0x8000;
}
break;
case 12:
rv = 0;
iVar1 = 1;
- cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y);
sp3c.x = 0.0f;
sp3c.y = 0.0f;
sp3c.z = 90.0f;
MtxPosition(&sp3c, &sp48);
- sp48 += cage_p->current.pos;
+ sp48 += cage_p->actor.current.pos;
cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF);
cLib_addCalc2(&a_this->current.pos.y, sp48.y, 1.0f, a_this->speedF);
cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF);
@@ -1548,12 +1282,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
case 13:
rv = 0;
iVar1 = 1;
- cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y);
sp3c.x = 0.0f;
sp3c.y = 0.0f;
- sp3c.z = cage_p->scale.x * 90.0f;
+ sp3c.z = cage_p->actor.scale.x * 90.0f;
MtxPosition(&sp3c, &sp48);
- sp48 += cage_p->current.pos;
+ sp48 += cage_p->actor.current.pos;
cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f);
cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, 10.0f);
@@ -1572,12 +1306,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
case 14:
rv = 0;
iVar1 = 1;
- cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y);
sp3c.x = 0.0f;
sp3c.y = 0.0f;
sp3c.z = 90.0f;
MtxPosition(&sp3c, &sp48);
- sp48 += cage_p->current.pos;
+ sp48 += cage_p->actor.current.pos;
cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f);
cLib_addCalc2(&a_this->current.pos.z, sp48.x, 1.0f, 10.0f);
cLib_addCalc2(&a_this->current.pos.y, i_this->mObjAcch.GetGroundH(), 1.0f, l_HIO.field_0x18);
@@ -1592,7 +1326,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
case 15:
fVar1 = l_HIO.field_0x18;
- cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y, 2, 0x2000);
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y, 2, 0x2000);
if (i_this->mTimers[0] == 0) {
i_this->mMode = 16;
anm_init(i_this, 25, 5.0f, 2, 1.0f);
@@ -1612,7 +1346,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
}
}
- cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000);
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y + 0x8000, 2, 0x1000);
if (dComIfGp_checkPlayerStatus0(0, 0x40) != 0 || dComIfGp_checkPlayerStatus0(0, 0x2000) != 0) {
i_this->mTimers[2] = 20;
}
@@ -1721,7 +1455,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
if (checkDoorDemo() != 0) {
i_this->mActionID = 100;
i_this->mMode = 0;
- } else if (iVar1 != 0 && cage_p->shape_angle.x > 0x200) {
+ } else if (iVar1 != 0 && cage_p->actor.shape_angle.x > 0x200) {
anm_init(i_this, 6, 5.0f, 0, 1.0f);
i_this->mMode = 18;
a_this->speedF = -8.0f;
@@ -2048,8 +1782,8 @@ static void npc_ks_to_hang(npc_ks_class* i_this) {
break;
case 10:
- obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
- i_this->field_0x8f0 = cage_p->field_0x920[i_this->field_0x630];
+ obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID);
+ i_this->field_0x8f0 = sw_p->field_0x920[i_this->field_0x630];
i_this->field_0x91c = i_this->field_0x8f0;
sp24 = i_this->field_0x8f0 - a_this->current.pos;
if (i_this->field_0x5d0 == 32) {
@@ -2399,7 +2133,7 @@ static void npc_ks_hang_s(npc_ks_class* i_this) {
i_this->mMode++;
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
sw_p->field_0x8fc = 20.0f;
- // sw_p->field_0xd10[i_this->field_0x630] = 10;
+ sw_p->field_0xd10[i_this->field_0x630] = 10;
i_this->field_0x92c = 0;
break;
@@ -2460,7 +2194,7 @@ static void npc_ks_hang_s(npc_ks_class* i_this) {
i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CATCH, -1);
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
sw_p->field_0x8fc = 20.0f;
- // sw_p->field_0xd10[i_this->field_0x630] = 10;
+ sw_p->field_0xd10[i_this->field_0x630] = 10;
}
if (mDoCPd_c::getTrigA(0) != 0) {
@@ -2509,24 +2243,24 @@ static void npc_ks_hang_s(npc_ks_class* i_this) {
static void npc_ks_e_hang(npc_ks_class* i_this) {
// NONMATCHING
fopAc_ac_c* a_this = &i_this->actor;
- obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
+ obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID);
fopAc_ac_c* player = dComIfGp_getPlayer(0);
- cage_p->field_0x900 += 5.0f;
+ sw_p->field_0x900 += 5.0f;
cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y + 0x4000, 2, 0x800);
switch (i_this->mMode) {
case 0:
i_this->mMode = 20;
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
- cage_p->field_0x8fc = 20.0f;
- // cage_p->field_0xd10[i_this->field_0x630] = 10;
- a_this->home.angle.y = cage_p->current.angle.y;
+ sw_p->field_0x8fc = 20.0f;
+ sw_p->field_0xd10[i_this->field_0x630] = 10;
+ a_this->home.angle.y = sw_p->actor.current.angle.y;
i_this->field_0x5fa = -0x4000;
i_this->field_0x60c = 4000.0f;
if (i_this->field_0x5b6 == 0) {
- anm_init(i_this, 24, 2.0f, 2, 1.0f);
+ anm_init(i_this, 24, 3.0f, 2, 1.0f);
i_this->mTimers[0] = 10000;
i_this->mTimers[1] = 15;
}
@@ -2535,8 +2269,8 @@ static void npc_ks_e_hang(npc_ks_class* i_this) {
case 2:
anm_init(i_this, 48, 2.0f, 2, 1.0f);
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
- cage_p->field_0x8fc = 20.0f;
- // cage_p->field_0xd10[i_this->field_0x630] = 10;
+ sw_p->field_0x8fc = 20.0f;
+ sw_p->field_0xd10[i_this->field_0x630] = 10;
i_this->field_0x5fa = -0x8000;
i_this->field_0x60c = 8000.0f;
i_this->mMode++;
@@ -2572,7 +2306,7 @@ static void npc_ks_e_hang(npc_ks_class* i_this) {
}
}
- a_this->current.pos = cage_p->field_0x920[i_this->field_0x630];
+ a_this->current.pos = sw_p->field_0x920[i_this->field_0x630];
cLib_addCalcAngleS2(&i_this->field_0x602, i_this->field_0x60c * cM_ssin(i_this->field_0x5fa), 4, 0x1000);
i_this->field_0x5fa += 0x800;
a_this->current.angle.z = -(i_this->field_0x602 / 2);
@@ -2756,7 +2490,7 @@ static int npc_ks_e_jump(npc_ks_class* i_this) {
anm_init(i_this, 24, 2.0f, 2, 1.0f);
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
sw_p2->field_0x8fc = 20.0f;
- // sw_p2->field_0xd10[i_this->field_0x630] = 10;
+ sw_p2->field_0xd10[i_this->field_0x630] = 10;
}
// fallthrough
case 12:
@@ -3859,7 +3593,9 @@ static void action_check(npc_ks_class* i_this) {
if (!dComIfGs_isSwitch(82, fopAcM_GetRoomNo(a_this)) && saru_count_check(i_this) != 0) {
if (dComIfGs_isSwitch(22, fopAcM_GetRoomNo(a_this))) {
for (int i = 0; i < 2; i++) {
- spd4 = player->current.pos - i_this->field_0x934->field_0x904[i];
+ spd4.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x;
+ spd4.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f);
+ spd4.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z;
if (spd4.abs() < 300.0f) {
i_this->field_0xbd9 = 0;
i_this->mActionID = 20;
@@ -3995,9 +3731,6 @@ static BOOL water_check(npc_ks_class* i_this, cXyz param_2, f32 param_3) {
return FALSE;
}
-/* 80A5FF54 */
-static u8 gap_05_00000114_bss;
-
/* 80A5352C-80A548E4 00A68C 13B8+00 2/1 0/0 0/0 .text npc_ks_option__FP12npc_ks_class */
static int npc_ks_option(npc_ks_class* i_this) {
// NONMATCHING
@@ -4011,7 +3744,7 @@ static int npc_ks_option(npc_ks_class* i_this) {
cXyz sp140, sp14c;
f32 fVar3 = 0.0f;
f32 fVar4 = 5.0f;
- int iVar4 = 0;
+ u32 iVar4 = 0;
int iVar3 = 1;
int iVar2 = 1;
int iVar1 = 1;
@@ -4390,7 +4123,7 @@ static int npc_ks_option(npc_ks_class* i_this) {
dBgS_GndChk dStack_134;
dStack_134.SetPos(&sp14c);
- if (fabs(sp14c.y - dComIfG_Bgsp().GroundCross(&dStack_134)) < 500.0f) {
+ if (fabsf(sp14c.y - dComIfG_Bgsp().GroundCross(&dStack_134)) < 500.0f) {
a_this->current.pos = sp14c;
a_this->old = a_this->current;
OS_REPORT("////////KS OP RESET \n");
@@ -4427,11 +4160,7 @@ static int npc_ks_option(npc_ks_class* i_this) {
cXyz sp158 = a_this->current.pos;
sp158.y = i_this->field_0x63c;
- static cXyz sc;
- if (gap_05_00000114_bss == 0) {
- sc = cXyz(1.0f, 1.0f, 1.0f);
- gap_05_00000114_bss = 1;
- }
+ static cXyz sc(1.0f, 1.0f, 1.0f);
for (int i = 0; i < 4; i++) {
i_this->field_0xbe4[i] = dComIfGp_particle_set(i_this->field_0xbe4[i], w_eff_id[i], &sp158, &a_this->tevStr, NULL,
@@ -4468,727 +4197,3211 @@ static int npc_ks_option(npc_ks_class* i_this) {
}
/* 80A548E4-80A54A14 00BA44 0130+00 1/1 0/0 0/0 .text npc_ks_awaydoor__FP12npc_ks_class */
-static void npc_ks_awaydoor(npc_ks_class* param_0) {
- // NONMATCHING
+static void npc_ks_awaydoor(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->mTimers[0] = 30;
+ break;
+
+ case 1:
+ if (i_this->mTimers[0] == 0) {
+ fopAcM_delete(a_this);
+ }
+ }
+
+ cXyz sp1c, sp28;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ sp1c.x = 0.0f;
+ sp1c.y = 0.0f;
+ sp1c.z = 150.0f;
+ MtxPosition(&sp1c, &sp28);
+ sp28 += player->current.pos;
+ sp1c.x = a_this->current.pos.x - sp28.x;
+ sp1c.z = a_this->current.pos.z - sp28.z;
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cM_atan2s(sp1c.x, sp1c.z), 1, 0x2000);
+ cLib_addCalc2(&a_this->speedF, l_HIO.field_0x14, 1.0f, 4.0f);
}
/* 80A54A14-80A55174 00BB74 0760+00 1/1 0/0 0/0 .text npc_ks_guide_00__FP12npc_ks_class */
-static void npc_ks_guide_00(npc_ks_class* param_0) {
+static int npc_ks_guide_00(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp2c, sp38;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5c4 > 700.0f || guide_path_00[i_this->field_0x904].field_0x0 < 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_00[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_00[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 5:
+ sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z);
+ if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (i_this->field_0x5c4 < 550.0f && guide_path_00[i_this->field_0x904].field_0x0 >= 0) {
+ i_this->mMode = 1;
+ } else {
+ if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 51) {
+ i_this->field_0x5fc = 1;
+ }
+
+ if (guide_path_00[i_this->field_0x904].field_0x0 < 0 && saru_count_check(i_this) != 0) {
+ sp2c.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x;
+ sp2c.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f);
+ sp2c.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z;
+
+ if (sp2c.abs() < 300.0f) {
+ i_this->field_0xbd9 = 1;
+ i_this->mActionID = 20;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 0;
+ i_this->field_0xbc8 = i_this->field_0x934->field_0x904[0];
+ sp2c = i_this->field_0x934->field_0x904[1] - i_this->field_0xbc8;
+ leader->field_0xbd4 = cM_atan2s(sp2c.x, sp2c.z);
+ leader->field_0xb42 = 10;
+ leader->field_0xb40 = i_this->field_0x934->field_0x570;
+ if (i_this->field_0x5b6 != 0) {
+ leader->field_0x934 = i_this->field_0x934;
+ leader->field_0xbc8 = i_this->field_0xbc8;
+ }
+ }
+ }
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43) {
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 41) {
+ fopAc_ac_c* enemy_p = enemy_check(i_this, 800.0f);
+ if (enemy_p == NULL) {
+ i_this->mMode = 42;
+ i_this->mTimers[0] = 30;
+ } else {
+ sp2c.x = enemy_p->current.pos.x - a_this->current.pos.x;
+ sp2c.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z) + 0x8000;
+ }
+ } else {
+ if (enemy_view_check(i_this, 700.0f) != NULL) {
+ i_this->mMode = 40;
+ a_this->speedF = 0.0f;
+ }
+ }
+
+ return rv;
}
-/* ############################################################################################## */
-/* 80A5E310-80A5E314 000414 0004+00 0/1 0/0 0/0 .rodata @8131 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8131 = 130.0f;
-COMPILER_STRIP_GATE(0x80A5E310, &lit_8131);
-#pragma pop
-
-/* 80A5E314-80A5E318 000418 0004+00 0/0 0/0 0/0 .rodata @8132 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8132 = 4096.0f;
-COMPILER_STRIP_GATE(0x80A5E314, &lit_8132);
-#pragma pop
-
-/* 80A5E318-80A5E31C 00041C 0004+00 0/0 0/0 0/0 .rodata @8133 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8133 = 1.5f;
-COMPILER_STRIP_GATE(0x80A5E318, &lit_8133);
-#pragma pop
-
-/* 80A5E31C-80A5E320 000420 0004+00 0/3 0/0 0/0 .rodata @8356 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8356 = 900.0f;
-COMPILER_STRIP_GATE(0x80A5E31C, &lit_8356);
-#pragma pop
-
-/* 80A5E320-80A5E324 000424 0004+00 0/1 0/0 0/0 .rodata @8357 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8357 = 750.0f;
-COMPILER_STRIP_GATE(0x80A5E320, &lit_8357);
-#pragma pop
-
-/* 80A55174-80A5546C 00C2D4 02F8+00 1/1 0/0 0/0 .text npc_ks_guide_00_2__FP12npc_ks_class
- */
-static void npc_ks_guide_00_2(npc_ks_class* param_0) {
- // NONMATCHING
+/* 80A55174-80A5546C 00C2D4 02F8+00 1/1 0/0 0/0 .text npc_ks_guide_00_2__FP12npc_ks_class */
+static int npc_ks_guide_00_2(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp34, sp40;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5c4 > 900.0f || guide_path_00_2[i_this->field_0x904].field_0x0 < 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_00_2[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_00_2[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 5:
+ sp34.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp34.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp34.x, sp34.z);
+ if (JMAFastSqrt(sp34.x * sp34.x + sp34.z * sp34.z) < a_this->speedF * 1.2f) {
+ if (i_this->field_0x5b6 == 0 || i_this->field_0x5b6 == 1) {
+ i_this->field_0x904++;
+ }
+
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 7) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ }
+
+ if (i_this->field_0x5c4 < 750.0f && guide_path_00_2[i_this->field_0x904].field_0x0 >= 0) {
+ i_this->mMode = 1;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ return rv;
}
-/* 80A5546C-80A559B4 00C5CC 0548+00 1/1 0/0 0/0 .text npc_ks_guide_00_3__FP12npc_ks_class
- */
-static void npc_ks_guide_00_3(npc_ks_class* param_0) {
+/* 80A5546C-80A559B4 00C5CC 0548+00 1/1 0/0 0/0 .text npc_ks_guide_00_3__FP12npc_ks_class */
+static int npc_ks_guide_00_3(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp2c, sp38;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5c4 > 500.0f || guide_path_00_3[i_this->field_0x904].field_0x0 < 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_00_3[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_00_3[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 5:
+ sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z);
+ if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (i_this->field_0x5c4 < 400.0f && guide_path_00_3[i_this->field_0x904].field_0x0 >= 0) {
+ i_this->mMode = 1;
+ } else {
+ if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 51) {
+ i_this->field_0x5fc = 1;
+ }
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if (i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || ((frame > 40 && frame < 48) || frame > 65)) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43) {
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 41) {
+ fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f);
+ if (enemy_p == NULL) {
+ i_this->mMode = 42;
+ i_this->mTimers[0] = 30;
+ } else {
+ sp2c.x = enemy_p->current.pos.x - a_this->current.pos.x;
+ sp2c.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z) + 0x8000;
+ }
+ } else if (enemy_view_check(i_this, 600.0f) != NULL) {
+ i_this->mMode = 40;
+ a_this->speedF = 0.0f;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+ return rv;
}
-/* ############################################################################################## */
-/* 80A5E324-80A5E328 000428 0004+00 0/1 0/0 0/0 .rodata @8644 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8644 = 9200.0f;
-COMPILER_STRIP_GATE(0x80A5E324, &lit_8644);
-#pragma pop
-
-/* 80A5E328-80A5E32C 00042C 0004+00 0/1 0/0 0/0 .rodata @8645 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8645 = 4839.0f;
-COMPILER_STRIP_GATE(0x80A5E328, &lit_8645);
-#pragma pop
-
-/* 80A559B4-80A562EC 00CB14 0938+00 1/1 0/0 0/0 .text npc_ks_guide_01__FP12npc_ks_class
- */
-static void npc_ks_guide_01(npc_ks_class* param_0) {
+/* 80A559B4-80A562EC 00CB14 0938+00 1/1 0/0 0/0 .text npc_ks_guide_01__FP12npc_ks_class */
+static int npc_ks_guide_01(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp3c, sp48;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ f32 fVar1 = 0.0f;
+ if (fopAcM_GetRoomNo(a_this) == 1 && i_this->field_0x904 >= 5) {
+ fVar1 = 300.0f;
+ }
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ case 101:
+ if (i_this->mMode == 1 && (i_this->field_0x5c4 > 900.0f || guide_path_01[i_this->field_0x904].field_0x0 < 0)) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else if (guide_path_01[i_this->field_0x904].field_0x0 != 0) {
+ i_this->field_0x8f0.x = guide_path_01[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_01[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_01[i_this->field_0x904].field_0xc;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ i_this->mMode = 2;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_01[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_01[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 2:
+ rv = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+
+ sp3c = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp3c.y, JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z));
+ if (sp3c.abs() < a_this->speedF * 1.2f) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->mMode = 1;
+ i_this->field_0xbe0 = 1;
+ i_this->field_0x904++;
+ }
+ break;
+
+ case 5:
+ sp3c.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp3c.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z);
+ if (JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (guide_path_01[i_this->field_0x904].field_0x0 < 0) {
+ if (i_this->field_0x5c4 < 600.0f) {
+ i_this->mMode = 1;
+ }
+
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ sp3c.x = player->current.pos.x - 9200.0f;
+ sp3c.z = player->current.pos.z - 4839.0f;
+ sp48.x = a_this->current.pos.x - 9200.0f;
+ sp48.z = a_this->current.pos.z - 4839.0f;
+
+ if ((sp3c.x * sp3c.x + sp3c.z * sp3c.z) < (sp48.x * sp48.x + sp48.z * sp48.z)) {
+ i_this->mMode = 101;
+ }
+ } else if (i_this->field_0x5c4 < 150.0f) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ return 1;
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if (i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || ((frame > 40 && frame < 48) ) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ }
+ break;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ if (a_this->speedF > 30.0f) {
+ i_this->field_0x90c = 1;
+ } else {
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 41) {
+ fopAc_ac_c* enemy_p = enemy_check(i_this, fVar1 + 700.0f);
+ if (enemy_p == NULL) {
+ i_this->mMode = 42;
+ i_this->mTimers[0] = 30;
+ } else {
+ sp3c.x = enemy_p->current.pos.x - a_this->current.pos.x;
+
+ sp3c.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z) + 0x8000;
+ }
+ } else if (enemy_view_check(i_this, fVar1 + 600.0f) != NULL) {
+ i_this->mMode = 40;
+ a_this->speedF = 0.0f;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ return rv;
}
-/* 80A562EC-80A56A1C 00D44C 0730+00 1/1 0/0 0/0 .text npc_ks_guide_02__FP12npc_ks_class
- */
-static void npc_ks_guide_02(npc_ks_class* param_0) {
+/* 80A562EC-80A56A1C 00D44C 0730+00 1/1 0/0 0/0 .text npc_ks_guide_02__FP12npc_ks_class */
+static int npc_ks_guide_02(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp3c, sp48;
+ int rv = 1;
+ f32 fVar1 = i_this->mpModelMorf->getFrame();
+ if (i_this->field_0x5b6 == 0) {
+ fVar1 = 1000.0f;
+ } else {
+ fVar1 = 700.0f;
+ }
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ if (i_this->field_0x5b6 == 0) {
+ i_this->field_0x904 = 0;
+ } else {
+ i_this->field_0x904 = 11;
+ }
+
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->mTimers[2] == 0 && (((player->current.pos.y - a_this->current.pos.y) < 10.0f && i_this->field_0x5c4 > fVar1) ||
+ guide_path_02[i_this->field_0x904].field_0x0 < 0)) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_02[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_02[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 5:
+ if (i_this->mObjAcch.ChkWallHit() != 0) {
+ a_this->speed.y = 20.0f;
+ }
+
+ sp3c.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp3c.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z);
+ if (JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 7) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ }
+
+ if (((player->current.pos.y - a_this->current.pos.y) > 10.0f || i_this->field_0x5c4 < (fVar1 - 150.0f)) && guide_path_02[i_this->field_0x904].field_0x0 >= 0) {
+ i_this->mMode = 1;
+ }
+
+ if (guide_path_02[i_this->field_0x904].field_0x0 < 0 && i_this->field_0x5b6 == 0 && saru_count_check(i_this) != 0) {
+ fopAc_ac_c* player_2 = dComIfGp_getPlayer(0);
+ int iVar1 = 0;
+ for (int i = 0; i < i_this->field_0x934->field_0x91c; i++) {
+ sp3c = player_2->current.pos - saru_p[i]->actor.current.pos;
+ if (sp3c.abs() > 400.0f) {
+ iVar1 = 1;
+ }
+ }
+
+ sp3c.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x;
+ sp3c.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f);
+ sp3c.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z;
+
+ if (iVar1 == 0 && sp3c.abs() < 300.0f) {
+ i_this->field_0xbd9 = 1;
+ i_this->field_0xbc8 = i_this->field_0x934->field_0x904[0];
+ i_this->mActionID = 20;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 0;
+ leader->field_0xb42 = 10;
+ leader->field_0xb40 = 0;
+ leader->field_0xbc8 = i_this->field_0xbc8;
+
+ sp3c = i_this->field_0x934->field_0x904[1] - i_this->field_0xbc8;
+ leader->field_0xbd4 = cM_atan2s(sp3c.x, sp3c.z);
+ saru_count_check(saru_p[1]);
+ saru_p[1]->mActionID = 22;
+ saru_p[1]->mMode = 0;
+ saru_p[1]->field_0x930 = leader;
+ }
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ return rv;
}
-/* ############################################################################################## */
-/* 80A5E32C-80A5E330 000430 0004+00 0/1 0/0 0/0 .rodata @8912 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8912 = 110.0f;
-COMPILER_STRIP_GATE(0x80A5E32C, &lit_8912);
-#pragma pop
-
-/* 80A56A1C-80A57124 00DB7C 0708+00 1/1 0/0 0/0 .text npc_ks_guide_22__FP12npc_ks_class
- */
-static void npc_ks_guide_22(npc_ks_class* param_0) {
+/* 80A56A1C-80A57124 00DB7C 0708+00 1/1 0/0 0/0 .text npc_ks_guide_22__FP12npc_ks_class */
+static int npc_ks_guide_22(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ i_this->field_0x5c4 = fopAcM_searchPlayerDistance(a_this);
+ cXyz sp28, sp34;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5c4 > 500.0f || guide_path_22[i_this->field_0x904].field_0x0 < 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else if (guide_path_22[i_this->field_0x904].field_0x0 != 0) {
+ anm_init(i_this, 12, 3.0f, 2, 1.0f);
+ i_this->field_0x8f0.x = guide_path_22[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_22[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_22[i_this->field_0x904].field_0xc;
+ i_this->mMode = 2;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_22[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_22[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 2:
+ rv = 0;
+
+ sp28.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp28.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+ cLib_addCalc2(&a_this->current.pos.y, i_this->field_0x8f0.y, 1.0f, 15.0f);
+
+ if (a_this->current.pos.y >= (i_this->field_0x8f0.y - 110.0f) && i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+
+ if (a_this->current.pos.y >= (i_this->field_0x8f0.y - 50.0f)) {
+ cLib_addCalc2(&a_this->current.pos.x, i_this->field_0x8f0.x, 1.0f, 20.0f);
+ cLib_addCalc2(&a_this->current.pos.z, i_this->field_0x8f0.z, 1.0f, 20.0f);
+ }
+
+ if (a_this->current.pos.y >= i_this->field_0x8f0.y) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 5:
+ sp28.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp28.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+
+ if (JMAFastSqrt(sp28.x * sp28.x + sp28.z * sp28.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (i_this->field_0x5c4 < 300.0f && guide_path_22[i_this->field_0x904].field_0x0 >= 0) {
+ i_this->mMode = 1;
+ }
+
+ if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 51) {
+ i_this->field_0x5fc = 1;
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ if (a_this->speedF > 30.0f) {
+ i_this->field_0x90c = 1;
+ } else {
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 41) {
+ fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f);
+ if (enemy_p == NULL) {
+ i_this->mMode = 42;
+ i_this->mTimers[0] = 30;
+ } else {
+ sp28.x = enemy_p->current.pos.x - a_this->current.pos.x;
+ sp28.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z) + 0x8000;
+ }
+ } else if (enemy_view_check(i_this, 600.0f) != NULL) {
+ i_this->mMode = 40;
+ a_this->speedF = 0.0f;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ return rv;
}
-/* 80A57124-80A57998 00E284 0874+00 1/1 0/0 0/0 .text npc_ks_guide_09__FP12npc_ks_class
- */
-static void npc_ks_guide_09(npc_ks_class* param_0) {
+/* 80A57124-80A57998 00E284 0874+00 1/1 0/0 0/0 .text npc_ks_guide_09__FP12npc_ks_class */
+static int npc_ks_guide_09(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp40, sp4c;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+ f32 fVar1 = 0.0f;
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5c4 > 900.0f || guide_path_09[i_this->field_0x904].field_0x0 < 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else if (guide_path_09[i_this->field_0x904].field_0x0 == 0) {
+ i_this->field_0x8f0.x = guide_path_09[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_09[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_09[i_this->field_0x904].field_0xc;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ i_this->mMode = 2;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_09[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_09[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 2:
+ rv = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ }
+
+ sp40 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp40.y, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z));
+
+ if (sp40.abs() < a_this->speedF * 1.2f) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->mMode = 1;
+ i_this->field_0x904++;
+ }
+ break;
+
+ case 5:
+ sp40.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp40.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z);
+
+ if (JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (guide_path_09[i_this->field_0x904].field_0x0 >= 0) {
+ if (i_this->field_0x5c4 < 600.0f) {
+ i_this->mMode = 1;
+ }
+ } else {
+ if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 51) {
+ i_this->field_0x5fc = 1;
+ }
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ if (a_this->speedF > 30.0f) {
+ i_this->field_0x90c = 1;
+ } else {
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 41) {
+ fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f);
+ if (enemy_p == NULL) {
+ i_this->mMode = 42;
+ i_this->mTimers[0] = 30;
+ } else {
+ sp40.x = enemy_p->current.pos.x - a_this->current.pos.x;
+ sp40.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z) + 0x8000;
+ }
+ } else if (enemy_view_check(i_this, 600.0f) != NULL) {
+ i_this->mMode = 40;
+ a_this->speedF = 0.0f;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ return rv;
}
/* 80A57998-80A57ED4 00EAF8 053C+00 1/1 0/0 0/0 .text npc_ks_demo_12__FP12npc_ks_class */
-static void npc_ks_demo_12(npc_ks_class* param_0) {
- // NONMATCHING
+static int npc_ks_demo_12(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp48, sp54;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ if (i_this->field_0xb42 >= 79) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ }
+
+ a_this->speedF = 0.0f;
+ break;
+
+ case 1:
+ if (guide_path_12[i_this->field_0x904].field_0x0 != 0) {
+ i_this->field_0x8f0.x = guide_path_12[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_12[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_12[i_this->field_0x904].field_0xc;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ i_this->mMode = 2;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_12[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_12[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 2:
+ rv = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+
+ sp48 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp48.x, sp48.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp48.y, JMAFastSqrt(sp48.x * sp48.x + sp48.z * sp48.z));
+
+ if (sp48.abs() < a_this->speedF * 1.2f) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->mMode = 1;
+ i_this->field_0xbe0 = 1;
+ i_this->field_0x904++;
+ }
+ break;
+
+ case 5:
+ sp48.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp48.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp48.x, sp48.z);
+
+ if (JMAFastSqrt(sp48.x * sp48.x + sp48.z * sp48.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (a_this->speedF > 30.0f) {
+ i_this->field_0x90c = 1;
+ } else {
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ if (guide_path_12[i_this->field_0x904].field_0x0 < 0) {
+ i_this->mActionID = 8;
+ a_this->speedF = 0.0f;
+ }
+
+ return rv;
}
-/* ############################################################################################## */
-/* 80A5E330-80A5E334 000434 0004+00 0/1 0/0 0/0 .rodata @9260 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9260 = 7280.0f;
-COMPILER_STRIP_GATE(0x80A5E330, &lit_9260);
-#pragma pop
-
-/* 80A5E334-80A5E338 000438 0004+00 0/1 0/0 0/0 .rodata @9261 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9261 = -2709.0f;
-COMPILER_STRIP_GATE(0x80A5E334, &lit_9261);
-#pragma pop
-
-/* 80A57ED4-80A58274 00F034 03A0+00 1/1 0/0 0/0 .text npc_ks_guide_0409__FP12npc_ks_class
- */
-static void npc_ks_guide_0409(npc_ks_class* param_0) {
+/* 80A57ED4-80A58274 00F034 03A0+00 1/1 0/0 0/0 .text npc_ks_guide_0409__FP12npc_ks_class */
+static int npc_ks_guide_0409(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp50;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 1:
+ if (player->current.pos.z > a_this->current.pos.z && (i_this->field_0x5c4 > 700.0f || guide_path_0409[i_this->field_0x904].field_0x0 < 0)) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_0409[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_0409[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 5:
+ sp50.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp50.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp50.x, sp50.z);
+
+ if (JMAFastSqrt(sp50.x * sp50.x + sp50.z * sp50.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 8) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ if (i_this->field_0x5c4 < 500.0f || (player->current.pos.z < a_this->current.pos.z && guide_path_0409[i_this->field_0x904].field_0x0 >= 0)) {
+ i_this->mMode = 1;
+ } else {
+ if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 51) {
+ i_this->field_0x5fc = 1;
+ }
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000);
+
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ if (checkDoorDemo()) {
+ f32 fVar1 = 7280.0f - player->current.pos.x;
+ f32 fVar2 = -2709.0f - player->current.pos.z;
+ if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 500.0f) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+ }
+
+ return rv;
}
/* 80A58274-80A58410 00F3D4 019C+00 1/1 0/0 0/0 .text path_search__FP12npc_ks_class */
-static void path_search(npc_ks_class* param_0) {
+static int path_search(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ int path_index = 0;
+ while (path_index < 254) {
+ dPath* path_p = dPath_GetRoomPath(path_index, fopAcM_GetRoomNo(a_this));
+ if (path_p != NULL) {
+ cXyz sp28 = a_this->current.pos - path_p->m_points->m_position;
+ if (sp28.abs() < 200.0f) {
+ OS_REPORT(" サルがが%d番のレール発見しました。\n", path_index);
+ i_this->field_0xc18 = path_p;
+ return 1;
+ }
+ }
-/* ############################################################################################## */
-/* 80A5E338-80A5E33C 00043C 0004+00 0/1 0/0 0/0 .rodata @9545 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9545 = -27426.0f;
-COMPILER_STRIP_GATE(0x80A5E338, &lit_9545);
-#pragma pop
-
-/* 80A5E33C-80A5E340 000440 0004+00 0/1 0/0 0/0 .rodata @9546 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9546 = -20000.0f;
-COMPILER_STRIP_GATE(0x80A5E33C, &lit_9546);
-#pragma pop
-
-/* 80A5E340-80A5E344 000444 0004+00 0/1 0/0 0/0 .rodata @9547 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9547 = 7500.0f;
-COMPILER_STRIP_GATE(0x80A5E340, &lit_9547);
-#pragma pop
-
-/* 80A5E344-80A5E348 000448 0004+00 0/1 0/0 0/0 .rodata @9548 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9548 = 6.0f;
-COMPILER_STRIP_GATE(0x80A5E344, &lit_9548);
-#pragma pop
-
-/* 80A5E348-80A5E34C 00044C 0004+00 0/1 0/0 0/0 .rodata @9549 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9549 = 1.25f;
-COMPILER_STRIP_GATE(0x80A5E348, &lit_9549);
-#pragma pop
-
-/* 80A5E34C-80A5E350 000450 0004+00 0/1 0/0 0/0 .rodata @9550 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9550 = -30900.0f;
-COMPILER_STRIP_GATE(0x80A5E34C, &lit_9550);
-#pragma pop
-
-/* 80A5E350-80A5E354 000454 0004+00 0/1 0/0 0/0 .rodata @9551 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9551 = -15756.0f;
-COMPILER_STRIP_GATE(0x80A5E350, &lit_9551);
-#pragma pop
-
-/* 80A5E354-80A5E358 000458 0004+00 0/1 0/0 0/0 .rodata @9552 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9552 = 1300.0f;
-COMPILER_STRIP_GATE(0x80A5E354, &lit_9552);
-#pragma pop
-
-/* 80A5E358-80A5E35C 00045C 0004+00 0/1 0/0 0/0 .rodata @9553 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9553 = -31872.0f;
-COMPILER_STRIP_GATE(0x80A5E358, &lit_9553);
-#pragma pop
-
-/* 80A5E35C-80A5E360 000460 0004+00 0/1 0/0 0/0 .rodata @9554 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9554 = -15490.0f;
-COMPILER_STRIP_GATE(0x80A5E35C, &lit_9554);
-#pragma pop
+ path_index++;
+ if (path_index >= 254) {
+ path_index = 0;
+ }
+ }
+
+ return 0;
+}
/* 80A58410-80A58FE0 00F570 0BD0+00 1/1 0/0 0/0 .text npc_ks_mori__FP12npc_ks_class */
-static void npc_ks_mori(npc_ks_class* param_0) {
+static int npc_ks_mori(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp44, sp50;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+ f32 fVar1 = l_HIO.field_0x30;
+ f32 fVar2 = 1.25f;
-/* ############################################################################################## */
-/* 80A5E360-80A5E364 000464 0004+00 0/1 0/0 0/0 .rodata @9862 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9862 = -39906.0f;
-COMPILER_STRIP_GATE(0x80A5E360, &lit_9862);
-#pragma pop
-
-/* 80A5E364-80A5E368 000468 0004+00 0/1 0/0 0/0 .rodata @9863 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9863 = 21962.0f;
-COMPILER_STRIP_GATE(0x80A5E364, &lit_9863);
-#pragma pop
-
-/* 80A5E368-80A5E36C 00046C 0004+00 0/1 0/0 0/0 .rodata @9864 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9864 = -24243.0f;
-COMPILER_STRIP_GATE(0x80A5E368, &lit_9864);
-#pragma pop
-
-/* 80A5E36C-80A5E370 000470 0004+00 0/1 0/0 0/0 .rodata @9865 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9865 = -21000.0f;
-COMPILER_STRIP_GATE(0x80A5E36C, &lit_9865);
-#pragma pop
-
-/* 80A5E370-80A5E374 000474 0004+00 0/1 0/0 0/0 .rodata @9866 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9866 = 1962.0f;
-COMPILER_STRIP_GATE(0x80A5E370, &lit_9866);
-#pragma pop
+ switch (i_this->mMode) {
+ case 0:
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225])) {
+ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) {
+ i_this->mMode = 302;
+ i_this->field_0xc17 = 3;
+ dComIfGp_setItemOilCount(-(dComIfGs_getMaxOil() & 0xFFFF));
+ }
+ } else {
+ i_this->field_0xaec = 1;
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224])) {
+ i_this->mMode = 3;
+ call_pt = 0;
+ i_this->field_0xc17 = 2;
+ a_this->current.angle.y = player->shape_angle.y + 0x8000;
+ i_this->field_0x8fc.y = a_this->current.angle.y;
+ } else {
+ a_this->current.pos.y = a_this->home.pos.y + 10000.0f;
+ a_this->speed.y = 0.0f;
+
+ if (!daPy_getPlayerActorClass()->checkKandelaarSwing(1)) {
+ if (!daPy_getPlayerActorClass()->getKandelaarFlamePos()) break;
+ if (!daPy_getPlayerActorClass()->checkUseKandelaar(0)) break;
+ }
+
+ sp44.set(-27426.0f, player->current.pos.y, -20000.0f);
+ sp44 -= player->current.pos;
+ if (sp44.abs() < 7500.0f) {
+ i_this->mMode = 1;
+ i_this->mTimers[0] = 10;
+ }
+ }
+ }
+ break;
+
+ case 1:
+ a_this->current.pos.y = a_this->home.pos.y + 10000.0f;
+ a_this->speed.y = 0.0f;
+ if (i_this->mTimers[0] != 1) break;
+
+ if (daPy_getPlayerActorClass()->checkKandelaarSwing(1) || (daPy_getPlayerActorClass()->getKandelaarFlamePos() != NULL &&
+ daPy_getPlayerActorClass()->checkUseKandelaar(0))) {
+ i_this->field_0xb42 = 200;
+ anm_init(i_this, 44, 0.0f, 2, 1.0f);
+ } else {
+ i_this->mMode = 0;
+ }
+ break;
+
+ case 2:
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ sp44.x = i_this->field_0xbb4;
+ sp44.y = 0.0f;
+ sp44.z = 100.0f;
+ MtxPosition(&sp44, &sp50);
+ a_this->current.pos = player->current.pos + sp50;
+ a_this->current.angle.y = player->shape_angle.y - 0x4000;
+ i_this->field_0x8fc.y = a_this->current.angle.y;
+ cLib_addCalc2(&i_this->field_0xbb4, -500.0f, 1.0f, 20.0f);
+ break;
+
+ case 230:
+ a_this->speedF = 20.0f;
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 231;
+ a_this->speedF = 0.0f;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = 30;
+ }
+ break;
+
+ case 231:
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 44, 3.0f, 2, 1.0f);
+ i_this->mTimers[0] = 110;
+ i_this->mMode = 232;
+ }
+ break;
+
+ case 232:
+ if (i_this->mTimers[0] == 40) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 3;
+ call_pt = 1;
+ }
+ break;
+
+ case 3:
+ if (path_search(i_this) != 0) {
+ anm_init(i_this, 28, 6.0f, 2, 1.0f);
+ i_this->mMode = 4;
+ i_this->field_0x904 = 1;
+ a_this->speedF = 0.0f;
+ i_this->mTimers[3] = l_HIO.field_0x2c * 30.0f;
+ }
+ break;
+
+ case 4:
+ if (i_this->field_0x904 >= i_this->field_0xc18->m_num) {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ i_this->mMode = 11;
+ a_this->speedF = 0.0f;
+ } else {
+ if (i_this->field_0x5c4 > (l_HIO.field_0x30 + 150.0f)) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ } else {
+ dPnt* pnt_p = i_this->field_0xc18->m_points;
+ int iVar1 = i_this->field_0x904;
+ i_this->field_0x8f0.x = pnt_p[iVar1].m_position.x;
+ i_this->field_0x8f0.y = pnt_p[iVar1].m_position.y;
+ i_this->field_0x8f0.z = pnt_p[iVar1].m_position.z;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x20 * fVar2;
+
+ if (i_this->field_0x5d0 != 28) {
+ anm_init(i_this, 28, 6.0f, 2, 1.0f);
+ }
+ }
+ }
+ break;
+
+ case 5:
+ sp44.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp44.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z);
+
+ if (JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z) < 100.0f) {
+ i_this->field_0x904++;
+ i_this->mMode = 4;
+ }
+ break;
+
+ case 10:
+ if (i_this->field_0x5d0 == 7) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ } else {
+ i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000;
+ }
+
+ if (i_this->field_0x5c4 < fVar1) {
+ i_this->mMode = 4;
+ }
+ break;
+
+ case 11:
+ if (i_this->field_0x5d0 == 7) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ }
+
+ sp44.x = -30900.0f - player->current.pos.x;
+ sp44.z = -15756.0f - player->current.pos.z;
+ if (JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z) < 1300.0f || i_this->field_0x5c4 < fVar1) {
+ i_this->field_0xb42 = 300;
+ i_this->mMode = 300;
+ }
+ break;
+
+ case 300:
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ break;
+
+ case 301:
+ sp44.x = -31872.0f - a_this->current.pos.x;
+ sp44.z = -15490.0f - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z);
+ break;
+
+ case 302:
+ a_this->current.pos.y = a_this->home.pos.y + 10000.0f;
+ a_this->speed.y = 0.0f;
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ break;
+
+ case 50:
+ anm_init(i_this, 46, 3.0f, 0, 1.0f);
+ i_this->mMode = 51;
+ break;
+
+ case 51:
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ break;
+
+ case 53:
+ if (i_this->mTimers[0] == 0) {
+ if ((call_pt & 1) != 0) {
+ anm_init(i_this, 8, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ }
+
+ call_pt++;
+ i_this->mMode = 10;
+ i_this->mTimers[3] = 0;
+ }
+ break;
+
+ case 100:
+ anm_init(i_this, 44, 3.0f, 2, 1.0f);
+ i_this->mMode = 101;
+ i_this->mTimers[0] = 80;
+ break;
+
+ case 101:
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 4;
+ i_this->mTimers[3] = l_HIO.field_0x2c * 30.0f;
+ }
+ break;
+ }
+
+ if (i_this->mMode != 11 && i_this->mMode > 3 && i_this->mMode < 40 && (i_this->mTimers[3] == 0 || dComIfGs_shake_kandelaar_check() == 1)) {
+ i_this->mMode = 100;
+ a_this->speedF = 0.0f;
+ }
+
+ if (i_this->mMode >= 40 && i_this->mMode <= 52) {
+ if (enemy_check(i_this, 800.0f) == NULL) {
+ i_this->mMode = 53;
+ i_this->mTimers[0] = 30;
+ }
+ } else {
+ fopAc_ac_c* enemy_p = enemy_view_check(i_this, 400.0f);
+ if (enemy_p != NULL) {
+ i_this->mMode = 50;
+ a_this->speedF = 0.0f;
+ sp44.x = enemy_p->current.pos.x - a_this->current.pos.x;
+ sp44.z = enemy_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z) + 0x8000;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, 0x1000);
+
+ s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y;
+ if (sVar1 > 0x1000 || sVar1 < -0x1000) {
+ rv = 0;
+ }
+
+ return rv;
+}
/* 80A58FE0-80A599D8 010140 09F8+00 2/1 0/0 0/0 .text npc_ks_fsdemo__FP12npc_ks_class */
-static void npc_ks_fsdemo(npc_ks_class* param_0) {
+static int npc_ks_fsdemo(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp2c, sp38;
+ int rv = 1;
+ int frame = i_this->mpModelMorf->getFrame();
+ int iVar1 = 0;
+ s16 sVar1 = 0x1000;
+ s16 sVar2;
+
+ i_this->field_0x5fc = 0;
+ i_this->field_0xaec = 1;
+
+ switch (i_this->mMode) {
+ case 0:
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x220])) {
+ i_this->mMode = 40;
+ } else {
+ fpcM_Search(s_fs_sub, i_this);
+ a_this->current.pos.set(-39906.0f, 21962.0f, -24243.0f);
+ rv = 0;
+
+ if (player->current.pos.z < -21000.0f) {
+ i_this->mMode = 1;
+ a_this->current.pos.set(-39906.0f, 1962.0f, -24243.0f);
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ i_this->field_0xb42 = 350;
+ mDoAud_seStart(Z2SE_KOSARU_V_PRISONED, 0, 0, 0);
+ }
+ }
+ break;
+
+ case 1:
+ if (guide_path_fs[i_this->field_0x904].field_0x0 != 0) {
+ i_this->field_0x8f0.x = guide_path_fs[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.y = guide_path_fs[i_this->field_0x904].field_0x8;
+ i_this->field_0x8f0.z = guide_path_fs[i_this->field_0x904].field_0xc;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ i_this->mMode = 2;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_fs[i_this->field_0x904].field_0x4;
+ i_this->field_0x8f0.z = guide_path_fs[i_this->field_0x904].field_0xc;
+ i_this->mMode = 5;
+ a_this->speedF = l_HIO.field_0x1c;
+
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 2:
+ rv = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+
+ sp2c = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp2c.y, JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z));
+
+ if (sp2c.abs() < a_this->speedF * 1.2f) {
+ a_this->current.pos = i_this->field_0x8f0;
+
+ if (i_this->field_0x904 == 0) {
+ anm_init(i_this, 45, 3.0f, 0, 1.0f);
+ i_this->mMode = 3;
+ i_this->field_0x8fc.y += 0x8000;
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->mMode = 1;
+ }
+
+ i_this->field_0xbe0 = 1;
+ i_this->field_0x904++;
+ }
+ break;
+
+ case 3:
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->field_0x8fc.y += 0x8000;
+ i_this->mMode = 1;
+ }
+ break;
+
+ case 5:
+ sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z);
+
+ if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) {
+ i_this->field_0x904++;
+ i_this->mMode = 1;
+
+ if (guide_path_fs[i_this->field_0x904].field_0x0 < 0) {
+ i_this->mMode = 10;
+ a_this->speedF = 0.0f;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 10:
+ a_this->speedF = 0.0f;
+ break;
+
+ case 20:
+ i_this->mMode = 21;
+ anm_init(i_this, 51, 10.0f, 2, 1.0f);
+ // fallthrough
+ case 21:
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ sVar1 = 0;
+ i_this->field_0x5fc = 1;
+
+ if (i_this->mTimers[2] != 0) {
+ i_this->field_0x93c = 10;
+ i_this->field_0x940.set(-37799.0f, 815.0f, -22323.0f);
+ i_this->field_0x8fc.y -= 0x3000;
+ sVar1 = 0x800;
+ }
+
+ iVar1 = 1;
+ sVar2 = a_this->current.angle.y - i_this->field_0x5c8;
+ if ((sVar2 > 0x3000 || sVar2 < -0x3000) && i_this->mMode < 22) {
+ anm_init(i_this, 28, 3.0f, 0, 1.0f);
+ i_this->mMode = 22;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1);
+ }
+ break;
+
+ case 22:
+ sVar1 = 0x800;
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+
+ if (frame >= 11) {
+ i_this->mMode = 20;
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ break;
+
+ case 41:
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43) {
+ if (i_this->field_0xb42 >= 360 && i_this->mpModelMorf->checkFrame(57.0f)) {
+ i_this->mMode = 20;
+ } else if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ }
+ break;
+
+ case 42:
+ if (i_this->mTimers[1] == 1) {
+ i_this->field_0xb42 = 360;
+ }
+ }
+
+ if ((i_this->mMode == 40 || i_this->mMode == 41) && fopAcM_SearchByName(PROC_E_FS) == NULL && i_this->field_0xb42 == 0) {
+ i_this->mMode = 42;
+ i_this->mTimers[1] = 30;
+ }
+
+ if (a_this->speedF > 25.0f) {
+ i_this->field_0x90c = 1;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, sVar1);
+
+ if (iVar1 != 0) {
+ fopAcM_OnStatus(a_this, 0);
+ cLib_onBit(a_this->attention_info.flags, 0xAUL);
+ a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e);
+ if (dComIfGp_event_runCheck()) {
+ if (a_this->eventInfo.checkCommandTalk()) {
+ if (i_this->field_0xaee == 0) {
+ i_this->mMsgFlow.init(a_this, 0x74, 0, NULL);
+ i_this->field_0xaee = 1;
+ }
+
+ if (i_this->mMsgFlow.doFlow(a_this, NULL, 0)) {
+ dComIfGp_event_reset();
+ i_this->field_0xaee = 0;
+ }
+ }
+ } else {
+ i_this->field_0xaee = 0;
+ }
+ } else {
+ fopAcM_OffStatus(a_this, 0);
+ cLib_offBit(a_this->attention_info.flags, 0xAUL);
+ i_this->field_0xaee = 0;
+ }
+
+ return rv;
}
/* 80A599D8-80A59A90 010B38 00B8+00 1/1 0/0 0/0 .text npc_ks_kago__FP12npc_ks_class */
-static void npc_ks_kago(npc_ks_class* param_0) {
- // NONMATCHING
-}
+static void npc_ks_kago(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
-/* ############################################################################################## */
-/* 80A5E374-80A5E378 000478 0004+00 0/0 0/0 0/0 .rodata @9867 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9867 = -37799.0f;
-COMPILER_STRIP_GATE(0x80A5E374, &lit_9867);
-#pragma pop
-
-/* 80A5E378-80A5E37C 00047C 0004+00 0/0 0/0 0/0 .rodata @9868 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9868 = 815.0f;
-COMPILER_STRIP_GATE(0x80A5E378, &lit_9868);
-#pragma pop
-
-/* 80A5E37C-80A5E380 000480 0004+00 0/0 0/0 0/0 .rodata @9869 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9869 = -22323.0f;
-COMPILER_STRIP_GATE(0x80A5E37C, &lit_9869);
-#pragma pop
-
-/* 80A5E380-80A5E384 000484 0004+00 0/0 0/0 0/0 .rodata @9870 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_9870 = 57.0f;
-COMPILER_STRIP_GATE(0x80A5E380, &lit_9870);
-#pragma pop
-
-/* 80A5E384-80A5E388 000488 0004+00 0/1 0/0 0/0 .rodata @10197 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10197 = 16.0f;
-COMPILER_STRIP_GATE(0x80A5E384, &lit_10197);
-#pragma pop
-
-/* 80A5E388-80A5E38C 00048C 0004+00 0/1 0/0 0/0 .rodata @10198 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10198 = 9.0f;
-COMPILER_STRIP_GATE(0x80A5E388, &lit_10198);
-#pragma pop
-
-/* 80A5E38C-80A5E390 000490 0004+00 0/1 0/0 0/0 .rodata @10199 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10199 = 24.0f;
-COMPILER_STRIP_GATE(0x80A5E38C, &lit_10199);
-#pragma pop
-
-/* 80A5E390-80A5E394 000494 0004+00 0/2 0/0 0/0 .rodata @10200 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10200 = 11.0f;
-COMPILER_STRIP_GATE(0x80A5E390, &lit_10200);
-#pragma pop
-
-/* 80A5E394-80A5E398 000498 0004+00 0/1 0/0 0/0 .rodata @10201 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10201 = 19.0f;
-COMPILER_STRIP_GATE(0x80A5E394, &lit_10201);
-#pragma pop
-
-/* 80A5E398-80A5E39C 00049C 0004+00 0/1 0/0 0/0 .rodata @10202 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10202 = 36.0f;
-COMPILER_STRIP_GATE(0x80A5E398, &lit_10202);
-#pragma pop
-
-/* 80A5E39C-80A5E3A0 0004A0 0004+00 0/1 0/0 0/0 .rodata @10203 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10203 = 54.0f;
-COMPILER_STRIP_GATE(0x80A5E39C, &lit_10203);
-#pragma pop
-
-/* 80A5E3A0-80A5E3A4 0004A4 0004+00 0/1 0/0 0/0 .rodata @10204 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10204 = 47.0f;
-COMPILER_STRIP_GATE(0x80A5E3A0, &lit_10204);
-#pragma pop
-
-/* 80A5E3A4-80A5E3A8 0004A8 0004+00 0/1 0/0 0/0 .rodata @10205 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10205 = 22.0f;
-COMPILER_STRIP_GATE(0x80A5E3A4, &lit_10205);
-#pragma pop
-
-/* 80A5E3A8-80A5E3AC 0004AC 0004+00 0/1 0/0 0/0 .rodata @10206 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10206 = 17.0f;
-COMPILER_STRIP_GATE(0x80A5E3A8, &lit_10206);
-#pragma pop
-
-/* 80A5E3AC-80A5E3B0 0004B0 0004+00 0/1 0/0 0/0 .rodata @10207 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10207 = 18.0f;
-COMPILER_STRIP_GATE(0x80A5E3AC, &lit_10207);
-#pragma pop
-
-/* 80A5E3B0-80A5E3B4 0004B4 0004+00 0/1 0/0 0/0 .rodata @10208 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10208 = 38.0f;
-COMPILER_STRIP_GATE(0x80A5E3B0, &lit_10208);
-#pragma pop
-
-/* 80A5E3B4-80A5E3B8 0004B8 0004+00 0/1 0/0 0/0 .rodata @10209 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10209 = 51.0f;
-COMPILER_STRIP_GATE(0x80A5E3B4, &lit_10209);
-#pragma pop
-
-/* 80A5E3B8-80A5E3BC 0004BC 0004+00 0/1 0/0 0/0 .rodata @10210 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u32 const lit_10210 = 0x3CB020C5;
-COMPILER_STRIP_GATE(0x80A5E3B8, &lit_10210);
-#pragma pop
-
-/* 80A5E3BC-80A5E3C0 0004C0 0004+00 0/1 0/0 0/0 .rodata @10211 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10211 = 127.0f;
-COMPILER_STRIP_GATE(0x80A5E3BC, &lit_10211);
-#pragma pop
+ i_this->field_0x5fc = 0;
+
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 34, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ // fallthrough
+ case 1:
+ break;
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 2, 0x2000);
+ i_this->field_0xaec = 0;
+
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) {
+ fopAcM_delete(a_this);
+ }
+}
/* 80A59A90-80A5A7D8 010BF0 0D48+00 1/1 0/0 0/0 .text anm_se_set__FP12npc_ks_class */
-static void anm_se_set(npc_ks_class* param_0) {
+static void anm_se_set(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
-/* ############################################################################################## */
-/* 80A5E3C0-80A5E3C4 0004C4 0004+00 0/1 0/0 0/0 .rodata @10479 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10479 = -300.0f;
-COMPILER_STRIP_GATE(0x80A5E3C0, &lit_10479);
-#pragma pop
-
-/* 80A5E3C4-80A5E3C8 0004C8 0004+00 0/1 0/0 0/0 .rodata @10480 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10480 = -90.0f;
-COMPILER_STRIP_GATE(0x80A5E3C4, &lit_10480);
-#pragma pop
-
-/* 80A5E3C8-80A5E3CC 0004CC 0004+00 0/1 0/0 0/0 .rodata @10481 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10481 = 2000.0f;
-COMPILER_STRIP_GATE(0x80A5E3C8, &lit_10481);
-#pragma pop
-
-/* 80A5E3CC-80A5E3D0 0004D0 0004+00 0/1 0/0 0/0 .rodata @10482 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10482 = -70.0f;
-COMPILER_STRIP_GATE(0x80A5E3CC, &lit_10482);
-#pragma pop
-
-/* 80A5E3D0-80A5E3D4 0004D4 0004+00 0/1 0/0 0/0 .rodata @10483 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10483 = 0.75f;
-COMPILER_STRIP_GATE(0x80A5E3D0, &lit_10483);
-#pragma pop
+ if (i_this->field_0x5d0 == 17) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WAIT, -1);
+ }
+
+ if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(16.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 55) {
+ if (i_this->mpModelMorf->checkFrame(9.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 11) {
+ if (i_this->mpModelMorf->checkFrame(10.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 56) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_DELIGHT, -1);
+ }
+
+ if (i_this->mpModelMorf->checkFrame(24.0f) || i_this->mpModelMorf->checkFrame(11.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 12) {
+ if (i_this->mpModelMorf->checkFrame(3.0f) || i_this->mpModelMorf->checkFrame(10.0f)) {
+ if (fopAcM_GetRoomNo(a_this) == 22) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_FT_TSUTA, 0, -1);
+ } else {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_CLIMB, 0, -1);
+ }
+ }
+ } else if (i_this->field_0x5d0 == 15) {
+ if (i_this->mpModelMorf->checkFrame(3.0f) || i_this->mpModelMorf->checkFrame(10.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_CLIMB, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 25) {
+ if (i_this->mpModelMorf->checkFrame(19.0f) || i_this->mpModelMorf->checkFrame(36.0f) || i_this->mpModelMorf->checkFrame(54.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1);
+ }
+ } else if (i_this->field_0x5d0 == 26) {
+ if (i_this->mpModelMorf->checkFrame(1.0f) && i_this->field_0xc17 == 2) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1);
+ }
+
+ if (i_this->mpModelMorf->checkFrame(2.0f)) {
+ if (i_this->mActionID == 203 && i_this->mMode < 4) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_FT_BRIDGE, 0, -1);
+ } else {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_FOOTNOTE, 0, -1);
+
+ if (i_this->field_0xc17 == 2) {
+ mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0);
+ }
+ }
+ }
+ } else if (i_this->field_0x5d0 == 28) {
+ if (i_this->mpModelMorf->checkFrame(1.0f) && i_this->field_0xc17 == 2) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1);
+ }
+
+ if (i_this->mpModelMorf->checkFrame(2.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_FOOTNOTE, 0, -1);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1);
+
+ if (i_this->field_0xc17 == 2) {
+ mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0);
+ }
+ }
+ } else if (i_this->field_0x5d0 == 43) {
+ if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(47.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SCARED, -1);
+ }
+ } else if (i_this->field_0x5d0 == 39) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SCARED, -1);
+ }
+ } else if (i_this->field_0x5d0 == 30) {
+ if (i_this->mpModelMorf->checkFrame(4.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ } else if (i_this->mpModelMorf->checkFrame(22.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 5) {
+ if (i_this->mpModelMorf->checkFrame(4.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ } else if (i_this->mpModelMorf->checkFrame(22.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 7) {
+ if (i_this->mpModelMorf->checkFrame(8.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ } else if (i_this->mpModelMorf->checkFrame(17.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+
+ if (i_this->field_0xc17 == 2) {
+ mDoAud_seStart(Z2SE_KOSARU_KANTERA_ADD, &i_this->field_0xc04, 0, 0);
+ }
+ }
+ } else if (i_this->field_0x5d0 == 8) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CALL, -1);
+ }
+ } else if (i_this->field_0x5d0 == 44) {
+ if (i_this->mpModelMorf->checkFrame(9.0f) || i_this->mpModelMorf->checkFrame(19.0f)) {
+ mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SWING_KANTERA, -1);
+ }
+ } else if (i_this->field_0x5d0 == 35) {
+ if (i_this->mpModelMorf->checkFrame(40.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SLAPPED_HIP, -1);
+ }
+ } else if (i_this->field_0x5d0 == 16) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CALL, -1);
+ }
+ } else if (i_this->field_0x5d0 == 46) {
+ if (i_this->mpModelMorf->checkFrame(4.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1);
+ } else if (i_this->mpModelMorf->checkFrame(18.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ } else if ((i_this->mpModelMorf->checkFrame(25.0f) || i_this->mpModelMorf->checkFrame(38.0f)) || i_this->mpModelMorf->checkFrame(51.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1);
+ mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0);
+ }
+ } else if (i_this->field_0x5d0 == 34) {
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ f32 fVar1 = i_this->field_0x5c4 * 0.0215f;
+ if (fVar1 > 127.0f) {
+ fVar1 = 127.0f;
+ }
+
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_V_KAGO_WAIT, fVar1, -1);
+ } else if (i_this->mpModelMorf->checkFrame(16.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ }
+ } else if (i_this->field_0x5d0 == 45) {
+ if (i_this->mpModelMorf->checkFrame(4.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1);
+ } else if (i_this->mpModelMorf->checkFrame(16.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ }
+ }
+}
/* 80A5A7D8-80A5B544 011938 0D6C+00 1/1 0/0 0/0 .text action__FP12npc_ks_class */
-static void action(npc_ks_class* param_0) {
+static void action(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp44, sp50;
+
+ fopAcM_OffStatus(a_this, 0);
+ cLib_offBit(a_this->attention_info.flags, 0x20000042UL);
+
+ if (i_this->field_0x5b5 == 0) {
+ i_this->field_0x5c4 = fopAcM_searchPlayerDistanceXZ(a_this);
+ } else {
+ sp44 = player->eyePos - i_this->field_0x614;
+ i_this->field_0x5c4 = sp44.abs();
+ cLib_addCalcAngleS2(&a_this->current.angle.x, -0x8000, 1, 0x1000);
+ }
+
+ i_this->field_0x5c8 = fopAcM_searchPlayerAngleY(a_this);
+ i_this->field_0x5fc = 0;
+ i_this->field_0xaed = 0;
+ i_this->field_0x5b5 = 0;
+
+ int iVar1 = 1;
+ int iVar2 = 2;
+ int iVar3 = 0;
+
+ a_this->gravity = -5.0f;
+
+ switch (i_this->mActionID) {
+ case 2:
+ a_this->gravity = 0.0f;
+ i_this->field_0x5fc = 1;
+ iVar2 = npc_ks_ori2(i_this);
+ break;
+
+ case 4:
+ a_this->gravity = 0.0f;
+ npc_ks_pole_ori(i_this);
+ i_this->field_0x5fc = 1;
+ iVar1 = 0;
+ break;
+
+ case 5:
+ i_this->field_0x5fc = 1;
+ iVar2 = npc_ks_ori(i_this);
+ if (iVar2 == 0) {
+ iVar1 = 0;
+ }
+ break;
+
+ case 8:
+ npc_ks_home(i_this);
+ i_this->field_0x5fc = 1;
+ break;
+
+ case 10:
+ a_this->gravity = 0.0f;
+ npc_ks_hang(i_this);
+ i_this->field_0x5fc = 2;
+ i_this->field_0x5b5 = 1;
+ iVar1 = 0;
+ iVar2 = 0;
+ break;
+
+ case 11:
+ a_this->gravity = 0.0f;
+ npc_ks_hang_s(i_this);
+ i_this->field_0x5fc = 2;
+ i_this->field_0x5b5 = 1;
+ iVar1 = 0;
+ iVar2 = 0;
+ break;
+
+ case 20:
+ a_this->gravity = 0.0f;
+ npc_ks_to_hang(i_this);
+ iVar2 = 2;
+ break;
+
+ case 21:
+ a_this->gravity = 0.0f;
+ npc_ks_e_hang(i_this);
+ i_this->field_0x5fc = 3;
+ i_this->field_0x5b5 = 1;
+ iVar1 = 0;
+ iVar2 = 0;
+ break;
+
+ case 22:
+ iVar2 = npc_ks_e_jump(i_this);
+ break;
+
+ case 100:
+ a_this->gravity = -5.0f;
+ iVar3 = 1;
+ if (checkDoorDemo()) {
+ i_this->field_0xaec = 1;
+ } else {
+ if (i_this->mMode > 6) {
+ i_this->mMode = 0;
+ }
+
+ cLib_addCalc2(&a_this->current.pos.y, player->current.pos.y, 1.0f, 10.0f);
+
+ if (i_this->field_0x5c4 > 400.0f) {
+ cMtx_YrotS(*calc_mtx, i_this->field_0x5c8);
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ sp44.z = -300.0f;
+ MtxPosition(&sp44, &sp50);
+ a_this->current.pos.x = player->current.pos.x + sp50.x;
+ a_this->current.pos.z = player->current.pos.z + sp50.z;
+ }
+
+ iVar1 = 0;
+ a_this->speed.y = 0.0f;
+
+ int iVar4 = fopAcM_GetRoomNo(a_this);
+ int iVar5 = dStage_roomControl_c::getNextStayNo();
+ if (iVar5 != iVar4) {
+ if ((iVar4 != 0 || iVar5 != 3) && (iVar4 != 3 || iVar5 != 4)) {
+ if ((((!dComIfGs_isSwitch(0x52, fopAcM_GetRoomNo(a_this) || iVar4 != 4) || iVar5 != 0) &&
+ ((i_this->field_0x5b6 != 2 && i_this->field_0x5b6 != 3) || (iVar4 != 0 || iVar5 != 15))) &&
+ ((iVar4 != 1 || iVar5 != 4) && (iVar4 != 0 || (iVar5 != 1 || i_this->field_0x5b6 > 2)))) &&
+ (iVar4 != 9 || iVar5 == 12)) {
+ i_this->mActionID = 101;
+ i_this->mMode = 0;
+ } else {
+ iVar2 = npc_ks_option(i_this);
+ fopAcM_SetRoomNo(a_this, fopAcM_GetRoomNo(player));
+ a_this->tevStr.room_no = fopAcM_GetRoomNo(a_this);
+ }
+
+ i_this->field_0xbdd = 0;
+
+ if (iVar3 != 0) {
+ if (water_check(i_this, a_this->current.pos, 60.0f) && a_this->current.pos.y <= i_this->field_0x63c) {
+ i_this->field_0xbdd = 1;
+ if (i_this->mActionID != 100) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+ }
+ }
+
+ if (i_this->field_0x5c4 < 500.0f && fabsf(a_this->current.pos.y - player->current.pos.y) < 1000.0f) {
+ daPy_py_c::setLookPos(&a_this->eyePos);
+ }
+
+ if (i_this->field_0xaed == 1 && i_this->field_0x5c4 < 300.0f) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+
+ cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y, 2, 0x2000);
+ cLib_addCalcAngleS2(&a_this->shape_angle.x, a_this->current.angle.x, 2, 0x2000);
+ cLib_addCalcAngleS2(&a_this->shape_angle.z, a_this->current.angle.z, 2, 0x2000);
+
+ if (iVar2 == 1) {
+ f32 fVar1 = 1.0f;
+
+ if (i_this->field_0x5d0 == 47 && fopAcM_CheckCondition(a_this, 4) != 0) {
+ fVar1 = 10.0f;
+ }
+
+ cMtx_YrotS(*calc_mtx, a_this->current.angle.y);
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ sp44.z = a_this->speedF * fVar1;
+ MtxPosition(&sp44, &sp50);
+
+ a_this->speed.x = sp50.x;
+ a_this->speed.z = sp50.z;
+ a_this->current.pos += a_this->speed;
+ a_this->speed.y += a_this->gravity;
+
+ if (a_this->speed.y < -90.0f) {
+ a_this->speed.y = -90.0f;
+ }
+ } else if (iVar2 == 2) {
+ cMtx_YrotS(*calc_mtx, i_this->field_0x8fc.y);
+ cMtx_XrotM(*calc_mtx, i_this->field_0x8fc.x);
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ sp44.z = a_this->speedF;
+ MtxPosition(&sp44, &a_this->speed);
+ a_this->current.pos += a_this->speed;
+ iVar1 = 0;
+ }
+
+ if (i_this->field_0xaec == 1) {
+ cXyz* move_p = i_this->mStts.GetCCMoveP();
+ if (move_p != NULL) {
+ a_this->current.pos.x += move_p->x * 0.5f;
+ a_this->current.pos.y += move_p->y * 0.5f;
+ a_this->current.pos.z += move_p->z * 0.5f;
+ }
+ }
+
+ if (iVar1 != 0) {
+ if (a_this->shape_angle.x < -1000) {
+ f32 fVar2 = 30.0f * cM_ssin(a_this->shape_angle.x);
+ a_this->current.pos.y += fVar2;
+ a_this->old.pos.y += fVar2;
+
+ i_this->mObjAcch.CrrPos(dComIfG_Bgsp());
+
+ a_this->current.pos.y -= fVar2;
+ a_this->old.pos.y -= fVar2;
+ } else {
+ i_this->mObjAcch.CrrPos(dComIfG_Bgsp());
+ }
+ }
+
+ s16 sVar1 = 0;
+ s16 sVar2 = 0;
+
+ if (i_this->field_0x5fc != 0) {
+ if (i_this->field_0x93c == 0) {
+ if ((i_this->field_0x5e6 & 7U) == 0 && fopAcM_otoCheck(a_this, 2000.0f)) {
+ i_this->field_0x940 = dKy_Sound_get()->position;
+ i_this->field_0x93c = cM_rndF(20.0f) + 30.0f;
+ }
+
+ player = dComIfGp_getPlayer(0);
+ if (i_this->field_0x938 == -1) {
+ sp44 = player->eyePos - a_this->current.pos;
+ sp44.y += -70.0f;
+ } else {
+ fopAc_ac_c* actor_p = fopAcM_SearchByID(i_this->field_0x938);
+ if (actor_p == NULL) {
+ sp44 = player->eyePos - a_this->current.pos;
+ } else {
+ sp44 = actor_p->eyePos - a_this->current.pos;
+ }
+ }
+ } else {
+ i_this->field_0x93c--;
+ if (i_this->field_0x93c < 40) {
+ sp44 = i_this->field_0x940 - a_this->current.pos;
+ sp44.y += 100.0f;
+ } else {
+ sp44 = player->eyePos - a_this->current.pos;
+ sp44.y += -70.0f;
+ }
+ }
+
+ sVar1 = cM_atan2s(sp44.x, sp44.z) - a_this->shape_angle.y;
+ sVar1 -= sVar1 << 1;
+ sVar2 = a_this->shape_angle.y + cM_atan2s(sp44.y, JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z));
+
+ if (sVar1 < 0x1F41) {
+ if (sVar1 < -8000) {
+ sVar1 = -8000;
+ }
+ } else {
+ sVar1 = 8000;
+ }
+
+ if (sVar2 < 0x3E81) {
+ if (sVar2 < -8000) {
+ sVar2 = -8000;
+ }
+ } else {
+ sVar2 = 16000;
+ }
+
+ if (i_this->field_0x5fc > 1) {
+ sVar1 /= 2;
+ }
+ }
+
+ if (i_this->field_0x5fd != 0) {
+ sVar2 = 10000;
+ i_this->field_0x5fd = 0;
+ i_this->field_0x5fc = 1;
+ }
+
+ cLib_addCalcAngleS2(&i_this->field_0x5fe, sVar1, 4, 0x1000);
+ cLib_addCalcAngleS2(&i_this->field_0x600, sVar2, 4, 0x1000);
+
+ if (i_this->field_0x5e0 == 0) {
+ i_this->field_0x5e0 = cM_rndF(60.0f) + 30.0f;
+ } else {
+ i_this->field_0x5e0--;
+ if (i_this->field_0x5e0 < 8) {
+ i_this->field_0x5e2 = 7 - i_this->field_0x5e0;
+ } else {
+ i_this->field_0x5e2 = 0;
+ }
+ }
+
+ cLib_addCalcAngleS2(&i_this->field_0x606, i_this->field_0x608, 2, 5000);
+ i_this->field_0x608 = 0;
+ if (i_this->field_0xbe0 != 0) {
+ fopAcM_effSmokeSet1(&i_this->field_0x858, &i_this->field_0x85c, &a_this->current.pos, NULL,
+ 0.75f, &a_this->tevStr, 1);
+ i_this->field_0xbe0 = 0;
+ }
+ }
+ }
+ }
+
+ case 101:
+ a_this->gravity = -5.0f;
+ npc_ks_awaydoor(i_this);
+ break;
+
+ case 102:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_00(i_this);
+ iVar3 = 1;
+ break;
+
+ case 111:
+ a_this->gravity = -5.0f;
+ iVar3 = npc_ks_guide_00_2(i_this);
+ break;
+
+ case 112:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_00_3(i_this);
+ iVar3 = 1;
+ break;
+
+ case 113:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_01(i_this);
+ iVar3 = 1;
+ break;
+
+ case 114:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_02(i_this);
+ iVar3 = 1;
+ break;
+
+ case 115:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_09(i_this);
+ iVar3 = 1;
+ break;
+
+ case 116:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_22(i_this);
+ iVar3 = 1;
+ break;
+
+ case 117:
+ a_this->gravity = -5.0f;
+ iVar2 = npc_ks_guide_0409(i_this);
+ iVar3 = 1;
+ break;
+
+ case 118:
+ iVar1 = npc_ks_demo_02(i_this);
+ if (iVar1 == 0) {
+ iVar2 = 0;
+ }
+ break;
+
+ case 201:
+ iVar1 = npc_ks_demo_022(i_this);
+ if (iVar1 == 0) {
+ iVar2 = 0;
+ }
+ break;
+
+ case 203:
+ npc_ks_demo_04(i_this);
+ break;
+
+ case 204:
+ iVar2 = npc_ks_demo_12(i_this);
+ break;
+
+ case 300:
+ iVar2 = npc_ks_mori(i_this);
+ break;
+
+ case 301:
+ iVar2 = npc_ks_fsdemo(i_this);
+ break;
+
+ case 302:
+ npc_ks_kago(i_this);
+ }
}
/* 80A5B544-80A5B614 0126A4 00D0+00 1/1 0/0 0/0 .text s_kago_sub__FPvPv */
-static void s_kago_sub(void* param_0, void* param_1) {
+static void* s_kago_sub(void* i_actor, void* i_data) {
// NONMATCHING
-}
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_KAGO) {
+ if (((daObj_Kago_c*)i_actor)->getType() == 0) {
+ return i_actor;
+ }
+ }
-/* ############################################################################################## */
-/* 80A5E3D4-80A5E3D8 0004D8 0004+00 0/1 0/0 0/0 .rodata @10567 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10567 = 44.0f;
-COMPILER_STRIP_GATE(0x80A5E3D4, &lit_10567);
-#pragma pop
-
-/* 80A5E3D8-80A5E3DC 0004DC 0004+00 0/1 0/0 0/0 .rodata @10568 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10568 = 144.5f;
-COMPILER_STRIP_GATE(0x80A5E3D8, &lit_10568);
-#pragma pop
-
-/* 80A5E3DC-80A5E3E0 0004E0 0004+00 0/1 0/0 0/0 .rodata @10569 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10569 = -30715.0f;
-COMPILER_STRIP_GATE(0x80A5E3DC, &lit_10569);
-#pragma pop
-
-/* 80A5E3E0-80A5E3E4 0004E4 0004+00 0/1 0/0 0/0 .rodata @10570 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10570 = 338.0f;
-COMPILER_STRIP_GATE(0x80A5E3E0, &lit_10570);
-#pragma pop
-
-/* 80A5E3E4-80A5E3EC 0004E8 0004+04 0/1 0/0 0/0 .rodata @10571 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10571[1 + 1 /* padding */] = {
- 14500.0f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x80A5E3E4, &lit_10571);
-#pragma pop
-
-/* 80A5E3EC-80A5E3F4 0004F0 0008+00 0/2 0/0 0/0 .rodata @10573 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_10573[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5E3EC, &lit_10573);
-#pragma pop
+ return NULL;
+}
/* 80A5B614-80A5B8FC 012774 02E8+00 1/1 0/0 0/0 .text kantera_sub__FP12npc_ks_class */
-static void kantera_sub(npc_ks_class* param_0) {
+static void kantera_sub(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get());
+ i_this->field_0xc00->setBaseTRMtx(mDoMtx_stack_c::get());
+
+ if (i_this->field_0xc17 == 2) {
+ mDoMtx_stack_c::transM(44.0f, 144.5f, 11.0f);
+ mDoMtx_multVecZero(mDoMtx_stack_c::get(), &i_this->field_0xc04);
+ mDoMtx_stack_c::scaleM(l_HIO.field_0x34, l_HIO.field_0x34, l_HIO.field_0x34);
+ daPy_getPlayerActorClass()->setKandelaarMtx(mDoMtx_stack_c::get(), 1, 1);
+ } else if (i_this->field_0xc17 == 3) {
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
+ if (fopAcM_checkCarryNow(a_this) != 0 && player->getGrabUpStart()) {
+ fopAcM_cancelCarryNow(a_this);
+ cLib_offBit(a_this->attention_info.flags, 0x80UL);
+ i_this->field_0xc17 = 0;
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE2]);
+ } else {
+ i_this->field_0xc04.x = -30715.0f;
+ i_this->field_0xc04.z = -17200.0f;
+ i_this->field_0xc04.y += i_this->field_0xc10;
+ i_this->field_0xc10 -= 5.0f;
+
+ if (i_this->field_0xc04.y <= 338.0f) {
+ i_this->field_0xc04.y = 338.0f;
+ if (i_this->field_0xc16 == 0) {
+ i_this->field_0xc10 = 20.0f;
+ i_this->field_0xc16 = 1;
+ i_this->field_0xc14 = 12;
+ } else {
+ i_this->field_0xc10 = 0.0f;
+ }
+ }
-/* ############################################################################################## */
-/* 80A5E3F4-80A5E3F8 0004F8 0004+00 0/1 0/0 0/0 .rodata @10878 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10878 = 32768.0f;
-COMPILER_STRIP_GATE(0x80A5E3F4, &lit_10878);
-#pragma pop
-
-/* 80A5E3F8-80A5E3FC 0004FC 0004+00 0/1 0/0 0/0 .rodata @10879 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10879 = -60.0f;
-COMPILER_STRIP_GATE(0x80A5E3F8, &lit_10879);
-#pragma pop
-
-/* 80A5E3FC-80A5E400 000500 0004+00 0/1 0/0 0/0 .rodata @10880 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10880 = -0.0f;
-COMPILER_STRIP_GATE(0x80A5E3FC, &lit_10880);
-#pragma pop
-
-/* 80A5E400-80A5E404 000504 0004+00 0/1 0/0 0/0 .rodata @10881 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_10881 = -3.0f;
-COMPILER_STRIP_GATE(0x80A5E400, &lit_10881);
-#pragma pop
-
-/* 80A5FF48-80A5FF58 000108 000C+04 0/0 0/0 0/0 .bss @7870 */
-#pragma push
-#pragma force_active on
-static u8 lit_7870[12];
-#pragma pop
-
-// /* 80A5FF54 */
-// static u8 gap_05_00000114_bss;
-
-/* 80A5FF58-80A5FF64 000118 000C+00 0/0 0/0 0/0 .bss sc$7869 */
-// static cXyz sc[12];
+ mDoMtx_stack_c::transS(i_this->field_0xc04.x, i_this->field_0xc04.y, i_this->field_0xc04.z);
+ f32 fVar1 = cM_ssin(i_this->field_0xc14 * 13000);
+ s16 sVar1 = i_this->field_0xc14;
+ if (i_this->field_0xc14 != 0) {
+ i_this->field_0xc14--;
+ }
+
+ mDoMtx_stack_c::ZrotM((int)sVar1 * fVar1 * 500.0f + 14500.0f);
+ mDoMtx_stack_c::YrotM(5000);
+
+ daPy_getPlayerActorClass()->setKandelaarMtx(mDoMtx_stack_c::get(), 0, 0);
+ fopAcM_OnCarryType(a_this, fopAcM_CARRY_ITEM);
+ cLib_onBit(a_this->attention_info.flags, 0x80UL);
+ a_this->attention_info.distances[4] = 6;
+ a_this->attention_info.position.x = i_this->field_0xc04.x;
+ a_this->attention_info.position.y = i_this->field_0xc04.y + 30.0f;
+ a_this->attention_info.position.z = i_this->field_0xc04.z;
+ a_this->eyePos = a_this->attention_info.position;
+ }
+ }
+}
/* 80A5FF64-80A5FF68 000124 0004+00 0/2 0/0 0/0 .bss c_start */
-#pragma push
-#pragma force_active on
-static u8 c_start[4];
-#pragma pop
-
-/* 80A5B8FC-80A5C3E4 012A5C 0AE8+00 2/1 0/0 0/0 .text daNpc_Ks_Execute__FP12npc_ks_class
- */
-static void daNpc_Ks_Execute(npc_ks_class* param_0) {
+static int c_start;
+
+/* 80A5B8FC-80A5C3E4 012A5C 0AE8+00 2/1 0/0 0/0 .text daNpc_Ks_Execute__FP12npc_ks_class */
+static int daNpc_Ks_Execute(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (i_this->mActionID == 300) {
+ if (c_start == 0 && i_this->field_0xb42 == 0 && dComIfGp_event_runCheck()) {
+ kantera_sub(i_this);
+ return 1;
+ }
+ } else {
+ if (cDmrNowMidnaTalk()) {
+ return 1;
+ }
+ }
+
+ cXyz sp60, sp6c;
+
+ if (i_this->field_0x5b6 == 2) {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ dComIfGs_onSwitch(0x4F, fopAcM_GetRoomNo(a_this));
+ }
+ } else if (i_this->field_0x5b6 == 3 && fopAcM_GetRoomNo(a_this) == 0) {
+ dComIfGs_onSwitch(0x50, fopAcM_GetRoomNo(a_this));
+ }
+
+ i_this->field_0x5e6++;
+
+ for (int i = 0; i < 4; i++) {
+ if (i_this->mTimers[i] != 0) {
+ i_this->mTimers[i]--;
+ }
+ }
+
+ if (i_this->field_0x5f8 != 0) {
+ i_this->field_0x5f8--;
+ }
+
+ if (i_this->field_0x94c != 0) {
+ i_this->field_0x94c--;
+ }
+
+ if (i_this->field_0x94e != 0) {
+ i_this->field_0x94e--;
+ }
+
+ action(i_this);
+
+ if (i_this->field_0x90c != 0) {
+ sp60 = i_this->field_0x91c - i_this->field_0x910;
+ f32 fVar1 = sp60.abs();
+ sp60 = i_this->field_0x91c - a_this->current.pos;
+ f32 fVar2 = sp60.abs();
+ f32 fVar3 = fVar1 * 0.2f;
+ if (fVar3 > 200.0f) {
+ fVar3 = 200.0f;
+ }
+ i_this->field_0x908 = fVar3 * cM_ssin((fVar2 / fVar1) * 32768.0f);
+ i_this->field_0x90c = 0;
+ } else {
+ cLib_addCalc0(&i_this->field_0x908, 1.0f, 5.0f);
+ }
+
+ mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y + i_this->field_0x908, a_this->current.pos.z);
+ mDoMtx_stack_c::YrotM(a_this->shape_angle.y);
+ mDoMtx_stack_c::XrotM(a_this->shape_angle.x);
+ mDoMtx_stack_c::ZrotM(a_this->shape_angle.z);
+ mDoMtx_stack_c::transM(0.0f, i_this->field_0x928, 0.0f);
+ mDoMtx_stack_c::scaleM(l_HIO.field_0x8, l_HIO.field_0x8, l_HIO.field_0x8);
+
+ J3DModel* model = i_this->mpModelMorf->getModel();
+ model->setBaseTRMtx(mDoMtx_stack_c::get());
+ i_this->mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
+ anm_se_set(i_this);
+
+ if (i_this->field_0x5e4 != 0) {
+ i_this->mBtp2->play();
+ } else {
+ i_this->mBtp1->setFrame(i_this->field_0x5e2);
+ }
+
+ i_this->mpModelMorf->calc();
+
+ if (i_this->field_0x5d0 == 34) {
+ daObj_Kago_c* basket_p = (daObj_Kago_c*)fpcM_Search(s_kago_sub, i_this);
+ if (basket_p != NULL) {
+ MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get());
+ mDoMtx_stack_c::YrotM(-2000);
+ mDoMtx_stack_c::XrotM(-0x3638);
+ mDoMtx_stack_c::ZrotM(-0x2E68);
+ mDoMtx_stack_c::transM(-60.0f, 0.0f, 0.0f);
+ mDoMtx_stack_c::YrotM(0);
+ mDoMtx_stack_c::XrotM(0);
+ mDoMtx_stack_c::ZrotM(0);
+
+ basket_p->setMtx(mDoMtx_stack_c::get());
+ if (i_this->fopAcM_checkHawkCarryNow(basket_p) != 0) {
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1);
+ }
+ }
+ }
+
+ if (i_this->field_0xbfc != NULL) {
+ i_this->field_0xbfc->setBaseTRMtx(i_this->mpModelMorf->getModel()->getAnmMtx(4));
+ }
+
+ kantera_sub(i_this);
+
+ MTXCopy(model->getAnmMtx(4), *calc_mtx);
+ sp60.set(0.0f, 0.0f, 0.0f);
+ if (i_this->field_0xc17 != 3) {
+ MtxPosition(&sp60, &a_this->eyePos);
+ a_this->attention_info.position = a_this->eyePos;
+ a_this->attention_info.position.y += 30.0f;
+ }
+
+ MTXCopy(model->getAnmMtx(10), *calc_mtx);
+ sp60.set(30.0f, 0.0f, 0.0f);
+ MtxPosition(&sp60, &i_this->field_0x614);
+
+ MTXCopy(model->getAnmMtx(14), *calc_mtx);
+ sp60.set(30.0f, -0.0f, 0.0f);
+ MtxPosition(&sp60, &sp6c);
+ i_this->field_0x614 += (sp6c - i_this->field_0x614) * 0.5f;
+
+ if (i_this->field_0x620 != 0) {
+ if (i_this->field_0x620 == 1) {
+ cLib_addCalc2(&obj_pos.x, i_this->field_0x614.x, 1.0f, fabsf(i_this->field_0x624.x) + 4.0f);
+ cLib_addCalc2(&obj_pos.y, i_this->field_0x614.y, 1.0f, fabsf(i_this->field_0x624.y) + 4.0f);
+ cLib_addCalc2(&obj_pos.z, i_this->field_0x614.z, 1.0f, fabsf(i_this->field_0x624.z) + 4.0f);
+ sp60.x = obj_pos.x - i_this->field_0x614.x;
+ sp60.z = obj_pos.z - i_this->field_0x614.z;
+ if ((sp60.x * sp60.x + sp60.z * sp60.z) <= 15.0f) {
+ i_this->field_0x620 = 2;
+ i_this->field_0x621 = 10;
+ leader->field_0x92c = 0;
+ dComIfGp_getVibration().StartShock(2, 31, cXyz(0.0f, 1.0f, 0.0f));
+ }
+ } else if (i_this->field_0x620 == 2) {
+ obj_pos = i_this->field_0x614;
+ } else {
+ obj_pos += i_this->field_0x624;
+ }
+
+ i_this->field_0x638 += i_this->field_0x634;
+ i_this->field_0x634 += -3.0f;
+
+ if (i_this->field_0x638 < 0.0f) {
+ i_this->field_0x638 = 0.0f;
+ }
+
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
+ cXyz sp78;
+ sp78.x = obj_pos.x;
+ sp78.y = obj_pos.y;
+ sp78.z = obj_pos.z + i_this->field_0x638;
+ setPlayerPosAndAngle(&sp78, a_this->home.angle.y);
+
+ if (i_this->field_0x620 == 2) {
+ if (i_this->field_0x604 < 0 && i_this->field_0x602 < 0) {
+ dComIfGp_event_offHindFlag(2);
+ dComIfGp_setDoStatusForce(1, 2);
+ }
+
+ player->changeDemoParam0(1);
+ cLib_addCalcAngleS2(&i_this->field_0x610, i_this->field_0x602 << 1, 1, 4000);
+ } else {
+ player->changeDemoParam0(0);
+ cLib_addCalcAngleS2(&i_this->field_0x610, 10000, 4, 4000);
+ }
+
+ if (i_this->field_0x620 != 0) {
+ player->changeDemoParam1(i_this->field_0x610);
+ }
+ }
+
+ if (i_this->field_0x621 != 0) {
+ i_this->field_0x621--;
+ }
+
+ sp6c = a_this->current.pos;
+
+ if (i_this->field_0xaec == 0) {
+ i_this->field_0x98c.OffCoSetBit();
+ } else {
+ i_this->field_0x98c.OnCoSetBit();
+ }
+
+ i_this->field_0x98c.SetC(sp6c);
+ i_this->field_0x98c.SetR(l_HIO.field_0x8 * 50.0f);
+ i_this->field_0x98c.SetH(l_HIO.field_0x8 * 130.0f);
+ dComIfG_Ccsp()->Set(&i_this->field_0x98c);
+
+ if (i_this->field_0x5b6 == 0) {
+ demo_camera(leader);
+ } else if (i_this->field_0x5b6 >= 4) {
+ demo_camera(i_this);
+ }
+
+ return 1;
}
-/* 80A5C3E4-80A5C3EC 013544 0008+00 1/0 0/0 0/0 .text daNpc_Ks_IsDelete__FP12npc_ks_class
- */
-static bool daNpc_Ks_IsDelete(npc_ks_class* param_0) {
- return true;
+/* 80A5C3E4-80A5C3EC 013544 0008+00 1/0 0/0 0/0 .text daNpc_Ks_IsDelete__FP12npc_ks_class */
+static int daNpc_Ks_IsDelete(npc_ks_class* i_this) {
+ return 1;
}
-/* 80A5C3EC-80A5C450 01354C 0064+00 1/0 0/0 0/0 .text daNpc_Ks_Delete__FP12npc_ks_class
- */
-static void daNpc_Ks_Delete(npc_ks_class* param_0) {
+/* 80A5C3EC-80A5C450 01354C 0064+00 1/0 0/0 0/0 .text daNpc_Ks_Delete__FP12npc_ks_class */
+static int daNpc_Ks_Delete(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAcM_GetID(a_this);
+ dComIfG_resDelete(&i_this->mPhase, i_this->mResName);
+
+ if (i_this->field_0xc1c != 0) {
+ data_80A5FEA8 = 0;
+ }
+
+ if (a_this->heap != NULL) {
+ i_this->mpModelMorf->stopZelAnime();
+ }
+
+ return 1;
}
/* 80A5C450-80A5C768 0135B0 0318+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
-static void useHeapInit(fopAc_ac_c* param_0) {
- // NONMATCHING
-}
+static int useHeapInit(fopAc_ac_c* a_this) {
+ npc_ks_class* i_this = (npc_ks_class*)a_this;
-/* 80A5C768-80A5C7B0 0138C8 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */
-// J3DFrameCtrl::~J3DFrameCtrl() {
-extern "C" void __dt__12J3DFrameCtrlFv() {
- // NONMATCHING
-}
+ i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 59), NULL, NULL,
+ (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, 51), 0, 1.0f, 0, -1,
+ &i_this->mSound, 0x80000, 0x11020084);
+ if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) {
+ return 0;
+ }
-/* ############################################################################################## */
-/* 80A5E404-80A5E408 000508 0004+00 0/1 0/0 0/0 .rodata @11370 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11370 = 4620.0f;
-COMPILER_STRIP_GATE(0x80A5E404, &lit_11370);
-#pragma pop
+ J3DModel* model = i_this->mpModelMorf->getModel();
+ model->setUserArea((u32)i_this);
+ for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) {
+ model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack);
+ }
-/* 80A5C7B0-80A5D2BC 013910 0B0C+00 2/1 0/0 0/0 .text start_check__FP12npc_ks_class */
-static void start_check(npc_ks_class* param_0) {
- // NONMATCHING
-}
+ i_this->mBtp1 = new mDoExt_btpAnm();
+ if (i_this->mBtp1 == NULL) {
+ return 0;
+ }
+ if (i_this->mBtp1->init(i_this->mpModelMorf->getModel()->getModelData(),
+ (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 64), 1, 0, 1.0f, 0, -1) == 0) {
+ return 0;
+ }
-/* 80A5D2BC-80A5D354 01441C 0098+00 1/1 0/0 0/0 .text s_check_sub__FPvPv */
-static void s_check_sub(void* param_0, void* param_1) {
- // NONMATCHING
-}
+ i_this->mBtp2 = new mDoExt_btpAnm();
+ if (i_this->mBtp2 == NULL) {
+ return 0;
+ }
+ if (i_this->mBtp2->init(i_this->mpModelMorf->getModel()->getModelData(),
+ (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 65), 1, 2, 1.0f, 0, -1) == 0) {
+ return 0;
+ }
-/* ############################################################################################## */
-/* 80A5E408-80A5E40C 00050C 0004+00 0/0 0/0 0/0 .rodata @11371 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11371 = 6854.0f;
-COMPILER_STRIP_GATE(0x80A5E408, &lit_11371);
-#pragma pop
-
-/* 80A5E40C-80A5E410 000510 0004+00 0/0 0/0 0/0 .rodata @11372 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11372 = 3458.0f;
-COMPILER_STRIP_GATE(0x80A5E40C, &lit_11372);
-#pragma pop
-
-/* 80A5E410-80A5E414 000514 0004+00 0/0 0/0 0/0 .rodata @11373 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11373 = 440.0f;
-COMPILER_STRIP_GATE(0x80A5E410, &lit_11373);
-#pragma pop
-
-/* 80A5E414-80A5E418 000518 0004+00 0/0 0/0 0/0 .rodata @11374 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11374 = 6836.0f;
-COMPILER_STRIP_GATE(0x80A5E414, &lit_11374);
-#pragma pop
-
-/* 80A5E418-80A5E41C 00051C 0004+00 0/0 0/0 0/0 .rodata @11375 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11375 = 3585.0f;
-COMPILER_STRIP_GATE(0x80A5E418, &lit_11375);
-#pragma pop
-
-/* 80A5E41C-80A5E420 000520 0004+00 0/0 0/0 0/0 .rodata @11376 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11376 = 7025.0f;
-COMPILER_STRIP_GATE(0x80A5E41C, &lit_11376);
-#pragma pop
-
-/* 80A5E420-80A5E424 000524 0004+00 0/0 0/0 0/0 .rodata @11377 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11377 = 3355.0f;
-COMPILER_STRIP_GATE(0x80A5E420, &lit_11377);
-#pragma pop
-
-/* 80A5E424-80A5E428 000528 0004+00 0/0 0/0 0/0 .rodata @11378 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11378 = 4500.0f;
-COMPILER_STRIP_GATE(0x80A5E424, &lit_11378);
-#pragma pop
-
-/* 80A5E428-80A5E42C 00052C 0004+00 0/1 0/0 0/0 .rodata @11581 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11581 = -5370.0f;
-COMPILER_STRIP_GATE(0x80A5E428, &lit_11581);
-#pragma pop
-
-/* 80A5E42C-80A5E430 000530 0004+00 0/1 0/0 0/0 .rodata @11582 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11582 = 3950.0f;
-COMPILER_STRIP_GATE(0x80A5E42C, &lit_11582);
-#pragma pop
-
-/* 80A5E430-80A5E434 000534 0004+00 0/1 0/0 0/0 .rodata @11583 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11583 = -2330.0f;
-COMPILER_STRIP_GATE(0x80A5E430, &lit_11583);
-#pragma pop
-
-/* 80A5E434-80A5E438 000538 0004+00 0/1 0/0 0/0 .rodata @11584 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_11584 = 65536.0f;
-COMPILER_STRIP_GATE(0x80A5E434, &lit_11584);
-#pragma pop
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 61);
+ JUT_ASSERT(10232, modelData != 0);
+ i_this->field_0xc00 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
+ if (i_this->field_0xc00 == NULL) {
+ return 0;
+ }
-/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80A5E44A = "Npc_ks";
-SECTION_DEAD static char const* const stringBase_80A5E451 = "D_MN05";
-#pragma pop
+ if (i_this->mRoomMonkeyID == 0 || i_this->mRoomMonkeyID == 10 || i_this->mRoomMonkeyID == 20 || i_this->mRoomMonkeyID == 21 || i_this->mRoomMonkeyID == 22) {
+ modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 60);
+ JUT_ASSERT(10249, modelData != 0);
+ i_this->field_0xbfc = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
+ if (i_this->field_0xbfc == NULL) {
+ return 0;
+ }
+ }
-/* 80A5D354-80A5D87C 0144B4 0528+00 1/0 0/0 0/0 .text daNpc_Ks_Create__FP10fopAc_ac_c */
-static void daNpc_Ks_Create(fopAc_ac_c* param_0) {
- // NONMATCHING
+ return 1;
}
-/* 80A5D87C-80A5D8C4 0149DC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
-// cM3dGCyl::~cM3dGCyl() {
-extern "C" void __dt__8cM3dGCylFv() {
+/* 80A5C7B0-80A5D2BC 013910 0B0C+00 2/1 0/0 0/0 .text start_check__FP12npc_ks_class */
+static BOOL start_check(npc_ks_class* i_this) {
// NONMATCHING
-}
+ /* 80A5FCB0-80A5FCBC 001858 000C+00 0/0 0/0 0/0 .data dx$11146 */
+ static f32 dx[3] = {
+ 7268.0f, 5166.0f, 9233.0f,
+ };
-/* 80A5D8C4-80A5D90C 014A24 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
-// cM3dGAab::~cM3dGAab() {
-extern "C" void __dt__8cM3dGAabFv() {
- // NONMATCHING
-}
+ /* 80A5FCBC-80A5FCC8 001864 000C+00 0/0 0/0 0/0 .data dy$11147 */
+ static f32 dy[3] = {
+ 3600.0f, 3300.0f, 3300.0f,
+ };
-/* 80A5D90C-80A5D968 014A6C 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */
-// dCcD_GStts::~dCcD_GStts() {
-extern "C" void __dt__10dCcD_GSttsFv() {
- // NONMATCHING
-}
+ /* 80A5FCC8-80A5FCD4 001870 000C+00 0/0 0/0 0/0 .data dz$11148 */
+ static f32 dz[3] = {
+ -3389.0f, -5327.0f, -5323.0f,
+ };
-/* 80A5D968-80A5D9D8 014AC8 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
-// dBgS_ObjAcch::~dBgS_ObjAcch() {
-extern "C" void __dt__12dBgS_ObjAcchFv() {
- // NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ BOOL rv = TRUE;
+ f32 fVar1;
+ f32 fVar2;
+
+ if (i_this->mRoomMonkeyID <= 3 && fopAcM_GetRoomNo(a_this) == 4) {
+ if (dComIfGs_isStageMiddleBoss()) {
+ return FALSE;
+ }
+
+ fVar1 = -player->current.pos.x;
+ fVar2 = 4620.0f - player->current.pos.z;
+ if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) > 1000.0f) {
+ return FALSE;
+ }
+
+ if (cDmr_SkipInfo != 0) {
+ cDmr_SkipInfo--;
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->field_0x630 = i_this->mRoomMonkeyID * 6 + 6;
+ i_this->mActionID = 10;
+ i_this->field_0x94e = 30;
+ return TRUE;
+ }
+ }
+
+ int iVar1 = fopAcM_GetParam(a_this) >> 24;
+ int iVar2 = 0;
+
+ switch (i_this->mRoomMonkeyID) {
+ case 0:
+ if (fopAcM_GetRoomNo(a_this) == 22) {
+ if (iVar1 != 0xFF) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ i_this->mActionID = 6;
+ break;
+ }
+ }
+ } else if (fopAcM_GetRoomNo(a_this) == 12) {
+ i_this->mActionID = 8;
+ break;
+ }
+
+ if (dComIfGs_isStageMiddleBoss()) {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->field_0x630 = 3;
+ i_this->mActionID = 11;
+ return TRUE;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->mActionID = 10;
+ i_this->field_0x94e = 30;
+ return TRUE;
+ }
+
+ rv = FALSE;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ }
+ }
+ }
+
+ i_this->mActionID = 100;
+ break;
+
+ case 1:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ i_this->mActionID = 8;
+ } else {
+ if (dComIfGs_isStageMiddleBoss()) {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->field_0x630 = 3;
+ i_this->mActionID = 11;
+ return TRUE;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->mActionID = 10;
+ i_this->field_0x94e = 30;
+ return TRUE;
+ }
+
+ rv = FALSE;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ i_this->mActionID = 4;
+ } else {
+ i_this->mActionID = 100;
+ }
+ } else {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 100;
+ }
+ }
+ }
+ }
+ break;
+
+ case 2:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ i_this->mActionID = 8;
+ } else {
+ if (dComIfGs_isStageMiddleBoss()) {
+ rv = FALSE;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 7) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ iVar1 = FALSE;
+ } else {
+ i_this->mActionID = 5;
+ }
+ } else {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ i_this->mActionID = 8;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 3 || fopAcM_GetRoomNo(a_this) == 5 || fopAcM_GetRoomNo(a_this) == 7) {
+ if (dComIfGs_isSwitch(79, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ break;
+ }
+ }
+
+ i_this->mActionID = 100;
+ }
+ }
+ }
+ }
+ break;
+
+ case 3:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ i_this->mActionID = 8;
+ } else {
+ if (dComIfGs_isStageMiddleBoss()) {
+ rv = FALSE;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 5) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 5;
+ }
+ } else {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ i_this->mActionID = 8;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 3 || fopAcM_GetRoomNo(a_this) == 5 || fopAcM_GetRoomNo(a_this) == 7) {
+ if (dComIfGs_isSwitch(80, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ break;
+ }
+ }
+
+ i_this->mActionID = 100;
+ }
+ }
+ }
+ }
+ break;
+
+ case 4:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 8;
+ }
+ } else {
+ if (dComIfGs_isSwitch(83, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 4) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ i_this->mActionID = 117;
+ i_this->mMode = 0;
+ a_this->current.pos.set(6854.0f, 3458.0f, 440.0f);
+ a_this->current.angle.y = 0;
+ a_this->old = a_this->current;
+ } else {
+ i_this->mActionID = 6;
+ }
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 9) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ return FALSE;
+ }
+
+ i_this->mActionID = 100;
+
+ for (int i = 0; i < 3; i++) {
+ fVar1 = dx[i] - player->current.pos.x;
+ fVar2 = dz[i] - player->current.pos.z;
+ if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 700.0f) {
+ a_this->current.pos.set(dx[i], dy[i], dz[i]);
+ a_this->old = a_this->current;
+ OS_REPORT("////////KS R09 SET %d\n", i);
+ return TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ case 5:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 8;
+ }
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 10) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 5;
+ }
+ }
+ }
+ break;
+
+ case 6:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 8;
+ }
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 19) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 6;
+ }
+ }
+ }
+ break;
+
+ case 7:
+ if (fopAcM_GetRoomNo(a_this) == 12) {
+ if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 8;
+ }
+ } else {
+ if (fopAcM_GetRoomNo(a_this) == 11) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 5;
+ }
+ }
+ }
+ break;
+
+ case 10:
+ i_this->mActionID = 100;
+ break;
+
+ case 20:
+ fopAcM_OnStatus(a_this, 0x20000);
+ i_this->mActionID = 300;
+ i_this->field_0xc17 = 1;
+ iVar2 = 1;
+ break;
+
+ case 21:
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x20A])) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 301;
+ }
+ break;
+
+ case 22:
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) {
+ rv = FALSE;
+ } else {
+ i_this->mActionID = 302;
+ }
+ break;
+
+ default:
+ i_this->mActionID = 100;
+ i_this->mRoomMonkeyID &= 15;
+ i_this->field_0x5b6 = i_this->mRoomMonkeyID;
+ break;
+ }
+
+ if (i_this->mActionID == 100) {
+ fopAcM_setStageLayer(a_this);
+ if (fopAcM_GetRoomNo(a_this) == 1) {
+ fVar1 = 6836.0f - player->current.pos.x;
+ fVar2 = 2585.0f - player->current.pos.z;
+ if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 500.0f) {
+ a_this->home.pos.set(7025.0f, 3355.0f, 4500.0f);
+ a_this->home.angle.y = -0x7343;
+ a_this->current = a_this->home;
+ a_this->old = a_this->current;
+ }
+
+ i_this->mTimers[1] = cM_rndF(20.0f) + 80.0f;
+ } else {
+ i_this->mTimers[1] = cM_rndF(20.0f) + 40.0f;
+ }
+ }
+
+ if (iVar2 != 0) {
+ if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) {
+ rv = FALSE;
+ }
+ }
+
+ return rv;
}
-/* 80A5D9D8-80A5DA48 014B38 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */
-// dBgS_AcchCir::~dBgS_AcchCir() {
-extern "C" void __dt__12dBgS_AcchCirFv() {
- // NONMATCHING
+/* 80A5D2BC-80A5D354 01441C 0098+00 1/1 0/0 0/0 .text s_check_sub__FPvPv */
+static void* s_check_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
+ if (fopAcM_GetID(i_actor) != fopAcM_GetID(i_data) && ((npc_ks_class*)i_actor)->field_0x5b6 == ((npc_ks_class*)i_data)->field_0x5b6) {
+ return i_actor;
+ }
+ }
+
+ return NULL;
}
-/* 80A5DA48-80A5DA90 014BA8 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */
-// cCcD_GStts::~cCcD_GStts() {
-extern "C" void __dt__10cCcD_GSttsFv() {
+/* 80A5D354-80A5D87C 0144B4 0528+00 1/0 0/0 0/0 .text daNpc_Ks_Create__FP10fopAc_ac_c */
+static int daNpc_Ks_Create(fopAc_ac_c* a_this) {
// NONMATCHING
+ static dCcD_SrcCyl cc_cyl_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x3}, 0x79}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {0.0f, 0.0f, 0.0f}, // mCenter
+ 30.0f, // mRadius
+ 20.0f // mHeight
+ } // mCyl
+ };
+
+ npc_ks_class* i_this = (npc_ks_class*)a_this;
+ fopAcM_SetupActor(a_this, npc_ks_class);
+
+ dComIfGp_getStage()->getStagInfo();
+ if (!dKy_darkworld_check()) {
+ i_this->mResName = "Npc_kst";
+ } else {
+ i_this->mResName = "Npc_ks";
+ }
+
+ int phase = dComIfG_resLoad(&i_this->mPhase, i_this->mResName);
+ if (phase == cPhs_COMPLEATE_e) {
+ OS_REPORT("NPC_KS PARAM %x\n", fopAcM_GetParam(a_this));
+ i_this->mRoomMonkeyID = fopAcM_GetParam(a_this);
+
+ u8 uVar1 = fopAcM_GetParam(a_this) >> 8 & 0xFF;
+
+ if (i_this->mRoomMonkeyID == 0xFF) {
+ i_this->mRoomMonkeyID = 0;
+ }
+
+ if (i_this->mRoomMonkeyID == 20 && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE1]) && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE2])) {
+ return cPhs_ERROR_e;
+ }
+
+ if (uVar1 == 0xFF) {
+ uVar1 = 0;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 4 && i_this->mRoomMonkeyID == 4) {
+ a_this->current.pos.set(-5370.0f, 3950.0f, -2330.0f);
+ }
+
+ if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0 && dComIfGs_isStageBossEnemy() != 0) {
+ return cPhs_ERROR_e;
+ }
+
+ i_this->field_0x5b6 = i_this->mRoomMonkeyID & 15;
+ if (fpcM_Search(s_check_sub, i_this) != NULL) {
+ return cPhs_ERROR_e;
+ }
+
+ OS_REPORT("////////SET ID %d\n", i_this->field_0x5b6);
+
+ if (i_this->field_0x5b6 == 0) {
+ leader = i_this;
+ OS_REPORT("////////0 \n");
+ } else {
+ OS_REPORT("////////1 \n")
+ }
+
+ i_this->field_0xaf0 = a_this->current.angle.x;
+ a_this->shape_angle.x = 0;
+ a_this->current.angle.x = 0;
+ i_this->bitTRB = a_this->current.angle.z & 63;
+ a_this->shape_angle.z = 0;
+ a_this->current.angle.z = 0;
+ OS_REPORT("NPC_KS bitTRB %x\n", i_this->bitTRB);
+ obj_pos.set(0.0f, 0.0f, 0.0f);
+
+ OS_REPORT("NPC_KS//////////////NPC_KS SET 1 !!\n");
+ if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x38A0)) {
+ OS_REPORT("//////////////NPC_KS SET NON !!\n");
+ return cPhs_ERROR_e;
+ }
+
+ OS_REPORT("//////////////NPC_KS SET 2 !!\n");
+ if (data_80A5FEA8 == 0) {
+ i_this->field_0xc1c = 1;
+ data_80A5FEA8 = 1;
+ mDoHIO_CREATE_CHILD ("コザル", &l_HIO); // Kozaru
+ l_HIO.field_0x4 = -1;
+ }
+
+ fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx());
+ fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f);
+ fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f);
+ i_this->mObjAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, 1,
+ &i_this->mAcchCir, fopAcM_GetSpeed_p(a_this), NULL, NULL);
+ i_this->mAcchCir.SetWall(50.0f, 50.0f);
+ i_this->field_0x5e6 = cM_rndF(65536.0f);
+ saru_p[i_this->field_0x5b6] = i_this;
+
+ if (uVar1 != 0 && i_this->mRoomMonkeyID < 8) {
+ a_this->current.angle.y = a_this->home.angle.y + 0x4000;
+ a_this->shape_angle.y = a_this->current.angle.y;
+ a_this->current.angle.x = -0x8000;
+ a_this->shape_angle.x = -0x8000;
+ i_this->field_0x630 = fopAcM_GetParam(a_this) >> 16 & 0xFF;
+
+ i_this->field_0x934 = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID);
+ if (i_this->field_0x934 != NULL && i_this->field_0x934->field_0x91c == 1) {
+ i_this->mActionID = 11;
+ } else {
+ i_this->mActionID = 10;
+ }
+
+ i_this->field_0x94e = 30;
+ } else {
+ if (!start_check(i_this)) {
+ saru_p[i_this->field_0x5b6] = NULL;
+ return cPhs_ERROR_e;
+ }
+ }
+
+ i_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 2, 1);
+ i_this->mStts.Init(100, 0, a_this);
+ i_this->field_0x98c.Set(cc_cyl_src);
+ i_this->field_0x98c.SetStts(&i_this->mStts);
+ i_this->field_0x98c.OnTgNoHitMark();
+
+ OS_REPORT("//////////////NPC_KS SET 3 !!\n");
+ c_start = 1;
+ daNpc_Ks_Execute(i_this);
+ c_start = 0;
+ OS_REPORT("//////////////NPC_KS SET 4 !!\n");
+ }
+
+ return phase;
}
AUDIO_INSTANCES;