diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 4ea7049b1e..dfc1a52f9e 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -1306,14 +1306,15 @@ function setup_atlas_projects() setup_atlas_project("AtlasObject", "StaticLib", { -- src ".", - "../../../third_party/jsonspirit" - },{ -- include - "../../../third_party/jsonspirit" + "../../../", },{ -- extern_libs "boost", "iconv", - "libxml2" + "libxml2", + "sdl", + "spidermonkey", + "cxxtest", },{ -- extra_params no_pch = 1 }) @@ -1367,10 +1368,6 @@ function setup_atlas_projects() setup_atlas_project("AtlasUI", "SharedLib", atlas_src, { -- include "../../..", - "..", - "CustomControls", - "Misc", - "../../../third_party/jsonspirit" }, atlas_extern_libs, { -- extra_params diff --git a/source/lib/external_libraries/libsdl.h b/source/lib/external_libraries/libsdl.h index 8aee8c494d..f2a791fad1 100644 --- a/source/lib/external_libraries/libsdl.h +++ b/source/lib/external_libraries/libsdl.h @@ -30,8 +30,8 @@ #include "lib/config2.h" #include "lib/external_libraries/libsdl_fwd.h" -# include "SDL.h" -# include "SDL_thread.h" +# include +# include #if !SDL_VERSION_ATLEAST(2,0,2) #error You are using an old libsdl release. At least libsdl2 >= 2.0.2 is required. @@ -41,7 +41,7 @@ // in static bswap routines. doesn't matter - modern compilers // will strip them if unused, and this is more convenient than // another header that toggles between wsdl and SDL_endian.h. -# include "SDL_endian.h" +# include // complete definition of our forward-declared SDL_Event (see sdl_fwd.h) struct SDL_Event_ diff --git a/source/lib/sysdep/os/win/win.h b/source/lib/sysdep/os/win/win.h index 7ccc8c7ca0..004b3ac5eb 100644 --- a/source/lib/sysdep/os/win/win.h +++ b/source/lib/sysdep/os/win/win.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -27,6 +27,8 @@ #ifndef INCLUDED_WIN #define INCLUDED_WIN +#include "lib/sysdep/os.h" + #if !OS_WIN #error "win.h: do not include if not compiling for Windows" #endif diff --git a/source/test_setup.cpp b/source/test_setup.cpp index dcf6a7b9e2..2729b1aa91 100644 --- a/source/test_setup.cpp +++ b/source/test_setup.cpp @@ -26,17 +26,29 @@ #include "lib/self_test.h" +#include "lib/code_generation.h" +#include "lib/debug.h" +#include "lib/os_path.h" +#include "lib/path.h" +#include "lib/sysdep/compiler.h" +#include "lib/sysdep/os.h" #include "lib/sysdep/sysdep.h" #include "lib/timer.h" +#include "lib/utf8.h" #include "ps/Profiler2.h" #include "ps/TaskManager.h" +#include "ps/ThreadUtil.h" #include "scriptinterface/FunctionWrapper.h" #include "scriptinterface/ScriptContext.h" #include "scriptinterface/ScriptEngine.h" #include "scriptinterface/ScriptInterface.h" +#include "scriptinterface/ScriptRequest.h" #include +#include +#include #include +#include class LeakReporter : public CxxTest::GlobalFixture { diff --git a/source/tools/atlas/AtlasObject/AtlasObject.h b/source/tools/atlas/AtlasObject/AtlasObject.h index 68657809d9..3239e3be35 100644 --- a/source/tools/atlas/AtlasObject/AtlasObject.h +++ b/source/tools/atlas/AtlasObject/AtlasObject.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -30,8 +30,6 @@ #include -class wxString; - ////////////////////////////////////////////////////////////////////////// // Mostly-private bits: diff --git a/source/tools/atlas/AtlasObject/JSONSpiritInclude.h b/source/tools/atlas/AtlasObject/JSONSpiritInclude.h index 8e34ff7aeb..beea6094de 100644 --- a/source/tools/atlas/AtlasObject/JSONSpiritInclude.h +++ b/source/tools/atlas/AtlasObject/JSONSpiritInclude.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -29,8 +29,8 @@ #pragma warning(disable: 4512) #endif -# include "json_spirit_writer_template.h" -# include "json_spirit_reader_template.h" +# include "third_party/jsonspirit/json_spirit_writer_template.h" +# include "third_party/jsonspirit/json_spirit_reader_template.h" #ifdef _MSC_VER #pragma warning(default: 4100) diff --git a/source/tools/atlas/AtlasObject/tests/test_AtlasObjectXML.h b/source/tools/atlas/AtlasObject/tests/test_AtlasObjectXML.h index f60c70b1e5..30ce5add1c 100644 --- a/source/tools/atlas/AtlasObject/tests/test_AtlasObjectXML.h +++ b/source/tools/atlas/AtlasObject/tests/test_AtlasObjectXML.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,7 +17,9 @@ #include "lib/self_test.h" -#include "../AtlasObject.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" + +#include class TestAtlasObjectXML : public CxxTest::TestSuite { diff --git a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp index 0862a5dfd9..55459a17eb 100644 --- a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp +++ b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp @@ -21,6 +21,7 @@ #include "tools/atlas/AtlasObject/AtlasObject.h" #include "tools/atlas/AtlasUI/ActorEditor/ActorEditorListCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h" #include "tools/atlas/AtlasUI/General/Datafile.h" #include diff --git a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.h b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.h index 1a9754878b..269a257e46 100644 --- a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.h +++ b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.h @@ -15,9 +15,8 @@ * along with 0 A.D. If not, see . */ -#include "Windows/AtlasWindow.h" - #include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h" #include #include diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp index fde507cad3..68574c625e 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp @@ -25,7 +25,6 @@ #include #include -#include #include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h index 8576ca4624..73b5c80433 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h @@ -23,7 +23,6 @@ #include class DraggableListCtrl; -class wxClassInfo; class DragCommand : public AtlasWindowCommand { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp index 7071bff357..1501a656ba 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp @@ -23,7 +23,6 @@ #include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" #include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" -#include #include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp index a955c511ed..5895bf2db0 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp index 42ee5cd5da..996d7aa62a 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp @@ -25,6 +25,11 @@ #ifdef __WXMSW__ +#include "lib/sysdep/os/win/win.h" + +#include +#include + HighResTimer::HighResTimer() { LARGE_INTEGER freq; diff --git a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp index 5aebe5255f..ea4184cce4 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp @@ -23,11 +23,12 @@ #include "virtualdirtreectrl.h" -#include "wx/imaglist.h" #include #include #include #include +#include +#include #include #include diff --git a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h index 1515688a76..0c8785e959 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h @@ -23,21 +23,21 @@ #define INCLUDED_VIRTUALDIRTREECTRL #include -#include #include #include #include #include #include #include -#include -#include #include #include #include #include #include +class wxFileName; +class wxPoint; +class wxSize; class wxBitmap; class wxImageList; class wxWindow; diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp index 3898cf3542..80f6c7cf4c 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp index 6da18067f6..c9ce2756a4 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/General/AtlasWindowCommand.cpp b/source/tools/atlas/AtlasUI/General/AtlasWindowCommand.cpp index 89892aef0f..18c6266e17 100644 --- a/source/tools/atlas/AtlasUI/General/AtlasWindowCommand.cpp +++ b/source/tools/atlas/AtlasUI/General/AtlasWindowCommand.cpp @@ -24,7 +24,6 @@ #include #include -#include #include IMPLEMENT_ABSTRACT_CLASS(AtlasWindowCommand, wxCommand); diff --git a/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h b/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h index a3f1329699..907c412cf1 100644 --- a/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h +++ b/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h @@ -18,7 +18,7 @@ #ifndef INCLUDED_ATLASWINDOWCOMMANDPROC #define INCLUDED_ATLASWINDOWCOMMANDPROC -#include "wx/cmdproc.h" +#include class wxWindow; diff --git a/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h b/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h index a47dc8c4d6..673feb7672 100644 --- a/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h +++ b/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ #ifndef INCLUDED_IATLASSERIALISER #define INCLUDED_IATLASSERIALISER -#include "AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" // An interface for GUI components to transfer their contents to/from AtObjs. // (Maybe "serialise" isn't quite correct, since AtObjs aren't serial, but diff --git a/source/tools/atlas/AtlasUI/Misc/precompiled.h b/source/tools/atlas/AtlasUI/Misc/precompiled.h index 8371cc46c6..027f518f39 100644 --- a/source/tools/atlas/AtlasUI/Misc/precompiled.h +++ b/source/tools/atlas/AtlasUI/Misc/precompiled.h @@ -45,33 +45,33 @@ #endif // Include useful wx headers -#include "wx/wxprec.h" +#include -#include "wx/artprov.h" -#include "wx/cmdproc.h" -#include "wx/colordlg.h" -#include "wx/config.h" -#include "wx/dialog.h" -#include "wx/dir.h" -#include "wx/dnd.h" -#include "wx/docview.h" -#include "wx/file.h" -#include "wx/filename.h" -#include "wx/filesys.h" -#include "wx/glcanvas.h" -#include "wx/image.h" -#include "wx/listctrl.h" -#include "wx/mstream.h" -#include "wx/notebook.h" -#include "wx/progdlg.h" -#include "wx/regex.h" -#include "wx/sound.h" -#include "wx/spinctrl.h" -#include "wx/splitter.h" -#include "wx/tooltip.h" -#include "wx/treectrl.h" -#include "wx/wfstream.h" -#include "wx/zstream.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef __GNUC__ # pragma GCC diagnostic pop @@ -101,13 +101,10 @@ # endif #endif -#else // HAVE_PCH - -// If no PCH, just include the most common headers anyway -# include "wx/wx.h" - #endif // HAVE_PCH +#include +#include // wxWidgets 3.0 or later required #if !wxCHECK_VERSION(3, 0, 0) # error You are using an old wxWidgets release. At least wxWidgets >= 3.0.0 is required. diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp index fe6c966de2..b7a807c06b 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -19,37 +19,61 @@ #include "ScenarioEditor.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h" +#include "tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h" +#include "tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h" +#include "tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.h" +#include "tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/Datafile.h" +#include "tools/atlas/AtlasUI/General/Observable.h" #include "tools/atlas/AtlasUI/Misc/DLLInterface.h" +#include "tools/atlas/AtlasUI/Misc/KeyMap.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" -#include "wx/busyinfo.h" -#include "wx/clipbrd.h" -#include "wx/config.h" -#include "wx/dir.h" -#include "wx/evtloop.h" -#include "wx/ffile.h" -#include "wx/filename.h" -#include "wx/image.h" -#include "wx/sstream.h" -#include "wx/sysopt.h" -#include "wx/tooltip.h" -#include "wx/xml/xml.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "General/AtlasEventLoop.h" -#include "General/Datafile.h" - -#include "CustomControls/Buttons/ToolButton.h" -#include "CustomControls/Canvas/Canvas.h" -#include "CustomControls/HighResTimer/HighResTimer.h" -#include "CustomControls/MapDialog/MapDialog.h" - -#include "GameInterface/MessagePasser.h" -#include "GameInterface/Messages.h" - -#include "Misc/KeyMap.h" - -#include "Tools/Common/Tools.h" -#include "Tools/Common/Brushes.h" -#include "Tools/Common/MiscState.h" +class wxInputStream; +class wxWindow; static HighResTimer g_Timer; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h index d97943cb7b..e3132da702 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,16 +18,25 @@ #ifndef INCLUDED_SCENARIOEDITOR #define INCLUDED_SCENARIOEDITOR -#include "wx/toolbar.h" - -#include "General/AtlasWindowCommandProc.h" -#include "General/Observable.h" -#include "Tools/Common/ObjectSettings.h" -#include "Tools/Common/Tools.h" -#include "CustomControls/FileHistory/FileHistory.h" -#include "SectionLayout.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" #include +#include +#include +#include +#include +#include +#include +#include + +class AtlasWindowCommandProc; +class wxWindow; class ScenarioEditor : public wxFrame { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.cpp index 26e7002d42..f39a025892 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,18 +19,39 @@ #include "SectionLayout.h" -#include "CustomControls/SnapSplitterWindow/SnapSplitterWindow.h" -#include "General/Datafile.h" -#include "ScenarioEditor.h" -#include "Sections/Cinema/Cinema.h" -#include "Sections/Environment/Environment.h" -#include "Sections/Map/Map.h" -#include "Sections/Object/Object.h" -#include "Sections/Player/Player.h" -#include "Sections/Terrain/Terrain.h" +#include "tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.h" +#include "tools/atlas/AtlasUI/General/Datafile.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h b/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h index 85d3b79872..7df6e80d68 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,6 +21,12 @@ #include #include +class ScenarioEditor; +class SidebarBook; +class SnapSplitterWindow; +class wxString; +class wxWindow; + // Some platform dependent sizes #if defined(__WXGTK__) #define SIDEBAR_SIZE 285 @@ -33,11 +39,6 @@ #define BOTTOMBAR_SIZE 180 #endif -class ScenarioEditor; -class SnapSplitterWindow; -class SidebarBook; -class wxWindow; - class SectionLayout { public: diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp index e27dbd480f..6872767c16 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp index 9af9f520f6..1608a6f1f3 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp index d4d7fd9b30..f81aeb770c 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,12 +17,23 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "Common/ObjectSettings.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/AlterElevation.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/AlterElevation.cpp index bed2f0452d..a20b1d8358 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/AlterElevation.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/AlterElevation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,10 +17,18 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.cpp index 6140cb8326..1a6f140573 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,9 +19,24 @@ #include "Brushes.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" -#include "wx/spinctrl.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include Brush g_Brush_Elevation; // shared between several elevation-related tools; other tools have their own brushes diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h index 0f03ae9104..e3492ecec9 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,12 +18,11 @@ #ifndef INCLUDED_BRUSHES #define INCLUDED_BRUSHES -class BrushShapeCtrl; -class BrushSizeCtrl; -class BrushStrengthCtrl; - #include +class wxSizer; +class wxWindow; + class Brush { friend class BrushShapeCtrl; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp index 89fbfd0db0..cd78af260d 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 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,10 @@ #include "MiscState.h" +#include "tools/atlas/AtlasUI/General/Observable.h" + +#include + Observable g_SelectedTexture; Observable > g_SelectedObjects; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h index 60b9f89ac9..4f90c961a7 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,7 +18,10 @@ #ifndef INCLUDED_MISCSTATE #define INCLUDED_MISCSTATE -#include "General/Observable.h" +#include + +class wxString; +template class Observable; namespace AtlasMessage { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp index 95e3421b85..55f5595217 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,8 +19,16 @@ #include "ObjectSettings.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include ObjectSettings::ObjectSettings(Observable >& selectedObjects, int view) : m_PlayerID(0), m_SelectedObjects(selectedObjects), m_View(view) diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h index e89c56455d..e8936c172a 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,10 +18,13 @@ #ifndef INCLUDED_OBJECTSETTINGS #define INCLUDED_OBJECTSETTINGS -#include -#include +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" -#include "ScenarioEditor/Tools/Common/MiscState.h" +#include +#include +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.cpp index 5f1eb44b61..fc4f37a7eb 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,18 @@ #include "precompiled.h" #include "Tools.h" -#include "GameInterface/Messages.h" -#include "CustomControls/Buttons/ToolButton.h" + +#include "tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" + +#include +#include +#include +#include +#include class DummyTool : public ITool { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h index 38888b0983..25d92df774 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,12 +18,20 @@ #ifndef INCLUDED_TOOLS #define INCLUDED_TOOLS -#include "General/AtlasWindowCommand.h" -#include "General/Observable.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" // IWYU pragma: keep - required for POST_COMMAND + +#include +#include +#include +#include -class wxMouseEvent; -class wxKeyEvent; class ScenarioEditor; +class wxKeyEvent; +class wxMouseEvent; +class wxString; +class wxToolBar; +template class ObservablePtr; class ITool : public wxObject { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FillTerrain.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FillTerrain.cpp index 2f6e521eb7..8ff15a9c14 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FillTerrain.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FillTerrain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,20 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FlattenElevation.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FlattenElevation.cpp index 3e8b750bf7..439e95c65e 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FlattenElevation.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FlattenElevation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,10 +17,18 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PaintTerrain.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PaintTerrain.cpp index aca48f35ee..02ce5cad2e 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PaintTerrain.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PaintTerrain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,24 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PickWaterHeight.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PickWaterHeight.cpp index f7940f1d43..9e3912cbfb 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PickWaterHeight.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PickWaterHeight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,16 @@ #include "precompiled.h" -#include "Common/Tools.h" -#include "Common/MiscState.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/Sections/Environment/Environment.h" -#include "ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PikeElevation.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PikeElevation.cpp index cb17ce60e8..486b102679 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PikeElevation.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PikeElevation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,10 +17,18 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp index 3aedf8b433..e00f3c6641 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,15 +17,25 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "Common/ObjectSettings.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ReplaceTerrain.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ReplaceTerrain.cpp index dd54169680..b10b572788 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ReplaceTerrain.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ReplaceTerrain.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,20 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/SmoothElevation.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/SmoothElevation.cpp index 574bfe8ff6..b2ed8fadbe 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/SmoothElevation.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/SmoothElevation.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,18 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp index ca233ec619..b9b6ddefde 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,15 +17,37 @@ #include "precompiled.h" -#include "ScenarioEditor/ScenarioEditor.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "Common/ObjectSettings.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/Observable.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include + +class wxInputStream; using AtlasMessage::Position; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformPath.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformPath.cpp index 3ab9195f82..fdf757b6c0 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformPath.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformPath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,18 +17,18 @@ #include "precompiled.h" -#include "Common/Tools.h" -#include "Common/Brushes.h" -#include "Common/MiscState.h" -#include "Common/ObjectSettings.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/ScenarioEditor.h" - -#include -#include -#include -#include +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include +#include +#include +#include using AtlasMessage::Position; diff --git a/source/tools/atlas/GameInterface/ActorViewer.cpp b/source/tools/atlas/GameInterface/ActorViewer.cpp index 28adb59bdf..0e11ef6d27 100644 --- a/source/tools/atlas/GameInterface/ActorViewer.cpp +++ b/source/tools/atlas/GameInterface/ActorViewer.cpp @@ -47,6 +47,7 @@ #include "maths/Matrix3D.h" #include "maths/Vector3D.h" #include "ps/CLogger.h" +#include "ps/CStr.h" #include "ps/Filesystem.h" #include "ps/ProfileViewer.h" #include "ps/VideoMode.h" diff --git a/source/tools/atlas/GameInterface/Handlers/CommandHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/CommandHandlers.cpp index d50aecca42..d2ba213c87 100644 --- a/source/tools/atlas/GameInterface/Handlers/CommandHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/CommandHandlers.cpp @@ -17,9 +17,16 @@ #include "precompiled.h" -#include "MessageHandler.h" +#include "lib/debug.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/Handlers/MessageHandler.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" -#include "../CommandProc.h" +#include +#include +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/MessageHandler.h b/source/tools/atlas/GameInterface/Handlers/MessageHandler.h index 385cf10873..044682a4f0 100644 --- a/source/tools/atlas/GameInterface/Handlers/MessageHandler.h +++ b/source/tools/atlas/GameInterface/Handlers/MessageHandler.h @@ -18,7 +18,8 @@ #ifndef INCLUDED_MESSAGEHANDLER #define INCLUDED_MESSAGEHANDLER -#include "../Messages.h" +#include "lib/debug.h" +#include "tools/atlas/GameInterface/Messages.h" #include #include diff --git a/source/tools/atlas/GameInterface/MessagePasserImpl.cpp b/source/tools/atlas/GameInterface/MessagePasserImpl.cpp index 3daeb2b263..fe2be0d505 100644 --- a/source/tools/atlas/GameInterface/MessagePasserImpl.cpp +++ b/source/tools/atlas/GameInterface/MessagePasserImpl.cpp @@ -17,14 +17,18 @@ #include "precompiled.h" -#include - #include "MessagePasserImpl.h" -#include "Messages.h" -#include "Handlers/MessageHandler.h" +#include "lib/debug.h" #include "lib/timer.h" #include "ps/CLogger.h" +#include "tools/atlas/GameInterface/Handlers/MessageHandler.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SharedMemory.h" + +#include +#include +#include using namespace AtlasMessage; diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h index 40ba13d494..27acf7d03c 100644 --- a/source/tools/atlas/GameInterface/Messages.h +++ b/source/tools/atlas/GameInterface/Messages.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2024 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ // Opens namespace AtlasMessage, closes it on second inclusion! #ifndef MESSAGES_SKIP_SETUP -#include "MessagesSetup.h" +#include "MessagesSetup.h" // IWYU pragma: keep #endif // TODO: organisation, documentation, etc @@ -746,7 +746,7 @@ QUERY(GetSelectedObjectsTemplateNames, #ifndef MESSAGES_SKIP_SETUP -#include "MessagesSetup.h" +#include "MessagesSetup.h" // IWYU pragma: keep #endif #endif // INCLUDED_MESSAGES diff --git a/source/tools/atlas/GameInterface/Shareable.h b/source/tools/atlas/GameInterface/Shareable.h index bd1059529c..e7b3119dc6 100644 --- a/source/tools/atlas/GameInterface/Shareable.h +++ b/source/tools/atlas/GameInterface/Shareable.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -57,16 +57,19 @@ after their definition. */ -#include "SharedMemory.h" - -#include -#include -#include - // we want to use placement new without grief // (Duplicated in SharedMemory.h) #undef new +#include "tools/atlas/GameInterface/SharedMemory.h" + +#include +#include +#include +#include + +namespace AtlasMessage { template class Shareable; } + namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/SharedMemory.h b/source/tools/atlas/GameInterface/SharedMemory.h index 928f83ed92..d20be126a1 100644 --- a/source/tools/atlas/GameInterface/SharedMemory.h +++ b/source/tools/atlas/GameInterface/SharedMemory.h @@ -18,12 +18,13 @@ #ifndef INCLUDED_SHAREDMEMORY #define INCLUDED_SHAREDMEMORY -#include - // we want to use placement new without grief // (Duplicated in Shareable.h) #undef new +#include +#include + namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/SharedTypes.h b/source/tools/atlas/GameInterface/SharedTypes.h index ae90580ee9..087c9faaa5 100644 --- a/source/tools/atlas/GameInterface/SharedTypes.h +++ b/source/tools/atlas/GameInterface/SharedTypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,6 +21,7 @@ #include "Shareable.h" #include +#include class wxPoint; class CVector3D;