Commit Graph

210 Commits (0a382308bf9b4fc1ec322456585935267d00fe09)

Author SHA1 Message Date
MysterD 46abf2c13d Change MAX_PLAYERS check to unstable branch 2020-10-16 02:53:09 -07:00
MysterD 927231c719 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 cd05b6ffc9 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 cd64f2e0e6 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 161506431d Fixed bug with whirlpools 2020-10-02 23:35:06 -07:00
MysterD 4240603d86 Synchronized Monty Mole 2020-10-01 12:39:06 -07:00
MysterD cbc2a463ca 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 a480b4c288 Synchronize instant warps 2020-09-28 19:58:37 -07:00
MysterD 518019fee1 Additional synchronization fixes for end cutscene. 2020-09-26 12:07:43 -07:00
MysterD fa0f195c92 Rewrote synchronization for treasure chests
Fixes #63
2020-09-19 01:40:42 -07:00
MysterD 3bab7a7fdb 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 2771c1be7c Allow exiting from course at any time 2020-09-08 09:52:48 -07:00
MysterD c8a8a3fd53 Fixed glitchy animations on remote when in dialog 2020-09-08 09:33:55 -07:00
MysterD 197d9c93ff Prevent exclamation box from double spawning stars 2020-09-07 23:10:28 -07:00
MysterD 21759a2a34 Pausing the game no longer pauses, just brings up the menu
Fixes #19
2020-09-06 22:27:09 -07:00
MysterD 416f4a1398 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 62ecf2c58a Geo2 removal wip 2020-09-06 13:54:01 -07:00
MysterD 5857b71209 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 a54d60b135 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 0c33337d35 Synchronized square platforms as groups of two 2020-08-28 20:25:34 -07:00
MysterD 28d6a6fb07 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 caae3425f4 Synchronized treasure chests 2020-08-18 18:43:42 -07:00
MysterD 3a321fd8dc Fixed visual bug when both players are sliding 2020-08-12 19:14:35 -07:00
MysterD 0a99ac47b6 Synchronized breakable wall 2020-08-11 23:00:55 -07:00
MysterD 9db09f19da Synchronized cap switch, and exclamation box contents 2020-08-10 22:59:11 -07:00
MysterD 4584b8b8f2 Gave each BehaviorScript an ID
Created functions to trivially translate an ID to a Behavior and vice
versa. Sent ID over packets instead of Behavior pointer. This should
allow Linux and Windows to play together.
2020-08-09 16:21:12 -07:00
MysterD 0154afb3dc Synchronized 1up spawning 2020-08-09 09:04:30 -07:00
MysterD 77d3c18c75 Synchronize Bobomb buddies and cannons 2020-08-09 07:42:44 -07:00
MysterD a1522c9eaf L is real 2020
Added Luigi model.
Renamed all previous references to 'Luigi' to 'Mario2' since player 1
isn't always mario, and player 2 isn't always luigi.
Now server is always mario and client is always Luigi.

Luigi model credits:
Original model by Cjes, converted by AloXado320, textures added/fixed by
SunlitSpace542.
2020-08-08 21:36:49 -07:00
MysterD f77ed51258 Synchronized King Bobomb
Tried to synchronize dialog stuff, it's way too much of a mess to do
2020-08-08 17:13:11 -07:00
MysterD a76dbaeb5c Synchronized coin collection
Reimplemented how randomness is synchronized
2020-08-07 18:01:58 -07:00
MysterD 1a838e3ac6 Synchronized seesaw, started moving toward a MAX_PLAYERS define 2020-08-06 22:52:32 -07:00
MysterD 5f5d2966ac Synchronized breakable boxes
Added maximum sync distance, special cases for infinite distance and
only synchronizing entity deaths.

Started mocking out reliable packets for entity deaths.
2020-08-04 22:42:28 -07:00
MysterD 6e38a80888 Force synchronizing of level changes 2020-08-02 23:02:29 -07:00
MysterD 0fad9840a3 Synchronized goombas, synced randomness, added extra fields to object packets 2020-08-02 18:29:46 -07:00
MysterD ae1f5bf892 Started synchronizing objects, refactored networking 2020-08-02 01:43:12 -07:00
MysterD 694a593659 Saved player index in held objects 2020-08-01 19:03:26 -07:00
MysterD 70fa41fd65 Separated animations between players 2020-07-30 18:09:47 -07:00
MysterD f84e9c92af Started adding player 2 / Luigi 2020-07-29 21:08:38 -07:00
MysterD e902cd51da 60 fps patch 2020-07-28 18:28:12 -07:00
fgsfds b9e16a143e replace 'double' vsync option with 'auto' from sm64-port 2020-07-07 15:21:14 +03:00
fgsfds f2d64cc43d merge gfx updates from sm64-port 2020-07-07 15:21:14 +03:00
n64 6cf747b7d0 Refresh 11 2020-07-05 14:15:43 +03:00
fgsfds 8fa922c5e0 throw out unused libultra sources 2020-06-21 02:21:46 +03:00
fgsfds 9e4f881c9e update puppycam; add runtime option to disable it 2020-06-20 17:22:33 +03:00
n64 5bee83faa8 merge refresh 10 2020-06-20 02:49:59 +03:00
fgsfds e1b3ad9070 fix JP build 2020-06-17 05:18:05 +03:00
NoHomoBoi 183151618c Added sfx and env volume settings 2020-06-13 02:16:00 -05:00
NoHomoBoi d59c5bc61f Merge branch 'nightly' of https://github.com/KiritoDv/sm64pc into nightly 2020-06-11 22:40:55 -05:00
NoHomoBoi e5f80a8d62 Added music volume config 2020-06-11 22:39:13 -05:00
fgsfds 9fd2477ea0 add apply button to display settings 2020-06-11 22:24:46 +03:00
fgsfds 1559d03293 add D3D12 headers because they're missing in mingw 2020-06-11 22:24:46 +03:00
fgsfds 0493d12839 added D3D11 and D3D12 renderers from Emil/n64-fast3d-engine
along with options to select backends for windowing, rendering, audio and controls in the Makefile

use RENDER_API=D3D11 or D3D12 for the D3D renderers, that will also automatically enable using DXGI for windowing; SDL2 will still be used for input and audio for the time being

also adds three-point filtering to the OpenGL backend and an option for it in the menu
2020-06-11 22:24:46 +03:00
fgsfds 5c4d895fec add virtual filesystem thing w/ ZIP support
similar to Quake 3: all the archives and folders get mounted to the same mountpoint in the VFS, read access to files in the VFS is transparent
2020-06-07 21:06:25 +03:00
Zerocker 71de5a7d00 Revert "Secret Cheat was added"
This reverts commit 4d7bbe7f42.
2020-05-31 14:18:17 +09:00
Zerocker 8c802f03c4 Added rumble strength option 2020-05-30 20:50:12 +09:00
Zerocker 66e69a219f Merge remote-tracking branch 'upstream/nightly' into rumble_back 2020-05-29 23:19:09 +09:00
GateGuy 7cc1539df3 Added deadzone option 2020-05-28 18:40:36 -04:00
fgsfds f4252e311e add option to load textures from external files
this stores the null terminated texture name instead of the texture data

activated with EXTERNAL_TEXTURES=1
2020-05-25 04:22:03 +03:00
Zerocker 17de13cc33 Enabled rumble for all versions. 2020-05-24 23:52:03 +09:00
Zerocker 4d7bbe7f42 Secret Cheat was added 2020-05-24 23:50:55 +09:00
fgsfds d7331f176b separate options menu strings and add JP strings 2020-05-22 01:36:49 +03:00
fgsfds ad47b7e7f1 unfuck BSWAP16 macro, replace it with BE_TO_HOST16() in audio 2020-05-22 01:36:49 +03:00
fgsfds 3d86e957a5 fix text rendering on JP and (maybe) EU
also cache converted IA1 characters so it wouldn't reconvert them every goddamn time they're rendered
2020-05-22 01:36:49 +03:00
fgsfds 602409bc60 avoid redefining CLOCK_MONOTONIC and shit 2020-05-20 17:56:35 +03:00
Mario Reder 2ba8891448 fix non mingw builds
resolves #230
2020-05-20 16:50:05 +02:00
fgsfds 4fdaa3475f clean up some toolchain compatibility fixes
also rename the abs() macro to not cause any fucking conflicts ever again
2020-05-19 22:22:52 +03:00
zerocloude fc4b8d303a Merge pull request #205 from porcino/nightly
Option to hide the hud
2020-05-19 23:46:19 +09:00
zerocloude 6d449d21a5 Merge pull request #93 from yksoft1/mingw.org-compatible
Making code MinGW.org and MSYS1 compatible
2020-05-19 23:45:44 +09:00
zerocloude ea8d990389 Merge pull request #209 from coltongit/mxe-build-fix
Yet another MXE build fix
2020-05-19 23:25:15 +09:00
Colton Rushton 2170a4cee9 Refactor PR #156 2020-05-19 10:32:01 -03:00
Colton Rushton 736c7a2fff Refactor PR #151 2020-05-19 10:14:44 -03:00
yksoft1 bfa697974b Fix types.h include guard to avoid any conflict with <sys/types.h>. 2020-05-19 20:39:01 +08:00
U-ALTTP-PC\ALTTP 1aa8ef7692 option to hide the hud 2020-05-19 03:24:51 -03:00
V. R. Miguel 7565ece46c Merge branch 'nightly' into master 2020-05-18 23:00:42 -03:00
fgsfds 6929147d01 Revert "Merge branch 'nightly' into master"
This reverts commit 4bade2f06a, reversing
changes made to ee37d7cb5e.
2020-05-19 02:38:59 +03:00
fgsfds 7aae20c293 Revert "(hopefully) fix the timing crap; add vsync option"
This reverts commit 541de0e3d3.
2020-05-18 18:44:35 -03:00
fgsfds 541de0e3d3 (hopefully) fix the timing crap; add vsync option 2020-05-18 23:03:04 +03:00
Daniel 31308723e2 Added "Exit course at any time", "Huge Mario" and "Tiny Mario" cheats
The exit course at any time cheat clears up one of the TODO items while keeping purists happy since it's optional :)
2020-05-18 17:51:53 +01:00
Heaven Volkoff aeb4d4e204 Implement save/restore window dimensions/position
- Add an entry in options menu to reset window
2020-05-17 23:31:31 -03:00
Daniel e5402b80fe Added a "super responsive controls" cheat
Added a "super responsive controls" cheat. When enabled, Mario will look straight into the direction the user inputs when changing directions, with no interpolation at all. (you can still slide / side jump / etc )

The change is especially noticeable when playing with keyboard.
2020-05-18 00:05:26 +01:00
Daniel 67d1d0cc53 Enabled a Cheat menu
Enabled a cheat menu. It includes 4 cheats, and all of them rely on the global "Enable cheats" option so the user can quickly turn all the selected cheats off and back on.
2020-05-17 22:56:06 +01:00
yksoft1 8d9f9f6ef5 Merge remote-tracking branch 'upstream/master' into mingw.org-compatible 2020-05-17 18:33:17 +08:00
fgsfds e949d0595c Merge pull request #132 from coltongit/patch-12
Further fixes to MXE compilation
2020-05-17 01:24:14 +03:00
Colton G. Rushton 36c2e7e946 fixed MXE once and for all
thanks to @fgsfdsfgs, this is the final thing needed for MXE support
2020-05-16 19:18:50 -03:00
Colton G. Rushton 61fc6410df fix the MXE fix for os_libc.h 2020-05-16 17:21:59 -03:00
Colton G. Rushton f05f04271b MXE fix for os_libc.h 2020-05-16 17:14:10 -03:00
fgsfds 23055c2a44 Merge branch 'master' into master 2020-05-16 22:47:39 +03:00
fgsfds 0a639cdaec bettercam: add adjustable camera deceleration 2020-05-16 20:30:06 +03:00
fgsfds 06dc422c44 add dumb master volume control 2020-05-16 16:15:40 +03:00
fgsfds c83f44e0bb add fullscreen and filtering settings to options
filtering only applies to newly loaded textures
2020-05-16 16:15:27 +03:00
Vinícius R. Miguel b7c209cb84 Add in-game control binding menu
Originally on the testing branch
2020-05-15 15:38:35 -03:00
yksoft1 0a2212978e Better way to detect mingw-w64; fix bettercamera for mingw.org; close
.assets-local.txt before deleting it.
2020-05-15 00:26:56 +08:00
yksoft1 29888bfd35 Make the code buildable on MinGW.org (not mingw-w64) and MSYS1. 2020-05-14 23:47:00 +08:00
Hyenadae 352f0c8b9b Fixed more border-related code and fixes to N64 build removal 2020-05-14 05:18:12 -04:00
Vinícius R. Miguel ec810d4222 Fix black edge caused by UB
Seems to affect certain targets such as `aarch64`. This fix originally by @Emill.
2020-05-13 21:18:22 -03:00
Hyenadae 3c38191956 Removed majority of TARGET_N64 logic from code 2020-05-13 07:57:25 -04:00
Hyenadae 708e3fd684 WIP In-Game Exit via pause+save menus w/ Localizations 2020-05-11 06:58:33 -04:00
IvanDSM 85dbb70e38 Mouse Look ported to camera_rebase
With check for settings SDL_SetRelativeMouseMode only if Mouse Look is enabled.

We always send regards to Fastblitters.
2020-05-09 02:10:56 -03:00
Jan200101 d0eac210c3 port analog camera code to the master codebase 2020-05-08 13:41:35 +02:00
Jan200101 9267bdd8a8 merge PC port onto the decompile 2020-05-07 20:21:22 +02:00
n64 4d54e2f91a Refresh 8 2020-04-03 14:57:26 -04:00
n64 88e2433da5 Refresh 7 2020-03-01 22:42:52 -05:00
n64 88b91e7c75 refresh 6 2020-02-03 00:51:26 -05:00
n64 ced3a63505 refresh 5 2020-01-03 10:38:57 -05:00
n64 99e662fa5d refresh 4 2019-12-01 21:52:53 -05:00
n64 8bc51a5025 Refresh 3 2019-11-03 14:36:27 -05:00
n64 5effc886be Refresh 2 2019-10-05 15:08:05 -04:00
n64 33b27a1ceb Refresh 1 2019-09-01 15:50:50 -04:00
n64 89e8690857 init2 2019-08-25 00:46:40 -04:00