forked from mirrors/0ad
Fix includes in source/ps
Make include-what-you-use happy with some files in source/ps and fix what needs to be fixed. Delete source/ps/FutureForward.h as it is no longer used. Ref: #8086 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -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
|
||||
@@ -19,7 +19,15 @@
|
||||
#define INCLUDED_ARCHIVEBUILDER
|
||||
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
class CFileInfo;
|
||||
|
||||
/**
|
||||
* Packages a mod's files into a distributable archive.
|
||||
|
||||
@@ -22,9 +22,11 @@
|
||||
#ifndef INCLUDED_CCONSOLE
|
||||
#define INCLUDED_CCONSOLE
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/input.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
@@ -32,6 +34,7 @@
|
||||
|
||||
class CCanvas2D;
|
||||
class CTextRenderer;
|
||||
struct SDL_Event_;
|
||||
|
||||
/**
|
||||
* In-game console.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -19,6 +19,11 @@
|
||||
#define INCLUDED_CACHELOADER
|
||||
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class MD5;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#define INCLUDED_CONFIGDB
|
||||
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <array>
|
||||
@@ -35,8 +36,8 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -65,8 +66,6 @@ using CConfigValueSet = std::vector<CStr>;
|
||||
// Actually defined below - requires access to CConfigDB.
|
||||
class CConfigDBHook;
|
||||
|
||||
#define g_ConfigDB (*CConfigDB::Instance())
|
||||
|
||||
class CConfigDB
|
||||
{
|
||||
friend CConfigDBHook;
|
||||
@@ -109,7 +108,7 @@ public:
|
||||
[[nodiscard]] static T GetIfInitialised(const std::string_view name, T defaultValue,
|
||||
const EConfigNamespace ns = CFG_USER)
|
||||
{
|
||||
return IsInitialised() ? g_ConfigDB.Get(name, std::move(defaultValue), ns) : defaultValue;
|
||||
return IsInitialised() ? Instance()->Get(name, std::move(defaultValue), ns) : defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -253,4 +252,7 @@ private:
|
||||
std::multimap<CStr, std::function<void()>>::iterator m_Ptr;
|
||||
CConfigDB& m_ConfigDB;
|
||||
};
|
||||
|
||||
#define g_ConfigDB (*CConfigDB::Instance())
|
||||
|
||||
#endif // INCLUDED_CONFIGDB
|
||||
|
||||
+8
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -30,10 +30,15 @@
|
||||
#ifndef INCLUDED_FILEPACKER
|
||||
#define INCLUDED_FILEPACKER
|
||||
|
||||
#include "lib/file/io/write_buffer.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "ps/CStrForward.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h" // WriteBuffer
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
class CStr8;
|
||||
|
||||
ERROR_GROUP(File);
|
||||
ERROR_TYPE(File, OpenFailed);
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
#ifndef INCLUDED_PS_FILESYSTEM
|
||||
#define INCLUDED_PS_FILESYSTEM
|
||||
|
||||
#include "lib/file/file.h"
|
||||
#include "lib/file/io/write_buffer.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "ps/CStrForward.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/Errors.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
class CStr8;
|
||||
|
||||
extern PIVFS g_VFS;
|
||||
|
||||
extern bool VfsFileExists(const VfsPath& pathname);
|
||||
|
||||
+1
-3
@@ -18,12 +18,10 @@
|
||||
#ifndef INCLUDED_FUTURE
|
||||
#define INCLUDED_FUTURE
|
||||
|
||||
#include "ps/FutureForward.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 0 A.D. is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_FUTURE_FORWARD
|
||||
#define INCLUDED_FUTURE_FORWARD
|
||||
|
||||
/**
|
||||
* Lightweight header / forward declarations for Future.
|
||||
* Include this in your header files where possible.
|
||||
*/
|
||||
|
||||
template<typename Ret>
|
||||
class Future;
|
||||
|
||||
#endif // INCLUDED_FUTURE_FORWARD
|
||||
+1
-4
@@ -49,8 +49,7 @@
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/components/ICmpPlayer.h"
|
||||
#include "simulation2/components/ICmpPlayerManager.h"
|
||||
#include "simulation2/system/CmpPtr.h"
|
||||
#include "simulation2/system/Components.h"
|
||||
#include "simulation2/system/Component.h"
|
||||
#include "simulation2/system/Entity.h"
|
||||
#include "simulation2/system/LocalTurnManager.h"
|
||||
#include "simulation2/system/ReplayTurnManager.h"
|
||||
@@ -66,8 +65,6 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
class IComponent;
|
||||
|
||||
extern GameLoopState* g_AtlasGameLoop;
|
||||
|
||||
/**
|
||||
|
||||
+10
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,13 +18,19 @@
|
||||
#ifndef INCLUDED_GAME
|
||||
#define INCLUDED_GAME
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "scriptinterface/ScriptTypes.h"
|
||||
#include "simulation2/helpers/Player.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <iosfwd>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class CGameView;
|
||||
@@ -32,6 +38,7 @@ class CSimulation2;
|
||||
class CTurnManager;
|
||||
class CWorld;
|
||||
class IReplayLogger;
|
||||
struct CColor;
|
||||
|
||||
/**
|
||||
* The container that holds the rules, resources and attributes of the game.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2023 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,14 +19,12 @@
|
||||
#define INCLUDED_CMDLINEARGS
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class ScriptRequest;
|
||||
|
||||
namespace PS { template <typename T> class span; }
|
||||
|
||||
class CmdLineArgs
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef INCLUDED_PS_GAMESETUP_CONFIG
|
||||
#define INCLUDED_PS_GAMESETUP_CONFIG
|
||||
|
||||
#include "ps/CStr.h"
|
||||
|
||||
// flag to pause the game on window focus loss
|
||||
extern bool g_PauseOnFocusLoss;
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "ps/VideoMode.h"
|
||||
#include "ps/World.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XMB/XMBStorage.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "ps/scripting/JSInterface_Game.h"
|
||||
#include "ps/scripting/JSInterface_Main.h"
|
||||
@@ -89,7 +90,7 @@
|
||||
#include "scriptinterface/ScriptStats.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/scripting/JSInterface_Simulation.h"
|
||||
#include "simulation2/system/ParamNode.h"
|
||||
#include "simulation2/system/Component.h"
|
||||
#include "soundmanager/ISoundManager.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -19,7 +19,8 @@
|
||||
#define INCLUDED_PS_GAMESETUP_PATHS
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "CmdLineArgs.h"
|
||||
|
||||
class CmdLineArgs;
|
||||
|
||||
/**
|
||||
* Wrapper class for OS paths used by the game
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,12 +18,15 @@
|
||||
#ifndef INCLUDED_PS_GLOBALS
|
||||
#define INCLUDED_PS_GLOBALS
|
||||
|
||||
#include "lib/input.h"
|
||||
#include "lib/frequency_filter.h"
|
||||
#include "lib/input.h"
|
||||
#include "ps/KeyName.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
|
||||
struct SDL_Event_;
|
||||
|
||||
// thin abstraction layer on top of SDL.
|
||||
// game code should use it instead of SDL_GetMouseState etc. because
|
||||
// Atlas does not completely emulate SDL (it can only send events).
|
||||
|
||||
+4
-1
@@ -31,13 +31,16 @@
|
||||
* triggered. All with the hotkey name stored in ev.user.data1 as a const char*.
|
||||
*/
|
||||
|
||||
#include "CStr.h"
|
||||
#include "lib/input.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
struct SDL_Event_;
|
||||
|
||||
// SDL_Scancode is an enum, we'll use an explicit int to avoid including SDL in this header.
|
||||
using SDL_Scancode_ = int;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef INCLUDED_JOYSTICK
|
||||
#define INCLUDED_JOYSTICK
|
||||
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include <SDL_joystick.h>
|
||||
|
||||
class CJoystick
|
||||
{
|
||||
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,9 +18,10 @@
|
||||
#ifndef INCLUDED_KEYNAME
|
||||
#define INCLUDED_KEYNAME
|
||||
|
||||
// Need SDLK_* enum values.
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "ps/CStr.h"
|
||||
#include <SDL_mouse.h>
|
||||
#include <SDL_scancode.h>
|
||||
|
||||
class CStr8;
|
||||
|
||||
extern SDL_Scancode FindScancode(const CStr8& keyname);
|
||||
// Map a scancode to a locale-independent scancode name.
|
||||
|
||||
+2
-1
@@ -21,10 +21,11 @@
|
||||
#ifndef INCLUDED_LOADER
|
||||
#define INCLUDED_LOADER
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <wchar.h>
|
||||
|
||||
/*
|
||||
|
||||
|
||||
+3
-2
@@ -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,10 +19,11 @@
|
||||
#define INCLUDED_MOD
|
||||
|
||||
#include "ps/CStr.h"
|
||||
#include "scriptinterface/ScriptForward.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
#define g_Mods (Mod::Instance())
|
||||
|
||||
class Mod
|
||||
|
||||
@@ -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,9 +18,11 @@
|
||||
#ifndef INCLUDED_MODINSTALLER
|
||||
#define INCLUDED_MODINSTALLER
|
||||
|
||||
#include "CStr.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "ps/CStr.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
+6
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,15 +23,19 @@
|
||||
#ifndef INCLUDED_MODIO
|
||||
#define INCLUDED_MODIO
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/external_libraries/curl.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "scriptinterface/ScriptForward.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <sodium.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
// TODO: Allocate instance of the below two using sodium_malloc?
|
||||
struct PKStruct
|
||||
{
|
||||
|
||||
+4
-6
@@ -22,20 +22,18 @@
|
||||
#ifndef INCLUDED_PROFILE
|
||||
#define INCLUDED_PROFILE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "lib/adts/ring_buf.h"
|
||||
#include "lib/posix/posix_pthread.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/Singleton.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class CProfileNodeTable;
|
||||
|
||||
#define PROFILE_AMORTIZE_FRAMES 30
|
||||
#define PROFILE_AMORTIZE_TURNS 5
|
||||
|
||||
class CProfileManager;
|
||||
class CProfileNodeTable;
|
||||
|
||||
// To profile scripts usefully, we use a call hook that's called on every enter/exit,
|
||||
// and need to find the function name. But most functions are anonymous so we make do
|
||||
// with filename plus line number instead.
|
||||
|
||||
@@ -26,9 +26,11 @@
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Singleton.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
class CCanvas2D;
|
||||
struct SDL_Event_;
|
||||
|
||||
/**
|
||||
* Struct ProfileColumn: Describes one column of an AbstractProfileTable.
|
||||
|
||||
+7
-11
@@ -78,31 +78,27 @@
|
||||
#ifndef INCLUDED_PROFILER2
|
||||
#define INCLUDED_PROFILER2
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/ThreadUtil.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
namespace Backend
|
||||
{
|
||||
class IDeviceCommandContext;
|
||||
}
|
||||
}
|
||||
|
||||
class CProfiler2GPU;
|
||||
namespace Renderer::Backend { class IDeviceCommandContext; }
|
||||
struct mg_context;
|
||||
|
||||
// Note: Lots of functions are defined inline, to hypothetically
|
||||
// minimise performance overhead.
|
||||
|
||||
class CProfiler2GPU;
|
||||
|
||||
class CProfiler2
|
||||
{
|
||||
friend class CProfiler2GPUImpl;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "simulation2/components/ICmpGuiInterface.h"
|
||||
#include "simulation2/helpers/Player.h"
|
||||
#include "simulation2/helpers/SimulationCommand.h"
|
||||
#include "simulation2/system/CmpPtr.h"
|
||||
#include "simulation2/system/Component.h"
|
||||
#include "simulation2/system/Entity.h"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
+7
-2
@@ -18,15 +18,20 @@
|
||||
#ifndef INCLUDED_REPLAY
|
||||
#define INCLUDED_REPLAY
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "lib/types.h"
|
||||
#include "scriptinterface/ScriptTypes.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct SimulationCommand;
|
||||
class CSimulation2;
|
||||
class ScriptInterface;
|
||||
struct SimulationCommand;
|
||||
|
||||
/**
|
||||
* Replay log recorder interface.
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "lib/types.h"
|
||||
#include "maths/Vector3D.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/Mod.h"
|
||||
|
||||
@@ -19,13 +19,16 @@
|
||||
#define INCLUDED_SAVEDGAME
|
||||
|
||||
#include "lib/status.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "scriptinterface/ScriptTypes.h"
|
||||
#include "scriptinterface/StructuredClone.h"
|
||||
|
||||
#include <js/Value.h>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class CSimulation2;
|
||||
class CStrW;
|
||||
class ScriptInterface;
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -21,8 +21,11 @@
|
||||
#include "ps/Future.h"
|
||||
#include "ps/Singleton.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace Threading
|
||||
{
|
||||
|
||||
@@ -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,10 +18,12 @@
|
||||
#ifndef INCLUDED_TEMPLATELOADER
|
||||
#define INCLUDED_TEMPLATELOADER
|
||||
|
||||
#include "simulation2/system/ParamNode.h"
|
||||
#include "simulation2/system/Component.h"
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
enum ETemplatesType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef INCLUDED_THREADING
|
||||
#define INCLUDED_THREADING
|
||||
|
||||
#include "ThreadUtil.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#if OS_WIN
|
||||
#include "lib/sysdep/os/win/wseh.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -22,6 +22,10 @@
|
||||
#include "maths/Vector2D.h"
|
||||
#include "maths/Vector3D.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
struct SDL_Event_;
|
||||
|
||||
/**
|
||||
* Maps touch events (e.g. on Android touchscreen devices) onto mouse events
|
||||
* and camera movement.
|
||||
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2023 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,8 +21,12 @@
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
class Tex;
|
||||
|
||||
const wchar_t* ErrorString(int err);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "lib/config2.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "lib/tex/tex.h"
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "renderer/backend/dummy/DeviceForward.h"
|
||||
#include "renderer/backend/gl/DeviceForward.h"
|
||||
#include "renderer/backend/vulkan/DeviceForward.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_error.h>
|
||||
|
||||
+3
-10
@@ -18,21 +18,14 @@
|
||||
#ifndef INCLUDED_VIDEOMODE
|
||||
#define INCLUDED_VIDEOMODE
|
||||
|
||||
#include "graphics/Camera.h"
|
||||
#include "ps/CStrForward.h"
|
||||
#include "renderer/backend/Backend.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
typedef struct SDL_Window SDL_Window;
|
||||
class CStrW;
|
||||
namespace Renderer::Backend { class IDevice; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
namespace Backend
|
||||
{
|
||||
class IDevice;
|
||||
}
|
||||
}
|
||||
typedef struct SDL_Window SDL_Window;
|
||||
|
||||
class CVideoMode
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
#include "ps/GameSetup/Paths.h"
|
||||
@@ -46,6 +47,7 @@
|
||||
#include <js/Array.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/Value.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -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,10 +19,13 @@
|
||||
#define INCLUDED_VISUAL_REPLAY
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "ps/CStrForward.h"
|
||||
#include "scriptinterface/ScriptTypes.h"
|
||||
|
||||
#include <js/TypeDecls.h>
|
||||
|
||||
class CStrW;
|
||||
class ScriptInterface;
|
||||
namespace JS { class Value; }
|
||||
|
||||
/**
|
||||
* Contains functions for visually replaying past games.
|
||||
|
||||
+7
-10
@@ -24,15 +24,18 @@
|
||||
#ifndef INCLUDED_WORLD
|
||||
#define INCLUDED_WORLD
|
||||
|
||||
#include "ps/CStrForward.h"
|
||||
#include "ps/Errors.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <memory>
|
||||
|
||||
class CGame;
|
||||
class CMapReader;
|
||||
class CStrW;
|
||||
class CTerrain;
|
||||
class CUnitManager;
|
||||
class ScriptContext;
|
||||
|
||||
#ifndef ERROR_GROUP_GAME_DEFINED
|
||||
#define ERROR_GROUP_GAME_DEFINED
|
||||
ERROR_GROUP(Game);
|
||||
@@ -40,12 +43,6 @@ ERROR_GROUP(Game);
|
||||
ERROR_SUBGROUP(Game, World);
|
||||
ERROR_TYPE(Game_World, MapLoadFailed);
|
||||
|
||||
class CGame;
|
||||
class CUnitManager;
|
||||
class CTerrain;
|
||||
class CMapReader;
|
||||
class ScriptContext;
|
||||
|
||||
/**
|
||||
* CWorld is a general data class containing whatever is needed to accurately represent the world.
|
||||
* This includes the map, entities, influence maps, tiles, heightmap, etc.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define ALGORITHM_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/SavedGame.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "lib/types.h"
|
||||
#include "scriptinterface/ScriptTypes.h"
|
||||
|
||||
#include <js/PropertyDescriptor.h>
|
||||
|
||||
class ScriptRequest;
|
||||
|
||||
namespace JSI_VFS
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptInterface.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Filesystem.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -15,6 +15,7 @@
|
||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "simulation2/system/ComponentTest.h"
|
||||
#include "simulation2/serialization/StdDeserializer.h"
|
||||
#include "simulation2/serialization/StdSerializer.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "simulation2/system/Entity.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
class CSimContext;
|
||||
class CSimulation2;
|
||||
class IComponent;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
class IComponent;
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "graphics/TerrainTextureManager.h"
|
||||
#include "lib/bits.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/status.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
||||
Reference in New Issue
Block a user