mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Fix includes in source/ps
Make include-what-you-use happy with some iles in source/ps and fix what needs to be fixed. Ref: #8086 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
7dece41990
commit
8a6d7b6c65
41 changed files with 382 additions and 101 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include "ps/Hotkey.h"
|
||||
#include "ps/KeyName.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/VideoMode.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include "lib/debug.h"
|
||||
#include "lib/posix/posix_dlfcn.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "lib/timer.h"
|
||||
#include "ps/Profiler2.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@
|
|||
|
||||
#include "Config.h"
|
||||
|
||||
#include "lib/timer.h"
|
||||
#include "ps/CConsole.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
|
|
|
|||
|
|
@ -17,34 +17,41 @@
|
|||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "ps/GameSetup/GameSetup.h"
|
||||
#include "GameSetup.h"
|
||||
|
||||
#include "graphics/GameView.h"
|
||||
#include "graphics/MapReader.h"
|
||||
#include "graphics/TerrainTextureManager.h"
|
||||
#include "gui/CGUI.h"
|
||||
#include "gui/GUIManager.h"
|
||||
#include "gui/Scripting/JSInterface_GUIManager.h"
|
||||
#include "i18n/L10n.h"
|
||||
#include "lib/app_hooks.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/curl.h"
|
||||
#include "lib/file/common/file_stats.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/input.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lobby/IXmppClient.h"
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetHost.h"
|
||||
#include "network/NetMessage.h"
|
||||
#include "network/NetMessages.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "network/scripting/JSInterface_Network.h"
|
||||
#include "ps/CConsole.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/GUID.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/GameSetup/Atlas.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
#include "ps/GameSetup/Config.h"
|
||||
#include "ps/GameSetup/HWDetect.h"
|
||||
|
|
@ -59,31 +66,64 @@
|
|||
#include "ps/ProfileViewer.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/Pyrogenesis.h" // psSetLogDir
|
||||
#include "ps/TemplateLoader.h"
|
||||
#include "ps/ThreadUtil.h"
|
||||
#include "ps/TouchInput.h"
|
||||
#include "ps/UserReport.h"
|
||||
#include "ps/Util.h"
|
||||
#include "ps/VideoMode.h"
|
||||
#include "ps/VisualReplay.h"
|
||||
#include "ps/World.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "ps/scripting/JSInterface_Console.h"
|
||||
#include "ps/scripting/JSInterface_Game.h"
|
||||
#include "ps/scripting/JSInterface_Main.h"
|
||||
#include "ps/scripting/JSInterface_VFS.h"
|
||||
#include "renderer/Renderer.h"
|
||||
#include "renderer/RenderingOptions.h"
|
||||
#include "renderer/SceneRenderer.h"
|
||||
#include "renderer/VertexBufferManager.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptContext.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
#include "scriptinterface/ScriptStats.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/scripting/JSInterface_Simulation.h"
|
||||
#include "soundmanager/scripting/JSInterface_Sound.h"
|
||||
#include "simulation2/system/ParamNode.h"
|
||||
#include "soundmanager/ISoundManager.h"
|
||||
#include "tools/atlas/GameInterface/GameLoop.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_error.h>
|
||||
#include <SDL_hints.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_version.h>
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/constants.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <chrono>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <fmt/format.h>
|
||||
#include <fstream>
|
||||
#include <js/CallArgs.h>
|
||||
#include <js/Class.h>
|
||||
#include <js/Object.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <jsapi.h>
|
||||
#include <locale>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
|
||||
#if !(OS_WIN || OS_MACOSX || OS_ANDROID) // assume all other platforms use X11 for wxWidgets
|
||||
#define MUST_INIT_X11 1
|
||||
|
|
@ -94,13 +134,6 @@
|
|||
|
||||
extern void RestartEngine();
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
ERROR_GROUP(System);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -17,9 +17,14 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
#include "ps/containers/Span.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
class TestCmdLineArgs : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -16,11 +16,15 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
#include "network/NetClient.h"
|
||||
#include "ps/GameSetup/Config.h"
|
||||
#include "soundmanager/ISoundManager.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_video.h>
|
||||
#include <cstddef>
|
||||
|
||||
bool g_app_minimized = false;
|
||||
bool g_app_has_focus = true;
|
||||
|
|
|
|||
|
|
@ -16,12 +16,10 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Hotkey.h"
|
||||
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "ps/CConsole.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
|
@ -29,6 +27,20 @@
|
|||
#include "ps/KeyName.h"
|
||||
#include "ps/Profiler2.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_mouse.h>
|
||||
#include <SDL_scancode.h>
|
||||
#include <algorithm>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/token_functions.hpp>
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
static bool unified[UNIFIED_LAST - UNIFIED_SHIFT];
|
||||
|
||||
std::unordered_map<int, KeyMapping> g_HotkeyMap;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,15 @@
|
|||
|
||||
#include "Joystick.h"
|
||||
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_error.h>
|
||||
#include <SDL_events.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
CJoystick g_Joystick;
|
||||
|
||||
CJoystick::CJoystick() :
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -19,14 +19,22 @@
|
|||
|
||||
#include "ModInstaller.h"
|
||||
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <string>
|
||||
|
||||
#if !OS_WIN
|
||||
#include "lib/os_path.h"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@
|
|||
#include "ModIo.h"
|
||||
|
||||
#include "i18n/L10n.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "maths/MD5.h"
|
||||
|
|
@ -36,14 +39,26 @@
|
|||
#include "ps/Mod.h"
|
||||
#include "ps/ModInstaller.h"
|
||||
#include "ps/Util.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptContext.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/ScriptContext.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fmt/printf.h>
|
||||
#include <initializer_list>
|
||||
#include <js/Array.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
ModIo* g_ModIo = nullptr;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "ProfileViewer.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "graphics/Canvas2D.h"
|
||||
#include "graphics/Color.h"
|
||||
#include "graphics/FontMetrics.h"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/Future.h"
|
||||
#include "ps/Profiler2GPU.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "ps/TaskManager.h"
|
||||
|
|
@ -48,6 +48,7 @@
|
|||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
CProfiler2 g_Profiler2;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/Vector3D.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "graphics/Camera.h"
|
||||
#include "graphics/GameView.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
|
|
|||
|
|
@ -19,25 +19,36 @@
|
|||
|
||||
#include "UserReport.h"
|
||||
|
||||
#include "lib/timer.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/curl.h"
|
||||
#include "lib/external_libraries/zlib.h"
|
||||
#include "lib/file/archive/stream.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/secure_crt.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/types.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "ps/Threading.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <condition_variable>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#define DEBUG_UPLOADS 0
|
||||
|
||||
|
|
|
|||
|
|
@ -19,36 +19,52 @@
|
|||
|
||||
#include "VideoMode.h"
|
||||
|
||||
#include "graphics/Camera.h"
|
||||
#include "graphics/GameView.h"
|
||||
#include "graphics/ShaderDefines.h"
|
||||
#include "graphics/ShaderProgram.h"
|
||||
#include "gui/GUIManager.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CConsole.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/CStr.h"
|
||||
#if OS_MACOSX && SDL_VERSION_ATLEAST(2, 0, 6)
|
||||
#include "ps/DllLoader.h"
|
||||
#endif
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/GameSetup/Config.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "renderer/Renderer.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
#include "renderer/backend/dummy/DeviceForward.h"
|
||||
#include "renderer/backend/gl/DeviceForward.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
#include "renderer/backend/vulkan/DeviceForward.h"
|
||||
#include "renderer/Renderer.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_error.h>
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_mouse.h>
|
||||
#include <SDL_pixels.h>
|
||||
#include <SDL_stdinc.h>
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_version.h>
|
||||
#include <SDL_video.h>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#if OS_MACOSX && SDL_VERSION_ATLEAST(2, 0, 6)
|
||||
#include "ps/DllLoader.h"
|
||||
|
||||
#include <SDL_vulkan.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
using namespace std::literals;
|
||||
|
|
|
|||
|
|
@ -18,28 +18,39 @@
|
|||
#include "precompiled.h"
|
||||
|
||||
#include "VisualReplay.h"
|
||||
#include "graphics/GameView.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/types.h"
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/GameSetup/CmdLineArgs.h"
|
||||
#include "ps/GameSetup/Paths.h"
|
||||
#include "ps/Mod.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "ps/Replay.h"
|
||||
#include "ps/Util.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_quit.h>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <js/Array.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* Filter too short replays (value in seconds).
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -17,12 +17,21 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XMB/XMBStorage.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class TestXMBData : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,10 +18,11 @@
|
|||
#include "lib/self_test.h"
|
||||
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "ps/XML/RelaxNG.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class TestRelaxNG : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/XML/XMLWriter.h"
|
||||
|
||||
class TestXmlWriter : public CxxTest::TestSuite
|
||||
|
|
|
|||
|
|
@ -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,8 +18,9 @@
|
|||
#include "lib/self_test.h"
|
||||
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
|
||||
class TestXeromyces : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@
|
|||
#include "ps/containers/StaticVector.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <numeric>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -19,14 +19,16 @@
|
|||
|
||||
#include "JSInterface_ConfigDB.h"
|
||||
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/VideoMode.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace JSI_ConfigDB
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -23,6 +23,10 @@
|
|||
#include "ps/CLogger.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
|
||||
namespace JS { class CallArgs; }
|
||||
|
||||
namespace JSI_Console
|
||||
{
|
||||
CConsole* ConsoleGetter(const ScriptRequest&, JS::CallArgs&)
|
||||
|
|
|
|||
|
|
@ -22,12 +22,16 @@
|
|||
#include "i18n/L10n.h"
|
||||
#include "lib/build_version.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <unicode/smpdtfmt.h>
|
||||
#include <ctime>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <jsapi.h>
|
||||
#include <string>
|
||||
#include <unicode/locid.h>
|
||||
#include <unicode/smpdtfmt.h>
|
||||
#include <unicode/utypes.h>
|
||||
|
||||
namespace JSI_Debug
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,13 @@
|
|||
|
||||
#include "JSInterface_Game.h"
|
||||
|
||||
#include "graphics/HeightMipmap.h"
|
||||
#include "graphics/Terrain.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
|
@ -29,12 +35,20 @@
|
|||
#include "ps/Replay.h"
|
||||
#include "ps/World.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
#include "scriptinterface/StructuredClone.h"
|
||||
#include "simulation2/system/TurnManager.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "soundmanager/SoundManager.h"
|
||||
#include "simulation2/system/TurnManager.h"
|
||||
#include "soundmanager/ISoundManager.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
namespace JSI_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,17 +19,27 @@
|
|||
|
||||
#include "JSInterface_Hotkey.h"
|
||||
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Hotkey.h"
|
||||
#include "ps/KeyName.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <SDL_scancode.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <jsapi.h>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* Convert an unordered map to a JS object, mapping keys to values.
|
||||
|
|
|
|||
|
|
@ -22,20 +22,32 @@
|
|||
#include "graphics/FontMetrics.h"
|
||||
#include "graphics/MapReader.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/frequency_filter.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "maths/Size2D.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/MD5.h"
|
||||
#include "maths/Size2D.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/GUID.h"
|
||||
#include "ps/GameSetup/Atlas.h"
|
||||
#include "ps/Globals.h"
|
||||
#include "ps/Hotkey.h"
|
||||
#include "ps/Util.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
#include "tools/atlas/GameInterface/GameLoop.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <string>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
namespace JSI_Main
|
||||
{
|
||||
bool AtlasIsAvailable()
|
||||
|
|
|
|||
|
|
@ -19,14 +19,27 @@
|
|||
|
||||
#include "JSInterface_Mod.h"
|
||||
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Mod.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <js/Array.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
class ScriptInterface;
|
||||
namespace JS { class CallArgs; }
|
||||
|
||||
extern void RestartEngine();
|
||||
|
||||
|
|
|
|||
|
|
@ -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,10 +19,24 @@
|
|||
|
||||
#include "JSInterface_ModIo.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ModIo.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace JS { class CallArgs; }
|
||||
|
||||
namespace JSI_ModIo
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -19,17 +19,27 @@
|
|||
|
||||
#include "JSInterface_SavedGame.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/SavedGame.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
#include "scriptinterface/StructuredClone.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/system/TurnManager.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
namespace JSI_SavedGame
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,12 +19,15 @@
|
|||
|
||||
#include "JSInterface_UserReport.h"
|
||||
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "ps/UserReport.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <string>
|
||||
|
||||
namespace JSI_UserReport
|
||||
|
|
|
|||
|
|
@ -19,18 +19,42 @@
|
|||
|
||||
#include "JSInterface_VFS.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/io/write_buffer.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptConversions.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <fmt/format.h>
|
||||
#include <js/Array.h>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <js/Value.h>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
class ScriptInterface;
|
||||
|
||||
namespace JSI_VFS
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,14 @@
|
|||
|
||||
#include "JSInterface_VisualReplay.h"
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/VisualReplay.h"
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <string>
|
||||
|
||||
namespace JSI_VisualReplay
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -17,8 +17,14 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class TestCLogger : public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -17,8 +17,13 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/types.h"
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <clocale>
|
||||
#include <cstddef>
|
||||
|
||||
class TestCStr : public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -17,10 +17,15 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/path.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
extern PIVFS g_VFS;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -19,9 +19,13 @@
|
|||
|
||||
#include "ps/Future.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
class TestFuture : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,8 +18,11 @@
|
|||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/timer.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Hashing.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
class TestHashing : public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -22,10 +22,15 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Mod.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <jsapi.h>
|
||||
#include <vector>
|
||||
|
||||
class TestMod : public CxxTest::TestSuite
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -17,8 +17,13 @@
|
|||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
class TestTest : public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in a new issue