Commit graph

178 commits

Author SHA1 Message Date
Agent X
6659377cd4 Constants fix 2025-04-17 14:51:03 -04:00
PeachyPeach
467b22e939
Gfx set command: v2 + Gfx/Vtx dynamic alloc (#718)
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
* 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
2025-04-12 18:19:14 -04:00
Blockyyy
43d2248727
HOOK_BEFORE_WARP, added params to HOOK_ON_LEVEL_INIT and HOOK_ON_WARP (#736) 2025-04-10 17:17:59 -04:00
Baconator2558
ce8350514c
Add HOOK_ALLOW_FORCE_WATER_ACTION (#731)
* Update constants.md

* Update constants.lua

* Update smlua_constants_autogen.c

* Update surface_terrains.h

* Update hooks.md

* Add files via upload

* Update constants.lua

* Update smlua_hooks.h

* Update smlua_constants_autogen.c

* Update constants.md

* Update mario_actions_airborne.c

* Update mario_actions_airborne.c

* Update mario_actions_stationary.c

* Update mario_actions_automatic.c

* Update mario_actions_object.c

* Update mario_actions_moving.c

* Update mario_actions_submerged.c

* Update mario_actions_airborne.c

* Update mario_actions_stationary.c

* Update mario_actions_automatic.c

* Update mario_actions_object.c

* Update mario_actions_moving.c

* Update mario_actions_submerged.c

* Update hooks.md

* Update hooks.md

* Update mario_actions_submerged.c

* Update hooks.md

* deal with gCamera being exposed incorrectly

* update gCamera as the pointer is updated

* served time for crimes against C

* Update revamped flying damage (#722)

* forgot to null check it

* lois (#5)

* deal with gCamera being exposed incorrectly

* update gCamera as the pointer is updated

* served time for crimes against C

* Update revamped flying damage (#722)

* forgot to null check it

* Fix/optimize/improve lighting engine

* Camera fixes

---------

Co-authored-by: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-authored-by: Sunk <69110309+Sunketchupm@users.noreply.github.com>
Co-authored-by: Agent X <44549182+AgentXLP@users.noreply.github.com>

* Update lighting_engine.c

* Update lighting_engine.c

* bart (#6)

* deal with gCamera being exposed incorrectly

* update gCamera as the pointer is updated

* served time for crimes against C

* Update revamped flying damage (#722)

* forgot to null check it

* Fix/optimize/improve lighting engine

* Camera fixes

* Fix small LE whoopsie

* Update CS to v1.13

* New coopnet libraries for macOS (#725)

* Fix camera issues (#726)

* Fix vanilla camera in automatic

* Correct dpad movement direction

Matches the same direction as romhack camera now

* Make Git hash only dev or debug

* Fixes

* fix some script errors in mods that pass in nil objects

technically this is the mod's fault, but this is more consistent behavior for a cheap fix

* Further fix camera (#727)

* Further fix camera

* Remove re-override

* fix scrolling textures simply not scrolling

this was caused by the duplicated vertices commit

* free stuff

---------

Co-authored-by: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-authored-by: Sunk <69110309+Sunketchupm@users.noreply.github.com>
Co-authored-by: Agent X <44549182+AgentXLP@users.noreply.github.com>
Co-authored-by: EmeraldLockdown <86802223+EmeraldLoc@users.noreply.github.com>

* Update smlua_cobject.c

* Update mario_step.c

* Update bettercamera.inc.h

* Update camera.c

* Update smlua_cobject.h

* Update camera.c

* Add files via upload

* Update constants.lua

* Update constants.md

* Update hooks.md

* Update smlua_constants_autogen.c

* Update smlua_hooks.h

* Update smlua_hooks.h

* Update smlua_hooks.c

* Update mario_actions_airborne.c

* Update mario_actions_automatic.c

* Update mario_actions_moving.c

* Update mario_actions_object.c

* Update mario_actions_stationary.c

* Update mario_actions_submerged.c

* Update mario_step.c

* Update mario_actions_airborne.c

* Update mario_actions_automatic.c

* Update mario_actions_moving.c

* Update mario_actions_object.c

* Update mario_actions_stationary.c

* Update mario_actions_submerged.c

* Update hooks.md

* Update mario_actions_airborne.c

* Update mario_actions_automatic.c

* Update mario_actions_moving.c

* Update mario_actions_object.c

* Update mario_actions_stationary.c

* Update mario_actions_submerged.c

* Update mario_actions_submerged.c

* Update mario_step.c

* Update mario_actions_stationary.c

* Update mario_actions_submerged.c

* Update mario_step.c

* Update mario_actions_airborne.c

* Update mario_actions_airborne.c

* Update mario_actions_automatic.c

* Update mario_actions_moving.c

* Update mario_actions_object.c

* Update mario_actions_submerged.c

---------

Co-authored-by: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-authored-by: Sunk <69110309+Sunketchupm@users.noreply.github.com>
Co-authored-by: Agent X <44549182+AgentXLP@users.noreply.github.com>
Co-authored-by: EmeraldLockdown <86802223+EmeraldLoc@users.noreply.github.com>
2025-04-07 18:47:52 -04:00
Cooliokid956
3bfa75e32b
Miscellaneous Additions: Addendum (#723)
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* 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
2025-04-05 13:52:14 -04:00
Isaac0-dev
c2823c268e fix some script errors in mods that pass in nil objects
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
technically this is the mod's fault, but this is more consistent behavior for a cheap fix
2025-04-01 16:13:56 +10:00
Agent X
3e540790a3
Basic Vertex Point Lighting Engine (#716)
* 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
2025-03-27 16:36:02 -04:00
Baconator2558
c26e968076
Allow wind to be ignored with HOOK_ALLOW_HAZARD_SURFACE (#721)
* Update constants.md

* Update constants.lua

* Update smlua_constants_autogen.c

* Update surface_terrains.h

* Update hooks.md

* Add files via upload
2025-03-27 14:48:36 -04:00
Cooliokid956
efcfff210d
Miscellaneous additions (#711)
- 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`
2025-03-24 07:31:06 +10:00
Agent X
0f0997a2ac Add mod menu text hook and make hook functions return index
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-03-15 18:04:59 -04:00
Sunk
edacdcc7e4
More settings to the Camera settings menu (#555)
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
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.
2025-03-14 13:01:51 +10:00
Isaac0-dev
f238b3d0f5
allow Lua to manipulate displaylists and vertices (#675)
Co-authored-by: ManIsCat2 <137772623+ManIsCat2@users.noreply.github.com>
2025-02-27 14:27:55 +10:00
Isaac0-dev
ff83d6a037 autogen array implementation
arrays are pushed to Lua via tables
2025-02-12 17:38:38 +10:00
Isaac0-dev
9a13c298ad added HOOK_ON_INTERACTIONS
this is called after mario's interactions are processed
2025-02-11 17:58:57 +10:00
Isaac0-dev
6abf4695cf run autogen 2025-01-07 09:08:25 +10:00
Amy54Desu
1f1683815e
HOOK_MARIO_OVERRIDE_GEOMETRY_INPUTS (#591) 2024-12-31 10:38:52 +10:00
jayden
c8faa22072
Final touches for geo hooks (#588)
* new geo process children hook

* EXPOSE the mat stack

* fix formatting (oops)
2024-12-28 08:44:36 -05:00
jayden
1291350bed
Add hooks to graph node processing (#587)
* geo process hooking

* autogen update!
2024-12-27 22:07:31 -05:00
xLuigiGamerx
6757a3abb7
Added FONT_SPECIAL (#556)
* Fixed player and mod lists not updating on language change

* Added `FONT_SPECIAL` which is based on the special controls letters in dialog boxes
2024-12-17 08:58:38 -05:00
Agent X
faceaa684a Document sound functions 2024-12-16 20:18:28 -05:00
Agent X
f7a48d23fe HOOK_ON_DJUI_THEME_CHANGED 2024-12-11 23:55:10 -05:00
Agent X
eac580e04a Expose more lag compensation things to Lua 2024-12-01 16:46:05 -05:00
Sunk
947ce9f080
Rework PvP Balance (#357)
* 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
2024-11-25 20:48:40 +10:00
Sunk
9621424069
Fix early hits (#363)
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.
2024-10-17 18:31:01 +10:00
EmeraldLockdown
c3d3f8545a
HOOK_ON_NAMETAGS_RENDER (#213) 2024-09-12 19:01:16 +10:00
Agent X
a4ed5ddb53 v1.0.3 2024-09-01 19:00:38 -04:00
Agent X
b20753f0c0 Change METAL back to CAP 2024-07-05 22:46:16 -04:00
Agent X
81c4180a06 Remove Waluigi anims 2024-07-01 18:32:27 -04:00
Agent X
c144ff6780 Remove unused Waluigi animation 2024-06-30 17:46:18 -04:00
Agent X
8a5a23a8a6 Add HOOK_ON_MODS_LOADED 2024-06-29 16:00:42 -04:00
Agent X
6eae0e28d1 Change METAL to EMBLEM 2024-06-21 13:51:06 -04:00
Isaac0-dev
eeebfecca4
more loading screen fixes for non supported builds (#74) 2024-06-19 11:43:01 +10:00
Agent X
41525c1fc3 Rename HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED to HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED 2024-06-12 09:42:43 -04:00
Agent X
2b2dceb333
Add a mod menu where mods can put DJUI elements (#56)
* Add a menu where mods can put their options at

* Document mod menu hook functions

* Add HOOK_ON_LANGUAGE_CHANGED

* Add new Cheats mod

* Make player menu disable singleplayer pause

* fix some git merge conflicts that weren't resolved (#55)

and added -latomic to build flags to fix compile warnings while compiling miniaudio

* Remove legacy 'deluxe' field from built-in mods

* Lots of improvements to memory safety

* Abbreviated hex color parsing

Co-Authored-By: Mechstreme <84944335+mechstreme@users.noreply.github.com>

---------

Co-authored-by: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-authored-by: Mechstreme <84944335+mechstreme@users.noreply.github.com>
2024-06-01 20:52:43 -04:00
Agent X
ceb7aa4649 Palette system overhaul and preset rewrite 2024-05-21 17:09:59 -04:00
PeachyPeach
14cbb673fc
Proper custom object fields (#39) 2024-05-14 08:52:56 +10:00
Agent X
ec3fb07e76 Add @Hex4dec HOOK_ON_ATTACK_OBJECT 2024-05-11 18:44:18 -04:00
Agent X
96018588cd Fix convert_constants.py on Python 3.12 2024-05-11 17:55:38 -04:00
Isaac0-dev
90b071acc0
exposed a bunch of interaction functions to Lua (#22)
Renamed the function interact_unknown_08 to interact_spiny_walking
and added the constant INTERACT_SPINY_WALKING, which has the same value of INTERACT_UNKNOWN_08
INTERACT_UNKNOWN_08 is kept for compatibility with smlua, and behavior dynos bins
2024-05-03 18:38:21 +10:00
Blockyyy
a7b2741aa7
added HOOK_ON_SEQ_LOAD (#18) 2024-04-24 22:39:34 +10:00
Isaac0-dev
974577f678
djui player menu custom camera cutscene (#2) 2024-03-28 18:53:46 -04:00
PeachyPeach
2a36b14dcd Remove OMM Rebirth temporary fixes (#542) 2024-03-25 18:35:25 -04:00
Isaac0-dev
663e4549d8
extract assets from rom at runtime (#4)
* Proof of concept for loading rom assets at runtime

* Added skybox textures

* Adjusted format

* Load all texture assets from rom

* Adjusted rom asset loading

* Load all Vtx lists from rom

* clean up toad, wario and his cap conflicts

* Load sound samples from rom

* fix toad sounds

* Loaded sequences from rom

* Load collisions from rom

* Object animations are now loaded from the rom

* Load player animations from rom

* Load goddard anims from rom

* whoops

* fix some compile errors

* drag and drop rom checker, everything works now.

* fix errors due to merge conflicts

* fix compile errors on windows, switch to md5

* fix vertex colors during load

Co-Authored-By: Agent X <44549182+agent-11@users.noreply.github.com>

* Load dialogs from rom

* Loaded course/act names from rom

* Loaded ingame text from rom

* rerun autogen & blacklist smlua_text_utils_init

* fix ttc_seg7_vertex_0700B238 colors

---------

Co-authored-by: MysterD <myster@d>
Co-authored-by: Agent X <44549182+agent-11@users.noreply.github.com>
2024-03-23 16:11:30 -04:00
Isaac0-dev
90331f8fe5 fix mod compatibility due to version constants 2024-03-19 20:47:18 +10:00
Agent X
d2842becdb Restore old versioning system 2024-03-17 15:02:03 -04:00
Agent X
74422d16a4 Fix Toadette palette 2024-03-09 14:18:30 -05:00
Agent X
9870e18bf5 Add OBJ_LIST_EXT in place of OBJ_LIST_UNUSED_1 2024-03-04 20:09:53 -05:00
Agent X
55fe506b82 Add ENVFX_MODE_NO_OVERRIDE constant 2024-03-04 19:26:44 -05:00
Agent X
96e21e13a1 Add HUD_DISPLAY_CAMERA_STATUS 2024-02-22 14:34:43 -05:00
Agent X
d7bad7dcdd HOOK_ON_PLAY_SOUND 2024-02-18 14:54:01 -05:00