Fix some includes in source/graphics

Make include-what-you-use happy with some files in source/graphics and
fix what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-07-06 20:15:27 +02:00
parent 4324dc1447
commit a2f15bae4e
48 changed files with 370 additions and 144 deletions
+6
View File
@@ -21,6 +21,9 @@
#include "graphics/HFTracer.h" #include "graphics/HFTracer.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "lib/code_generation.h"
#include "lib/debug.h"
#include "lib/posix/posix_types.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Vector2D.h" #include "maths/Vector2D.h"
#include "maths/Vector4D.h" #include "maths/Vector4D.h"
@@ -30,6 +33,9 @@
#include "renderer/SceneRenderer.h" #include "renderer/SceneRenderer.h"
#include "renderer/WaterManager.h" #include "renderer/WaterManager.h"
#include <cmath>
#include <cstddef>
CCamera::CCamera() CCamera::CCamera()
{ {
// Set viewport to something anything should handle, but should be initialised // Set viewport to something anything should handle, but should be initialised
+9 -6
View File
@@ -19,21 +19,19 @@
#include "CameraController.h" #include "CameraController.h"
#include "graphics/HFTracer.h" #include "graphics/Camera.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "i18n/L10n.h" #include "lib/external_libraries/libsdl.h"
#include "lib/input.h" #include "lib/input.h"
#include "lib/timer.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Matrix3D.h" #include "maths/Matrix3D.h"
#include "maths/Quaternion.h" #include "maths/Quaternion.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/ConfigDB.h" #include "ps/ConfigDB.h"
#include "ps/Game.h" #include "ps/Game.h"
#include "ps/Globals.h" #include "ps/Globals.h"
#include "ps/Hotkey.h" #include "ps/Hotkey.h"
#include "ps/Pyrogenesis.h"
#include "ps/TouchInput.h"
#include "ps/World.h" #include "ps/World.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/SceneRenderer.h" #include "renderer/SceneRenderer.h"
@@ -41,7 +39,12 @@
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpPosition.h" #include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpRangeManager.h" #include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/helpers/Los.h" #include "simulation2/system/CmpPtr.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <string>
extern int g_xres, g_yres; extern int g_xres, g_yres;
+16 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -20,16 +20,30 @@
#include "Canvas2D.h" #include "Canvas2D.h"
#include "graphics/Color.h" #include "graphics/Color.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderManager.h" #include "graphics/ShaderManager.h"
#include "graphics/ShaderTechnique.h"
#include "graphics/ShaderTechniquePtr.h"
#include "graphics/TextRenderer.h" #include "graphics/TextRenderer.h"
#include "graphics/TextureManager.h" #include "graphics/TextureManager.h"
#include "lib/debug.h"
#include "lib/types.h"
#include "maths/Matrix3D.h"
#include "maths/Rect.h" #include "maths/Rect.h"
#include "maths/Vector2D.h" #include "maths/Vector2D.h"
#include "ps/containers/StaticVector.h" #include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/containers/Span.h"
#include "ps/containers/StaticVector.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <algorithm>
#include <array> #include <array>
#include <cmath>
#include <cstddef>
namespace namespace
{ {
+13 -18
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -17,33 +17,28 @@
#include "precompiled.h" #include "precompiled.h"
#include "graphics/CinemaManager.h" #include "CinemaManager.h"
#include "graphics/Camera.h"
#include "graphics/Color.h" #include "graphics/Color.h"
#include "graphics/GameView.h" #include "graphics/GameView.h"
#include "maths/MathUtil.h" #include "graphics/Terrain.h"
#include "maths/Quaternion.h" #include "maths/FixedVector3D.h"
#include "maths/NUSpline.h"
#include "maths/Vector3D.h" #include "maths/Vector3D.h"
#include "maths/Vector4D.h"
#include "ps/CLogger.h"
#include "ps/ConfigDB.h"
#include "ps/CStr.h" #include "ps/CStr.h"
#include "ps/Game.h" #include "ps/Game.h"
#include "ps/GameSetup/Config.h"
#include "ps/Hotkey.h"
#include "ps/World.h" #include "ps/World.h"
#include "renderer/DebugRenderer.h" #include "renderer/DebugRenderer.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "simulation2/components/ICmpCinemaManager.h"
#include "simulation2/components/ICmpOverlayRenderer.h"
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/components/ICmpSelectable.h"
#include "simulation2/components/ICmpTerritoryManager.h"
#include "simulation2/helpers/CinemaPath.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/system/ComponentManager.h"
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpCinemaManager.h"
#include "simulation2/helpers/CinemaPath.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/SimContext.h"
#include <map>
#include <utility>
#include <vector>
CCinemaManager::CCinemaManager() CCinemaManager::CCinemaManager()
: m_DrawPaths(false) : m_DrawPaths(false)
+14 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,15 +19,26 @@
#include "ColladaManager.h" #include "ColladaManager.h"
#include "graphics/ModelDef.h" #include "lib/debug.h"
#include "lib/file/file_system.h"
#include "lib/file/io/write_buffer.h"
#include "lib/file/vfs/vfs_util.h"
#include "lib/path.h"
#include "lib/status.h"
#include "lib/types.h"
#include "maths/MD5.h" #include "maths/MD5.h"
#include "ps/CacheLoader.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStr.h" #include "ps/CStr.h"
#include "ps/CacheLoader.h"
#include "ps/DllLoader.h" #include "ps/DllLoader.h"
#include "ps/Errors.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include <algorithm>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <cstddef>
#include <string>
#include <vector>
namespace Collada namespace Collada
{ {
+5 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -17,14 +17,17 @@
#include "precompiled.h" #include "precompiled.h"
#include "graphics/Color.h" #include "Color.h"
#include "graphics/SColor.h" #include "graphics/SColor.h"
#include "lib/sysdep/arch/x86_x64/simd.h" #include "lib/sysdep/arch/x86_x64/simd.h"
#include "lib/sysdep/compiler.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStr.h" #include "ps/CStr.h"
#include <sstream>
#if COMPILER_HAS_SSE #if COMPILER_HAS_SSE
#include <xmmintrin.h> #include <xmmintrin.h>
#endif #endif
+9
View File
@@ -19,10 +19,19 @@
#include "Decal.h" #include "Decal.h"
#include "graphics/RenderableObject.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Matrix3D.h"
#include "maths/Vector3D.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include <algorithm>
#include <cmath>
#include <memory>
std::unique_ptr<CModelAbstract> CModelDecal::Clone() const std::unique_ptr<CModelAbstract> CModelDecal::Clone() const
{ {
return std::make_unique<CModelDecal>(m_Terrain, m_Decal); return std::make_unique<CModelDecal>(m_Terrain, m_Decal);
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,8 +18,11 @@
#ifndef INCLUDED_RMS_ENTITY #ifndef INCLUDED_RMS_ENTITY
#define INCLUDED_RMS_ENTITY #define INCLUDED_RMS_ENTITY
#include "lib/code_annotation.h"
#include "maths/FixedVector3D.h" #include "maths/FixedVector3D.h"
#include <string>
// Struct for parsing random map data // Struct for parsing random map data
struct Entity struct Entity
{ {
-2
View File
@@ -26,9 +26,7 @@
#include "ps/Profiler2.h" #include "ps/Profiler2.h"
#include "ps/containers/Span.h" #include "ps/containers/Span.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/backend/Backend.h"
#include "renderer/backend/IDevice.h" #include "renderer/backend/IDevice.h"
#include "renderer/backend/vulkan/Device.h"
#include "renderer/backend/IDeviceCommandContext.h" #include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/ITexture.h" #include "renderer/backend/ITexture.h"
#include "renderer/backend/Sampler.h" #include "renderer/backend/Sampler.h"
+16 -4
View File
@@ -20,16 +20,28 @@
#include "FontManager.h" #include "FontManager.h"
#include "graphics/Font.h" #include "graphics/Font.h"
#include "graphics/TextureManager.h"
#include "i18n/L10n.h" #include "i18n/L10n.h"
#include "lib/file/vfs/vfs_path.h"
#include "lib/posix/posix.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/ConfigDB.h" #include "ps/CStr.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/ConfigDB.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "renderer/Renderer.h"
#include <string> #include <algorithm>
#include <cmath>
#include <fmt/format.h>
#include <freetype/fttypes.h>
#include <locale>
#include <map>
#include <regex> #include <regex>
#include <stdexcept>
#include <string>
#include <string_view>
#include <unicode/locid.h>
#include <utility>
#include <vector>
namespace { namespace {
struct FontSpec { struct FontSpec {
+2
View File
@@ -18,11 +18,13 @@
#ifndef INCLUDED_FONTMANAGER #ifndef INCLUDED_FONTMANAGER
#define INCLUDED_FONTMANAGER #define INCLUDED_FONTMANAGER
#include "lib/code_annotation.h"
#include "ps/CStrIntern.h" #include "ps/CStrIntern.h"
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include <memory>
#include <unordered_map> #include <unordered_map>
class CFont; class CFont;
+2 -2
View File
@@ -16,12 +16,12 @@
*/ */
#include "precompiled.h" #include "precompiled.h"
#include "FontMetrics.h" #include "FontMetrics.h"
#include "graphics/Font.h" #include "graphics/Font.h"
#include "graphics/FontManager.h" #include "graphics/FontManager.h"
#include "ps/Filesystem.h" #include "ps/CStrIntern.h"
#include "ps/CLogger.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
CFontMetrics::CFontMetrics(CStrIntern font) CFontMetrics::CFontMetrics(CStrIntern font)
+2
View File
@@ -18,6 +18,8 @@
#ifndef INCLUDED_FONTMETRICS #ifndef INCLUDED_FONTMETRICS
#define INCLUDED_FONTMETRICS #define INCLUDED_FONTMETRICS
#include <memory>
class CFont; class CFont;
class CStrIntern; class CStrIntern;
+12 -15
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,48 +19,45 @@
#include "GameView.h" #include "GameView.h"
#include "graphics/Camera.h"
#include "graphics/CameraController.h" #include "graphics/CameraController.h"
#include "graphics/CinemaManager.h" #include "graphics/CinemaManager.h"
#include "graphics/ColladaManager.h" #include "graphics/ColladaManager.h"
#include "graphics/HFTracer.h" #include "graphics/ICameraController.h"
#include "graphics/LOSTexture.h" #include "graphics/LOSTexture.h"
#include "graphics/LightEnv.h" #include "graphics/MeshManager.h"
#include "graphics/MiniMapTexture.h" #include "graphics/MiniMapTexture.h"
#include "graphics/Model.h"
#include "graphics/ObjectManager.h" #include "graphics/ObjectManager.h"
#include "graphics/Patch.h" #include "graphics/Patch.h"
#include "graphics/SkeletonAnimManager.h" #include "graphics/SkeletonAnimManager.h"
#include "graphics/SmoothedValue.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "graphics/TerrainTextureManager.h" #include "graphics/TerrainTextureManager.h"
#include "graphics/TerritoryTexture.h" #include "graphics/TerritoryTexture.h"
#include "graphics/Unit.h" #include "lib/external_libraries/libsdl.h"
#include "graphics/UnitManager.h"
#include "lib/input.h" #include "lib/input.h"
#include "lib/timer.h" #include "lib/posix/posix_types.h"
#include "lobby/IXmppClient.h" #include "lobby/IXmppClient.h"
#include "maths/BoundingBoxAligned.h" #include "maths/BoundingBoxAligned.h"
#include "maths/MathUtil.h" #include "maths/Frustum.h"
#include "maths/Matrix3D.h" #include "maths/Vector3D.h"
#include "maths/Quaternion.h"
#include "ps/ConfigDB.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/Game.h" #include "ps/Game.h"
#include "ps/Globals.h" #include "ps/Globals.h"
#include "ps/Hotkey.h" #include "ps/Hotkey.h"
#include "ps/Loader.h" #include "ps/Loader.h"
#include "ps/Profile.h" #include "ps/Profile.h"
#include "ps/Pyrogenesis.h"
#include "ps/TouchInput.h" #include "ps/TouchInput.h"
#include "ps/World.h" #include "ps/World.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/SceneRenderer.h" #include "renderer/SceneRenderer.h"
#include "renderer/WaterManager.h" #include "renderer/WaterManager.h"
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpRangeManager.h"
#include <memory> #include <memory>
#include <string>
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IDeviceCommandContext; }
class CGameViewImpl class CGameViewImpl
{ {
+5 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,11 +18,11 @@
#ifndef INCLUDED_GAMEVIEW #ifndef INCLUDED_GAMEVIEW
#define INCLUDED_GAMEVIEW #define INCLUDED_GAMEVIEW
#include "renderer/backend/IDeviceCommandContext.h" #include "lib/code_annotation.h"
#include "renderer/Scene.h"
#include "simulation2/system/Entity.h"
#include "lib/input.h" // InReaction - can't forward-declare enum #include "lib/input.h" // InReaction - can't forward-declare enum
#include "renderer/Scene.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "simulation2/system/Entity.h"
class CCamera; class CCamera;
class CCinemaManager; class CCinemaManager;
+3 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -25,11 +25,13 @@
#include "graphics/Patch.h" #include "graphics/Patch.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "lib/debug.h"
#include "maths/BoundingBoxAligned.h" #include "maths/BoundingBoxAligned.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Vector3D.h" #include "maths/Vector3D.h"
#include <cfloat> #include <cfloat>
#include <cmath>
// To cope well with points that are slightly off the edge of the map, // To cope well with points that are slightly off the edge of the map,
// we act as if there's an N-tile margin around the edges of the heightfield. // we act as if there's an N-tile margin around the edges of the heightfield.
+5 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -22,6 +22,10 @@
#ifndef INCLUDED_HFTRACER #ifndef INCLUDED_HFTRACER
#define INCLUDED_HFTRACER #define INCLUDED_HFTRACER
#include "lib/types.h"
#include <cstddef>
class CPatch; class CPatch;
class CVector3D; class CVector3D;
class CTerrain; class CTerrain;
+11 -3
View File
@@ -19,15 +19,23 @@
#include "HeightMipmap.h" #include "HeightMipmap.h"
#include "lib/bits.h" #include "lib/alignment.h"
#include "lib/timer.h" #include "lib/allocators/dynarray.h"
#include "lib/allocators/shared_ptr.h" #include "lib/allocators/shared_ptr.h"
#include "lib/bits.h"
#include "lib/debug.h"
#include "lib/file/vfs/vfs.h"
#include "lib/file/vfs/vfs_path.h"
#include "lib/posix/posix_types.h"
#include "lib/status.h"
#include "lib/tex/tex.h" #include "lib/tex/tex.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include <cmath> #include <cmath>
#include <utility> #include <cstring>
#include <memory>
#include <tuple>
CHeightMipmap::CHeightMipmap() CHeightMipmap::CHeightMipmap()
{ {
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -24,6 +24,9 @@
#ifndef INCLUDED_HEIGHTMIPMAP #ifndef INCLUDED_HEIGHTMIPMAP
#define INCLUDED_HEIGHTMIPMAP #define INCLUDED_HEIGHTMIPMAP
#include "lib/code_annotation.h"
#include "lib/types.h"
#include <vector> #include <vector>
class Path; class Path;
+3 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,6 +19,8 @@
#include "ICameraController.h" #include "ICameraController.h"
class CCamera;
ICameraController::ICameraController(CCamera& camera) ICameraController::ICameraController(CCamera& camera)
: m_Camera(camera) : m_Camera(camera)
{ {
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,9 +19,9 @@
#define INCLUDED_ICAMERACONTROLLER #define INCLUDED_ICAMERACONTROLLER
#include "graphics/Camera.h" #include "graphics/Camera.h"
#include "simulation2/system/Entity.h" #include "lib/code_annotation.h"
#include "lib/input.h" // InReaction - can't forward-declare enum #include "lib/input.h" // InReaction - can't forward-declare enum
#include "simulation2/system/Entity.h"
/** /**
* @interface ICameraController defines a camera controller interface. The camera object * @interface ICameraController defines a camera controller interface. The camera object
+20 -7
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,25 +19,38 @@
#include "LOSTexture.h" #include "LOSTexture.h"
#include "graphics/Color.h"
#include "graphics/ShaderManager.h" #include "graphics/ShaderManager.h"
#include "graphics/ShaderTechnique.h"
#include "lib/bits.h" #include "lib/bits.h"
#include "lib/config2.h" #include "lib/debug.h"
#include "lib/timer.h" #include "lib/timer.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/Game.h"
#include "ps/Profile.h" #include "ps/Profile.h"
#include "renderer/backend/Backend.h" #include "ps/containers/Span.h"
#include "renderer/backend/IDevice.h"
#include "renderer/backend/PipelineState.h"
#include "renderer/backend/Sampler.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/RenderingOptions.h" #include "renderer/RenderingOptions.h"
#include "renderer/TimeManager.h" #include "renderer/TimeManager.h"
#include "renderer/backend/Backend.h"
#include "renderer/backend/IDevice.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IFramebuffer.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/backend/ITexture.h"
#include "renderer/backend/Sampler.h"
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpRangeManager.h" #include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/helpers/Los.h" #include "simulation2/helpers/Los.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Entity.h"
#include "simulation2/system/SimContext.h"
#include <array>
#include <cstring>
#include <iterator>
/* /*
+3 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -17,10 +17,11 @@
#include "precompiled.h" #include "precompiled.h"
#include "graphics/LightEnv.h" #include "LightEnv.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include <cmath>
CLightEnv::CLightEnv() CLightEnv::CLightEnv()
: m_Elevation(DEGTORAD(45)), : m_Elevation(DEGTORAD(45)),
+29 -10
View File
@@ -17,21 +17,29 @@
#include "precompiled.h" #include "precompiled.h"
#include "Camera.h"
#include "CinemaManager.h"
#include "GameView.h"
#include "LightEnv.h"
#include "MapReader.h"
#include "MapWriter.h" #include "MapWriter.h"
#include "Patch.h"
#include "Terrain.h"
#include "TerrainTextureEntry.h"
#include "TerrainTextureManager.h"
#include "graphics/Camera.h"
#include "graphics/Color.h"
#include "graphics/HeightMipmap.h"
#include "graphics/LightEnv.h"
#include "graphics/MapIO.h"
#include "graphics/MiniPatch.h"
#include "graphics/Patch.h"
#include "graphics/Terrain.h"
#include "graphics/TerrainTextureEntry.h"
#include "lib/debug.h"
#include "lib/path.h"
#include "lib/posix/posix_types.h"
#include "lib/types.h"
#include "maths/Fixed.h"
#include "maths/FixedVector3D.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Matrix3D.h"
#include "maths/NUSpline.h" #include "maths/NUSpline.h"
#include "maths/Vector3D.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/Loader.h" #include "ps/FileIo.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/XML/XMLWriter.h" #include "ps/XML/XMLWriter.h"
#include "renderer/PostprocManager.h" #include "renderer/PostprocManager.h"
@@ -47,6 +55,17 @@
#include "simulation2/components/ICmpTurretHolder.h" #include "simulation2/components/ICmpTurretHolder.h"
#include "simulation2/components/ICmpVisual.h" #include "simulation2/components/ICmpVisual.h"
#include "simulation2/components/ICmpWaterManager.h" #include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/helpers/CinemaPath.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Components.h"
#include "simulation2/system/Entity.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <map>
#include <string>
#include <utility>
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// CMapWriter constructor: nothing to do at the minute // CMapWriter constructor: nothing to do at the minute
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,8 +18,11 @@
#include "precompiled.h" #include "precompiled.h"
#include "Material.h" #include "Material.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
class CVector4D;
CMaterial::CMaterial() : CMaterial::CMaterial() :
m_AlphaBlending(false) m_AlphaBlending(false)
{ {
+10 -2
View File
@@ -19,17 +19,25 @@
#include "MaterialManager.h" #include "MaterialManager.h"
#include "graphics/Material.h"
#include "graphics/PreprocessorWrapper.h" #include "graphics/PreprocessorWrapper.h"
#include "lib/path.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Vector4D.h" #include "maths/Vector4D.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/ConfigDB.h" #include "ps/CStr.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/ConfigDB.h"
#include "ps/Errors.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/XMB/XMBData.h"
#include "ps/XMB/XMBStorage.h"
#include "ps/XML/Xeromyces.h" #include "ps/XML/Xeromyces.h"
#include "renderer/RenderingOptions.h"
#include <sstream> #include <sstream>
#include <string>
#include <utility>
CMaterialManager::CMaterialManager() : CMaterialManager::CMaterialManager() :
qualityLevel{Clamp(g_ConfigDB.Get("materialmgr.quality", 5.0f), 0.0f, 10.0f)} qualityLevel{Clamp(g_ConfigDB.Get("materialmgr.quality", 5.0f), 0.0f, 10.0f)}
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -25,6 +25,9 @@
#include "ps/FileIo.h" // to get access to its CError #include "ps/FileIo.h" // to get access to its CError
#include "ps/Profile.h" #include "ps/Profile.h"
#include <string>
#include <utility>
// TODO: should this cache models while they're not actively in the game? // TODO: should this cache models while they're not actively in the game?
// (Currently they'll probably be deleted when the reference count drops to 0, // (Currently they'll probably be deleted when the reference count drops to 0,
// even if it's quite possible that they'll get reloaded very soon.) // even if it's quite possible that they'll get reloaded very soon.)
+28 -8
View File
@@ -19,44 +19,64 @@
#include "MiniMapTexture.h" #include "MiniMapTexture.h"
#include "graphics/GameView.h"
#include "graphics/LOSTexture.h" #include "graphics/LOSTexture.h"
#include "graphics/MiniPatch.h" #include "graphics/MiniPatch.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderManager.h" #include "graphics/ShaderManager.h"
#include "graphics/ShaderProgramPtr.h" #include "graphics/ShaderTechnique.h"
#include "graphics/Terrain.h" #include "graphics/Terrain.h"
#include "graphics/TerrainTextureEntry.h" #include "graphics/TerrainTextureEntry.h"
#include "graphics/TerrainTextureManager.h"
#include "graphics/TerritoryTexture.h" #include "graphics/TerritoryTexture.h"
#include "graphics/TextureManager.h" #include "graphics/TextureManager.h"
#include "lib/bits.h" #include "lib/bits.h"
#include "lib/code_generation.h" #include "lib/code_generation.h"
#include "lib/debug.h"
#include "lib/hash.h" #include "lib/hash.h"
#include "lib/path.h"
#include "lib/timer.h" #include "lib/timer.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Matrix3D.h"
#include "maths/Vector2D.h" #include "maths/Vector2D.h"
#include "ps/ConfigDB.h" #include "maths/Vector3D.h"
#include "ps/CLogger.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/ConfigDB.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/Game.h" #include "ps/Game.h"
#include "ps/Profile.h" #include "ps/Profile.h"
#include "ps/VideoMode.h"
#include "ps/World.h" #include "ps/World.h"
#include "ps/XML/Xeromyces.h" #include "ps/XML/Xeromyces.h"
#include "renderer/backend/IDevice.h" #include "ps/containers/Span.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/RenderingOptions.h"
#include "renderer/SceneRenderer.h" #include "renderer/SceneRenderer.h"
#include "renderer/WaterManager.h" #include "renderer/WaterManager.h"
#include "scriptinterface/Object.h" #include "renderer/backend/Backend.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDevice.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IFramebuffer.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/backend/ITexture.h"
#include "renderer/backend/PipelineState.h"
#include "renderer/backend/Sampler.h"
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpMinimap.h" #include "simulation2/components/ICmpMinimap.h"
#include "simulation2/components/ICmpRangeManager.h" #include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/helpers/Position.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Components.h"
#include "simulation2/system/Entity.h"
#include "simulation2/system/ParamNode.h" #include "simulation2/system/ParamNode.h"
#include "simulation2/system/SimContext.h"
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <cmath> #include <cmath>
#include <cstdint>
#include <iterator>
#include <utility>
namespace namespace
{ {
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -26,6 +26,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Constructor // Constructor
CMiniPatch::CMiniPatch() : CMiniPatch::CMiniPatch() :
Tex(NULL), Priority(0) Tex(nullptr), Priority(0)
{ {
} }
+11 -5
View File
@@ -22,20 +22,26 @@
#include "graphics/Decal.h" #include "graphics/Decal.h"
#include "graphics/MeshManager.h" #include "graphics/MeshManager.h"
#include "graphics/ModelDef.h" #include "graphics/ModelDef.h"
#include "graphics/ObjectEntry.h" #include "graphics/RenderableObject.h"
#include "graphics/SkeletonAnim.h" #include "graphics/SkeletonAnim.h"
#include "graphics/SkeletonAnimDef.h" #include "graphics/SkeletonAnimDef.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/Quaternion.h"
#include "lib/sysdep/rtl.h" #include "lib/sysdep/rtl.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/Matrix3D.h"
#include "maths/Vector3D.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/Profile.h" #include "ps/Profiler2.h"
#include "renderer/RenderingOptions.h" #include "renderer/RenderingOptions.h"
#include "simulation2/components/ICmpTerrain.h" #include "simulation2/components/ICmpTerrain.h"
#include "simulation2/components/ICmpWaterManager.h" #include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/Simulation2.h" #include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Entity.h"
#include <algorithm>
#include <utility>
CModel::CModel(const CSimulation2& simulation, const CMaterial& material, const CModelDefPtr& modeldef) CModel::CModel(const CSimulation2& simulation, const CMaterial& material, const CModelDefPtr& modeldef)
: m_Simulation{simulation}, m_Material{material}, m_pModelDef{modeldef} : m_Simulation{simulation}, m_Material{material}, m_pModelDef{modeldef}
+5 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,8 +19,12 @@
#include "ModelAbstract.h" #include "ModelAbstract.h"
#include "lib/debug.h"
#include "maths/Vector3D.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include <algorithm>
const CBoundingBoxOriented& CModelAbstract::GetSelectionBox() const CBoundingBoxOriented& CModelAbstract::GetSelectionBox()
{ {
if (!m_SelectionBoxValid) if (!m_SelectionBoxValid)
+11 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -20,9 +20,18 @@
#include "ModelDef.h" #include "ModelDef.h"
#include "graphics/SkeletonAnimDef.h" #include "graphics/SkeletonAnimDef.h"
#include "lib/debug.h"
#include "lib/sysdep/arch/x86_x64/simd.h" #include "lib/sysdep/arch/x86_x64/simd.h"
#include "maths/Vector4D.h" #include "lib/sysdep/compiler.h"
#include "maths/Vector2D.h"
#include "ps/FileIo.h" #include "ps/FileIo.h"
#include "ps/containers/Span.h"
#include "renderer/VertexArray.h"
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#if COMPILER_HAS_SSE #if COMPILER_HAS_SSE
# include <xmmintrin.h> # include <xmmintrin.h>
+12 -2
View File
@@ -21,15 +21,25 @@
#include "graphics/ObjectBase.h" #include "graphics/ObjectBase.h"
#include "graphics/ObjectEntry.h" #include "graphics/ObjectEntry.h"
#include "lib/debug.h"
#include "lib/path.h"
#include "lib/utf8.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/ConfigDB.h" #include "ps/ConfigDB.h"
#include "ps/Game.h"
#include "ps/Profile.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/Profiler2.h"
#include "ps/XMB/XMBStorage.h"
#include "ps/XML/Xeromyces.h" #include "ps/XML/Xeromyces.h"
#include "simulation2/Simulation2.h" #include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpTerrain.h" #include "simulation2/components/ICmpTerrain.h"
#include "simulation2/components/ICmpVisual.h" #include "simulation2/components/ICmpVisual.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Components.h"
#include "simulation2/system/Entity.h"
#include <cstddef>
#include <functional>
#include <string>
bool CObjectManager::ObjectKey::operator< (const CObjectManager::ObjectKey& a) const bool CObjectManager::ObjectKey::operator< (const CObjectManager::ObjectKey& a) const
{ {
+3 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -20,9 +20,10 @@
#include "Overlay.h" #include "Overlay.h"
#include "graphics/TextureManager.h" #include "graphics/TextureManager.h"
#include "ps/CStr.h" #include "lib/debug.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/TexturedLineRData.h" #include "renderer/TexturedLineRData.h"
#include "renderer/backend/Sampler.h"
SOverlayTexturedLine::LineCapType SOverlayTexturedLine::StrToLineCapType(const std::wstring& str) SOverlayTexturedLine::LineCapType SOverlayTexturedLine::StrToLineCapType(const std::wstring& str)
{ {
+17 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -19,15 +19,29 @@
#include "ParticleEmitter.h" #include "ParticleEmitter.h"
#include "graphics/LightEnv.h"
#include "graphics/LOSTexture.h" #include "graphics/LOSTexture.h"
#include "graphics/LightEnv.h"
#include "graphics/ParticleEmitterType.h" #include "graphics/ParticleEmitterType.h"
#include "graphics/ParticleManager.h" #include "graphics/ParticleManager.h"
#include "graphics/ShaderProgram.h" #include "graphics/RenderableObject.h"
#include "graphics/TextureManager.h" #include "graphics/TextureManager.h"
#include "lib/debug.h"
#include "lib/types.h"
#include "maths/Matrix3D.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h" #include "ps/CStrInternStatic.h"
#include "ps/containers/Span.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/Scene.h"
#include "renderer/SceneRenderer.h" #include "renderer/SceneRenderer.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <array>
#include <cmath>
#include <cstdint>
CParticleEmitter::CParticleEmitter(const CParticleEmitterTypePtr& type) : CParticleEmitter::CParticleEmitter(const CParticleEmitterTypePtr& type) :
m_Type(type), m_Active(true), m_NextParticleIdx(0), m_EmissionRoundingError(0.f), m_Type(type), m_Active(true), m_NextParticleIdx(0), m_EmissionRoundingError(0.f),
+14
View File
@@ -22,14 +22,28 @@
#include "graphics/Color.h" #include "graphics/Color.h"
#include "graphics/ParticleEmitter.h" #include "graphics/ParticleEmitter.h"
#include "graphics/ParticleManager.h" #include "graphics/ParticleManager.h"
#include "graphics/SColor.h"
#include "graphics/TextureManager.h" #include "graphics/TextureManager.h"
#include "lib/debug.h"
#include "maths/MathUtil.h" #include "maths/MathUtil.h"
#include "maths/Matrix3D.h"
#include "maths/Quaternion.h"
#include "maths/Vector3D.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/Errors.h"
#include "ps/Filesystem.h" #include "ps/Filesystem.h"
#include "ps/XMB/XMBData.h"
#include "ps/XMB/XMBStorage.h"
#include "ps/XML/Xeromyces.h" #include "ps/XML/Xeromyces.h"
#include "renderer/Renderer.h" #include "renderer/Renderer.h"
#include "renderer/backend/Sampler.h"
#include <algorithm>
#include <boost/random/uniform_real_distribution.hpp> #include <boost/random/uniform_real_distribution.hpp>
#include <cmath>
#include <cstddef>
#include <map>
/** /**
+6
View File
@@ -23,7 +23,13 @@
#include "ps/Profile.h" #include "ps/Profile.h"
#include "renderer/Scene.h" #include "renderer/Scene.h"
#include <cstddef>
#include <memory>
#include <unordered_map> #include <unordered_map>
#include <utility>
#include <vector>
class CFrustum;
static Status ReloadChangedFileCB(void* param, const VfsPath& path) static Status ReloadChangedFileCB(void* param, const VfsPath& path)
{ {
+7 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -22,8 +22,13 @@
#include "precompiled.h" #include "precompiled.h"
#include "Patch.h" #include "Patch.h"
#include "Terrain.h"
#include "graphics/RenderableObject.h"
#include "graphics/Terrain.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/Vector3D.h"
#include <algorithm>
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// CPatch constructor // CPatch constructor
+7 -1
View File
@@ -19,13 +19,19 @@
#include "ShaderDefines.h" #include "ShaderDefines.h"
#include "graphics/ShaderProgram.h" #include "lib/debug.h"
#include "lib/hash.h" #include "lib/hash.h"
#include "maths/Vector4D.h" #include "maths/Vector4D.h"
#include "ps/CStr.h"
#include "ps/ThreadUtil.h" #include "ps/ThreadUtil.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <algorithm> #include <algorithm>
#include <iterator>
#include <sstream> #include <sstream>
#include <string>
#include <string_view>
namespace std namespace std
{ {
+3 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -21,6 +21,8 @@
#include "renderer/backend/IDevice.h" #include "renderer/backend/IDevice.h"
#include <utility>
CShaderProgram::CShaderProgram( CShaderProgram::CShaderProgram(
Renderer::Backend::IDevice* device, const CStr& name, const CShaderDefines& defines) Renderer::Backend::IDevice* device, const CStr& name, const CShaderDefines& defines)
: m_Device(device), m_Name(name), m_Defines(defines) : m_Device(device), m_Name(name), m_Defines(defines)
+3 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,6 +18,8 @@
#ifndef INCLUDED_SHADERPROGRAMPTR #ifndef INCLUDED_SHADERPROGRAMPTR
#define INCLUDED_SHADERPROGRAMPTR #define INCLUDED_SHADERPROGRAMPTR
#include <memory>
/* /*
* Forward declaration, to reduce the number of header files that have to pull * Forward declaration, to reduce the number of header files that have to pull
* in the whole of ShaderProgram.h * in the whole of ShaderProgram.h
+4 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -20,10 +20,12 @@
#include "ShaderTechnique.h" #include "ShaderTechnique.h"
#include "graphics/ShaderProgram.h" #include "graphics/ShaderProgram.h"
#include "renderer/backend/IDevice.h" #include "lib/debug.h"
#include <utility> #include <utility>
namespace Renderer::Backend { class IShaderProgram; }
CShaderPass::CShaderPass( CShaderPass::CShaderPass(
std::unique_ptr<Renderer::Backend::IGraphicsPipelineState> pipelineState, std::unique_ptr<Renderer::Backend::IGraphicsPipelineState> pipelineState,
const CShaderProgramPtr& shader) const CShaderProgramPtr& shader)
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2016 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -23,6 +23,7 @@
#define INCLUDED_SKELETONANIM #define INCLUDED_SKELETONANIM
#include "maths/BoundingBoxAligned.h" #include "maths/BoundingBoxAligned.h"
#include "ps/CStr.h"
class CSkeletonAnimDef; class CSkeletonAnimDef;
+5 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,13 +18,13 @@
#ifndef INCLUDED_TERRITORYBOUNDARY #ifndef INCLUDED_TERRITORYBOUNDARY
#define INCLUDED_TERRITORYBOUNDARY #define INCLUDED_TERRITORYBOUNDARY
#include <vector> #include "lib/types.h"
#include "maths/Vector2D.h" #include "maths/Vector2D.h"
#include "simulation2/helpers/Player.h" #include "simulation2/helpers/Player.h"
template<typename T> #include <vector>
class Grid;
template<typename T> class Grid;
/** /**
* Describes an outline of a territory, where the latter are understood to mean the largest sets of mutually connected tiles * Describes an outline of a territory, where the latter are understood to mean the largest sets of mutually connected tiles
+6 -4
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -15,13 +15,15 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "lib/code_annotation.h"
#include "maths/Matrix3D.h" #include "maths/Matrix3D.h"
#include "renderer/backend/ITexture.h"
#include "renderer/backend/IDeviceCommandContext.h" #include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/ITexture.h"
#include <memory>
class CSimulation2; class CSimulation2;
template<typename T> template<typename T> class Grid;
class Grid;
/** /**
* Maintains the territory boundary texture, used for * Maintains the territory boundary texture, used for
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,6 +18,7 @@
#ifndef INCLUDED_UNIT #ifndef INCLUDED_UNIT
#define INCLUDED_UNIT #define INCLUDED_UNIT
#include "lib/code_annotation.h"
#include "ps/CStr.h" #include "ps/CStr.h"
#include "simulation2/system/Entity.h" // entity_id_t #include "simulation2/system/Entity.h" // entity_id_t
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,6 +18,7 @@
#ifndef INCLUDED_UNITANIMATION #ifndef INCLUDED_UNITANIMATION
#define INCLUDED_UNITANIMATION #define INCLUDED_UNITANIMATION
#include "lib/code_annotation.h"
#include "ps/CStr.h" #include "ps/CStr.h"
#include "simulation2/system/Entity.h" #include "simulation2/system/Entity.h"
+6 -7
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games. /* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@@ -17,15 +17,14 @@
#include "lib/self_test.h" #include "lib/self_test.h"
#include "lib/file/file_system.h"
#include "lib/file/vfs/vfs.h"
#include "lib/file/io/io.h"
#include "lib/allocators/shared_ptr.h"
#include "graphics/ColladaManager.h" #include "graphics/ColladaManager.h"
#include "graphics/MeshManager.h" #include "graphics/MeshManager.h"
#include "graphics/ModelDef.h" #include "graphics/ModelDef.h"
#include "lib/allocators/shared_ptr.h"
#include "lib/file/file_system.h"
#include "lib/file/io/io.h"
#include "lib/file/vfs/vfs.h"
#include "lib/secure_crt.h"
#include "ps/CLogger.h" #include "ps/CLogger.h"
#include "ps/XML/RelaxNG.h" #include "ps/XML/RelaxNG.h"