mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Improve disasm_script.py and do some sample scripts (#606)
This commit is contained in:
parent
ccd3b17322
commit
03c60ee7c5
@ -4,6 +4,135 @@
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
|
||||
enum EffectID {
|
||||
EFFECT_ID_00 = 0x00,
|
||||
EFFECT_ID_01,
|
||||
EFFECT_ID_06 = 0x06,
|
||||
EFFECT_ID_07,
|
||||
EFFECT_ID_08,
|
||||
EFFECT_ID_09,
|
||||
EFFECT_ID_0A,
|
||||
EFFECT_ID_0B,
|
||||
EFFECT_ID_0C,
|
||||
EFFECT_ID_0D,
|
||||
EFFECT_ID_0E,
|
||||
EFFECT_ID_0F,
|
||||
EFFECT_ID_10,
|
||||
EFFECT_ID_11,
|
||||
EFFECT_ID_12,
|
||||
EFFECT_ID_13,
|
||||
EFFECT_ID_14,
|
||||
EFFECT_ID_15,
|
||||
EFFECT_ID_16,
|
||||
EFFECT_ID_17,
|
||||
EFFECT_ID_18,
|
||||
EFFECT_ID_19,
|
||||
EFFECT_ID_1A,
|
||||
EFFECT_ID_1B,
|
||||
EFFECT_ID_1C,
|
||||
EFFECT_ID_1D,
|
||||
EFFECT_ID_1E,
|
||||
EFFECT_ID_1F,
|
||||
EFFECT_ID_20,
|
||||
EFFECT_ID_21,
|
||||
EFFECT_ID_22,
|
||||
EFFECT_ID_23,
|
||||
EFFECT_ID_24,
|
||||
EFFECT_ID_25,
|
||||
EFFECT_ID_26,
|
||||
EFFECT_ID_27,
|
||||
EFFECT_ID_28,
|
||||
EFFECT_ID_29,
|
||||
EFFECT_ID_2B = 0x2B,
|
||||
EFFECT_ID_2C,
|
||||
EFFECT_ID_2D,
|
||||
EFFECT_ID_2E,
|
||||
EFFECT_ID_2F,
|
||||
EFFECT_ID_30,
|
||||
EFFECT_ID_31,
|
||||
EFFECT_ID_32,
|
||||
EFFECT_ID_33,
|
||||
EFFECT_ID_34,
|
||||
EFFECT_ID_35,
|
||||
EFFECT_ID_36,
|
||||
EFFECT_ID_37,
|
||||
EFFECT_ID_38,
|
||||
EFFECT_ID_39,
|
||||
EFFECT_ID_3A,
|
||||
EFFECT_ID_3B,
|
||||
EFFECT_ID_3C,
|
||||
EFFECT_ID_3D,
|
||||
EFFECT_ID_3E,
|
||||
EFFECT_ID_3F,
|
||||
EFFECT_ID_40,
|
||||
EFFECT_ID_41,
|
||||
EFFECT_ID_42,
|
||||
EFFECT_ID_43,
|
||||
EFFECT_ID_44,
|
||||
EFFECT_ID_45,
|
||||
EFFECT_ID_46,
|
||||
EFFECT_ID_47,
|
||||
EFFECT_ID_48,
|
||||
EFFECT_ID_49,
|
||||
EFFECT_ID_4A,
|
||||
EFFECT_ID_4B,
|
||||
EFFECT_ID_4C,
|
||||
EFFECT_ID_4D,
|
||||
EFFECT_ID_4E,
|
||||
EFFECT_ID_4F,
|
||||
EFFECT_ID_51 = 0x51,
|
||||
EFFECT_ID_52,
|
||||
EFFECT_ID_53,
|
||||
EFFECT_ID_55 = 0x55,
|
||||
EFFECT_ID_56,
|
||||
EFFECT_ID_57,
|
||||
EFFECT_ID_58,
|
||||
EFFECT_ID_59,
|
||||
EFFECT_ID_5A,
|
||||
EFFECT_ID_5B,
|
||||
EFFECT_ID_5C,
|
||||
EFFECT_ID_5D,
|
||||
EFFECT_ID_5E,
|
||||
EFFECT_ID_5F,
|
||||
EFFECT_ID_60,
|
||||
EFFECT_ID_61,
|
||||
EFFECT_ID_62,
|
||||
EFFECT_ID_63,
|
||||
EFFECT_ID_64,
|
||||
EFFECT_ID_65,
|
||||
EFFECT_ID_66,
|
||||
EFFECT_ID_67,
|
||||
EFFECT_ID_68,
|
||||
EFFECT_ID_69,
|
||||
EFFECT_ID_6B = 0x6B,
|
||||
EFFECT_ID_6C,
|
||||
EFFECT_ID_6D,
|
||||
EFFECT_ID_6E,
|
||||
EFFECT_ID_6F,
|
||||
EFFECT_ID_70,
|
||||
EFFECT_ID_71,
|
||||
EFFECT_ID_72,
|
||||
EFFECT_ID_73,
|
||||
EFFECT_ID_74,
|
||||
EFFECT_ID_75,
|
||||
EFFECT_ID_77 = 0x77,
|
||||
EFFECT_ID_78,
|
||||
EFFECT_ID_79,
|
||||
EFFECT_ID_7A,
|
||||
EFFECT_ID_7B,
|
||||
EFFECT_ID_7C,
|
||||
EFFECT_ID_7D,
|
||||
EFFECT_ID_7E,
|
||||
EFFECT_ID_7F,
|
||||
EFFECT_ID_80,
|
||||
EFFECT_ID_81,
|
||||
EFFECT_ID_82,
|
||||
EFFECT_ID_83,
|
||||
EFFECT_ID_84,
|
||||
EFFECT_ID_85,
|
||||
EFFECT_ID_86,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char unk_00[0x38];
|
||||
f32 unk_38[4];
|
||||
|
@ -1118,11 +1118,13 @@ enum HitResults {
|
||||
HIT_RESULT_TRIGGERED_EXPLODE = -1,
|
||||
HIT_RESULT_HIT = 0,
|
||||
HIT_RESULT_QUAKE_IMMUNE = 2,
|
||||
HIT_RESULT_3 = 3,
|
||||
HIT_RESULT_LANDED_ON_SPIKE = 4,
|
||||
HIT_RESULT_LUCKY = 5,
|
||||
HIT_RESULT_MISS = 6,
|
||||
HIT_RESULT_HIT_STATIC = 7,
|
||||
HIT_RESULT_IMMUNE = 8,
|
||||
HIT_RESULT_10 = 10,
|
||||
};
|
||||
|
||||
enum Iters {
|
||||
@ -1220,6 +1222,7 @@ enum Events {
|
||||
EVENT_FALL_TRIGGER = 0x0000000C,
|
||||
EVENT_FLIP_TRIGGER = 0x0000000D,
|
||||
EVENT_BURN_HIT = 0x0000000E,
|
||||
EVENT_15 = 0x0000000F,
|
||||
EVENT_SPIN_SMASH_LAUNCH_HIT = 0x00000011,
|
||||
EVENT_SHELL_CRACK_HIT = 0x00000012,
|
||||
EVENT_STAR_BEAM = 0x00000013,
|
||||
@ -1247,6 +1250,7 @@ enum Events {
|
||||
EVENT_SPIKE_CONTACT = 0x0000002A,
|
||||
EVENT_BURN_CONTACT = 0x0000002C,
|
||||
EVENT_SHOCK_HIT = 0x0000002F,
|
||||
EVENT_30 = 0x00000030,
|
||||
EVENT_RECOVER_STATUS = 0x00000031,
|
||||
EVENT_32 = 0x00000032,
|
||||
EVENT_34 = 0x00000034,
|
||||
@ -1505,6 +1509,7 @@ enum PlayerBuffs {
|
||||
};
|
||||
|
||||
enum StatusFlags {
|
||||
STATUS_FLAG_1 = 0x00000001,
|
||||
STATUS_FLAG_SLEEP = 0x00001000,
|
||||
STATUS_FLAG_STATIC = 0x00002000,
|
||||
STATUS_FLAG_FROZEN = 0x00004000,
|
||||
@ -2205,6 +2210,11 @@ enum BattleStatusFlags2 {
|
||||
BS_FLAGS2_8 = 0x00000008,
|
||||
BS_FLAGS2_10 = 0x00000010,
|
||||
BS_FLAGS2_40 = 0x00000040,
|
||||
BS_FLAGS2_80 = 0x00000080,
|
||||
BS_FLAGS2_100 = 0x00000100,
|
||||
BS_FLAGS2_200 = 0x00000200,
|
||||
BS_FLAGS2_400 = 0x00000400,
|
||||
BS_FLAGS2_800 = 0x00000800,
|
||||
BS_FLAGS2_NO_TARGET_AVAILABLE = 0x00001000,
|
||||
BS_FLAGS2_1000000 = 0x01000000,
|
||||
BS_FLAGS2_2000000 = 0x02000000,
|
||||
@ -2486,6 +2496,83 @@ enum CameraFlags {
|
||||
CAMERA_FLAGS_80000000 = 0x80000000,
|
||||
};
|
||||
|
||||
enum BtlCameraPreset {
|
||||
BTL_CAM_PRESET_A = 0,
|
||||
BTL_CAM_PRESET_B,
|
||||
BTL_CAM_PRESET_C,
|
||||
BTL_CAM_PRESET_D,
|
||||
BTL_CAM_PRESET_E,
|
||||
BTL_CAM_PRESET_F,
|
||||
BTL_CAM_PRESET_G,
|
||||
BTL_CAM_PRESET_H,
|
||||
BTL_CAM_PRESET_I,
|
||||
BTL_CAM_PRESET_9,
|
||||
BTL_CAM_PRESET_10,
|
||||
BTL_CAM_PRESET_11,
|
||||
BTL_CAM_PRESET_12,
|
||||
BTL_CAM_PRESET_13,
|
||||
BTL_CAM_PRESET_14,
|
||||
BTL_CAM_PRESET_15,
|
||||
BTL_CAM_PRESET_16,
|
||||
BTL_CAM_PRESET_17,
|
||||
BTL_CAM_PRESET_18,
|
||||
BTL_CAM_PRESET_19,
|
||||
BTL_CAM_PRESET_20,
|
||||
BTL_CAM_PRESET_21,
|
||||
BTL_CAM_PRESET_22,
|
||||
BTL_CAM_PRESET_23,
|
||||
BTL_CAM_PRESET_24,
|
||||
BTL_CAM_PRESET_25,
|
||||
BTL_CAM_PRESET_26,
|
||||
BTL_CAM_PRESET_27,
|
||||
BTL_CAM_PRESET_28,
|
||||
BTL_CAM_PRESET_29,
|
||||
BTL_CAM_PRESET_30,
|
||||
BTL_CAM_PRESET_31,
|
||||
BTL_CAM_PRESET_32,
|
||||
BTL_CAM_PRESET_33,
|
||||
BTL_CAM_PRESET_34,
|
||||
BTL_CAM_PRESET_35,
|
||||
BTL_CAM_PRESET_36,
|
||||
BTL_CAM_PRESET_37,
|
||||
BTL_CAM_PRESET_38,
|
||||
BTL_CAM_PRESET_39,
|
||||
BTL_CAM_PRESET_40,
|
||||
BTL_CAM_PRESET_41,
|
||||
BTL_CAM_PRESET_42,
|
||||
BTL_CAM_PRESET_43,
|
||||
BTL_CAM_PRESET_44,
|
||||
BTL_CAM_PRESET_45,
|
||||
BTL_CAM_PRESET_46,
|
||||
BTL_CAM_PRESET_47,
|
||||
BTL_CAM_PRESET_48,
|
||||
BTL_CAM_PRESET_49,
|
||||
BTL_CAM_PRESET_50,
|
||||
BTL_CAM_PRESET_51,
|
||||
BTL_CAM_PRESET_52,
|
||||
BTL_CAM_PRESET_53,
|
||||
BTL_CAM_PRESET_54,
|
||||
BTL_CAM_PRESET_55,
|
||||
BTL_CAM_PRESET_56,
|
||||
BTL_CAM_PRESET_57,
|
||||
BTL_CAM_PRESET_58,
|
||||
BTL_CAM_PRESET_59,
|
||||
BTL_CAM_PRESET_60,
|
||||
BTL_CAM_PRESET_61,
|
||||
BTL_CAM_PRESET_62,
|
||||
BTL_CAM_PRESET_63,
|
||||
BTL_CAM_PRESET_64,
|
||||
BTL_CAM_PRESET_65,
|
||||
BTL_CAM_PRESET_66,
|
||||
BTL_CAM_PRESET_67,
|
||||
BTL_CAM_PRESET_68,
|
||||
BTL_CAM_PRESET_69,
|
||||
BTL_CAM_PRESET_70,
|
||||
BTL_CAM_PRESET_71,
|
||||
BTL_CAM_PRESET_72,
|
||||
BTL_CAM_PRESET_73,
|
||||
};
|
||||
|
||||
enum StaticMoveFlags {
|
||||
STATIC_MOVE_FLAGS_1 = 0x00000001,
|
||||
STATIC_MOVE_FLAGS_2 = 0x00000002,
|
||||
|
148
src/1776B0.c
148
src/1776B0.c
@ -614,13 +614,13 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A7 = 0;
|
||||
|
||||
switch (id) {
|
||||
case 0x0:
|
||||
case BTL_CAM_PRESET_A:
|
||||
preset = &CamPreset_A;
|
||||
break;
|
||||
case 0x1:
|
||||
case BTL_CAM_PRESET_B:
|
||||
preset = &CamPreset_B;
|
||||
break;
|
||||
case 0x2:
|
||||
case BTL_CAM_PRESET_C:
|
||||
if (D_80280CE4 != id) {
|
||||
D_8029F280 = 500;
|
||||
D_8029F29E = 30;
|
||||
@ -628,7 +628,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case 0x3:
|
||||
case BTL_CAM_PRESET_D:
|
||||
if (D_80280CE4 != id) {
|
||||
D_8029F280 = 480;
|
||||
preset = &CamPreset_D;
|
||||
@ -637,7 +637,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case 0x4:
|
||||
case BTL_CAM_PRESET_E:
|
||||
if (D_80280CE4 != id) {
|
||||
D_8029F280 = 500;
|
||||
preset = &CamPreset_E;
|
||||
@ -646,33 +646,33 @@ void btl_cam_use_preset(s32 id) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case 0x5:
|
||||
case BTL_CAM_PRESET_F:
|
||||
D_8029F280 = 300;
|
||||
D_8029F29E = 20;
|
||||
preset = &CamPreset_F;
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x6:
|
||||
case BTL_CAM_PRESET_G:
|
||||
D_8029F280 = 300;
|
||||
D_8029F29E = 20;
|
||||
preset = &CamPreset_G;
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x7:
|
||||
case BTL_CAM_PRESET_H:
|
||||
D_8029F280 = 300;
|
||||
D_8029F29E = 20;
|
||||
preset = &CamPreset_H;
|
||||
break;
|
||||
case 0x8:
|
||||
case BTL_CAM_PRESET_I:
|
||||
D_8029F280 = 300;
|
||||
D_8029F29E = 20;
|
||||
preset = &CamPreset_I;
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x9:
|
||||
case BTL_CAM_PRESET_9:
|
||||
if (D_8029F2B4 != &CamPreset_C) {
|
||||
D_8029F280 = 500;
|
||||
D_8029F29E = 120;
|
||||
@ -680,7 +680,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case 0xA:
|
||||
case BTL_CAM_PRESET_10:
|
||||
D_8029F280 = 200;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -690,7 +690,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0xB:
|
||||
case BTL_CAM_PRESET_11:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
preset = &CamPreset_F;
|
||||
@ -700,7 +700,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0xC:
|
||||
case BTL_CAM_PRESET_12:
|
||||
D_8029F280 = 400;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -710,7 +710,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0xD:
|
||||
case BTL_CAM_PRESET_13:
|
||||
D_8029F280 = 200;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -720,7 +720,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0xE:
|
||||
case BTL_CAM_PRESET_14:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
preset = &CamPreset_I;
|
||||
@ -730,7 +730,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0xF:
|
||||
case BTL_CAM_PRESET_15:
|
||||
D_8029F280 = 400;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -740,7 +740,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x10:
|
||||
case BTL_CAM_PRESET_16:
|
||||
D_8029F280 = 267;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -748,7 +748,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F286 = 23;
|
||||
preset = &CamPreset_H;
|
||||
break;
|
||||
case 0x11:
|
||||
case BTL_CAM_PRESET_17:
|
||||
D_8029F280 = 300;
|
||||
D_8029F282 = 0;
|
||||
D_8029F284 = 8;
|
||||
@ -756,7 +756,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F286 = 8;
|
||||
preset = &CamPreset_H;
|
||||
break;
|
||||
case 0x12:
|
||||
case BTL_CAM_PRESET_18:
|
||||
D_8029F280 = 400;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -764,21 +764,21 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F29E = 20;
|
||||
D_8029F286 = 0;
|
||||
break;
|
||||
case 0x13:
|
||||
case BTL_CAM_PRESET_19:
|
||||
D_8029F29E = 20;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x14:
|
||||
case BTL_CAM_PRESET_20:
|
||||
preset = &CamPreset_K;
|
||||
D_8029F29E = 20;
|
||||
D_8029F286 = 0;
|
||||
break;
|
||||
case 0x15:
|
||||
case BTL_CAM_PRESET_21:
|
||||
preset = &CamPreset_L;
|
||||
D_8029F29E = 20;
|
||||
D_8029F286 = 0;
|
||||
break;
|
||||
case 0x19:
|
||||
case BTL_CAM_PRESET_25:
|
||||
D_8029F280 = 266;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -788,7 +788,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x18:
|
||||
case BTL_CAM_PRESET_24:
|
||||
D_8029F280 = 250;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -801,7 +801,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_80280CE0 = 1;
|
||||
preset = &CamPreset_I;
|
||||
break;
|
||||
case 0x17:
|
||||
case BTL_CAM_PRESET_23:
|
||||
D_8029F280 = 255;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -813,7 +813,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x16:
|
||||
case BTL_CAM_PRESET_22:
|
||||
D_8029F280 = 230;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -822,7 +822,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x1A:
|
||||
case BTL_CAM_PRESET_26:
|
||||
D_8029F280 = 310;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -834,7 +834,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x1B:
|
||||
case BTL_CAM_PRESET_27:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 5;
|
||||
@ -846,7 +846,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x1C:
|
||||
case BTL_CAM_PRESET_28:
|
||||
D_8029F280 = 340;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 5;
|
||||
@ -858,8 +858,8 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x1E:
|
||||
case 0x1F:
|
||||
case BTL_CAM_PRESET_30:
|
||||
case BTL_CAM_PRESET_31:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 0xF;
|
||||
@ -871,7 +871,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 0;
|
||||
preset = &CamPreset_I;
|
||||
break;
|
||||
case 0x20:
|
||||
case BTL_CAM_PRESET_32:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -884,7 +884,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = -65.0f;
|
||||
D_8029F274 = 30.0f;
|
||||
break;
|
||||
case 0x21:
|
||||
case BTL_CAM_PRESET_33:
|
||||
D_8029F280 = 220;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -896,7 +896,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x22:
|
||||
case BTL_CAM_PRESET_34:
|
||||
D_8029F280 = 280;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -908,7 +908,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x23:
|
||||
case BTL_CAM_PRESET_35:
|
||||
D_8029F280 = 380;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 60;
|
||||
@ -921,7 +921,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x25:
|
||||
case BTL_CAM_PRESET_37:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -933,7 +933,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x24:
|
||||
case BTL_CAM_PRESET_36:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 60;
|
||||
@ -946,7 +946,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x26:
|
||||
case BTL_CAM_PRESET_38:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -958,7 +958,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x27:
|
||||
case BTL_CAM_PRESET_39:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -970,7 +970,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x28:
|
||||
case BTL_CAM_PRESET_40:
|
||||
D_8029F280 = 360;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -982,8 +982,8 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 0;
|
||||
break;
|
||||
case 0x29:
|
||||
case 0x2A:
|
||||
case BTL_CAM_PRESET_41:
|
||||
case BTL_CAM_PRESET_42:
|
||||
D_8029F280 = 200;
|
||||
D_8029F29E = 7;
|
||||
D_8029F2A0 = 7;
|
||||
@ -991,7 +991,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = D_8029F2B4;
|
||||
break;
|
||||
case 0x2B:
|
||||
case BTL_CAM_PRESET_43:
|
||||
D_8029F280 = 214;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -1003,7 +1003,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x2C:
|
||||
case BTL_CAM_PRESET_44:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 8;
|
||||
@ -1015,7 +1015,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 45:
|
||||
case BTL_CAM_PRESET_45:
|
||||
D_8029F280 = 430;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 0xA;
|
||||
@ -1029,7 +1029,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = 60.0f;
|
||||
D_8029F274 = 40.0f;
|
||||
break;
|
||||
case 0x2E:
|
||||
case BTL_CAM_PRESET_46:
|
||||
D_8029F280 = 460;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 0xA;
|
||||
@ -1042,7 +1042,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = 60.0f;
|
||||
D_8029F274 = 40.0f;
|
||||
break;
|
||||
case 0x46:
|
||||
case BTL_CAM_PRESET_70:
|
||||
D_8029F280 = 390;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -1052,7 +1052,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x47:
|
||||
case BTL_CAM_PRESET_71:
|
||||
D_8029F280 = 500;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -1062,8 +1062,8 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x45:
|
||||
case 0x48:
|
||||
case BTL_CAM_PRESET_69:
|
||||
case BTL_CAM_PRESET_72:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F282 = 0;
|
||||
@ -1073,7 +1073,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
preset = &CamPreset_J;
|
||||
break;
|
||||
case 0x49:
|
||||
case BTL_CAM_PRESET_73:
|
||||
D_8029F280 = 166;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 1;
|
||||
@ -1086,7 +1086,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = -75.0f;
|
||||
D_8029F274 = 150.0f;
|
||||
break;
|
||||
case 0x2F:
|
||||
case BTL_CAM_PRESET_47:
|
||||
D_8029F280 = 310;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1098,7 +1098,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
D_8029F2A6 = 0;
|
||||
break;
|
||||
case 0x30:
|
||||
case BTL_CAM_PRESET_48:
|
||||
D_8029F280 = 250;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 120;
|
||||
@ -1111,7 +1111,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 256;
|
||||
break;
|
||||
case 0x31:
|
||||
case BTL_CAM_PRESET_49:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 120;
|
||||
@ -1124,7 +1124,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 256;
|
||||
break;
|
||||
case 0x32:
|
||||
case BTL_CAM_PRESET_50:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 5;
|
||||
@ -1136,14 +1136,14 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
D_8029F2A6 = 0;
|
||||
break;
|
||||
case 0x1D:
|
||||
case 0x33:
|
||||
case BTL_CAM_PRESET_29:
|
||||
case BTL_CAM_PRESET_51:
|
||||
D_8029F29E = 50;
|
||||
D_8029F280 = 500;
|
||||
D_8029F286 = 0;
|
||||
preset = &CamPreset_D;
|
||||
break;
|
||||
case 0x34:
|
||||
case BTL_CAM_PRESET_52:
|
||||
D_8029F280 = 280;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1155,7 +1155,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 256;
|
||||
break;
|
||||
case 0x35:
|
||||
case BTL_CAM_PRESET_53:
|
||||
D_8029F280 = 380;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 60;
|
||||
@ -1168,7 +1168,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 256;
|
||||
break;
|
||||
case 0x36:
|
||||
case BTL_CAM_PRESET_54:
|
||||
D_8029F280 = 220;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1180,7 +1180,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A6 = 0;
|
||||
D_8029F27C = 256;
|
||||
break;
|
||||
case 0x37:
|
||||
case BTL_CAM_PRESET_55:
|
||||
D_8029F280 = 210;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -1193,7 +1193,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = -95.0f;
|
||||
D_8029F274 = 22.0f;
|
||||
break;
|
||||
case 0x38:
|
||||
case BTL_CAM_PRESET_56:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1204,7 +1204,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x39:
|
||||
case BTL_CAM_PRESET_57:
|
||||
D_8029F280 = 320;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1215,7 +1215,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
preset = &CamPreset_M;
|
||||
break;
|
||||
case 0x3A:
|
||||
case BTL_CAM_PRESET_58:
|
||||
D_8029F280 = 400;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 30;
|
||||
@ -1228,7 +1228,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F270 = 25.0f;
|
||||
D_8029F274 = 60.0f;
|
||||
break;
|
||||
case 0x3B:
|
||||
case BTL_CAM_PRESET_59:
|
||||
D_8029F280 = 200;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 60;
|
||||
@ -1241,7 +1241,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
D_8029F2A6 = 0;
|
||||
break;
|
||||
case 0x3C:
|
||||
case BTL_CAM_PRESET_60:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 8;
|
||||
@ -1252,8 +1252,8 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A3 = 0;
|
||||
preset = &CamPreset_I;
|
||||
break;
|
||||
case 0x3D:
|
||||
case 0x3E:
|
||||
case BTL_CAM_PRESET_61:
|
||||
case BTL_CAM_PRESET_62:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 15;
|
||||
@ -1265,7 +1265,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F27C = 256;
|
||||
preset = &CamPreset_I;
|
||||
break;
|
||||
case 0x3F:
|
||||
case BTL_CAM_PRESET_63:
|
||||
D_8029F280 = 400;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -1275,7 +1275,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x40:
|
||||
case BTL_CAM_PRESET_64:
|
||||
D_8029F280 = 358;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 10;
|
||||
@ -1285,12 +1285,12 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A3 = 0;
|
||||
preset = &CamPreset_F;
|
||||
break;
|
||||
case 0x41:
|
||||
case BTL_CAM_PRESET_65:
|
||||
D_8029F29E = 50;
|
||||
D_8029F280 = 500;
|
||||
preset = &CamPreset_C;
|
||||
break;
|
||||
case 0x42:
|
||||
case BTL_CAM_PRESET_66:
|
||||
D_8029F280 = 267;
|
||||
D_8029F284 = 8;
|
||||
D_8029F29E = 20;
|
||||
@ -1300,7 +1300,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A3 = 0;
|
||||
preset = &CamPreset_F;
|
||||
break;
|
||||
case 0x43:
|
||||
case BTL_CAM_PRESET_67:
|
||||
D_8029F280 = 214;
|
||||
D_8029F284 = 8;
|
||||
preset = &CamPreset_F;
|
||||
@ -1310,7 +1310,7 @@ void btl_cam_use_preset(s32 id) {
|
||||
D_8029F2A2 = 1;
|
||||
D_8029F2A3 = 1;
|
||||
break;
|
||||
case 0x44:
|
||||
case BTL_CAM_PRESET_68:
|
||||
D_8029F280 = 300;
|
||||
D_8029F284 = 8;
|
||||
preset = &CamPreset_F;
|
||||
|
@ -119,7 +119,7 @@ EvtSource N(idle_80219938) = {
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
@ -130,12 +130,12 @@ EvtSource N(idle_80219938) = {
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802198A0)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219854)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
@ -146,12 +146,12 @@ EvtSource N(idle_80219938) = {
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802198A0)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219854)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
@ -168,43 +168,43 @@ EvtSource N(handleEvent_80219C14) = {
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
@ -218,32 +218,32 @@ EvtSource N(handleEvent_80219C14) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_STAR_BEAM)
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
@ -251,22 +251,22 @@ EvtSource N(handleEvent_80219C14) = {
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
@ -285,7 +285,7 @@ EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
@ -300,10 +300,10 @@ EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
@ -341,7 +341,7 @@ EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
@ -366,7 +366,7 @@ EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
@ -412,11 +412,11 @@ EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,15 @@
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/spiked_goomba.h"
|
||||
|
||||
s32 N(defenseTable_8021AFD0)[] = {
|
||||
s32 N(defenseTable_8021E3B0)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021AFDC)[] = {
|
||||
s32 N(statusTable_8021E3BC)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
@ -33,18 +34,18 @@ s32 N(statusTable_8021AFDC)[] = {
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021B0D4)[];
|
||||
extern EvtSource N(init_8021B16C);
|
||||
extern s32 N(idleAnimations_8021E4B4)[];
|
||||
extern EvtSource N(init_8021E54C);
|
||||
|
||||
ActorPartDesc N(partsTable_8021B088)[] = {
|
||||
ActorPartDesc N(partsTable_8021E468)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021B0D4),
|
||||
.defenseTable = N(defenseTable_8021AFD0),
|
||||
.idleAnimations = N(idleAnimations_8021E4B4),
|
||||
.defenseTable = N(defenseTable_8021E3B0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 244,
|
||||
@ -56,10 +57,10 @@ ActorDesc NAMESPACE = {
|
||||
.type = ACTOR_TYPE_SPIKED_GOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021B088)),
|
||||
.partsData = N(partsTable_8021B088),
|
||||
.script = N(init_8021B16C),
|
||||
.statusTable = N(statusTable_8021AFDC),
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021E468)),
|
||||
.partsData = N(partsTable_8021E468),
|
||||
.script = N(init_8021E54C),
|
||||
.statusTable = N(statusTable_8021E3BC),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 90,
|
||||
@ -74,7 +75,7 @@ ActorDesc NAMESPACE = {
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B0D4)[] = {
|
||||
s32 N(idleAnimations_8021E4B4)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
@ -87,7 +88,7 @@ s32 N(idleAnimations_8021B0D4)[] = {
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B120)[] = {
|
||||
s32 N(idleAnimations_8021E500)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
@ -100,26 +101,26 @@ s32 N(idleAnimations_8021B120)[] = {
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021BDDC);
|
||||
extern EvtSource N(idle_8021B1B8);
|
||||
extern EvtSource N(handleEvent_8021B494);
|
||||
extern EvtSource N(takeTurn_8021F1BC);
|
||||
extern EvtSource N(idle_8021E598);
|
||||
extern EvtSource N(handleEvent_8021E874);
|
||||
|
||||
EvtSource N(init_8021B16C) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021BDDC)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021B1B8)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021B494)))
|
||||
EvtSource N(init_8021E54C) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021F1BC)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021E598)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021E874)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021B1B8) = {
|
||||
EvtSource N(idle_8021E598) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, LW(0))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
@ -127,15 +128,15 @@ EvtSource N(idle_8021B1B8) = {
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8021E500)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8021E4B4)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
@ -143,15 +144,15 @@ EvtSource N(idle_8021B1B8) = {
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8021E500)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8021E4B4)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_IF_FLAG(LW(1), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
@ -162,128 +163,128 @@ EvtSource N(idle_8021B1B8) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021B494) = {
|
||||
EvtSource N(handleEvent_8021E874) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_STAR_BEAM)
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(27)
|
||||
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x35D000)
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(3))
|
||||
EVT_IF_FLAG(LW(3), 0x80000)
|
||||
EVT_IF_FLAG(LW(3), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(1), 10)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(1), 26)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, 0x1A, 0, LW(0), LW(1), LW(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(PlayEffect, EFFECT_ID_1A, 0, LW(0), LW(1), LW(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
@ -296,17 +297,17 @@ EvtSource N(handleEvent_8021B494) = {
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021BDDC) = {
|
||||
EvtSource N(takeTurn_8021F1BC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
@ -315,10 +316,10 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
@ -326,7 +327,7 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_SET(LW(1), 10)
|
||||
EVT_ADD(LW(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
@ -346,18 +347,18 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_sleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
@ -367,7 +368,7 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 180)
|
||||
@ -381,19 +382,19 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
@ -402,7 +403,7 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
@ -422,19 +423,19 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, 32)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
@ -442,7 +443,7 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 40)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.80078125))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 30)
|
||||
@ -451,7 +452,7 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(GetLastDamage, 0, LW(0))
|
||||
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
@ -460,12 +461,12 @@ EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_IF
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
|
252
src/evt/fx_api.c
252
src/evt/fx_api.c
@ -192,393 +192,393 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
||||
iVar1 = new_var;
|
||||
|
||||
switch (effectID) {
|
||||
case 0:
|
||||
case EFFECT_ID_00:
|
||||
playFX_3E(0, fVar1, fVar2, fVar3, 3.0f, iVar5);
|
||||
break;
|
||||
case 1:
|
||||
case EFFECT_ID_01:
|
||||
playFX_01(fVar1, fVar2, fVar3);
|
||||
break;
|
||||
case 6:
|
||||
case EFFECT_ID_06:
|
||||
fx_land(iVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 7:
|
||||
case EFFECT_ID_07:
|
||||
fx_walk(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
||||
break;
|
||||
case 8:
|
||||
case EFFECT_ID_08:
|
||||
playFX_08(fVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 9:
|
||||
case EFFECT_ID_09:
|
||||
playFX_09(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
||||
break;
|
||||
case 10:
|
||||
case EFFECT_ID_0A:
|
||||
playFX_0A(fVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 11:
|
||||
case EFFECT_ID_0B:
|
||||
playFX_0B(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 12:
|
||||
case EFFECT_ID_0C:
|
||||
playFX_0C(fVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 13:
|
||||
case EFFECT_ID_0D:
|
||||
playFX_0D(0, fVar1, fVar2, fVar3, iVar4);
|
||||
break;
|
||||
case 14:
|
||||
case EFFECT_ID_0E:
|
||||
playFX_0E(fVar1, fVar2, fVar3, iVar4);
|
||||
break;
|
||||
case 15:
|
||||
case EFFECT_ID_0F:
|
||||
playFX_0F(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
|
||||
break;
|
||||
case 16:
|
||||
case EFFECT_ID_10:
|
||||
fx_emote(iVar1, (Npc* ) a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30);
|
||||
evt_set_variable(script, a8, sp30);
|
||||
break;
|
||||
case 17:
|
||||
case EFFECT_ID_11:
|
||||
playFX_11(iVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 18:
|
||||
case EFFECT_ID_12:
|
||||
playFX_12(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
|
||||
break;
|
||||
case 19:
|
||||
case EFFECT_ID_13:
|
||||
playFX_13(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 20:
|
||||
case EFFECT_ID_14:
|
||||
playFX_14(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 21:
|
||||
case EFFECT_ID_15:
|
||||
playFX_15(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 22:
|
||||
case EFFECT_ID_16:
|
||||
playFX_16(iVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 23:
|
||||
case EFFECT_ID_17:
|
||||
playFX_17(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 24:
|
||||
case EFFECT_ID_18:
|
||||
playFX_18(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
|
||||
break;
|
||||
case 25:
|
||||
case EFFECT_ID_19:
|
||||
playFX_19(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 26:
|
||||
case EFFECT_ID_1A:
|
||||
playFX_1A(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 27:
|
||||
case EFFECT_ID_1B:
|
||||
playFX_1B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 28:
|
||||
case EFFECT_ID_1C:
|
||||
playFX_1C(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 29:
|
||||
case EFFECT_ID_1D:
|
||||
playFX_1D(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, fVar7, iVar8);
|
||||
break;
|
||||
case 30:
|
||||
case EFFECT_ID_1E:
|
||||
playFX_1E(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, &sp30);
|
||||
evt_set_variable(script, a8, sp30);
|
||||
break;
|
||||
case 31:
|
||||
case EFFECT_ID_1F:
|
||||
playFX_1F(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
|
||||
break;
|
||||
case 33:
|
||||
case EFFECT_ID_21:
|
||||
playFX_21(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7);
|
||||
break;
|
||||
case 34:
|
||||
case EFFECT_ID_22:
|
||||
playFX_22(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
|
||||
break;
|
||||
case 35:
|
||||
case EFFECT_ID_23:
|
||||
playFX_23(iVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 36:
|
||||
case EFFECT_ID_24:
|
||||
playFX_24(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 37:
|
||||
case EFFECT_ID_25:
|
||||
playFX_25(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 38:
|
||||
case EFFECT_ID_26:
|
||||
playFX_26(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 39:
|
||||
case EFFECT_ID_27:
|
||||
playFX_27(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 40:
|
||||
case EFFECT_ID_28:
|
||||
fx_sweat(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7);
|
||||
break;
|
||||
case 41:
|
||||
case EFFECT_ID_29:
|
||||
fx_sleep_bubble(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, &sp38);
|
||||
evt_set_variable(script, a7, sp38);
|
||||
break;
|
||||
case 43:
|
||||
case EFFECT_ID_2B:
|
||||
playFX_2B(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 32:
|
||||
case EFFECT_ID_20:
|
||||
playFX_20(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 44:
|
||||
case EFFECT_ID_2C:
|
||||
playFX_2C(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 45:
|
||||
case EFFECT_ID_2D:
|
||||
playFX_2D(iVar1, fVar2, fVar3, fVar4, iVar5, iVar6);
|
||||
break;
|
||||
case 46:
|
||||
case EFFECT_ID_2E:
|
||||
playFX_2E(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 47:
|
||||
case EFFECT_ID_2F:
|
||||
playFX_2F(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, &sp38);
|
||||
evt_set_variable(script, a7, sp38);
|
||||
break;
|
||||
case 48:
|
||||
case EFFECT_ID_30:
|
||||
playFX_30(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 49:
|
||||
case EFFECT_ID_31:
|
||||
playFX_31(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 50:
|
||||
case EFFECT_ID_32:
|
||||
playFX_32(iVar1, fVar2, fVar3, fVar4, fVar5);
|
||||
break;
|
||||
case 51:
|
||||
case EFFECT_ID_33:
|
||||
playFX_33(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 52:
|
||||
case EFFECT_ID_34:
|
||||
playFX_34(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 53:
|
||||
case EFFECT_ID_35:
|
||||
playFX_35(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 54:
|
||||
case EFFECT_ID_36:
|
||||
effectRet = playFX_36(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
||||
break;
|
||||
case 55:
|
||||
case EFFECT_ID_37:
|
||||
effectRet = playFX_37(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9, iVar10);
|
||||
break;
|
||||
case 56:
|
||||
case EFFECT_ID_38:
|
||||
playFX_38(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 57:
|
||||
case EFFECT_ID_39:
|
||||
playFX_39(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 58:
|
||||
case EFFECT_ID_3A:
|
||||
playFX_3A(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
|
||||
break;
|
||||
case 59:
|
||||
case EFFECT_ID_3B:
|
||||
playFX_3B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 60:
|
||||
case EFFECT_ID_3C:
|
||||
playFX_3C(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||
evt_set_variable(script, a6, sp34);
|
||||
break;
|
||||
case 61:
|
||||
case EFFECT_ID_3D:
|
||||
playFX_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
|
||||
evt_set_variable(script, a9, sp3C);
|
||||
break;
|
||||
case 62:
|
||||
case EFFECT_ID_3E:
|
||||
playFX_3E(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 63:
|
||||
case EFFECT_ID_3F:
|
||||
effectRet = playFX_3F(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 64:
|
||||
case EFFECT_ID_40:
|
||||
effectRet = playFX_40(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 65:
|
||||
case EFFECT_ID_41:
|
||||
effectRet = playFX_41(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||
break;
|
||||
case 66:
|
||||
case EFFECT_ID_42:
|
||||
effectRet = playFX_42(iVar1, iVar2, iVar3, fVar4, iVar5, iVar6);
|
||||
break;
|
||||
case 67:
|
||||
case EFFECT_ID_43:
|
||||
effectRet = playFX_43(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 68:
|
||||
case EFFECT_ID_44:
|
||||
effectRet = playFX_44(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 69:
|
||||
case EFFECT_ID_45:
|
||||
effectRet = playFX_45(iVar1, iVar2);
|
||||
break;
|
||||
case 70:
|
||||
case EFFECT_ID_46:
|
||||
effectRet = playFX_46_whirlwind(iVar1, a2, fVar3, iVar4);
|
||||
break;
|
||||
case 71:
|
||||
case EFFECT_ID_47:
|
||||
effectRet = playFX_47(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 72:
|
||||
case EFFECT_ID_48:
|
||||
effectRet = playFX_48(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 73:
|
||||
case EFFECT_ID_49:
|
||||
effectRet = playFX_49(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 74:
|
||||
case EFFECT_ID_4A:
|
||||
effectRet = playFX_4A(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
||||
break;
|
||||
case 75:
|
||||
case EFFECT_ID_4B:
|
||||
effectRet = playFX_4B(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 76:
|
||||
case EFFECT_ID_4C:
|
||||
effectRet = playFX_4C(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
|
||||
break;
|
||||
case 77:
|
||||
case EFFECT_ID_4D:
|
||||
effectRet = playFX_4D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, fVar9, iVar10);
|
||||
break;
|
||||
case 78:
|
||||
case EFFECT_ID_4E:
|
||||
effectRet = playFX_4E(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 79:
|
||||
case EFFECT_ID_4F:
|
||||
effectRet = playFX_4F(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 82:
|
||||
case EFFECT_ID_52:
|
||||
effectRet = playFX_52(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 83:
|
||||
case EFFECT_ID_53:
|
||||
effectRet = playFX_53(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 81:
|
||||
case EFFECT_ID_51:
|
||||
effectRet = playFX_51(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 86:
|
||||
case EFFECT_ID_56:
|
||||
effectRet = playFX_56(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 87:
|
||||
case EFFECT_ID_57:
|
||||
effectRet = playFX_57(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 88:
|
||||
case EFFECT_ID_58:
|
||||
effectRet = playFX_58(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 89:
|
||||
case EFFECT_ID_59:
|
||||
effectRet = playFX_59(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
|
||||
break;
|
||||
case 90:
|
||||
case EFFECT_ID_5A:
|
||||
effectRet = playFX_5A(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 91:
|
||||
case EFFECT_ID_5B:
|
||||
effectRet = playFX_5B(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 92:
|
||||
case EFFECT_ID_5C:
|
||||
effectRet = playFX_5C(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 93:
|
||||
case EFFECT_ID_5D:
|
||||
effectRet = playFX_5D(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 94:
|
||||
case EFFECT_ID_5E:
|
||||
effectRet = playFX_5E(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
|
||||
break;
|
||||
case 95:
|
||||
case EFFECT_ID_5F:
|
||||
effectRet = playFX_5F(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 96:
|
||||
case EFFECT_ID_60:
|
||||
effectRet = playFX_60(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 97:
|
||||
case EFFECT_ID_61:
|
||||
effectRet = playFX_61(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 98:
|
||||
case EFFECT_ID_62:
|
||||
effectRet = playFX_62(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 99:
|
||||
case EFFECT_ID_63:
|
||||
effectRet = playFX_63(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9, iVar10);
|
||||
break;
|
||||
case 100:
|
||||
case EFFECT_ID_64:
|
||||
effectRet = playFX_64(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
|
||||
break;
|
||||
case 101:
|
||||
case EFFECT_ID_65:
|
||||
effectRet = playFX_65(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 102:
|
||||
case EFFECT_ID_66:
|
||||
effectRet = playFX_66(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 103:
|
||||
case EFFECT_ID_67:
|
||||
effectRet = playFX_67(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 104:
|
||||
case EFFECT_ID_68:
|
||||
effectRet = playFX_68(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 105:
|
||||
case EFFECT_ID_69:
|
||||
effectRet = playFX_69(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 107:
|
||||
case EFFECT_ID_6B:
|
||||
effectRet = playFX_6B(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 108:
|
||||
case EFFECT_ID_6C:
|
||||
effectRet = playFX_6C(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 109:
|
||||
case EFFECT_ID_6D:
|
||||
effectRet = playFX_6D(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 110:
|
||||
case EFFECT_ID_6E:
|
||||
effectRet = playFX_6E(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
|
||||
break;
|
||||
case 111:
|
||||
case EFFECT_ID_6F:
|
||||
effectRet = playFX_6F(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 112:
|
||||
case EFFECT_ID_70:
|
||||
effectRet = playFX_70(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9, fVar10, fVar11);
|
||||
break;
|
||||
case 113:
|
||||
case EFFECT_ID_71:
|
||||
effectRet = playFX_71(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 114:
|
||||
case EFFECT_ID_72:
|
||||
effectRet = playFX_72(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9);
|
||||
break;
|
||||
case 115:
|
||||
case EFFECT_ID_73:
|
||||
effectRet = playFX_73(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, iVar7);
|
||||
break;
|
||||
case 116:
|
||||
case EFFECT_ID_74:
|
||||
effectRet = playFX_74(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, fVar9);
|
||||
break;
|
||||
case 117:
|
||||
case EFFECT_ID_75:
|
||||
effectRet = playFX_75(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 119:
|
||||
case EFFECT_ID_77:
|
||||
effectRet = playFX_77(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
|
||||
break;
|
||||
case 120:
|
||||
case EFFECT_ID_78:
|
||||
effectRet = playFX_78(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 85:
|
||||
case EFFECT_ID_55:
|
||||
effectRet = playFX_55(iVar1, fVar2, fVar3, fVar4);
|
||||
break;
|
||||
case 121:
|
||||
case EFFECT_ID_79:
|
||||
effectRet = playFX_79(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 122:
|
||||
case EFFECT_ID_7A:
|
||||
effectRet = playFX_7A(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 123:
|
||||
case EFFECT_ID_7B:
|
||||
effectRet = playFX_7B(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 124:
|
||||
case EFFECT_ID_7C:
|
||||
effectRet = playFX_7C(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 125:
|
||||
case EFFECT_ID_7D:
|
||||
effectRet = playFX_7D(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 126:
|
||||
case EFFECT_ID_7E:
|
||||
effectRet = playFX_7E(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 127:
|
||||
case EFFECT_ID_7F:
|
||||
effectRet = playFX_7F(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 128:
|
||||
case EFFECT_ID_80:
|
||||
effectRet = playFX_80(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 129:
|
||||
case EFFECT_ID_81:
|
||||
effectRet = playFX_81(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 130:
|
||||
case EFFECT_ID_82:
|
||||
effectRet = playFX_82(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 131:
|
||||
case EFFECT_ID_83:
|
||||
effectRet = playFX_83(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 132:
|
||||
case EFFECT_ID_84:
|
||||
effectRet = playFX_84(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 133:
|
||||
case EFFECT_ID_85:
|
||||
effectRet = playFX_85(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
case 134:
|
||||
case EFFECT_ID_86:
|
||||
effectRet = playFX_86(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||
break;
|
||||
default:
|
||||
|
@ -142,6 +142,8 @@ def browse_header(valid_enums, enums):
|
||||
|
||||
# Grab CONSTANTS from the include/ folder to save manual work
|
||||
CONSTANTS = {}
|
||||
SWITCH_TYPES = []
|
||||
LOCAL_WORDS = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
|
||||
SAVE_VARS = set()
|
||||
def get_constants():
|
||||
global CONSTANTS
|
||||
@ -153,7 +155,8 @@ def get_constants():
|
||||
"DamageTypes", "ElementImmunityFlags", "HitResults", "ActorFlags", "ActorPartFlags",
|
||||
"ActorEventFlags", "ElementFlags", "EncounterTriggers", "Abilities",
|
||||
"Easings", "DecorationIDs", "HitResults", "Phases", "ItemSpawnModes",
|
||||
"ActionStates", "Triggers", "Buttons", "ActionCommand", "MoveIDs" }
|
||||
"ActionStates", "Triggers", "Buttons", "ActionCommand", "MoveIDs", "BattleStatusFlags1",
|
||||
"BattleStatusFlags2", "BtlCameraPreset", "EffectID", "StatusFlags" }
|
||||
for enum in valid_enums:
|
||||
CONSTANTS[enum] = {}
|
||||
CONSTANTS["NPC_SPRITE"] = {}
|
||||
@ -164,6 +167,9 @@ def get_constants():
|
||||
include_path = Path(Path(__file__).resolve().parent.parent / "include")
|
||||
enums = Path(include_path / "enums.h").read_text().splitlines()
|
||||
browse_header(valid_enums, enums)
|
||||
enums = Path(include_path / "effects.h").read_text().splitlines()
|
||||
browse_header(valid_enums, enums)
|
||||
|
||||
|
||||
include_path = Path(Path(__file__).resolve().parent.parent / "src" / "battle")
|
||||
enums = Path(include_path / "battle.h").read_text().splitlines()
|
||||
@ -224,6 +230,19 @@ def remove_evt_ptr(s):
|
||||
else:
|
||||
return s
|
||||
|
||||
def make_flags(argNum, flags, new_args):
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS[flags]:
|
||||
enabled.append(CONSTANTS[flags][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(" | ".join(enabled))
|
||||
|
||||
|
||||
def fix_args(self, func, args, info):
|
||||
global CONSTANTS
|
||||
@ -231,15 +250,24 @@ def fix_args(self, func, args, info):
|
||||
new_args = []
|
||||
args = args.split(", ")
|
||||
for i,arg in enumerate(args):
|
||||
if ((remove_evt_ptr(arg) == "D_80000000") or (remove_evt_ptr(arg).startswith("D_B")) or
|
||||
if ((remove_evt_ptr(arg).startswith("D_B")) or
|
||||
(i == 0 and func == "MakeEntity" and arg.startswith("D_"))):
|
||||
if func == "MakeEntity":
|
||||
arg = "MAKE_ENTITY_END"
|
||||
else:
|
||||
arg = "0x" + remove_evt_ptr(arg)[2:]
|
||||
|
||||
if "0x" in arg and int(remove_evt_ptr(arg), 16) >= 0xF0000000:
|
||||
arg = f"{int(remove_evt_ptr(arg), 16) - 0x100000000}"
|
||||
|
||||
if i in info or (i+1 == len(args) and -1 in info):
|
||||
if arg.startswith("LW"):
|
||||
argNum = trim_lw(arg)
|
||||
LOCAL_WORDS[int(argNum)] = info[i]
|
||||
new_args.append(f"{arg}")
|
||||
#print(LOCAL_WORDS)
|
||||
continue
|
||||
|
||||
if i+1 == len(args) and -1 in info:
|
||||
i = -1
|
||||
if "_" in arg:
|
||||
@ -256,14 +284,6 @@ def fix_args(self, func, args, info):
|
||||
elif info[i] == "Hex" and argNum > 0:
|
||||
new_args.append(f"0x{argNum:08X}")
|
||||
elif info[i] == "CustomAnim":
|
||||
sprite = (argNum & 0xFF0000) >> 16
|
||||
palette = (argNum & 0xFF00) >> 8
|
||||
anim = (argNum & 0xFF) >> 0
|
||||
|
||||
#if argNum not in CONSTANTS["MAP_NPCS"]:
|
||||
# new_args.append(f"0x{argNum:X}")
|
||||
# continue
|
||||
|
||||
try:
|
||||
value = (argNum & 0x00FFFFFF)
|
||||
|
||||
@ -284,17 +304,19 @@ def fix_args(self, func, args, info):
|
||||
num_ = (argNum & 0xFFFF) >> 0
|
||||
new_args.append(f"MESSAGE_ID(0x{type_:02X}, 0x{num_:04X})")
|
||||
elif info[i] == "NpcFlags":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS["NpcFlags"]:
|
||||
enabled.append(CONSTANTS["NpcFlags"][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
make_flags(argNum, "NpcFlags", new_args)
|
||||
elif info[i] == "DamageTypes":
|
||||
make_flags(argNum, "DamageTypes", new_args)
|
||||
elif info[i] == "ActorPartFlags":
|
||||
make_flags(argNum, "ActorPartFlags", new_args)
|
||||
elif info[i] == "ActorFlags":
|
||||
make_flags(argNum, "ActorFlags", new_args)
|
||||
elif info[i] == "BattleStatusFlags1":
|
||||
make_flags(argNum, "BattleStatusFlags1", new_args)
|
||||
elif info[i] == "BattleStatusFlags2":
|
||||
make_flags(argNum, "BattleStatusFlags2", new_args)
|
||||
elif info[i] == "StatusFlags":
|
||||
make_flags(argNum, "StatusFlags", new_args)
|
||||
elif info[i] == "NpcIDs":
|
||||
if argNum >= 0:
|
||||
if argNum in CONSTANTS["MAP_NPCS"]:
|
||||
@ -303,42 +325,6 @@ def fix_args(self, func, args, info):
|
||||
new_args.append(str(argNum))
|
||||
else:
|
||||
new_args.append(CONSTANTS["NpcIDs"][argNum])
|
||||
elif info[i] == "DamageTypes":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS["DamageTypes"]:
|
||||
enabled.append(CONSTANTS["DamageTypes"][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "ActorPartFlags":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS["ActorPartFlags"]:
|
||||
enabled.append(CONSTANTS["ActorPartFlags"][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "ActorFlags":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS["ActorFlags"]:
|
||||
enabled.append(CONSTANTS["ActorFlags"][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "SoundIDs":
|
||||
if argNum in CONSTANTS["SoundIDs"]:
|
||||
new_args.append(CONSTANTS["SoundIDs"][argNum])
|
||||
@ -350,9 +336,10 @@ def fix_args(self, func, args, info):
|
||||
new_args.append(CONSTANTS["StoryProgress"][argNum])
|
||||
else:
|
||||
new_args.append(str(argNum))
|
||||
elif argNum in CONSTANTS[info[i]]:
|
||||
new_args.append(f"{CONSTANTS[info[i]][argNum]}")
|
||||
else:
|
||||
try:
|
||||
new_args.append(f"{CONSTANTS[info[i]][argNum]}")
|
||||
except KeyError:
|
||||
if not (info[i] == "NpcIDs" and argNum > 0):
|
||||
print(f"0x{argNum:X} was not found within {info[i]} constants for function {func} arg {i}, add it.")
|
||||
|
||||
@ -368,8 +355,10 @@ def fix_args(self, func, args, info):
|
||||
|
||||
|
||||
replace_funcs = {
|
||||
"ActorExists" :{0:"ActorIDs", 1:"Bool"},
|
||||
"ActorSpeak" :{0:"CustomMsg", 1:"ActorIDs", 3:"CustomAnim", 4:"CustomAnim"},
|
||||
"AddActorDecoration" :{0:"ActorIDs"},
|
||||
"AddActorVar" :{0:"ActorIDs"},
|
||||
"AddKeyItem" :{0:"ItemIDs"},
|
||||
"AddGoalPos" :{0:"ActorIDs"},
|
||||
|
||||
@ -384,38 +373,55 @@ replace_funcs = {
|
||||
"BindTakeTurn" :{0:"ActorIDs"},
|
||||
|
||||
"ContinueSpeech" :{1:"CustomAnim", 2:"CustomAnim", 4:"CustomMsg"},
|
||||
"CopyBuffs" :{0:"ActorIDs", 1:"ActorIDs"},
|
||||
"CopyStatusEffects" :{0:"ActorIDs", 1:"ActorIDs"},
|
||||
"CountPlayerTargets" :{0:"ActorIDs"},
|
||||
|
||||
"DisablePlayerInput" :{0:"Bool"},
|
||||
"DisablePlayerPhysics" :{0:"Bool"},
|
||||
"DispatchDamagePlayerEvent" :{1:"Events"},
|
||||
"DispatchEvent" :{0:"ActorIDs"},
|
||||
"DispatchEvent" :{0:"ActorIDs", 1:"Events"},
|
||||
|
||||
"EnableActorBlur" :{0:"ActorIDs"},
|
||||
"EnableIdleScript" :{0:"ActorIDs"},
|
||||
"EnableNpcShadow" :{0:"NpcIDs", 1:"Bool"},
|
||||
"EndActorSpeech" :{0:"ActorIDs", 2:"CustomAnim", 3:"CustomAnim"},
|
||||
"EndSpeech" :{1:"CustomAnim", 2:"CustomAnim"},
|
||||
"EnemyDamageTarget" :{0:"ActorIDs", 2:"DamageTypes"},
|
||||
"EnemyTestTarget" :{0:"ActorIDs", 2:"DamageTypes"},
|
||||
"EnemyDamageTarget" :{0:"ActorIDs", 1:"HitResults", 2:"DamageTypes", 4:"StatusFlags", 6:"BattleStatusFlags1"},
|
||||
"EnemyTestTarget" :{0:"ActorIDs", 1:"HitResults", 2:"DamageTypes", 3:"StatusFlags", 5:"BattleStatusFlags1"},
|
||||
|
||||
"FindKeyItem" :{0:"ItemIDs"},
|
||||
"FlyToGoal" :{0:"ActorIDs"},
|
||||
"ForceHomePos" :{0:"ActorIDs"},
|
||||
|
||||
"func_802CFE2C" :{0:"NpcIDs"},
|
||||
"func_8026EA7C" :{0:"ActorIDs"},
|
||||
"func_8026EBF8" :{0:"ActorIDs"},
|
||||
"func_8026ED20" :{0:"ActorIDs"},
|
||||
"func_8027D32C" :{0:"ActorIDs"},
|
||||
"func_8027D434" :{0:"ActorIDs"},
|
||||
"func_8027D4C8" :{0:"ActorIDs"},
|
||||
"func_802CFD30" :{0:"NpcIDs"},
|
||||
"func_802CFE2C" :{0:"NpcIDs"},
|
||||
"func_802D2520" :{0:"PlayerAnims"},
|
||||
|
||||
"GetActorFlags" :{0:"ActorIDs", 1:"ActorFlags"},
|
||||
"GetActorHP" :{0:"ActorIDs"},
|
||||
"GetActorPos" :{0:"ActorIDs"},
|
||||
"GetActorSize" :{0:"ActorIDs"},
|
||||
"GetActorVar" :{0:"ActorIDs"},
|
||||
"GetBattleFlags" :{0:"BattleStatusFlags1"},
|
||||
"GetDistanceToGoal" :{0:"ActorIDs"},
|
||||
"GetGoalPos" :{0:"ActorIDs"},
|
||||
"GetHomePos" :{0:"ActorIDs"},
|
||||
"GetIndexFromHome" :{0:"ActorIDs"},
|
||||
"GetIndexFromPos" :{0:"ActorIDs"},
|
||||
"GetItemPower" :{0:"ItemIDs"},
|
||||
"GetLastDamage" :{0:"ActorIDs"},
|
||||
"GetLastEvent" :{0:"ActorIDs"},
|
||||
"GetLastElement" :{0:"DamageTypes"},
|
||||
"GetLastEvent" :{0:"ActorIDs", 1:"Events"},
|
||||
"GetNpcPos" :{0:"NpcIDs"},
|
||||
"GetStatusFlags" :{0:"ActorIDs"},
|
||||
"GetOriginalActorType" :{0:"ActorIDs", 1:"ActorType"},
|
||||
"GetStatusFlags" :{0:"ActorIDs", 1:"StatusFlags"},
|
||||
|
||||
"HidePlayerShadow" :{0:"Bool"},
|
||||
"HPBarToCurrent" :{0:"ActorIDs"},
|
||||
@ -425,7 +431,10 @@ replace_funcs = {
|
||||
"IdleRunToGoal" :{0:"ActorIDs"},
|
||||
"InterpNpcYaw" :{0:"NpcIDs"},
|
||||
|
||||
"JumpToGoal" :{0:"ActorIDs"},
|
||||
"JumpPartTo" :{0:"ActorIDs"},
|
||||
"JumpToGoal" :{0:"ActorIDs", 2:"Bool", 3:"Bool", 4:"Bool"},
|
||||
|
||||
"LandJump" :{0:"ActorIDs"},
|
||||
|
||||
"MakeEntity" :{0:"Hex"},
|
||||
"MakeItemEntity" :{0:"ItemIDs"},
|
||||
@ -438,10 +447,13 @@ replace_funcs = {
|
||||
"NpcMoveTo" :{0:"NpcIDs"},
|
||||
|
||||
"PlayAmbientSounds" :{0:"AmbientSounds"},
|
||||
"PlayEffect" :{0:"EffectID"},
|
||||
"PlayLoopingSoundAtActor" :{0:"ActorIDs", 2:"SoundIDs"},
|
||||
"PlaySound" :{0:"SoundIDs"},
|
||||
"PlaySoundAt" :{0:"SoundIDs"},
|
||||
"PlaySoundAtActor" :{0:"ActorIDs", 1:"SoundIDs"},
|
||||
"PlaySoundAtNpc" :{0:"NpcIDs", 1:"SoundIDs"},
|
||||
"PlaySoundAtPart" :{0:"ActorIDs", 2:"SoundIDs"},
|
||||
|
||||
"RemoveActor" :{0:"ActorIDs"},
|
||||
"RemoveActorDecoration" :{0:"ActorIDs"},
|
||||
@ -449,7 +461,6 @@ replace_funcs = {
|
||||
"ResetActorSounds" :{0:"ActorIDs"},
|
||||
"ResetAllActorSounds" :{0:"ActorIDs"},
|
||||
"RunToGoal" :{0:"ActorIDs", 2:"Bool"},
|
||||
"JumpToGoal" :{0:"ActorIDs", 2:"Bool", 3:"Bool", 4:"Bool"},
|
||||
|
||||
"SetActorDispOffset" :{0:"ActorIDs"},
|
||||
"SetActorFlagBits" :{0:"ActorIDs", 1:"ActorFlags"},
|
||||
@ -457,22 +468,31 @@ replace_funcs = {
|
||||
"SetActorJumpGravity" :{0:"ActorIDs"},
|
||||
"SetActorPos" :{0:"ActorIDs"},
|
||||
"SetActorRotation" :{0:"ActorIDs"},
|
||||
"SetActorRotationOffset" :{0:"ActorIDs"},
|
||||
"SetActorScale" :{0:"ActorIDs"},
|
||||
"SetActorSounds" :{0:"ActorIDs"},
|
||||
"SetActorSpeed" :{0:"ActorIDs"},
|
||||
"SetActorType" :{0:"ActorIDs", 1:"ActorType"},
|
||||
"SetActorVar" :{0:"ActorIDs"},
|
||||
"SetActorYaw" :{0:"ActorIDs"},
|
||||
|
||||
"SetAnimation" :{0:"ActorIDs", 2:"CustomAnim"},
|
||||
"SetAnimationRate" :{0:"ActorIDs"},
|
||||
"SetBattleFlagBits" :{0:"BattleStatusFlags1"},
|
||||
"SetBattleFlagBits2" :{0:"BattleStatusFlags2"},
|
||||
"SetDefenseTable" :{0:"ActorIDs"},
|
||||
"SetEnemyHP" :{0:"ActorIDs"},
|
||||
"SetEnemyTargetOffset" :{0:"ActorIDs"},
|
||||
"SetGoalPos" :{0:"ActorIDs"},
|
||||
"SetGoalToHome" :{0:"ActorIDs"},
|
||||
"SetGoalToIndex" :{0:"ActorIDs"},
|
||||
"SetGoalToTarget" :{0:"ActorIDs"},
|
||||
"SetHomePos" :{0:"ActorIDs"},
|
||||
"SetIdleAnimations" :{0:"ActorIDs"},
|
||||
"SetIdleGoal" :{0:"ActorIDs"},
|
||||
"SetJumpAnimations" :{0:"ActorIDs", 2:"PlayerAnims", 3:"PlayerAnims", 4:"PlayerAnims"},
|
||||
"SetMusicTrack" :{1:"SongIDs"},
|
||||
|
||||
"SetNpcAnimation" :{0:"NpcIDs", 1:"CustomAnim"},
|
||||
"SetNpcAux" :{0:"NpcIDs"},
|
||||
"SetNpcFlagBits" :{0:"NpcIDs", 1:"NpcFlags", 2:"Bool"},
|
||||
@ -483,40 +503,73 @@ replace_funcs = {
|
||||
"SetNpcSpeed" :{0:"NpcIDs"},
|
||||
"SetNpcSprite" :{1:"Hex"},
|
||||
"SetNpcYaw" :{0:"NpcIDs"},
|
||||
|
||||
"SetPartAlpha" :{0:"ActorIDs"},
|
||||
"SetPartDispOffset" :{0:"ActorIDs"},
|
||||
"SetPartFlags" :{0:"ActorIDs"},
|
||||
"SetPartEventBits" :{0:"ActorIDs", 2:"ActorEventFlags"},
|
||||
"SetPartFlags" :{0:"ActorIDs", 2:"ActorPartFlags"},
|
||||
"SetPartFlagBits" :{0:"ActorIDs", 2:"ActorPartFlags"},
|
||||
"SetPartJumpGravity" :{0:"ActorIDs"},
|
||||
"SetPartMoveSpeed" :{0:"ActorIDs"},
|
||||
"SetPartPos" :{0:"ActorIDs"},
|
||||
"SetPartScale" :{0:"ActorIDs"},
|
||||
"SetPartSize" :{0:"ActorIDs"},
|
||||
"SetPartSounds" :{0:"ActorIDs"},
|
||||
"SetPartYaw" :{0:"ActorIDs"},
|
||||
|
||||
"SetPlayerAnimation" :{0:"PlayerAnims"},
|
||||
"SetSelfEnemyFlagBits" :{0:"NpcFlags", 1:"Bool"},
|
||||
#"SetSelfVar" :{1:"Bool"}, # apparently this was a bool in some scripts but it passes non-0/1 values, including negatives
|
||||
"SetStatusTable" :{0:"ActorIDs"},
|
||||
"SetTargetActor" :{0:"ActorIDs", 1:"ActorIDs"},
|
||||
"SetTargetOffset" :{0:"ActorIDs"},
|
||||
"ShowChoice" :{0:"CustomMsg"},
|
||||
"ShowEmote" :{1:"Emotes"},
|
||||
"ShowMessageAtScreenPos" :{0:"CustomMsg"},
|
||||
"ShowMessageAtWorldPos" :{0:"CustomMsg"},
|
||||
"SpeakToPlayer" :{0:"NpcIDs", 1:"CustomAnim", 2:"CustomAnim", -1:"CustomMsg"},
|
||||
"StopLoopingSoundAtActor" :{0:"ActorIDs"},
|
||||
"SwitchMessage" :{0:"CustomMsg"},
|
||||
|
||||
"UseBattleCamPreset" :{0:"BtlCameraPreset"},
|
||||
"UseIdleAnimation" :{0:"ActorIDs", 1:"Bool"},
|
||||
}
|
||||
|
||||
def trim_lw(arg):
|
||||
arg = arg[3:-1]
|
||||
return arg
|
||||
|
||||
|
||||
def replace_constants(self, func, args):
|
||||
global replace_funcs
|
||||
global LOCAL_WORDS
|
||||
|
||||
new_args = []
|
||||
new_args = args.split(", ")
|
||||
for i, new_arg in enumerate(new_args):
|
||||
if new_arg.startswith("LW"):
|
||||
new_arg = trim_lw(new_arg)
|
||||
LOCAL_WORDS[int(new_arg)] = 0
|
||||
|
||||
if func in replace_funcs:
|
||||
return fix_args(self, func, args, replace_funcs[func])
|
||||
elif func == "PlayEffect":
|
||||
argsZ = args.split(", ")
|
||||
if "0x" not in argsZ[0]:
|
||||
argsZ[0] = f"0x{int(argsZ[0], 10):X}"
|
||||
args = ", ".join(argsZ)
|
||||
|
||||
return args
|
||||
|
||||
def fix_1_arg(self, lw, arg, format):
|
||||
if lw:
|
||||
lw = int(trim_lw(lw))
|
||||
if LOCAL_WORDS[lw]:
|
||||
info = {0 : LOCAL_WORDS[lw]}
|
||||
args = f"{arg}"
|
||||
return fix_args(self, 0, args, info)
|
||||
|
||||
if format:
|
||||
info = {0 : format}
|
||||
args = f"{arg}"
|
||||
return fix_args(self, 0, args, info)
|
||||
|
||||
return arg
|
||||
|
||||
class ScriptDisassembler:
|
||||
def __init__(self, bytes, script_name = "script", symbol_map = {}, romstart = 0, INCLUDES_NEEDED = {"forward": [], "sprites": set(), "npcs": []}, INCLUDED = {"functions": set(), "includes": set()}, prelude = True, transform_symbol_name=None, use_script_lib=True):
|
||||
@ -707,10 +760,18 @@ class ScriptDisassembler:
|
||||
elif opcode == 0x08: self.write_line(f"EVT_WAIT_FRAMES({self.var(argv[0])})")
|
||||
elif opcode == 0x09: self.write_line(f"EVT_WAIT_SECS({self.var(argv[0])})")
|
||||
elif opcode == 0x0A:
|
||||
self.write_line(f"EVT_IF_EQ({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
if self.var(argv[0]).startswith("LW"):
|
||||
args_str = fix_1_arg(self, self.var(argv[0]), self.var(argv[1]), 0)
|
||||
else:
|
||||
args_str = self.var(argv[1])
|
||||
self.write_line(f"EVT_IF_EQ({self.var(argv[0])}, {args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x0B:
|
||||
self.write_line(f"EVT_IF_NE({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
if self.var(argv[0]).startswith("LW"):
|
||||
args_str = fix_1_arg(self, self.var(argv[0]), self.var(argv[1]), 0)
|
||||
else:
|
||||
args_str = self.var(argv[1])
|
||||
self.write_line(f"EVT_IF_NE({self.var(argv[0])}, {args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x0C:
|
||||
self.write_line(f"EVT_IF_LT({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
@ -725,10 +786,12 @@ class ScriptDisassembler:
|
||||
self.write_line(f"EVT_IF_GE({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x10:
|
||||
self.write_line(f"EVT_IF_FLAG({self.var(argv[0])}, {self.var(argv[1], prefer_hex=True)})")
|
||||
args_str = fix_1_arg(self, self.var(argv[0]), self.var(argv[1]), "Hex")
|
||||
self.write_line(f"EVT_IF_FLAG({self.var(argv[0])}, {args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x11:
|
||||
self.write_line(f"EVT_IF_NOT_FLAG({self.var(argv[0])}, {self.var(argv[1], prefer_hex=True)})")
|
||||
args_str = fix_1_arg(self, self.var(argv[0]), self.var(argv[1]), "Hex")
|
||||
self.write_line(f"EVT_IF_NOT_FLAG({self.var(argv[0])}, {args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x12:
|
||||
self.indent -= 1
|
||||
@ -738,6 +801,8 @@ class ScriptDisassembler:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_END_IF")
|
||||
elif opcode == 0x14:
|
||||
new_arg = trim_lw(self.var(argv[0]))
|
||||
SWITCH_TYPES.append(LOCAL_WORDS[int(new_arg)])
|
||||
self.write_line(f"EVT_SWITCH({self.var(argv[0])})")
|
||||
self.indent += 2
|
||||
elif opcode == 0x15:
|
||||
@ -745,11 +810,13 @@ class ScriptDisassembler:
|
||||
self.indent += 2
|
||||
elif opcode == 0x16:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_CASE_EQ({self.var(argv[0])})")
|
||||
args_str = fix_1_arg(self, 0, self.var(argv[0]), SWITCH_TYPES[-1])
|
||||
self.write_line(f"EVT_CASE_EQ({args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x17:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_CASE_NE({self.var(argv[0])})")
|
||||
args_str = fix_1_arg(self, 0, self.var(argv[0]), SWITCH_TYPES[-1])
|
||||
self.write_line(f"EVT_CASE_NE({args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x18:
|
||||
self.indent -= 1
|
||||
@ -773,15 +840,18 @@ class ScriptDisassembler:
|
||||
self.indent += 1
|
||||
elif opcode == 0x1D:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_CASE_OR_EQ({self.var(argv[0])})")
|
||||
args_str = fix_1_arg(self, 0, self.var(argv[0]), SWITCH_TYPES[-1])
|
||||
self.write_line(f"EVT_CASE_OR_EQ({args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x1E:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_CASE_AND_EQ({self.var(argv[0])})")
|
||||
args_str = fix_1_arg(self, 0, self.var(argv[0]), SWITCH_TYPES[-1])
|
||||
self.write_line(f"EVT_CASE_AND_EQ({args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x1F:
|
||||
self.indent -= 1
|
||||
self.write_line(f"EVT_CASE_FLAG({self.var(argv[0])})")
|
||||
args_str = fix_1_arg(self, 0, self.var(argv[0]), SWITCH_TYPES[-1])
|
||||
self.write_line(f"EVT_CASE_FLAG({args_str})")
|
||||
self.indent += 1
|
||||
elif opcode == 0x20:
|
||||
self.indent -= 1
|
||||
@ -794,8 +864,18 @@ class ScriptDisassembler:
|
||||
elif opcode == 0x22: self.write_line(f"EVT_BREAK_SWITCH")
|
||||
elif opcode == 0x23:
|
||||
self.indent -= 2
|
||||
del SWITCH_TYPES[-1]
|
||||
self.write_line(f"EVT_END_SWITCH")
|
||||
elif opcode == 0x24: self.write_line(f"EVT_SET({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x24:
|
||||
if self.var(argv[0]).startswith("LW"):
|
||||
new_arg = trim_lw(self.var(argv[0]))
|
||||
if self.var(argv[1]).startswith("LW"):
|
||||
from_arg = trim_lw(self.var(argv[1])) # Carry type info of LW if being set from an LW
|
||||
else:
|
||||
from_arg = 0 # If a constant, we no longer know the type
|
||||
LOCAL_WORDS[int(new_arg)] = LOCAL_WORDS[int(from_arg)]
|
||||
|
||||
self.write_line(f"EVT_SET({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x25:
|
||||
argNum = argv[1]
|
||||
sprite = (argNum & 0xFF0000) >> 16
|
||||
@ -803,8 +883,10 @@ class ScriptDisassembler:
|
||||
anim = (argNum & 0xFF) >> 0
|
||||
if sprite > 0:
|
||||
value = make_anim_macro(self, sprite, palette, anim)
|
||||
else:
|
||||
elif argNum > 100:
|
||||
value = f"0x{argNum:08X}"
|
||||
else:
|
||||
value = f"{argNum}"
|
||||
self.write_line(f"EVT_SET_CONST({self.var(argv[0])}, {value})")
|
||||
elif opcode == 0x26: self.write_line(f"EVT_SETF({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x27: self.write_line(f"EVT_ADD({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
|
Loading…
Reference in New Issue
Block a user