Commit graph

251 commits

Author SHA1 Message Date
MysterD
46dcd3cc50 Fix windows builds of coopnet 2023-04-10 20:00:18 -07:00
MysterD
ba338ec2dd Fix warnings, add Makefile logic for coopnet in other OS 2023-04-10 19:45:06 -07:00
MysterD
7fac22c265 Basic lobby browser 2023-04-10 01:10:24 -07:00
MysterD
b79db3b203 Add coopnet defines 2023-04-09 23:45:52 -07:00
MysterD
2e854cda60 Merge branch 'coop' into coopnet 2023-04-09 22:52:35 -07:00
MysterD
2c8488e879 Add hacky precomp for custom sounds on Windows 2023-04-09 21:43:45 -07:00
MysterD
435f64fe24 Remove failsafe, was causing problems 2023-04-09 18:35:13 -07:00
MysterD
04032a14af Started adding CoopNet 2023-04-09 17:20:07 -07:00
MysterD
9c6fef9ecd Allowed Drag & Drop importing of mods and DynOS packs 2023-04-03 19:22:22 -07:00
MysterD
090122491f Force tools to rebuild if they weren't built before the luigi sound fix 2023-04-01 17:54:21 -07:00
MysterD
74b773d5fd Add in a failsafe when extracting custom sound files 2023-04-01 03:15:41 -07:00
MysterD
fe8c510ee4 Started adding the ability to translate DJUI menus 2023-03-31 15:18:19 -07:00
MysterD
0435bf7b68 Revert audio makefile change 2023-03-27 16:32:30 -07:00
PeachyPeach
b738cf73f9
/luaf; fix compilation issues with audio and debug + dev (#328)
/luaf command to execute lua code from a file. Note that this command doesn't load the file the same way mod files are loaded, so no access to gGlobalSyncTable and gPlayerSyncTable. hook_chat_command cannot be called, but hook_event can.

Fix some compilation issues
2023-03-27 15:50:49 -07:00
MysterD
6c8b6387b4 Fix debug builds on linux 2023-03-26 14:53:01 -07:00
Isaac0-dev
6cb1b2faec
Beta 32.0.1 (#325)
* patch for beta 32

* require the development flag for Lua profiler

* autogen
2023-03-26 01:15:28 -04:00
eros71
3ed76d6a5c
Add Extended Soundbank (#254)
* Add Extended Soundbank

This PR adds a soundbank to the game with every instrument in the game, so there's no need to only use one set of instruments for m64 sequences.

Use the soundbank ID "42" when replacing sequences with lua to use it.

* Remove hardcoded.h include duplicate

There's a duplicated line that shouldn't be there since hardcoded.h is already included.

* Reinclude duplicate include

I'm still learning the commits system and I've noticed I should push this into a different PR instead by making a fork, sorry about that
2023-03-22 19:04:16 -04:00
Isaac0-dev
7e46ce4a21
fixes and other improvements (#309)
* HOOK_JOINED_GAME

* expose VERSION_TEXT, and two more adjusments

* show if a constant type is a string with autogen

* fix another blunder by that guy

* should use an or operator here

* fix frame limiter stuff
2023-03-21 19:43:29 -04:00
Agent X
a5a3dfdec9
Fix incorrect value for Makefile option (#269)
The comment for TEXTURE_FIX states "Disable texture fixes by default (helps with them purists)" and in spite of that, TEXTURE_FIX is set to 1 (on)
This PR simply sets it back to 0 as the comment intends the value to be, I just noticed this and saw an opportunity to make a PR for it. This doesn't have to be merged and all it does is restore the old smoke and pink on the Koopa's back.
2023-02-20 21:48:53 -05:00
Prince Frizzy
eac1683754
Add optimization option to Makefile. (#283) 2023-02-19 03:40:49 -05:00
Isaac0-dev
e387b6b24b
Fixes and quality of life changes (#213)
Add the Lua Profiler to the debug menu.
    Prevent Mario from sleeping on the main menu.
    Fix IP address string corruption when saving the config file.
    Bring back the Discord fatal message.
2022-10-30 17:29:59 -07:00
Isaac0-dev
c7bdeef8d5
multiple improvements (#176) 2022-09-12 20:00:51 -07:00
Agent X
7e1110cde9
Remove TARGET_WEB (#159)
Just a simple code cleanup opportunity I saw
"I won't be porting this to the web" - djoslin

Compiled and tested everything to see if it works, feel free to check yourself or look over the code

Also, I noticed TARGET_N64 was there too, might do a clean up on that since we all know this isn't getting ported to the N64 anytime soon.
2022-08-25 17:32:20 -07:00
wRadion
029dcb9bdb
make distclean invoke cleantools (#158) 2022-08-25 17:30:19 -07:00
PeachyPeach
f0c6668423
DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
Isaac0-dev
a40c3cf121
Raspberry Pi Support (#117) 2022-06-05 19:40:21 -07:00
EmeraldLoc
a63259cecf
Add .app support and fixed warning (#126) 2022-06-05 19:11:58 -07:00
Filipianosol
5da1354db9
Fix icon when CC has more than one word (#123)
Takes the first word as an argument instead of the entire `CC` string.
Ensures it's always one word.
2022-05-30 03:08:30 -07:00
MysterD
86f32059ac Fix icon for coop-compiler 2022-05-29 04:00:09 -07:00
MysterD
f4579b4c9a Fix indentation 2022-05-21 21:11:17 -07:00
mjcox244
3cd6ece3d7
Fix for Icon In dumb msys DIR (#111) 2022-05-21 21:08:54 -07:00
MysterD
de2300f837 Fix clang/mac compile 2022-05-19 19:42:07 -07:00
Isaac
21451b0974
Headless compile flag (#107) 2022-05-19 17:12:39 -07:00
PeachyPeach
4fbafc2708
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
f63bffc64c
Add Icon to windows build (#96) 2022-05-19 16:33:17 -07:00
MysterD
a0700f8e02 Fix DISCORD_SDK=0 on Linux 2022-05-08 17:01:19 -07:00
Beyley Thomas
b8553162c2
Add basic Bass audio engine (#58) 2022-05-08 00:25:09 -07:00
MysterD
343076dec1 Make coop-compiler use O2 2022-04-23 20:01:52 -07:00
PeachyPeach
9e5a45ecdd
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
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
1ec9ddeb5d Whoops, missed some profile flags 2022-04-19 21:20:08 -07:00
MysterD
cdb7701905 Add profiling compile option 2022-04-19 18:18:15 -07:00
MysterD
a31ddaff9d cleanup old mod dir every compile 2022-04-16 15:54:20 -07:00
MysterD
a39d004584 Restore debugging optimization level to -O0, add more warning ignores 2022-04-14 20:37:33 -07:00
Prince Frizzy
014ec861f0
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
b9243a4c5b Revert "Add an icon on windows (#48)"
This reverts commit be4919ce24.
2022-04-04 01:08:16 -07:00
MysterD
6a384a3039 Fix spelling mistake 2022-03-31 00:13:48 -07:00
mjcox244
be4919ce24
Add an icon on windows (#48) 2022-03-31 00:12:59 -07:00
Prince Frizzy
e52173f109
Bomb-Omb Buddy sanity improvement (#51) 2022-03-30 19:25:21 -07:00
MysterD
0a679efa07 Add clang to Makefile 2022-03-27 17:26:39 -07:00
MysterD
1e43d206dd Even more makefile fixes for coop-compiler 2022-03-21 17:21:23 -07:00
MysterD
ab2ead5cbe More makefile fixes for coop-compiler 2022-03-21 17:02:24 -07:00
MysterD
1910177b1d Fix up Makefile for coop-compiler 2022-03-21 16:46:31 -07:00
MysterD
ed6cbc2d40 Prevent tools from building during coop-compiler 2022-03-21 22:42:25 -07:00
MysterD
2673b1140c Fixed Mac compile 2022-03-21 14:02:23 -07:00
Prince Frizzy
579fa40524
Some small cleanup, And re-add generating the coop.map to the Makefile. (#36) 2022-03-18 21:31:04 -07:00
MysterD
0a3d0b2033 Started rewriting the mod table 2022-03-14 18:18:14 -07:00
MysterD
11f532b9e0 Fix warnings/compile errors on Linux 2022-03-13 18:45:42 -07: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
4b41c3fd39 Fix Mac compile 2022-03-12 22:38:13 -08:00
MysterD
e81808c314 Merge branch 'dynos' into unstable 2022-03-10 18:17:59 -08:00
MysterD
89d44f6501 Moved smlua_XXX_utils.[ch] to src/pc/lua/utils/ 2022-03-09 23:09:33 -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
e0fb9d7bac Delete custom sounds on 32-bit, they are currently breaking the build 2022-02-28 22:59:58 -08:00
MysterD
2f15b4664c Add cpp stuff for coop-compiler 2022-02-28 21:34:30 -08:00
MysterD
69fb69dfce Fix bugs/warnings from static analysis 2022-02-20 20:04:25 -08:00
MysterD
13ecef0b0a Reduce optimization level until undefined behavior can be found 2022-02-20 14:53:35 -08:00
MysterD
ebbe1ef16c Merge branch 'unst17' into unstable 2022-02-19 22:06:06 -08:00
MysterD
334de77139 Fix graphical issues that stem from text drawing 2022-02-19 22:03:25 -08:00
Prince Frizzy
32b0c91935
Fixes for Refresh 12 2022-02-19 01:39:38 -05: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
6925db864c Added a custom version of PeachyPeach's crash screen for Windows 2022-02-12 13:30:53 -08:00
MysterD
7fc4b68033 Updated makefile for coop-compiler 2022-02-11 18:38:25 -08:00
MysterD
56d18a5f95 Fix OSX's include path for sdl-config 2022-02-10 18:06:59 -08:00
MysterD
2c95b8bff3 Updated makefile for coop-compiler 2022-02-10 18:03:44 -08:00
MysterD
809dfd6373 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
47a129573f Fixed Mac Lua library 2022-01-23 23:00:44 -08:00
MysterD
d09abc7bcd Switched from dynamic to static Lua lib 2022-01-23 20:04:53 -08:00
MysterD
34e903b89a Merge branch 'unstable' into lua 2022-01-21 19:19:21 -08:00
MysterD
addd16721f Added headless server compile mode 2022-01-21 19:13:41 -08:00
MysterD
0aa1e04f93 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
1a47707be8 Initial LUA support - MarioState read/write 2022-01-16 08:51:29 -08:00
MysterD
7294e127f5 Fixed over 100 code warnings 2021-08-19 18:16:16 -07:00
MysterD
8642479d82 Fix Mac + DISCORD_SDK compilation errors 2021-08-02 02:59:45 -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
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
anzz1
7971dbfa3f
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
ed06b57649 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
469fa2ff33 Added 32-bit Discord library for Windows 2020-09-25 23:18:56 -07:00
MysterD
5472f3d13a Add development flag for easier testing 2020-09-19 02:12:49 -07:00
MysterD
4a7b9736b4 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
a0d5deceff Fix DirectX builds 2020-09-15 21:48:14 -07:00
MysterD
a675f4efd5 Fixed Linux builds 2020-09-14 23:26:55 -07:00
MysterD
5fe5ffda45 Make C-lib link statically again, force various compiler options better 2020-09-14 18:29:47 -07:00
MysterD
3e1b193ea8 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
04c21d91bc Added version checking to clients 2020-09-11 16:19:38 -07:00
MysterD
05674f3d69 Force no draw distance on and text saves off 2020-09-04 17:52:48 -07:00
MysterD
1bb0c90741 Add docker-build workarounds and container script 2020-09-04 17:03:35 -07:00
MysterD
9512fde4a5 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