Adding this for collision minimap, but I'm sure it'd be useful for many other mods that deal with collision in this kind of way
exposes a function, obj_get_surface_from_index. pass in an object, and the index of the surface you want. numSurfaces is also added to know when to stop iterating through surfaces
Thanks to peachy for coming up with the better method of doing this
Co-authored-by: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com>
- fixed a bug where remote players would show mario's head repeatedly twitching up and down while reading automatic dialog
- fixed a bug where remote mario's would sometimes not update while unlocking a star door, resulting in the previous animation playing during that action
- fixed a bug where players exiting a warp door could get stuck for a few extra frames due to other players opening that same door.
- added dialogId to MarioState, which is synced for remote players the dialog id that player has active. this can be used by Lua mods - don't access the local player's dialog id because that isn't updated as that is unnecessary
clean up custom level code
fixed a bug where custom level course numbers weren't used by dynos warps
removed a bunch of unused dynos code
fix demos triggering incorrectly
allowed the right Ctrl key to be used when opening the in game console
fixed a softlock that was possible to experience when talking to the snowman in CCM
fixed the bug where you can permanently lose your cap (bug created by my own PR from beta 32)
fix the moderator feature I made a while back; I am amazed it even worked at all before
fixed dynos warp initial actions being skipped (read ec8aabc for explanation)
completely changed the way star names and course names work
* Properly set Mario's y vel to 0 on popping
* Change 0 to 0.0f, just in case
* Re-introduce a few vanilla bugs under gBehaviorValues
The Shell Mario glitch was patched as a side effect to patching a different bug, but several romhacks use it so I need it back.
The ability to collect multiple normal caps at once is needed for hat-in-hand using the hat factory glitch.
* Fix Shell Mario fix
Found the actual reason why the glitch doesn't work and figured that this change shouldn't affect anything else, so I removed its entry from gBehaviorValues.
* Add InfiniteRenderDistance to gBehaviorValues
I'm well aware that disabling the infinite render distance will be very desync prone, however a few glitches, most notably cloning and chuckya double jump, need objects load and unload from render distance.
* Allow mods to disable the camera centering from romhack camera
* Allow mods to disable romhack camera centering
Done again
* Update on network shutdown
* Remove a line which I have no idea why it returned
* Add set_exclamation_box_contents()
No way this is memory safe or even well made but I did what I could
* Added (most of) peachy's suggestions
Still need to figure out how to stop the game from reading further than the size of the array without using a hardcoded number
* Added more of peachy's suggestions
I figured a good way to cap how far the exclamation box reads is to pass in the length of the array as well
* Initial support for compiling with EU.
* Fix EU text.
* JP now compiles, TODO: Fix Autogen to fix JP and fix text in djui.
* audio: Prevent crash in EU.
* audio: Sync EU audio to 60 Hz instead of 50 Hz
* Add logging and remove sanity check to hopefully track EU crash.
* Various improvements for EU
Improve some memory debugging
Improve sound debugging
Initalize some variables in load.c for the sound system
Synchronize the EU cutscenes with the US version.
* Fix credits music playing in EU, Document some EU audio code.
* Autogen now supports version excluded object fields and functions. Reran autogen in accordance.
* Fix some potentional shifting issues due to version differences.
* Decrease the sleep times in some spots, We do not need them to be so long. (#373)
* Add the region to the version string.
---------
Co-authored-by: djoslin0 <djoslin0@users.noreply.github.com>
- 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
* 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>
* 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"