Skip to content

Commit

Permalink
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into…
Browse files Browse the repository at this point in the history
… port-debugger
  • Loading branch information
fgsfdsfgs committed May 11, 2024
2 parents 804674e + 27faaec commit 5554fb7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile.port
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export ROMID

BIN := $(B_DIR)/$(BIN_NAME)

default: $(JSON_HEADERS) $(BIN)
default: $(BIN)

################################################################################
# Asset Manager header generation
Expand Down Expand Up @@ -310,11 +310,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 $@ $<

Expand Down
2 changes: 1 addition & 1 deletion src/game/camdraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/game/modeldata/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct modeldef g_PlayerModeldef = {
3,
41.161228179932,
0,
NULL,
0,
};

// rodata parent next prev child
Expand Down
5 changes: 5 additions & 0 deletions src/game/mplayer/mplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/game/mplayer/scenarios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/game/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,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) {
Expand Down
1 change: 1 addition & 0 deletions src/include/lib/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ s32 isalpha(char c);
s32 isspace(char c);
s32 strtol(const char *src, const char **endptr, s32 base);
#else
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#endif
Expand Down

0 comments on commit 5554fb7

Please sign in to comment.