diff --git a/source/graphics/MapGenerator.cpp b/source/graphics/MapGenerator.cpp index 074cb93aae..ced537dde8 100644 --- a/source/graphics/MapGenerator.cpp +++ b/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 diff --git a/source/graphics/scripting/JSInterface_GameView.cpp b/source/graphics/scripting/JSInterface_GameView.cpp index 5a9354ccf6..1c6def2cac 100644 --- a/source/graphics/scripting/JSInterface_GameView.cpp +++ b/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 diff --git a/source/gui/GUIManager.cpp b/source/gui/GUIManager.cpp index de775a4dfd..cb7d8c486b 100644 --- a/source/gui/GUIManager.cpp +++ b/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" diff --git a/source/gui/Scripting/JSInterface_GUIProxy_impl.h b/source/gui/Scripting/JSInterface_GUIProxy_impl.h index 415cff18ae..e2e82b6bde 100644 --- a/source/gui/Scripting/JSInterface_GUIProxy_impl.h +++ b/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" diff --git a/source/ps/scripting/JSInterface_Mod.cpp b/source/ps/scripting/JSInterface_Mod.cpp index 3fb06af0e1..0ab43744ad 100644 --- a/source/ps/scripting/JSInterface_Mod.cpp +++ b/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(); diff --git a/source/ps/scripting/JSInterface_ModIo.cpp b/source/ps/scripting/JSInterface_ModIo.cpp index d3c4c41bfd..3b7b60b1ee 100644 --- a/source/ps/scripting/JSInterface_ModIo.cpp +++ b/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 { diff --git a/source/ps/scripting/JSInterface_VFS.cpp b/source/ps/scripting/JSInterface_VFS.cpp index 0485144def..4fc144c901 100644 --- a/source/ps/scripting/JSInterface_VFS.cpp +++ b/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 diff --git a/source/scriptinterface/FunctionWrapper.h b/source/scriptinterface/FunctionWrapper.h index dc0b2b8e83..5878da3b77 100644 --- a/source/scriptinterface/FunctionWrapper.h +++ b/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 @@ class ScriptInterface; * 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; diff --git a/source/scriptinterface/JSON.cpp b/source/scriptinterface/JSON.cpp index 36cfa26433..5f95160246 100644 --- a/source/scriptinterface/JSON.cpp +++ b/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" diff --git a/source/scriptinterface/ScriptInterface.cpp b/source/scriptinterface/ScriptInterface.cpp index 3b0bca7ea5..db4eddf82e 100644 --- a/source/scriptinterface/ScriptInterface.cpp +++ b/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 diff --git a/source/simulation2/Simulation2.cpp b/source/simulation2/Simulation2.cpp index f81dc67b1f..bc964ed8ef 100644 --- a/source/simulation2/Simulation2.cpp +++ b/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 diff --git a/source/simulation2/components/CCmpAIManager.cpp b/source/simulation2/components/CCmpAIManager.cpp index 4b967a00fb..e185a81cc4 100644 --- a/source/simulation2/components/CCmpAIManager.cpp +++ b/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" diff --git a/source/simulation2/components/ICmpAIManager.cpp b/source/simulation2/components/ICmpAIManager.cpp index 5f6c9c4a8e..f6b57c35f6 100644 --- a/source/simulation2/components/ICmpAIManager.cpp +++ b/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 diff --git a/source/simulation2/scripting/JSInterface_Simulation.cpp b/source/simulation2/scripting/JSInterface_Simulation.cpp index c5dd567eb5..c1f6510468 100644 --- a/source/simulation2/scripting/JSInterface_Simulation.cpp +++ b/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" diff --git a/source/simulation2/serialization/SerializedScriptTypes.h b/source/simulation2/serialization/SerializedScriptTypes.h index 4521bc5433..4a814ef500 100644 --- a/source/simulation2/serialization/SerializedScriptTypes.h +++ b/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, diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp index b78e906a80..e963d0f3df 100644 --- a/source/simulation2/system/ComponentManager.cpp +++ b/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"