26 Commits
Author SHA1 Message Date
PeachyPeachSM64 98265ae931 Prevent compiling dynos packs with lua variables; Instead of killing the game, don't enable actor in dynos pack if it contains lua variables 2026-05-29 14:04:56 +02:00
PeachyPeach 23fd02fab1 Fix Lua/custom behaviors bugs and flaws (#1229)
* improve custom behaviors logic

* clarify description of get behavior functions; get name returns last name instead of first; create generic name only when needed

* review

* fix potential buffer overflow
2026-05-19 10:56:08 +10:00
PeachyPeach 0a777908e7 Fix DynOS generation bug with duplicates (#1220)
When generating multiple actors, if two or more data nodes share the same name, the generated actors can reference the wrong nodes in their display lists/geo layouts.
This results in:
- The wrong nodes compiled into binary files
- Intermediate layouts generated as actors since nothing is referencing them anymore, treating them as root geo layouts

The simplest fix was to first check for the model identifier (renamed to `mDataIdentifier`, since it's no longer related to models) when looking for nodes, to ensure it picks the right node, even if multiple nodes share the same name.
2026-05-18 07:50:20 +10:00
EmeraldLockdownandAgent X e83985c64e Mark all unused variables as unused, resolve other warnings (#1147)
* Mark all unused variables as unused, resolve some unsafe code, some things still need to be looked at

* Remove a lot of unused variables that didn't need to exisat

* Remove UNUSED keyword from appartion values

---------

Co-authored-by: Agent X <44549182+AgentXLP@users.noreply.github.com>
2026-04-21 23:40:24 -04:00
EmeraldLockdown 032f9cfab9 Fix cutscenes, syncing issues, and more (Yoshi!) (#1109)
* Fixes

* Lots more changes

* Yoshi :D

* Remove some unecessary changes

* Oops

* Remove temp code

* Revert changes made to king bobomb, will be handled in #1196

* copied from main not dev, oops

* Address review and do a minor improvement

* Nuke that
2026-04-21 23:37:30 -04:00
PeachyPeach cf12509e9e Validate DynOS behaviors (#1115) 2026-02-12 00:41:28 +01:00
PeachyPeachSM64 d1a779d355 Enforce function pointers types in dynos
geo layouts -> geo_* functions only
behaviors -> bhv_* functions only
level scripts -> lvl_* functions only
other -> no function allowed

thanks maniscat for reporting the issue
2025-08-17 19:27:41 +02:00
PeachyPeachSM64 a620838394 dynos behaviors: adding missing fields and small bug fix 2025-07-29 16:33:22 +02:00
djoslin0andMysterD 6683e3eb87 Regenerate DynOS assets when source files are modified (#873)
Previously to recompile DynOS assets you had to remove the
bin/lvl/bhv/tex/col/etc files. Now the game will compare the
last-modified-timestamps of the generated/compiled assets vs
the other files that are within those directories. If the presumed-
source files have a later modified timestamp DynOS will regenerate
those assets.

While this results in scanning the attributes of files more, it
also prevents parsing files unnecessarily. Previously actors
would always parse their source files and build up GfxData
unnecessarily.

---------

Co-authored-by: MysterD <myster@d>
2025-07-02 23:24:35 +10:00
Agent X 0ebb1ce21b Basic Vertex Point Lighting Engine (#716)
* CONCEPT: Basic vertex lighting engine

Set the geometry mode on your model to G_LIGHTING_ENGINE_EXT, spawn a `bhvAmbientLight`, spawn some `bhvPointLight`s, and then you got yourself a mighty interesting scene.

* Fixes

* How did I miss this

* Make light set home pos
2025-03-27 16:36:02 -04:00
Sonic The 33329c0437 Lvl Macros (#678)
for dynos levels that use the normal macros
2025-02-23 07:44:53 +10:00
Agent X c2596f6686 Fix some DynOS prints 2024-06-02 15:58:03 -04:00
Isaac0-dev 901473ecfb exposed a bunch of interaction functions to Lua (#22)
Renamed the function interact_unknown_08 to interact_spiny_walking
and added the constant INTERACT_SPINY_WALKING, which has the same value of INTERACT_UNKNOWN_08
INTERACT_UNKNOWN_08 is kept for compatibility with smlua, and behavior dynos bins
2024-05-03 18:38:21 +10:00
Agent X 5ac62b41f3 Change around printing a little 2024-04-19 13:32:39 -04:00
Agent X 7892b279f4 Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
Agent X cf76e78c44 Add crash preventions to DynOS_Tex_Get 2024-03-22 18:54:24 -04:00
Agent X 585a043697 Add OBJ_LIST_EXT in place of OBJ_LIST_UNUSED_1 2024-03-04 20:09:53 -05:00
b1300ef210 sm64coopdx
Co-Authored-By: Yuyake <140215214+AngelicMiracles@users.noreply.github.com>
Co-Authored-By: FluffaMario <50761036+FluffaMario@users.noreply.github.com>
Co-Authored-By: Gregory Heskett <gheskett@gmail.com>
Co-Authored-By: iZePlayzYT <69536095+iZePlayzYT@users.noreply.github.com>
Co-Authored-By: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-Authored-By: eros71 <16540103+eros71-dev@users.noreply.github.com>
2023-10-30 01:03:36 -04:00
MysterD b6a315423a Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
PeachyPeach e989c42cac Make most used and useful features built-ins (#242)
* made all bools u8 for consistency with fixCollisionBugs
* preview blue coins + visible secrets
* preserve indexing
* star number
* hud cap timer
* red coins radar + secrets radar
* extended pause display
* autogen
* only sDynosBuiltinFuncs is sensitive to indexing
* rebased
2023-02-26 03:15:54 +01:00
Prince Frizzy 69d9ce4eec Sanity checks for the .bhv system (#293)
* Barebones fix.

* Sanity checks for the .bhv system.

* Two more sanity checks.
2023-02-22 15:12:09 -05:00
wRadion c8f9f87e8b Handle RM_Scroll_Texture and editor_Scroll_Texture behaviors from RM2C hacks (#173) 2022-08-25 17:46:33 -07:00
PeachyPeach 3b1816c023 DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
MysterD 926c64a6c0 More custom bhv cleanup 2022-06-02 19:33:28 -07:00
MysterD dcab177f6a Cleanup ; recursive descent fixes ; fixed behavior override comparisons
Moved dynos parsing for bhvs and models to a common file
Fixed recursive descent to correctly parse the entire expression
Adjusted bhv generation to use recursive descent
Switched all known behavior comparisons to the overridden versions
Fixed issue with Chain Chomp in star road
2022-06-02 19:07:43 -07:00
Prince Frizzy 8b3b2a1113 Added a full new custom behavior system (#124) 2022-06-02 12:19:54 -07:00