Add development flag for easier testing
This commit is contained in:
parent
64732308f4
commit
5472f3d13a
8
Makefile
8
Makefile
|
@ -54,6 +54,8 @@ DISCORDRPC ?= 0
|
||||||
DISCORD_SDK ?= 1
|
DISCORD_SDK ?= 1
|
||||||
# Enable docker build workarounds
|
# Enable docker build workarounds
|
||||||
DOCKERBUILD ?= 0
|
DOCKERBUILD ?= 0
|
||||||
|
# Enable development/testing flags
|
||||||
|
DEVELOPMENT ?= 0
|
||||||
|
|
||||||
# Various workarounds for weird toolchains
|
# Various workarounds for weird toolchains
|
||||||
|
|
||||||
|
@ -634,6 +636,12 @@ ifeq ($(DISCORD_SDK),1)
|
||||||
CFLAGS += -DDISCORD_SDK
|
CFLAGS += -DDISCORD_SDK
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Check for development option
|
||||||
|
ifeq ($(DEVELOPMENT),1)
|
||||||
|
CC_CHECK += -DDEVELOPMENT
|
||||||
|
CFLAGS += -DDEVELOPMENT
|
||||||
|
endif
|
||||||
|
|
||||||
# Check for texture fix option
|
# Check for texture fix option
|
||||||
ifeq ($(TEXTURE_FIX),1)
|
ifeq ($(TEXTURE_FIX),1)
|
||||||
CC_CHECK += -DTEXTURE_FIX
|
CC_CHECK += -DTEXTURE_FIX
|
||||||
|
|
|
@ -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'
|
2
debug.sh
2
debug.sh
|
@ -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'
|
|
@ -1,8 +1,8 @@
|
||||||
set -e
|
set -e
|
||||||
if [ $# -eq 0 ]; then
|
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
|
else
|
||||||
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 -j
|
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 -j
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# find file
|
# find file
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static u8 warpToLevel = LEVEL_LLL;
|
static u8 warpToLevel = LEVEL_CCM;
|
||||||
|
|
||||||
#define SCANCODE_0 0x0B
|
#define SCANCODE_0 0x0B
|
||||||
#define SCANCODE_3 0x04
|
#define SCANCODE_3 0x04
|
||||||
|
@ -98,9 +98,11 @@ void debug_keyboard_on_key_down(int scancode) {
|
||||||
scancode = scancode;
|
scancode = scancode;
|
||||||
switch (scancode) {
|
switch (scancode) {
|
||||||
case SCANCODE_3: debug_breakpoint_here(); break;
|
case SCANCODE_3: debug_breakpoint_here(); break;
|
||||||
|
#ifdef DEVELOPMENT
|
||||||
case SCANCODE_6: debug_warp_level(warpToLevel); break;
|
case SCANCODE_6: debug_warp_level(warpToLevel); break;
|
||||||
case SCANCODE_7: debug_warp_area(); break;
|
case SCANCODE_7: debug_warp_area(); break;
|
||||||
case SCANCODE_0: debug_suicide(); break;
|
case SCANCODE_0: debug_suicide(); break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ void network_player_update(void) {
|
||||||
network_send_keep_alive();
|
network_send_keep_alive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DEVELOPMENT
|
||||||
if (gNetworkType == NT_SERVER) {
|
if (gNetworkType == NT_SERVER) {
|
||||||
for (int i = 1; i < MAX_PLAYERS; i++) {
|
for (int i = 1; i < MAX_PLAYERS; i++) {
|
||||||
struct NetworkPlayer* np = &gNetworkPlayers[i];
|
struct NetworkPlayer* np = &gNetworkPlayers[i];
|
||||||
|
@ -44,6 +45,7 @@ void network_player_update(void) {
|
||||||
network_shutdown();
|
network_shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 network_player_connected(enum NetworkPlayerType type, u8 globalIndex) {
|
u8 network_player_connected(enum NetworkPlayerType type, u8 globalIndex) {
|
||||||
|
|
Loading…
Reference in New Issue