Commit Graph

292 Commits (058a88196bbc5304358b0038d76229b10a8384e7)

Author SHA1 Message Date
Isaac0-dev ac6f2b2ad0 Beta 32.0.1 (#325)
* patch for beta 32

* require the development flag for Lua profiler

* autogen
2023-03-26 01:15:28 -04:00
Agent X fe61e50af4 Show players on star select toggle (#321)
* Show players on star select toggle

* Make only toggleable by mods

* Allow player list to also be disabled
2023-03-23 21:12:26 -04:00
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 2d10c50ccd Make fixed collision rounded corners toggleable (#315) 2023-03-22 21:02:43 -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 ad7a632115 get_ttc_speed_setting and set_ttc_speed_setting (#307) 2023-03-20 20:20:11 -04:00
Agent X 89724f42c7 Merge pull request #304 from Agent-11/server-settings
Add gServerSettings to Lua manual tables
2023-03-20 20:00:21 -04:00
Agent X 7525c58e9f Merge pull request #310 from Agent-11/time
get_time()
2023-03-20 19:59:31 -04:00
Agent X deb6ab7804 Expose sound_banks_enable/disable to Lua (#311) 2023-03-18 17:12:33 -04:00
Agent X f0b7751b4d get_time() 2023-03-14 20:53:23 -04:00
Agent X 92141488ea Add gServerSettings to Lua manual tables 2023-03-07 17:46:09 -05:00
Isaac0-dev 5b1b20a0ae bring back the ability to lose your cap (#229)
* bring back the ability to lose your cap

* run autogen and add "cap" to the mario states guide

* fix some indentation
2023-03-03 01:46:46 -05:00
PeachyPeach 666009f610 Make most used and useful features built-ins (#242)
* made all bools u8 for consistency with fixCollisionBugs
* preview blue coins + visible secrets
* preserve indexing
* star number
* hud cap timer
* red coins radar + secrets radar
* extended pause display
* autogen
* only sDynosBuiltinFuncs is sensitive to indexing
* rebased
2023-02-26 03:15:54 +01:00
Sunk 71a4196caf Add HOOK_BEFORE_SET_MARIO_ACTION (#253)
* Small quality of life changes

Disabled fixed collision in sm74 by default.
Popping should now completely set the popped player's speed to 0.

* Add HOOK_BEFORE_SET_MARIO_ACTION

Param: incoming action
Return: changes incoming action
If the return value is 1, prevent the action from happening entirely.
0 can't be used here since it'll break the title screen.

* Update hooks.md

* Revert "Small quality of life changes"

This reverts commit 05dd235cd0e3633bf1da48bc2f9f0b8a3db087ee.
2023-02-22 20:28:23 -05:00
Isaac0-dev 1c5cadcce2 rerun autogen (#291) 2023-02-22 00:56:30 -05:00
Agent X fb54adfd90 Small improvements to HUD and new functions (#268)
* Small improvements to HUD and new functions

- Split HUD_DISPLAY_FLAG_CAMERA_AND_POWER into HUD_DISPLAY_FLAG_CAMERA and HUD_DISPLAY_FLAG_POWER
- Added hud_is_hidden()
- Added camera_is_frozen()
- Added extra sanity check to hud.c

* Re-add old flags

* Fixes and improvements

* Mod compatibility
2023-02-21 00:23:15 -05: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
Isaac0-dev d32e4c7997 ACTIVE_FLAG_DORMANT (#281) 2023-02-18 23:45:13 -05:00
Isaac0-dev 4e104aeb64 expose course_is_main_course() to Lua (#282) 2023-02-18 16:23:51 -05:00
Isaac0-dev 654bc4472a allow mods to hide and move shadows for small objects (#257) 2023-02-18 16:06:03 -05:00
Agent X 17c9b1d5d5 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
Agent X 2e4f1aa3d6 Add ' and " to gTextures (#273) 2023-02-15 19:45:11 -05:00
Isaac0-dev 04e7c3b99b add a way to create/modify whirlpools (#267) 2023-02-08 16:40:41 -05:00
Agent X 659552fc7b Improvements and optional tweaks (#263)
- Added visibleToEnemies to invisible fields
- Added cur_obj_set_billboard_if_vanilla_cam() which makes trees only billboard if free camera is off
- Added RespawnShellBoxes to gBehaviorValues
- Added pauseExitAnywhere to gLevelValues
- Disabled the power meter chime playing on the main menu whenever disconnecting from a server with low health
2023-02-08 10:51:07 -05:00
Agent X 0f8a53487d Expose version constants to lua (#264) 2023-02-08 10:42:16 -05:00
Isaac0-dev fe02152649 Give Lua mods access to a form of level script preprocessing (#258)
* Give Lua mods access to a form of level script preprocessing

* Disable acts setting
2023-01-31 07:24:56 -05:00
Prince Frizzy 3f78bf00ff Add support for custom cap sequences. (#250) 2023-01-31 05:55:18 -05:00
PeachyPeach 15d1ca06cb added new mods to default; removed visibleToEnemies from lua (#245) 2022-12-17 19:32:55 +01:00
Agent X e743e32787 Add E_MODEL_SSL_TOX_BOX (#247) 2022-12-17 19:29:24 +01:00
SMS Alfredo 3a7034c4ed Character Sound Hook (#223)
* Character Sound Hook

* The rest of autogen to be safe

* Indentation Fix

* Fix more indentation

* Get rid of unneeded auto gen junk

* Run autogen again

* Add HOOK_CHARACTER_SOUND to guide
2022-12-17 19:25:30 +01:00
Isaac0-dev b2e57d4ad3 make fixCollisionBugs an integer again (2) (#241) 2022-11-30 00:44:49 -08:00
Isaac0-dev 2b22b3520f add HOOK_OBJECT_SET_MODEL (#236)
* add HOOK_OBJECT_SET_MODEL
runs whenever a behaviour sets a model.
2022-11-30 00:37:43 -08:00
Prince Frizzy d16468b37e 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 2b81b45272 Fixed Vanish floors/ceilings (non-wall surfaces) (#225)
In the vanilla game, vanish does only work with walls specifically, and not floors and ceilings. This is because the check for vanish surfaces was only implemented with the walls. So I simply pasted the same code but with the floors and the ceilings.
2022-11-18 18:39:17 -08:00
Isaac0-dev e8f4b41ac3 Make fixCollisionBugs an integer again (#232)
This is for mod compatibility.
2022-11-14 18:16:17 -05:00
Prince Frizzy 12b9fea632 Add some new LUA helper functions and fix some bugs. (#230)
- Add new functions for objects, Feel free to flesh some out if need be.
- Fix long-standing issue with our LUA garbage collection, It will now run after all our hooks do to prevent buildup which causes lag.
2022-11-12 05:01:50 -08:00
MysterD 4e35b9c4d4 Add ability for mods to signal that a player will not be seen by enemies 2022-11-11 19:02:11 -08:00
SMS Alfredo b4ea13f57d Sample Stop Functions (#224)
Adds in bassh_stop_sample for source and audio_sample_stop for Lua. These functions immediately stop whatever audio the specified sample is playing.

If used in tandem with #223, this allows you to create custom character voice clips without them ever overlapping with each other.
2022-11-02 19:51:34 -07:00
PeachyPeach 340aedd660 djui_hud_render_texture_tile[_interpolated]; increased GFX pool and main memory pool (#211)
djui_hud_render_texture_tile: allows user to draw a part of a texture instead of the whole texture (tilesets)
    increased GFX pool size from 512kB to 4MB
    increased main memory pool size from ~11MB to 32MB
2022-11-02 19:45:20 -07:00
Isaac0-dev 32e68a81e2 add HOOK_ON_CHAT_MESSAGE (#220)
includes the message string and the mario state of the player
return false to prevent the message from showing (might be possible to make a chat flter with this?)
2022-10-30 17:34:50 -07:00
PeachyPeach 86eb22b6de CAP color; near/far warning fix (#214)
Added CAP color part; Player's cap no longer uses the SHIRT color
    Added METAL color as an alias of CAP color; Metal characters now uses the CAP color to tint the metal texture (was SHIRT color)
    Fixed the cap inside color (was HAIR color)
    Fixed the near/far warning
2022-10-30 17:30:40 -07:00
Sunk 2e41525ea3 Added HOOK_ALLOW_HAZARD_SURFACE and various fixes (#209)
* Fixed naming from ceil to cell

* Added HOOK_ON_QUICKSAND

* Modified hook and removed weird newlines

* Renamed hook and increased usage

HOOK_ALLOW_QUICKSAND -> HOOK_ALLOW_HAZARD_SURFACE
Now also works on lavaboost.
Suggestion by Agent X. May add this hook to the death barrier check.

* Autogen

* Fixed downwarping to quicksand upon popping

As a side effect though, Mario will no longer snap to the floor upon being popped.
2022-10-30 17:25:56 -07:00
Agent X 80cda3546e Why weren't star door models exposed to Lua? (#217) 2022-10-25 13:28:02 -07:00
Isaac0-dev e89349318d just a few more improvements (#207)
Add get_dialog_box_state
    Prevent some attacks from registering as pvp attacks.
    Clean up all cases of camera.lua
    Put gLastCollectedStarOrKey in a better spot.
    Clean up my moderator code a bit, changing gIsModerator to boolean.
    Brang back kicked, banned and full party messages.
    Fixed a warning on older compilers like raspberry pi's and use configAmountofPlayers instead of MAX_PLAYERS
    Fixed compiling with the flag DISCORD_SDK off.
    Added "Fixed Collisions" to the debug menu.
    Added HMC, CCM, RR, BITDW, PSS and TTC to the main menu options.
    Fix my own oversight; Prevent the port from being duplicated in the join menu. (temporary fix)
    Hopefully bring back the crash handler on windows by not checking for termination signals on windows
2022-10-18 15:34:46 -07:00
wRadion a94de7d6af Added `warp_to_warpnode` function (#157)
* Added warp to warp node function

* Added generated docs

* Restored Makefile (will put in other branch)
2022-09-30 20:02:34 -07:00
MysterD 9ef643e63b Reran autogen 2022-09-26 19:30:09 -07: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
Emerald Lockdown ed9023d781 `save_file_erase_current_backup_save` and more (#189) 2022-09-26 19:14:53 -07:00
Agent X 29cd726d18 Color type and palette/color functions (#199)
Added a Color type (typedef u8 Color[3])
Added network_player_color_to_palette and network_player_palette_to_color
Reran autogen
2022-09-26 19:11:51 -07:00
Agent X 05b2dcbefe Expose level_trigger_warp and related constants (#197) 2022-09-19 19:51:27 -07:00
Emerald Lockdown c4baafcd05 Remove save_file_erase function (#195) 2022-09-19 19:33:43 -07:00
Agent X e8ac7c15ea HOOK_ON_SCREEN_TRANSITION (#192) 2022-09-18 17:30:29 -07:00
Isaac0-dev 184344afc4 multiple improvements (#176) 2022-09-12 20:00:51 -07:00
Emerald Lockdown 3738ab43cf Add network_is_moderator (#180) 2022-09-12 19:58:58 -07:00
Sunk 232b3705d3 Unhardcoded floor and ceiling limits (#179)
* Unhardcoded ceiling and floor limits

* Revert "Unhardcoded ceiling and floor limits"

* Revert "Revert "Unhardcoded ceiling and floor limits""

This reverts commit 71b2da4c4b898cda73f211620d138b346370d2ce.

* Let's try that again
2022-09-12 19:58:01 -07:00
wRadion 3ab27fc072 Scrolling textures (continued) (#175)
* Handle scroll targets as dynamic array + some error handling

* Remove the need to call init (clean automatically scroll targets)

* Free iteratively instead of recursive

* Added comments + handled some potential errors

* Completed comments

* Remove debug print
2022-09-12 19:57:28 -07:00
Agent X ac6254a657 SURFACE_RAYCAST (#177)
* SURFACE_RAYCAST

* Exclude from camera collision
2022-09-12 19:56:24 -07:00
MysterD dc2bc696af Re-ran autogen 2022-08-25 17:49:45 -07:00
wRadion 92ce6d9e4c Handle RM_Scroll_Texture and editor_Scroll_Texture behaviors from RM2C hacks (#173) 2022-08-25 17:46:33 -07:00
Agent X 916d59e9b5 is_transition_playing() (#171)
Can be useful for people making HUD mods or anything like that.
2022-08-25 17:42:30 -07:00
Agent X a8db460392 Add character head glyphs to gTextures (#167) 2022-08-25 17:38:34 -07:00
Emerald Lockdown 9565a32811 Added `warp_to_start_level` function (#154)
* Added `warp_to_start_level` function

* Fix include things
2022-08-25 17:27:05 -07:00
Isaac0-dev 878e974626 Improvements (#151)
More lives fixes, death loop fix, add a null check and add get_dialog_id()
add a way to disable rom hack cam collisions
expose more sound management functions
2022-08-25 17:25:54 -07:00
Agent X 12cd6adfb7 gsDPSetTextureFilter, refactoring and o.header.gfx.skipInViewCheck (#147)
* Add gsDPSetTextureFilter to DynOS symbols

* Refactor code and fix 2 year oversight

Refactored the main menu background code, now uses vec3f_set instead of manually setting every vector

Also finally fixed the bug where you load in with only 3 lives, this has been in coop for 2 years now and was likely made as a test for syncing live count and was never reversed.

* add skipInViewCheck to GraphNodeObject

* Remove idle set

Co-authored-by: djoslin0 <djoslin0@users.noreply.github.com>
2022-08-11 01:23:54 -07:00
Emerald Lockdown 1b47507b66 Expose save star flag (#139)
* added save_file_set_star_flags and save_reload
2022-08-07 20:53:42 -07:00
Emerald Lockdown 274d308d9a Exposed save_file_erase and save_file_reload to lua (#137) 2022-08-07 20:52:51 -07:00
MysterD 7e5ebcf064 Re-ran autogen 2022-08-07 15:26:32 -07:00
TheGag96 591c0b58d5 Fix issues Extended Moveset mod (+ extras) (#146)
* Allow Lua action hooks to specify custom functions for more behavior

...like gravity, and update all current mods to match.

Spin jump and wall slide from the Extended Moveset mod now have gravity
code basically matching the original mod.

Currently, any place you'd want to use one of these new action hooks
still requires an O(n) check through all action hook per call. This
should probably be changed.

* Fix some remaining issues with Extended Moveset Lua port

- Remove divergent spin jump code
- Remove divergent roll code
- Remap roll button to Y
- Reimplement dive slide to make dive hop work like the original
- Allow spin from double jump, backflip, side flip

* Fix more issues with Extended Moveset Lua port

- Reimplement all users of update_walking_speed to incorporate the Tight
  Controls edits and modified speed caps
- Fix instances of angle arithmetic to wrap properly across the mod

* Don't chop off group bits of custom action flags; assign missing groups in mods

This fixes the Extended Moveset's underwater actions. Chopping off those
bits was making the game consider the underwater actions to be a part of
the Stationary group, which caused `check_common_stationary_cancels`,
which upwarps Mario to the surface.

* Tweak roll sliding angle tendency

Rolling will now gradually (but fairly quckly) try to tend Mario's
facing angle down the slope.

This is cleaner than my old method that tries to flip Mario's angle
(wrongly) when he begins moving downward, having that logic coexist with
the logic for normal sliding actions that can also tend Mario to face
backward down the slope. Just looks ugly now by comparison.

* Disallow spin jump on slides in Extended Moveset port

This matches the original mod

* Extended Moveset: Crazy Box Bounce check

* Extended Moveset: Fix hugging the wall when spin jumping after wall kick

* Extended Moveset: Fix ledge drop snapping up to ground

Just reimplement `act_air_hit_wall` ourselves.

* Extended Moveset: Add Kaze's walking speed fix

* smlua_hooks.c: Restore option to use old API for hook_mario_action

The intent is to allow mods outside of this repo to continue working.

Co-authored-by: djoslin0 <djoslin0@users.noreply.github.com>
2022-08-07 15:25:00 -07:00
TheGag96 a1bcd19529 Arbitrary shirt, pants, glove colors + settings menu (#145)
* Support for more granular player colors

You can now configure RGB values for shirt, pants, gloves, and shoes.
Due to some limitations, configuring shoes does nothing at the moment.

* Remove paletteIndex and friends

Restructured and filled in some remaining code to account for that.

* Add Edit Palette panel to Player panel

* Change PlayerPalette contents to an enum-indexed array, remove shoes

This gets rid of all the hokey code doing switch cases on the
different parts.

* Fix goof with player model selection box

Should actually have affect now even if a custom palette is being used.

* Fix gap in player color display list commands

The extra space was leftover from when I was trying to get shoes
working. Forgot to clean it up.

* Standardize PlayerParts enum, including for lua constants autogen

* djui_panel_player.c: Properly hook sending palette changes on unpause

Editing the palette and then unpausing should send out the packet to
everyone with the new palette changes (and update the palette preset
selection box), but since we weren't hooking that situation before, it
would stay changed only for you. You would have had to press the Back
button for it to work right.

* Allow Lua mods to continue using `paletteIndex`, `overridePaletteIndex`

This lets mod code like this still work unchanged:

if s.team == 2 then
    np.overridePaletteIndex = 7
elseif s.team == 1 then
    np.overridePaletteIndex = 15
else
    np.overridePaletteIndex = np.paletteIndex
end

It's essentially faked, and would work strangely if the value of either
variable was inspected more closely directly. This should at least
handle the typical use case, though.

Every frame, `overridePaletteIndex` is checked to see if it was modified
from its previous value. If so, `overridePalette` is set to the preset
corresponding to the index. `paletteIndex` contains a special value that
when used to assign to `overridePaletteIndex`, it copies `palette` into
`overridePalette` to restore the real colors, which of course may not
follow the presets at all.

* characters.h: Pack `PlayerPalette` to eliminate size differences between computers

* mario_misc.c: Remove remaining "TODO GAG"
2022-08-07 15:13:19 -07:00
Prince Frizzy b87fb12f71 Add some more functions for use in LUA, And expose others. (#129)
* Add some functions, and restore one.
2022-08-05 22:17:05 -07:00
MysterD d3ed4f3362 Add HOOK_USE_ACT_SELECT ; increase MAX_AUDIO_OVERRIDE to 128 2022-08-04 01:12:16 -07:00
MysterD 8b3c3acd2c Change fixCollisionBugs from server setting to mod setting 2022-06-25 01:26:53 -07:00
MysterD fe6bc9405c Refactor sync objects, move syncIds to u32 2022-06-06 19:13:04 -07:00
MysterD 1a1f593a38 Added ability to have completely custom levels that don't override anything 2022-06-05 21:55:31 -07:00
MysterD 5532dea75f Close modfile at the correct time when downloading 2022-06-04 17:58:36 -07:00
MysterD 1f0a55ada1 Unhardcode castle cannon grate star requirement 2022-06-02 21:19:53 -07:00
MysterD b570091224 Whoops, forgot to save 2022-06-02 19:50:41 -07:00
MysterD 89a44c00b8 Unhardcoded more bowling ball values 2022-06-02 19:45:01 -07:00
MysterD 12af07a5e9 More custom bhv cleanup 2022-06-02 19:33:28 -07:00
MysterD efaf87ab11 Unhardcoded more values ; generated more tex files ; special set home function ; fixed lua bhv bugs
Unhardcoded KingBobomb values, Mips values, star dialog values
Generated tex files when they're of the form levels/XXX/NUMBER
Now lua behaviors can call cur_obj_set_home_once() to set home correctly
Lua behaviors are now overridden correctly when created through spawn infos
Behavior checks now translate to the overridden behavior before checking
2022-06-01 23:04:21 -07:00
MysterD 1224dec362 Update autogen 2022-06-01 01:00:21 -07:00
MysterD 57b507ba1d Consider all walls when doing quarter steps (fixCollisionBugs) 2022-05-31 08:44:18 -07:00
MysterD 4add33fa19 Added server setting toggle for 'surface cucking' and 'exposed ceilings' vanilla bugs 2022-05-31 01:29:48 -07:00
PeachyPeach 607e07166c Camera config values for lua (#116)
* Added camera config getters and setters
2022-05-22 18:47:36 -07:00
MysterD a2786951cc audio_stream_load_url() cleanup 2022-05-21 21:20:02 -07:00
Lord-Giganticus 21b4ed3be8 Add function to load music via https URLs (#100) 2022-05-21 21:17:35 -07:00
MysterD 5fc6bb0491 Fix clang/mac compile 2022-05-19 19:42:07 -07:00
Agent X 9924d72f27 Mouse lock & freeze cam fixes and warp constants (#103) 2022-05-19 17:06:51 -07:00
PeachyPeach f433dbfcf6 Fixed various audio bugs; DynOS can now detect texture duplicates to decrease generated bin files size (#110)
Fixed the following audio bugs:
    Bug: Rom-hacks sequences don't seem to be affected by volume scaling and
         muting
    Fix: Force the BGM sequences to follow the vanilla behavior:
        Volume can't go higher than default volume
        Volume is reduced to 31% when the game is paused
        Audio is stopped when the game is paused outside the Castle levels
    Bug: (Pointed out by Draco) Mario's voice clips are not replaced by the
         player's character's in the following instances: fall to death
         barrier, "here we go" in the ending cutscene, "let's a go"
         after selecting a star, "okey dokey" after starting the game.
    Fix: The first two ones now call
         play_character_sound(m, CHAR_SOUND_...) instead of
         play_sound(SOUND_MARIO_..., pos). The last two ones couldn't be
         fixed the same way for two reasons: First, the corresponding sounds
         were not referenced in the sound table, second, the sound played is
         always cut-off after a few frames (due to how sm64 resets the sound
         banks after loading a level).

Added SOUND_*_LETS_A_GO and SOUND_*_OKEY_DOKEY sounds for each playable
    character as Bass samples.
    Character Bass sounds work the same way as vanilla sounds (i.e. can be
    played with play_character_sound), but they cannot be prematurely stopped
    by sm64 sound banks shenanigans.
    This fixes the cut-off for both the star select and the castle grounds
    entry, plays the sound corresponding to the player's character, and doesn't
    need to extend or edit the sound table.

DynOS can detect texture duplicates when generating a bin or lvl file.
    When a duplicate is detected, the name of the original texture node is
    written instead of the whole PNG data, decreasing significantly the
    resulting file size.
2022-05-19 16:40:45 -07:00
PeachyPeach 18503ecc52 Various bug fixes + Added is_game_paused() and more background music functions to lua (#93)
Bug: DynOS models with animations cannot swap animations if they are
     loaded via lua (smlua_model_util_get_id and
     obj_set_model_extended).
Fix: DynOS_Actor_GetActorGfx takes a graph node instead of a georef,
     and checks for DynosValidActors graph nodes if georef is NULL.

Bug: The game can crash when calling obj_set_model_extended inside a
     HOOK_ON_OBJECT_RENDER hook.
Fix: The crash happens in smlua_model_util_load_with_pool_and_cache_id
     due to pool being NULL. If the game can't allocate an
     AllocOnlyPool object, use DynOS to generate the graph node.

Bug: warp_to_level and similar functions don't trigger HOOK_ON_WARP.
Fix: Call HOOK_ON_WARP hooks in DynOS_Warp_UpdateWarp and
     DynOS_Warp_UpdateExit after level and mario initialization.

Bug: The game sometimes calls HOOK_ON_OBJECT_RENDER hooks for
     unintended objects.
Fix: Initialize hookRender field to 0 when creating an object.

Bug: Actions can't apply gfx offsets to characters that have an anim
     offset (Waluigi, Wario)
Fix: Add m->curAnimOffset to gfx.pos[1] instead of setting it to
     m->pos[1] + m->curAnimOffset, except during the jumbo star
     cutscene.
2022-05-14 14:28:25 -07:00
Agent X 90f5fc3a08 djui_hud_get_raw_mouse_x/y, djui_hud_set_mouse_locked (#91) 2022-05-13 19:55:47 -07:00
MysterD 83f441cd4e Add djui_hud_world_pos_to_screen_pos, and render interpolated rect/texture 2022-05-13 19:54:49 -07:00
MysterD 272cac6376 Merge branch 'audio' into unstable 2022-05-08 16:41:05 -07:00
MysterD 288d026650 Specify filetypes in audio folder, add audio_custom_shutdown() 2022-05-08 15:44:04 -07:00
PeachyPeach 82aca5404e More rom-hacks globals to lua; more bug fixes (#84)
New gLevelValues exposed to lua:
        pssSlideStarTime: the time limit in frames for PSS-style levels (default: 630)
        pssSlideStarIndex: the index of the star spawned below the time limit for PSS-style levels (default: 1)
        coinsRequiredForCoinStar: number of coins required to spawn the 7th star of a main course (default: 100)
        wingCapDuration: duration in frames of the wing cap (default: 1800)
        metalCapDuration: duration in frames of the metal cap (default: 600)
        vanishCapDuration: duration in frames of the vanish cap (default: 600)
        wingCapDurationTotwc: duration in frames of the wing cap given to the player at the entrance of TOTWC (default: 1200)
        metalCapDurationCotmc: duration in frames of the metal cap given to the player at the entrance of COTMC (default: 600)
        vanishCapDurationVcutm: duration in frames of the vanish cap given to the player at the entrance of VCUTM (default: 600)
    Fixed a bug preventing the level music from restarting after defeating a Boss.
    Fixed some bugs with 3D coins or any model with the geo_rotate_coin function:
        Disable billboard and cylboard attributes.
        Set the pitch and roll to 0 for the model to rotate properly.
        The model no longer rotates every frame (even when the game is paused), but every time the object is updated.
2022-05-08 12:18:25 -07:00
MysterD 6d6995e5da Make bass sound interface easier to handle 2022-05-08 04:04:14 -07:00
MysterD 99e59dd8c1 Re-ran autogen 2022-05-08 00:29:17 -07:00
Beyley Thomas 20167088d6 Add basic Bass audio engine (#58) 2022-05-08 00:25:09 -07:00