feat: Add global access for selected Game object

> separated commit in case this functionality is already provided through other means and needs to be reverted
> probably target for rehaul in the future for better/less invasive approach
This commit is contained in:
[ ]
2023-10-02 23:56:13 +09:00
parent f6f62e0e9d
commit 32f4f1871d
5 changed files with 10 additions and 1 deletions
+2
View File
@@ -108,6 +108,7 @@ std::string LOG_FILE_PATH = "";
int LAUNCHER_ARGC = 0;
char **LAUNCHER_ARGV = nullptr;
std::unique_ptr<std::vector<Option>> LAUNCHER_OPTIONS;
games::Game *GAME_INSTANCE = nullptr;
std::string CARD_OVERRIDES[2];
// sub-systems
@@ -1424,6 +1425,7 @@ int main_implementation(int argc, char *argv[]) {
avs::core::set_default_heap_size("kamunity.dll");
games.push_back(new games::bc::BCGame());
}
GAME_INSTANCE = games.back();
// apply user heap size, if defined
if (user_heap_size > 0) {