Add a way to save and load a gfx state in display lists.
Its primary purpose is to save the gfx state before rendering a held object, then restore it later.
It fixes the issue where Mario had opaque legs with the vanish and metal caps when holding an object.
* Scale bone anim support
Code changes provided by ExcellentGamer. Supports model anims which modify scale.
* Peachy code changes by ExcellentGamer
* Autogen constants
* changed vc3f_set to vec3f_copy
Allows modders to play audio streams on channels other than level background music.
4 constants have been added for this purpose:
- `MOD_AUDIO_CHANNEL_MASTER` - sound is only affected by master volume
- `MOD_AUDIO_CHANNEL_MUSIC` - sound is affected by music volume, same as previous behaviour
- `MOD_AUDIO_CHANNEL_SFX` - sound is affected by sfx volume, same as sample behaviour
- `MOD_AUDIO_CHANNEL_ENV` - sound is affected by env volume
This was done instead of using the existing `SEQ_PLAYER_*` constants to avoid confusion and because there isn't a `NONE`/`MASTER` option.
Additionally, sets the default to `MOD_AUDIO_CHANNEL_MUSIC` as to not break compatibility.
```lua
audio_stream_set_volume_channel(stream, MOD_AUDIO_CHANNEL_SFX) -- wow its just like a sample
audio_stream_get_volume_channel(stream) -- returns MOD_AUDIO_CHANNEL_SFX (its actually 2)
```
## Low hanging fruit optimisations for the memory data structures in `memory.c`
Mostly generic performance improvements:
- Swapping `calloc` calls for `malloc` calls where it's safe
- Combined allocations into one large allocation for `node + buffer`
- Using `realloc` instead of full `calloc` + `memcpy` + `free`.
- Add `smlua_collision_add_surface`, `_move_surface`, `_delete_surface` Lua APIs
- Add `remove_static_object_collision` to fully free a SOC and its surfaces
- Split surface pools into separate static, SOC, and dynamic pools
- Replace index-based SOC tracking with unique ID counter (`sSOCIdCounter`)
- Invalidate Lua CObjects for recycled surfaces on pool clear
- Expose `SURFACE_POOL_STATIC/DYNAMIC/SOC` constants to Lua
- Add `growing_array_swap_and_pop` and `growing_array_swap_and_pop_index` to memory utils
Co-authored-by: MysterD <myster@d>
Applied a compatibility band-aid for `ModAudio.file.relativePath` using unions and properties. The only real thing here is the new hidden `return_self` function I had to make for this to work
unction
* This is an awful workflow. Probably still need to update dx11 program ver
* Yea, going to despise this workflow
* Whoops
* Weewoo
* Fix comp error
* Bump dx11 ver due to it having an extremely limited number of inputs
* CObject Properties
- Added property members to CObjects via `PROPERTY` macro
`PROPERTY(name, get, set)`
- `name`: property name
- `get`: `fun(self): value`
- `set`: `fun(self, value)`
- Prettified `LuaObjectField` struct with unions for function/property value types
- Added properties to `struct ModAudio`
- `position`
- `looping`
- `frequency`
- `volume`
- NOTE: only work with streams- the audio reform will come later
* Define array size only when necessary
- new `__pairs` metamethod for `CObject`s, cycles through all of an object's fields, in alphabetical order
- stray semicolon!
* Add version info (Windows) + Smart update checker
* patch autogen, remove prints
* Fix special case (min=0,fix=!0)
* Not that obvious!!
* Still too obvious... last one
* the djoslin0 review
* Nuked
* Control the Lighting Engine with le_disable and le_enable in real time
(FORK REDO FOR PR)
* I hate it when I typo
* Control the Lighting Engine in real time with le_set_active (new change)
* Changed to le_set_enabled to be better in line with functions
- Custom geo asm and custom behaviors were meant to use any non-local
function from any active mod, but the condition for it was always
false (gSmLuaConvertSuccess is never set to false and funcRef is not
checked)
- By default, they should NOT be able to retrieve anything from other mods
- Even without this condition, they are still allowed to use any
function exposed to _G
Approved by Isaac.
cyrillic letters in font_normal adjusted by @idiotforge, in font_hud adjusted by @xLuigiGamerx
in the recolorable hud font, i fixed some things i missed last time
* Introduce this new pack in a more proper reviewable manner
Ideally I should have made a PR for my new pack and I understand the new geo function may have come out of no where. I've been thinking about adding it for a while and was going to utilize it in a new project I'm working on but I should have explained it first before pushing anything for sure
* Address suggestions
* Restore these, whoops
* 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>
* 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
* Add "do not show again" checkbox to host message panel
* remove unused lines
was messing with the checkbox size to see how it would look but in the end i just kept it default, so these are now just useless lines i forgot to remove
* Add Russian and Spanish translations
* Improved deadzone implementation (sneaking now possible even with high deadzones)
* Reworked deadzone algorithm
* Faster/Stronger/Better
* minor renaming
* Requested change
* use float instead of double sqrt()
This reverts commit e22d85b119.
Lack of PR.
Built-in DynOS packs have barely any utility in the coopdx build,
specifically if it's private jokes/references.
Coop Cafe is a private community associated with coopdx, not a core part
of it.
This pack should be distributed as a separate mod instead.
- Fix `mod_storage_load/save_number` incorrect behavior. These functions should now be used only with numbers, not integers (see next point). The `mod_storage_load_number` can still load integer values from existing mod storage files.
- Add `mod_storage_load/save_integer` for integer values.
- Expand the range of savable values to `double` (64-bit float) and `long long` (64-bit integer) for respectively `number` and `integer` mod storage functions.
- Fix an obscure bug with `smlua_to_integer` that truncated very high integer values due to an implicit cast to double, causing floating-point imprecision issues. Thanks @yoshiweegee for the explanation.