Commit graph

181 commits

Author SHA1 Message Date
MysterD
4b63a16056 Added passes_pvp_interaction_checks() 2022-04-20 18:27:34 -07:00
PeachyPeach
9e5a45ecdd
Added lua profiler; Added useful object functions; Bug fixes (#65)
Added a basic lua profiler
        If the game is compiled with LUA_PROFILER=1, displays on screen the average execution time per frame of each active lua mod, in microseconds.

    Added object functions
        For some reasons, accessing the object fields obj.o* via lua is rather slow, and can drastically increase execution time of custom behaviors. For basic stuff like setting an object's velocity or moving it, some functions, missing from the original code, have been added:
        s32 obj_is_valid_for_interaction(struct Object *o): returns 1 if an object is valid for interaction, i.e. active, tangible and not interacted.
        s32 obj_check_hitbox_overlap(struct Object *o1, struct Object *o2): returns 1 if two objects hitboxes overlap. Doesn't check tangibility, only hitbox values.
        void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz): sets an object's velocity.
        void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz): moves an object position by (dx, dy, dz).

    Bug fixes:
        Disable collisions with walls and ceilings after Mario exits a warp pipe to prevent softlocks in narrow places.
        Make the koopa shell exclamation box respawn after some time.
        Quicksand no longer downwarps and instant-kills Mario if he's shocked while being above it.
2022-04-20 11:20:45 -07:00
MysterD
dd6f6c430e Refactor how objects set their models 2022-04-19 18:47:50 -07:00
MysterD
ef4a83dc88 Quick fixes for test 2022-04-10 10:11:13 -07:00
MysterD
2c187bba45 Added default volume support for custom sequences 2022-04-10 09:47:17 -07:00
MysterD
9dc78a0971 Added support for custom music 2022-04-10 09:11:45 -07:00
MysterD
15d6dc3a9c Allow ability to disable vanilla course-specific settings for camera 2022-04-10 01:55:11 -07:00
MysterD
3db42f1700 Allow coop mods to use the backup save slot independently of the normal one 2022-04-10 00:30:47 -07:00
MysterD
653ab58a5d Allow course names/acts to be changed from Lua 2022-04-09 23:28:36 -07:00
MysterD
c75e71f24e Unhardcoded all behavior dialogs, allowed replacement of dialogs 2022-04-09 19:50:50 -07:00
MysterD
98f02458e3 Added a way to bind to movtexqc ids through lua, added the rest of the object constants 2022-04-09 01:47:20 -07:00
MysterD
defb7dc830 Made trajectories overridable from Lua 2022-04-08 23:01:41 -07:00
MysterD
403bf30be9 Added custom level script overrides, warps work now 2022-04-08 19:29:16 -07:00
MysterD
3731ab31af Add more bhv functions and a func to ge tthe current save 2022-04-07 01:17:48 -07:00
MysterD
2187e7b4b3 Added behavior actions for rom hacks 2022-04-06 18:36:15 -07:00
MysterD
6751829f91 Adjustments for Lua/Mods 2022-04-06 18:24:50 -07:00
MysterD
52e705c9d8 Merge branch 'unstable' into level-scripts 2022-04-06 01:36:33 -07:00
Agent-11 / Agent X
746dd50c5c
Add get/set_environment_region (#56)
Set the water height with a function. Also added an example for it in the documentation.
2022-04-05 15:53:16 -07:00
MysterD
046c595f92 More progress toward custom DynOS levels 2022-04-02 15:14:04 -07:00
MysterD
34d28ffb3c Ran autogen 2022-03-30 20:03:59 -07:00
MysterD
2115e4358d Fix compile errors / run autogen 2022-03-29 21:12:42 -07:00
MysterD
d74f5cfe61 Add custom collisions to DynOS/Lua 2022-03-28 01:02:33 -07:00
MysterD
4a9e618efe Add set_mario_y_vel_based_on_fspeed() to lua 2022-03-26 00:01:13 -07:00
MysterD
b7be386200 Add gLakituState to Lua 2022-03-25 23:58:10 -07:00
MysterD
4d9ff3a3b1 Added a bunch of camera functions to Lua 2022-03-25 23:46:37 -07:00
Isaac
65df754b09
Add save file flag functions to lua api (#41) 2022-03-24 19:30:15 -07:00
MysterD
c58702df93 Misc Lua fixes/enhancements
approach_s32 now stays within 32 bits
Fixed SOUND_ARG_LOAD
Added OBJ_COL_FLAGS_*
Added reset_rumble_timers
Added get_hand_foot_pos_*
Added get_water_surface_pseudo_floor
Adjusted new hooks to be called at the appropriate times
2022-03-19 00:56:59 -07:00
MysterD
0cd2a91e9c Added allocate_mario_action() 2022-03-17 01:17:34 -07:00
MysterD
edf06bede0 Added ability for mods to load custom geos 2022-03-14 00:11:36 -07:00
Prince Frizzy
84aa5ad890
Fixes for multiple players getting a star cutscene, Even if they didn't spawn it. (#22)
* Fix up star cutscene issues.
2022-03-13 00:22:48 -08:00
MysterD
08d4818ba7 Added Lua definitions for autocomplete in visual studio code 2022-03-12 21:28:57 -08:00