Commit graph

385 commits

Author SHA1 Message Date
Isaac0-dev
873bbd3c1d thought i fixed this ages ago
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-06-28 22:47:48 +10:00
djoslin0
c68ee859ea
Add mod development mode (#851)
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>
2025-06-22 19:07:15 +10:00
Isaac0-dev
9f5ec527d8 properly check if a model is permanent
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-06-18 17:18:27 +10:00
Isaac0-dev
d4ca501a5c fix graph node reset memory corruption
by only resetting permanent models (which is all that needs to be reset anyway).
2025-06-18 17:10:01 +10:00
djoslin0
24b92ecc2a
Add a safer version of Lua's require() (#847)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
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>
2025-06-14 19:49:07 +10:00
Isaac0-dev
8f1830b079 cleanup old gfx symbol management code 2025-06-14 14:58:55 +10:00
Isaac0-dev
27b7c3d823
mario object get optimizations (#840) 2025-06-09 20:04:24 +10:00
PeachyPeach
17c311ae7d
smlua event hooks refactor (#826)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-06-09 07:40:48 +10:00
Isaac0-dev
98ff007818 get_texture_average_color
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
pass in a texture, it returns the average color of the texture
2025-06-05 22:33:24 +10:00
Isaac0-dev
681ea52f4b fix crash during conflicting warps 2025-06-04 09:40:20 +10:00
Isaac0-dev
d6508def28 revise my latest changes
Some checks are pending
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
2025-06-04 07:58:02 +10:00
Isaac0-dev
f0d6e4331d reset modified graph nodes on network shutdown 2025-06-04 02:36:35 +10:00
Isaac0-dev
73e72e1b77 fix mirror mario with custom animations again [build]
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-06-03 17:17:19 +10:00
Agent X
318c8a4995 Fix macOS compile errors and warnings [build] 2025-05-22 08:48:05 -04:00
Prince Frizzy
02c9a4146b
More Optimizations (#792)
* Initial work on optimizations.

* Requested Changes Part 1

* Requested Changes Part 2

* Requested Changes Part 3

* Requested Changes Part 4

* Requested Changes Part 5

* Requested Changes Part 6

* Update deprecated.lua

---------

Co-authored-by: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com>
2025-05-16 20:27:49 -04:00
Agent X
7568a8564f The old dynos warp hook params worked fine
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-05-01 21:37:44 -04:00
Agent X
ee7d694940 Fix HOOK_ON_WARP and document more functions (87.18%) 2025-05-01 20:26:04 -04:00
Isaac0-dev
5c3ef3d419 fix mac compile
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-04-30 20:51:10 +10:00
ManIsCat2
29f9e7cfcb
Add G_PACKED_NORMALS Geo Mode from F3DEX3 (#768)
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* Add new geometry mode

* Fix lua vertex colors not working
2025-04-25 15:07:31 -04:00
PeachyPeach
0f351e11fb
Gfx/Vtx improvements (#756)
Some checks failed
Build coop / build-windows (push) Has been cancelled
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
- 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, ...)
2025-04-24 14:03:17 +10:00
Isaac0-dev
dcaa7e725d
fix resetting display lists (#752)
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
2025-04-18 02:28:15 +02:00
Isaac0-dev
25ff0c93c4 fix scrolling textures again
now that only vanilla vertices are duplicated
2025-04-17 11:49:04 +10:00
Agent X
6527ee1b7a Fix HOOK_ON_WARP params
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
2025-04-15 14:13:58 -04:00
Agent X
0cb0b41c07 Add some level commands to make porting HackerSM64 levels easier
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-04-14 19:25:05 -04:00
PeachyPeach
467b22e939
Gfx set command: v2 + Gfx/Vtx dynamic alloc (#718)
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
* 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
2025-04-12 18:19:14 -04:00
Blockyyy
43d2248727
HOOK_BEFORE_WARP, added params to HOOK_ON_LEVEL_INIT and HOOK_ON_WARP (#736) 2025-04-10 17:17:59 -04:00
Agent X
e1c0d87ea8 Add some missing gfx symbols to DynOS
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-04-08 17:30:00 -04:00
Isaac0-dev
a67c096ecb remove some double lookups in dynos
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-04-08 14:32:25 +10:00
Isaac0-dev
7dc31e3780 model pool fix
better fix than 1bfe9d509c
just checks the level pool for session models
2025-04-08 13:54:04 +10:00
PeachyPeach
b190ee09fb
Gfx Vtx vanilla only duplicates (#733)
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
2025-04-08 10:20:50 +10:00
Agent X
3a751aac56 Revert "move models to higher priority pools if needed"
This reverts commit 1bfe9d509c.
2025-04-06 13:35:40 -04:00
Isaac0-dev
1bfe9d509c move models to higher priority pools if needed
Some checks failed
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
sometimes, a model may be loaded by the level, but then a mod loads it for the session, which causes issues so we move the model to the right pool.
2025-04-04 14:17:16 +10:00
Isaac0-dev
049e767ac6 free stuff
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
2025-04-02 12:42:14 +10:00
Isaac0-dev
54d33d28ba fix scrolling textures simply not scrolling
this was caused by the duplicated vertices commit
2025-04-02 11:42:24 +10:00
Agent X
0ee8d5f81e Fix/optimize/improve lighting engine 2025-03-28 23:06:48 -04:00
Isaac0-dev
d81512680b
duplicate every instance of a display list (#720)
Co-authored-by: PeachyPeachSM64 <72323920+PeachyPeachSM64@users.noreply.github.com>
2025-03-28 09:17:53 +10:00
Agent X
3e540790a3
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
Agent X
f8230fe484 Correct DynOS skybox texture tile paths (WARNING: MAY BREAK SKYBOX TEXTURE PACKS DESIGNED FOR COOPDX)
Some checks failed
Build coop / build-macos-intel (push) Has been cancelled
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
2025-03-21 20:40:16 -04:00
Agent X
5eb1a27eb4 Make custom GEO_ASMs work inside level geo 2025-03-09 12:33:14 -04:00
Isaac0-dev
2fca847499 bring back skip_pack_generation 2025-03-04 17:13:00 +10:00
Isaac0-dev
d6e243c4a7 add obj_get_model_id_extended, remember regular model ids 2025-03-04 15:09:09 +10:00
Isaac0-dev
f238b3d0f5
allow Lua to manipulate displaylists and vertices (#675)
Co-authored-by: ManIsCat2 <137772623+ManIsCat2@users.noreply.github.com>
2025-02-27 14:27:55 +10:00
Sonic The
e24431928c
Lvl Macros (#678)
for dynos levels that use the normal macros
2025-02-23 07:44:53 +10:00
Agent X
abf818b90e Boy what the hell (unbreak mods and DynOS packs)
They dug me out of my grave and told me `configSkipPackGeneration`. My heart sank.
This feature would have been fine if it was off by default and if it wasn't then people caught it before the version was officially released and the option was promptly disabled without a massive pool of people having this option turned on by default.
So I will say, Coolio wasn't really in the wrong by adding this, it should have never been changed to be on by default.
2025-02-14 18:42:41 -05:00
Cooliokid956
2218428a4d
Skip DynOS binary file generation on startup (#638)
it is off by default, but the common player may want to turn it on to improve loading times
2025-01-19 18:49:15 +10:00
KirbyKidJ
d1d36a1fa2
Fixed MacOS Resource Path Location (#617)
* Fixed MacOS resource path

I'm not very good at C coding.

* Fixed formatting and ensured safe return
2025-01-07 16:27:11 -05:00
Isaac0-dev
547e22530c fix dynos warps castle grounds bug 2025-01-07 09:04:37 +10:00
PeachyPeach
49c9a2d57e
Fix typo in gfx command (DynOS) (#605) 2025-01-02 18:47:12 -05:00
Michael
735a7ec7a7
Japanese Support (#574)
* server console with commands

* better unicode support and japanese translation

* Update README.md

* restore unneeded changes

* missed this

* extra

* restore

* remove extra line

* spacing

* japanese aliased

* language display names

* Update .gitignore

* japanese language support

* more common kanji

* merging new images

* fix line conflicts

* again

* redefinition removal

* Update djui_font.c

* Update djui_font.c

* Update djui_font.c

* separated japanese glyphs and images

* Update .gitignore

* Update djui_font.c

* Revert "Update djui_font.c"

This reverts commit ab2ad8c189.

* Revert "separated japanese glyphs and images"

This reverts commit c3d0fd40e3.

* recombined sheets

* Update djui_font.c

* Update djui_font.c

* Update djui_font.c

* separated japanese glyphs and images

* Update Japanese.ini

---------

Co-authored-by: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
2024-12-31 10:32:31 -05:00
PeachyPeach
96932f5bf1
Custom geo function and switch nodes with Lua callback (#593) 2024-12-31 10:23:13 +10:00