Commit graph

461 commits

Author SHA1 Message Date
Agent X
55fe506b82 Add ENVFX_MODE_NO_OVERRIDE constant 2024-03-04 19:26:44 -05:00
Agent X
89e9bcdcec Add "-- pausable" field for mods and function so mods can make themselves pausable in singleplayer 2024-03-04 19:25:09 -05:00
Agent X
87a83806a1 Restore vanilla pause camera zoom out as gLevelValues field 2024-03-03 17:30:20 -05:00
Agent X
5fc381d616 Add DynOS global player models option 2024-03-02 16:36:28 -05:00
Agent X
d4fe80d4a6 Expose level_control_timer_running 2024-02-22 14:51:33 -05:00
Agent X
96e21e13a1 Add HUD_DISPLAY_CAMERA_STATUS 2024-02-22 14:34:43 -05:00
Agent X
815bbe0053 Add ability to get global timer and set HUD flash 2024-02-22 13:59:19 -05:00
Agent X
5c3ebadb8e Add ability to change window title 2024-02-22 13:36:22 -05:00
Agent X
de9c3c35b2 Add ability to set global note frequency scale 2024-02-21 20:46:27 -05:00
Agent X
18a3b333e8 Add ability to disable aspect ratio adjustment 2024-02-21 19:26:30 -05:00
Agent X
015f5920d6 Fix texture override example
The tex files were corrupted it seems, probably a remnant from the chaos of the CRLF and LF file ending days.
2024-02-21 14:57:28 -05:00
Agent X
64ebb88906 Add ability to not show star collection dialogs 2024-02-21 10:50:08 -05:00
Agent X
5fffa9e9d9 Add the ability to have global star IDs
Set gLevelValues.useGlobalStarIds on init, this value not being the same for everyone will cause desyncs.
2024-02-20 22:06:40 -05:00
Agent X
d7bad7dcdd HOOK_ON_PLAY_SOUND 2024-02-18 14:54:01 -05:00
xLuigiGamerx
962ff5932f Added a custom hud font and a recolorable version and added dynos support to the aliased font 2024-01-22 00:06:18 +03:00
Jack
4c0546c686 updated the introductory lua doc to mention the --console launch parameter 2024-01-09 00:43:06 +00:00
Agent X
bf9c9d5e75 Remove FONT_TINY and introduce legacy compatibility for it 2024-01-07 20:23:24 -05:00
Agent X
6886f248f8 Add gControllers 2024-01-01 14:43:44 -05:00
Agent X
0345a873b7 Add get_coop_compatibility_enabled and undefine SM64COOPDX_VERSION if it's on 2024-01-01 12:27:23 -05:00
Agent X
4e96b49182 Revert "Rework First Person FOV"
This reverts commit 2a0af8e216.
2023-12-18 14:27:48 -05:00
Agent X
2a0af8e216 Rework First Person FOV 2023-12-17 23:29:31 -05:00
Agent X
bdb8f11eab Bring back base FONT_NORMAL as FONT_ALIASED
FONT_NORMAL is the same as FONT_TINY, except with a different scale to match mods that use FONT_NORMAL
2023-12-17 21:36:24 -05:00
Agent X
0a210993ae Re-add 64 Memories palette 2023-12-15 20:25:23 -05:00
Agent X
fff0c83866 Add option to disable first person centering with L 2023-12-15 17:21:06 -05:00
Agent X
b04dc23aa5 Fix texture override example 2023-12-14 21:21:49 -05:00
Agent X
741d742bab Add HOOK_ON_OBJECT_LOAD 2023-12-14 19:33:17 -05:00
Agent X
db2d2a20fa Allow floats to be constants 2023-12-14 15:27:01 -05:00
Agent X
b1c8caa3ee Add offset to gFirstPersonCamera 2023-12-13 17:50:11 -05:00
Agent X
c2e85a0bcf Add HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED 2023-12-13 16:57:38 -05:00
Agent X
2343cf04f3 Adjust palettes and add palette constants to Lua 2023-12-12 18:14:37 -05:00
Agent X
ba4ad874f4 Add first person mario head Y constants 2023-12-05 23:06:57 -05:00
Agent X
c32cf2054a Add mario_is_crouching(m) 2023-12-05 21:24:42 -05:00
Agent X
0481de1222 Add forceRoll field to first person camera 2023-12-02 19:54:40 -05:00
Agent X
471a6c8c05 Expose first_person_check_cancels() to Lua 2023-11-27 11:14:36 -05:00
MysterD
8d72c7eb76 Remove hook_exclamation_box() 2023-11-26 21:34:28 -05:00
Agent X
436532bfba Fix hooks.md 2023-11-26 21:33:26 -05:00
MysterD
ce9c6e1899 Add HOOK_ON_HUD_RENDER_BEHIND to the docs 2023-11-26 21:32:05 -05:00
MysterD
b61574d2c6 Disable Waluigi animations for now 2023-11-26 21:31:17 -05:00
Agent X
5cb9e25090 Overhaul console logging 2023-11-26 16:49:32 -05:00
MysterD
6113254650 Reran autogen 2023-11-24 19:50:56 -05:00
Sunk
a85c8dbbf8 Create hook_exclamation_box in place of set_exclamation_box_contents (#524)
* Revert set_exclamation_box_contents()

In favor of the hook

* Create `hook_exclamation_box`
2023-11-21 17:22:54 -05:00
Isaac0-dev
ea487fe342 actually fix extended pause menu + improve act/course replacement (#523) 2023-11-21 17:15:18 -05:00
Isaac0-dev
23193887db added HOOK_MIRROR_MARIO_RENDER to Lua (#514)
* added HOOK_MIRROR_MARIO_RENDER to Lua

Previously there was no way to interact with mirror Mario using the Lua api, so this fixes that.

* remove premature optimisation

* revert that
2023-11-21 17:00:35 -05:00
Agent X
d9a59aa0ed Merge branch 'main' of https://github.com/coop-deluxe/sm64coopdx-rebase 2023-11-17 18:32:14 -05:00
Blockyyy
c2c846f650 Expose lvl_set_current_level (#513)
* Expose Initiate_warp

exposed initiate_warp function
exposed WARP_NODE_ constants

* expose lvl_set_current_level

* remove initiate_warp
2023-11-17 18:29:37 -05:00
SharenTheCat
5b72836c15 Modify Mario's head and torso rotation outside of specific cases
Adds "m.marioBodyState.allowPartRotation", which when set to 1, will make "m.marioBodyState.headAngle" and "m.marioBodyStates.torsoAngle" actually change where Mario's head and torso face outside of very specific cases (like running, or being underwater).
2023-11-16 23:01:18 -03:00
Blockyyy
5d39741be1 Delete star flags (#501)
* Expose save_file_remove_star_flags

* new packet

added a new packet type and two new functions

* oops

* create packet_save_remove_flag.c

move the new network functions to a new file

* Switch u32 to u8

Switched courseStarsToRemove from u32
 to u8 for consistency

* fixed the function

-Fixed empty save file marked as existing
-Fixed SAVE_FILE_EXISTS flag being deleted
-Fixed removing ALL flags from the remote saves
2023-11-14 20:40:34 -05:00
Agent X
02607a686e Add texture overriding example 2023-11-13 09:30:20 -05:00
eros71-dev
ff17fa4a67 Add ON_COLLIDE_LEVEL_BOUNDS hook
Called whenever Mario hits the level boundaries "wall"
2023-11-12 19:28:38 +01:00
Agent X
ce987ef3dd Add first person functions to Lua 2023-11-12 09:53:08 -05:00
Agent X
e79775aea4 Improve first person and add gFirstPersonCamera 2023-11-11 16:49:46 -05:00
Agent X
ae22eaac98 Add "-- deluxe:" field to mods 2023-11-11 14:16:27 -05:00
Agent X
281efe57fe Fix autogen convert constants 2023-11-11 12:35:32 -05:00
Agent X
802affd839 ENHANCE_LEVEL_TEXTURES and make all DynOS textures overridable in Lua 2023-11-11 12:15:32 -05:00
David Joslin
c7edf85ad9 Fix crash in tox_box_move() 2023-11-08 19:55:28 -05:00
MysterD
081a7fd9dc Added HOOK_ON_RENDER_BEHIND, deprecated djui_hud_set_render_behind_hud() 2023-11-08 19:53:27 -05:00
David Joslin
cb66c36a72 Fix broken link to Moonjump.lua
thanks to nonperforming on github
2023-11-08 19:48:09 -05:00
David Joslin
8ab0e17876 Remove built-in cheats 2023-11-08 19:48:00 -05:00
Agent X
7343c019af Update info panel 2023-11-07 16:48:57 -05:00
Sunk
da5c4a68db Added romhack camera dpad functionality (#497)
* Aglambi (Added romhack camera dpad functionality)

* Remove this random comment on request

* Make dpad camera disabled by default

* Force axis alignment when dpad camera is off
2023-11-06 15:00:23 -05:00
Blockyyy
56e7470e7b Exposed warp_special (#493)
Exposes the warp_special function and adds some constants for it

Fixed the crash by making it so a script error happens instead.
2023-11-06 14:59:20 -05:00
Agent X
e8b6a8cffa Build first person player camera into the game 2023-11-04 21:32:03 -04:00
Agent X
395ac50532 Add ability to set fog intensity multiplier (ramps up quickly) 2023-11-01 21:21:46 -04:00
U-DESKTOP-F0TJMO2\Utilisateur
0b53dbcdbd Fixing smlua_level_util_get_info_from_short_name typing and bug reintroduced by commit cc4f4e9 - Instant Warp Function (#494) 2023-10-30 17:53:03 -04:00
Agent X
49bca1cc01 sm64coopdx
Co-Authored-By: Yuyake <140215214+AngelicMiracles@users.noreply.github.com>
Co-Authored-By: FluffaMario <50761036+FluffaMario@users.noreply.github.com>
Co-Authored-By: Gregory Heskett <gheskett@gmail.com>
Co-Authored-By: iZePlayzYT <69536095+iZePlayzYT@users.noreply.github.com>
Co-Authored-By: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-Authored-By: eros71 <16540103+eros71-dev@users.noreply.github.com>
2023-10-30 01:03:36 -04:00
EmeraldLockdown
9b502346a7
Console Overhaul (#490)
Completely redid the console ui to look more like the rest of coop
    Added log_to_console and djui_console_toggle to lua
    Made the keybind to activate it the tilda key (~) instead of ctrl+f1
2023-10-28 00:18:23 -07:00
MysterD
b002061609 Cleaned up character sound/anim lookup code 2023-10-27 18:59:00 -07:00
MysterD
27b799055c Fix compile errors from recent merges 2023-10-27 18:02:04 -07:00
Keeberghrh
e02a68e221
Character Animation System (#441)
Replaces references to set_mario_animation() with set_character_animation(), but the old function still exists as a way to play any character animation on any character. Waluigi has two animations, added as a test and may not be final. Exposed new functions to Lua for usage in mods.
Primary concern is that each character requires 209 lines indicating what animations they use, similar to Character Sounds.
2023-10-27 17:43:45 -07:00
Isaac0-dev
c9e4efdb31
custom level fixes and fixes from other pr (#483)
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
2023-10-27 16:42:27 -07:00
David Joslin
2df5456793 Reran autogen 2023-10-27 03:18:01 -07:00
EmeraldLockdown
95d4d627ea
Fix Popup Setting (#485)
* Remove old setting

* Readded setting

* Make setting actually work

* Add override functions

* Reset overrides on network shutdown

* Use djui_is_popup_disabled instead of ternary expression

* Move all the other stuff out of .h file
2023-10-27 03:10:32 -07:00
David Joslin
cf20658079 Eyerok can now get attacked by remote players 2023-10-27 01:03:20 -07:00
David Joslin
8fe77eaf9f Ran autogen 2023-10-26 17:15:01 -07:00
flipflop bell
22761949f7
Fix gBehaviorValues.GrateStarRequirement and add gBehaviorValues.Chil… (#471)
* Fix gBehaviorValues.GrateStarRequirement and add gBehaviorValues.ChillyChiefDeathPosY

For some reason, the castle_cannon_grate.inc.c file was unaltered so gBehaviorValues.GrateStarRequirement would not do anything.
gBehaviorValues.ChillyChiefDeathPosY is self explanatory, it lets you change the Y position where the Chilly Chief bully dies.

* ChillyChiefDeathPosY -> ChillBullyDeathPosY

---------

Co-authored-by: <peachy.peach.sm64@gmail.com>
2023-10-20 19:15:38 +02:00
Sunk
302b9b71fa
Patch out toxic gas camera from romhacks (#462)
* Patch out toxic gas camera from romhacks

* Allow toxic gas camera in romhacks to be disabled with camera_allow_toxic_gas_camera()

In romhacks only. Toxic gas camera in vanilla levels will always remain active.
Passing in 0 means enable toxic gas camera.

* Reset gOverrideAllowToxicGasCamera to network_shutdown()

* Swap order

I too have a hard time reading my own code
2023-09-20 19:12:08 +02:00
Sunk
284e02dcb1
Add gLevelValues.wdwWaterLevelSpeed (#469)
Some romhacks do change the speed of the wdw water level.
I am aware that the water level is an object and should be under gBehaviorValues, but that feels wrong so it's under gLevelValues.
2023-09-11 18:42:15 +02:00
PeachyPeach
31c2e23c48
allocate_mario_action fix and improvement (#453) 2023-08-18 18:55:39 +02:00
PeachyPeach
610bdfcf04
fix C string typing (#459) 2023-08-18 18:31:59 +02:00
Sunk
c428612a9e
Add set_exclamation_box_contents() (#445)
* 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
2023-07-18 18:18:02 -04:00
Sunk
d1aa4aee1e
Add gLevelValues.bubbleOnDeathBarrierInCapStages (#449)
Also add a few smaller fixes with bubbles
2023-07-18 18:01:05 -04:00
Agent X
ed60d53ab3
Mod Storage C++ (#448)
* Mod Storage C++

* Implement Peachy's suggestions.

Thank you Peachy.
2023-07-18 17:52:11 -04:00
Agent X
d63abe9c7e
Changes to light shade color (#444) 2023-07-10 15:40:45 -04:00
Sonicxryan
3258064a7f
Shading (#439) 2023-07-06 16:21:37 -04:00
Dominicentek
809cbc314b
Add lifeCap, coinCap and coinToLife to gLevelValues (#429)
* Add lifeCap, coinCap and coinToLife to gLevelValues

* autogen

* forgor

* renamed the properties
2023-07-04 14:16:07 -07:00
Sunk
f6a78e0c77
Allow mods to disable romhack camera centering (#423) 2023-06-23 16:58:47 -07:00
MysterD
2842803362 Added gLevelValues.fixCollisionBugsPickBestWall 2023-06-22 20:18:10 -07:00
MysterD
c7a557d870 Add gLevelValues.fixCollisionBugsGroundPoundBonks 2023-06-22 11:40:59 -07:00
Agent X
3f60869fcb
Add the ability to change lighting color (#420)
* Add the ability to change lighting color

Well it's actually multiplying the lighting color and not changing it completely but I think it's better that way.

* Consistency
2023-06-22 11:28:17 -07:00
MysterD
c92b62fe58 Enable romhack cam by default when in a non-vanilla level 2023-06-22 02:12:57 -07:00
Dominicentek
2629381971
Customizable dialogs (#411)
* add customizable dialogs

* remove testing mod

* add HOOK_ON_DIALOG

* Reset dialog overrides in `network_shutdown`

It may have compile errors idk editing code on phone sucks

* typo smh

* copy over the file from original repo so this fork can be synced

* run autogen again

* actually im stupid
2023-06-18 20:04:39 -07:00
Agent X
f1990c618e
Add tons of new save file / star related functions (#419)
These were needed to port interact_star_or_key to Lua but are also just good to have exposed IMO.
2023-06-18 20:04:02 -07:00
MysterD
b3eff990ae Re-ran autogen 2023-06-18 12:28:26 -07:00
MysterD
488ef1c6d2 Added collision_get_temp_wall_collision_data() to Lua 2023-06-15 19:55:55 -07:00
Sunk
a0ff975ec8
Re-introduce a few vanilla bugs under gBehaviorValues (#413)
* Properly set Mario's y vel to 0 on popping

* 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.
2023-06-11 14:24:13 -07:00
MysterD
def1122159 Allow toggling the false ledge grab fix 2023-06-11 13:00:11 -07:00
Isaac0-dev
05f4c42f81
add cancels to HOOK_BEFORE_PHYS_STEP allowing for custom step systems (#400)
* add cancels to HOOK_BEFORE_PHYS_STEP allowing for custom step systems

* give lua mods access to stepArg and nextPos from hanging and air step; fix a crash when m.floor is null
2023-05-31 21:10:06 -07:00
Emerald Lockdown
3e52c4f5db
djui_popup_create_global (#402)
* Add djui_popup_create_global
2023-05-31 21:05:07 -07:00
MysterD
1dd70283da Fixed bounds checks in save_file_is_cannon_unlocked() 2023-05-20 20:07:17 -07:00
MysterD
b0408a1379 Fix some bugs found in testing 2023-05-18 17:54:29 -07:00