Index: ps/trunk/source/graphics/Decal.cpp =================================================================== --- ps/trunk/source/graphics/Decal.cpp +++ ps/trunk/source/graphics/Decal.cpp @@ -21,6 +21,7 @@ #include "graphics/Terrain.h" #include "maths/MathUtil.h" +#include "ps/CStrInternStatic.h" CModelAbstract* CModelDecal::Clone() const { Index: ps/trunk/source/graphics/FontManager.cpp =================================================================== --- ps/trunk/source/graphics/FontManager.cpp +++ ps/trunk/source/graphics/FontManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,6 +23,7 @@ #include "graphics/TextureManager.h" #include "ps/CLogger.h" #include "ps/CStr.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "renderer/Renderer.h" Index: ps/trunk/source/graphics/LOSTexture.cpp =================================================================== --- ps/trunk/source/graphics/LOSTexture.cpp +++ ps/trunk/source/graphics/LOSTexture.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,6 +23,7 @@ #include "lib/bits.h" #include "lib/config2.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/Profile.h" #include "renderer/Renderer.h" Index: ps/trunk/source/graphics/Material.cpp =================================================================== --- ps/trunk/source/graphics/Material.cpp +++ ps/trunk/source/graphics/Material.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2021 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 @@ #include "precompiled.h" #include "Material.h" +#include "ps/CStrInternStatic.h" static CColor BrokenColor(0.3f, 0.3f, 0.3f, 1.0f); Index: ps/trunk/source/graphics/MaterialManager.cpp =================================================================== --- ps/trunk/source/graphics/MaterialManager.cpp +++ ps/trunk/source/graphics/MaterialManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include "maths/Vector4D.h" #include "ps/CLogger.h" #include "ps/ConfigDB.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/XML/Xeromyces.h" #include "renderer/RenderingOptions.h" Index: ps/trunk/source/graphics/Model.cpp =================================================================== --- ps/trunk/source/graphics/Model.cpp +++ ps/trunk/source/graphics/Model.cpp @@ -35,8 +35,9 @@ #include "lib/res/graphics/ogl_tex.h" #include "lib/res/h_mgr.h" #include "lib/sysdep/rtl.h" -#include "ps/Profile.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" +#include "ps/Profile.h" #include "renderer/RenderingOptions.h" #include "simulation2/Simulation2.h" #include "simulation2/components/ICmpTerrain.h" Index: ps/trunk/source/graphics/ParticleEmitter.cpp =================================================================== --- ps/trunk/source/graphics/ParticleEmitter.cpp +++ ps/trunk/source/graphics/ParticleEmitter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include "graphics/ParticleManager.h" #include "graphics/ShaderProgram.h" #include "graphics/TextureManager.h" +#include "ps/CStrInternStatic.h" #include "renderer/Renderer.h" Index: ps/trunk/source/graphics/TextRenderer.cpp =================================================================== --- ps/trunk/source/graphics/TextRenderer.cpp +++ ps/trunk/source/graphics/TextRenderer.cpp @@ -24,6 +24,7 @@ #include "graphics/ShaderProgram.h" #include "lib/ogl.h" #include "ps/CStrIntern.h" +#include "ps/CStrInternStatic.h" #include "ps/GameSetup/Config.h" #include "renderer/Renderer.h" Index: ps/trunk/source/gui/CGUIText.cpp =================================================================== --- ps/trunk/source/gui/CGUIText.cpp +++ ps/trunk/source/gui/CGUIText.cpp @@ -25,6 +25,7 @@ #include "gui/CGUI.h" #include "gui/ObjectBases/IGUIObject.h" #include "gui/SettingTypes/CGUIString.h" +#include "ps/CStrInternStatic.h" #include "renderer/Renderer.h" #include Index: ps/trunk/source/gui/GUIRenderer.cpp =================================================================== --- ps/trunk/source/gui/GUIRenderer.cpp +++ ps/trunk/source/gui/GUIRenderer.cpp @@ -31,6 +31,7 @@ #include "lib/tex/tex.h" #include "lib/utf8.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "renderer/Renderer.h" Index: ps/trunk/source/gui/ObjectTypes/CChart.cpp =================================================================== --- ps/trunk/source/gui/ObjectTypes/CChart.cpp +++ ps/trunk/source/gui/ObjectTypes/CChart.cpp @@ -25,6 +25,7 @@ #include "gui/SettingTypes/CGUISeries.h" #include "gui/SettingTypes/CGUIString.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "renderer/Renderer.h" Index: ps/trunk/source/gui/ObjectTypes/CInput.cpp =================================================================== --- ps/trunk/source/gui/ObjectTypes/CInput.cpp +++ ps/trunk/source/gui/ObjectTypes/CInput.cpp @@ -27,6 +27,7 @@ #include "lib/timer.h" #include "lib/utf8.h" #include "ps/ConfigDB.h" +#include "ps/CStrInternStatic.h" #include "ps/GameSetup/Config.h" #include "ps/Globals.h" #include "ps/Hotkey.h" Index: ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp =================================================================== --- ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp +++ ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp @@ -35,6 +35,7 @@ #include "lib/ogl.h" #include "lib/timer.h" #include "ps/ConfigDB.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/Game.h" #include "ps/GameSetup/Config.h" Index: ps/trunk/source/pch/graphics/precompiled.h =================================================================== --- ps/trunk/source/pch/graphics/precompiled.h +++ ps/trunk/source/pch/graphics/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,5 +21,4 @@ #include "scriptinterface/ScriptTypes.h" #include "lib/ogl.h" #include "ps/CStr.h" -#include "ps/CStrIntern.h" #include "maths/Matrix3D.h" Index: ps/trunk/source/ps/CConsole.cpp =================================================================== --- ps/trunk/source/ps/CConsole.cpp +++ ps/trunk/source/ps/CConsole.cpp @@ -37,6 +37,7 @@ #include "network/NetClient.h" #include "network/NetServer.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/GameSetup/Config.h" #include "ps/Globals.h" Index: ps/trunk/source/ps/CLogger.cpp =================================================================== --- ps/trunk/source/ps/CLogger.cpp +++ ps/trunk/source/ps/CLogger.cpp @@ -26,6 +26,7 @@ #include "lib/timer.h" #include "lib/utf8.h" #include "ps/CConsole.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "ps/Pyrogenesis.h" #include "renderer/Renderer.h" Index: ps/trunk/source/ps/CStrIntern.h =================================================================== --- ps/trunk/source/ps/CStrIntern.h +++ ps/trunk/source/ps/CStrIntern.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -102,10 +102,4 @@ }; } -#define X(id) extern CStrIntern str_##id; -#define X2(id, str) extern CStrIntern str_##id; -#include "CStrInternStatic.h" -#undef X -#undef X2 - #endif // INCLUDED_CSTRINTERN Index: ps/trunk/source/ps/CStrInternStatic.h =================================================================== --- ps/trunk/source/ps/CStrInternStatic.h +++ ps/trunk/source/ps/CStrInternStatic.h @@ -26,6 +26,13 @@ // X2(foo_0, "foo[0]") // defines a variable str_foo_0 with value "foo[0]". +// For direct inclusion, we presumably just want the extern definitions. +#ifndef X +#include "CStrIntern.h" +#define X(id) extern CStrIntern str_##id; +#define X2(id, str) extern CStrIntern str_##id; +#endif + X(0) X(1) X(2) @@ -164,3 +171,6 @@ X(windAngle) X(zFar) X(zNear) + +#undef X +#undef X2 Index: ps/trunk/source/ps/ProfileViewer.cpp =================================================================== --- ps/trunk/source/ps/ProfileViewer.cpp +++ ps/trunk/source/ps/ProfileViewer.cpp @@ -30,6 +30,7 @@ #include "gui/GUIMatrix.h" #include "lib/external_libraries/libsdl.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/Hotkey.h" #include "ps/Profile.h" Index: ps/trunk/source/renderer/DebugRenderer.cpp =================================================================== --- ps/trunk/source/renderer/DebugRenderer.cpp +++ ps/trunk/source/renderer/DebugRenderer.cpp @@ -28,6 +28,7 @@ #include "maths/Brush.h" #include "maths/Matrix3D.h" #include "maths/Vector3D.h" +#include "ps/CStrInternStatic.h" #include "renderer/Renderer.h" #include Index: ps/trunk/source/renderer/DecalRData.cpp =================================================================== --- ps/trunk/source/renderer/DecalRData.cpp +++ ps/trunk/source/renderer/DecalRData.cpp @@ -27,6 +27,7 @@ #include "lib/allocators/DynamicArena.h" #include "lib/allocators/STLAllocators.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/Profile.h" #include "renderer/Renderer.h" Index: ps/trunk/source/renderer/InstancingModelRenderer.cpp =================================================================== --- ps/trunk/source/renderer/InstancingModelRenderer.cpp +++ ps/trunk/source/renderer/InstancingModelRenderer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -26,6 +26,7 @@ #include "maths/Vector3D.h" #include "maths/Vector4D.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "renderer/Renderer.h" #include "renderer/RenderModifiers.h" #include "renderer/VertexArray.h" Index: ps/trunk/source/renderer/ModelRenderer.cpp =================================================================== --- ps/trunk/source/renderer/ModelRenderer.cpp +++ ps/trunk/source/renderer/ModelRenderer.cpp @@ -31,6 +31,7 @@ #include "maths/Vector3D.h" #include "maths/Vector4D.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "renderer/MikktspaceWrap.h" #include "renderer/ModelRenderer.h" Index: ps/trunk/source/renderer/OverlayRenderer.cpp =================================================================== --- ps/trunk/source/renderer/OverlayRenderer.cpp +++ ps/trunk/source/renderer/OverlayRenderer.cpp @@ -29,6 +29,7 @@ #include "lib/ogl.h" #include "maths/MathUtil.h" #include "maths/Quaternion.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/Profile.h" #include "renderer/DebugRenderer.h" Index: ps/trunk/source/renderer/ParticleRenderer.cpp =================================================================== --- ps/trunk/source/renderer/ParticleRenderer.cpp +++ ps/trunk/source/renderer/ParticleRenderer.cpp @@ -23,6 +23,7 @@ #include "graphics/ShaderDefines.h" #include "graphics/ShaderManager.h" #include "graphics/TextureManager.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "renderer/DebugRenderer.h" #include "renderer/Renderer.h" Index: ps/trunk/source/renderer/PatchRData.cpp =================================================================== --- ps/trunk/source/renderer/PatchRData.cpp +++ ps/trunk/source/renderer/PatchRData.cpp @@ -31,6 +31,7 @@ #include "lib/allocators/STLAllocators.h" #include "maths/MathUtil.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/GameSetup/Config.h" #include "ps/Profile.h" Index: ps/trunk/source/renderer/PostprocManager.cpp =================================================================== --- ps/trunk/source/renderer/PostprocManager.cpp +++ ps/trunk/source/renderer/PostprocManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -27,6 +27,7 @@ #include "maths/MathUtil.h" #include "ps/ConfigDB.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/Game.h" #include "ps/World.h" Index: ps/trunk/source/renderer/RenderModifiers.cpp =================================================================== --- ps/trunk/source/renderer/RenderModifiers.cpp +++ ps/trunk/source/renderer/RenderModifiers.cpp @@ -26,6 +26,7 @@ #include "maths/Vector4D.h" #include "maths/Matrix3D.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "graphics/GameView.h" Index: ps/trunk/source/renderer/Renderer.cpp =================================================================== --- ps/trunk/source/renderer/Renderer.cpp +++ ps/trunk/source/renderer/Renderer.cpp @@ -31,6 +31,7 @@ #include "maths/MathUtil.h" #include "ps/CLogger.h" #include "ps/ConfigDB.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/Profile.h" #include "ps/Filesystem.h" Index: ps/trunk/source/renderer/ShadowMap.cpp =================================================================== --- ps/trunk/source/renderer/ShadowMap.cpp +++ ps/trunk/source/renderer/ShadowMap.cpp @@ -32,6 +32,7 @@ #include "maths/Matrix3D.h" #include "ps/CLogger.h" #include "ps/ConfigDB.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "renderer/DebugRenderer.h" #include "renderer/Renderer.h" Index: ps/trunk/source/renderer/SilhouetteRenderer.cpp =================================================================== --- ps/trunk/source/renderer/SilhouetteRenderer.cpp +++ ps/trunk/source/renderer/SilhouetteRenderer.cpp @@ -25,6 +25,7 @@ #include "graphics/Patch.h" #include "graphics/ShaderManager.h" #include "maths/MathUtil.h" +#include "ps/CStrInternStatic.h" #include "ps/Profile.h" #include "renderer/DebugRenderer.h" #include "renderer/Renderer.h" Index: ps/trunk/source/renderer/SkyManager.cpp =================================================================== --- ps/trunk/source/renderer/SkyManager.cpp +++ ps/trunk/source/renderer/SkyManager.cpp @@ -34,6 +34,7 @@ #include "ps/CLogger.h" #include "ps/ConfigDB.h" #include "ps/CStr.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/Game.h" #include "ps/Loader.h" Index: ps/trunk/source/renderer/TerrainOverlay.cpp =================================================================== --- ps/trunk/source/renderer/TerrainOverlay.cpp +++ ps/trunk/source/renderer/TerrainOverlay.cpp @@ -26,6 +26,7 @@ #include "lib/bits.h" #include "lib/ogl.h" #include "maths/MathUtil.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/Profile.h" #include "ps/World.h" Index: ps/trunk/source/renderer/TerrainRenderer.cpp =================================================================== --- ps/trunk/source/renderer/TerrainRenderer.cpp +++ ps/trunk/source/renderer/TerrainRenderer.cpp @@ -36,6 +36,7 @@ #include "graphics/TextRenderer.h" #include "maths/MathUtil.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Filesystem.h" #include "ps/Game.h" #include "ps/Profile.h" Index: ps/trunk/source/renderer/TexturedLineRData.cpp =================================================================== --- ps/trunk/source/renderer/TexturedLineRData.cpp +++ ps/trunk/source/renderer/TexturedLineRData.cpp @@ -24,6 +24,7 @@ #include "maths/Frustum.h" #include "maths/MathUtil.h" #include "maths/Quaternion.h" +#include "ps/CStrInternStatic.h" #include "renderer/OverlayRenderer.h" #include "renderer/Renderer.h" #include "simulation2/Simulation2.h" Index: ps/trunk/source/renderer/WaterManager.cpp =================================================================== --- ps/trunk/source/renderer/WaterManager.cpp +++ ps/trunk/source/renderer/WaterManager.cpp @@ -32,6 +32,7 @@ #include "maths/MathUtil.h" #include "maths/Vector2D.h" #include "ps/CLogger.h" +#include "ps/CStrInternStatic.h" #include "ps/Game.h" #include "ps/World.h" #include "renderer/WaterManager.h" Index: ps/trunk/source/simulation2/system/ParamNode.h =================================================================== --- ps/trunk/source/simulation2/system/ParamNode.h +++ ps/trunk/source/simulation2/system/ParamNode.h @@ -20,7 +20,6 @@ #include "lib/file/vfs/vfs_path.h" #include "maths/Fixed.h" -#include "ps/CStrIntern.h" #include "ps/Errors.h" #include "scriptinterface/ScriptTypes.h" @@ -30,6 +29,7 @@ class XMBData; class XMBElement; +class CStrIntern; class ScriptRequest; /** Index: ps/trunk/source/simulation2/system/ParamNode.cpp =================================================================== --- ps/trunk/source/simulation2/system/ParamNode.cpp +++ ps/trunk/source/simulation2/system/ParamNode.cpp @@ -22,6 +22,7 @@ #include "lib/utf8.h" #include "ps/CLogger.h" #include "ps/CStr.h" +#include "ps/CStrIntern.h" #include "ps/Filesystem.h" #include "ps/XML/Xeromyces.h" #include "scriptinterface/ScriptRequest.h"