summaryrefslogtreecommitdiff
path: root/src/port/Game.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-07-20 17:13:35 -0600
committerGitHub <noreply@github.com>2025-07-20 17:13:35 -0600
commitadc7dd050f3a2fd13b85b2d799154061d196ef09 (patch)
treea29def388d8045fa491de1c6f6ff42c1f5bfe8c9 /src/port/Game.cpp
parentd62d4bb90050ee195ef10996bd702b770c519eb1 (diff)
Add Rulesets (#494)
Diffstat (limited to 'src/port/Game.cpp')
-rw-r--r--src/port/Game.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/port/Game.cpp b/src/port/Game.cpp
index 068651bff..62dec7a16 100644
--- a/src/port/Game.cpp
+++ b/src/port/Game.cpp
@@ -48,6 +48,7 @@
#include "engine/editor/Editor.h"
#include "engine/editor/EditorMath.h"
#include "engine/editor/SceneManager.h"
+#include "engine/Rulesets.h"
#ifdef _WIN32
#include <locale.h>
@@ -84,6 +85,7 @@ Cup* gBattleCup;
ModelLoader gModelLoader;
HarbourMastersIntro gMenuIntro;
+Rulesets gRulesets;
Editor::Editor gEditor;
@@ -236,6 +238,7 @@ const char* GetCupName(void) {
void LoadCourse() {
if (gWorldInstance.CurrentCourse) {
+ gRulesets.PreLoad();
gWorldInstance.CurrentCourse->Load();
}
}
@@ -379,6 +382,7 @@ void CM_BeginPlay() {
auto course = gWorldInstance.CurrentCourse;
if (course) {
+ gRulesets.PreInit();
// Do not spawn finishline in credits or battle mode. And if bSpawnFinishline.
if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != BATTLE)) {
if (course->bSpawnFinishline) {
@@ -388,6 +392,7 @@ void CM_BeginPlay() {
gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir);
course->BeginPlay();
+ gRulesets.PostInit();
}
}