forked from mirrors/0ad
Remove LoadScripts from CSimualation2
`LoadScripts` and `LoadDefaultScripts` have to be called imediately after the `CSimulation2` constructor. By doing the necesarry work in the constructor and removing `LoadScripts` and `LoadDefaultScripts` the interface of `CSimulation2` is simplified.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -36,7 +36,7 @@ class TestLOSTexture : public CxxTest::TestSuite
|
||||
public:
|
||||
void test_basic()
|
||||
{
|
||||
CSimulation2 sim{nullptr, *g_ScriptContext, nullptr};
|
||||
CSimulation2 sim{nullptr, *g_ScriptContext, nullptr, {}};
|
||||
CLOSTexture tex(sim);
|
||||
|
||||
const ssize_t size = 8;
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
void DISABLED_test_perf()
|
||||
{
|
||||
CSimulation2 sim{nullptr, *g_ScriptContext, nullptr};
|
||||
CSimulation2 sim{nullptr, *g_ScriptContext, nullptr, {}};
|
||||
CLOSTexture tex(sim);
|
||||
|
||||
const ssize_t size = 257;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
TestLogger logger;
|
||||
|
||||
CMaterial material{};
|
||||
CSimulation2 simulation{nullptr, *g_ScriptContext, nullptr};
|
||||
CSimulation2 simulation{nullptr, *g_ScriptContext, nullptr, {}};
|
||||
|
||||
CTerrain terrain;
|
||||
terrain.Initialize(4, nullptr);
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
CSkeletonAnimManager skeletonAnimationManager{colladaManager};
|
||||
|
||||
CUnitManager unitManager;
|
||||
CSimulation2 simulation{&unitManager, *g_ScriptContext, nullptr};
|
||||
CSimulation2 simulation{&unitManager, *g_ScriptContext, nullptr, {}};
|
||||
CObjectManager objectManager{
|
||||
meshManager, skeletonAnimationManager, simulation};
|
||||
unitManager.SetObjectManager(objectManager);
|
||||
|
||||
Reference in New Issue
Block a user