Add development flag for easier testing

This commit is contained in:
MysterD 2020-09-19 02:12:49 -07:00
parent 64732308f4
commit 5472f3d13a
6 changed files with 17 additions and 5 deletions

View file

@ -54,6 +54,8 @@ DISCORDRPC ?= 0
DISCORD_SDK ?= 1
# Enable docker build workarounds
DOCKERBUILD ?= 0
# Enable development/testing flags
DEVELOPMENT ?= 0
# Various workarounds for weird toolchains
@ -634,6 +636,12 @@ ifeq ($(DISCORD_SDK),1)
CFLAGS += -DDISCORD_SDK
endif
# Check for development option
ifeq ($(DEVELOPMENT),1)
CC_CHECK += -DDEVELOPMENT
CFLAGS += -DDEVELOPMENT
endif
# Check for texture fix option
ifeq ($(TEXTURE_FIX),1)
CC_CHECK += -DTEXTURE_FIX

View file

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 STRICT=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here' -ex 'run' -ex 'quit'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 STRICT=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here' -ex 'run' -ex 'quit'

View file

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 STRICT=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 STRICT=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here'

View file

@ -1,8 +1,8 @@
set -e
if [ $# -eq 0 ]; then
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 STRICT=1 -j
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 STRICT=1 -j
else
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 -j
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 -j
fi
# find file

View file

@ -5,7 +5,7 @@
#ifdef DEBUG
static u8 warpToLevel = LEVEL_LLL;
static u8 warpToLevel = LEVEL_CCM;
#define SCANCODE_0 0x0B
#define SCANCODE_3 0x04
@ -98,9 +98,11 @@ void debug_keyboard_on_key_down(int scancode) {
scancode = scancode;
switch (scancode) {
case SCANCODE_3: debug_breakpoint_here(); break;
#ifdef DEVELOPMENT
case SCANCODE_6: debug_warp_level(warpToLevel); break;
case SCANCODE_7: debug_warp_area(); break;
case SCANCODE_0: debug_suicide(); break;
#endif
}
}

View file

@ -20,6 +20,7 @@ void network_player_update(void) {
network_send_keep_alive();
}
#ifndef DEVELOPMENT
if (gNetworkType == NT_SERVER) {
for (int i = 1; i < MAX_PLAYERS; i++) {
struct NetworkPlayer* np = &gNetworkPlayers[i];
@ -44,6 +45,7 @@ void network_player_update(void) {
network_shutdown();
}
}
#endif
}
u8 network_player_connected(enum NetworkPlayerType type, u8 globalIndex) {