Commit graph

236 commits

Author SHA1 Message Date
Prince Frizzy
8b9b33f0af
Some bug fixes. (#67)
* Some bug fixes.

Fix Bully Star Spawning Cutscene to be player dependent.
Add missing line to Makefile.
Fix compile error with Clang in save_file.c

* Fix DDD Chests Star spawining in the wrong location.
2022-04-20 11:18:17 -07:00
MysterD
2347ab61c1 Added HOOK_ON_OBJECT_RENDER 2022-04-19 22:36:47 -07:00
MysterD
78bda75e45 Massive DynOS refactor for performance/organization 2022-04-19 21:06:18 -07:00
Prince Frizzy
f51f1d6c4a
Merge in small changes. (#63) 2022-04-16 19:12:12 -07:00
MysterD
bf435d5aa9 Fixed knockback direction 2022-04-14 18:25:42 -07:00
MysterD
8085f53e5a Added support for SM76's JUMP_AREA, added missing lvl geos, reordered parsing 2022-04-07 18:34:44 -07:00
MysterD
4956f0dd95 Fixed token corruption in DynOS, added support for runtime LOAD_MODEL_FROM_GEO 2022-04-07 08:21:19 -07:00
MysterD
4aff26cf27 Added support for known models and unknown behaviors for level gen 2022-04-06 23:10:39 -07:00
MysterD
a58130b9f6 Added extended bounds 2022-04-06 08:40:22 -07:00
MysterD
78a2e17d7c Added support for custom skyboxes in DynOS level gen 2022-04-05 22:56:03 -07:00
MysterD
abce3b3afd Added ability for DynOS levels to call into lua for custom objects 2022-04-04 18:16:36 -07:00
MysterD
03b0520504 More DynOS custom level progress - BOB can now compile 2022-04-03 03:30:47 -07:00
MysterD
046c595f92 More progress toward custom DynOS levels 2022-04-02 15:14:04 -07:00
MysterD
2f56594e45 DynOS level parsing - phase 1 2022-04-01 17:19:26 -07:00
MysterD
77fc64c55e Start parsing level scripts in DynOS 2022-04-01 01:43:50 -07:00
MysterD
8a7097b802 Refactor coop-specific DynOS code 2022-03-30 23:05:53 -07:00
MysterD
0a5d4cd215 Fix softlock when player is grabbed by enemy 2022-03-28 18:57:52 -07:00
MysterD
d74f5cfe61 Add custom collisions to DynOS/Lua 2022-03-28 01:02:33 -07:00
Prince Frizzy
0fdd721241
Cleanup (#43)
* Rewrite a bit of get_level_name() and a bunch of cleanup.
2022-03-26 22:13:57 -07:00
MysterD
c0b6590fcd Separate ptrData from rawData on all platforms 2022-03-25 23:05:58 -07:00
MysterD
5b45e44b81 Improve sanity check for torsoPos (fixes PVP when using non-player-models) 2022-03-25 21:36:46 -07:00
Prince Frizzy
a89aa6ced8
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
0cd2a91e9c Added allocate_mario_action() 2022-03-17 01:17:34 -07:00
MysterD
469e4ac4e4 Load Super Keeberghrh's ERROR model when DynOS can't find the model 2022-03-16 01:34:18 -07:00
Prince Frizzy
bb8ead8681
Fix star cutscene playing for everybody with Klepto plus some cleanup. (#32)
* Fix star cutscene playing for everybody with Klepto plus some cleanup.

* Fix compile error.

* Fix pyramid elevator syncing, Hopefully fix pyramid top syncing, Grand Star partial working sync.

* Fix up the Grand Star code.
2022-03-16 00:05:28 -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
Prince Frizzy
75bb9b7912
Update to Refresh 13 (#19)
* Refresh 13

Co-authored-by: n64 <n64>
2022-03-13 00:17:10 -08:00
MysterD
bc0868e80e Implemented dynos model packs into configfile 2022-03-10 19:23:38 -08:00
MysterD
e81808c314 Merge branch 'dynos' into unstable 2022-03-10 18:17:59 -08:00
MysterD
f92857704d Ported the rest of DynOS, but left the options menu disabled 2022-03-10 01:18:53 -08:00
MysterD
4638ff6f22 Added the ability to set surface collisions on custom behaviors 2022-03-09 23:02:20 -08:00
MysterD
d03aacc144 Added ability for Lua to spawn non-synchronized objects 2022-03-09 21:25:34 -08:00
MysterD
b3ed387711 Added DynOS v1.1 without the dynamic options
- Added support for coop-specific actors
- Added support for coop-specific geo functions
- Added support for coop-specific model functions
2022-03-09 18:01:03 -08:00
MysterD
3ad6c721dc Initial custom behavior commit 2022-03-03 01:04:15 -08:00
MysterD
07cbeb119c Fixed more possible bugs pointed out by cppcheck 2022-03-01 21:13:00 -08:00
PeachyPeach
0c42836b81
Added support for X and Y buttons; Re-mapped B button to the actual B button for controllers; Moved particleFlags code so lua scripts can spawn Mario particles with 'before Mario update' and 'after Mario update' hooks (#5) 2022-02-27 14:31:59 -08:00
MysterD
1131fb02db Prevented SM64 hang on object count overflow 2022-02-22 01:10:17 -08:00
MysterD
94bc7940cc Initial Lua support for spawning objects 2022-02-21 22:46:39 -08:00
Prince Frizzy
32b0c91935
Fixes for Refresh 12 2022-02-19 01:39:38 -05:00
MysterD
29599a82ec Created TextureInfo struct 2022-02-15 22:13:10 -08:00
Prince Frizzy
f565e89c68 sound: Add extended channel mode for sequences.
Provided by theclashingfritz
2022-02-15 01:36:44 -08:00
MysterD
3319b048c2 Updated Andrat's Luigi sound pack
Provided by FluffaLuigi
2022-02-15 01:00:09 -08:00
MysterD
502bf08393 Fixed Wario sounds pitch/speed 2022-02-15 00:51:19 -08:00
MysterD
c818b7930a Added wario sounds
Have yet to pitch correct them.

Huge thanks to theclashingfritz and anzz1
2022-02-14 23:36:53 -08:00
MysterD
6f8714c764 Added FluffaLuigi's Wario model 2022-02-13 21:52:35 -08:00
MysterD
6fcc60a791 Changed autogeneration of Lua constants to pull directly from src 2022-02-03 00:43:17 -08:00
MysterD
ec161c9c09 Reimplemented how Lua reads/writes to C Objects 2022-01-17 20:50:39 -08:00
MysterD
1c29a2b47f Second iteration of Lua IO
Started working on third
2022-01-17 19:23:52 -08:00
MysterD
4cebce4864 Added Waluigi - model provided by Super Keeberghrh 2021-09-05 14:23:47 -07:00
MysterD
cae6ef02fc Lowered priority of snoring sounds so they don't cut off other sounds 2021-08-23 21:19:13 -07:00
MysterD
04d01667c3 Added a callback for area timer objects to only run certain things once per frame 2021-08-19 00:31:20 -07:00
MysterD
4688ffe1f0 Added toad player character 2021-08-18 22:55:31 -07:00
MysterD
8a40aeddea Refactored how enemies display a cap in their hand 2021-08-18 21:39:39 -07:00
MysterD
43932249c6 Added support for spawning Luigi-versions of metal/vanish/wing cap as items 2021-08-15 11:46:28 -07:00
MysterD
efd22a81ab Added hacks for fire spitter and skeeter to prevent glitching through the floor on water level change 2021-08-14 20:17:57 -07:00
MysterD
7e59d34939 Added new MAXIMUM type to network area timer system. Exclamation boxes now reappear at the correct time 2021-08-12 18:13:41 -07:00
MysterD
fecba91c5e Rewrite the core of network area timer (yet again) 2021-08-10 18:29:49 -07:00
MysterD
710a7e4749 Color detached caps according to player palette 2021-08-06 01:02:07 -07:00
MysterD
00da6b48f5 Fade out players when they leave/disconnect 2021-08-04 18:47:59 -07:00
MysterD
6a957757d4 Refactored network area timer system 2021-08-03 19:21:50 -07:00
MysterD
a84e7a73fe Resync bomp using Network Area Timer 2021-08-03 18:52:48 -07:00
MysterD
7e1a05a40b DJUI: Replaced old ingame menu with new DJUI menu 2021-07-15 19:37:09 -07:00
MysterD
038c1135b3 Initial DJUI commit
The birth of a custom user interface system.

Has the ability to draw things to the screen at native resolution
regardless of window size.

Components can be nested within one another to an arbitrary depth.

Text rendering is completely rewritten.

Text and images can be clipped by their parent container.
2021-06-18 15:23:59 -07:00
MysterD
4c401f9ba8 Resynchronized DDD poles to use area timer system 2021-06-15 18:01:03 -07:00
MysterD
ef2287a5d5 Resynchronized checkerboard elevators to use area timer 2021-06-14 20:29:08 -07:00
MysterD
e7d0f8ec8b Resynchronized LLL puzzle pieces
Created a timer based on area that is shared. The puzzle pieces will
execute rapidly to catch up to the timer on level join. This keeps them
in sync without constantly needing to acknowledge that a puzzle piece
had moved before continuing.
2021-06-14 20:14:47 -07:00
MysterD
0b3a97d405 Improvements to late-join synchronization
Removed (slightly) old coin and static ent removal system
Resynchronized respawners
Added packet for macro deletions
    better than previous system since the entities don't need a sync id and we can synchronize deletion station across areas
    allows the synchronization of odd entities like lines of coins
Added packet for spawn info deletions
Split packet_location_request into multiple files
2021-06-09 22:35:34 -07:00
MysterD
33fbed94e4 Synchronized respawners and entities created after level load 2021-06-08 21:21:52 -07:00
MysterD
5db1a9e827 Synchronize late-join coin collection 2021-06-08 02:26:35 -07:00
MysterD
bbdc942501 Ripped out level synchronization/warp code
Began writing new system that synchronizes course/act/level/area per
player and 'ownership' of that location.
2021-06-07 12:19:59 -07:00
fgsfds
60c8da9479 bump MAX_PLAYERS to 16 2021-04-06 02:32:06 +03:00
fgsfds
798389b527 added new GBI command: G_COPYMEM
exclusively for copying lights around for now; required for my retarded model color implementation
2021-04-06 00:18:04 +03:00
MysterD
1564ac7c0f Translated Luigi sounds through new Character system 2020-10-16 23:33:41 -07:00
anzz1
d1739648e1
Added Luigi sounds (#77)
* added a new audio bank 10 for luigi sounds
* made some audio memory buffers larger to fix sound cuts
* added option to enable/disable luigi sounds in the sound options menu
* added Andrat's "90's Classic Luigi Voice Pack" as default luigi sounds

Co-authored-by: anzz1 <>
2020-10-16 11:54:59 -07:00
MysterD
05fd683c64 Fix UNSTABLE_BRANCH checking 2020-10-16 03:56:37 -07:00
anzz1
bc7ec31c02
Enemy hat fixes (#83)
* Ukiki now steals Mario/Luigi hat correctly
* Klepto now steals Mario/Luigi hat correctly
* Mr. Blizzard now knocks off Mario/Luigi hat correctly
* Fwoosh now knocks off Mario/Luigi hat correctly

Co-authored-by: anzz1 <>
2020-10-16 03:03:25 -07:00
MysterD
1a0b3ff79d Change MAX_PLAYERS check to unstable branch 2020-10-16 02:53:09 -07:00
MysterD
c8a45235ca Removed two-player hacks from cannon and object packets
Increased error checking of get_behavior_from_id
Made failure logging for packet_object a lot better
Changed debug logging to show global index instead of "Server/Client"
Changed debug keyboard binds to support more keyboard types
Made SyncObject's rxEventId de-duplication per-player instead of one-player
Removed sizeof(enum) from packet_read/packet_write
2020-10-13 21:44:27 -07:00
MysterD
aaa7e65b65 Created character struct for mario/luigi asset differences
Removed multiple two-player hacks in the process
2020-10-13 18:33:51 -07:00
MysterD
5d9d5ed9d7 Added ability for client to send a packet to server, and for the server to broadcast to all clients 2020-10-12 18:23:48 -07:00
MysterD
fb775165ce Fixed bug with whirlpools 2020-10-02 23:35:06 -07:00
MysterD
f6bae3a619 Synchronized Monty Mole 2020-10-01 12:39:06 -07:00
MysterD
2f7d432143 Synchronized Eyerok, add SSL to supported levels
Eyerok was synchronized, but I'm still not super pleased with the
result. I had to sacrifice dialog to prevent weird states and he's
completely controlled by the server. His synchronization should be
revisited in the future.

SSL should be fully synchronized now.
2020-09-30 18:20:13 -07:00
MysterD
8c7f55a1fb Synchronize instant warps 2020-09-28 19:58:37 -07:00
MysterD
f5df807a0c Additional synchronization fixes for end cutscene. 2020-09-26 12:07:43 -07:00
MysterD
c4b82e7082 Rewrote synchronization for treasure chests
Fixes #63
2020-09-19 01:40:42 -07:00
MysterD
5abd0ca1ab Complete rewrite of custom main menu
The vanilla main menu is an awful pile of code that is extremely painful
to make additions to. So I've side-stepped the problem by writing an
entiely new menu system without all of vanilla's quirks. I've separated
the custom menu system from the menus I want to make, which allows for
easy additions and a clear separation of responsibilities.

Along with this rewrite comes a host menu, adding the missing
configuration options in-game.

Fixes #29
2020-09-13 23:57:14 -07:00
MysterD
a4288fe150 Allow exiting from course at any time 2020-09-08 09:52:48 -07:00
MysterD
29cb0935fb Fixed glitchy animations on remote when in dialog 2020-09-08 09:33:55 -07:00
MysterD
2d0871e061 Prevent exclamation box from double spawning stars 2020-09-07 23:10:28 -07:00
MysterD
36e035984f Pausing the game no longer pauses, just brings up the menu
Fixes #19
2020-09-06 22:27:09 -07:00
MysterD
e0903003f4 Rewrote how players are initialized, stored, and displayed
Since the second-player code was the first code I wrote, it was implemented
poorly. At that point, I didn't know the code base at all and the way it was
written would prevent anyone from ever adding to those parts.

The rewrite allows me to use the default geo.inc.c file for Mario, and removes
all of the geo2.inc.c files. I no longer do a bunch of bit shifting to figure
out which player is being drawn in the rendering code.

I'm also now able to remove tons of duplicate code that exists just for the
remote player. The main player code is generic enough to support both indices.
A side-effect of the rewrite is I was able to remove many assumptions in the
code where two-players is assumed, but many other parts of the code still
assume two players.

This is a fairly major change that, if all goes well, will be completely
unnoticed by the player. However, I do expect new bugs to pop up in strange
places. Time will tell.
2020-09-06 18:52:52 -07:00
MysterD
df7904e288 Geo2 removal wip 2020-09-06 13:54:01 -07:00
MysterD
906ea3345e Players turn into bubbles when they die
Player life counters are separate.
When one player dies they lose a life and are turned into a bubble.
If the other player pops it, they are alive again.
If all players are bubbled, they get kicked out of the level.
If the bubbled player ran out of lives, they can not come back to life
until the level is over.
Whenever a level change happens, everyone's life count is set to a
minimum of two.
No game overs.

Took heavy inspiration from Kaze Emanuar
2020-09-05 18:10:55 -07:00
MysterD
ab9e7c7bca Added player-to-player interactions
Players are now solid to each other and can push each other
Players can now attack each other (but they do not deal damage)
Players can bounce on top of each other, and they get squished
temporarily
Players are given slightly offset positions when they transition between
areas and levels, so they're no longer on top of one another.
2020-09-02 23:50:27 -07:00
MysterD
ab9d7db29f Synchronized square platforms as groups of two 2020-08-28 20:25:34 -07:00
MysterD
d2a2a80d56 Synchronized Big Boo's Haunt + major changes
Synchronized currentRoom per-player
Synchronized haunted bookshelf, and the bookshelf manager
Synchronized haunted chairs
Synchronized mad piano
Synchronized BBH's tilting trap, and made the physics multiple-player-aware
Synchronized scuttlebugs
Synchronized every variety of Boo
Synchronized elevators
Synchronized flamethrowers
Synchronized the various types of enemy books
Synchronized the book switches
Synchronized jumping box
Made coffins multiple-player-aware

Fixed everything that used gMarioState as an array instead of gMarioStates
Prevented some NPC-dialog softlocks
Prevented the remote player from messing up the local's camera settings
Possibly fixed the relatively rare chain chomp softlock
Possibly fixed the relatively rare chain hoot softlock
Fixed the first-person-camera softlock
Forced camera code to use the correct mario struct
2020-08-26 23:29:40 -07:00
MysterD
c589f2a620 Synchronized treasure chests 2020-08-18 18:43:42 -07:00
MysterD
48f42d1873 Fixed visual bug when both players are sliding 2020-08-12 19:14:35 -07:00
MysterD
697670b519 Synchronized breakable wall 2020-08-11 23:00:55 -07:00