Fix lighting engine merge header mistake

This commit is contained in:
Agent X 2025-03-27 17:24:49 -04:00
parent c0e547e2d1
commit 02bd7917cb
6 changed files with 19 additions and 18 deletions

View file

@ -5200,7 +5200,7 @@ function set_anim_to_frame(m, animFrame)
end
--- @param m MarioState
--- @param targetAnimID integer
--- @param targetAnimID CharacterAnimID
--- @param accel integer
--- @return integer
--- Sets a character-specific animation where the animation speed is adjusted by `accel`. Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion)
@ -5209,7 +5209,7 @@ function set_character_anim_with_accel(m, targetAnimID, accel)
end
--- @param m MarioState
--- @param targetAnimID integer
--- @param targetAnimID CharacterAnimID
--- @return integer
--- Sets the character-specific animation at its default rate (no acceleration)
function set_character_animation(m, targetAnimID)

View file

@ -929,14 +929,14 @@ Sets a character-specific animation where the animation speed is adjusted by `ac
| Field | Type |
| ----- | ---- |
| m | [MarioState](structs.md#MarioState) |
| targetAnimID | `integer` |
| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) |
| accel | `integer` |
### Returns
- `integer`
### C Prototype
`s16 set_character_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel);`
`s16 set_character_anim_with_accel(struct MarioState *m, enum CharacterAnimID targetAnimID, s32 accel);`
[:arrow_up_small:](#)
@ -954,13 +954,13 @@ Sets the character-specific animation at its default rate (no acceleration)
| Field | Type |
| ----- | ---- |
| m | [MarioState](structs.md#MarioState) |
| targetAnimID | `integer` |
| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) |
### Returns
- `integer`
### C Prototype
`s16 set_character_animation(struct MarioState *m, s32 targetAnimID);`
`s16 set_character_animation(struct MarioState *m, enum CharacterAnimID targetAnimID);`
[:arrow_up_small:](#)

View file

@ -117,13 +117,6 @@ s16 set_mario_animation(struct MarioState *m, s32 targetAnimID) {
return mario_set_animation_internal(m, targetAnimID, 0x10000);
}
/**
* Sets the character specific animation without any acceleration, running at its default rate.
*/
s16 set_character_animation(struct MarioState *m, s32 targetAnimID) {
return mario_set_animation_internal(m, get_character_anim(m, targetAnimID), 0x10000);
}
/**
* Sets Mario's animation where the animation is sped up or
* slowed down via acceleration.
@ -132,11 +125,18 @@ s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel)
return mario_set_animation_internal(m, targetAnimID, accel);
}
/**
* Sets the character specific animation without any acceleration, running at its default rate.
*/
s16 set_character_animation(struct MarioState *m, enum CharacterAnimID targetAnimID) {
return mario_set_animation_internal(m, get_character_anim(m, targetAnimID), 0x10000);
}
/**
* Sets character specific animation where the animation is sped up or
* slowed down via acceleration.
*/
s16 set_character_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel) {
s16 set_character_anim_with_accel(struct MarioState *m, enum CharacterAnimID targetAnimID, s32 accel) {
return mario_set_animation_internal(m, get_character_anim(m, targetAnimID), accel);
}

View file

@ -35,13 +35,13 @@ s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel)
/* |description|
Sets the character-specific animation at its default rate (no acceleration)
|descriptionEnd| */
s16 set_character_animation(struct MarioState *m, s32 targetAnimID);
s16 set_character_animation(struct MarioState *m, enum CharacterAnimID targetAnimID);
/* |description|
Sets a character-specific animation where the animation speed is adjusted by `accel`.
Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion)
|descriptionEnd| */
s16 set_character_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel);
s16 set_character_anim_with_accel(struct MarioState *m, enum CharacterAnimID targetAnimID, s32 accel);
/* |description|
Sets the current animation frame to a specific `animFrame`

View file

@ -15915,7 +15915,7 @@ int smlua_func_set_character_anim_with_accel(lua_State* L) {
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_anim_with_accel"); return 0; }
s32 targetAnimID = smlua_to_integer(L, 2);
int targetAnimID = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_anim_with_accel"); return 0; }
s32 accel = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_character_anim_with_accel"); return 0; }
@ -15936,7 +15936,7 @@ int smlua_func_set_character_animation(lua_State* L) {
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_animation"); return 0; }
s32 targetAnimID = smlua_to_integer(L, 2);
int targetAnimID = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_animation"); return 0; }
lua_pushinteger(L, set_character_animation(m, targetAnimID));

View file

@ -33,6 +33,7 @@
#include "game/ingame_menu.h"
#include "game/first_person_cam.h"
#include "game/envfx_snow.h"
#include "game/mario.h"
#include "engine/math_util.h"
#include "engine/lighting_engine.h"