* zip + json properties; check existing file in create file
* smlua_audio_utils_replace_sequence
* audio_stream_load, audio_sample_load, smlua_model_util_get_id
* get_texture_info + can also load PNG files
* smlua_collision_util_get
* add wildcard in properties files + set text mode
* filepath restrictions
* Some mod_storage improvements
- Cache mod storage files into a map to reduce file I/O
- Fix a bug in mod_storage_save
- Add mod_storage_load_all that returns all keys/values as a table
* shutdown; fix buffer overflow; fix warnings; lua table
* reject binary files starting with MZ or ELF
* function members
* better doc
* adding file rewind
* ModFS guide; replace yaml by ini; read string buffer changes
* all OBJECT fields are now Lua variables
* add lua variable support to SHOW_DIALOG
* fix object_with_acts
* minor tweak
* Peachy review
---------
Co-authored-by: PeachyPeachSM64 <72323920+PeachyPeachSM64@users.noreply.github.com>
Shared graph nodes were incorrectly interpolated, only the first object with a shared graph node was interpolated properly.
Thanks to @Cooliokid956 for noticing that most of node types were **never** interpolated.
- Use a double hashmap to store interpolated data for each graph node and object. All translations, rotations and scales are now interpolated correctly.
- Add `GraphNodeScaleXYZ` type to scale to all 3 dimensions; Add `GEO_SCALE_XYZ` command.
gMtxTbl was also reaching it's limit, so dynamic allocation was added.
geo layouts -> geo_* functions only
behaviors -> bhv_* functions only
level scripts -> lvl_* functions only
other -> no function allowed
thanks maniscat for reporting the issue
This fixes inconsistent mappings between `sSm64CharMap` and `str_ascii_to_dialog` (used in `smlua_text_utils_dialog_replace`) to make the `text` field of `dialogEntry` consistent
`str_ascii_to_dialog` now also has mappings for the interpunct (`•`) and the double opening (`<<`) and closing (`>>`) quotes, which were missing before.
Lights are also zero indexed now which I could change to being one indexed but I think this is better anyway.
I restored ambient light objects setting it every frame since it broke a mod I was working on.
Sorry if any of these changes break anything you're working on dj.
Kaze would be proud though I bet
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>
* Fix warping from one custom level to another
* Remove cached level warps
* More comments, use LEVEL_UNKNOWN_X
* more readability
* clear custom level slots on unload
---------
Co-authored-by: MysterD <myster@d>
* type checking for dynos gfx symbol parsing
* peachy review
* better parameter counting
* using peachy's changes
* Update dynos_bin_gfx.cpp
seems like fast64 write 0 instead of NULL for null pointer, which is technically valid
---------
Co-authored-by: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com>
Just making a brief commit and thats all to add onto dj's lighting engine improvements because I heard about the PR, in mine I
* allowed all Vtx objects to be manipulated/retrieved
* updated lighting engine demo to be an SM64 night mode with a flashlight
* Fixed longterm bug where lighting bugs out unless you spawn a light
* Added new default LE mode LE_MODE_AFFECT_ALL_SHADED_AND_COLORED which also affects vertex colored surfaces
With mod development mode on you can press the L bind while paused to
reload the active mods. This reload will rescan the directories for
the active modes and thus refresh their file caches.
Mod development mode also enables live lua module reloading. Any time
a lua module is updated, coop will live reload the functions that changed
and do its best to maintain the previous variable states.
---------
Co-authored-by: MysterD <myster@d>
I didn't add standard Lua require() because I've always been
afraid of it. I'm not sure we can guarantee which files it
will read (or not read).
Instead, here is a custom implementation. It should work more
or less the same and allow for more modular code.
For backwards compatibility reasons, all of the lua files in
the base mod folder will be loaded as in the past. Aka one at
a time and alphabetically.
However, now coop will look for Lua files in subdirectories
and will load them in when another Lua file calls require().
The file search order is more reasonable than normal Lua
require(). It will first look for files relative to the
currently running script. If there is no matching relative
file, it will pick from any Lua file that is in any of the
mod's subdirectories.
---------
Co-authored-by: MysterD <myster@d>
- Renamed the `new` and `realloc` functions to `create` and `resize`
- Added `delete_all`
- Made Mod Data a class:
- Allocation is now limited to prevent out-of-memory crashes: 1024 display lists of max size 2048 and 1024 vertex buffers of max size 4096 per mod
- Added error codes to identify the cause of a failure (name not found, pointer not found, max size exceeded, item pool is full, ...)
* set_gfx_command part 2
* part 3
* get gfx/vtx from name; copy gfx/vtx
* gfx/vtx dynamic allocation lua
* gfx/vtx_new: don't take level/model/vanilla names
* Clean up gbi constants
* update example
* Isaac review; add gfx_get_next_command and vtx_get_next_vertex
* make all commands length 1; missing NULL checks
Some changes for gfx vtx duplication:
- Only vanilla (read-only) stuff is duplicated
- Stuff is duplicated only once, and uses a map rom->ram for next iterations
- Stuff is restored to original values on network shutdown
also fixes incorrect types in some extern declarations