Commit graph

87 commits

Author SHA1 Message Date
Isaac0-dev
bff72db960 add a more accurate way to know the last active mod
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-22 09:47:26 +10:00
Isaac0-dev
f6d6de7fc8 remove gCamera from Lua
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
rip any mods that use it
2025-04-04 11:25:07 +10:00
Isaac0-dev
d07e31de49 update gCamera as the pointer is updated 2025-03-28 14:51:28 +10:00
Isaac0-dev
8feea0111e deal with gCamera being exposed incorrectly 2025-03-28 14:33:40 +10:00
Isaac0-dev
2dd17af4e1 explicitly allow setting cobjects to nil 2025-03-14 10:24:33 +10:00
Isaac0-dev
04ea4d6ad4 smlua use lot and lvt names rather than an index 2025-03-10 12:21:48 +10:00
Isaac0-dev
d71ef89dbb add help in cobject arrays for 0 indexed accesses
in case people try to access the array starting at 0
2025-02-21 09:37:57 +10:00
Isaac0-dev
ef3c38ddd6 allow getting lot and pointer from cobject arrays 2025-02-18 17:25:42 +10:00
Isaac0-dev
22f63c9e05 fix cobject arrays: implement setting fields 2025-02-18 15:09:22 +10:00
Isaac0-dev
ff09a2d724 fixed custom object fields 2025-02-14 23:04:23 +10:00
Isaac0-dev
4d063faf27 revert perfect hashing attempt
was implemented wrong anyway
2025-02-13 12:59:14 +10:00
Isaac0-dev
5598faf7e3 experimental: add perfect hashing for faster smlua lookups 2025-02-12 23:44:54 +10:00
Isaac0-dev
ff83d6a037 autogen array implementation
arrays are pushed to Lua via tables
2025-02-12 17:38:38 +10:00
Isaac0-dev
91f42e84dc fix a typo 2025-02-10 07:54:46 +10:00
Isaac0-dev
939218dcf9
smlua improvements (#607)
* smlua improvements

* fix non dev compile error

* fixes
2025-01-05 18:07:16 -05:00
PeachyPeach
1c950ba57c
Autogen vector types (#594) 2024-12-30 18:14:51 -05:00
jayden
c8faa22072
Final touches for geo hooks (#588)
* new geo process children hook

* EXPOSE the mat stack

* fix formatting (oops)
2024-12-28 08:44:36 -05:00
Radek Krzyśków
c03075549e
Added missing validations on smlua_to_string to avoid nullptr deref (#561) 2024-12-15 09:27:51 +10:00
Isaac0-dev
f503785ec2 manage cobject pointers better 2024-10-07 22:14:11 +10:00
Isaac0-dev
4aa2a20f72
fixes, clean up and some new features (#259)
- Only inited `smlua_audio_utils` if needed, since there will probably be plenty of people who play without ever using mods with custom audio.
- Fixed the pause anywhere setting - this ended up not being fully accurate to ex-coop, which it was originally intended to be.
- Stopped regenerating dynos collision bin on start up every time therefore giving a slight start up speed boost for some people.
- Added a config file setting that lets people choose to compress dynos bins on startup (disabled by default).
- Fixed a warning that shows on non macs during compiling.
- Properly fixed the chat box focus.
- Made the public lobby rules panel "temporary".
- Added a cleaner loading screen design.
- Added an ex-coop theme easter egg, can only be activated from the config file.
- Cleaned up the Lua traceback logging, now shows the folder and file the error occurred in, rather than the full path.
- Added a way to set `gCheckingSurfaceCollisionsForCamera`, so mods can specify to surface finding functions to ignore `SURFACE_FLAG_NO_CAM_COLLISION` internally.
- Rewrote the way smlua pushes CObjects/CPointers to Lua. Now using the C Lua API entirely to connect to Lua.
	- Fixed a use-after-free bug that could easily crash the game through Lua (explained further in one of my comments below).
- Fixed a common crash in `audio_sanity_check`.
2024-09-12 19:09:01 +10:00
Agent X
4967c911cc This is dangerous, apparently 2024-06-29 16:39:27 -04:00
Agent X
0e0b3c1862 Expose gCurrentArea and gCamera to Lua 2024-06-10 11:32:05 -04:00
Isaac0-dev
16400321e5
palette editor cutscene fixes, press Z to toggle cap (#54)
this removes the forced taking cap off while in the palette editor. press Z to remove cap now.
it also fixes various problems that could happen that would cause the cap to stay off when it shouldn't. also fixed the taking off cap custom action sometimes playing the animation all the way through when it shouldn't.

translations by DeepL, eros, Flower35 and Skeltan
2024-06-07 19:41:22 +10:00
PeachyPeach
14cbb673fc
Proper custom object fields (#39) 2024-05-14 08:52:56 +10:00
Agent X
6886f248f8 Add gControllers 2024-01-01 14:43:44 -05:00
Agent X
cc9348c71c Fix compilation warnings 2023-11-21 17:44:36 -05:00
Isaac0-dev
23193887db added HOOK_MIRROR_MARIO_RENDER to Lua (#514)
* added HOOK_MIRROR_MARIO_RENDER to Lua

Previously there was no way to interact with mirror Mario using the Lua api, so this fixes that.

* remove premature optimisation

* revert that
2023-11-21 17:00:35 -05:00
Agent X
e79775aea4 Improve first person and add gFirstPersonCamera 2023-11-11 16:49:46 -05:00
Agent X
49bca1cc01 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
PeachyPeach
610bdfcf04
fix C string typing (#459) 2023-08-18 18:31:59 +02:00
MysterD
2083242b66 Fixed several crashes and errors found in static analysis 2023-05-15 01:15:20 -07:00
PeachyPeach
df248e5139
Adding hazardType to HOOK_ALLOW_HAZARD_SURFACE; more loading info (#355) 2023-04-23 12:11:56 -04:00
Agent X
4e293712fd
Expose Paintings to Lua (#279)
* Expose paintings to Lua

* Make some "dangerous" fields immutable

I just thought being able to edit paintings IDs from Lua was a little bit too much.
2023-02-16 18:54:38 -05:00
Prince Frizzy
523e7842d9
A bunch of LUA autogen additions. (#235)
* A bunch of LUA autogen additions.
- Add support for Vec4f, Vec4s and Mat4 in the autogen.
- Improve error messages for improper argument counts
- Added support for more pointer types in the autogen.

* Fix offsets in sMat4Fields.

* autogen: Rework this at the request of DJ.
2022-11-30 00:37:12 -08:00
wRadion
44bbd23f83
Handle RM_Scroll_Texture and editor_Scroll_Texture behaviors from RM2C hacks (#173) 2022-08-25 17:46:33 -07:00
MysterD
725e26fe83 Make bass sound interface easier to handle 2022-05-08 04:04:14 -07:00
MysterD
80a5638bd1 Added more detailed lua error logs 2022-04-23 00:15:08 -07:00
MysterD
174e3d97ed Made Lua errors show a backtrace for almost all cases 2022-04-22 23:31:25 -07:00
MysterD
0d29a29c1b Use binary search for all Lua cobject fields 2022-04-22 18:51:25 -07:00
MysterD
5cfef9abb3 Added gActiveMods global to lua 2022-04-22 18:44:59 -07:00
MysterD
defb7dc830 Made trajectories overridable from Lua 2022-04-08 23:01:41 -07:00
MysterD
ef63435bc1 Un-hardcoded vanilla trajectories 2022-04-08 21:01:17 -07:00
MysterD
72584d5552 Refactored StarPositions 2022-04-08 19:46:01 -07:00
MysterD
37367a9756 Made the entry level configurable by Lua 2022-04-08 19:39:22 -07:00
MysterD
6a7712b1c8 Allow Lua to adjust default star spawn positions 2022-04-08 00:37:20 -07:00
MysterD
046c595f92 More progress toward custom DynOS levels 2022-04-02 15:14:04 -07:00
Prince Frizzy
54a6135cb9
Cleanup Deluxe (#45) 2022-03-29 20:45:56 -07:00
MysterD
47d2fe30a7 Made Lua object custom fields allocate deterministically 2022-03-26 23:58:04 -07:00
MysterD
de048928ce Added ability for Lua mods to adjust gServerSettings 2022-03-26 01:08:15 -07:00
MysterD
b7be386200 Add gLakituState to Lua 2022-03-25 23:58:10 -07:00