mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-28 11:42:57 +00:00
move C4JThread and ShutdownManager to platform/thread
This commit is contained in:
parent
69c418213e
commit
b7d200a5b1
|
|
@ -20,7 +20,7 @@
|
|||
#include "minecraft/util/Mth.h"
|
||||
#include "minecraft/world/entity/Mob.h"
|
||||
#include "minecraft/world/level/storage/LevelData.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/fs/fs.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include "minecraft/network/INetworkService.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/network/IPlatformNetwork.h"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "UIEnums.h"
|
||||
#include "minecraft/GameHostOptions.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
class Container;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "strings.h"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "minecraft/client/title/TitleScreen.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ if get_option('ui_backend') == 'shiggy'
|
|||
client_dependencies += shiggy_dep
|
||||
endif
|
||||
|
||||
|
||||
client = executable(
|
||||
'Minecraft.Client',
|
||||
platform_sources + localisation[1],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "java/File.h"
|
||||
#include "minecraft/client/resources/ResourceLocation.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/stubs.h"
|
||||
#include "platform/leaderboard/leaderboard.h"
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
#include "minecraft/world/phys/HitResult.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
#include "platform/input/input.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/stubs.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "minecraft/client/resources/ResourceLocation.h"
|
||||
#include "minecraft/util/SmoothFloat.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class Minecraft;
|
||||
class Entity;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/LevelListener.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
|
||||
class ClipChunk;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include "minecraft/network/packet/PacketListener.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
class SocketAddress;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "java/System.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class DataInputStream;
|
||||
class DataOutputStream;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "platform/network/network.h"
|
||||
#include "minecraft/server/network/ServerConnection.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
|
||||
class SocketAddress {};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "java/InputOutputStream/InputStream.h"
|
||||
#include "java/InputOutputStream/OutputStream.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class INetworkPlayer;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
#include "minecraft/world/level/chunk/SparseLightStorage.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
#include "platform/input/input.h"
|
||||
|
||||
class ConsoleInputSource;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "minecraft/SharedConstants.h"
|
||||
#include "minecraft/world/level/chunk/ChunkSource.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "util/Timer.h"
|
||||
|
||||
class ServerConnection;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "minecraft/world/level/biome/Biome.h"
|
||||
#include "minecraft/world/level/chunk/ChunkSource.h"
|
||||
#include "minecraft/world/level/levelgen/RandomLevelSource.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class ServerLevel;
|
||||
class ChunkStorage;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
#include "minecraft/world/level/tile/entity/ChestTileEntity.h"
|
||||
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
#include "platform/input/input.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "strings.h"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include "minecraft/world/level/TickNextTickData.h"
|
||||
#include "minecraft/world/level/TileEventData.h"
|
||||
#include "minecraft/world/level/biome/Biome.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class ServerChunkCache;
|
||||
class MinecraftServer;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "minecraft/world/level/biome/Biome.h"
|
||||
#include "minecraft/world/level/saveddata/SavedData.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
class CompoundTag;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "minecraft/world/level/storage/LevelData.h"
|
||||
#include "nbt/CompoundTag.h"
|
||||
#include "nbt/NbtIo.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/input/input.h"
|
||||
|
||||
class DataInput;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void to_base36(int value, char* buf) {
|
|||
}
|
||||
|
||||
File OldChunkStorage::getFile(int x, int z) {
|
||||
inline constexpr int MAX_PATH_SIZE = 256;
|
||||
constexpr int MAX_PATH_SIZE = 256;
|
||||
|
||||
char name[MAX_PATH_SIZE];
|
||||
char path1[MAX_PATH_SIZE];
|
||||
|
|
|
|||
|
|
@ -10,19 +10,6 @@ else
|
|||
_defs = []
|
||||
endif
|
||||
|
||||
# Core: thread + shutdown plumbing, no backend.
|
||||
lib_platform_core = static_library('platform_core',
|
||||
files('C4JThread.cpp', 'ShutdownManager.cpp'),
|
||||
include_directories: [platform_inc, include_directories('..')],
|
||||
dependencies: [_threads],
|
||||
cpp_args: global_cpp_args + global_cpp_defs,
|
||||
)
|
||||
|
||||
platform_dep = declare_dependency(
|
||||
link_with: lib_platform_core,
|
||||
include_directories: platform_inc,
|
||||
)
|
||||
|
||||
# Per-subsystem source lists. Each subdir owns its own list of backend
|
||||
# .cpp files via a `platform_<name>_sources` variable. The library
|
||||
# build is centralised so we get one library per platform target rather
|
||||
|
|
@ -38,6 +25,20 @@ subdir('sound')
|
|||
subdir('network')
|
||||
subdir('leaderboard')
|
||||
subdir('game')
|
||||
subdir('thread')
|
||||
|
||||
# Core: thread + shutdown plumbing, no backend.
|
||||
lib_platform_core = static_library('platform_core',
|
||||
platform_thread_sources,
|
||||
include_directories: [platform_inc, include_directories('..')],
|
||||
dependencies: [_threads],
|
||||
cpp_args: global_cpp_args + global_cpp_defs,
|
||||
)
|
||||
|
||||
platform_dep = declare_dependency(
|
||||
link_with: lib_platform_core,
|
||||
include_directories: platform_inc,
|
||||
)
|
||||
|
||||
lib_platform_sdl2 = static_library('platform_sdl2',
|
||||
platform_input_sources
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "StubNetworkPlayer.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/Socket.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/network/network.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
|
||||
class Level;
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
// Linux stub implementations for ShutdownManager
|
||||
// The PS3/PSVita versions have full implementations; on Linux these are no-ops.
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "platform/thread/ShutdownManager.h"
|
||||
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
void ShutdownManager::Initialise() {}
|
||||
void ShutdownManager::StartShutdown() {}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
#include <cstddef>
|
||||
#include <mutex>
|
||||
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class ShutdownManager {
|
||||
public:
|
||||
1
targets/platform/thread/meson.build
Normal file
1
targets/platform/thread/meson.build
Normal file
|
|
@ -0,0 +1 @@
|
|||
platform_thread_sources = files('C4JThread.cpp', 'ShutdownManager.cpp')
|
||||
Loading…
Reference in a new issue