Переименовывание в LuaVox
This commit is contained in:
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -rdynamic")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -rdynamic")
|
||||||
|
|
||||||
project (AlterLuanti VERSION 0.0 DESCRIPTION "AlterLuanti Description")
|
project (LuaVox VERSION 0.0 DESCRIPTION "LuaVox Description")
|
||||||
add_executable(${PROJECT_NAME})
|
add_executable(${PROJECT_NAME})
|
||||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
|
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Abstract.hpp"
|
#include "Abstract.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Client {
|
namespace LV::Client {
|
||||||
|
|
||||||
void IRenderSession::onChunksChange(WorldId_t worldId, const std::vector<Pos::GlobalChunk> &changeOrAddList, const std::vector<Pos::GlobalChunk> &remove) {}
|
void IRenderSession::onChunksChange(WorldId_t worldId, const std::vector<Pos::GlobalChunk> &changeOrAddList, const std::vector<Pos::GlobalChunk> &remove) {}
|
||||||
void IRenderSession::attachCameraToEntity(EntityId_t id) {}
|
void IRenderSession::attachCameraToEntity(EntityId_t id) {}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <Common/Abstract.hpp>
|
#include <Common/Abstract.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Client {
|
namespace LV::Client {
|
||||||
|
|
||||||
using VoxelId_t = uint16_t;
|
using VoxelId_t = uint16_t;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Client {
|
namespace LV::Client {
|
||||||
|
|
||||||
using namespace TOS;
|
using namespace TOS;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <boost/asio/io_context.hpp>
|
#include <boost/asio/io_context.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Client {
|
namespace LV::Client {
|
||||||
|
|
||||||
class ServerSession : public AsyncObject, public IServerSession, public ISurfaceEventListener {
|
class ServerSession : public AsyncObject, public IServerSession, public ISurfaceEventListener {
|
||||||
std::unique_ptr<Net::AsyncSocket> _Socket;
|
std::unique_ptr<Net::AsyncSocket> _Socket;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <glm/ext.hpp>
|
#include <glm/ext.hpp>
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
namespace Pos {
|
namespace Pos {
|
||||||
|
|
||||||
struct Local4_u {
|
struct Local4_u {
|
||||||
@@ -125,7 +125,7 @@ struct LightPrism {
|
|||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
#define hash_for_pos(type) template <> struct hash<AL::Pos::type> { std::size_t operator()(const AL::Pos::type& obj) const { return std::hash<AL::Pos::type::Key>()((AL::Pos::type::Key) obj); } };
|
#define hash_for_pos(type) template <> struct hash<LV::Pos::type> { std::size_t operator()(const LV::Pos::type& obj) const { return std::hash<LV::Pos::type::Key>()((LV::Pos::type::Key) obj); } };
|
||||||
hash_for_pos(Local4_u)
|
hash_for_pos(Local4_u)
|
||||||
hash_for_pos(Local16_u)
|
hash_for_pos(Local16_u)
|
||||||
hash_for_pos(Local16)
|
hash_for_pos(Local16)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <boost/asio/experimental/awaitable_operators.hpp>
|
#include <boost/asio/experimental/awaitable_operators.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
|
|
||||||
using namespace boost::asio::experimental::awaitable_operators;
|
using namespace boost::asio::experimental::awaitable_operators;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Common/Abstract.hpp"
|
#include "Common/Abstract.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
|
|
||||||
template<typename VecType>
|
template<typename VecType>
|
||||||
bool calcBoxToBoxCollide(const VecType vec1_min, const VecType vec1_max,
|
bool calcBoxToBoxCollide(const VecType vec1_min, const VecType vec1_max,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Lockable {
|
class Lockable {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <boost/pool/pool_alloc.hpp>
|
#include <boost/pool/pool_alloc.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
|
|
||||||
template<unsigned PageSize_PowOf2, unsigned CountPageInChunk_PowOf2, unsigned MaxSize = 0, typename Mutex = boost::details::pool::default_mutex, typename UserAllocator = boost::default_user_allocator_new_delete>
|
template<unsigned PageSize_PowOf2, unsigned CountPageInChunk_PowOf2, unsigned MaxSize = 0, typename Mutex = boost::details::pool::default_mutex, typename UserAllocator = boost::default_user_allocator_new_delete>
|
||||||
struct BoostPool {
|
struct BoostPool {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <TOSLib.hpp>
|
#include <TOSLib.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
|
|
||||||
namespace AL::Net {
|
namespace LV::Net {
|
||||||
|
|
||||||
using namespace TOS;
|
using namespace TOS;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
|
|
||||||
namespace AL::Net {
|
namespace LV::Net {
|
||||||
|
|
||||||
class Server : public AsyncObject {
|
class Server : public AsyncObject {
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <boost/uuid/detail/sha1.hpp>
|
#include <boost/uuid/detail/sha1.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
using VoxelId_c = uint16_t;
|
using VoxelId_c = uint16_t;
|
||||||
using NodeId_c = uint16_t;
|
using NodeId_c = uint16_t;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <TOSLib.hpp>
|
#include <TOSLib.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "Abstract.hpp"
|
#include "Abstract.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "Server/Abstract.hpp"
|
#include "Server/Abstract.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
ContentEventController::ContentEventController(std::unique_ptr<RemoteClient> &&remote)
|
ContentEventController::ContentEventController(std::unique_ptr<RemoteClient> &&remote)
|
||||||
: Remote(std::move(remote))
|
: Remote(std::move(remote))
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
class RemoteClient;
|
class RemoteClient;
|
||||||
class GameServer;
|
class GameServer;
|
||||||
@@ -138,8 +138,8 @@ public:
|
|||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct hash<AL::Server::ServerObjectPos> {
|
struct hash<LV::Server::ServerObjectPos> {
|
||||||
std::size_t operator()(const AL::Server::ServerObjectPos& obj) const {
|
std::size_t operator()(const LV::Server::ServerObjectPos& obj) const {
|
||||||
return std::hash<uint32_t>()(obj.WorldId) ^ std::hash<int32_t>()(obj.ObjectPos.x) ^ std::hash<int32_t>()(obj.ObjectPos.y) ^ std::hash<int32_t>()(obj.ObjectPos.z);
|
return std::hash<uint32_t>()(obj.WorldId) ^ std::hash<int32_t>()(obj.ObjectPos.x) ^ std::hash<int32_t>()(obj.ObjectPos.y) ^ std::hash<int32_t>()(obj.ObjectPos.z);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include "SaveBackends/Filesystem.hpp"
|
#include "SaveBackends/Filesystem.hpp"
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
GameServer::~GameServer() {
|
GameServer::~GameServer() {
|
||||||
shutdown("on ~GameServer");
|
shutdown("on ~GameServer");
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "SaveBackend.hpp"
|
#include "SaveBackend.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
RemoteClient::~RemoteClient() {
|
RemoteClient::~RemoteClient() {
|
||||||
shutdown("~RemoteClient()");
|
shutdown("~RemoteClient()");
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Шаблоны игрового контента, которые необходимо поддерживать в актуальном
|
Шаблоны игрового контента, которые необходимо поддерживать в актуальном
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "SaveBackend.hpp"
|
#include "SaveBackend.hpp"
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
IWorldSaveBackend::~IWorldSaveBackend() = default;
|
IWorldSaveBackend::~IWorldSaveBackend() = default;
|
||||||
IPlayerSaveBackend::~IPlayerSaveBackend() = default;
|
IPlayerSaveBackend::~IPlayerSaveBackend() = default;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
struct SB_Region {
|
struct SB_Region {
|
||||||
std::vector<VoxelCube_Region> Voxels;
|
std::vector<VoxelCube_Region> Voxels;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace AL::Server::SaveBackends {
|
namespace LV::Server::SaveBackends {
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
namespace js = boost::json;
|
namespace js = boost::json;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <Server/SaveBackend.hpp>
|
#include <Server/SaveBackend.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server::SaveBackends {
|
namespace LV::Server::SaveBackends {
|
||||||
|
|
||||||
class Filesystem : public ISaveBackendProvider {
|
class Filesystem : public ISaveBackendProvider {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "World.hpp"
|
#include "World.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
|
|
||||||
World::World(WorldId_t id) {
|
World::World(WorldId_t id) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
|
||||||
namespace AL::Server {
|
namespace LV::Server {
|
||||||
|
|
||||||
class GameServer;
|
class GameServer;
|
||||||
|
|
||||||
|
|||||||
22
Src/main.cpp
22
Src/main.cpp
@@ -7,8 +7,11 @@
|
|||||||
#include "Client/ServerSession.hpp"
|
#include "Client/ServerSession.hpp"
|
||||||
#include "Common/Net.hpp"
|
#include "Common/Net.hpp"
|
||||||
#include "Server/GameServer.hpp"
|
#include "Server/GameServer.hpp"
|
||||||
|
#include <Client/Vulkan/Vulkan.hpp>
|
||||||
|
|
||||||
namespace AL {
|
namespace LV {
|
||||||
|
|
||||||
|
using namespace TOS;
|
||||||
|
|
||||||
coro<> runClient(asio::io_context &ioc, uint16_t port) {
|
coro<> runClient(asio::io_context &ioc, uint16_t port) {
|
||||||
try {
|
try {
|
||||||
@@ -22,13 +25,15 @@ coro<> runClient(asio::io_context &ioc, uint16_t port) {
|
|||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
// VK::Vulkan VkInst;
|
VK::Vulkan VkInst;
|
||||||
// VkInst.getSettingsNext() = VkInst.getBestSettings();
|
VkInst.getSettingsNext() = VkInst.getBestSettings();
|
||||||
// VkInst.reInit();
|
VkInst.reInit();
|
||||||
|
|
||||||
// VkInst.start([&](VK::Vulkan *instance, int subpass, VkCommandBuffer &renderCmd)
|
auto ot = std::async([&](){
|
||||||
// {
|
VkInst.start([&](VK::Vulkan *instance, int subpass, VkCommandBuffer &renderCmd)
|
||||||
// });
|
{
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// LuaVox
|
// LuaVox
|
||||||
|
|
||||||
@@ -46,6 +51,7 @@ int main() {
|
|||||||
asio::co_spawn(ioc, runClient(ioc, server.getPort()), asio::detached);
|
asio::co_spawn(ioc, runClient(ioc, server.getPort()), asio::detached);
|
||||||
|
|
||||||
ioc.run();
|
ioc.run();
|
||||||
|
VkInst.shutdown();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -57,5 +63,5 @@ int main() {
|
|||||||
TOS::Logger::addLogOutput(".*", TOS::EnumLogType::All);
|
TOS::Logger::addLogOutput(".*", TOS::EnumLogType::All);
|
||||||
|
|
||||||
std::cout << "Hello world!" << std::endl;
|
std::cout << "Hello world!" << std::endl;
|
||||||
return AL::main();
|
return LV::main();
|
||||||
}
|
}
|
||||||
|
|||||||
4
Work/imgui.ini
Normal file
4
Work/imgui.ini
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[Window][Debug##Default]
|
||||||
|
Pos=60,60
|
||||||
|
Size=400,400
|
||||||
|
|
||||||
Reference in New Issue
Block a user