diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index de255d5cb0..b1750eaa62 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -1348,6 +1348,7 @@ function setup_atlas_projects() setup_atlas_project("AtlasUI", "SharedLib", atlas_src, { -- include + "../../..", "..", "CustomControls", "Misc", diff --git a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp index 7fdeb45af0..02b047cb6a 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.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,15 +17,27 @@ #include "precompiled.h" -#include "wx/sysopt.h" -#include "wx/wfstream.h" -#include "wx/filename.h" -#include "wx/image.h" - #include "ToolButton.h" -#include "ScenarioEditor/Tools/Common/Tools.h" -#include "ScenarioEditor/SectionLayout.h" -#include "General/Datafile.h" + +#include "tools/atlas/AtlasUI/General/Datafile.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h" +#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class wxWindow; BEGIN_EVENT_TABLE(ToolButton, wxButton) EVT_BUTTON(wxID_ANY, ToolButton::OnClick) diff --git a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp index 19c2c4d2b1..0ecd6662f5 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.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,8 +19,15 @@ #include "Canvas.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/Messages.h" + +#include +#include +#include +#include + +class wxWindow; Canvas::Canvas(wxWindow* parent, int* attribList, long style) : wxGLCanvas(parent, -1, attribList, wxDefaultPosition, wxDefaultSize, style, _T("GLCanvas")), diff --git a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h index 8dcc3ffd8c..1ad7d30ad1 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h @@ -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 @@ -15,7 +15,12 @@ * along with 0 A.D. If not, see . */ -#include "wx/glcanvas.h" +#include +#include +#include +#include + +class wxWindow; class Canvas : public wxGLCanvas { diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp index b8c1ea1dbc..819edfaed9 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.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,11 +18,26 @@ #include "precompiled.h" #include "MapResizeDialog.h" -#include "GameInterface/MessagePasser.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/ScenarioEditor.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" + +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include + +class wxWindow; MapResizeDialog::MapResizeDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCAPTION | wxRESIZE_BORDER) diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp index b48dc60393..29fe791817 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.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 @@ -19,16 +19,27 @@ #include "PseudoMiniMapPanel.h" -#include "GameInterface/MessagePasser.h" -#include "GameInterface/Messages.h" -#include "ScenarioEditor/Tools/Common/Tools.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include + +class wxWindow; namespace { diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp index 5f75edef3f..1fff73a058 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.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,13 +19,37 @@ #include "AtlasWindow.h" -#include "AtlasObject/AtlasObject.h" -#include "General/AtlasWindowCommand.h" -#include "General/Datafile.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" +#include "tools/atlas/AtlasUI/General/Datafile.h" -#include "wx/artprov.h" -#include "wx/config.h" -#include "wx/file.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 + +class wxSize; +class wxWindow; ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h index 43ba6ce21d..fd3285f6eb 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.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,21 +18,25 @@ #ifndef INCLUDED_ATLASWINDOW #define INCLUDED_ATLASWINDOW -#include "General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/IAtlasSerialiser.h" -#include "General/IAtlasSerialiser.h" -#include "FileHistory/FileHistory.h" +#include +#include +#include +#include +#include +#include +#include +#include -#include "wx/filename.h" - -#include -#if BOOST_VERSION >= 104000 -# include -#else -# error Atlas requires Boost 1.40 or later -#endif - -class AtObj; +class wxClassInfo; +class wxMenu; +class wxMenuBar; +class wxMenuItem; +class wxSize; +class wxWindow; class AtlasWindow : public wxFrame, public IAtlasSerialiser { diff --git a/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h b/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h index 9fa096b7ce..a3f1329699 100644 --- a/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h +++ b/source/tools/atlas/AtlasUI/General/AtlasWindowCommandProc.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 @@ -20,6 +20,8 @@ #include "wx/cmdproc.h" +class wxWindow; + class AtlasWindowCommandProc : public wxCommandProcessor { public: diff --git a/source/tools/atlas/GameInterface/ActorViewer.cpp b/source/tools/atlas/GameInterface/ActorViewer.cpp index 2c5ab76820..28adb59bdf 100644 --- a/source/tools/atlas/GameInterface/ActorViewer.cpp +++ b/source/tools/atlas/GameInterface/ActorViewer.cpp @@ -19,41 +19,47 @@ #include "ActorViewer.h" -#include "View.h" - +#include "graphics/Camera.h" #include "graphics/Canvas2D.h" #include "graphics/ColladaManager.h" +#include "graphics/Color.h" #include "graphics/LOSTexture.h" +#include "graphics/MeshManager.h" #include "graphics/MiniMapTexture.h" +#include "graphics/MiniPatch.h" #include "graphics/Model.h" -#include "graphics/ModelDef.h" +#include "graphics/ModelAbstract.h" #include "graphics/ObjectManager.h" +#include "graphics/Overlay.h" #include "graphics/ParticleManager.h" #include "graphics/Patch.h" #include "graphics/SkeletonAnimManager.h" #include "graphics/Terrain.h" -#include "graphics/TerrainTextureEntry.h" #include "graphics/TerrainTextureManager.h" #include "graphics/TerritoryTexture.h" #include "graphics/Unit.h" #include "graphics/UnitManager.h" -#include "graphics/Overlay.h" -#include "maths/MathUtil.h" -#include "ps/Filesystem.h" +#include "lib/debug.h" +#include "lib/posix/posix_types.h" +#include "maths/BoundingBoxAligned.h" +#include "maths/Fixed.h" +#include "maths/FixedVector3D.h" +#include "maths/Matrix3D.h" +#include "maths/Vector3D.h" #include "ps/CLogger.h" -#include "ps/GameSetup/Config.h" +#include "ps/Filesystem.h" #include "ps/ProfileViewer.h" #include "ps/VideoMode.h" -#include "renderer/backend/IDevice.h" -#include "renderer/backend/IDeviceCommandContext.h" -#include "renderer/backend/IFramebuffer.h" #include "renderer/Renderer.h" #include "renderer/RenderingOptions.h" #include "renderer/Scene.h" #include "renderer/SceneRenderer.h" #include "renderer/SkyManager.h" #include "renderer/WaterManager.h" -#include "scriptinterface/ScriptContext.h" +#include "renderer/backend/IDevice.h" +#include "renderer/backend/IDeviceCommandContext.h" +#include "renderer/backend/IFramebuffer.h" +#include "scriptinterface/ScriptInterface.h" #include "simulation2/Simulation2.h" #include "simulation2/components/ICmpAttack.h" #include "simulation2/components/ICmpOwnership.h" @@ -63,8 +69,16 @@ #include "simulation2/components/ICmpUnitMotion.h" #include "simulation2/components/ICmpVisual.h" #include "simulation2/components/ICmpWaterManager.h" +#include "simulation2/helpers/Position.h" #include "simulation2/helpers/Render.h" #include "simulation2/system/Component.h" +#include "tools/atlas/GameInterface/View.h" + +#include +#include +#include + +class CTerrainTextureEntry; extern int g_xres, g_yres; diff --git a/source/tools/atlas/GameInterface/ActorViewer.h b/source/tools/atlas/GameInterface/ActorViewer.h index 36a8a6558d..7c8dbf5236 100644 --- a/source/tools/atlas/GameInterface/ActorViewer.h +++ b/source/tools/atlas/GameInterface/ActorViewer.h @@ -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 @@ -18,13 +18,16 @@ #ifndef INCLUDED_ACTORVIEWER #define INCLUDED_ACTORVIEWER -#include "ps/CStrForward.h" +#include "lib/code_annotation.h" #include "simulation2/helpers/Player.h" #include "simulation2/system/Entity.h" -struct ActorViewerImpl; -struct SColor4ub; +#include + class CSimulation2; +class CStr8; +class CStrW; +struct ActorViewerImpl; class ActorViewer { diff --git a/source/tools/atlas/GameInterface/Brushes.cpp b/source/tools/atlas/GameInterface/Brushes.cpp index b93bcc3795..1cde397fe6 100644 --- a/source/tools/atlas/GameInterface/Brushes.cpp +++ b/source/tools/atlas/GameInterface/Brushes.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 @@ -21,14 +21,13 @@ #include "graphics/Color.h" #include "graphics/Terrain.h" -#include "maths/MathUtil.h" +#include "lib/debug.h" #include "ps/Game.h" -#include "ps/World.h" #include "renderer/TerrainOverlay.h" #include "simulation2/Simulation2.h" -#include "simulation2/system/SimContext.h" #include +#include using namespace AtlasMessage; diff --git a/source/tools/atlas/GameInterface/Brushes.h b/source/tools/atlas/GameInterface/Brushes.h index 590502a35d..0e4137e56f 100644 --- a/source/tools/atlas/GameInterface/Brushes.h +++ b/source/tools/atlas/GameInterface/Brushes.h @@ -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 @@ -18,6 +18,7 @@ #ifndef INCLUDED_BRUSHES #define INCLUDED_BRUSHES +#include "lib/posix/posix_types.h" #include "maths/Vector3D.h" #include diff --git a/source/tools/atlas/GameInterface/CommandProc.h b/source/tools/atlas/GameInterface/CommandProc.h index 79d42dd785..64de5222b9 100644 --- a/source/tools/atlas/GameInterface/CommandProc.h +++ b/source/tools/atlas/GameInterface/CommandProc.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,11 +18,13 @@ #ifndef INCLUDED_COMMANDPROC #define INCLUDED_COMMANDPROC -#include +#include "lib/code_annotation.h" +#include "lib/debug.h" + +#include #include #include - -#include "SharedMemory.h" +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/DeltaArray.h b/source/tools/atlas/GameInterface/DeltaArray.h index df952bf8dc..fcf848629b 100644 --- a/source/tools/atlas/GameInterface/DeltaArray.h +++ b/source/tools/atlas/GameInterface/DeltaArray.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 @@ -18,6 +18,13 @@ #ifndef INCLUDED_DELTAARRAY #define INCLUDED_DELTAARRAY +#include "lib/posix/posix_types.h" + +#include +#include +#include +#include + template class DeltaArray2D { public: diff --git a/source/tools/atlas/GameInterface/GameLoop.cpp b/source/tools/atlas/GameInterface/GameLoop.cpp index 0782625d8e..4ce72da36a 100644 --- a/source/tools/atlas/GameInterface/GameLoop.cpp +++ b/source/tools/atlas/GameInterface/GameLoop.cpp @@ -19,32 +19,23 @@ #include "GameLoop.h" -#include "MessagePasserImpl.h" -#include "Messages.h" -#include "SharedMemory.h" -#include "Handlers/MessageHandler.h" -#include "ActorViewer.h" -#include "View.h" - -#include "InputProcessor.h" - #include "graphics/TextureManager.h" -#include "lib/app_hooks.h" -#include "lib/external_libraries/libsdl.h" +#include "lib/debug.h" #include "lib/timer.h" -#include "ps/CLogger.h" #include "ps/DllLoader.h" -#include "ps/Filesystem.h" -#include "ps/Profile.h" -#include "ps/ThreadUtil.h" #include "ps/GameSetup/Paths.h" +#include "ps/ThreadUtil.h" #include "renderer/Renderer.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/MessagePasserImpl.h" +#include "tools/atlas/GameInterface/SharedMemory.h" +#include "tools/atlas/GameInterface/View.h" + +#include +#include using namespace AtlasMessage; -#include - - namespace AtlasMessage { extern void RegisterHandlers(); diff --git a/source/tools/atlas/GameInterface/Handlers/BrushHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/BrushHandlers.cpp index 59d49799af..d408e28649 100644 --- a/source/tools/atlas/GameInterface/Handlers/BrushHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/BrushHandlers.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 @@ -19,7 +19,11 @@ #include "MessageHandler.h" -#include "../Brushes.h" +#include "maths/Vector3D.h" +#include "tools/atlas/GameInterface/Brushes.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/CameraCtrlHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/CameraCtrlHandlers.cpp index 8161f5c640..4da50115da 100644 --- a/source/tools/atlas/GameInterface/Handlers/CameraCtrlHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/CameraCtrlHandlers.cpp @@ -18,21 +18,24 @@ #include "precompiled.h" #include "MessageHandler.h" -#include "../GameLoop.h" -#include "../View.h" -#include "maths/MathUtil.h" -#include "maths/Vector3D.h" -#include "maths/Quaternion.h" -#include "ps/Game.h" -#include "renderer/Renderer.h" -#include "graphics/GameView.h" +#include "graphics/Camera.h" #include "graphics/CinemaManager.h" - -#include "ps/World.h" +#include "graphics/GameView.h" #include "graphics/Terrain.h" - -#include +#include "lib/debug.h" +#include "maths/MathUtil.h" +#include "maths/Matrix3D.h" +#include "maths/Quaternion.h" +#include "maths/Vector3D.h" +#include "ps/Game.h" +#include "ps/World.h" +#include "renderer/Renderer.h" +#include "tools/atlas/GameInterface/GameLoop.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/CinemaHandler.cpp b/source/tools/atlas/GameInterface/Handlers/CinemaHandler.cpp index 259a537f2e..50a7d9ac25 100644 --- a/source/tools/atlas/GameInterface/Handlers/CinemaHandler.cpp +++ b/source/tools/atlas/GameInterface/Handlers/CinemaHandler.cpp @@ -18,24 +18,41 @@ #include "precompiled.h" #include "MessageHandler.h" -#include "../CommandProc.h" -#include "../GameLoop.h" -#include "../View.h" + #include "graphics/Camera.h" #include "graphics/CinemaManager.h" #include "graphics/GameView.h" -#include "ps/Game.h" -#include "ps/CStr.h" -#include "ps/CLogger.h" -#include "ps/Filesystem.h" +#include "lib/debug.h" +#include "maths/Fixed.h" +#include "maths/FixedVector3D.h" #include "maths/MathUtil.h" +#include "maths/Matrix3D.h" +#include "maths/NUSpline.h" #include "maths/Quaternion.h" #include "maths/Vector2D.h" #include "maths/Vector3D.h" -#include "simulation2/Simulation2.h" +#include "ps/CStr.h" +#include "ps/Game.h" #include "simulation2/components/ICmpCinemaManager.h" #include "simulation2/helpers/CinemaPath.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/GameLoop.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" + +#include +#include +#include +#include +#include + +namespace AtlasMessage { struct cAddPathNode; } +namespace AtlasMessage { struct cDeletePathNode; } +namespace AtlasMessage { struct cMovePathNode; } namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/ElevationHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/ElevationHandlers.cpp index 38dc3df75d..371ad572f7 100644 --- a/source/tools/atlas/GameInterface/Handlers/ElevationHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/ElevationHandlers.cpp @@ -17,23 +17,30 @@ #include "precompiled.h" -#include "MessageHandler.h" - -#include "../CommandProc.h" - #include "graphics/RenderableObject.h" #include "graphics/Terrain.h" #include "graphics/UnitManager.h" -#include "ps/CStr.h" +#include "lib/posix/posix_types.h" +#include "lib/types.h" +#include "maths/MathUtil.h" +#include "maths/Vector3D.h" #include "ps/Game.h" #include "ps/World.h" -#include "maths/MathUtil.h" -#include "simulation2/Simulation2.h" #include "simulation2/components/ICmpTerrain.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/Brushes.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/DeltaArray.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include +#include -#include "../Brushes.h" -#include "../DeltaArray.h" namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp index a6755fe560..ffea3f6091 100644 --- a/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp @@ -19,11 +19,11 @@ #include "MessageHandler.h" -#include "../CommandProc.h" - +#include "graphics/Color.h" #include "graphics/LightEnv.h" #include "graphics/Terrain.h" -#include "maths/MathUtil.h" +#include "lib/debug.h" +#include "maths/Vector3D.h" #include "ps/CStr.h" #include "ps/Game.h" #include "ps/World.h" @@ -32,9 +32,18 @@ #include "renderer/SceneRenderer.h" #include "renderer/SkyManager.h" #include "renderer/WaterManager.h" -#include "simulation2/Simulation2.h" #include "simulation2/components/ICmpWaterManager.h" +#include "simulation2/helpers/Position.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" + +#include +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp index a2e08053d1..47157940ad 100644 --- a/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp @@ -18,33 +18,39 @@ #include "precompiled.h" #include "MessageHandler.h" -#include "../GameLoop.h" -#include "../CommandProc.h" -#include "../ActorViewer.h" -#include "../View.h" -#include "../InputProcessor.h" -#include "graphics/GameView.h" -#include "graphics/ObjectManager.h" #include "gui/GUIManager.h" +#include "lib/debug.h" #include "lib/external_libraries/libsdl.h" +#include "lib/input.h" +#include "lib/sysdep/os.h" #include "lib/timer.h" -#include "maths/MathUtil.h" -#include "ps/CConsole.h" #include "ps/CLogger.h" +#include "ps/CStr.h" #include "ps/Filesystem.h" -#include "ps/Profile.h" -#include "ps/Profiler2.h" -#include "ps/Game.h" -#include "ps/VideoMode.h" #include "ps/GameSetup/Config.h" #include "ps/GameSetup/GameSetup.h" -#include "renderer/backend/IDevice.h" +#include "ps/Profile.h" +#include "ps/VideoMode.h" #include "renderer/Renderer.h" #include "renderer/SceneRenderer.h" +#include "renderer/backend/IDevice.h" #include "scriptinterface/ScriptInterface.h" +#include "tools/atlas/GameInterface/ActorViewer.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/GameLoop.h" +#include "tools/atlas/GameInterface/InputProcessor.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" +#include +#include +#include +#include #include +#include #if OS_WIN // We don't include wutil header directly to prevent including Windows headers. diff --git a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp index e325fd1aed..28ceab96be 100644 --- a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp @@ -18,51 +18,72 @@ #include "precompiled.h" #include "MessageHandler.h" -#include "../CommandProc.h" -#include "../GameLoop.h" -#include "../MessagePasser.h" #include "graphics/GameView.h" #include "graphics/LOSTexture.h" #include "graphics/MapIO.h" #include "graphics/MapWriter.h" #include "graphics/MiniMapTexture.h" +#include "graphics/MiniPatch.h" #include "graphics/Patch.h" #include "graphics/Terrain.h" #include "graphics/TerrainTextureEntry.h" -#include "graphics/TerrainTextureManager.h" -#include "lib/bits.h" +#include "lib/debug.h" +#include "lib/file/vfs/vfs.h" #include "lib/file/vfs/vfs_path.h" #include "lib/file/vfs/vfs_util.h" +#include "lib/os_path.h" +#include "lib/path.h" +#include "lib/posix/posix_types.h" #include "lib/status.h" +#include "lib/types.h" +#include "maths/Fixed.h" +#include "maths/FixedVector3D.h" #include "maths/MathUtil.h" #include "ps/CLogger.h" +#include "ps/CStr.h" +#include "ps/Errors.h" #include "ps/Filesystem.h" #include "ps/Game.h" -#include "ps/GameSetup/GameSetup.h" #include "ps/Loader.h" #include "ps/World.h" #include "renderer/Renderer.h" #include "renderer/SceneRenderer.h" #include "renderer/WaterManager.h" -#include "scriptinterface/Object.h" #include "scriptinterface/JSON.h" +#include "scriptinterface/Object.h" +#include "scriptinterface/ScriptInterface.h" +#include "scriptinterface/ScriptRequest.h" #include "simulation2/Simulation2.h" #include "simulation2/components/ICmpOwnership.h" -#include "simulation2/components/ICmpPlayer.h" -#include "simulation2/components/ICmpPlayerManager.h" #include "simulation2/components/ICmpPosition.h" #include "simulation2/components/ICmpRangeManager.h" #include "simulation2/components/ICmpTemplateManager.h" #include "simulation2/components/ICmpTerrain.h" #include "simulation2/components/ICmpVisual.h" +#include "simulation2/helpers/Player.h" #include "simulation2/system/Component.h" -#include "simulation2/system/ParamNode.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +class CFileInfo; + #ifdef _MSC_VER # pragma warning(disable: 4458) // Declaration hides class member. #endif diff --git a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp index facb809326..9a7e3840a1 100644 --- a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp @@ -18,23 +18,35 @@ #include "precompiled.h" #include "MessageHandler.h" -#include "../MessagePasserImpl.h" - -#include "../GameLoop.h" -#include "../View.h" -#include "graphics/GameView.h" -#include "gui/GUIManager.h" #include "gui/CGUI.h" +#include "gui/GUIManager.h" #include "lib/external_libraries/libsdl.h" +#include "lib/input.h" +#include "lib/path.h" +#include "lib/types.h" #include "maths/MathUtil.h" #include "ps/Game.h" #include "ps/GameSetup/Config.h" -#include "ps/GameSetup/GameSetup.h" #include "renderer/Renderer.h" #include "scriptinterface/ScriptInterface.h" -#include "simulation2/Simulation2.h" #include "simulation2/components/ICmpSoundManager.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/MessagePasser.h" +#include "tools/atlas/GameInterface/MessagePasserImpl.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" + +#include +#include +#include +#include +#include +#include +#include +#include extern void (*Atlas_GLSwapBuffers)(void* context); diff --git a/source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp index c061618e80..008b213efe 100644 --- a/source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp @@ -17,43 +17,57 @@ #include "precompiled.h" -#include -#include - #include "MessageHandler.h" -#include "../CommandProc.h" -#include "../SimState.h" -#include "../View.h" +#include "graphics/Camera.h" +#include "graphics/Color.h" #include "graphics/GameView.h" -#include "graphics/Model.h" -#include "graphics/ObjectBase.h" -#include "graphics/ObjectEntry.h" -#include "graphics/ObjectManager.h" #include "graphics/Terrain.h" -#include "graphics/Unit.h" +#include "lib/debug.h" +#include "lib/types.h" #include "lib/utf8.h" +#include "maths/Fixed.h" +#include "maths/FixedVector3D.h" #include "maths/MathUtil.h" #include "maths/Matrix3D.h" #include "maths/Vector2D.h" +#include "maths/Vector3D.h" #include "ps/CLogger.h" +#include "ps/CStr.h" #include "ps/Game.h" #include "ps/World.h" -#include "renderer/Renderer.h" -#include "renderer/WaterManager.h" +#include "ps/XML/XMLWriter.h" #include "simulation2/Simulation2.h" #include "simulation2/components/ICmpObstruction.h" -#include "simulation2/components/ICmpUnitMotion.h" #include "simulation2/components/ICmpOwnership.h" -#include "simulation2/components/ICmpPosition.h" #include "simulation2/components/ICmpPlayer.h" #include "simulation2/components/ICmpPlayerManager.h" +#include "simulation2/components/ICmpPosition.h" #include "simulation2/components/ICmpSelectable.h" #include "simulation2/components/ICmpTemplateManager.h" +#include "simulation2/components/ICmpUnitMotion.h" #include "simulation2/components/ICmpVisual.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/helpers/Position.h" #include "simulation2/helpers/Selection.h" #include "simulation2/system/Component.h" -#include "ps/XML/XMLWriter.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp index 7c38eeb032..2690a23077 100644 --- a/source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp @@ -23,6 +23,12 @@ #include "simulation2/Simulation2.h" #include "simulation2/components/ICmpTemplateManager.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" + +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp index 75e5617fef..58aa7684ee 100644 --- a/source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp @@ -19,30 +19,47 @@ #include "MessageHandler.h" -#include "../CommandProc.h" - -#include "graphics/Patch.h" -#include "graphics/TerrainTextureManager.h" -#include "graphics/TerrainTextureEntry.h" +#include "graphics/MiniPatch.h" +#include "graphics/RenderableObject.h" #include "graphics/Terrain.h" +#include "graphics/TerrainTextureEntry.h" +#include "graphics/TerrainTextureManager.h" #include "graphics/TextureManager.h" +#include "lib/debug.h" +#include "lib/file/vfs/vfs.h" +#include "lib/path.h" +#include "lib/posix/posix_types.h" +#include "lib/status.h" +#include "lib/tex/tex.h" +#include "lib/types.h" +#include "maths/Vector3D.h" +#include "ps/CStr.h" +#include "ps/Filesystem.h" #include "ps/Game.h" #include "ps/World.h" -#include "lib/tex/tex.h" -#include "ps/Filesystem.h" #include "renderer/Renderer.h" -#include "renderer/backend/Sampler.h" -#include "simulation2/Simulation2.h" +#include "scriptinterface/ScriptInterface.h" #include "simulation2/components/ICmpPathfinder.h" -#include "simulation2/components/ICmpTerrain.h" #include "simulation2/helpers/Grid.h" +#include "simulation2/helpers/Pathfinding.h" #include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/Brushes.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/DeltaArray.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include "tools/atlas/GameInterface/SharedTypes.h" +#include "tools/atlas/GameInterface/View.h" -#include "../Brushes.h" -#include "../DeltaArray.h" -#include "../View.h" - +#include +#include +#include +#include #include +#include +#include +#include namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/InputProcessor.cpp b/source/tools/atlas/GameInterface/InputProcessor.cpp index ebb736d468..5fa7a61586 100644 --- a/source/tools/atlas/GameInterface/InputProcessor.cpp +++ b/source/tools/atlas/GameInterface/InputProcessor.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 @@ -19,10 +19,15 @@ #include "InputProcessor.h" -#include "ps/Game.h" #include "graphics/Camera.h" #include "graphics/GameView.h" +#include "maths/Matrix3D.h" #include "maths/Quaternion.h" +#include "maths/Vector3D.h" +#include "ps/Game.h" +#include "tools/atlas/GameInterface/GameLoop.h" + +#include static float g_ViewZoomSmoothness = 0.02f; static float g_ViewRotateScale = 0.02f; diff --git a/source/tools/atlas/GameInterface/InputProcessor.h b/source/tools/atlas/GameInterface/InputProcessor.h index 899b8e8338..ec93da61ab 100644 --- a/source/tools/atlas/GameInterface/InputProcessor.h +++ b/source/tools/atlas/GameInterface/InputProcessor.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_INPUTPROCESSOR #define INCLUDED_INPUTPROCESSOR -#include "GameLoop.h" +struct GameLoopState; class InputProcessor { diff --git a/source/tools/atlas/GameInterface/MessagePasserImpl.h b/source/tools/atlas/GameInterface/MessagePasserImpl.h index fa46fc225c..ae77c4e792 100644 --- a/source/tools/atlas/GameInterface/MessagePasserImpl.h +++ b/source/tools/atlas/GameInterface/MessagePasserImpl.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 @@ -18,7 +18,8 @@ #ifndef INCLUDED_MESSAGEPASSERIMPL #define INCLUDED_MESSAGEPASSERIMPL -#include "MessagePasser.h" +#include "lib/code_annotation.h" +#include "tools/atlas/GameInterface/MessagePasser.h" class MessagePasserImpl : public AtlasMessage::MessagePasser { diff --git a/source/tools/atlas/GameInterface/Misc.cpp b/source/tools/atlas/GameInterface/Misc.cpp index 5dc1e90799..480030340f 100644 --- a/source/tools/atlas/GameInterface/Misc.cpp +++ b/source/tools/atlas/GameInterface/Misc.cpp @@ -19,13 +19,13 @@ // TODO: organise things better, rather than sticking them in Misc -#include "Messages.h" - +#include "graphics/Camera.h" +#include "graphics/GameView.h" +#include "lib/debug.h" #include "maths/Vector2D.h" #include "maths/Vector3D.h" #include "ps/Game.h" -#include "graphics/GameView.h" -#include "graphics/Camera.h" +#include "tools/atlas/GameInterface/SharedTypes.h" CVector3D AtlasMessage::Position::GetWorldSpace(bool floating) const { diff --git a/source/tools/atlas/GameInterface/Register.cpp b/source/tools/atlas/GameInterface/Register.cpp index e256871025..ea953ccd3a 100644 --- a/source/tools/atlas/GameInterface/Register.cpp +++ b/source/tools/atlas/GameInterface/Register.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,23 +17,19 @@ #include "precompiled.h" -#include "Messages.h" -#include "Handlers/MessageHandler.h" -#include "CommandProc.h" +#include "tools/atlas/GameInterface/CommandProc.h" +#include "tools/atlas/GameInterface/Handlers/MessageHandler.h" +#include "tools/atlas/GameInterface/Messages.h" + +#include +#include + +namespace AtlasMessage { struct IMessage; } // We want to include Messages.h again below, with some different definitions, // so cheat and undefine its include-guard #undef INCLUDED_MESSAGES -#include -#include - -#include "SharedTypes.h" -#include "Shareable.h" - -#include -#include - namespace AtlasMessage { diff --git a/source/tools/atlas/GameInterface/SharedMemory.h b/source/tools/atlas/GameInterface/SharedMemory.h index 7aa4a4fb84..928f83ed92 100644 --- a/source/tools/atlas/GameInterface/SharedMemory.h +++ b/source/tools/atlas/GameInterface/SharedMemory.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,6 +18,8 @@ #ifndef INCLUDED_SHAREDMEMORY #define INCLUDED_SHAREDMEMORY +#include + // we want to use placement new without grief // (Duplicated in Shareable.h) #undef new diff --git a/source/tools/atlas/GameInterface/SimState.cpp b/source/tools/atlas/GameInterface/SimState.cpp index a93b1081dd..18dbda0c7f 100644 --- a/source/tools/atlas/GameInterface/SimState.cpp +++ b/source/tools/atlas/GameInterface/SimState.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 @@ -29,7 +29,7 @@ SimState* SimState::Freeze() if (! g_Game->GetSimulation2()->SerializeState(simState->stream)) { delete simState; - return NULL; + return nullptr; } return simState; diff --git a/source/tools/atlas/GameInterface/View.cpp b/source/tools/atlas/GameInterface/View.cpp index 483a371627..54d634de43 100644 --- a/source/tools/atlas/GameInterface/View.cpp +++ b/source/tools/atlas/GameInterface/View.cpp @@ -19,35 +19,36 @@ #include "View.h" -#include "ActorViewer.h" -#include "GameLoop.h" -#include "Messages.h" -#include "SimState.h" - #include "graphics/Canvas2D.h" #include "graphics/CinemaManager.h" +#include "graphics/Color.h" #include "graphics/GameView.h" -#include "graphics/ParticleManager.h" -#include "graphics/UnitManager.h" -#include "lib/timer.h" +#include "lib/debug.h" #include "lib/utf8.h" #include "maths/MathUtil.h" +#include "maths/Matrix3D.h" #include "maths/Vector2D.h" +#include "ps/CStr.h" #include "ps/ConfigDB.h" #include "ps/Game.h" -#include "ps/GameSetup/GameSetup.h" #include "ps/VideoMode.h" -#include "ps/World.h" -#include "renderer/backend/IDevice.h" #include "renderer/DebugRenderer.h" #include "renderer/Renderer.h" #include "renderer/SceneRenderer.h" -#include "simulation2/components/ICmpObstructionManager.h" +#include "renderer/backend/IDevice.h" +#include "simulation2/Simulation2.h" #include "simulation2/components/ICmpParticleManager.h" #include "simulation2/components/ICmpPathfinder.h" -#include "simulation2/Simulation2.h" #include "simulation2/system/Component.h" #include "soundmanager/ISoundManager.h" +#include "tools/atlas/GameInterface/ActorViewer.h" +#include "tools/atlas/GameInterface/GameLoop.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/SimState.h" + +#include +#include +#include extern void (*Atlas_GLSwapBuffers)(void* context); diff --git a/source/tools/atlas/GameInterface/View.h b/source/tools/atlas/GameInterface/View.h index 27fa603960..ec7ba199e1 100644 --- a/source/tools/atlas/GameInterface/View.h +++ b/source/tools/atlas/GameInterface/View.h @@ -18,20 +18,20 @@ #ifndef INCLUDED_VIEW #define INCLUDED_VIEW -#include - #include "graphics/Camera.h" #include "maths/Rect.h" - -#include "Messages.h" +#include "maths/Vector3D.h" #include "simulation2/system/Entity.h" +#include "tools/atlas/GameInterface/SharedTypes.h" -class CCanvas2D; -class CUnit; -class CSimulation2; +#include +#include +#include -class AtlasViewGame; class AtlasViewActor; +class AtlasViewGame; +class CCanvas2D; +class CSimulation2; /** * Superclass for all Atlas game views.