mirror of
https://github.com/open-goal/jak-project
synced 2026-06-04 02:47:17 -04:00
jak1/speedruns: Some final touches for speedrunning in jak 1 (#1830)
* jak1: put common speedrunning code into it's own file * jak1: enforce `60` fps while in speedrunning mode * jak1: when speedrunning, display the version until you get the first powercell * jak1: add an explicit option for skipping cutscenes * jak1: extend `game-option` to allow any menu option to be disabled * tests/jak1: allow whitelisting types to be redefined to satisfy typeconsistency checks * jak1: add file headers * jak1: cleanup bool checking * test: delete the es substitle file * test: add it back * jak1: missed one cleanup spot related to bool comparisons
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "goalc/compiler/Compiler.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
void add_expected_type_mismatches(Compiler& c) {
|
||||
void add_common_expected_type_mismatches(Compiler& c) {
|
||||
c.add_ignored_define_extern_symbol("draw-drawable-tree-tfrag");
|
||||
c.add_ignored_define_extern_symbol("draw-drawable-tree-trans-tfrag");
|
||||
c.add_ignored_define_extern_symbol("draw-drawable-tree-dirt-tfrag");
|
||||
@@ -9,18 +9,26 @@ void add_expected_type_mismatches(Compiler& c) {
|
||||
c.add_ignored_define_extern_symbol("tfrag-init-buffer");
|
||||
}
|
||||
|
||||
void add_jak1_expected_type_mismatches(Compiler& c) {
|
||||
c.add_ignored_type_definition("game-option");
|
||||
}
|
||||
|
||||
// TODO - debatably delete these now that jak 1 is complete
|
||||
TEST(Jak1TypeConsistency, MANUAL_TEST_TypeConsistencyWithBuildFirst) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
compiler.enable_throw_on_redefines();
|
||||
add_expected_type_mismatches(compiler);
|
||||
add_common_expected_type_mismatches(compiler);
|
||||
add_jak1_expected_type_mismatches(compiler);
|
||||
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
|
||||
compiler.run_test_no_load("decompiler/config/all-types.gc");
|
||||
}
|
||||
|
||||
// TODO - debatably delete these now that jak 1 is complete
|
||||
TEST(Jak1TypeConsistency, TypeConsistency) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
compiler.enable_throw_on_redefines();
|
||||
add_expected_type_mismatches(compiler);
|
||||
add_common_expected_type_mismatches(compiler);
|
||||
add_jak1_expected_type_mismatches(compiler);
|
||||
compiler.run_test_no_load("decompiler/config/all-types.gc");
|
||||
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
|
||||
}
|
||||
@@ -28,7 +36,7 @@ TEST(Jak1TypeConsistency, TypeConsistency) {
|
||||
TEST(Jak2TypeConsistency, TypeConsistency) {
|
||||
Compiler compiler(GameVersion::Jak2);
|
||||
compiler.enable_throw_on_redefines();
|
||||
add_expected_type_mismatches(compiler);
|
||||
add_common_expected_type_mismatches(compiler);
|
||||
compiler.run_test_no_load("decompiler/config/jak2/all-types.gc");
|
||||
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user