* zip + json properties; check existing file in create file
* smlua_audio_utils_replace_sequence
* audio_stream_load, audio_sample_load, smlua_model_util_get_id
* get_texture_info + can also load PNG files
* smlua_collision_util_get
* add wildcard in properties files + set text mode
* filepath restrictions
* Some mod_storage improvements
- Cache mod storage files into a map to reduce file I/O
- Fix a bug in mod_storage_save
- Add mod_storage_load_all that returns all keys/values as a table
* shutdown; fix buffer overflow; fix warnings; lua table
* reject binary files starting with MZ or ELF
* function members
* better doc
* adding file rewind
* ModFS guide; replace yaml by ini; read string buffer changes
Shared graph nodes were incorrectly interpolated, only the first object with a shared graph node was interpolated properly.
Thanks to @Cooliokid956 for noticing that most of node types were **never** interpolated.
- Use a double hashmap to store interpolated data for each graph node and object. All translations, rotations and scales are now interpolated correctly.
- Add `GraphNodeScaleXYZ` type to scale to all 3 dimensions; Add `GEO_SCALE_XYZ` command.
gMtxTbl was also reaching it's limit, so dynamic allocation was added.
* wip
* get rid of seg2_dialog_table and fix crashes
* remove unused include
* change more types to s32
* remove dialog tables from eu_translation.h
* fix dialog_table_get signature
* Change `oToadMessageDialogId` to s32
* remove exit from dialog_table_add
* warning
* calloc allocated dialogs
* avoid memcpy on allocation fail
* Move dialog entry text field init to dialog_table_init
* Free original dialog entries' text field
* Put all reset logic in one place
* Run autogen
* Remove ``get_dialog_text_ascii`` from autogen
* minor fix
* free dialog->str if replaced
* nevermind
* remove get_dialog_unmodified from autogen
* Change -1 to DIALOG_NONE
* update stuff to s32
* use growing array functions
* Change limit to something more reasonable
* add null check
* remove explicit cast
* Minor fixes
* more type fix
* peachy review
* Fix weird enums in autogen
* remove extra newline :p
* add dialog restore
* bump max dialogs just a lil bit 🥺
* add lua behavior params
* all OBJECT fields are now Lua variables
* Revert lua behavior params changes
* isaac review
* fix segfault
---------
Co-authored-by: PeachyPeachSM64 <72323920+PeachyPeachSM64@users.noreply.github.com>
* modfs; optional function parameters in autogen
* errors and stuff
* script to turn a directory into a modfs file and vice versa
* bug fixes
* read: raise error on eof
* properly check eof on read_string
* fill; reload; check pointer validity; skip private files when loading non-active modfs
* added bytestrings
* move ByteString to smlua_utils.h
Adds network_send_bytestring(), network_send_bytestring_to(), and
HOOK_ON_PACKET_BYTESTRING_RECEIVE
This is as close to raw bytes as you can get in lua. It allows you
to efficiently pack as much data as possible into each packet.
The existing network_send() was built for ease of use, but is quite
inefficient when you want to send a lot of data. Each number or int
field in the table amounts to 9 bytes for the key and 9 bytes for the
value. (amounting to 18 bytes per value). Whereas with the new method
you can pack that information into 1, 2, 4, or 8 bytes depending on
your type's size.
---------
Co-authored-by: MysterD <myster@d>
Just making a brief commit and thats all to add onto dj's lighting engine improvements because I heard about the PR, in mine I
* allowed all Vtx objects to be manipulated/retrieved
* updated lighting engine demo to be an SM64 night mode with a flashlight
* Fixed longterm bug where lighting bugs out unless you spawn a light
* Added new default LE mode LE_MODE_AFFECT_ALL_SHADED_AND_COLORED which also affects vertex colored surfaces
* Lighting engine improvements
Now objects will be affected by the lighting engine. This is
accomplished by passing the renderer the object's model matrix
(uncombined with the view or projection). You can now setup the
lighting engine mode to affect all shaded surfaces, lighting can
be affected by surface normals, and you can control what type of
tone mapping is applied.
added le_set_mode(mode)
By default we retain the previous behavior.
When set to LE_MODE_AFFECT_ALL_SHADED the lighting engine will
affect every shaded material.
This way we don't have to recompile every object and level that
we want shaded with special coop-specific commands
added le_get_mode()
added le_set_tone_mapping(toneMapping)
Tone mapping is what happens when a color value exceeds its 0-255
range.
By default we retain the current tone mapping (called
LE_TONE_MAPPING_TOTAL_WEIGHTED).
LE_TONE_MAPPING_WEIGHTED is now accessible, it was the tone
mapping that was previously left out of the compile through ifdefs.
LE_TONE_MAPPING_CLAMP is just simple additive with a clamp at a
color value of 255.
LE_TONE_MAPPING_REINHARD is reinhard tone mapping
(vout = (vin + 1) / vin).
added le_set_light_use_surface_normals(id, useSurfaceNormals)
By default lights retain their previous behavior (of ignoring
surface normals).
When enabled lights cast on one side of the object will not
appear on the other side of the object.
It is kind of like backface culling, but for lights.
added le_calculate_lighting_color_with_normal(pos, normal, outColor, lightIntensityScalar)
It's just like le_calculate_lighting_color(), but you can pass
in normals now.
* Removed normal calculation from vertex colored surfaces - they don't have normals
* Use packed normals correctly
* made LE_MODE_AFFECT_ALL_SHADED the default
* made useSurfaceNormals the default for lights
* Set ambient color, performed le_is_enabled() checks
The ambient color was black, which is why everything was dark by default.
If we set ambient to white then people will never see the effects of their
lights unless they set ambient to a lower value. So I added checks for
if a light has ever been added. The alternative would be to have something
like le_set_enabled()
* Rewrite how we obtain the model matrix - invert the camera
* run autogen
* Change default tonemapper to weighted, make setting ambient enable LE, fix null deref
* Address Peachy's comments
---------
Co-authored-by: MysterD <myster@d>
* make HOOK_ON_WARP trigger on instant warps
* oops
* HOOK_ON_INSTANT_WARP
* make the displacement a Vec3s, hooks.md
* fix hooks.md oversight
* get rid of this
* set_gfx_command part 2
* part 3
* get gfx/vtx from name; copy gfx/vtx
* gfx/vtx dynamic allocation lua
* gfx/vtx_new: don't take level/model/vanilla names
* Clean up gbi constants
* update example
* Isaac review; add gfx_get_next_command and vtx_get_next_vertex
* make all commands length 1; missing NULL checks
* More autogen work
- made the `Pointer_` classes into aliases instead so that they're actually associated with their true type
- "Total constants" metric is now accurate
* High Quality Master Volume
* Audio work
it's 12:55am and there are some bright flashes outside (lightning)
- cracked the code (interpreted the "Acc" in `tempoAcc`)
- added several functions that will help greatly in the Streamed Music department (you can now match sequenced music fading (transitions, eepy, etc.))
- introducing `gMasterVolume`! a variable that is only updated when it needs to be, theoretically improving performance (by some amount). this variable is used in many places in place of recalculations of the same number
- made it so that muting the game skips some audio processing (not the main process since that would linger after unmuting (not good))
- fixed an oversight where lua volumes were not taken into account when `audio_stream_set_volume`
- it's its 😁
- removed additional `#include "audio/external.h"`
it is 1:06am
gn
* Add mouse status functions
you can now check if mouse buttons were held, clicked, or released
* Sorting was a bad idea
disabled sorting for constants so that they are represented more closely to their original defines
* Expose playerlist page index
also noticed that sorting still sucks
* Minor (very important) detail
lalette
* Addressing the PeachyPeachSM64 reviews
* Return of the Forced 4:3 Mode
shoutouts to DISPLAY.FORCE_4BY3 for sticking through the toughest of times, waiting for this day to come
* Added scroll support
- Scrolling added to chat box (hold ctrl to scroll fewer lines, shift to scroll faster)
- Scrolling functions added to smlua
* Addressing the Isaac0-dev review + fixes
- mouse scroll is now accumulated
- djui_gfx_get_dimensions
- forced 4:3 won't kick in if the window isn't wide enough
- game now recognizes horizontal resizing when in 4:3 mode
* Run autogen
* gfx_get_dimensions
works just as well
* CONCEPT: Basic vertex lighting engine
Set the geometry mode on your model to G_LIGHTING_ENGINE_EXT, spawn a `bhvAmbientLight`, spawn some `bhvPointLight`s, and then you got yourself a mighty interesting scene.
* Fixes
* How did I miss this
* Make light set home pos
- Fixed script file path shortening for Windows in console errors (what I could at least, the one left unfixed is preprocessed and I can't mess with that)
- Adjusted audio sanity check messages to sound more natural
- 9 new functions added:
## `audio_stream_set_loop_points(audio, start, end)`
Sets an audio stream's loop points in samples, no longer requiring a hacky method to loop streams in mods
## `get_active_mod()`
Returns the mod currently being processed, can be used by mods with APIs to determine what they're being used by and react accordingly
## `get_area_update_counter()`
Returns `gAreaUpdateCounter`, can be used to determine various in-game statistics, as well as if the game is being updated
## Exposed several object pointers
`get_current_object()` to retrieve `gCurrentObject`
`get_dialog_object()` to retrieve `gContinueDialogFunctionObject`
`(get|set)_cutscene_focus()` to retrieve/assign `gCutsceneFocus`
`(get|set)_secondary_camera_focus()` to retrieve/assign `gSecondCameraFocus`
Sherbie's suggestions from #497 and #538, as well as suggestions from others on discord.
Add 2 new camera settings to free camera, being camera collision and dpad usage.
Add an entire new camera submenu for romhack camera, which are now no longer exclusive to romhacks.
* PvP Rework
This rearranges the damages of last PR. The underused attacks should still see some buffs.
* Adjust how punches apply invincibility
Also increase punch invincibility timer to 12
* EmeraldLoc's easy suggestions
* Rework punching pvp
Punching no longer reduces invincibility frames. Instead, punches can ignore knockback invincibility and the full punch punch kick combo can be done.
* Adjust numbers
Breakdances should not deal 3 damage
* Potential fix for more common tripping
"Trip" here refers to 1 damage kicks
* Add temporary invincibility to rollouts
This is a test to see how different pvp feels with this change. Suggestion by sausrelics.
* Fix invincibility
* Prevent low damage/low knockback kicks altogether
* Update ignored attack list
* Allow dives to be attacked by most actions
A lot of people don't want dives to be entirely invincible and some suggested to make dives be able to only pierce through jump kicks
* Slightly nerf kick knockback
Suggestion by emily
* Rework dive piercing
Instead of all actions being able to hit dives other than jumpkicks, now only slidekicks (and ground pounds) can hit dives.
* Mild kick knockback increase from nerf
* Change direct equality to checking flag
* Decrease dive and punch knockback
* Prevent trades against dives with slidekicks
* Revert "Prevent trades against dives with slidekicks"
This reverts commit 2a2c3266a7.
* Allow ground pounds to always hit a sliding player
* Add server setting to change pvp
* Add pvp settings to config
* Add selection to menu
* Fix issues + autogen
* Rewrite goto statement to not use goto
Sometimes, the player can ground pound a pole before even landing or punch/kick an enemy at high speeds which will kill the enemy but not give bounce back to the player. This fixes those, although there are definitely mod incompatibilities.