Commit Graph

220 Commits (coop)

Author SHA1 Message Date
MysterD 5fc6bb0491 Fix clang/mac compile 2022-05-19 19:42:07 -07:00
Isaac 2d3a3c419d Headless compile flag (#107) 2022-05-19 17:12:39 -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
mjcox244 451cc7eb92 Add Icon to windows build (#96) 2022-05-19 16:33:17 -07:00
MysterD c864b462e4 Fix DISCORD_SDK=0 on Linux 2022-05-08 17:01:19 -07:00
Beyley Thomas 20167088d6 Add basic Bass audio engine (#58) 2022-05-08 00:25:09 -07:00
MysterD a41c9f3f7b Make coop-compiler use O2 2022-04-23 20:01:52 -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
Prince Frizzy 654d3ddbf8 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 31b092adac Whoops, missed some profile flags 2022-04-19 21:20:08 -07:00
MysterD 5e84c07e01 Add profiling compile option 2022-04-19 18:18:15 -07:00
MysterD d8479f3681 cleanup old mod dir every compile 2022-04-16 15:54:20 -07:00
MysterD 8d2f77a7b5 Restore debugging optimization level to -O0, add more warning ignores 2022-04-14 20:37:33 -07:00
Prince Frizzy 30daed0e35 Restore some of our older Makefile stuff, etc. (#62)
* Restore our old OPT_FLAGs and debug info system, And add a new debug info level check.

* Reduce this optimization level by 1.
2022-04-13 22:55:15 -07:00
MysterD a7e1ec03d3 Revert "Add an icon on windows (#48)"
This reverts commit f84f0d3682.
2022-04-04 01:08:16 -07:00
MysterD 9dd4d1c8fc Fix spelling mistake 2022-03-31 00:13:48 -07:00
mjcox244 f84f0d3682 Add an icon on windows (#48) 2022-03-31 00:12:59 -07:00
Prince Frizzy d9fab6d184 Bomb-Omb Buddy sanity improvement (#51) 2022-03-30 19:25:21 -07:00
MysterD f196afd9db Add clang to Makefile 2022-03-27 17:26:39 -07:00
MysterD 3f4c3f162b Even more makefile fixes for coop-compiler 2022-03-21 17:21:23 -07:00
MysterD b16e498793 More makefile fixes for coop-compiler 2022-03-21 17:02:24 -07:00
MysterD 155f566eb9 Fix up Makefile for coop-compiler 2022-03-21 16:46:31 -07:00
MysterD 72c629300a Prevent tools from building during coop-compiler 2022-03-21 22:42:25 -07:00
MysterD 7d74fc21c5 Fixed Mac compile 2022-03-21 14:02:23 -07:00
Prince Frizzy be8ecb275d Some small cleanup, And re-add generating the coop.map to the Makefile. (#36) 2022-03-18 21:31:04 -07:00
MysterD 290cc8f531 Started rewriting the mod table 2022-03-14 18:18:14 -07:00
MysterD f8025309d8 Fix warnings/compile errors on Linux 2022-03-13 18:45:42 -07:00
Prince Frizzy 43ae67c337 Update to Refresh 13 (#19)
* Refresh 13

Co-authored-by: n64 <n64>
2022-03-13 00:17:10 -08:00
MysterD 484962ff2c Fix Mac compile 2022-03-12 22:38:13 -08:00
MysterD 851b2c5352 Merge branch 'dynos' into unstable 2022-03-10 18:17:59 -08:00
MysterD 316bf8afa0 Moved smlua_XXX_utils.[ch] to src/pc/lua/utils/ 2022-03-09 23:09:33 -08:00
MysterD 4ddb6bbf5f 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 f9954c732d Delete custom sounds on 32-bit, they are currently breaking the build 2022-02-28 22:59:58 -08:00
MysterD 141190f807 Add cpp stuff for coop-compiler 2022-02-28 21:34:30 -08:00
MysterD 2940c18b3c Fix bugs/warnings from static analysis 2022-02-20 20:04:25 -08:00
MysterD eeb57cca62 Reduce optimization level until undefined behavior can be found 2022-02-20 14:53:35 -08:00
MysterD d01cddb651 Merge branch 'unst17' into unstable 2022-02-19 22:06:06 -08:00
MysterD 1f61f2f632 Fix graphical issues that stem from text drawing 2022-02-19 22:03:25 -08:00
Prince Frizzy 48c6c9074b Fixes for Refresh 12 2022-02-19 01:39:38 -05:00
MysterD 29dcaf3b1d Added wario sounds
Have yet to pitch correct them.

Huge thanks to theclashingfritz and anzz1
2022-02-14 23:36:53 -08:00
MysterD e9409f9c11 Added a custom version of PeachyPeach's crash screen for Windows 2022-02-12 13:30:53 -08:00
MysterD 3f6282a5c4 Updated makefile for coop-compiler 2022-02-11 18:38:25 -08:00
MysterD a5b6a43cec Fix OSX's include path for sdl-config 2022-02-10 18:06:59 -08:00
MysterD ff657776ca Updated makefile for coop-compiler 2022-02-10 18:03:44 -08:00
MysterD 913ea4c5c0 Reading headers from lua files
Fix up warnings on Linux
Disabled mod checkboxes when an incompatible one is enabled
Display descriptions when hovering over a mod
2022-01-27 23:53:58 -08:00
MysterD 1094f2dd50 Fixed Mac Lua library 2022-01-23 23:00:44 -08:00
MysterD 6d3efdd0ba Switched from dynamic to static Lua lib 2022-01-23 20:04:53 -08:00
MysterD 6d1f5637cb Merge branch 'unstable' into lua 2022-01-21 19:19:21 -08:00
MysterD cac892f792 Added headless server compile mode 2022-01-21 19:13:41 -08:00
MysterD 2d41f9317d More lua improvements
Added mods folder for lua scripts
Created constants.lua so scripts could use constants internal to the C code
Created event hooks
Separated out lua functions into multiple files
2022-01-16 18:07:45 -08:00
MysterD 204eae7380 Initial LUA support - MarioState read/write 2022-01-16 08:51:29 -08:00
MysterD 713147b91b Fixed over 100 code warnings 2021-08-19 18:16:16 -07:00
MysterD 855d9ca3e6 Fix Mac + DISCORD_SDK compilation errors 2021-08-02 02:59:45 -07:00
MysterD df53c263e8 DJUI: Replaced old ingame menu with new DJUI menu 2021-07-15 19:37:09 -07:00
MysterD 38e6b5d340 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
anzz1 b7f4ae735d 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
anzz1 42736d9d38 Makefile update (#80)
* build with TEXTURE_FIX=1 as default
* disallow building with jp,eu,sh rom versions
2020-10-16 03:00:48 -07:00
MysterD 9d3390f4b2 Added mod registration system
Allows mods to register themselves so that mismatches don't occur. This
does not automagically detect when someone modified the game, so the
mods will have to insert a function like this into their patch:

static void __attribute__((constructor)) _register_this_mod() {
    network_register_mod("mod name here");
}
2020-10-04 16:41:55 -07:00
MysterD 32e97c0c92 Added 32-bit Discord library for Windows 2020-09-25 23:18:56 -07:00
MysterD 67342de794 Add development flag for easier testing 2020-09-19 02:12:49 -07:00
MysterD df6cac3cab Added compile-time flag to disable Discord SDK
In order to support ARM/Mac, discord must be disabled.
To disable compile with:
make DISCORD_SDK=0

Fixes #62
2020-09-19 00:53:56 -07:00
MysterD 663da861cb Fix DirectX builds 2020-09-15 21:48:14 -07:00
MysterD 6ecddd939a Fixed Linux builds 2020-09-14 23:26:55 -07:00
MysterD ece4d2bc93 Make C-lib link statically again, force various compiler options better 2020-09-14 18:29:47 -07:00
MysterD 15601ac856 Add Discord Game SDK networking system
Allows players to host without forwarding their ports or using a program
like Hamachi.
2020-09-13 03:27:35 -07:00
MysterD 33d52ef31d Added version checking to clients 2020-09-11 16:19:38 -07:00
MysterD c93096c2a6 Force no draw distance on and text saves off 2020-09-04 17:52:48 -07:00
MysterD 3d51e21be9 Add docker-build workarounds and container script 2020-09-04 17:03:35 -07:00
MysterD fc4d4d3d99 Added custom packets for mods-of-this-mod
Now a patch can choose to register callbacks for sending and receiving
packets. It's a bit tricky to use but at least it won't collide with
normal packets or other mod packets.
2020-09-04 02:04:37 -07:00
MysterD 7c6298acbc Served time for crimes against C
Due to my compile & launch scripts, I was silently ignoring warnings
this whole time. I've fixed my process, and gone back to fixed all of
the warnings I could (even outside of my code).
2020-09-04 01:58:54 -07:00
MysterD e949767243 Add coop-specific define
Added -DCOOP to identify that this is a coop build so that one patch can
be applied to EX and/or COOP. They can choose to ifdef entity synchronization
out.
2020-09-03 21:49:58 -07:00
MysterD ff1946a7f6 Prevent infinite looping of Mario action transitions
There have been several times where the unpredictable behavior of
a remote player where execute_mario_action() would get caught in
an infinite loop. Now we attempt to detect an infinite hang and
escape from it. The sequence of actions will be recorded into an
errorlog.txt file. In debug mode this infinite hang will cause an
assertion to fail, crashing the game. In normal mode the game will
break out of it and hopefully carry on normally after new packets
come in.

I believe this addresses github issue #12 but I can't be sure.
2020-09-01 22:06:36 -07:00
MysterD a8db9caede Merge branch 'nightly' into coop 2020-09-01 18:08:46 -07:00
MysterD 6558a8f43d Update Makefile's default compile flags 2020-08-31 23:52:36 -07:00
fgsfds e539a14374 add rudimentary SDL1 controller backend
it's more to deal with the mouse not working I suppose
2020-08-30 16:06:22 +03:00
fgsfds 5f38df53a5 add barebones SDL1.2 backends
for that sweet Win9x support
2020-08-15 07:15:28 +03:00
MysterD 09d975aea1 Made sockets platform-independent, supporting Linux 2020-08-09 13:23:27 -07:00
MysterD ae1f5bf892 Started synchronizing objects, refactored networking 2020-08-02 01:43:12 -07:00
MysterD ba265e9738 Started adding networking 2020-08-01 20:22:24 -07:00
MysterD 7cc01ab03d Added IMMEDIATELOAD debug flag to skip all intro stuff 2020-07-30 20:42:39 -07:00
CrispyBuns 246fa31aea Add files via upload 2020-07-14 10:54:07 -06:00
CrispyBuns f00669402a Add files via upload 2020-07-14 10:54:07 -06: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 8cd2d1b3c4 fix paths to sound data with EXTERNAL_DATA=1 2020-06-20 18:05:45 +03:00
fgsfds 3f228dd1bf fix GRUCODE defines 2020-06-20 04:32:12 +03:00
n64 5bee83faa8 merge refresh 10 2020-06-20 02:49:59 +03:00
fgsfds 75d5975dd9 use GLES shaders in web build 2020-06-17 00:15:27 +03:00
fgsfds 52c149b796 fix web build 2020-06-16 22:24:54 +03:00
fgsfds 2fd045651c thank you case sensitive file systems very cool 2020-06-13 00:53:01 +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 c778c39ad0 move the discord-rpc libs to lib/ 2020-06-09 20:19:22 +03:00
Jan 26914435a9 Merge branch 'nightly' into feature/discordrpc 2020-06-09 17:16:42 +02:00
Jan200101 928835bfef replace static linking with dynamically loaded libraries 2020-06-09 17:15:49 +02:00
Jan200101 55f543f1cc add discord rpc support 2020-06-09 12:01:31 +02:00
fgsfds 0e34f48267 use 'python3 mkzip' instead of just 'mkzip' 2020-06-08 06:06:40 +03:00
fgsfds dc29cb4081 add sky tiles to the zip as well 2020-06-07 22:00:57 +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