Commit graph

271 commits

Author SHA1 Message Date
John S
7d0b184fa5
Document surface_collision.h (#549)
* Document surface_collision.h

Add documentation to the functions of surface_collision.h

* Make descriptions a little more clear

* Fix random space
2024-12-12 00:02:07 -05:00
Agent X
bdf908ea7e Fix typo 2024-12-08 18:49:09 -05:00
Agent X
f9d560aa78 Document some more functions (55.03%) 2024-12-08 18:38:23 -05:00
Agent X
66e23c0cbf Document behavior headers (54.07%) 2024-12-08 18:12:04 -05:00
Agent X
9b6e891b1c Document 8 more files (19.45%)
Special thanks to zam_boni on Discord as well

Co-Authored-By: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com>
Co-Authored-By: xLuigiGamerx <88401287+xLuigiGamerx@users.noreply.github.com>
2024-12-07 22:23:19 -05:00
Agent X
64659afd82 Small consistency changes. Functions are now 8.85% documented 2024-12-07 12:58:26 -05:00
John S
c3539cfb58
Add descriptions to the auto-doc (#545)
Cleaned up math_util.h a little bit and added a description system for use with the autodoc.
2024-12-07 11:31:11 -05:00
John S
a47bc97011
Additional Fix for sqr, max, and min Functions Focusing on Improved Performance and Documentation Support (#529)
Co-authored-by: js <js@archlinux.local>
2024-11-28 08:56:16 +10:00
Isaac0-dev
96dc4da358 fix min max and sqr macros again 2024-11-27 23:50:56 +10:00
John S
74e344bef6
Fix issues in PR #359 relating to incorrect handling of miscellaneous data types (#527)
* Update math_util.h to fix issues in last PR

* Update math_util.h again
2024-11-27 09:15:54 +10:00
Isaac0-dev
39826deadd add a way to find surface types in collision 2024-11-22 08:57:37 +10:00
John S
2cf1d03ed5
Optimization of mtxf_lookat() (#377)
* Update mtxf_lookat

* Make new mtxf_lookat a little easier to read and add mario specific types

* fix the declaration for mtx[3][3]

* Added negative sign
2024-10-24 07:17:29 +10:00
John S
b712d4b6a3
Fix the branch bloat found in the atan2s and atan2_lookup functions (#375)
* Fix branch bloat in atan2s and atan2_lookup

* Fix unecessary inline on lookup
2024-10-18 16:47:00 +10:00
John S
479cc9d79d
Fix windows compilation by undefining min and max when defined via minwindef.h (already in main) (#378) 2024-10-18 15:23:36 +10:00
Isaac0-dev
f8a30e4fd8 fix some issue with recent prs 2024-10-18 12:47:24 +10:00
John S
3dd9226bc9
Update math_util.c and math_util.h to support autodoc with trig functions (inline instead of macros) and add new functions to smlua_math_utils (#359)
* Update math_util.c and math_util.h to move toward inlining functions instead of macros for autodoc. Expose some misc functions useful to lua

* Fix formatting

* Fix math_util.c formatting

* Fix formatting for smlua_math_utils.c

* Fix formatting smlua_functions.c

* Fix type redundancy in _Generic macros

* Add checks for including the highly optimized builtin compiler functions for GCC/Clang

* Add compiler checking for absx() to add in the highly optimized GCC/Clang builtins

* Fix repeated use of float built-ins for non floating point numbers

* Fix grammar mistake

* Fix functions to use camelCase as requested.

* Fixed the use of a custom sqrt approximation as modern procs have a built in FSQRT instruction that is faster.

---------

Co-authored-by: js <js@cartbara.columbus.rr.com>
2024-10-18 12:20:36 +10:00
Agent X
ac805bf94d Expose some behavior_script.h functions to Lua 2024-06-23 19:30:38 -04:00
Agent X
52b4d51508 Add collision_find_surface_on_ray_precision 2024-06-16 10:45:55 -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
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
PeachyPeach
a6c1b2a3d1
Fix surface_load memory leaks and improve performance (#38) 2024-05-14 09:08:51 +10:00
Isaac0-dev
1e4e1f8e75
fix bugs caused by interpolating the frame an object spawns (#36) 2024-05-11 08:28:20 +10:00
Agent X
19b354fb2f Change around printing a little 2024-04-19 13:32:39 -04:00
Agent X
7dd02b5c4d Massively improve "Global Player Models" option 2024-03-17 20:58:38 -04:00
Agent X
e48670a2ef Fix red coin, secret, caps, WF platforms and goomba bhv overrides being broken 2024-03-17 18:05:44 -04: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
a0a65e19bd Re-add vanilla singleplayer pause with proper network timer pausing 2024-03-03 17:25:11 -05:00
Agent X
ff82a40b3f Remove singleplayer pause 2023-12-08 15:36:35 -05:00
David Joslin
750b9a8730 Added bounds checking to gActiveMods.entries[] 2023-11-08 19:53:36 -05:00
defacube
36e9274ef5 Add support for 16 areas (#502) 2023-11-08 19:48:09 -05:00
Sunk
d3c14ce038 Fix camera bug introduced by a previous PR (#505)
* Fix camera bug introduced by a previous PR

* Readjust camera collision code
2023-11-08 19:47:40 -05: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
David Joslin
b28fd30b43 Have camera ignore all of the correct surfaces 2023-10-27 23:32:03 -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
99ad09cfd3 Force broken romhack port missing skyboxes to BACKGROUND_HAUNTED 2023-10-26 16:09:36 -07:00
MysterD
3456e10216 Sanity check collisions, and increase efficiency of growingpool 2023-06-25 17:54:01 -07:00
MysterD
3fa5823578 Properly determine the correct wall between multiple, turn off rounded corners in the air 2023-06-22 20:00:43 -07:00
MysterD
c82e45c0a0 Add level script pointer validation 2023-06-22 01:13:38 -07:00
MysterD
feee5eb569 Fixed more memory corruption with object collisions 2023-06-16 17:19:18 -07:00
MysterD
b3cae34234 Add bounds checking to instant warps, and make object collisions dynamic
in size
2023-06-15 20:50:12 -07:00
MysterD
c594179cca Make surface pools infinite 2023-06-15 19:40:34 -07:00
MysterD
3a85b7051e Cleanup 2023-06-11 14:25:28 -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
cf7d4bc8d2 Prevent deduplication of area models - it would overwrite the areaIndex 2023-05-18 21:29:57 -07:00
MysterD
b0408a1379 Fix some bugs found in testing 2023-05-18 17:54:29 -07:00
MysterD
41a4fcf516 Keep animations in-bounds 2023-05-18 12:42:18 -07:00
MysterD
ddd2f19ca1 Fix more memory errors 2023-05-18 01:57:36 -07:00
MysterD
f53ffcd491 Keep the previous dynamic pool in memory
Due to sm64 weirdness, I can't reliably free memory at certain points
The hacky solution is to keep the previous dynamic pool in memory,
essentially requiring two frees to actually clear all memory from it
2023-05-17 22:33:14 -07:00
MysterD
93020c04e5 Prevent broken mods from messing up the sync table of others 2023-05-17 00:01:09 -07:00
MysterD
18bf5847a2 Prevent rending of corrupted graphnodes, only run lua GC once per frame 2023-05-16 21:49:13 -07:00