Commit Graph

6 Commits (780ffb8cba94f4328dbfd86dbc115475992822a2)

Author SHA1 Message Date
MysterD 41a4fcf516 Keep animations in-bounds 2023-05-18 12:42:18 -07:00
MysterD 60d70d0d38 Fix several more possible crashes from the Lua API 2023-05-15 15:55:16 -07:00
MysterD d30b1e61a6 Add a container to animation tables so that we can track their length and stay in bounds 2023-05-10 20:57:35 -07:00
PeachyPeach 2aa6e1aa08
custom animations no dynos (#371)
Load animations with smlua_anim_util_register_animation and set them with smlua_anim_util_set_animation.
2023-04-28 21:00:17 -07:00
PeachyPeach 27db236b5d
Various bug fixes + Added is_game_paused() and more background music functions to lua (#93)
Bug: DynOS models with animations cannot swap animations if they are
     loaded via lua (smlua_model_util_get_id and
     obj_set_model_extended).
Fix: DynOS_Actor_GetActorGfx takes a graph node instead of a georef,
     and checks for DynosValidActors graph nodes if georef is NULL.

Bug: The game can crash when calling obj_set_model_extended inside a
     HOOK_ON_OBJECT_RENDER hook.
Fix: The crash happens in smlua_model_util_load_with_pool_and_cache_id
     due to pool being NULL. If the game can't allocate an
     AllocOnlyPool object, use DynOS to generate the graph node.

Bug: warp_to_level and similar functions don't trigger HOOK_ON_WARP.
Fix: Call HOOK_ON_WARP hooks in DynOS_Warp_UpdateWarp and
     DynOS_Warp_UpdateExit after level and mario initialization.

Bug: The game sometimes calls HOOK_ON_OBJECT_RENDER hooks for
     unintended objects.
Fix: Initialize hookRender field to 0 when creating an object.

Bug: Actions can't apply gfx offsets to characters that have an anim
     offset (Waluigi, Wario)
Fix: Add m->curAnimOffset to gfx.pos[1] instead of setting it to
     m->pos[1] + m->curAnimOffset, except during the jumbo star
     cutscene.
2022-05-14 14:28:25 -07:00
MysterD 78bda75e45 Massive DynOS refactor for performance/organization 2022-04-19 21:06:18 -07:00