Skip to content

Commit e0ddadf

Browse files
author
Niko
committed
2 parents 8b21acc + 906a144 commit e0ddadf

File tree

7 files changed

+31
-5
lines changed

7 files changed

+31
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
run: nix build -L --no-link --keep-going '.?submodules=1#online-server.release.aarch64.gcc'
3939
# -- PC Port
4040
- name: Build Decomp Debug Mingw32 GCC
41-
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.mingw32.gcc' 2>&1 | grep -A3 'error:'
41+
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.mingw32.gcc' 2>&1 | grep -A3 'error:' || true
4242
- name: Build Decomp Debug Linux32 GCC
43-
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.native32.gcc' 2>&1 | grep -A3 'error:'
43+
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.native32.gcc' 2>&1 | grep -A3 'error:' || true

decompile/General/MAIN/MAIN_AAA_BigBlock1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "MainMain.c"
1616

1717
// byte budget requirement
18-
#include "../MATH/Math_0_Sin.c"
18+
#include "../MATH/MATH_0_Sin.c"
1919
#include "../LibraryOfModels/LibraryOfModels_0_Store.c"
2020

2121
#if defined (USE_ALTMODS)

include/namespace_Display.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,6 @@ struct DB
6262

6363
_Static_assert(sizeof(struct PrimMem) == 0x1C);
6464
_Static_assert(sizeof(struct OTMem) == 0x14);
65-
_Static_assert(sizeof(struct DB) == 0xA4);
65+
#ifndef REBUILD_PC
66+
_Static_assert(sizeof(struct DB) == 0xA4);
67+
#endif

include/namespace_Main.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,7 @@ struct GameTracker
13211321
#endif
13221322
};
13231323

1324+
#ifndef REBUILD_PC
13241325
#if BUILD == SepReview
13251326
_Static_assert(sizeof(struct GameTracker) == 0x24F8);
13261327
#elif BUILD == UsaRetail
@@ -1329,4 +1330,5 @@ _Static_assert(sizeof(struct GameTracker) == 0x2584);
13291330
_Static_assert(sizeof(struct GameTracker) == 0x258C);
13301331
#elif BUILD >= EurRetail
13311332
_Static_assert(sizeof(struct GameTracker) == 0x2594);
1333+
#endif
13321334
#endif

rebuild_PC/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ project(CTR-PC)
33
include(CMakeDependentOption)
44

55
# === OPTIONS ===
6+
option(CTR_ALTMODS "Enables defragged decomp sections" ON)
67

78
option(CTR_60FPS "60 frames per second" ON)
89
option(CTR_16BY9 "Widescreen" ON)
@@ -12,15 +13,19 @@ option(CTR_PENTA "Penta Max Stats" ON)
1213
option(CTR_HARDER "Difficulty Selector (Arcade)" ON)
1314
option(CTR_NEWCUPS "Cup Randomizer" ON)
1415
option(CTR_BOOSTBAR "Super's reserve bar" ON)
16+
cmake_dependent_option(CTR_PROFILER "Debug profiler from PizzaHut" ON "CTR_ALTMODS" OFF)
1517

18+
option(USE_4PADTEST "1 controller for all 4 players" OFF)
1619
option(CTR_RAMEX "8mb RAM expansion" OFF)
1720
cmake_dependent_option(CTR_BIGQUEUE "Extended loading queue" OFF "CTR_RAMEX" OFF)
1821
cmake_dependent_option(CTR_HIGH1P "All high model drivers" OFF "CTR_BIGQUEUE" OFF)
1922
cmake_dependent_option(CTR_RANDOM "Character Randomizer" OFF "CTR_HIGH1P" OFF)
2023
cmake_dependent_option(CTR_ONLINE "Online Multiplayer" OFF "CTR_HIGH1P" OFF)
2124
cmake_dependent_option(CTR_HIGHMP "Multiplayer Maxed mod" OFF "CTR_RAMEX" OFF)
25+
cmake_dependent_option(CTR_NEWLEV "Enables custom levels" OFF "CTR_RAMEX" OFF)
2226

2327
option(CTR_VR "Virtual Reality" OFF)
28+
cmake_dependent_option(CTR_PCDRV "Enables custom levels" OFF "CTR_DEFRAG" OFF)
2429

2530
option(CTR_PRIM "PsyX USE_EXTENDED_PRIM_POINTERS" 0)
2631

@@ -36,6 +41,10 @@ target_include_directories(ctr_bin PUBLIC "../include")
3641
set_property(TARGET ctr_bin PROPERTY C_STANDARD 99)
3742
target_compile_options(ctr_bin PUBLIC -DUSE_EXTENDED_PRIM_POINTERS=${CTR_PRIM})
3843

44+
if(CTR_ALTMODS)
45+
target_compile_options(ctr_bin PUBLIC -DUSE_ALTMODS)
46+
endif()
47+
3948
if(CTR_60FPS)
4049
target_compile_options(ctr_bin PUBLIC -DUSE_60FPS)
4150
endif()
@@ -60,6 +69,9 @@ endif()
6069
if(CTR_BOOSTBAR)
6170
target_compile_options(ctr_bin PUBLIC -DUSE_BOOSTBAR)
6271
endif()
72+
if(CTR_PROFILER)
73+
target_compile_options(ctr_bin PUBLIC -DUSE_PROFILER)
74+
endif()
6375

6476
if(CTR_RAMEX)
6577
target_compile_options(ctr_bin PUBLIC -DUSE_RAMEX)
@@ -79,10 +91,16 @@ endif()
7991
if(CTR_HIGHMP)
8092
target_compile_options(ctr_bin PUBLIC -DUSE_HIGHMP)
8193
endif()
94+
if(CTR_NEWLEV)
95+
target_compile_options(ctr_bin PUBLIC -DUSE_NEWLEV)
96+
endif()
8297

8398
if(CTR_VR)
8499
target_compile_options(ctr_bin PUBLIC -DUSE_VR)
85100
endif()
101+
if(CTR_PCDRV)
102+
target_compile_options(ctr_bin PUBLIC -DUSE_PCDRV)
103+
endif()
86104

87105
# Compiler options
88106
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -94,7 +112,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
94112
endif()
95113
else()
96114
# Assume GCC
97-
target_compile_options(ctr_bin PRIVATE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int)
115+
target_compile_options(ctr_bin PRIVATE -Wno-int-conversion -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int)
98116
endif()
99117

100118
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")

rebuild_PC/CrashTeamRacingPC.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ clock_t startClock;
4444
#define u_long unsigned int
4545

4646
// these two should do nothing
47+
#ifndef __GNUC__
4748
#define _Static_assert(x)
49+
#endif
4850
#define __attribute__(x)
4951

5052
// ======= Replace Psn00bsdk Data =============

rebuild_PC/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
4949
cmakeFlags =
5050
lib.optionals withDebug [ "-DCMAKE_BUILD_TYPE=Debug" ]
5151
++ lib.optionals (!withMods) [
52+
"-DCTR_ALTMODS=OFF"
5253
"-DCTR_60FPS=OFF"
5354
"-DCTR_16BY9=OFF"
5455
"-DCTR_NEW2P=OFF"
@@ -58,6 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
5859
"-DCTR_NEWCUPS=OFF"
5960
"-DCTR_BOOSTBAR=OFF"
6061
"-DCTR_RAMEX=OFF"
62+
"-DCTR_PROFILER=OFF"
6163
] ++ lib.optionals trustCompiler [ "-DCMAKE_C_COMPILER_WORKS=1" "-DCMAKE_CXX_COMPILER_WORKS=1" ]
6264
++ lib.optionals vendoredDeps [ "-DCMAKE_SKIP_BUILD_RPATH=TRUE" ];
6365

0 commit comments

Comments
 (0)