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>
This commit is contained in:
MegaMech
2025-12-18 11:24:38 -07:00
committed by GitHub
parent 99b5630055
commit f0c2cea0ee
52 changed files with 1018 additions and 1003 deletions
+11 -1
View File
@@ -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() {