1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 05:04:07 +01:00

Codechange: Pass Script engine by reference.

This commit is contained in:
Peter Nelson
2025-03-24 16:54:55 +00:00
committed by Peter Nelson
parent 72ca962b84
commit 341cdbc16b
20 changed files with 65 additions and 65 deletions

View File

@@ -38,7 +38,7 @@ void GameInstance::Initialize(GameInfo *info)
this->api_version = info->GetAPIVersion();
/* Register the GameController */
SQGSController_Register(this->engine);
SQGSController_Register(*this->engine);
ScriptInstance::Initialize(info->GetMainScript(), info->GetInstanceName(), OWNER_DEITY);
}
@@ -48,9 +48,9 @@ void GameInstance::RegisterAPI()
ScriptInstance::RegisterAPI();
/* Register all classes */
SQGS_RegisterAll(this->engine);
SQGS_RegisterAll(*this->engine);
RegisterGameTranslation(this->engine);
RegisterGameTranslation(*this->engine);
if (!this->LoadCompatibilityScripts(GAME_DIR, GameInfo::ApiVersions)) this->Died();
}