3#include "host/KSystem.hh"
4#include "host/Option.hh"
6#include <egg/core/SceneManager.hh>
7#include <egg/math/Quat.hh>
9#include <game/system/RaceConfig.hh>
22 static void DestroyInstance();
61 template <IntegralType T>
62 void checkDesync(
const T &t0,
const T &t1,
const char *name) {
69 m_currentFrame, m_frameCount);
72 REPORT(
"DESYNC! Name: %s", name);
73 REPORT(
"Expected: %d", t0);
74 REPORT(
"Observed: %d", t1);
80 void checkDesync(
const T &t0,
const T &t1,
const char *name) {
85 m_sceneMgr->currentScene()->heap()->enableAllocation();
89 m_currentFrame, m_frameCount);
92 REPORT(
"DESYNC! Name: %s", name);
95 REPORT(
"Expected: %s", s0.c_str());
96 REPORT(
"Observed: %s", s1.c_str());
98 m_sceneMgr->currentScene()->heap()->disableAllocation();
103 void checkDesync(
const f32 &t0,
const f32 &t1,
const char *name) {
108 m_sceneMgr->currentScene()->heap()->enableAllocation();
112 m_currentFrame, m_frameCount);
115 REPORT(
"DESYNC! Name: %s", name);
116 std::string s0 = std::to_string(t0);
117 std::string s1 = std::to_string(t1);
118 REPORT(
"Expected: 0x%08X | %s", f2u(t0), s0.c_str());
119 REPORT(
"Observed: 0x%08X | %s", f2u(t1), s1.c_str());
121 m_sceneMgr->currentScene()->heap()->disableAllocation();
144 std::queue<TestCase> m_testCases;
A stream of data stored in memory.
Manages the scene stack and transitions between scenes.
Base interface for a Kinoko system.
Kinoko system designed to execute tests.
Host::EOption m_testMode
Differentiates between test suite and ghost+krkg.
void init() override
Initializes the system.
void writeTestOutput() const
Writes details about the current test to file.
static void OnInit(System::RaceConfig *config, void *arg)
Initializes the race configuration as needed for test cases.
bool popTestCase()
Pops the current test case and frees the KRKG buffer.
bool run() override
Executes a run.
bool runTest()
Runs a single test case, and ends when the test is finished or when a desync is found.
void startNextTestCase()
Starts the next test case.
void parseOptions(int argc, char **argv) override
Parses non-generic command line options.
void testFrame(const TestData &data)
Tests the frame against the provided test data.
bool calcTest()
Checks one frame in the test.
const TestCase & getCurrentTestCase() const
Gets the current test case.
void calc() override
Executes a frame.
TestData findCurrentFrameEntry()
Finds the test data of the current frame.
Initializes the player with parameters specified in the provided ghost file.
A quaternion, used to represent 3D rotation.