Переименовывание в 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_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})
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#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::attachCameraToEntity(EntityId_t id) {}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <Common/Abstract.hpp>
|
||||
|
||||
|
||||
namespace AL::Client {
|
||||
namespace LV::Client {
|
||||
|
||||
using VoxelId_t = uint16_t;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace AL::Client {
|
||||
namespace LV::Client {
|
||||
|
||||
using namespace TOS;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
|
||||
namespace AL::Client {
|
||||
namespace LV::Client {
|
||||
|
||||
class ServerSession : public AsyncObject, public IServerSession, public ISurfaceEventListener {
|
||||
std::unique_ptr<Net::AsyncSocket> _Socket;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <cstdint>
|
||||
#include <glm/ext.hpp>
|
||||
|
||||
namespace AL {
|
||||
namespace LV {
|
||||
namespace Pos {
|
||||
|
||||
struct Local4_u {
|
||||
@@ -125,7 +125,7 @@ struct LightPrism {
|
||||
|
||||
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(Local16_u)
|
||||
hash_for_pos(Local16)
|
||||
@@ -133,4 +133,4 @@ hash_for_pos(GlobalChunk)
|
||||
hash_for_pos(GlobalRegion)
|
||||
#undef hash_for_pos
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <boost/asio/experimental/awaitable_operators.hpp>
|
||||
|
||||
|
||||
namespace AL {
|
||||
namespace LV {
|
||||
|
||||
using namespace boost::asio::experimental::awaitable_operators;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "Common/Abstract.hpp"
|
||||
#include <iostream>
|
||||
|
||||
namespace AL {
|
||||
namespace LV {
|
||||
|
||||
template<typename VecType>
|
||||
bool calcBoxToBoxCollide(const VecType vec1_min, const VecType vec1_max,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <mutex>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
namespace AL {
|
||||
namespace LV {
|
||||
|
||||
template<typename T>
|
||||
class Lockable {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#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>
|
||||
struct BoostPool {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <TOSLib.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
|
||||
namespace AL::Net {
|
||||
namespace LV::Net {
|
||||
|
||||
using namespace TOS;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
|
||||
namespace AL::Net {
|
||||
namespace LV::Net {
|
||||
|
||||
class Server : public AsyncObject {
|
||||
protected:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <boost/uuid/detail/sha1.hpp>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
using VoxelId_c = uint16_t;
|
||||
using NodeId_c = uint16_t;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <TOSLib.hpp>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Abstract.hpp"
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Server/Abstract.hpp"
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
ContentEventController::ContentEventController(std::unique_ptr<RemoteClient> &&remote)
|
||||
: Remote(std::move(remote))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
class RemoteClient;
|
||||
class GameServer;
|
||||
@@ -138,11 +138,11 @@ public:
|
||||
namespace std {
|
||||
|
||||
template <>
|
||||
struct hash<AL::Server::ServerObjectPos> {
|
||||
std::size_t operator()(const AL::Server::ServerObjectPos& obj) const {
|
||||
struct hash<LV::Server::ServerObjectPos> {
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <unordered_set>
|
||||
#include "SaveBackends/Filesystem.hpp"
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
GameServer::~GameServer() {
|
||||
shutdown("on ~GameServer");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "SaveBackend.hpp"
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <unordered_set>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
RemoteClient::~RemoteClient() {
|
||||
shutdown("~RemoteClient()");
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
/*
|
||||
Шаблоны игрового контента, которые необходимо поддерживать в актуальном
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "SaveBackend.hpp"
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
IWorldSaveBackend::~IWorldSaveBackend() = default;
|
||||
IPlayerSaveBackend::~IPlayerSaveBackend() = default;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
struct SB_Region {
|
||||
std::vector<VoxelCube_Region> Voxels;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
namespace AL::Server::SaveBackends {
|
||||
namespace LV::Server::SaveBackends {
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
namespace js = boost::json;
|
||||
@@ -253,4 +253,4 @@ std::unique_ptr<IModStorageSaveBackend> Filesystem::createModStorage(boost::json
|
||||
return std::make_unique<MSSB_Filesystem>(data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <Server/SaveBackend.hpp>
|
||||
|
||||
|
||||
namespace AL::Server::SaveBackends {
|
||||
namespace LV::Server::SaveBackends {
|
||||
|
||||
class Filesystem : public ISaveBackendProvider {
|
||||
public:
|
||||
@@ -17,4 +17,4 @@ public:
|
||||
virtual std::unique_ptr<IModStorageSaveBackend> createModStorage(boost::json::object data) override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "World.hpp"
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
|
||||
World::World(WorldId_t id) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
namespace AL::Server {
|
||||
namespace LV::Server {
|
||||
|
||||
class GameServer;
|
||||
|
||||
|
||||
22
Src/main.cpp
22
Src/main.cpp
@@ -7,8 +7,11 @@
|
||||
#include "Client/ServerSession.hpp"
|
||||
#include "Common/Net.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) {
|
||||
try {
|
||||
@@ -22,13 +25,15 @@ coro<> runClient(asio::io_context &ioc, uint16_t port) {
|
||||
|
||||
int main() {
|
||||
|
||||
// VK::Vulkan VkInst;
|
||||
// VkInst.getSettingsNext() = VkInst.getBestSettings();
|
||||
// VkInst.reInit();
|
||||
VK::Vulkan VkInst;
|
||||
VkInst.getSettingsNext() = VkInst.getBestSettings();
|
||||
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
|
||||
|
||||
@@ -46,6 +51,7 @@ int main() {
|
||||
asio::co_spawn(ioc, runClient(ioc, server.getPort()), asio::detached);
|
||||
|
||||
ioc.run();
|
||||
VkInst.shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -57,5 +63,5 @@ int main() {
|
||||
TOS::Logger::addLogOutput(".*", TOS::EnumLogType::All);
|
||||
|
||||
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