Commit Graph

40 Commits (b5e9dd24237b52d3d3a715b07f9831f91e4d0ec5)

Author SHA1 Message Date
Agent X 3d80dc7f16 Override envfx from Lua (#316)
* Override envfx from Lua

set_override_envfx(-1) to reset override

* Fix type mismatch
2023-03-23 14:46:15 -04:00
Agent X 05687b838e Fix compilation warnings and stop demos when hosting (#313)
* [WIP] fix warnings

Committing now as is for Isaac to take a look at this.
Having issues with VERSION_TEXT

* Fix VERSION_TEXT crash and stop demos on host
2023-03-21 22:41:43 -04:00
Isaac0-dev 5911cc4d18 fixes and other improvements (#309)
* HOOK_JOINED_GAME

* expose VERSION_TEXT, and two more adjusments

* show if a constant type is a string with autogen

* fix another blunder by that guy

* should use an or operator here

* fix frame limiter stuff
2023-03-21 19:43:29 -04:00
Agent X 33585f00ea Move everything over (#280) 2023-03-20 22:36:25 -04:00
Agent X deb6ab7804 Expose sound_banks_enable/disable to Lua (#311) 2023-03-18 17:12:33 -04:00
Agent X 083dc1a037 area_create_warp_node and area_get_warp_node* (#270)
* area_get_warp_node*

- Added area_get_warp_node to Lua
- Added area_get_warp_node_from_params to Lua

* area_create_warp_node and warp constants

Here you go Isaac!

* Add object param

* Commits work again, pushing everything else
2023-02-20 21:47:32 -05:00
Agent X 0f8a53487d Expose version constants to lua (#264) 2023-02-08 10:42:16 -05:00
Agent X 9191de2436 Mod storage, network_discord_id_from_local_index and other small changes (#200)
* Mod storage & network_discord_id_from_local_index

Introducing mod storage, a key/value system for saving things like high scores or settings or anything like that to AppData\Roaming\sm64ex-coop\sav\mod-name.sav (Windows example)
You can currently save only strings meaning if you want to save a number you'd need to do
mod_storage_save("score", tostring(score))
and then
score = tonumber(mod_storage_load("score"))
To handle types like that.
network_discord_id_from_local_index() returns the discord ID of a player by local index.
Some misc changes I made were removing the unsed ini.h include in save_file.c and making the autogen converters output LF line endings instead of CRLF on windows.

* Prevent getting id if using direct connect

* Update djui_panel_player.c

Why does this bother me?

Co-authored-by: djoslin0 <djoslin0@users.noreply.github.com>
2022-09-26 19:28:26 -07:00
Agent X 05b2dcbefe Expose level_trigger_warp and related constants (#197) 2022-09-19 19:51:27 -07:00
Agent X 9924d72f27 Mouse lock & freeze cam fixes and warp constants (#103) 2022-05-19 17:06:51 -07:00
Agent X 48af31e0bf Add surface_terrains.h to constants (#77) 2022-05-02 17:31:55 -07:00
PeachyPeach 5ddf093c26 HOOK_ALLOW_INTERACT; new HUD functions (#73)
Added new hook: HOOK_ALLOW_INTERACT:
        Called before Mario interacts with an object. Return true to allow the interaction.
        The hook signature is bool function(MarioState, Object, InteractionType)

    Added new HUD constants:
        enum HudDisplayValue:
            HUD_DISPLAY_LIVES
            HUD_DISPLAY_COINS
            HUD_DISPLAY_STARS
            HUD_DISPLAY_WEDGES
            HUD_DISPLAY_KEYS
            HUD_DISPLAY_FLAGS
            HUD_DISPLAY_TIMER
        enum HudDisplayFlags:
            HUD_DISPLAY_FLAGS_NONE
            HUD_DISPLAY_FLAGS_LIVES
            HUD_DISPLAY_FLAGS_COIN_COUNT
            HUD_DISPLAY_FLAGS_STAR_COUNT
            HUD_DISPLAY_FLAGS_CAMERA_AND_POWER
            HUD_DISPLAY_FLAGS_KEYS
            HUD_DISPLAY_FLAGS_UNKNOWN_0020
            HUD_DISPLAY_FLAGS_TIMER
            HUD_DISPLAY_FLAGS_EMPHASIZE_POWER

    Added new HUD functions:
        s32 hud_get_value(enum HudDisplayValue type)
        void hud_set_value(enum HudDisplayValue type, s32 value)
        void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height)
2022-04-30 17:33:38 -07:00
MysterD 78f3a573ba exposed sequence ids to lua 2022-04-15 21:51:18 -07:00
MysterD 37e2593279 Unhardcoded all behavior dialogs, allowed replacement of dialogs 2022-04-09 19:50:50 -07:00
MysterD 47dd967af5 Added a way to bind to movtexqc ids through lua, added the rest of the object constants 2022-04-09 01:47:20 -07:00
MysterD 6dd90100ad Adjustments for Lua/Mods 2022-04-06 18:24:50 -07:00
MysterD 5efd8565eb Added ability for Lua mods to adjust gServerSettings 2022-03-26 01:08:15 -07:00
MysterD b38af4b798 Added a bunch of camera functions to Lua 2022-03-25 23:46:37 -07:00
Isaac 4f78f507ee Add save file flag functions to lua api (#41) 2022-03-24 19:30:15 -07:00
MysterD c34ffd90e7 Misc Lua fixes/enhancements
approach_s32 now stays within 32 bits
Fixed SOUND_ARG_LOAD
Added OBJ_COL_FLAGS_*
Added reset_rumble_timers
Added get_hand_foot_pos_*
Added get_water_surface_pseudo_floor
Adjusted new hooks to be called at the appropriate times
2022-03-19 00:56:59 -07:00
Prince Frizzy 43ae67c337 Update to Refresh 13 (#19)
* Refresh 13

Co-authored-by: n64 <n64>
2022-03-13 00:17:10 -08:00
MysterD 12e28f4099 Added Lua definitions for autocomplete in visual studio code 2022-03-12 21:28:57 -08:00
MysterD 2876251fb6 Added DynOS warp functions to Lua API 2022-03-11 18:11:32 -08:00
MysterD 316bf8afa0 Moved smlua_XXX_utils.[ch] to src/pc/lua/utils/ 2022-03-09 23:09:33 -08:00
MysterD c82debc7fb More lua doc fixes 2022-03-04 22:38:43 -08:00
MysterD a6670df963 Add missing AreaTimerType to documentation 2022-03-04 22:31:32 -08:00
MysterD 68e89ff337 Fix Lua documentation autogen links 2022-03-04 22:24:21 -08:00
MysterD 6e74c21b0f Fixed how constants.md autogen'd links 2022-03-04 22:11:10 -08:00
MysterD 3de0900bbc Initial custom behavior commit 2022-03-03 01:04:15 -08:00
MysterD 62718d8987 Add more constants to Lua 2022-02-25 22:44:37 -08:00
MysterD a0832d0cfe Various Lua object API improvements
Lifted immutablity of most Lua struct fields
Added object constants to Lua API
Added ability to set struct pointers in Lua API
Prevented respawners for Lua-spawned objects
2022-02-25 18:30:05 -08:00
MysterD cee83df8c9 Initial Lua support for spawning objects 2022-02-21 22:46:39 -08:00
MysterD a1ec9ad628 Added HOOK_ON_INTERACT to Lua API 2022-02-15 22:21:31 -08:00
MysterD d84d12a433 Added image drawing to Lua API 2022-02-15 22:12:20 -08:00
MysterD 7dd18aaa2a Added text rendering to Lua API 2022-02-15 22:08:01 -08:00
MysterD e53c3d5f71 Add Wario's moveset based on steven's mod 2022-02-14 18:26:44 -08:00
MysterD 956efe1e86 Print totals when autogenerating lua documentation 2022-02-05 13:33:22 -08:00
MysterD 4cd13853db Changed autogeneration of Lua constants to pull directly from src 2022-02-03 00:43:17 -08:00
MysterD eefb52880c Autogenerated Lua documentation 2022-01-29 22:47:22 -08:00
MysterD 90691ee89d Lua mod table and download
Mods are now loaded into a table
Clients now request a mod list from the server, then download each file one at a time before joining
Embedded constants.lua into the program
2022-01-22 23:59:49 -08:00