Commit Graph

73 Commits (076dc9f6022fb01150d43a624833d803cbb31032)

Author SHA1 Message Date
Isaac0-dev f07f5e5433 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
PeachyPeach 930d225b5e fix C string typing (#459) 2023-08-18 18:31:59 +02:00
MysterD fcd61d6c0e Add level script pointer validation 2023-06-22 01:13:38 -07:00
MysterD 483c32259d Add Lights0 support to DynOS 2023-06-12 02:08:20 -07:00
MysterD f28573c91e Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
MysterD 8250670808 Prevent deduplication of area models - it would overwrite the areaIndex 2023-05-18 21:29:57 -07:00
MysterD e44fc5dc40 Fix sync of models on late join 2023-05-17 23:32:39 -07:00
MysterD 2703f7193a Rewrite how models are loaded and retrieved... yet again 2023-05-16 00:01:10 -07:00
MysterD d550ca7f6a Schedule level pool to be freed at a later time 2023-05-15 12:03:57 -07:00
MysterD e264cdd16b Load all models into dynamic memory, and store them in a way for reuse 2023-05-12 16:15:35 -07:00
PeachyPeach 717dfde419 Bug fix: level_script_parse (#366)
* Bug fix: level_script_parse

* level_is_vanilla_level
2023-04-29 01:55:29 +02:00
Prince Frizzy 6299fe35d0 Sanity checks for the .bhv system (#293)
* Barebones fix.

* Sanity checks for the .bhv system.

* Two more sanity checks.
2023-02-22 15:12:09 -05:00
Isaac0-dev fe02152649 Give Lua mods access to a form of level script preprocessing (#258)
* Give Lua mods access to a form of level script preprocessing

* Disable acts setting
2023-01-31 07:24:56 -05:00
wRadion a94de7d6af Added `warp_to_warpnode` function (#157)
* Added warp to warp node function

* Added generated docs

* Restored Makefile (will put in other branch)
2022-09-30 20:02:34 -07:00
wRadion 3ab27fc072 Scrolling textures (continued) (#175)
* Handle scroll targets as dynamic array + some error handling

* Remove the need to call init (clean automatically scroll targets)

* Free iteratively instead of recursive

* Added comments + handled some potential errors

* Completed comments

* Remove debug print
2022-09-12 19:57:28 -07:00
wRadion 92ce6d9e4c Handle RM_Scroll_Texture and editor_Scroll_Texture behaviors from RM2C hacks (#173) 2022-08-25 17:46:33 -07:00
PeachyPeach 92f4b22015 DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
MysterD 1a1f593a38 Added ability to have completely custom levels that don't override anything 2022-06-05 21:55:31 -07:00
MysterD 03b21082a6 Cleanup ; recursive descent fixes ; fixed behavior override comparisons
Moved dynos parsing for bhvs and models to a common file
Fixed recursive descent to correctly parse the entire expression
Adjusted bhv generation to use recursive descent
Switched all known behavior comparisons to the overridden versions
Fixed issue with Chain Chomp in star road
2022-06-02 19:07:43 -07:00
Prince Frizzy 2a611034a6 Added a full new custom behavior system (#124) 2022-06-02 12:19:54 -07:00
PeachyPeach f433dbfcf6 Fixed various audio bugs; DynOS can now detect texture duplicates to decrease generated bin files size (#110)
Fixed the following audio bugs:
    Bug: Rom-hacks sequences don't seem to be affected by volume scaling and
         muting
    Fix: Force the BGM sequences to follow the vanilla behavior:
        Volume can't go higher than default volume
        Volume is reduced to 31% when the game is paused
        Audio is stopped when the game is paused outside the Castle levels
    Bug: (Pointed out by Draco) Mario's voice clips are not replaced by the
         player's character's in the following instances: fall to death
         barrier, "here we go" in the ending cutscene, "let's a go"
         after selecting a star, "okey dokey" after starting the game.
    Fix: The first two ones now call
         play_character_sound(m, CHAR_SOUND_...) instead of
         play_sound(SOUND_MARIO_..., pos). The last two ones couldn't be
         fixed the same way for two reasons: First, the corresponding sounds
         were not referenced in the sound table, second, the sound played is
         always cut-off after a few frames (due to how sm64 resets the sound
         banks after loading a level).

Added SOUND_*_LETS_A_GO and SOUND_*_OKEY_DOKEY sounds for each playable
    character as Bass samples.
    Character Bass sounds work the same way as vanilla sounds (i.e. can be
    played with play_character_sound), but they cannot be prematurely stopped
    by sm64 sound banks shenanigans.
    This fixes the cut-off for both the star select and the castle grounds
    entry, plays the sound corresponding to the player's character, and doesn't
    need to extend or edit the sound table.

DynOS can detect texture duplicates when generating a bin or lvl file.
    When a duplicate is detected, the name of the original texture node is
    written instead of the whole PNG data, decreasing significantly the
    resulting file size.
2022-05-19 16:40:45 -07:00
PeachyPeach 18503ecc52 Various bug fixes + Added is_game_paused() and more background music functions to lua (#93)
Bug: DynOS models with animations cannot swap animations if they are
     loaded via lua (smlua_model_util_get_id and
     obj_set_model_extended).
Fix: DynOS_Actor_GetActorGfx takes a graph node instead of a georef,
     and checks for DynosValidActors graph nodes if georef is NULL.

Bug: The game can crash when calling obj_set_model_extended inside a
     HOOK_ON_OBJECT_RENDER hook.
Fix: The crash happens in smlua_model_util_load_with_pool_and_cache_id
     due to pool being NULL. If the game can't allocate an
     AllocOnlyPool object, use DynOS to generate the graph node.

Bug: warp_to_level and similar functions don't trigger HOOK_ON_WARP.
Fix: Call HOOK_ON_WARP hooks in DynOS_Warp_UpdateWarp and
     DynOS_Warp_UpdateExit after level and mario initialization.

Bug: The game sometimes calls HOOK_ON_OBJECT_RENDER hooks for
     unintended objects.
Fix: Initialize hookRender field to 0 when creating an object.

Bug: Actions can't apply gfx offsets to characters that have an anim
     offset (Waluigi, Wario)
Fix: Add m->curAnimOffset to gfx.pos[1] instead of setting it to
     m->pos[1] + m->curAnimOffset, except during the jumbo star
     cutscene.
2022-05-14 14:28:25 -07:00
MysterD 679c5963a3 Attempt #3 2022-05-09 09:45:14 -07:00
MysterD f9411da5a6 Started working toward allowing disconnection 2022-05-09 07:27:47 -07:00
MysterD 0b7e4244e7 Only load DynOS model or texture packs once they're enabled 2022-05-07 18:20:53 -07:00
MysterD 39244b11aa Fix various checks for whether or not we should generate tex files 2022-05-07 15:54:27 -07:00
MysterD 51296bd36b Allow Lua to get any vanilla texture 2022-05-07 03:05:25 -07:00
MysterD e1fd969cf3 Add support for custom HUD textures and faster texture packs w/o EXTERNAL_DATA 2022-05-06 22:03:12 -07:00
MysterD b313e402c9 Automatically disable billboards on DynOS models with >6 vertices 2022-05-04 00:14:33 -07:00
MysterD 40896e09d0 Prevent DynOS packs from being enabled then disabled on launch 2022-04-23 03:23:30 -07:00
MysterD a8fbf26338 Fix crash when toggling dynos packs 2022-04-23 02:22:12 -07:00
MysterD 03b81569e9 More performance improvements 2022-04-22 20:57:18 -07:00
MysterD a3df8d9c0b Massive DynOS refactor for performance/organization 2022-04-19 21:06:18 -07:00
MysterD 8ddf90a058 Make DynOS texture lookup use a set for performance 2022-04-19 18:24:26 -07:00
Prince Frizzy 7c5261554e Merge in small changes. (#63) 2022-04-16 19:12:12 -07:00
MysterD b6be0a0e78 Rewrite of hash/cache system 2022-04-16 13:05:10 -07:00
MysterD 078d4b3afc Change how DynOS generates actors - generate any geolayout that isn't referenced by another 2022-04-13 18:27:21 -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 d4f462d491 Added custom level script overrides, warps work now 2022-04-08 19:29:16 -07:00
MysterD 0342f767df Refactored actor geos in DynOS 2022-04-08 18:56:22 -07:00
MysterD 420789b570 Split dynos_misc stuff into mgr files 2022-04-08 08:18:06 -07:00
MysterD ac8db94f53 Renaming cleanup 2022-04-08 01:52:53 -07:00
MysterD 837f1e4f71 Function pointer cleanup 2022-04-08 01:46:29 -07:00
MysterD 652452540c Added vanilla lvl cols to level gen, changed how pointer offsets are saved 2022-04-07 23:06:10 -07:00
MysterD 8d0eff3cb2 Added support for SM76's JUMP_AREA, added missing lvl geos, reordered parsing 2022-04-07 18:34:44 -07:00
MysterD c5f7aecd40 Fixed token corruption in DynOS, added support for runtime LOAD_MODEL_FROM_GEO 2022-04-07 08:21:19 -07:00
MysterD ab115da1de Refactored how vanilla data is stored/retrieved within DynOS 2022-04-06 21:32:55 -07:00
MysterD 431a2b5da8 Merge branch 'level-scripts' of github.com:sm64ex-coop-dev/sm64ex-coop into level-scripts 2022-04-05 23:00:20 -07:00
MysterD 635b23aa6f Added support for custom skyboxes in DynOS level gen 2022-04-05 22:56:03 -07:00