From 80faefbaf6fa32066e02ff51662c2e6b4b4a26db Mon Sep 17 00:00:00 2001 From: Jonaeru Date: Sun, 17 Mar 2024 15:12:26 +0900 Subject: [PATCH 1/4] port: give Night Vision at respawn in Perfect Darkness Combat --- src/game/player.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/player.c b/src/game/player.c index bb26bd28e..36c10511b 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -1100,6 +1100,10 @@ void playerSpawn(void) } } else { #ifndef PLATFORM_N64 + if (cheatIsActive(CHEAT_PERFECTDARKNESS)) { + invGiveSingleWeapon(WEAPON_NIGHTVISION); + } + if ((g_MpSetup.options & MPOPTION_SPAWNWITHWEAPON) && g_MpSetup.weapons[0] != MPWEAPON_NONE && g_MpSetup.weapons[0] != MPWEAPON_DISABLED) { From ec8310e4a161653f266349e73f045a53fcee0f27 Mon Sep 17 00:00:00 2001 From: Jonaeru Date: Sun, 17 Mar 2024 15:42:53 +0900 Subject: [PATCH 2/4] port: fix X-Ray Scanner model in Combat Simulator --- src/game/mplayer/mplayer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index a5756ab8e..20270b1ed 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -92,7 +92,12 @@ struct mpweapon g_MpWeapons[NUM_MPWEAPONS] = { /*0x1f*/ { WEAPON_PROXIMITYMINE, AMMOTYPE_PROXY_MINE, 5, 0, 0, 0, MPFEATURE_WEAPON_PROXIMITYMINE, MODEL_CHRPROXIMITYMINE, 384 }, /*0x20*/ { WEAPON_REMOTEMINE, AMMOTYPE_REMOTE_MINE, 5, 0, 0, 0, MPFEATURE_WEAPON_REMOTEMINE, MODEL_CHRREMOTEMINE, 384 }, /*0x21*/ { WEAPON_LASER, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_LASER, MODEL_CHRLASER, 512 }, +#ifndef PLATFORM_N64 + // fix X-Ray Scanner model + /*0x22*/ { WEAPON_XRAYSCANNER, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_XRAYSCANNER, MODEL_XRAYSPECS, 256 }, +#else /*0x22*/ { WEAPON_XRAYSCANNER, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_XRAYSCANNER, MODEL_CHRNIGHTSIGHT, 256 }, +#endif /*0x23*/ { WEAPON_CLOAKINGDEVICE, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_CLOAKINGDEVICE, MODEL_CHRCLOAKER, 256 }, /*0x24*/ { WEAPON_COMBATBOOST, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_COMBATBOOST, MODEL_CHRSPEEDPILL, 256 }, #ifndef PLATFORM_N64 From 73dc52cfd6cc3032595a9e0accbb901af53d2485 Mon Sep 17 00:00:00 2001 From: Paul Grandperrin Date: Thu, 25 Apr 2024 12:49:36 +0200 Subject: [PATCH 3/4] Makefile.port: fix dependencies for parallel compilation --- Makefile.port | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.port b/Makefile.port index b8ebadb12..d6a6699d4 100644 --- a/Makefile.port +++ b/Makefile.port @@ -271,7 +271,7 @@ export ROMID BIN := $(B_DIR)/$(BIN_NAME) -default: $(JSON_HEADERS) $(BIN) +default: $(BIN) ################################################################################ # Asset Manager header generation @@ -309,11 +309,11 @@ ifneq ($(CV2PDB),) $(CV2PDB) $(BIN) endif -$(B_DIR)/%.o: %.c +$(B_DIR)/%.o: %.c $(JSON_HEADERS) @mkdir -p $(dir $@) $(CC) -c $(CFLAGS) $(OPT_LVL) -o $@ $< -$(B_DIR)/%.o: %.cpp +$(B_DIR)/%.o: %.cpp $(JSON_HEADERS) @mkdir -p $(dir $@) $(CXX) -c $(CXXFLAGS) $(OPT_LVL) -o $@ $< From 27faaecda23d6595dc850fe6dd95a4bc2158c554 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sat, 11 May 2024 14:13:51 +0200 Subject: [PATCH 4/4] gcc14 fixes --- src/game/camdraw.c | 2 +- src/game/modeldata/player.c | 2 +- src/game/mplayer/scenarios.c | 1 + src/include/lib/str.h | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/camdraw.c b/src/game/camdraw.c index 97498ec6e..ee9b25834 100644 --- a/src/game/camdraw.c +++ b/src/game/camdraw.c @@ -1333,7 +1333,7 @@ void func0f14bdbc(s32 index) s32 value; for (i = 0; i < 30; i++) { - thing->unk0dc[i] = NULL; + thing->unk0dc[i] = 0; } thing->unk094 = 0; diff --git a/src/game/modeldata/player.c b/src/game/modeldata/player.c index ad49e1c88..76e334f95 100644 --- a/src/game/modeldata/player.c +++ b/src/game/modeldata/player.c @@ -18,7 +18,7 @@ struct modeldef g_PlayerModeldef = { 3, 41.161228179932, 0, - NULL, + 0, }; // rodata parent next prev child diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index e2c144d21..aa502ed21 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -25,6 +25,7 @@ #include "game/mplayer/mplayer.h" #include "game/pad.h" #include "game/propobj.h" +#include "game/options.h" #include "bss.h" #include "lib/vi.h" #include "lib/snd.h" diff --git a/src/include/lib/str.h b/src/include/lib/str.h index c80ba0dae..1a8da3de0 100644 --- a/src/include/lib/str.h +++ b/src/include/lib/str.h @@ -16,6 +16,7 @@ s32 isalpha(char c); s32 isspace(char c); s32 strtol(const char *src, const char **endptr, s32 base); #else +#include #include #include #endif