Commit Graph

58 Commits (60a2f1d5537e95ad73f213c996c78562deadb92a)

Author SHA1 Message Date
MysterD 86889da980 Added gActiveMods global to lua 2022-04-22 18:44:59 -07:00
MysterD 2552d22cf9 Added custom mod packets 2022-04-22 00:13:58 -07:00
MysterD 77ca167564 Added HOOK_ON_DEATH 2022-04-21 18:34:12 -07:00
MysterD 647d7c92b9 Fixed player interactions 2022-04-21 00:48:26 -07:00
MysterD b531c30a46 Added passes_pvp_interaction_checks() 2022-04-20 18:27:34 -07:00
MysterD 8f5136783c Merge branch 'unstable' of github.com:sm64ex-coop-dev/sm64ex-coop into unstable 2022-04-20 11:22:18 -07:00
MysterD 0db8bde5ab Add headPos to marioBodyState 2022-04-20 18:21:36 -07:00
PeachyPeach ee9dbc6e80 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 1b291b0941 Added HOOK_ON_OBJECT_RENDER 2022-04-19 22:36:47 -07:00
MysterD cc4e3c6354 Refactor how objects set their models 2022-04-19 18:47:50 -07:00
MysterD 78f3a573ba exposed sequence ids to lua 2022-04-15 21:51:18 -07:00
MysterD f986102dc4 Added ability to set a level to skip credits, fixed SM74 bugs 2022-04-15 18:33:10 -07:00
MysterD dc4310a152 Improve rom hack camera's collisions in tight spaces and focus underwater. Add HOOK_ON_SET_CAMERA_MODE 2022-04-13 00:10:50 -07:00
MysterD 84e3099d6e Add a vanilla-like camera for romhacks 2022-04-11 21:04:15 -07:00
MysterD 709a145575 Quick fixes for test 2022-04-10 10:11:13 -07:00
MysterD 208ae3815e Added default volume support for custom sequences 2022-04-10 09:47:17 -07:00
MysterD 18815bff0b Added support for custom music 2022-04-10 09:11:45 -07:00
MysterD 0e4ab8ec64 Added HOOK_GET_STAR_COLLECTION_DIALOG 2022-04-10 02:44:11 -07:00
MysterD 1873148be8 Add exit castle warp params to Lua 2022-04-10 02:29:44 -07:00
MysterD fbab32369c Allow ability to disable vanilla course-specific settings for camera 2022-04-10 01:55:11 -07:00
MysterD 2d159af4cc Allow coop mods to use the backup save slot independently of the normal one 2022-04-10 00:30:47 -07:00
MysterD 2e8017a39c Allow course names/acts to be changed from Lua 2022-04-09 23:28:36 -07:00
MysterD 37e2593279 Unhardcoded all behavior dialogs, allowed replacement of dialogs 2022-04-09 19:50:50 -07:00
MysterD 47dd967af5 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 38ac873568 Made trajectories overridable from Lua 2022-04-08 23:01:41 -07:00
MysterD 18025909c8 Un-hardcoded vanilla trajectories 2022-04-08 21:01:17 -07:00
MysterD d25159fd77 Refactored StarPositions 2022-04-08 19:46:01 -07:00
MysterD 8805ec2a07 Made the entry level configurable by Lua 2022-04-08 19:39:22 -07:00
MysterD d4f462d491 Added custom level script overrides, warps work now 2022-04-08 19:29:16 -07:00
MysterD 6500173464 Allow Lua to adjust default star spawn positions 2022-04-08 00:37:20 -07:00
MysterD 57531d7453 Add more bhv functions and a func to ge tthe current save 2022-04-07 01:17:48 -07:00
MysterD 54d958a34d Added behavior actions for rom hacks 2022-04-06 18:36:15 -07:00
MysterD 6dd90100ad Adjustments for Lua/Mods 2022-04-06 18:24:50 -07:00
MysterD 2aeb96cc59 Merge branch 'unstable' into level-scripts 2022-04-06 01:36:33 -07:00
Agent-11 / Agent X 058183d020 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 4052347247 More progress toward custom DynOS levels 2022-04-02 15:14:04 -07:00
MysterD 6f00bd7bd0 Ran autogen 2022-03-30 20:03:59 -07:00
MysterD 16aa75ca93 Fix compile errors / run autogen 2022-03-29 21:12:42 -07:00
MysterD 745fce41a8 Add custom collisions to DynOS/Lua 2022-03-28 01:02:33 -07:00
MysterD 5efd8565eb Added ability for Lua mods to adjust gServerSettings 2022-03-26 01:08:15 -07:00
MysterD 7deafce819 Add set_mario_y_vel_based_on_fspeed() to lua 2022-03-26 00:01:13 -07:00
MysterD 2dfb28ddc7 Add gLakituState to Lua 2022-03-25 23:58:10 -07:00
MysterD b38af4b798 Added a bunch of camera functions to Lua 2022-03-25 23:46:37 -07:00
MysterD f8d52343b5 Add HOOK_ON_PAUSE_EXIT 2022-03-25 23:06:14 -07:00
MysterD f38741ba4a Make new timers immutable 2022-03-25 21:39:03 -07:00
Isaac 4f78f507ee Add save file flag functions to lua api (#41) 2022-03-24 19:30:15 -07:00
Prince Frizzy b01553200b A load of fixes and cleanup.. (#39)
Red Coins will now properly play the cutscene for who collected the last red coin.
Secrets will now properly play the cutscene for who collected the last secret.
Treasure Chests will now only play the star cutscene for the person who opened the last chest.
Properly named some unknown Treasure Chest fields.
The Chain Chomp Chain should now properly be despawned for late joiners.
Improved the Big Boo's Haunt Merry-Go-Round checks for Mario.
2022-03-22 19:50:13 -07:00
MysterD c34ffd90e7 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 d5f225018f Added HOOK_ON_OBJECT_UNLOAD, HOOK_ON_SYNC_OBJECT_UNLOAD 2022-03-17 01:43:08 -07:00
MysterD 7a00461333 Added allocate_mario_action() 2022-03-17 01:17:34 -07:00