Commit graph

1488 commits

Author SHA1 Message Date
Agent X
bc4e893f2d Lesson learned: If it ain't broke, don't fix it. 2024-06-22 12:36:35 -04:00
Agent X
3707ca9b2e Separate some smlua_misc_utils functions into their own files & add get/set_skybox_color 2024-06-21 23:26:13 -04:00
Agent X
e42f114b2d Add gLevelValues.jrbDarkenSkybox 2024-06-21 22:57:44 -04:00
Isaac0-dev
570afe946e
fix scrolling texture interp integer overflow (#72) 2024-06-21 21:06:29 -04:00
Agent X
807996c225 Add geo_update_layer_transparency param 30 for not setting anim state 2024-06-21 13:51:06 -04:00
Agent X
6cb37160f9 Make character preset palettes always come first 2024-06-21 13:51:06 -04:00
Agent X
6eae0e28d1 Change METAL to EMBLEM 2024-06-21 13:51:06 -04:00
Isaac0-dev
8ee9fb2c32
make remote players disappear into paintings (#76) 2024-06-21 12:14:51 -04:00
Cooliokid956
e76e212312
Prevent Pause Exit when it actually happens (#71)
* call level exit hook sooner

call the hook here so you can actually prevent the exit from happening, also no separate hook calls anymore

* instead of here

* compliance
2024-06-17 17:20:30 -04:00
Agent X
52b4d51508 Add collision_find_surface_on_ray_precision 2024-06-16 10:45:55 -04:00
Agent X
15c9602e11 Add gLevelValues.infiniteStairsRequirement and gBehaviorValues.CourtyardBoosRequirement
Ported this PR from the sm64ex-coop dev repo.

Co-Authored-By: Emily♥ <77174187+emilyemmi@users.noreply.github.com>
2024-06-14 10:37:14 -04:00
Agent X
598db03d80 Fix TTC desync! 2024-06-14 09:41:55 -04:00
Agent X
e780b74d1b Properly sync BITS ferris wheel platforms 2024-06-13 20:33:47 -04:00
Agent X
c738a2c27d Remove 2 second freeze after a star spawns 2024-06-13 20:33:47 -04:00
Agent X
a8f76be263 Fix red coins, secrets, goomba triplet macros, and count_objects_with_behavior 2024-06-13 20:33:47 -04:00
Agent X
ab9e4bf6c7 Re add crash fix for exiting to main menu 2024-06-13 20:33:47 -04:00
Agent X
76df190de1 Restore separated staff roll option 2024-06-13 10:19:10 -04:00
Agent X
9786ba9bc1 Remove delayed warp level ID 127 wrap around
This is very much an edge case, but if a delayed warp is initiated to a custom level that has an ID greater than 127 it will just loop back around to 0.
2024-06-12 11:44:52 -04: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
f18a3fef7d Fix power meter crash 2024-06-10 08:06:21 -04:00
Agent X
6471da0a07 Remove crash-prone mod menu force unpause feature 2024-06-09 10:32:43 -04:00
Cooliokid956
bc811e730b
Character anim cleanup: take 2 (#63)
defining each animation is no longer necessary, as the get_character_anim function now passes through the characterAnim parameter on the principle that mario's animation enums correspond to the character animation enums
only if an animation beyond the range of mario animations is defined, then it is used
this wouldn't allow characters to reuse mario's animations for different slots, but that shouldn't be needed anyways

bye bye macro
2024-06-09 16:17:33 +10:00
Isaac0-dev
a04aa4c240
make Lua calls to interaction functions call interaction hooks (#52)
* make Lua calls to interaction functions call interaction hooks

* Revert "make Lua calls to interaction functions call interaction hooks"

This reverts commit 14c597cd340cb19acd72f7e4327f6f078bf09f1d.

* thanks peachy for a far better solution

* don't let mods lie about what interaction it is
2024-06-07 19:14:33 -04:00
Isaac0-dev
3503f4e86c
fix warnings in characters.c (#62)
until a better fix is found
2024-06-07 22:51:30 +10:00
Isaac0-dev
16400321e5
palette editor cutscene fixes, press Z to toggle cap (#54)
this removes the forced taking cap off while in the palette editor. press Z to remove cap now.
it also fixes various problems that could happen that would cause the cap to stay off when it shouldn't. also fixed the taking off cap custom action sometimes playing the animation all the way through when it shouldn't.

translations by DeepL, eros, Flower35 and Skeltan
2024-06-07 19:41:22 +10:00
Cooliokid956
c811b4ebdf
Clean up animation definitions in character tables (#61)
The definition of character animations has been reduced to a macro, BASE_ANIMS(), which defines initial animations that can be subsequently overwritten if the character uses different animations.

while testing, the near/far clip plane functions prevented compilation as they appeared to be using keywords, so i've also changed the offending functions' parameters.
2024-06-07 19:39:43 +10:00
Agent X
02d214d2fd Refactor staff roll option 2024-06-06 18:52:52 -04:00
Isaac0-dev
eaeaeb0f7f
add a way for mods to get dynamic surfaces that belong to specific objects (#59)
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>
2024-06-06 17:24:28 +10: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
fa8d8c9b0f Fixes and overhaul mouse locking 2024-06-01 13:30:41 -04:00
Agent X
54de3b689a Remove Forced 4:3 2024-06-01 13:12:01 -04:00
Agent X
e617e5a5b4 Fix bug if 'palettes' is in exe path 2024-05-21 17:10:00 -04:00
Agent X
1f3af25805 Expose fade_into_special_warp 2024-05-21 17:10:00 -04:00
Agent X
e35e4529a2 Fix overflow, hex codes not working, and add dev prints 2024-05-21 17:10:00 -04:00
Agent X
5fe4aeb605 Fix Windows compilation error 2024-05-21 17:10:00 -04:00
Agent X
13e6197107 Added hex code support and sanity checks to palette INIs 2024-05-21 17:10:00 -04:00
Agent X
ceb7aa4649 Palette system overhaul and preset rewrite 2024-05-21 17:09:59 -04:00
Isaac0-dev
0d71c6c12f
remove animation dma tables, and provide mods more access to mario animations (#47)
This removes the old animation system which would create 16 copies of the animation table, so this should use less memory. Made m->animation->targetAnim always be a pointer to the actual animation in gMarioAnims, so mods can grab the pointer and reuse it.
added get_mario_vanilla_animation to Lua, which lets a mod get any of mario's built in animations from its index.
2024-05-21 21:17:30 +10:00
Isaac0-dev
37528b7ee8
fix flashbang while pause entering a level (#45) 2024-05-14 23:02:27 +10:00
Isaac0-dev
2f5b0c4880
reset mario state on player disconnect (#44)
fixes some mod related bugs
2024-05-14 10:12:20 +10:00
Isaac0-dev
eaa1a59996
fixed some mario cutscene action related bugs (#43)
- 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
2024-05-14 09:45:33 +10:00
Isaac0-dev
626970c022
fixed scuttlebugs incorrect behavior (#41)
scuttlebugs used to always target the closest mario in range, due to angleToPlayer being updated every frame, overwriting the angle if its set to the angle to the scuttlebug's home
2024-05-13 19:37:40 -04:00
Isaac0-dev
082b6dd6da
interpolate scrolling textures (#30)
* interpolate scrolling textures

* cleaner way to skip interpolation

* fixed interpolation only lasting for one frame

* just reorder these

just because
2024-05-13 19:37:29 -04:00
PeachyPeach
a6c1b2a3d1
Fix surface_load memory leaks and improve performance (#38) 2024-05-14 09:08:51 +10:00
PeachyPeach
14cbb673fc
Proper custom object fields (#39) 2024-05-14 08:52:56 +10:00
Agent X
dd6ce3d7f9 Actually fix Waluigi anims 2024-05-11 19:17:50 -04:00
Agent X
ec3fb07e76 Add @Hex4dec HOOK_ON_ATTACK_OBJECT 2024-05-11 18:44:18 -04:00
Agent X
ee1034a79b Disable Waluigi anims for now 2024-05-11 16:43:07 -04:00
Isaac0-dev
1e4e1f8e75
fix bugs caused by interpolating the frame an object spawns (#36) 2024-05-11 08:28:20 +10:00
Isaac0-dev
533404ca10
fixed camera palette editor cutscene breaking while transitioning to different cutscenes (#34) 2024-05-10 09:08:37 +10:00