Index: ps/trunk/source/graphics/MapGenerator.cpp =================================================================== --- ps/trunk/source/graphics/MapGenerator.cpp +++ ps/trunk/source/graphics/MapGenerator.cpp @@ -22,7 +22,6 @@ #include "graphics/MapIO.h" #include "graphics/Patch.h" #include "graphics/Terrain.h" -#include "lib/external_libraries/libsdl.h" #include "lib/status.h" #include "lib/timer.h" #include "lib/file/vfs/vfs_path.h" @@ -33,10 +32,11 @@ #include "ps/TaskManager.h" #include "ps/scripting/JSInterface_VFS.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" #include "scriptinterface/ScriptContext.h" #include "scriptinterface/ScriptConversions.h" #include "scriptinterface/ScriptInterface.h" -#include "scriptinterface/JSON.h" #include "simulation2/helpers/MapEdgeTiles.h" #include Index: ps/trunk/source/graphics/scripting/JSInterface_GameView.cpp =================================================================== --- ps/trunk/source/graphics/scripting/JSInterface_GameView.cpp +++ ps/trunk/source/graphics/scripting/JSInterface_GameView.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -27,6 +27,7 @@ #include "ps/World.h" #include "ps/CLogger.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" #include "simulation2/helpers/Position.h" namespace JSI_GameView Index: ps/trunk/source/gui/GUIManager.cpp =================================================================== --- ps/trunk/source/gui/GUIManager.cpp +++ ps/trunk/source/gui/GUIManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -28,6 +28,7 @@ #include "ps/VideoMode.h" #include "ps/XML/Xeromyces.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" #include "scriptinterface/ScriptContext.h" #include "scriptinterface/ScriptInterface.h" #include "scriptinterface/StructuredClone.h" Index: ps/trunk/source/gui/Scripting/JSInterface_GUIProxy_impl.h =================================================================== --- ps/trunk/source/gui/Scripting/JSInterface_GUIProxy_impl.h +++ ps/trunk/source/gui/Scripting/JSInterface_GUIProxy_impl.h @@ -24,6 +24,7 @@ #include "gui/ObjectBases/IGUIObject.h" #include "ps/CLogger.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" #include "scriptinterface/ScriptExtraHeaders.h" #include "scriptinterface/ScriptRequest.h" Index: ps/trunk/source/ps/scripting/JSInterface_Mod.cpp =================================================================== --- ps/trunk/source/ps/scripting/JSInterface_Mod.cpp +++ ps/trunk/source/ps/scripting/JSInterface_Mod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,6 +23,7 @@ #include "ps/Pyrogenesis.h" #include "scriptinterface/FunctionWrapper.h" #include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" #include "scriptinterface/ScriptConversions.h" extern void RestartEngine(); Index: ps/trunk/source/ps/scripting/JSInterface_ModIo.cpp =================================================================== --- ps/trunk/source/ps/scripting/JSInterface_ModIo.cpp +++ ps/trunk/source/ps/scripting/JSInterface_ModIo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -22,6 +22,7 @@ #include "ps/CLogger.h" #include "ps/ModIo.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" namespace JSI_ModIo { Index: ps/trunk/source/ps/scripting/JSInterface_VFS.cpp =================================================================== --- ps/trunk/source/ps/scripting/JSInterface_VFS.cpp +++ ps/trunk/source/ps/scripting/JSInterface_VFS.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include "ps/Filesystem.h" #include "scriptinterface/FunctionWrapper.h" #include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" #include Index: ps/trunk/source/scriptinterface/FunctionWrapper.h =================================================================== --- ps/trunk/source/scriptinterface/FunctionWrapper.h +++ ps/trunk/source/scriptinterface/FunctionWrapper.h @@ -18,7 +18,6 @@ #ifndef INCLUDED_FUNCTIONWRAPPER #define INCLUDED_FUNCTIONWRAPPER -#include "Object.h" #include "ScriptConversions.h" #include "ScriptExceptions.h" #include "ScriptRequest.h" @@ -36,7 +35,8 @@ * and they are default-constructible (TODO: that can probably changed). * (This could be a namespace, but I like being able to specify public/private). */ -class ScriptFunction { +class ScriptFunction +{ private: ScriptFunction() = delete; ScriptFunction(const ScriptFunction&) = delete; Index: ps/trunk/source/scriptinterface/JSON.cpp =================================================================== --- ps/trunk/source/scriptinterface/JSON.cpp +++ ps/trunk/source/scriptinterface/JSON.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,7 @@ #include "JSON.h" +#include "ps/CLogger.h" #include "ps/CStr.h" #include "ps/Filesystem.h" #include "scriptinterface/FunctionWrapper.h" Index: ps/trunk/source/scriptinterface/ScriptInterface.cpp =================================================================== --- ps/trunk/source/scriptinterface/ScriptInterface.cpp +++ ps/trunk/source/scriptinterface/ScriptInterface.cpp @@ -17,18 +17,19 @@ #include "precompiled.h" -#include "FunctionWrapper.h" -#include "ScriptContext.h" -#include "ScriptExtraHeaders.h" #include "ScriptInterface.h" -#include "ScriptStats.h" -#include "StructuredClone.h" #include "lib/debug.h" #include "lib/utf8.h" #include "ps/CLogger.h" #include "ps/Filesystem.h" #include "ps/Profile.h" +#include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" +#include "scriptinterface/ScriptContext.h" +#include "scriptinterface/ScriptExtraHeaders.h" +#include "scriptinterface/ScriptStats.h" +#include "scriptinterface/StructuredClone.h" #include #include Index: ps/trunk/source/simulation2/Simulation2.cpp =================================================================== --- ps/trunk/source/simulation2/Simulation2.cpp +++ ps/trunk/source/simulation2/Simulation2.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,20 +19,6 @@ #include "Simulation2.h" -#include "scriptinterface/FunctionWrapper.h" -#include "scriptinterface/ScriptContext.h" -#include "scriptinterface/ScriptInterface.h" -#include "scriptinterface/JSON.h" -#include "scriptinterface/StructuredClone.h" - -#include "simulation2/MessageTypes.h" -#include "simulation2/system/ComponentManager.h" -#include "simulation2/system/ParamNode.h" -#include "simulation2/system/SimContext.h" -#include "simulation2/components/ICmpAIManager.h" -#include "simulation2/components/ICmpCommandQueue.h" -#include "simulation2/components/ICmpTemplateManager.h" - #include "graphics/MapReader.h" #include "graphics/Terrain.h" #include "lib/timer.h" @@ -46,6 +32,19 @@ #include "ps/Pyrogenesis.h" #include "ps/Util.h" #include "ps/XML/Xeromyces.h" +#include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" +#include "scriptinterface/ScriptContext.h" +#include "scriptinterface/ScriptInterface.h" +#include "scriptinterface/StructuredClone.h" +#include "simulation2/MessageTypes.h" +#include "simulation2/system/ComponentManager.h" +#include "simulation2/system/ParamNode.h" +#include "simulation2/system/SimContext.h" +#include "simulation2/components/ICmpAIManager.h" +#include "simulation2/components/ICmpCommandQueue.h" +#include "simulation2/components/ICmpTemplateManager.h" #include #include Index: ps/trunk/source/simulation2/components/CCmpAIManager.cpp =================================================================== --- ps/trunk/source/simulation2/components/CCmpAIManager.cpp +++ ps/trunk/source/simulation2/components/CCmpAIManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -33,9 +33,10 @@ #include "ps/TemplateLoader.h" #include "ps/Util.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" #include "scriptinterface/ScriptContext.h" #include "scriptinterface/StructuredClone.h" -#include "scriptinterface/JSON.h" #include "simulation2/components/ICmpAIInterface.h" #include "simulation2/components/ICmpCommandQueue.h" #include "simulation2/components/ICmpObstructionManager.h" Index: ps/trunk/source/simulation2/components/ICmpAIManager.cpp =================================================================== --- ps/trunk/source/simulation2/components/ICmpAIManager.cpp +++ ps/trunk/source/simulation2/components/ICmpAIManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,12 +19,12 @@ #include "ICmpAIManager.h" -#include "simulation2/system/InterfaceScripted.h" -#include "scriptinterface/ScriptExtraHeaders.h" -#include "scriptinterface/JSON.h" - #include "lib/file/vfs/vfs_util.h" #include "ps/Filesystem.h" +#include "simulation2/system/InterfaceScripted.h" +#include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" +#include "scriptinterface/ScriptExtraHeaders.h" #include Index: ps/trunk/source/simulation2/scripting/JSInterface_Simulation.cpp =================================================================== --- ps/trunk/source/simulation2/scripting/JSInterface_Simulation.cpp +++ ps/trunk/source/simulation2/scripting/JSInterface_Simulation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include "ps/GameSetup/Config.h" #include "ps/Pyrogenesis.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" #include "scriptinterface/StructuredClone.h" #include "simulation2/components/ICmpAIManager.h" #include "simulation2/components/ICmpCommandQueue.h" Index: ps/trunk/source/simulation2/serialization/SerializedScriptTypes.h =================================================================== --- ps/trunk/source/simulation2/serialization/SerializedScriptTypes.h +++ ps/trunk/source/simulation2/serialization/SerializedScriptTypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,6 +18,8 @@ #ifndef INCLUDED_SERIALIZEDSCRIPTTYPES #define INCLUDED_SERIALIZEDSCRIPTTYPES +#include "scriptinterface/Object.h" + enum { SCRIPT_TYPE_VOID = 0, Index: ps/trunk/source/simulation2/system/ComponentManager.cpp =================================================================== --- ps/trunk/source/simulation2/system/ComponentManager.cpp +++ ps/trunk/source/simulation2/system/ComponentManager.cpp @@ -25,6 +25,7 @@ #include "ps/Profile.h" #include "ps/scripting/JSInterface_VFS.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/Object.h" #include "simulation2/components/ICmpTemplateManager.h" #include "simulation2/MessageTypes.h" #include "simulation2/system/DynamicSubscription.h"