diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-12-18 11:24:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-18 11:24:38 -0700 |
| commit | f0c2cea0eec6c49a335e9c044fcc28218e1ab749 (patch) | |
| tree | 422128eeb081feffca8ad3ac87566a35358e077f /src/port/Game.cpp | |
| parent | 99b56300556434580ed23edc27e5e7d982751e47 (diff) | |
Impl RandomItemTable class (#598)
* Impl RandomItem class
* Refactor func
* Impl RandomItemTable
* Revert probability inaccuracy
* Remove unnecessary comment
* Fix compile, probably
* As per review 1
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/port/Game.cpp')
| -rw-r--r-- | src/port/Game.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/port/Game.cpp b/src/port/Game.cpp index 9f96182d4..8f50da220 100644 --- a/src/port/Game.cpp +++ b/src/port/Game.cpp @@ -23,7 +23,7 @@ #include "engine/editor/Editor.h" #include "engine/editor/SceneManager.h" -#include "RegisterContent.h" +#include "engine/registry/RegisterContent.h" #include "engine/cameras/GameCamera.h" #include "engine/cameras/FreeCamera.h" @@ -31,6 +31,7 @@ #include "engine/cameras/LookBehindCamera.h" #include "engine/TrackBrowser.h" +#include "engine/RandomItemTable.h" #ifdef _WIN32 #include <locale.h> @@ -73,8 +74,13 @@ TrackEditor::Editor gEditor; s32 gTrophyIndex = NULL; +/** Spawner Registries **/ Registry<TrackInfo> gTrackRegistry; Registry<ActorInfo, const SpawnParams&> gActorRegistry; +Registry<ItemInfo> gItemRegistry; + +/** Data Registries **/ +DataRegistry<RandomItemTable> gItemTableRegistry; std::unique_ptr<TrackBrowser> gTrackBrowser; @@ -138,7 +144,11 @@ void CustomEngineInit() { SetMarioRaceway(); + printf("[Game] Registering Game Content...\n"); RegisterActors(gActorRegistry); + RegisterItems(gItemRegistry); + RegisterItemTables(gItemTableRegistry); + printf("[Game] Game Content Registered!\n"); } void CustomEngineDestroy() { |
