From 98f02458e35026ce47d77daeacf759d840ea6fc2 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 9 Apr 2022 01:47:20 -0700 Subject: [PATCH] Added a way to bind to movtexqc ids through lua, added the rest of the object constants --- autogen/convert_constants.py | 1 - autogen/lua_definitions/constants.lua | 1599 +++++++++++++++++ autogen/lua_definitions/functions.lua | 9 + data/dynos.c.h | 6 +- data/dynos.cpp.h | 17 +- data/dynos_c.cpp | 27 +- data/dynos_level.cpp | 7 +- data/dynos_mgr_lvl.cpp | 18 +- data/dynos_mgr_movtexqc.cpp | 62 + docs/lua/constants.md | 533 ++++++ docs/lua/functions.md | 24 + src/game/moving_texture.c | 4 +- src/pc/controller/controller_keyboard_debug.c | 2 +- src/pc/lua/smlua_constants_autogen.c | 533 ++++++ src/pc/lua/smlua_functions_autogen.c | 18 + src/pc/lua/utils/smlua_misc_utils.c | 4 + src/pc/lua/utils/smlua_misc_utils.h | 1 + src/pc/lua/utils/smlua_model_utils.c | 5 +- 18 files changed, 2833 insertions(+), 37 deletions(-) create mode 100644 data/dynos_mgr_movtexqc.cpp diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 1721bbca..34498d2a 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -40,7 +40,6 @@ exclude_constants = { } include_constants = { - "include/object_constants.h" : [ "^ACTIVE_FLAG_", "^ACTIVE_PARTICLE_", "^HELD_", "^OBJ_FLAG_", "^RESPAWN_INFO_", "^OBJ_MOVE_" ], } pretend_find = [ diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index b9769e9e..bf4999ec 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -3892,6 +3892,15 @@ ATTACK_HANDLER_SQUISHED = 3 --- @type integer ATTACK_HANDLER_SQUISHED_WITH_BLUE_COIN = 8 +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR = 2 + +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT = 1 + +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT = 0 + --- @type integer ACTIVE_FLAG_ACTIVE = (1 << 0) @@ -3988,6 +3997,666 @@ ACTIVE_PARTICLE_WATER_SPLASH = (1 << 6) --- @type integer ACTIVE_PARTICLE_WAVE_TRAIL = (1 << 10) +--- @type integer +AMP_ACT_ATTACK_COOLDOWN = 4 + +--- @type integer +AMP_ACT_IDLE = 2 + +--- @type integer +AMP_BP_ROT_RADIUS_0 = 3 + +--- @type integer +AMP_BP_ROT_RADIUS_200 = 0 + +--- @type integer +AMP_BP_ROT_RADIUS_300 = 1 + +--- @type integer +AMP_BP_ROT_RADIUS_400 = 2 + +--- @type integer +ARROW_LIFT_ACT_IDLE = 0 + +--- @type integer +ARROW_LIFT_ACT_MOVING_AWAY = 1 + +--- @type integer +ARROW_LIFT_ACT_MOVING_BACK = 2 + +--- @type integer +ARROW_LIFT_DONE_MOVING = 1 + +--- @type integer +ARROW_LIFT_NOT_DONE_MOVING = 0 + +--- @type integer +BBALL_ACT_INITIALIZE = 0 + +--- @type integer +BBALL_ACT_ROLL = 1 + +--- @type integer +BBALL_BP_STYPE_BOB_LOWER = 2 + +--- @type integer +BBALL_BP_STYPE_BOB_UPPER = 0 + +--- @type integer +BBALL_BP_STYPE_THI_LARGE = 3 + +--- @type integer +BBALL_BP_STYPE_THI_SMALL = 4 + +--- @type integer +BBALL_BP_STYPE_TTM = 1 + +--- @type integer +BBH_DYNAMIC_SURFACE_ROOM = 0 + +--- @type integer +BBH_NEAR_MERRY_GO_ROUND_ROOM = 10 + +--- @type integer +BBH_OUTSIDE_ROOM = 13 + +--- @type integer +BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF = 1 + +--- @type integer +BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON = 0 + +--- @type integer +BETA_BOO_KEY_ACT_DROPPED = 2 + +--- @type integer +BETA_BOO_KEY_ACT_DROPPING = 1 + +--- @type integer +BETA_BOO_KEY_ACT_IN_BOO = 0 + +--- @type integer +BETA_CHEST_ACT_IDLE_CLOSED = 0 + +--- @type integer +BETA_CHEST_ACT_IDLE_OPEN = 2 + +--- @type integer +BETA_CHEST_ACT_OPENING = 1 + +--- @type integer +BIRD_ACT_FLY = 1 + +--- @type integer +BIRD_ACT_INACTIVE = 0 + +--- @type integer +BIRD_BP_SPAWNED = 0 + +--- @type integer +BIRD_BP_SPAWNER = 1 + +--- @type integer +BLUE_COIN_SWITCH_ACT_IDLE = 0 + +--- @type integer +BLUE_COIN_SWITCH_ACT_RECEDING = 1 + +--- @type integer +BLUE_COIN_SWITCH_ACT_TICKING = 2 + +--- @type integer +BLUE_FISH_ACT_ASCEND = 2 + +--- @type integer +BLUE_FISH_ACT_DIVE = 0 + +--- @type integer +BLUE_FISH_ACT_DUPLICATE = 2 + +--- @type integer +BLUE_FISH_ACT_ROOM = 1 + +--- @type integer +BLUE_FISH_ACT_SPAWN = 0 + +--- @type integer +BLUE_FISH_ACT_TURN = 1 + +--- @type integer +BLUE_FISH_ACT_TURN_BACK = 3 + +--- @type integer +BOBOMB_ACT_CHASE_MARIO = 2 + +--- @type integer +BOBOMB_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +BOBOMB_ACT_EXPLODE = 3 + +--- @type integer +BOBOMB_ACT_LAUNCHED = 1 + +--- @type integer +BOBOMB_ACT_LAVA_DEATH = 100 + +--- @type integer +BOBOMB_ACT_PATROL = 0 + +--- @type integer +BOBOMB_BP_STYPE_GENERIC = 0 + +--- @type integer +BOBOMB_BP_STYPE_STATIONARY = 1 + +--- @type integer +BOBOMB_BUDDY_ACT_IDLE = 0 + +--- @type integer +BOBOMB_BUDDY_ACT_TALK = 3 + +--- @type integer +BOBOMB_BUDDY_ACT_TURN_TO_TALK = 2 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB = 2 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_GRASS = 3 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB = 1 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_GENERIC = 0 + +--- @type integer +BOBOMB_BUDDY_CANNON_OPENED = 2 + +--- @type integer +BOBOMB_BUDDY_CANNON_OPENING = 1 + +--- @type integer +BOBOMB_BUDDY_CANNON_STOP_TALKING = 3 + +--- @type integer +BOBOMB_BUDDY_CANNON_UNOPENED = 0 + +--- @type integer +BOBOMB_BUDDY_HAS_NOT_TALKED = 0 + +--- @type integer +BOBOMB_BUDDY_HAS_TALKED = 2 + +--- @type integer +BOBOMB_BUDDY_ROLE_ADVICE = 0 + +--- @type integer +BOBOMB_BUDDY_ROLE_CANNON = 1 + +--- @type integer +BOMP_ACT_EXTEND = 2 + +--- @type integer +BOMP_ACT_POKE_OUT = 1 + +--- @type integer +BOMP_ACT_RETRACT = 3 + +--- @type integer +BOMP_ACT_WAIT = 0 + +--- @type integer +BOO_ATTACKED = 1 + +--- @type integer +BOO_BOUNCED_ON = -1 + +--- @type integer +BOO_CAGE_ACT_FALLING = 1 + +--- @type integer +BOO_CAGE_ACT_IN_BOO = 0 + +--- @type integer +BOO_CAGE_ACT_MARIO_JUMPING_IN = 3 + +--- @type integer +BOO_CAGE_ACT_ON_GROUND = 2 + +--- @type integer +BOO_CAGE_ACT_USELESS = 4 + +--- @type integer +BOO_DEATH_STATUS_ALIVE = 0 + +--- @type integer +BOO_DEATH_STATUS_DEAD = 2 + +--- @type integer +BOO_DEATH_STATUS_DYING = 1 + +--- @type integer +BOO_NOT_ATTACKED = 0 + +--- @type integer +BOWSER_PUZZLE_ACT_DONE = 2 + +--- @type integer +BOWSER_PUZZLE_ACT_SPAWN_PIECES = 0 + +--- @type integer +BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE = 1 + +--- @type integer +BULLY_ACT_ACTIVATE_AND_FALL = 5 + +--- @type integer +BULLY_ACT_BACK_UP = 3 + +--- @type integer +BULLY_ACT_CHASE_MARIO = 1 + +--- @type integer +BULLY_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +BULLY_ACT_INACTIVE = 4 + +--- @type integer +BULLY_ACT_KNOCKBACK = 2 + +--- @type integer +BULLY_ACT_LAVA_DEATH = 100 + +--- @type integer +BULLY_ACT_PATROL = 0 + +--- @type integer +BULLY_BP_SIZE_BIG = 1 + +--- @type integer +BULLY_BP_SIZE_SMALL = 0 + +--- @type integer +BULLY_STYPE_CHILL = 16 + +--- @type integer +BULLY_STYPE_GENERIC = 0 + +--- @type integer +BULLY_STYPE_MINION = 1 + +--- @type integer +BUTTERFLY_ACT_FOLLOW_MARIO = 1 + +--- @type integer +BUTTERFLY_ACT_RESTING = 0 + +--- @type integer +BUTTERFLY_ACT_RETURN_HOME = 2 + +--- @type integer +CAMERA_LAKITU_BP_FOLLOW_CAMERA = 0 + +--- @type integer +CAMERA_LAKITU_BP_INTRO = 1 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD = 1 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE = 0 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_UNK2 = 2 + +--- @type integer +CANNON_TRAP_DOOR_ACT_CAM_ZOOM = 1 + +--- @type integer +CANNON_TRAP_DOOR_ACT_CLOSED = 0 + +--- @type integer +CANNON_TRAP_DOOR_ACT_OPEN = 3 + +--- @type integer +CANNON_TRAP_DOOR_ACT_OPENING = 2 + +--- @type integer +CELEB_STAR_ACT_FACE_CAMERA = 1 + +--- @type integer +CELEB_STAR_ACT_SPIN_AROUND_MARIO = 0 + +--- @type integer +CHAIN_CHOMP_ACT_MOVE = 1 + +--- @type integer +CHAIN_CHOMP_ACT_UNINITIALIZED = 0 + +--- @type integer +CHAIN_CHOMP_ACT_UNLOAD_CHAIN = 2 + +--- @type integer +CHAIN_CHOMP_CHAIN_PART_BP_PIVOT = 0 + +--- @type integer +CHAIN_CHOMP_NOT_RELEASED = 0 + +--- @type integer +CHAIN_CHOMP_RELEASED_BREAK_GATE = 3 + +--- @type integer +CHAIN_CHOMP_RELEASED_END_CUTSCENE = 5 + +--- @type integer +CHAIN_CHOMP_RELEASED_JUMP_AWAY = 4 + +--- @type integer +CHAIN_CHOMP_RELEASED_LUNGE_AROUND = 2 + +--- @type integer +CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE = 1 + +--- @type integer +CHAIN_CHOMP_SUB_ACT_LUNGE = 1 + +--- @type integer +CHAIN_CHOMP_SUB_ACT_TURN = 0 + +--- @type integer +CLOUD_ACT_FWOOSH_HIDDEN = 3 + +--- @type integer +CLOUD_ACT_MAIN = 1 + +--- @type integer +CLOUD_ACT_SPAWN_PARTS = 0 + +--- @type integer +CLOUD_ACT_UNLOAD = 2 + +--- @type integer +CLOUD_BP_FWOOSH = 0 + +--- @type integer +CLOUD_BP_LAKITU_CLOUD = 1 + +--- @type integer +COFFIN_ACT_IDLE = 0 + +--- @type integer +COFFIN_ACT_STAND_UP = 1 + +--- @type integer +COFFIN_BP_STATIC = 0 + +--- @type integer +COFFIN_SPAWNER_ACT_COFFINS_UNLOADED = 0 + +--- @type integer +DIALOG_UNK1_AWAIT_DIALOG = 3 + +--- @type integer +DIALOG_UNK1_BEGIN_DIALOG = 2 + +--- @type integer +DIALOG_UNK1_DISABLE_TIME_STOP = 4 + +--- @type integer +DIALOG_UNK1_ENABLE_TIME_STOP = 0 + +--- @type integer +DIALOG_UNK1_FLAG_4 = (1 << 4) + +--- @type integer +DIALOG_UNK1_FLAG_DEFAULT = (1 << 1) + +--- @type integer +DIALOG_UNK1_FLAG_RESPONSE = (1 << 2) + +--- @type integer +DIALOG_UNK1_INTERRUPT_MARIO_ACTION = 1 + +--- @type integer +DIALOG_UNK2_AWAIT_DIALOG = 2 + +--- @type integer +DIALOG_UNK2_ENABLE_TIME_STOP = 0 + +--- @type integer +DIALOG_UNK2_END_DIALOG = 3 + +--- @type integer +DIALOG_UNK2_FLAG_0 = (1 << 0) + +--- @type integer +DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED = (1 << 4) + +--- @type integer +DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION = 1 + +--- @type integer +DORRIE_ACT_LOWER_HEAD = 1 + +--- @type integer +DORRIE_ACT_MOVE = 0 + +--- @type integer +DORRIE_ACT_RAISE_HEAD = 2 + +--- @type integer +ENEMY_LAKITU_ACT_MAIN = 1 + +--- @type integer +ENEMY_LAKITU_ACT_UNINITIALIZED = 0 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_HOLD_SPINY = 1 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_NO_SPINY = 0 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_THROW_SPINY = 2 + +--- @type integer +EYEROK_BOSS_ACT_DEAD = 5 + +--- @type integer +EYEROK_BOSS_ACT_DIE = 4 + +--- @type integer +EYEROK_BOSS_ACT_FIGHT = 3 + +--- @type integer +EYEROK_BOSS_ACT_PAUSE = 6 + +--- @type integer +EYEROK_BOSS_ACT_SHOW_INTRO_TEXT = 2 + +--- @type integer +EYEROK_BOSS_ACT_SLEEP = 0 + +--- @type integer +EYEROK_BOSS_ACT_WAKE_UP = 1 + +--- @type integer +EYEROK_HAND_ACT_ATTACKED = 12 + +--- @type integer +EYEROK_HAND_ACT_BECOME_ACTIVE = 14 + +--- @type integer +EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND = 10 + +--- @type integer +EYEROK_HAND_ACT_CLOSE = 4 + +--- @type integer +EYEROK_HAND_ACT_DEAD = 16 + +--- @type integer +EYEROK_HAND_ACT_DIE = 15 + +--- @type integer +EYEROK_HAND_ACT_DOUBLE_POUND = 11 + +--- @type integer +EYEROK_HAND_ACT_FIST_PUSH = 8 + +--- @type integer +EYEROK_HAND_ACT_FIST_SWEEP = 9 + +--- @type integer +EYEROK_HAND_ACT_IDLE = 1 + +--- @type integer +EYEROK_HAND_ACT_OPEN = 2 + +--- @type integer +EYEROK_HAND_ACT_PAUSE = 17 + +--- @type integer +EYEROK_HAND_ACT_RECOVER = 13 + +--- @type integer +EYEROK_HAND_ACT_RETREAT = 5 + +--- @type integer +EYEROK_HAND_ACT_SHOW_EYE = 3 + +--- @type integer +EYEROK_HAND_ACT_SLEEP = 0 + +--- @type integer +EYEROK_HAND_ACT_SMASH = 7 + +--- @type integer +EYEROK_HAND_ACT_TARGET_MARIO = 6 + +--- @type integer +FAKE_MONEYBAG_COIN_ACT_IDLE = 0 + +--- @type integer +FAKE_MONEYBAG_COIN_ACT_TRANSFORM = 1 + +--- @type integer +FALLING_PILLAR_ACT_FALLING = 2 + +--- @type integer +FALLING_PILLAR_ACT_IDLE = 0 + +--- @type integer +FALLING_PILLAR_ACT_TURNING = 1 + +--- @type integer +FIRE_PIRANHA_PLANT_ACT_GROW = 1 + +--- @type integer +FIRE_PIRANHA_PLANT_ACT_HIDE = 0 + +--- @type integer +FIRE_SPITTER_ACT_IDLE = 0 + +--- @type integer +FIRE_SPITTER_ACT_SPIT_FIRE = 1 + +--- @type integer +FISH_ACT_FLEE = 2 + +--- @type integer +FISH_ACT_INIT = 0 + +--- @type integer +FISH_ACT_ROAM = 1 + +--- @type integer +FISH_SPAWNER_ACT_IDLE = 1 + +--- @type integer +FISH_SPAWNER_ACT_RESPAWN = 2 + +--- @type integer +FISH_SPAWNER_ACT_SPAWN = 0 + +--- @type integer +FISH_SPAWNER_BP_FEW_BLUE = 1 + +--- @type integer +FISH_SPAWNER_BP_FEW_CYAN = 3 + +--- @type integer +FISH_SPAWNER_BP_MANY_BLUE = 0 + +--- @type integer +FISH_SPAWNER_BP_MANY_CYAN = 2 + +--- @type integer +FLY_GUY_ACT_APPROACH_MARIO = 1 + +--- @type integer +FLY_GUY_ACT_IDLE = 0 + +--- @type integer +FLY_GUY_ACT_LUNGE = 2 + +--- @type integer +FLY_GUY_ACT_SHOOT_FIRE = 3 + +--- @type integer +FREE_BBALL_ACT_IDLE = 0 + +--- @type integer +FREE_BBALL_ACT_RESET = 2 + +--- @type integer +FREE_BBALL_ACT_ROLL = 1 + +--- @type integer +GOOMBA_ACT_ATTACKED_MARIO = 1 + +--- @type integer +GOOMBA_ACT_JUMP = 2 + +--- @type integer +GOOMBA_ACT_WALK = 0 + +--- @type integer +GOOMBA_BP_SIZE_MASK = 0x00000003 + +--- @type integer +GOOMBA_BP_TRIPLET_FLAG_MASK = 0x000000FC + +--- @type integer +GOOMBA_SIZE_HUGE = 1 + +--- @type integer +GOOMBA_SIZE_REGULAR = 0 + +--- @type integer +GOOMBA_SIZE_TINY = 2 + +--- @type integer +GOOMBA_TRIPLET_SPAWNER_ACT_LOADED = 1 + +--- @type integer +GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED = 0 + +--- @type integer +GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK = 0x000000FC + +--- @type integer +GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK = 0x00000003 + +--- @type integer +HAUNTED_BOOKSHELF_ACT_IDLE = 0 + +--- @type integer +HAUNTED_BOOKSHELF_ACT_RECEDE = 1 + --- @type integer HELD_DROPPED = 3 @@ -4000,6 +4669,351 @@ HELD_HELD = 1 --- @type integer HELD_THROWN = 2 +--- @type integer +HIDDEN_BLUE_COIN_ACT_ACTIVE = 2 + +--- @type integer +HIDDEN_BLUE_COIN_ACT_INACTIVE = 0 + +--- @type integer +HIDDEN_BLUE_COIN_ACT_WAITING = 1 + +--- @type integer +HOMING_AMP_ACT_APPEAR = 1 + +--- @type integer +HOMING_AMP_ACT_ATTACK_COOLDOWN = 4 + +--- @type integer +HOMING_AMP_ACT_CHASE = 2 + +--- @type integer +HOMING_AMP_ACT_GIVE_UP = 3 + +--- @type integer +HOMING_AMP_ACT_INACTIVE = 0 + +--- @type integer +HOOT_ACT_ASCENT = 0 + +--- @type integer +HOOT_ACT_CARRY = 1 + +--- @type integer +HOOT_ACT_TIRED = 2 + +--- @type integer +HOOT_AVAIL_ASLEEP_IN_TREE = 0 + +--- @type integer +HOOT_AVAIL_READY_TO_FLY = 2 + +--- @type integer +HOOT_AVAIL_WANTS_TO_TALK = 1 + +--- @type integer +JS_RING_SPAWNER_ACT_ACTIVE = 0 + +--- @type integer +JS_RING_SPAWNER_ACT_INACTIVE = 1 + +--- @type integer +KLEPTO_ACT_APPROACH_TARGET_HOLDING = 1 + +--- @type integer +KLEPTO_ACT_CIRCLE_TARGET_HOLDING = 0 + +--- @type integer +KLEPTO_ACT_DIVE_AT_MARIO = 4 + +--- @type integer +KLEPTO_ACT_RESET_POSITION = 5 + +--- @type integer +KLEPTO_ACT_RETREAT = 7 + +--- @type integer +KLEPTO_ACT_STRUCK_BY_MARIO = 6 + +--- @type integer +KLEPTO_ACT_TURN_TOWARD_MARIO = 3 + +--- @type integer +KLEPTO_ACT_WAIT_FOR_MARIO = 2 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_CAP = 1 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_NOTHING = 0 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_STAR = 2 + +--- @type integer +KOOPA_BP_KOOPA_THE_QUICK_BASE = 2 + +--- @type integer +KOOPA_BP_KOOPA_THE_QUICK_BOB = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_BOB_INDEX) + +--- @type integer +KOOPA_BP_KOOPA_THE_QUICK_THI = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_THI_INDEX) + +--- @type integer +KOOPA_BP_NORMAL = 1 + +--- @type integer +KOOPA_BP_TINY = 4 + +--- @type integer +KOOPA_BP_UNSHELLED = 0 + +--- @type integer +KOOPA_SHELLED_ACT_DIE = 4 + +--- @type integer +KOOPA_SHELLED_ACT_LYING = 3 + +--- @type integer +KOOPA_SHELLED_ACT_RUN_FROM_MARIO = 2 + +--- @type integer +KOOPA_SHELLED_ACT_STOPPED = 0 + +--- @type integer +KOOPA_SHELLED_ACT_WALK = 1 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_START_WALK = 0 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_STOP_WALK = 2 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_WALK = 1 + +--- @type integer +KOOPA_THE_QUICK_ACT_AFTER_RACE = 6 + +--- @type integer +KOOPA_THE_QUICK_ACT_DECELERATE = 4 + +--- @type integer +KOOPA_THE_QUICK_ACT_RACE = 3 + +--- @type integer +KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT = 2 + +--- @type integer +KOOPA_THE_QUICK_ACT_STOP = 5 + +--- @type integer +KOOPA_THE_QUICK_ACT_UNUSED1 = 1 + +--- @type integer +KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE = 0 + +--- @type integer +KOOPA_THE_QUICK_BOB_INDEX = 0 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_JUMP = 2 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_RUN = 1 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_START_RUN = 0 + +--- @type integer +KOOPA_THE_QUICK_THI_INDEX = 1 + +--- @type integer +KOOPA_UNSHELLED_ACT_DIVE = 1 + +--- @type integer +KOOPA_UNSHELLED_ACT_LYING = 2 + +--- @type integer +KOOPA_UNSHELLED_ACT_RUN = 0 + +--- @type integer +KOOPA_UNSHELLED_ACT_UNUSED3 = 3 + +--- @type integer +LLL_DRAWBRIDGE_ACT_LOWER = 0 + +--- @type integer +LLL_DRAWBRIDGE_ACT_RAISE = 1 + +--- @type integer +MAD_PIANO_ACT_ATTACK = 1 + +--- @type integer +MAD_PIANO_ACT_WAIT = 0 + +--- @type integer +MANTA_ACT_NO_RINGS = 1 + +--- @type integer +MANTA_ACT_SPAWN_RINGS = 0 + +--- @type integer +MIPS_ACT_FALL_DOWN = 3 + +--- @type integer +MIPS_ACT_FOLLOW_PATH = 1 + +--- @type integer +MIPS_ACT_IDLE = 4 + +--- @type integer +MIPS_ACT_WAIT_FOR_ANIMATION_DONE = 2 + +--- @type integer +MIPS_ACT_WAIT_FOR_NEARBY_MARIO = 0 + +--- @type integer +MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR = 2 + +--- @type integer +MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR = 0 + +--- @type integer +MIPS_STAR_STATUS_SHOULD_SPAWN_STAR = 1 + +--- @type integer +MONEYBAG_ACT_APPEAR = 0 + +--- @type integer +MONEYBAG_ACT_DEATH = 5 + +--- @type integer +MONEYBAG_ACT_DISAPPEAR = 4 + +--- @type integer +MONEYBAG_ACT_MOVE_AROUND = 2 + +--- @type integer +MONEYBAG_ACT_RETURN_HOME = 3 + +--- @type integer +MONEYBAG_ACT_UNUSED_APPEAR = 1 + +--- @type integer +MONEYBAG_JUMP_JUMP = 2 + +--- @type integer +MONEYBAG_JUMP_JUMP_AND_BOUNCE = 3 + +--- @type integer +MONEYBAG_JUMP_LANDING = 0 + +--- @type integer +MONEYBAG_JUMP_PREPARE = 1 + +--- @type integer +MONEYBAG_JUMP_WALK_AROUND = 4 + +--- @type integer +MONEYBAG_JUMP_WALK_HOME = 5 + +--- @type integer +MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE = 3 + +--- @type integer +MONTY_MOLE_ACT_HIDE = 6 + +--- @type integer +MONTY_MOLE_ACT_JUMP_INTO_HOLE = 5 + +--- @type integer +MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE = 7 + +--- @type integer +MONTY_MOLE_ACT_RISE_FROM_HOLE = 1 + +--- @type integer +MONTY_MOLE_ACT_SELECT_HOLE = 0 + +--- @type integer +MONTY_MOLE_ACT_SPAWN_ROCK = 2 + +--- @type integer +MONTY_MOLE_ACT_THROW_ROCK = 4 + +--- @type integer +MONTY_MOLE_BP_NO_ROCK = 0 + +--- @type integer +MONTY_MOLE_ROCK_ACT_HELD = 0 + +--- @type integer +MONTY_MOLE_ROCK_ACT_MOVE = 1 + +--- @type integer +MOV_BCOIN_ACT_MOVING = 1 + +--- @type integer +MOV_BCOIN_ACT_STILL = 0 + +--- @type integer +MOV_YCOIN_ACT_BLINKING = 1 + +--- @type integer +MOV_YCOIN_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +MOV_YCOIN_ACT_IDLE = 0 + +--- @type integer +MOV_YCOIN_ACT_LAVA_DEATH = 100 + +--- @type integer +MR_BLIZZARD_ACT_BURROW = 5 + +--- @type integer +MR_BLIZZARD_ACT_DEATH = 6 + +--- @type integer +MR_BLIZZARD_ACT_HIDE_UNHIDE = 1 + +--- @type integer +MR_BLIZZARD_ACT_JUMP = 7 + +--- @type integer +MR_BLIZZARD_ACT_RISE_FROM_GROUND = 2 + +--- @type integer +MR_BLIZZARD_ACT_ROTATE = 3 + +--- @type integer +MR_BLIZZARD_ACT_SPAWN_SNOWBALL = 0 + +--- @type integer +MR_BLIZZARD_ACT_THROW_SNOWBALL = 4 + +--- @type integer +MR_BLIZZARD_STYPE_JUMPING = 1 + +--- @type integer +MR_BLIZZARD_STYPE_NO_CAP = 0 + +--- @type integer +OBJ_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +OBJ_ACT_HORIZONTAL_KNOCKBACK = 100 + +--- @type integer +OBJ_ACT_LAVA_DEATH = 100 + +--- @type integer +OBJ_ACT_SQUISHED = 102 + +--- @type integer +OBJ_ACT_VERTICAL_KNOCKBACK = 101 + --- @type integer OBJ_FLAG_0020 = (1 << 5) @@ -4102,6 +5116,180 @@ OBJ_MOVE_UNDERWATER_OFF_GROUND = (1 << 5) --- @type integer OBJ_MOVE_UNDERWATER_ON_GROUND = (1 << 6) +--- @type integer +PENGUIN_ANIM_IDLE = 3 + +--- @type integer +PENGUIN_ANIM_WALK = 0 + +--- @type integer +PENGUIN_WALK_BABY = 0 + +--- @type integer +PENGUIN_WALK_BIG = 1 + +--- @type integer +PIRANHA_PLANT_ACT_ATTACKED = 5 + +--- @type integer +PIRANHA_PLANT_ACT_BITING = 2 + +--- @type integer +PIRANHA_PLANT_ACT_IDLE = 0 + +--- @type integer +PIRANHA_PLANT_ACT_RESPAWN = 8 + +--- @type integer +PIRANHA_PLANT_ACT_SHRINK_AND_DIE = 6 + +--- @type integer +PIRANHA_PLANT_ACT_SLEEPING = 1 + +--- @type integer +PIRANHA_PLANT_ACT_STOPPED_BITING = 4 + +--- @type integer +PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN = 7 + +--- @type integer +PIRANHA_PLANT_ACT_WOKEN_UP = 3 + +--- @type integer +PIRANHA_PLANT_BUBBLE_ACT_BURST = 2 + +--- @type integer +PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP = 1 + +--- @type integer +PIRANHA_PLANT_BUBBLE_ACT_IDLE = 0 + +--- @type integer +PLATFORM_ON_TRACK_ACT_FALL = 4 + +--- @type integer +PLATFORM_ON_TRACK_ACT_INIT = 0 + +--- @type integer +PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK = 2 + +--- @type integer +PLATFORM_ON_TRACK_ACT_PAUSE_BRIEFLY = 3 + +--- @type integer +PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO = 1 + +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR = (1 << 9) + +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL = (1 << 11) + +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_TURN_YAW = (1 << 10) + +--- @type integer +PLATFORM_ON_TRACK_BP_MASK_PATH = 0xF + +--- @type integer +PLATFORM_ON_TRACK_BP_MASK_TYPE = (0x7 << 4) + +--- @type integer +PLATFORM_ON_TRACK_BP_RETURN_TO_START = (1 << 8) + +--- @type integer +PLATFORM_ON_TRACK_TYPE_CARPET = 0 + +--- @type integer +PLATFORM_ON_TRACK_TYPE_CHECKERED = 2 + +--- @type integer +PLATFORM_ON_TRACK_TYPE_GRATE = 3 + +--- @type integer +PLATFORM_ON_TRACK_TYPE_SKI_LIFT = 1 + +--- @type integer +POKEY_ACT_UNINITIALIZED = 0 + +--- @type integer +POKEY_ACT_UNLOAD_PARTS = 2 + +--- @type integer +POKEY_ACT_WANDER = 1 + +--- @type integer +PURPLE_SWITCH_IDLE = 0 + +--- @type integer +PURPLE_SWITCH_PRESSED = 1 + +--- @type integer +PURPLE_SWITCH_TICKING = 2 + +--- @type integer +PURPLE_SWITCH_UNPRESSED = 3 + +--- @type integer +PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF = 4 + +--- @type integer +PYRAMID_ELEVATOR_AT_BOTTOM = 4 + +--- @type integer +PYRAMID_ELEVATOR_CONSTANT_VELOCITY = 2 + +--- @type integer +PYRAMID_ELEVATOR_END_MOVING = 3 + +--- @type integer +PYRAMID_ELEVATOR_IDLE = 0 + +--- @type integer +PYRAMID_ELEVATOR_START_MOVING = 1 + +--- @type integer +PYRAMID_TOP_ACT_CHECK_IF_SOLVED = 0 + +--- @type integer +PYRAMID_TOP_ACT_EXPLODE = 2 + +--- @type integer +PYRAMID_TOP_ACT_SPINNING = 1 + +--- @type integer +PYRAMID_WALL_ACT_MOVING_DOWN = 0 + +--- @type integer +PYRAMID_WALL_ACT_MOVING_UP = 1 + +--- @type integer +PYRAMID_WALL_BP_POSITION_HIGH = 0 + +--- @type integer +PYRAMID_WALL_BP_POSITION_LOW = 2 + +--- @type integer +PYRAMID_WALL_BP_POSITION_MIDDLE = 1 + +--- @type integer +RACING_PENGUIN_ACT_FINISH_RACE = 4 + +--- @type integer +RACING_PENGUIN_ACT_PREPARE_FOR_RACE = 2 + +--- @type integer +RACING_PENGUIN_ACT_RACE = 3 + +--- @type integer +RACING_PENGUIN_ACT_SHOW_FINAL_TEXT = 5 + +--- @type integer +RACING_PENGUIN_ACT_SHOW_INIT_TEXT = 1 + +--- @type integer +RACING_PENGUIN_ACT_WAIT_FOR_MARIO = 0 + --- @type integer RESPAWN_INFO_DONT_RESPAWN = 0xFF @@ -4114,6 +5302,417 @@ RESPAWN_INFO_TYPE_32 = 1 --- @type integer RESPAWN_INFO_TYPE_NULL = 0 +--- @type integer +SKEETER_ACT_IDLE = 0 + +--- @type integer +SKEETER_ACT_LUNGE = 1 + +--- @type integer +SKEETER_ACT_WALK = 2 + +--- @type integer +SL_SNOWMAN_WIND_ACT_BLOWING = 2 + +--- @type integer +SL_SNOWMAN_WIND_ACT_IDLE = 0 + +--- @type integer +SL_SNOWMAN_WIND_ACT_TALKING = 1 + +--- @type integer +SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS = 0 + +--- @type integer +SL_WALKING_PENGUIN_ACT_RETURNING = 2 + +--- @type integer +SL_WALKING_PENGUIN_ACT_TURNING_BACK = 1 + +--- @type integer +SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS = 3 + +--- @type integer +SNUFIT_ACT_IDLE = 0 + +--- @type integer +SNUFIT_ACT_SHOOT = 1 + +--- @type integer +SPINY_ACT_ATTACKED_MARIO = 3 + +--- @type integer +SPINY_ACT_HELD_BY_LAKITU = 1 + +--- @type integer +SPINY_ACT_THROWN_BY_LAKITU = 2 + +--- @type integer +SPINY_ACT_WALK = 0 + +--- @type integer +SWOOP_ACT_IDLE = 0 + +--- @type integer +SWOOP_ACT_MOVE = 1 + +--- @type integer +TRIPLET_BUTTERFLY_ACT_ACTIVATE = 2 + +--- @type integer +TRIPLET_BUTTERFLY_ACT_EXPLODE = 3 + +--- @type integer +TRIPLET_BUTTERFLY_ACT_INIT = 0 + +--- @type integer +TRIPLET_BUTTERFLY_ACT_WANDER = 1 + +--- @type integer +TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM = 0x00000003 + +--- @type integer +TRIPLET_BUTTERFLY_BP_NO_BOMBS = 0x00000004 + +--- @type integer +TRIPLET_BUTTERFLY_TYPE_EXPLODES = 0 + +--- @type integer +TRIPLET_BUTTERFLY_TYPE_NORMAL = -1 + +--- @type integer +TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP = 1 + +--- @type integer +TTC_2D_ROTATOR_BP_2D_COG = 1 + +--- @type integer +TTC_2D_ROTATOR_BP_HAND = 0 + +--- @type integer +TTC_COG_BP_DIR_CCW = (0 << 0) + +--- @type integer +TTC_COG_BP_DIR_CW = (1 << 0) + +--- @type integer +TTC_COG_BP_DIR_MASK = 0x00000001 + +--- @type integer +TTC_COG_BP_SHAPE_HEXAGON = (0 << 1) + +--- @type integer +TTC_COG_BP_SHAPE_MASK = 0x00000002 + +--- @type integer +TTC_COG_BP_SHAPE_TRIANGLE = (1 << 1) + +--- @type integer +TTC_MOVING_BAR_ACT_EXTEND = 2 + +--- @type integer +TTC_MOVING_BAR_ACT_PULL_BACK = 1 + +--- @type integer +TTC_MOVING_BAR_ACT_RETRACT = 3 + +--- @type integer +TTC_MOVING_BAR_ACT_WAIT = 0 + +--- @type integer +TTC_ROTATING_SOLID_BP_CUBE = 0 + +--- @type integer +TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM = 1 + +--- @type integer +TTC_SPEED_FAST = 1 + +--- @type integer +TTC_SPEED_RANDOM = 2 + +--- @type integer +TTC_SPEED_SLOW = 0 + +--- @type integer +TTC_SPEED_STOPPED = 3 + +--- @type integer +TWEESTER_ACT_CHASE = 1 + +--- @type integer +TWEESTER_ACT_HIDE = 2 + +--- @type integer +TWEESTER_ACT_IDLE = 0 + +--- @type integer +TWEESTER_SUB_ACT_CHASE = 0 + +--- @type integer +TWEESTER_SUB_ACT_WAIT = 0 + +--- @type integer +UKIKI_ACT_GO_TO_CAGE = 4 + +--- @type integer +UKIKI_ACT_IDLE = 0 + +--- @type integer +UKIKI_ACT_JUMP = 3 + +--- @type integer +UKIKI_ACT_RETURN_HOME = 7 + +--- @type integer +UKIKI_ACT_RUN = 1 + +--- @type integer +UKIKI_ACT_TURN_TO_MARIO = 2 + +--- @type integer +UKIKI_ACT_UNUSED_TURN = 6 + +--- @type integer +UKIKI_ACT_WAIT_TO_RESPAWN = 5 + +--- @type integer +UKIKI_ANIM_HANDSTAND = 10 + +--- @type integer +UKIKI_ANIM_HELD = 12 + +--- @type integer +UKIKI_ANIM_ITCH = 9 + +--- @type integer +UKIKI_ANIM_JUMP = 8 + +--- @type integer +UKIKI_ANIM_JUMP_CLAP = 5 + +--- @type integer +UKIKI_ANIM_LAND = 7 + +--- @type integer +UKIKI_ANIM_RUN = 0 + +--- @type integer +UKIKI_ANIM_SCREECH = 4 + +--- @type integer +UKIKI_ANIM_STATE_CAP_ON = 2 + +--- @type integer +UKIKI_ANIM_STATE_DEFAULT = 0 + +--- @type integer +UKIKI_ANIM_STATE_EYE_CLOSED = 1 + +--- @type integer +UKIKI_ANIM_TURN = 11 + +--- @type integer +UKIKI_ANIM_UNUSED_APOSE = 2 + +--- @type integer +UKIKI_ANIM_UNUSED_DEATH = 3 + +--- @type integer +UKIKI_ANIM_UNUSED_HOP = 6 + +--- @type integer +UKIKI_ANIM_UNUSED_WALK = 1 + +--- @type integer +UKIKI_CAGE = 0 + +--- @type integer +UKIKI_CAGE_ACT_FALL = 2 + +--- @type integer +UKIKI_CAGE_ACT_HIDE = 3 + +--- @type integer +UKIKI_CAGE_ACT_SPIN = 1 + +--- @type integer +UKIKI_CAGE_ACT_WAIT_FOR_UKIKI = 0 + +--- @type integer +UKIKI_CAGE_STAR_ACT_IN_CAGE = 0 + +--- @type integer +UKIKI_CAGE_STAR_ACT_SPAWN_STAR = 1 + +--- @type integer +UKIKI_CAP = 1 + +--- @type integer +UKIKI_CAP_ON = 1 + +--- @type integer +UKIKI_SUB_ACT_CAGE_DESPAWN = 7 + +--- @type integer +UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE = 4 + +--- @type integer +UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE = 5 + +--- @type integer +UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE = 0 + +--- @type integer +UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE = 6 + +--- @type integer +UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO = 2 + +--- @type integer +UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE = 3 + +--- @type integer +UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO = 1 + +--- @type integer +UKIKI_SUB_ACT_TAUNT_HANDSTAND = 4 + +--- @type integer +UKIKI_SUB_ACT_TAUNT_ITCH = 1 + +--- @type integer +UKIKI_SUB_ACT_TAUNT_JUMP_CLAP = 3 + +--- @type integer +UKIKI_SUB_ACT_TAUNT_NONE = 0 + +--- @type integer +UKIKI_SUB_ACT_TAUNT_SCREECH = 2 + +--- @type integer +UKIKI_TEXT_CAGE_TEXTBOX = 1 + +--- @type integer +UKIKI_TEXT_DEFAULT = 0 + +--- @type integer +UKIKI_TEXT_DO_NOT_LET_GO = 6 + +--- @type integer +UKIKI_TEXT_GAVE_CAP_BACK = 5 + +--- @type integer +UKIKI_TEXT_GO_TO_CAGE = 2 + +--- @type integer +UKIKI_TEXT_HAS_CAP = 4 + +--- @type integer +UKIKI_TEXT_STEAL_CAP = 7 + +--- @type integer +UKIKI_TEXT_STOLE_CAP = 3 + +--- @type integer +WATER_BOMB_ACT_DROP = 2 + +--- @type integer +WATER_BOMB_ACT_EXPLODE = 3 + +--- @type integer +WATER_BOMB_ACT_INIT = 1 + +--- @type integer +WATER_BOMB_ACT_SHOT_FROM_CANNON = 0 + +--- @type integer +WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL = 2 + +--- @type integer +WATER_LEVEL_DIAMOND_ACT_IDLE = 1 + +--- @type integer +WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING = 3 + +--- @type integer +WATER_LEVEL_DIAMOND_ACT_INIT = 0 + +--- @type integer +WATER_RING_ACT_COLLECTED = 1 + +--- @type integer +WATER_RING_ACT_NOT_COLLECTED = 0 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_EXTEND = 1 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_RETRACT = 2 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_WAIT = 0 + +--- @type integer +WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 = 1 + +--- @type integer +WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 = 2 + +--- @type integer +WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 = 3 + +--- @type integer +WIGGLER_ACT_FALL_THROUGH_FLOOR = 5 + +--- @type integer +WIGGLER_ACT_JUMPED_ON = 3 + +--- @type integer +WIGGLER_ACT_KNOCKBACK = 2 + +--- @type integer +WIGGLER_ACT_SHRINK = 4 + +--- @type integer +WIGGLER_ACT_UNINITIALIZED = 0 + +--- @type integer +WIGGLER_ACT_WALK = 1 + +--- @type integer +WIGGLER_TEXT_STATUS_AWAIT_DIALOG = 0 + +--- @type integer +WIGGLER_TEXT_STATUS_COMPLETED_DIALOG = 2 + +--- @type integer +WIGGLER_TEXT_STATUS_SHOWING_DIALOG = 1 + +--- @type integer +WOODEN_POST_BP_NO_COINS_MASK = 0x0000FF00 + +--- @type integer +YOSHI_ACT_CREDITS = 10 + +--- @type integer +YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN = 4 + +--- @type integer +YOSHI_ACT_GIVE_PRESENT = 5 + +--- @type integer +YOSHI_ACT_IDLE = 0 + +--- @type integer +YOSHI_ACT_TALK = 2 + +--- @type integer +YOSHI_ACT_WALK = 1 + +--- @type integer +YOSHI_ACT_WALK_JUMP_OFF_ROOF = 3 + --- @type integer OBJECT_POOL_CAPACITY = 960 diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index f5eaab5b..56ab13e6 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -7098,6 +7098,15 @@ function hud_show() -- ... end +--- @param name string +--- @param level integer +--- @param area integer +--- @param type integer +--- @return nil +function movtexqc_register(name, level, area, type) + -- ... +end + --- @param index integer --- @param value integer --- @return nil diff --git a/data/dynos.c.h b/data/dynos.c.h index a8a920a4..dab71e8d 100644 --- a/data/dynos.c.h +++ b/data/dynos.c.h @@ -36,10 +36,14 @@ const void* dynos_geolayout_get(const char *name); void dynos_add_collision(const char *modPath, const char* collisionName); Collision* dynos_collision_get(const char* collisionName); +// -- movtexqcs -- // +void dynos_movtexqc_register(const char* name, s16 level, s16 area, s16 type); +struct MovtexQuadCollection* dynos_movtexqc_get_from_id(u32 id); +struct MovtexQuadCollection* dynos_movtexqc_get_from_index(s32 index); + // -- levels -- // void dynos_add_level(s32 modIndex, const char *modPath, const char* levelName); const char* dynos_level_get_token(u32 index); -struct MovtexQuadCollection *dynos_level_get_movtexqc(s32 index); Trajectory* dynos_level_get_trajectory(const char* name); void dynos_level_load_background(void *ptr); diff --git a/data/dynos.cpp.h b/data/dynos.cpp.h index 9fc0a19f..f6bd2b85 100644 --- a/data/dynos.cpp.h +++ b/data/dynos.cpp.h @@ -757,13 +757,14 @@ bool DynOS_Actor_IsCustom(s32 aIndex); // Array> &DynOS_Lvl_GetArray(); -void DynOS_Lvl_Activate(s32 modIndex, const SysPath &aPackFolder, const char *aLevelName); -DataNode *DynOS_Lvl_GetTexture(void *aPtr); +void DynOS_Lvl_Activate(s32 modIndex, const SysPath &aPackFolder, const char *aLevelName); +DataNode* DynOS_Lvl_GetTexture(void *aPtr); +GfxData* DynOS_Lvl_GetActiveGfx(void); const char* DynOS_Lvl_GetToken(u32 index); -DataNode *DynOS_Lvl_GetMovtexQuadCollection(s32 index); +DataNode* DynOS_Lvl_GetMovtexQuadCollection(s32 index); Trajectory* DynOS_Lvl_GetTrajectory(const char* aName); void DynOS_Lvl_LoadBackground(void *aPtr); -void *DynOS_Lvl_Override(void *aCmd); +void* DynOS_Lvl_Override(void *aCmd); // // Col Manager @@ -772,6 +773,14 @@ void *DynOS_Lvl_Override(void *aCmd); void DynOS_Col_Activate(const SysPath &aPackFolder, const char *aCollisionName); Collision* DynOS_Col_Get(const char* collisionName); +// +// Movtexqc Manager +// + +void DynOS_MovtexQC_Register(const char* name, s16 level, s16 area, s16 type); +DataNode* DynOS_MovtexQC_GetFromId(u32 id); +DataNode* DynOS_MovtexQC_GetFromIndex(s32 index); + // // Bin // diff --git a/data/dynos_c.cpp b/data/dynos_c.cpp index a52514b9..d2f6950e 100644 --- a/data/dynos_c.cpp +++ b/data/dynos_c.cpp @@ -102,6 +102,26 @@ Collision* dynos_collision_get(const char* collisionName) { return DynOS_Col_Get(collisionName); } +// -- movtexqcs -- // + +void dynos_movtexqc_register(const char* name, s16 level, s16 area, s16 type) { + DynOS_MovtexQC_Register(name, level, area, type); +} + +struct MovtexQuadCollection* dynos_movtexqc_get_from_id(u32 id) { + DataNode *node = DynOS_MovtexQC_GetFromId(id); + if (node == NULL) { return NULL; } + + return node->mData; +} + +struct MovtexQuadCollection* dynos_movtexqc_get_from_index(s32 index) { + DataNode *node = DynOS_MovtexQC_GetFromIndex(index); + if (node == NULL) { return NULL; } + + return node->mData; +} + // -- levels -- // void dynos_add_level(s32 modIndex, const char *modPath, const char* levelName) { @@ -112,13 +132,6 @@ const char* dynos_level_get_token(u32 index) { return DynOS_Lvl_GetToken(index); } -struct MovtexQuadCollection *dynos_level_get_movtexqc(s32 index) { - DataNode *node = DynOS_Lvl_GetMovtexQuadCollection(index); - if (node == NULL) { return NULL; } - - return node->mData; -} - Trajectory* dynos_level_get_trajectory(const char* name) { return DynOS_Lvl_GetTrajectory(name); } diff --git a/data/dynos_level.cpp b/data/dynos_level.cpp index 80c1450e..359d0a2f 100644 --- a/data/dynos_level.cpp +++ b/data/dynos_level.cpp @@ -831,17 +831,18 @@ static void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFuncti s16 *DynOS_Level_GetWarp(s32 aLevel, s32 aArea, u8 aWarpId) { DynOS_Level_Init(); - s16 *bestWarp = NULL; + //s16 *bestWarp = NULL; for (const auto &_Warp : sDynosLevelWarps[aLevel]) { if (_Warp.mArea == aArea) { if (_Warp.mId == aWarpId) { return (s16 *) &_Warp; } else { - bestWarp = (s16 *) &_Warp; + //bestWarp = (s16 *) &_Warp; } } } - return bestWarp; + //return bestWarp; + return NULL; } s16 *DynOS_Level_GetWarpEntry(s32 aLevel, s32 aArea) { diff --git a/data/dynos_mgr_lvl.cpp b/data/dynos_mgr_lvl.cpp index 01908740..55b8ca05 100644 --- a/data/dynos_mgr_lvl.cpp +++ b/data/dynos_mgr_lvl.cpp @@ -68,7 +68,7 @@ DataNode *DynOS_Lvl_GetTexture(void *aPtr) { return NULL; } -static GfxData* DynOS_Lvl_GetActiveGfx(void) { +GfxData* DynOS_Lvl_GetActiveGfx(void) { for (s32 i = 0; i < sDynosCustomLevelScripts.Count(); ++i) { auto& gfxData = sDynosCustomLevelScripts[i].second; auto& scripts = gfxData->mLevelScripts; @@ -95,22 +95,6 @@ const char* DynOS_Lvl_GetToken(u32 index) { return gfxData->mLuaTokenList[index].begin(); } -DataNode *DynOS_Lvl_GetMovtexQuadCollection(s32 index) { - GfxData* gfxData = DynOS_Lvl_GetActiveGfx(); - if (gfxData == NULL) { - return NULL; - } - - auto &mMovtexQCs = gfxData->mMovtexQCs; - - // Sanity check the index we passed. - if (index < 0 || index >= mMovtexQCs.Count()) { - return NULL; - } - - return mMovtexQCs[index]; -} - Trajectory* DynOS_Lvl_GetTrajectory(const char* aName) { for (auto& script : sDynosCustomLevelScripts) { for (auto& trajectoryNode : script.second->mTrajectories) { diff --git a/data/dynos_mgr_movtexqc.cpp b/data/dynos_mgr_movtexqc.cpp new file mode 100644 index 00000000..3a24eb81 --- /dev/null +++ b/data/dynos_mgr_movtexqc.cpp @@ -0,0 +1,62 @@ +#include "dynos.cpp.h" +extern "C" { +#include "src/game/area.h" +} + +struct RegisteredMovtexQC { + DataNode* dataNode; + s16 level; + s16 area; + s16 type; +}; + +static Array sDynosRegisteredMovtexQCs; + +void DynOS_MovtexQC_Register(const char* name, s16 level, s16 area, s16 type) { + // check for duplicates + for (auto& registered : sDynosRegisteredMovtexQCs) { + if (registered.level == level && registered.area == area && registered.type == type) { return; } + } + + // find it in the levels + for (auto& lvlPair : DynOS_Lvl_GetArray()) { + for (auto& node : lvlPair.second->mMovtexQCs) { + if (node->mName == name) { + // add it + sDynosRegisteredMovtexQCs.Add({ + .dataNode = node, + .level = level, + .area = area, + .type = type + }); + } + } + } +} + +DataNode* DynOS_MovtexQC_GetFromId(u32 id) { + // find the datanode + s16 type = (id & 0xF); + for (auto& registered : sDynosRegisteredMovtexQCs) { + if (registered.level == gCurrLevelNum && registered.area == gCurrAreaIndex && registered.type == type) { + return registered.dataNode; + } + } + return NULL; +} + +DataNode* DynOS_MovtexQC_GetFromIndex(s32 index) { + GfxData* gfxData = DynOS_Lvl_GetActiveGfx(); + if (gfxData == NULL) { + return NULL; + } + + auto &mMovtexQCs = gfxData->mMovtexQCs; + + // Sanity check the index we passed. + if (index < 0 || index >= mMovtexQCs.Count()) { + return NULL; + } + + return mMovtexQCs[index]; +} diff --git a/docs/lua/constants.md b/docs/lua/constants.md index 9b06658b..563d657b 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -1394,6 +1394,9 @@
## [object_constants.h](#object_constants.h) +- ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR +- ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT +- ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT - ACTIVE_FLAG_ACTIVE - ACTIVE_FLAG_DEACTIVATED - ACTIVE_FLAG_DITHERED_ALPHA @@ -1426,10 +1429,345 @@ - ACTIVE_PARTICLE_V_STAR - ACTIVE_PARTICLE_WATER_SPLASH - ACTIVE_PARTICLE_WAVE_TRAIL +- AMP_ACT_ATTACK_COOLDOWN +- AMP_ACT_IDLE +- AMP_BP_ROT_RADIUS_0 +- AMP_BP_ROT_RADIUS_200 +- AMP_BP_ROT_RADIUS_300 +- AMP_BP_ROT_RADIUS_400 +- ARROW_LIFT_ACT_IDLE +- ARROW_LIFT_ACT_MOVING_AWAY +- ARROW_LIFT_ACT_MOVING_BACK +- ARROW_LIFT_DONE_MOVING +- ARROW_LIFT_NOT_DONE_MOVING +- BBALL_ACT_INITIALIZE +- BBALL_ACT_ROLL +- BBALL_BP_STYPE_BOB_LOWER +- BBALL_BP_STYPE_BOB_UPPER +- BBALL_BP_STYPE_THI_LARGE +- BBALL_BP_STYPE_THI_SMALL +- BBALL_BP_STYPE_TTM +- BBH_DYNAMIC_SURFACE_ROOM +- BBH_NEAR_MERRY_GO_ROUND_ROOM +- BBH_OUTSIDE_ROOM +- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF +- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON +- BETA_BOO_KEY_ACT_DROPPED +- BETA_BOO_KEY_ACT_DROPPING +- BETA_BOO_KEY_ACT_IN_BOO +- BETA_CHEST_ACT_IDLE_CLOSED +- BETA_CHEST_ACT_IDLE_OPEN +- BETA_CHEST_ACT_OPENING +- BIRD_ACT_FLY +- BIRD_ACT_INACTIVE +- BIRD_BP_SPAWNED +- BIRD_BP_SPAWNER +- BLUE_COIN_SWITCH_ACT_IDLE +- BLUE_COIN_SWITCH_ACT_RECEDING +- BLUE_COIN_SWITCH_ACT_TICKING +- BLUE_FISH_ACT_ASCEND +- BLUE_FISH_ACT_DIVE +- BLUE_FISH_ACT_DUPLICATE +- BLUE_FISH_ACT_ROOM +- BLUE_FISH_ACT_SPAWN +- BLUE_FISH_ACT_TURN +- BLUE_FISH_ACT_TURN_BACK +- BOBOMB_ACT_CHASE_MARIO +- BOBOMB_ACT_DEATH_PLANE_DEATH +- BOBOMB_ACT_EXPLODE +- BOBOMB_ACT_LAUNCHED +- BOBOMB_ACT_LAVA_DEATH +- BOBOMB_ACT_PATROL +- BOBOMB_BP_STYPE_GENERIC +- BOBOMB_BP_STYPE_STATIONARY +- BOBOMB_BUDDY_ACT_IDLE +- BOBOMB_BUDDY_ACT_TALK +- BOBOMB_BUDDY_ACT_TURN_TO_TALK +- BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB +- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS +- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB +- BOBOMB_BUDDY_BP_STYPE_GENERIC +- BOBOMB_BUDDY_CANNON_OPENED +- BOBOMB_BUDDY_CANNON_OPENING +- BOBOMB_BUDDY_CANNON_STOP_TALKING +- BOBOMB_BUDDY_CANNON_UNOPENED +- BOBOMB_BUDDY_HAS_NOT_TALKED +- BOBOMB_BUDDY_HAS_TALKED +- BOBOMB_BUDDY_ROLE_ADVICE +- BOBOMB_BUDDY_ROLE_CANNON +- BOMP_ACT_EXTEND +- BOMP_ACT_POKE_OUT +- BOMP_ACT_RETRACT +- BOMP_ACT_WAIT +- BOO_ATTACKED +- BOO_BOUNCED_ON +- BOO_CAGE_ACT_FALLING +- BOO_CAGE_ACT_IN_BOO +- BOO_CAGE_ACT_MARIO_JUMPING_IN +- BOO_CAGE_ACT_ON_GROUND +- BOO_CAGE_ACT_USELESS +- BOO_DEATH_STATUS_ALIVE +- BOO_DEATH_STATUS_DEAD +- BOO_DEATH_STATUS_DYING +- BOO_NOT_ATTACKED +- BOWSER_PUZZLE_ACT_DONE +- BOWSER_PUZZLE_ACT_SPAWN_PIECES +- BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE +- BULLY_ACT_ACTIVATE_AND_FALL +- BULLY_ACT_BACK_UP +- BULLY_ACT_CHASE_MARIO +- BULLY_ACT_DEATH_PLANE_DEATH +- BULLY_ACT_INACTIVE +- BULLY_ACT_KNOCKBACK +- BULLY_ACT_LAVA_DEATH +- BULLY_ACT_PATROL +- BULLY_BP_SIZE_BIG +- BULLY_BP_SIZE_SMALL +- BULLY_STYPE_CHILL +- BULLY_STYPE_GENERIC +- BULLY_STYPE_MINION +- BUTTERFLY_ACT_FOLLOW_MARIO +- BUTTERFLY_ACT_RESTING +- BUTTERFLY_ACT_RETURN_HOME +- CAMERA_LAKITU_BP_FOLLOW_CAMERA +- CAMERA_LAKITU_BP_INTRO +- CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD +- CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE +- CAMERA_LAKITU_INTRO_ACT_UNK2 +- CANNON_TRAP_DOOR_ACT_CAM_ZOOM +- CANNON_TRAP_DOOR_ACT_CLOSED +- CANNON_TRAP_DOOR_ACT_OPEN +- CANNON_TRAP_DOOR_ACT_OPENING +- CELEB_STAR_ACT_FACE_CAMERA +- CELEB_STAR_ACT_SPIN_AROUND_MARIO +- CHAIN_CHOMP_ACT_MOVE +- CHAIN_CHOMP_ACT_UNINITIALIZED +- CHAIN_CHOMP_ACT_UNLOAD_CHAIN +- CHAIN_CHOMP_CHAIN_PART_BP_PIVOT +- CHAIN_CHOMP_NOT_RELEASED +- CHAIN_CHOMP_RELEASED_BREAK_GATE +- CHAIN_CHOMP_RELEASED_END_CUTSCENE +- CHAIN_CHOMP_RELEASED_JUMP_AWAY +- CHAIN_CHOMP_RELEASED_LUNGE_AROUND +- CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE +- CHAIN_CHOMP_SUB_ACT_LUNGE +- CHAIN_CHOMP_SUB_ACT_TURN +- CLOUD_ACT_FWOOSH_HIDDEN +- CLOUD_ACT_MAIN +- CLOUD_ACT_SPAWN_PARTS +- CLOUD_ACT_UNLOAD +- CLOUD_BP_FWOOSH +- CLOUD_BP_LAKITU_CLOUD +- COFFIN_ACT_IDLE +- COFFIN_ACT_STAND_UP +- COFFIN_BP_STATIC +- COFFIN_SPAWNER_ACT_COFFINS_UNLOADED +- DIALOG_UNK1_AWAIT_DIALOG +- DIALOG_UNK1_BEGIN_DIALOG +- DIALOG_UNK1_DISABLE_TIME_STOP +- DIALOG_UNK1_ENABLE_TIME_STOP +- DIALOG_UNK1_FLAG_4 +- DIALOG_UNK1_FLAG_DEFAULT +- DIALOG_UNK1_FLAG_RESPONSE +- DIALOG_UNK1_INTERRUPT_MARIO_ACTION +- DIALOG_UNK2_AWAIT_DIALOG +- DIALOG_UNK2_ENABLE_TIME_STOP +- DIALOG_UNK2_END_DIALOG +- DIALOG_UNK2_FLAG_0 +- DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED +- DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION +- DORRIE_ACT_LOWER_HEAD +- DORRIE_ACT_MOVE +- DORRIE_ACT_RAISE_HEAD +- ENEMY_LAKITU_ACT_MAIN +- ENEMY_LAKITU_ACT_UNINITIALIZED +- ENEMY_LAKITU_SUB_ACT_HOLD_SPINY +- ENEMY_LAKITU_SUB_ACT_NO_SPINY +- ENEMY_LAKITU_SUB_ACT_THROW_SPINY +- EYEROK_BOSS_ACT_DEAD +- EYEROK_BOSS_ACT_DIE +- EYEROK_BOSS_ACT_FIGHT +- EYEROK_BOSS_ACT_PAUSE +- EYEROK_BOSS_ACT_SHOW_INTRO_TEXT +- EYEROK_BOSS_ACT_SLEEP +- EYEROK_BOSS_ACT_WAKE_UP +- EYEROK_HAND_ACT_ATTACKED +- EYEROK_HAND_ACT_BECOME_ACTIVE +- EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND +- EYEROK_HAND_ACT_CLOSE +- EYEROK_HAND_ACT_DEAD +- EYEROK_HAND_ACT_DIE +- EYEROK_HAND_ACT_DOUBLE_POUND +- EYEROK_HAND_ACT_FIST_PUSH +- EYEROK_HAND_ACT_FIST_SWEEP +- EYEROK_HAND_ACT_IDLE +- EYEROK_HAND_ACT_OPEN +- EYEROK_HAND_ACT_PAUSE +- EYEROK_HAND_ACT_RECOVER +- EYEROK_HAND_ACT_RETREAT +- EYEROK_HAND_ACT_SHOW_EYE +- EYEROK_HAND_ACT_SLEEP +- EYEROK_HAND_ACT_SMASH +- EYEROK_HAND_ACT_TARGET_MARIO +- FAKE_MONEYBAG_COIN_ACT_IDLE +- FAKE_MONEYBAG_COIN_ACT_TRANSFORM +- FALLING_PILLAR_ACT_FALLING +- FALLING_PILLAR_ACT_IDLE +- FALLING_PILLAR_ACT_TURNING +- FIRE_PIRANHA_PLANT_ACT_GROW +- FIRE_PIRANHA_PLANT_ACT_HIDE +- FIRE_SPITTER_ACT_IDLE +- FIRE_SPITTER_ACT_SPIT_FIRE +- FISH_ACT_FLEE +- FISH_ACT_INIT +- FISH_ACT_ROAM +- FISH_SPAWNER_ACT_IDLE +- FISH_SPAWNER_ACT_RESPAWN +- FISH_SPAWNER_ACT_SPAWN +- FISH_SPAWNER_BP_FEW_BLUE +- FISH_SPAWNER_BP_FEW_CYAN +- FISH_SPAWNER_BP_MANY_BLUE +- FISH_SPAWNER_BP_MANY_CYAN +- FLY_GUY_ACT_APPROACH_MARIO +- FLY_GUY_ACT_IDLE +- FLY_GUY_ACT_LUNGE +- FLY_GUY_ACT_SHOOT_FIRE +- FREE_BBALL_ACT_IDLE +- FREE_BBALL_ACT_RESET +- FREE_BBALL_ACT_ROLL +- GOOMBA_ACT_ATTACKED_MARIO +- GOOMBA_ACT_JUMP +- GOOMBA_ACT_WALK +- GOOMBA_BP_SIZE_MASK +- GOOMBA_BP_TRIPLET_FLAG_MASK +- GOOMBA_SIZE_HUGE +- GOOMBA_SIZE_REGULAR +- GOOMBA_SIZE_TINY +- GOOMBA_TRIPLET_SPAWNER_ACT_LOADED +- GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED +- GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK +- GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK +- HAUNTED_BOOKSHELF_ACT_IDLE +- HAUNTED_BOOKSHELF_ACT_RECEDE - HELD_DROPPED - HELD_FREE - HELD_HELD - HELD_THROWN +- HIDDEN_BLUE_COIN_ACT_ACTIVE +- HIDDEN_BLUE_COIN_ACT_INACTIVE +- HIDDEN_BLUE_COIN_ACT_WAITING +- HOMING_AMP_ACT_APPEAR +- HOMING_AMP_ACT_ATTACK_COOLDOWN +- HOMING_AMP_ACT_CHASE +- HOMING_AMP_ACT_GIVE_UP +- HOMING_AMP_ACT_INACTIVE +- HOOT_ACT_ASCENT +- HOOT_ACT_CARRY +- HOOT_ACT_TIRED +- HOOT_AVAIL_ASLEEP_IN_TREE +- HOOT_AVAIL_READY_TO_FLY +- HOOT_AVAIL_WANTS_TO_TALK +- JS_RING_SPAWNER_ACT_ACTIVE +- JS_RING_SPAWNER_ACT_INACTIVE +- KLEPTO_ACT_APPROACH_TARGET_HOLDING +- KLEPTO_ACT_CIRCLE_TARGET_HOLDING +- KLEPTO_ACT_DIVE_AT_MARIO +- KLEPTO_ACT_RESET_POSITION +- KLEPTO_ACT_RETREAT +- KLEPTO_ACT_STRUCK_BY_MARIO +- KLEPTO_ACT_TURN_TOWARD_MARIO +- KLEPTO_ACT_WAIT_FOR_MARIO +- KLEPTO_ANIM_STATE_HOLDING_CAP +- KLEPTO_ANIM_STATE_HOLDING_NOTHING +- KLEPTO_ANIM_STATE_HOLDING_STAR +- KOOPA_BP_KOOPA_THE_QUICK_BASE +- KOOPA_BP_KOOPA_THE_QUICK_BOB +- KOOPA_BP_KOOPA_THE_QUICK_THI +- KOOPA_BP_NORMAL +- KOOPA_BP_TINY +- KOOPA_BP_UNSHELLED +- KOOPA_SHELLED_ACT_DIE +- KOOPA_SHELLED_ACT_LYING +- KOOPA_SHELLED_ACT_RUN_FROM_MARIO +- KOOPA_SHELLED_ACT_STOPPED +- KOOPA_SHELLED_ACT_WALK +- KOOPA_SHELLED_SUB_ACT_START_WALK +- KOOPA_SHELLED_SUB_ACT_STOP_WALK +- KOOPA_SHELLED_SUB_ACT_WALK +- KOOPA_THE_QUICK_ACT_AFTER_RACE +- KOOPA_THE_QUICK_ACT_DECELERATE +- KOOPA_THE_QUICK_ACT_RACE +- KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT +- KOOPA_THE_QUICK_ACT_STOP +- KOOPA_THE_QUICK_ACT_UNUSED1 +- KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE +- KOOPA_THE_QUICK_BOB_INDEX +- KOOPA_THE_QUICK_SUB_ACT_JUMP +- KOOPA_THE_QUICK_SUB_ACT_RUN +- KOOPA_THE_QUICK_SUB_ACT_START_RUN +- KOOPA_THE_QUICK_THI_INDEX +- KOOPA_UNSHELLED_ACT_DIVE +- KOOPA_UNSHELLED_ACT_LYING +- KOOPA_UNSHELLED_ACT_RUN +- KOOPA_UNSHELLED_ACT_UNUSED3 +- LLL_DRAWBRIDGE_ACT_LOWER +- LLL_DRAWBRIDGE_ACT_RAISE +- MAD_PIANO_ACT_ATTACK +- MAD_PIANO_ACT_WAIT +- MANTA_ACT_NO_RINGS +- MANTA_ACT_SPAWN_RINGS +- MIPS_ACT_FALL_DOWN +- MIPS_ACT_FOLLOW_PATH +- MIPS_ACT_IDLE +- MIPS_ACT_WAIT_FOR_ANIMATION_DONE +- MIPS_ACT_WAIT_FOR_NEARBY_MARIO +- MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR +- MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR +- MIPS_STAR_STATUS_SHOULD_SPAWN_STAR +- MONEYBAG_ACT_APPEAR +- MONEYBAG_ACT_DEATH +- MONEYBAG_ACT_DISAPPEAR +- MONEYBAG_ACT_MOVE_AROUND +- MONEYBAG_ACT_RETURN_HOME +- MONEYBAG_ACT_UNUSED_APPEAR +- MONEYBAG_JUMP_JUMP +- MONEYBAG_JUMP_JUMP_AND_BOUNCE +- MONEYBAG_JUMP_LANDING +- MONEYBAG_JUMP_PREPARE +- MONEYBAG_JUMP_WALK_AROUND +- MONEYBAG_JUMP_WALK_HOME +- MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE +- MONTY_MOLE_ACT_HIDE +- MONTY_MOLE_ACT_JUMP_INTO_HOLE +- MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE +- MONTY_MOLE_ACT_RISE_FROM_HOLE +- MONTY_MOLE_ACT_SELECT_HOLE +- MONTY_MOLE_ACT_SPAWN_ROCK +- MONTY_MOLE_ACT_THROW_ROCK +- MONTY_MOLE_BP_NO_ROCK +- MONTY_MOLE_ROCK_ACT_HELD +- MONTY_MOLE_ROCK_ACT_MOVE +- MOV_BCOIN_ACT_MOVING +- MOV_BCOIN_ACT_STILL +- MOV_YCOIN_ACT_BLINKING +- MOV_YCOIN_ACT_DEATH_PLANE_DEATH +- MOV_YCOIN_ACT_IDLE +- MOV_YCOIN_ACT_LAVA_DEATH +- MR_BLIZZARD_ACT_BURROW +- MR_BLIZZARD_ACT_DEATH +- MR_BLIZZARD_ACT_HIDE_UNHIDE +- MR_BLIZZARD_ACT_JUMP +- MR_BLIZZARD_ACT_RISE_FROM_GROUND +- MR_BLIZZARD_ACT_ROTATE +- MR_BLIZZARD_ACT_SPAWN_SNOWBALL +- MR_BLIZZARD_ACT_THROW_SNOWBALL +- MR_BLIZZARD_STYPE_JUMPING +- MR_BLIZZARD_STYPE_NO_CAP +- OBJ_ACT_DEATH_PLANE_DEATH +- OBJ_ACT_HORIZONTAL_KNOCKBACK +- OBJ_ACT_LAVA_DEATH +- OBJ_ACT_SQUISHED +- OBJ_ACT_VERTICAL_KNOCKBACK - OBJ_FLAG_0020 - OBJ_FLAG_0100 - OBJ_FLAG_1000 @@ -1464,10 +1802,205 @@ - OBJ_MOVE_OUT_SCOPE - OBJ_MOVE_UNDERWATER_OFF_GROUND - OBJ_MOVE_UNDERWATER_ON_GROUND +- PENGUIN_ANIM_IDLE +- PENGUIN_ANIM_WALK +- PENGUIN_WALK_BABY +- PENGUIN_WALK_BIG +- PIRANHA_PLANT_ACT_ATTACKED +- PIRANHA_PLANT_ACT_BITING +- PIRANHA_PLANT_ACT_IDLE +- PIRANHA_PLANT_ACT_RESPAWN +- PIRANHA_PLANT_ACT_SHRINK_AND_DIE +- PIRANHA_PLANT_ACT_SLEEPING +- PIRANHA_PLANT_ACT_STOPPED_BITING +- PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN +- PIRANHA_PLANT_ACT_WOKEN_UP +- PIRANHA_PLANT_BUBBLE_ACT_BURST +- PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP +- PIRANHA_PLANT_BUBBLE_ACT_IDLE +- PLATFORM_ON_TRACK_ACT_FALL +- PLATFORM_ON_TRACK_ACT_INIT +- PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK +- PLATFORM_ON_TRACK_ACT_PAUSE_BRIEFLY +- PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO +- PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR +- PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL +- PLATFORM_ON_TRACK_BP_DONT_TURN_YAW +- PLATFORM_ON_TRACK_BP_MASK_PATH +- PLATFORM_ON_TRACK_BP_MASK_TYPE +- PLATFORM_ON_TRACK_BP_RETURN_TO_START +- PLATFORM_ON_TRACK_TYPE_CARPET +- PLATFORM_ON_TRACK_TYPE_CHECKERED +- PLATFORM_ON_TRACK_TYPE_GRATE +- PLATFORM_ON_TRACK_TYPE_SKI_LIFT +- POKEY_ACT_UNINITIALIZED +- POKEY_ACT_UNLOAD_PARTS +- POKEY_ACT_WANDER +- PURPLE_SWITCH_IDLE +- PURPLE_SWITCH_PRESSED +- PURPLE_SWITCH_TICKING +- PURPLE_SWITCH_UNPRESSED +- PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF +- PYRAMID_ELEVATOR_AT_BOTTOM +- PYRAMID_ELEVATOR_CONSTANT_VELOCITY +- PYRAMID_ELEVATOR_END_MOVING +- PYRAMID_ELEVATOR_IDLE +- PYRAMID_ELEVATOR_START_MOVING +- PYRAMID_TOP_ACT_CHECK_IF_SOLVED +- PYRAMID_TOP_ACT_EXPLODE +- PYRAMID_TOP_ACT_SPINNING +- PYRAMID_WALL_ACT_MOVING_DOWN +- PYRAMID_WALL_ACT_MOVING_UP +- PYRAMID_WALL_BP_POSITION_HIGH +- PYRAMID_WALL_BP_POSITION_LOW +- PYRAMID_WALL_BP_POSITION_MIDDLE +- RACING_PENGUIN_ACT_FINISH_RACE +- RACING_PENGUIN_ACT_PREPARE_FOR_RACE +- RACING_PENGUIN_ACT_RACE +- RACING_PENGUIN_ACT_SHOW_FINAL_TEXT +- RACING_PENGUIN_ACT_SHOW_INIT_TEXT +- RACING_PENGUIN_ACT_WAIT_FOR_MARIO - RESPAWN_INFO_DONT_RESPAWN - RESPAWN_INFO_TYPE_16 - RESPAWN_INFO_TYPE_32 - RESPAWN_INFO_TYPE_NULL +- SKEETER_ACT_IDLE +- SKEETER_ACT_LUNGE +- SKEETER_ACT_WALK +- SL_SNOWMAN_WIND_ACT_BLOWING +- SL_SNOWMAN_WIND_ACT_IDLE +- SL_SNOWMAN_WIND_ACT_TALKING +- SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS +- SL_WALKING_PENGUIN_ACT_RETURNING +- SL_WALKING_PENGUIN_ACT_TURNING_BACK +- SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS +- SNUFIT_ACT_IDLE +- SNUFIT_ACT_SHOOT +- SPINY_ACT_ATTACKED_MARIO +- SPINY_ACT_HELD_BY_LAKITU +- SPINY_ACT_THROWN_BY_LAKITU +- SPINY_ACT_WALK +- SWOOP_ACT_IDLE +- SWOOP_ACT_MOVE +- TRIPLET_BUTTERFLY_ACT_ACTIVATE +- TRIPLET_BUTTERFLY_ACT_EXPLODE +- TRIPLET_BUTTERFLY_ACT_INIT +- TRIPLET_BUTTERFLY_ACT_WANDER +- TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM +- TRIPLET_BUTTERFLY_BP_NO_BOMBS +- TRIPLET_BUTTERFLY_TYPE_EXPLODES +- TRIPLET_BUTTERFLY_TYPE_NORMAL +- TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP +- TTC_2D_ROTATOR_BP_2D_COG +- TTC_2D_ROTATOR_BP_HAND +- TTC_COG_BP_DIR_CCW +- TTC_COG_BP_DIR_CW +- TTC_COG_BP_DIR_MASK +- TTC_COG_BP_SHAPE_HEXAGON +- TTC_COG_BP_SHAPE_MASK +- TTC_COG_BP_SHAPE_TRIANGLE +- TTC_MOVING_BAR_ACT_EXTEND +- TTC_MOVING_BAR_ACT_PULL_BACK +- TTC_MOVING_BAR_ACT_RETRACT +- TTC_MOVING_BAR_ACT_WAIT +- TTC_ROTATING_SOLID_BP_CUBE +- TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM +- TTC_SPEED_FAST +- TTC_SPEED_RANDOM +- TTC_SPEED_SLOW +- TTC_SPEED_STOPPED +- TWEESTER_ACT_CHASE +- TWEESTER_ACT_HIDE +- TWEESTER_ACT_IDLE +- TWEESTER_SUB_ACT_CHASE +- TWEESTER_SUB_ACT_WAIT +- UKIKI_ACT_GO_TO_CAGE +- UKIKI_ACT_IDLE +- UKIKI_ACT_JUMP +- UKIKI_ACT_RETURN_HOME +- UKIKI_ACT_RUN +- UKIKI_ACT_TURN_TO_MARIO +- UKIKI_ACT_UNUSED_TURN +- UKIKI_ACT_WAIT_TO_RESPAWN +- UKIKI_ANIM_HANDSTAND +- UKIKI_ANIM_HELD +- UKIKI_ANIM_ITCH +- UKIKI_ANIM_JUMP +- UKIKI_ANIM_JUMP_CLAP +- UKIKI_ANIM_LAND +- UKIKI_ANIM_RUN +- UKIKI_ANIM_SCREECH +- UKIKI_ANIM_STATE_CAP_ON +- UKIKI_ANIM_STATE_DEFAULT +- UKIKI_ANIM_STATE_EYE_CLOSED +- UKIKI_ANIM_TURN +- UKIKI_ANIM_UNUSED_APOSE +- UKIKI_ANIM_UNUSED_DEATH +- UKIKI_ANIM_UNUSED_HOP +- UKIKI_ANIM_UNUSED_WALK +- UKIKI_CAGE +- UKIKI_CAGE_ACT_FALL +- UKIKI_CAGE_ACT_HIDE +- UKIKI_CAGE_ACT_SPIN +- UKIKI_CAGE_ACT_WAIT_FOR_UKIKI +- UKIKI_CAGE_STAR_ACT_IN_CAGE +- UKIKI_CAGE_STAR_ACT_SPAWN_STAR +- UKIKI_CAP +- UKIKI_CAP_ON +- UKIKI_SUB_ACT_CAGE_DESPAWN +- UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE +- UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE +- UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE +- UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE +- UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO +- UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE +- UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO +- UKIKI_SUB_ACT_TAUNT_HANDSTAND +- UKIKI_SUB_ACT_TAUNT_ITCH +- UKIKI_SUB_ACT_TAUNT_JUMP_CLAP +- UKIKI_SUB_ACT_TAUNT_NONE +- UKIKI_SUB_ACT_TAUNT_SCREECH +- UKIKI_TEXT_CAGE_TEXTBOX +- UKIKI_TEXT_DEFAULT +- UKIKI_TEXT_DO_NOT_LET_GO +- UKIKI_TEXT_GAVE_CAP_BACK +- UKIKI_TEXT_GO_TO_CAGE +- UKIKI_TEXT_HAS_CAP +- UKIKI_TEXT_STEAL_CAP +- UKIKI_TEXT_STOLE_CAP +- WATER_BOMB_ACT_DROP +- WATER_BOMB_ACT_EXPLODE +- WATER_BOMB_ACT_INIT +- WATER_BOMB_ACT_SHOT_FROM_CANNON +- WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL +- WATER_LEVEL_DIAMOND_ACT_IDLE +- WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING +- WATER_LEVEL_DIAMOND_ACT_INIT +- WATER_RING_ACT_COLLECTED +- WATER_RING_ACT_NOT_COLLECTED +- WF_SLID_BRICK_PTFM_ACT_EXTEND +- WF_SLID_BRICK_PTFM_ACT_RETRACT +- WF_SLID_BRICK_PTFM_ACT_WAIT +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 +- WIGGLER_ACT_FALL_THROUGH_FLOOR +- WIGGLER_ACT_JUMPED_ON +- WIGGLER_ACT_KNOCKBACK +- WIGGLER_ACT_SHRINK +- WIGGLER_ACT_UNINITIALIZED +- WIGGLER_ACT_WALK +- WIGGLER_TEXT_STATUS_AWAIT_DIALOG +- WIGGLER_TEXT_STATUS_COMPLETED_DIALOG +- WIGGLER_TEXT_STATUS_SHOWING_DIALOG +- WOODEN_POST_BP_NO_COINS_MASK +- YOSHI_ACT_CREDITS +- YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN +- YOSHI_ACT_GIVE_PRESENT +- YOSHI_ACT_IDLE +- YOSHI_ACT_TALK +- YOSHI_ACT_WALK +- YOSHI_ACT_WALK_JUMP_OFF_ROOF [:arrow_up_small:](#) diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 1235dd5e..8760fcaa 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -1320,6 +1320,7 @@ - [get_temp_s32_pointer](#get_temp_s32_pointer) - [hud_hide](#hud_hide) - [hud_show](#hud_show) + - [movtexqc_register](#movtexqc_register) - [set_environment_region](#set_environment_region) - [warp_exit_level](#warp_exit_level) - [warp_restart_level](#warp_restart_level) @@ -24807,6 +24808,29 @@ The `reliable` field will ensure that the packet arrives, but should be used spa
+## [movtexqc_register](#movtexqc_register) + +### Lua Example +`movtexqc_register(name, level, area, type)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | +| level | `integer` | +| area | `integer` | +| type | `integer` | + +### Returns +- None + +### C Prototype +`void movtexqc_register(const char* name, s16 level, s16 area, s16 type);` + +[:arrow_up_small:](#) + +
+ ## [set_environment_region](#set_environment_region) ### Lua Example diff --git a/src/game/moving_texture.c b/src/game/moving_texture.c index 3ba163e1..fdac4949 100644 --- a/src/game/moving_texture.c +++ b/src/game/moving_texture.c @@ -590,7 +590,7 @@ void *get_quad_collection_from_id(u32 id) { case TTM_MOVTEX_PUDDLE: return ttm_movtex_puddle; default: - return NULL; + return dynos_movtexqc_get_from_id(id); } } @@ -706,7 +706,7 @@ Gfx *geo_movtex_draw_water_regions_ext(s32 callContext, struct GraphNode *node, return NULL; } - quadCollection = dynos_level_get_movtexqc(asGenerated->parameter); + quadCollection = dynos_movtexqc_get_from_index(asGenerated->parameter); if (quadCollection == NULL) { return NULL; } diff --git a/src/pc/controller/controller_keyboard_debug.c b/src/pc/controller/controller_keyboard_debug.c index e8926560..2222b15a 100644 --- a/src/pc/controller/controller_keyboard_debug.c +++ b/src/pc/controller/controller_keyboard_debug.c @@ -46,7 +46,7 @@ static void debug_warp_level1() { } static void debug_warp_level2() { - dynos_warp_to_level(LEVEL_WDW, 2, 1); + dynos_warp_to_level(LEVEL_WDW, 1, 1); } static void debug_grand_star(void) { diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 987e47b4..25bd732f 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -1477,6 +1477,20 @@ char gSmluaConstants[] = "" "HELD_HELD = 1\n" "HELD_THROWN = 2\n" "HELD_DROPPED = 3\n" +"DIALOG_UNK1_ENABLE_TIME_STOP = 0\n" +"DIALOG_UNK1_INTERRUPT_MARIO_ACTION = 1\n" +"DIALOG_UNK1_BEGIN_DIALOG = 2\n" +"DIALOG_UNK1_AWAIT_DIALOG = 3\n" +"DIALOG_UNK1_DISABLE_TIME_STOP = 4\n" +"DIALOG_UNK1_FLAG_DEFAULT = (1 << 1)\n" +"DIALOG_UNK1_FLAG_RESPONSE = (1 << 2)\n" +"DIALOG_UNK1_FLAG_4 = (1 << 4)\n" +"DIALOG_UNK2_ENABLE_TIME_STOP = 0\n" +"DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION = 1\n" +"DIALOG_UNK2_AWAIT_DIALOG = 2\n" +"DIALOG_UNK2_END_DIALOG = 3\n" +"DIALOG_UNK2_FLAG_0 = (1 << 0)\n" +"DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED = (1 << 4)\n" "OBJ_MOVE_LANDED = (1 << 0)\n" "OBJ_MOVE_ON_GROUND = (1 << 1)\n" "OBJ_MOVE_LEFT_GROUND = (1 << 2)\n" @@ -1514,6 +1528,525 @@ char gSmluaConstants[] = "" "ACTIVE_PARTICLE_BREATH = (1 << 17)\n" "ACTIVE_PARTICLE_V_STAR = (1 << 18)\n" "ACTIVE_PARTICLE_TRIANGLE = (1 << 19)\n" +"OBJ_ACT_LAVA_DEATH = 100\n" +"OBJ_ACT_DEATH_PLANE_DEATH = 101\n" +"OBJ_ACT_HORIZONTAL_KNOCKBACK = 100\n" +"OBJ_ACT_VERTICAL_KNOCKBACK = 101\n" +"OBJ_ACT_SQUISHED = 102\n" +"TTC_SPEED_SLOW = 0\n" +"TTC_SPEED_FAST = 1\n" +"TTC_SPEED_RANDOM = 2\n" +"TTC_SPEED_STOPPED = 3\n" +"BOBOMB_BP_STYPE_GENERIC = 0\n" +"BOBOMB_BP_STYPE_STATIONARY = 1\n" +"BOBOMB_ACT_PATROL = 0\n" +"BOBOMB_ACT_LAUNCHED = 1\n" +"BOBOMB_ACT_CHASE_MARIO = 2\n" +"BOBOMB_ACT_EXPLODE = 3\n" +"BOBOMB_ACT_LAVA_DEATH = 100\n" +"BOBOMB_ACT_DEATH_PLANE_DEATH = 101\n" +"HIDDEN_BLUE_COIN_ACT_INACTIVE = 0\n" +"HIDDEN_BLUE_COIN_ACT_WAITING = 1\n" +"HIDDEN_BLUE_COIN_ACT_ACTIVE = 2\n" +"BLUE_COIN_SWITCH_ACT_IDLE = 0\n" +"BLUE_COIN_SWITCH_ACT_RECEDING = 1\n" +"BLUE_COIN_SWITCH_ACT_TICKING = 2\n" +"MOV_BCOIN_ACT_STILL = 0\n" +"MOV_BCOIN_ACT_MOVING = 1\n" +"MOV_YCOIN_ACT_IDLE = 0\n" +"MOV_YCOIN_ACT_BLINKING = 1\n" +"MOV_YCOIN_ACT_LAVA_DEATH = 100\n" +"MOV_YCOIN_ACT_DEATH_PLANE_DEATH = 101\n" +"BOBOMB_BUDDY_BP_STYPE_GENERIC = 0\n" +"BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB = 1\n" +"BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB = 2\n" +"BOBOMB_BUDDY_BP_STYPE_BOB_GRASS = 3\n" +"BOBOMB_BUDDY_ACT_IDLE = 0\n" +"BOBOMB_BUDDY_ACT_TURN_TO_TALK = 2\n" +"BOBOMB_BUDDY_ACT_TALK = 3\n" +"BOBOMB_BUDDY_ROLE_ADVICE = 0\n" +"BOBOMB_BUDDY_ROLE_CANNON = 1\n" +"BOBOMB_BUDDY_CANNON_UNOPENED = 0\n" +"BOBOMB_BUDDY_CANNON_OPENING = 1\n" +"BOBOMB_BUDDY_CANNON_OPENED = 2\n" +"BOBOMB_BUDDY_CANNON_STOP_TALKING = 3\n" +"BOBOMB_BUDDY_HAS_NOT_TALKED = 0\n" +"BOBOMB_BUDDY_HAS_TALKED = 2\n" +"FISH_SPAWNER_ACT_SPAWN = 0\n" +"FISH_SPAWNER_ACT_IDLE = 1\n" +"FISH_SPAWNER_ACT_RESPAWN = 2\n" +"FISH_SPAWNER_BP_MANY_BLUE = 0\n" +"FISH_SPAWNER_BP_FEW_BLUE = 1\n" +"FISH_SPAWNER_BP_MANY_CYAN = 2\n" +"FISH_SPAWNER_BP_FEW_CYAN = 3\n" +"FISH_ACT_INIT = 0\n" +"FISH_ACT_ROAM = 1\n" +"FISH_ACT_FLEE = 2\n" +"BLUE_FISH_ACT_DIVE = 0\n" +"BLUE_FISH_ACT_TURN = 1\n" +"BLUE_FISH_ACT_ASCEND = 2\n" +"BLUE_FISH_ACT_TURN_BACK = 3\n" +"BLUE_FISH_ACT_SPAWN = 0\n" +"BLUE_FISH_ACT_ROOM = 1\n" +"BLUE_FISH_ACT_DUPLICATE = 2\n" +"CANNON_TRAP_DOOR_ACT_CLOSED = 0\n" +"CANNON_TRAP_DOOR_ACT_CAM_ZOOM = 1\n" +"CANNON_TRAP_DOOR_ACT_OPENING = 2\n" +"CANNON_TRAP_DOOR_ACT_OPEN = 3\n" +"HOMING_AMP_ACT_INACTIVE = 0\n" +"HOMING_AMP_ACT_APPEAR = 1\n" +"HOMING_AMP_ACT_CHASE = 2\n" +"HOMING_AMP_ACT_GIVE_UP = 3\n" +"HOMING_AMP_ACT_ATTACK_COOLDOWN = 4\n" +"AMP_BP_ROT_RADIUS_200 = 0\n" +"AMP_BP_ROT_RADIUS_300 = 1\n" +"AMP_BP_ROT_RADIUS_400 = 2\n" +"AMP_BP_ROT_RADIUS_0 = 3\n" +"AMP_ACT_IDLE = 2\n" +"AMP_ACT_ATTACK_COOLDOWN = 4\n" +"BUTTERFLY_ACT_RESTING = 0\n" +"BUTTERFLY_ACT_FOLLOW_MARIO = 1\n" +"BUTTERFLY_ACT_RETURN_HOME = 2\n" +"HOOT_AVAIL_ASLEEP_IN_TREE = 0\n" +"HOOT_AVAIL_WANTS_TO_TALK = 1\n" +"HOOT_AVAIL_READY_TO_FLY = 2\n" +"HOOT_ACT_ASCENT = 0\n" +"HOOT_ACT_CARRY = 1\n" +"HOOT_ACT_TIRED = 2\n" +"BULLY_BP_SIZE_SMALL = 0\n" +"BULLY_BP_SIZE_BIG = 1\n" +"BULLY_ACT_PATROL = 0\n" +"BULLY_ACT_CHASE_MARIO = 1\n" +"BULLY_ACT_KNOCKBACK = 2\n" +"BULLY_ACT_BACK_UP = 3\n" +"BULLY_ACT_INACTIVE = 4\n" +"BULLY_ACT_ACTIVATE_AND_FALL = 5\n" +"BULLY_ACT_LAVA_DEATH = 100\n" +"BULLY_ACT_DEATH_PLANE_DEATH = 101\n" +"BULLY_STYPE_GENERIC = 0\n" +"BULLY_STYPE_MINION = 1\n" +"BULLY_STYPE_CHILL = 16\n" +"WATER_RING_ACT_NOT_COLLECTED = 0\n" +"WATER_RING_ACT_COLLECTED = 1\n" +"JS_RING_SPAWNER_ACT_ACTIVE = 0\n" +"JS_RING_SPAWNER_ACT_INACTIVE = 1\n" +"CELEB_STAR_ACT_SPIN_AROUND_MARIO = 0\n" +"CELEB_STAR_ACT_FACE_CAMERA = 1\n" +"LLL_DRAWBRIDGE_ACT_LOWER = 0\n" +"LLL_DRAWBRIDGE_ACT_RAISE = 1\n" +"BOMP_ACT_WAIT = 0\n" +"BOMP_ACT_POKE_OUT = 1\n" +"BOMP_ACT_EXTEND = 2\n" +"BOMP_ACT_RETRACT = 3\n" +"WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 = 1\n" +"WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 = 2\n" +"WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 = 3\n" +"WF_SLID_BRICK_PTFM_ACT_WAIT = 0\n" +"WF_SLID_BRICK_PTFM_ACT_EXTEND = 1\n" +"WF_SLID_BRICK_PTFM_ACT_RETRACT = 2\n" +"FAKE_MONEYBAG_COIN_ACT_IDLE = 0\n" +"FAKE_MONEYBAG_COIN_ACT_TRANSFORM = 1\n" +"MONEYBAG_ACT_APPEAR = 0\n" +"MONEYBAG_ACT_UNUSED_APPEAR = 1\n" +"MONEYBAG_ACT_MOVE_AROUND = 2\n" +"MONEYBAG_ACT_RETURN_HOME = 3\n" +"MONEYBAG_ACT_DISAPPEAR = 4\n" +"MONEYBAG_ACT_DEATH = 5\n" +"MONEYBAG_JUMP_LANDING = 0\n" +"MONEYBAG_JUMP_PREPARE = 1\n" +"MONEYBAG_JUMP_JUMP = 2\n" +"MONEYBAG_JUMP_JUMP_AND_BOUNCE = 3\n" +"MONEYBAG_JUMP_WALK_AROUND = 4\n" +"MONEYBAG_JUMP_WALK_HOME = 5\n" +"BBALL_ACT_INITIALIZE = 0\n" +"BBALL_ACT_ROLL = 1\n" +"BBALL_BP_STYPE_BOB_UPPER = 0\n" +"BBALL_BP_STYPE_TTM = 1\n" +"BBALL_BP_STYPE_BOB_LOWER = 2\n" +"BBALL_BP_STYPE_THI_LARGE = 3\n" +"BBALL_BP_STYPE_THI_SMALL = 4\n" +"FREE_BBALL_ACT_IDLE = 0\n" +"FREE_BBALL_ACT_ROLL = 1\n" +"FREE_BBALL_ACT_RESET = 2\n" +"BETA_CHEST_ACT_IDLE_CLOSED = 0\n" +"BETA_CHEST_ACT_OPENING = 1\n" +"BETA_CHEST_ACT_IDLE_OPEN = 2\n" +"BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON = 0\n" +"BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF = 1\n" +"BOO_DEATH_STATUS_ALIVE = 0\n" +"BOO_DEATH_STATUS_DYING = 1\n" +"BOO_DEATH_STATUS_DEAD = 2\n" +"BOO_NOT_ATTACKED = 0\n" +"BOO_ATTACKED = 1\n" +"BOO_BOUNCED_ON = -1\n" +"BETA_BOO_KEY_ACT_IN_BOO = 0\n" +"BETA_BOO_KEY_ACT_DROPPING = 1\n" +"BETA_BOO_KEY_ACT_DROPPED = 2\n" +"BOO_CAGE_ACT_IN_BOO = 0\n" +"BOO_CAGE_ACT_FALLING = 1\n" +"BOO_CAGE_ACT_ON_GROUND = 2\n" +"BOO_CAGE_ACT_MARIO_JUMPING_IN = 3\n" +"BOO_CAGE_ACT_USELESS = 4\n" +"HAUNTED_BOOKSHELF_ACT_IDLE = 0\n" +"HAUNTED_BOOKSHELF_ACT_RECEDE = 1\n" +"BBH_NEAR_MERRY_GO_ROUND_ROOM = 10\n" +"BBH_DYNAMIC_SURFACE_ROOM = 0\n" +"BBH_OUTSIDE_ROOM = 13\n" +"COFFIN_SPAWNER_ACT_COFFINS_UNLOADED = 0\n" +"COFFIN_ACT_IDLE = 0\n" +"COFFIN_ACT_STAND_UP = 1\n" +"COFFIN_BP_STATIC = 0\n" +"ARROW_LIFT_ACT_IDLE = 0\n" +"ARROW_LIFT_ACT_MOVING_AWAY = 1\n" +"ARROW_LIFT_ACT_MOVING_BACK = 2\n" +"ARROW_LIFT_NOT_DONE_MOVING = 0\n" +"ARROW_LIFT_DONE_MOVING = 1\n" +"YOSHI_ACT_IDLE = 0\n" +"YOSHI_ACT_WALK = 1\n" +"YOSHI_ACT_TALK = 2\n" +"YOSHI_ACT_WALK_JUMP_OFF_ROOF = 3\n" +"YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN = 4\n" +"YOSHI_ACT_GIVE_PRESENT = 5\n" +"YOSHI_ACT_CREDITS = 10\n" +"KOOPA_UNSHELLED_ACT_RUN = 0\n" +"KOOPA_UNSHELLED_ACT_DIVE = 1\n" +"KOOPA_UNSHELLED_ACT_LYING = 2\n" +"KOOPA_UNSHELLED_ACT_UNUSED3 = 3\n" +"KOOPA_SHELLED_ACT_STOPPED = 0\n" +"KOOPA_SHELLED_ACT_WALK = 1\n" +"KOOPA_SHELLED_ACT_RUN_FROM_MARIO = 2\n" +"KOOPA_SHELLED_ACT_LYING = 3\n" +"KOOPA_SHELLED_ACT_DIE = 4\n" +"KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE = 0\n" +"KOOPA_THE_QUICK_ACT_UNUSED1 = 1\n" +"KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT = 2\n" +"KOOPA_THE_QUICK_ACT_RACE = 3\n" +"KOOPA_THE_QUICK_ACT_DECELERATE = 4\n" +"KOOPA_THE_QUICK_ACT_STOP = 5\n" +"KOOPA_THE_QUICK_ACT_AFTER_RACE = 6\n" +"KOOPA_SHELLED_SUB_ACT_START_WALK = 0\n" +"KOOPA_SHELLED_SUB_ACT_WALK = 1\n" +"KOOPA_SHELLED_SUB_ACT_STOP_WALK = 2\n" +"KOOPA_THE_QUICK_SUB_ACT_START_RUN = 0\n" +"KOOPA_THE_QUICK_SUB_ACT_RUN = 1\n" +"KOOPA_THE_QUICK_SUB_ACT_JUMP = 2\n" +"KOOPA_THE_QUICK_BOB_INDEX = 0\n" +"KOOPA_THE_QUICK_THI_INDEX = 1\n" +"KOOPA_BP_UNSHELLED = 0\n" +"KOOPA_BP_NORMAL = 1\n" +"KOOPA_BP_KOOPA_THE_QUICK_BASE = 2\n" +"KOOPA_BP_KOOPA_THE_QUICK_BOB = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_BOB_INDEX)\n" +"KOOPA_BP_KOOPA_THE_QUICK_THI = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_THI_INDEX)\n" +"KOOPA_BP_TINY = 4\n" +"POKEY_ACT_UNINITIALIZED = 0\n" +"POKEY_ACT_WANDER = 1\n" +"POKEY_ACT_UNLOAD_PARTS = 2\n" +"SWOOP_ACT_IDLE = 0\n" +"SWOOP_ACT_MOVE = 1\n" +"FLY_GUY_ACT_IDLE = 0\n" +"FLY_GUY_ACT_APPROACH_MARIO = 1\n" +"FLY_GUY_ACT_LUNGE = 2\n" +"FLY_GUY_ACT_SHOOT_FIRE = 3\n" +"GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK = 0x00000003\n" +"GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK = 0x000000FC\n" +"GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED = 0\n" +"GOOMBA_TRIPLET_SPAWNER_ACT_LOADED = 1\n" +"GOOMBA_BP_SIZE_MASK = 0x00000003\n" +"GOOMBA_SIZE_REGULAR = 0\n" +"GOOMBA_SIZE_HUGE = 1\n" +"GOOMBA_SIZE_TINY = 2\n" +"GOOMBA_BP_TRIPLET_FLAG_MASK = 0x000000FC\n" +"GOOMBA_ACT_WALK = 0\n" +"GOOMBA_ACT_ATTACKED_MARIO = 1\n" +"GOOMBA_ACT_JUMP = 2\n" +"CHAIN_CHOMP_ACT_UNINITIALIZED = 0\n" +"CHAIN_CHOMP_ACT_MOVE = 1\n" +"CHAIN_CHOMP_ACT_UNLOAD_CHAIN = 2\n" +"CHAIN_CHOMP_SUB_ACT_TURN = 0\n" +"CHAIN_CHOMP_SUB_ACT_LUNGE = 1\n" +"CHAIN_CHOMP_NOT_RELEASED = 0\n" +"CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE = 1\n" +"CHAIN_CHOMP_RELEASED_LUNGE_AROUND = 2\n" +"CHAIN_CHOMP_RELEASED_BREAK_GATE = 3\n" +"CHAIN_CHOMP_RELEASED_JUMP_AWAY = 4\n" +"CHAIN_CHOMP_RELEASED_END_CUTSCENE = 5\n" +"CHAIN_CHOMP_CHAIN_PART_BP_PIVOT = 0\n" +"WOODEN_POST_BP_NO_COINS_MASK = 0x0000FF00\n" +"WIGGLER_ACT_UNINITIALIZED = 0\n" +"WIGGLER_ACT_WALK = 1\n" +"WIGGLER_ACT_KNOCKBACK = 2\n" +"WIGGLER_ACT_JUMPED_ON = 3\n" +"WIGGLER_ACT_SHRINK = 4\n" +"WIGGLER_ACT_FALL_THROUGH_FLOOR = 5\n" +"WIGGLER_TEXT_STATUS_AWAIT_DIALOG = 0\n" +"WIGGLER_TEXT_STATUS_SHOWING_DIALOG = 1\n" +"WIGGLER_TEXT_STATUS_COMPLETED_DIALOG = 2\n" +"SPINY_ACT_WALK = 0\n" +"SPINY_ACT_HELD_BY_LAKITU = 1\n" +"SPINY_ACT_THROWN_BY_LAKITU = 2\n" +"SPINY_ACT_ATTACKED_MARIO = 3\n" +"ENEMY_LAKITU_ACT_UNINITIALIZED = 0\n" +"ENEMY_LAKITU_ACT_MAIN = 1\n" +"ENEMY_LAKITU_SUB_ACT_NO_SPINY = 0\n" +"ENEMY_LAKITU_SUB_ACT_HOLD_SPINY = 1\n" +"ENEMY_LAKITU_SUB_ACT_THROW_SPINY = 2\n" +"CLOUD_ACT_SPAWN_PARTS = 0\n" +"CLOUD_ACT_MAIN = 1\n" +"CLOUD_ACT_UNLOAD = 2\n" +"CLOUD_ACT_FWOOSH_HIDDEN = 3\n" +"CLOUD_BP_FWOOSH = 0\n" +"CLOUD_BP_LAKITU_CLOUD = 1\n" +"CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE = 0\n" +"CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD = 1\n" +"CAMERA_LAKITU_INTRO_ACT_UNK2 = 2\n" +"CAMERA_LAKITU_BP_FOLLOW_CAMERA = 0\n" +"CAMERA_LAKITU_BP_INTRO = 1\n" +"MANTA_ACT_SPAWN_RINGS = 0\n" +"MANTA_ACT_NO_RINGS = 1\n" +"MONTY_MOLE_ACT_SELECT_HOLE = 0\n" +"MONTY_MOLE_ACT_RISE_FROM_HOLE = 1\n" +"MONTY_MOLE_ACT_SPAWN_ROCK = 2\n" +"MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE = 3\n" +"MONTY_MOLE_ACT_THROW_ROCK = 4\n" +"MONTY_MOLE_ACT_JUMP_INTO_HOLE = 5\n" +"MONTY_MOLE_ACT_HIDE = 6\n" +"MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE = 7\n" +"MONTY_MOLE_BP_NO_ROCK = 0\n" +"MONTY_MOLE_ROCK_ACT_HELD = 0\n" +"MONTY_MOLE_ROCK_ACT_MOVE = 1\n" +"UKIKI_ACT_IDLE = 0\n" +"UKIKI_ACT_RUN = 1\n" +"UKIKI_ACT_TURN_TO_MARIO = 2\n" +"UKIKI_ACT_JUMP = 3\n" +"UKIKI_ACT_GO_TO_CAGE = 4\n" +"UKIKI_ACT_WAIT_TO_RESPAWN = 5\n" +"UKIKI_ACT_UNUSED_TURN = 6\n" +"UKIKI_ACT_RETURN_HOME = 7\n" +"UKIKI_SUB_ACT_TAUNT_NONE = 0\n" +"UKIKI_SUB_ACT_TAUNT_ITCH = 1\n" +"UKIKI_SUB_ACT_TAUNT_SCREECH = 2\n" +"UKIKI_SUB_ACT_TAUNT_JUMP_CLAP = 3\n" +"UKIKI_SUB_ACT_TAUNT_HANDSTAND = 4\n" +"UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE = 0\n" +"UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO = 1\n" +"UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO = 2\n" +"UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE = 3\n" +"UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE = 4\n" +"UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE = 5\n" +"UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE = 6\n" +"UKIKI_SUB_ACT_CAGE_DESPAWN = 7\n" +"UKIKI_TEXT_DEFAULT = 0\n" +"UKIKI_TEXT_CAGE_TEXTBOX = 1\n" +"UKIKI_TEXT_GO_TO_CAGE = 2\n" +"UKIKI_TEXT_STOLE_CAP = 3\n" +"UKIKI_TEXT_HAS_CAP = 4\n" +"UKIKI_TEXT_GAVE_CAP_BACK = 5\n" +"UKIKI_TEXT_DO_NOT_LET_GO = 6\n" +"UKIKI_TEXT_STEAL_CAP = 7\n" +"UKIKI_CAGE = 0\n" +"UKIKI_CAP = 1\n" +"UKIKI_ANIM_RUN = 0\n" +"UKIKI_ANIM_UNUSED_WALK = 1\n" +"UKIKI_ANIM_UNUSED_APOSE = 2\n" +"UKIKI_ANIM_UNUSED_DEATH = 3\n" +"UKIKI_ANIM_SCREECH = 4\n" +"UKIKI_ANIM_JUMP_CLAP = 5\n" +"UKIKI_ANIM_UNUSED_HOP = 6\n" +"UKIKI_ANIM_LAND = 7\n" +"UKIKI_ANIM_JUMP = 8\n" +"UKIKI_ANIM_ITCH = 9\n" +"UKIKI_ANIM_HANDSTAND = 10\n" +"UKIKI_ANIM_TURN = 11\n" +"UKIKI_ANIM_HELD = 12\n" +"UKIKI_ANIM_STATE_DEFAULT = 0\n" +"UKIKI_ANIM_STATE_EYE_CLOSED = 1\n" +"UKIKI_ANIM_STATE_CAP_ON = 2\n" +"UKIKI_CAP_ON = 1\n" +"UKIKI_CAGE_STAR_ACT_IN_CAGE = 0\n" +"UKIKI_CAGE_STAR_ACT_SPAWN_STAR = 1\n" +"UKIKI_CAGE_ACT_WAIT_FOR_UKIKI = 0\n" +"UKIKI_CAGE_ACT_SPIN = 1\n" +"UKIKI_CAGE_ACT_FALL = 2\n" +"UKIKI_CAGE_ACT_HIDE = 3\n" +"PIRANHA_PLANT_ACT_IDLE = 0\n" +"PIRANHA_PLANT_ACT_SLEEPING = 1\n" +"PIRANHA_PLANT_ACT_BITING = 2\n" +"PIRANHA_PLANT_ACT_WOKEN_UP = 3\n" +"PIRANHA_PLANT_ACT_STOPPED_BITING = 4\n" +"PIRANHA_PLANT_ACT_ATTACKED = 5\n" +"PIRANHA_PLANT_ACT_SHRINK_AND_DIE = 6\n" +"PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN = 7\n" +"PIRANHA_PLANT_ACT_RESPAWN = 8\n" +"PIRANHA_PLANT_BUBBLE_ACT_IDLE = 0\n" +"PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP = 1\n" +"PIRANHA_PLANT_BUBBLE_ACT_BURST = 2\n" +"PLATFORM_ON_TRACK_ACT_INIT = 0\n" +"PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO = 1\n" +"PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK = 2\n" +"PLATFORM_ON_TRACK_ACT_PAUSE_BRIEFLY = 3\n" +"PLATFORM_ON_TRACK_ACT_FALL = 4\n" +"PLATFORM_ON_TRACK_BP_MASK_PATH = 0xF\n" +"PLATFORM_ON_TRACK_BP_MASK_TYPE = (0x7 << 4)\n" +"PLATFORM_ON_TRACK_BP_RETURN_TO_START = (1 << 8)\n" +"PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR = (1 << 9)\n" +"PLATFORM_ON_TRACK_BP_DONT_TURN_YAW = (1 << 10)\n" +"PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL = (1 << 11)\n" +"PLATFORM_ON_TRACK_TYPE_CARPET = 0\n" +"PLATFORM_ON_TRACK_TYPE_SKI_LIFT = 1\n" +"PLATFORM_ON_TRACK_TYPE_CHECKERED = 2\n" +"PLATFORM_ON_TRACK_TYPE_GRATE = 3\n" +"PURPLE_SWITCH_IDLE = 0\n" +"PURPLE_SWITCH_PRESSED = 1\n" +"PURPLE_SWITCH_TICKING = 2\n" +"PURPLE_SWITCH_UNPRESSED = 3\n" +"PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF = 4\n" +"PYRAMID_ELEVATOR_IDLE = 0\n" +"PYRAMID_ELEVATOR_START_MOVING = 1\n" +"PYRAMID_ELEVATOR_CONSTANT_VELOCITY = 2\n" +"PYRAMID_ELEVATOR_END_MOVING = 3\n" +"PYRAMID_ELEVATOR_AT_BOTTOM = 4\n" +"PYRAMID_TOP_ACT_CHECK_IF_SOLVED = 0\n" +"PYRAMID_TOP_ACT_SPINNING = 1\n" +"PYRAMID_TOP_ACT_EXPLODE = 2\n" +"PYRAMID_WALL_ACT_MOVING_DOWN = 0\n" +"PYRAMID_WALL_ACT_MOVING_UP = 1\n" +"PYRAMID_WALL_BP_POSITION_HIGH = 0\n" +"PYRAMID_WALL_BP_POSITION_MIDDLE = 1\n" +"PYRAMID_WALL_BP_POSITION_LOW = 2\n" +"PENGUIN_WALK_BABY = 0\n" +"PENGUIN_WALK_BIG = 1\n" +"PENGUIN_ANIM_WALK = 0\n" +"PENGUIN_ANIM_IDLE = 3\n" +"RACING_PENGUIN_ACT_WAIT_FOR_MARIO = 0\n" +"RACING_PENGUIN_ACT_SHOW_INIT_TEXT = 1\n" +"RACING_PENGUIN_ACT_PREPARE_FOR_RACE = 2\n" +"RACING_PENGUIN_ACT_RACE = 3\n" +"RACING_PENGUIN_ACT_FINISH_RACE = 4\n" +"RACING_PENGUIN_ACT_SHOW_FINAL_TEXT = 5\n" +"SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS = 0\n" +"SL_WALKING_PENGUIN_ACT_TURNING_BACK = 1\n" +"SL_WALKING_PENGUIN_ACT_RETURNING = 2\n" +"SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS = 3\n" +"SL_SNOWMAN_WIND_ACT_IDLE = 0\n" +"SL_SNOWMAN_WIND_ACT_TALKING = 1\n" +"SL_SNOWMAN_WIND_ACT_BLOWING = 2\n" +"WATER_BOMB_ACT_SHOT_FROM_CANNON = 0\n" +"WATER_BOMB_ACT_INIT = 1\n" +"WATER_BOMB_ACT_DROP = 2\n" +"WATER_BOMB_ACT_EXPLODE = 3\n" +"TTC_ROTATING_SOLID_BP_CUBE = 0\n" +"TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM = 1\n" +"TTC_MOVING_BAR_ACT_WAIT = 0\n" +"TTC_MOVING_BAR_ACT_PULL_BACK = 1\n" +"TTC_MOVING_BAR_ACT_EXTEND = 2\n" +"TTC_MOVING_BAR_ACT_RETRACT = 3\n" +"TTC_COG_BP_SHAPE_MASK = 0x00000002\n" +"TTC_COG_BP_SHAPE_HEXAGON = (0 << 1)\n" +"TTC_COG_BP_SHAPE_TRIANGLE = (1 << 1)\n" +"TTC_COG_BP_DIR_MASK = 0x00000001\n" +"TTC_COG_BP_DIR_CCW = (0 << 0)\n" +"TTC_COG_BP_DIR_CW = (1 << 0)\n" +"TTC_2D_ROTATOR_BP_HAND = 0\n" +"TTC_2D_ROTATOR_BP_2D_COG = 1\n" +"ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT = 0\n" +"ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT = 1\n" +"ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR = 2\n" +"DORRIE_ACT_MOVE = 0\n" +"DORRIE_ACT_LOWER_HEAD = 1\n" +"DORRIE_ACT_RAISE_HEAD = 2\n" +"MAD_PIANO_ACT_WAIT = 0\n" +"MAD_PIANO_ACT_ATTACK = 1\n" +"FIRE_PIRANHA_PLANT_ACT_HIDE = 0\n" +"FIRE_PIRANHA_PLANT_ACT_GROW = 1\n" +"FIRE_SPITTER_ACT_IDLE = 0\n" +"FIRE_SPITTER_ACT_SPIT_FIRE = 1\n" +"EYEROK_BOSS_ACT_SLEEP = 0\n" +"EYEROK_BOSS_ACT_WAKE_UP = 1\n" +"EYEROK_BOSS_ACT_SHOW_INTRO_TEXT = 2\n" +"EYEROK_BOSS_ACT_FIGHT = 3\n" +"EYEROK_BOSS_ACT_DIE = 4\n" +"EYEROK_BOSS_ACT_DEAD = 5\n" +"EYEROK_BOSS_ACT_PAUSE = 6\n" +"EYEROK_HAND_ACT_SLEEP = 0\n" +"EYEROK_HAND_ACT_IDLE = 1\n" +"EYEROK_HAND_ACT_OPEN = 2\n" +"EYEROK_HAND_ACT_SHOW_EYE = 3\n" +"EYEROK_HAND_ACT_CLOSE = 4\n" +"EYEROK_HAND_ACT_RETREAT = 5\n" +"EYEROK_HAND_ACT_TARGET_MARIO = 6\n" +"EYEROK_HAND_ACT_SMASH = 7\n" +"EYEROK_HAND_ACT_FIST_PUSH = 8\n" +"EYEROK_HAND_ACT_FIST_SWEEP = 9\n" +"EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND = 10\n" +"EYEROK_HAND_ACT_DOUBLE_POUND = 11\n" +"EYEROK_HAND_ACT_ATTACKED = 12\n" +"EYEROK_HAND_ACT_RECOVER = 13\n" +"EYEROK_HAND_ACT_BECOME_ACTIVE = 14\n" +"EYEROK_HAND_ACT_DIE = 15\n" +"EYEROK_HAND_ACT_DEAD = 16\n" +"EYEROK_HAND_ACT_PAUSE = 17\n" +"KLEPTO_ACT_CIRCLE_TARGET_HOLDING = 0\n" +"KLEPTO_ACT_APPROACH_TARGET_HOLDING = 1\n" +"KLEPTO_ACT_WAIT_FOR_MARIO = 2\n" +"KLEPTO_ACT_TURN_TOWARD_MARIO = 3\n" +"KLEPTO_ACT_DIVE_AT_MARIO = 4\n" +"KLEPTO_ACT_RESET_POSITION = 5\n" +"KLEPTO_ACT_STRUCK_BY_MARIO = 6\n" +"KLEPTO_ACT_RETREAT = 7\n" +"KLEPTO_ANIM_STATE_HOLDING_NOTHING = 0\n" +"KLEPTO_ANIM_STATE_HOLDING_CAP = 1\n" +"KLEPTO_ANIM_STATE_HOLDING_STAR = 2\n" +"BIRD_ACT_INACTIVE = 0\n" +"BIRD_ACT_FLY = 1\n" +"BIRD_BP_SPAWNED = 0\n" +"BIRD_BP_SPAWNER = 1\n" +"SKEETER_ACT_IDLE = 0\n" +"SKEETER_ACT_LUNGE = 1\n" +"SKEETER_ACT_WALK = 2\n" +"SNUFIT_ACT_IDLE = 0\n" +"SNUFIT_ACT_SHOOT = 1\n" +"TWEESTER_ACT_IDLE = 0\n" +"TWEESTER_ACT_CHASE = 1\n" +"TWEESTER_ACT_HIDE = 2\n" +"TWEESTER_SUB_ACT_WAIT = 0\n" +"TWEESTER_SUB_ACT_CHASE = 0\n" +"TRIPLET_BUTTERFLY_ACT_INIT = 0\n" +"TRIPLET_BUTTERFLY_ACT_WANDER = 1\n" +"TRIPLET_BUTTERFLY_ACT_ACTIVATE = 2\n" +"TRIPLET_BUTTERFLY_ACT_EXPLODE = 3\n" +"TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM = 0x00000003\n" +"TRIPLET_BUTTERFLY_BP_NO_BOMBS = 0x00000004\n" +"TRIPLET_BUTTERFLY_TYPE_NORMAL = -1\n" +"TRIPLET_BUTTERFLY_TYPE_EXPLODES = 0\n" +"TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP = 1\n" +"WATER_LEVEL_DIAMOND_ACT_INIT = 0\n" +"WATER_LEVEL_DIAMOND_ACT_IDLE = 1\n" +"WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL = 2\n" +"WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING = 3\n" +"MIPS_ACT_WAIT_FOR_NEARBY_MARIO = 0\n" +"MIPS_ACT_FOLLOW_PATH = 1\n" +"MIPS_ACT_WAIT_FOR_ANIMATION_DONE = 2\n" +"MIPS_ACT_FALL_DOWN = 3\n" +"MIPS_ACT_IDLE = 4\n" +"MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR = 0\n" +"MIPS_STAR_STATUS_SHOULD_SPAWN_STAR = 1\n" +"MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR = 2\n" +"FALLING_PILLAR_ACT_IDLE = 0\n" +"FALLING_PILLAR_ACT_TURNING = 1\n" +"FALLING_PILLAR_ACT_FALLING = 2\n" +"BOWSER_PUZZLE_ACT_SPAWN_PIECES = 0\n" +"BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE = 1\n" +"BOWSER_PUZZLE_ACT_DONE = 2\n" +"MR_BLIZZARD_ACT_SPAWN_SNOWBALL = 0\n" +"MR_BLIZZARD_ACT_HIDE_UNHIDE = 1\n" +"MR_BLIZZARD_ACT_RISE_FROM_GROUND = 2\n" +"MR_BLIZZARD_ACT_ROTATE = 3\n" +"MR_BLIZZARD_ACT_THROW_SNOWBALL = 4\n" +"MR_BLIZZARD_ACT_BURROW = 5\n" +"MR_BLIZZARD_ACT_DEATH = 6\n" +"MR_BLIZZARD_ACT_JUMP = 7\n" +"MR_BLIZZARD_STYPE_NO_CAP = 0\n" +"MR_BLIZZARD_STYPE_JUMPING = 1\n" "TIME_STOP_UNKNOWN_0 = (1 << 0)\n" "TIME_STOP_ENABLED = (1 << 1)\n" "TIME_STOP_DIALOG = (1 << 2)\n" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 4ad4033e..c2e35f19 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -14753,6 +14753,23 @@ int smlua_func_hud_show(UNUSED lua_State* L) { return 1; } +int smlua_func_movtexqc_register(lua_State* L) { + if(!smlua_functions_valid_param_count(L, 4)) { return 0; } + + const char* name = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { return 0; } + s16 level = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { return 0; } + s16 area = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { return 0; } + s16 type = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { return 0; } + + movtexqc_register(name, level, area, type); + + return 1; +} + int smlua_func_set_environment_region(lua_State* L) { if(!smlua_functions_valid_param_count(L, 2)) { return 0; } @@ -16810,6 +16827,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "get_temp_s32_pointer", smlua_func_get_temp_s32_pointer); smlua_bind_function(L, "hud_hide", smlua_func_hud_hide); smlua_bind_function(L, "hud_show", smlua_func_hud_show); + smlua_bind_function(L, "movtexqc_register", smlua_func_movtexqc_register); smlua_bind_function(L, "set_environment_region", smlua_func_set_environment_region); smlua_bind_function(L, "warp_exit_level", smlua_func_warp_exit_level); smlua_bind_function(L, "warp_restart_level", smlua_func_warp_restart_level); diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c index 1de763fa..e0cd52ae 100644 --- a/src/pc/lua/utils/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -90,6 +90,10 @@ s16 get_current_save_file_num(void) { /// +void movtexqc_register(const char* name, s16 level, s16 area, s16 type) { + dynos_movtexqc_register(name, level, area, type); +} + f32 get_environment_region(u8 index) { if (gEnvironmentRegions != NULL && index <= gEnvironmentRegions[0]) { return gEnvironmentRegions[6 * (int)index]; diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index 6d1921ed..e292a0cb 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -22,6 +22,7 @@ f32 get_hand_foot_pos_z(struct MarioState* m, u8 index); s16 get_current_save_file_num(void); +void movtexqc_register(const char* name, s16 level, s16 area, s16 type); f32 get_environment_region(u8 index); void set_environment_region(u8 index, s32 value); diff --git a/src/pc/lua/utils/smlua_model_utils.c b/src/pc/lua/utils/smlua_model_utils.c index b868f44f..fb1c5e09 100644 --- a/src/pc/lua/utils/smlua_model_utils.c +++ b/src/pc/lua/utils/smlua_model_utils.c @@ -552,7 +552,10 @@ u8 smlua_model_util_load(enum ModelExtendedId id) { u32 smlua_model_util_get_id(const char* name) { // find geolayout const void* layout = dynos_geolayout_get(name); - if (layout == NULL) { return E_MODEL_ERROR_MODEL; } + if (layout == NULL) { + LOG_ERROR("Failed to find model: %s", name); + return E_MODEL_ERROR_MODEL; + } // find existing model for (u32 i = 0; i < E_MODEL_MAX; i++) {