Stopped copying over peach's lines from the mario folder to wario/luigi sound folders
Stopped compiling peach's lines for wario/luigi sound folders
Created a tool to precompile the aiffc tables and append them into custom sounds
this matches what mario's sound files are like
I believe the issue is that previously we would copy over the sound files and
they were either incomplete or would be compiled during the copying process
I noticed that Mario's sounds had their sound tables inserted into the aiff
file already, and none of our custom sounds did. This caused a different path
to be taken for mario sounds than the rest of ours. In order to prevent the
possibility that there was a problem with that seperate path, I've created
a tool that can insert the table into the file to match how mario sounds are.
/luaf command to execute lua code from a file. Note that this command doesn't load the file the same way mod files are loaded, so no access to gGlobalSyncTable and gPlayerSyncTable. hook_chat_command cannot be called, but hook_event can.
Fix some compilation issues
* Add Extended Soundbank
This PR adds a soundbank to the game with every instrument in the game, so there's no need to only use one set of instruments for m64 sequences.
Use the soundbank ID "42" when replacing sequences with lua to use it.
* Remove hardcoded.h include duplicate
There's a duplicated line that shouldn't be there since hardcoded.h is already included.
* Reinclude duplicate include
I'm still learning the commits system and I've noticed I should push this into a different PR instead by making a fork, sorry about that
* 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
The comment for TEXTURE_FIX states "Disable texture fixes by default (helps with them purists)" and in spite of that, TEXTURE_FIX is set to 1 (on)
This PR simply sets it back to 0 as the comment intends the value to be, I just noticed this and saw an opportunity to make a PR for it. This doesn't have to be merged and all it does is restore the old smoke and pink on the Koopa's back.
Add the Lua Profiler to the debug menu.
Prevent Mario from sleeping on the main menu.
Fix IP address string corruption when saving the config file.
Bring back the Discord fatal message.
Just a simple code cleanup opportunity I saw
"I won't be porting this to the web" - djoslin
Compiled and tested everything to see if it works, feel free to check yourself or look over the code
Also, I noticed TARGET_N64 was there too, might do a clean up on that since we all know this isn't getting ported to the N64 anytime soon.
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.
Added a basic lua profiler
If the game is compiled with LUA_PROFILER=1, displays on screen the average execution time per frame of each active lua mod, in microseconds.
Added object functions
For some reasons, accessing the object fields obj.o* via lua is rather slow, and can drastically increase execution time of custom behaviors. For basic stuff like setting an object's velocity or moving it, some functions, missing from the original code, have been added:
s32 obj_is_valid_for_interaction(struct Object *o): returns 1 if an object is valid for interaction, i.e. active, tangible and not interacted.
s32 obj_check_hitbox_overlap(struct Object *o1, struct Object *o2): returns 1 if two objects hitboxes overlap. Doesn't check tangibility, only hitbox values.
void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz): sets an object's velocity.
void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz): moves an object position by (dx, dy, dz).
Bug fixes:
Disable collisions with walls and ceilings after Mario exits a warp pipe to prevent softlocks in narrow places.
Make the koopa shell exclamation box respawn after some time.
Quicksand no longer downwarps and instant-kills Mario if he's shocked while being above it.
* Some bug fixes.
Fix Bully Star Spawning Cutscene to be player dependent.
Add missing line to Makefile.
Fix compile error with Clang in save_file.c
* Fix DDD Chests Star spawining in the wrong location.