From 6659377cd40e9a86b1fcb81db15cb29cc45b01f7 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:51:00 -0400 Subject: [PATCH] Constants fix --- autogen/convert_constants.py | 1 + docs/lua/constants.md | 1 + docs/lua/guides/hooks.md | 2 +- src/pc/lua/smlua_constants_autogen.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 404414a27..42e30b021 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -66,6 +66,7 @@ include_constants = { "src/audio/external.h": [ "SEQ_PLAYER", "DS_" ], "src/pc/mods/mod_storage.h": [ "MAX_KEYS", "MAX_KEY_VALUE_LENGTH" ], "include/PR/gbi.h": [ + "G_IMMFIRST", "^G_NOOP$", "^G_SETOTHERMODE_H$", "^G_SETOTHERMODE_L$", diff --git a/docs/lua/constants.md b/docs/lua/constants.md index ecaff1332..faf0fdef7 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -1254,6 +1254,7 @@ - G_MOVEMEM - G_VTX - G_DL +- G_IMMFIRST - G_TRI1 - G_POPMTX - G_MOVEWORD diff --git a/docs/lua/guides/hooks.md b/docs/lua/guides/hooks.md index 2c3cfa390..6bbef3b7c 100644 --- a/docs/lua/guides/hooks.md +++ b/docs/lua/guides/hooks.md @@ -146,7 +146,7 @@ The lua functions sent to `hook_event()` will be automatically called by SM64 wh | HOOK_MARIO_OVERRIDE_GEOMETRY_INPUTS | Called before running Mario's geometry input logic, return `false` to not run it. | [MarioState](../structs.md) m | | HOOK_ON_INTERACTIONS | Called when the Mario interactions are processed | [MarioState](../structs.md#MarioState) mario | | HOOK_ALLOW_FORCE_WATER_ACTION | Called when executing a non-water action while under the water's surface, or vice versa. Return `false` to prevent the player from being forced out of the action at the water's surface | [MarioState](../structs.md#MarioState) mario, `boolean` isInWaterAction | -| HOOK_BEFORE_WARP | Called before the local player warps. Return a table with `destLevel`, `destArea`, `destAreaWarpNode`, and `arg` to override the warp | `integer` destLevel, `integer` destArea, `integer` destAreaWarpNode, `integer` arg | +| HOOK_BEFORE_WARP | Called before the local player warps. Return a table with `destLevel`, `destArea`, `destWarpNode`, and `arg` to override the warp | `integer` destLevel, `integer` destArea, `integer` destWarpNode, `integer` arg | ### Parameters diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 19d8ac6bb..8d9796cb1 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -1331,6 +1331,7 @@ char gSmluaConstants[] = "" "G_MOVEMEM=3\n" "G_VTX=4\n" "G_DL=6\n" +"G_IMMFIRST=-65\n" "G_TRI1=(G_IMMFIRST-0)\n" "G_POPMTX=(G_IMMFIRST-2)\n" "G_MOVEWORD=(G_IMMFIRST-3)\n"