Переименовывание в LuaVox

This commit is contained in:
2025-02-05 09:54:09 +06:00
parent fbf0727d18
commit cef88fc199
29 changed files with 52 additions and 42 deletions

View File

@@ -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)

View File

@@ -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) {}

View File

@@ -7,7 +7,7 @@
#include <Common/Abstract.hpp>
namespace AL::Client {
namespace LV::Client {
using VoxelId_t = uint16_t;

View File

@@ -7,7 +7,7 @@
#include <memory>
namespace AL::Client {
namespace LV::Client {
using namespace TOS;

View File

@@ -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;

View File

@@ -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
}
}

View File

@@ -11,7 +11,7 @@
#include <boost/asio/experimental/awaitable_operators.hpp>
namespace AL {
namespace LV {
using namespace boost::asio::experimental::awaitable_operators;

View File

@@ -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,

View File

@@ -6,7 +6,7 @@
#include <mutex>
#include <boost/thread.hpp>
namespace AL {
namespace LV {
template<typename T>
class Lockable {

View File

@@ -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 {

View File

@@ -2,7 +2,7 @@
#include <TOSLib.hpp>
#include <boost/asio/buffer.hpp>
namespace AL::Net {
namespace LV::Net {
using namespace TOS;

View File

@@ -10,7 +10,7 @@
#include <boost/thread.hpp>
#include <boost/circular_buffer.hpp>
namespace AL::Net {
namespace LV::Net {
class Server : public AsyncObject {
protected:

View File

@@ -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;

View File

@@ -7,7 +7,7 @@
#include <TOSLib.hpp>
namespace AL::Server {
namespace LV::Server {

View File

@@ -12,7 +12,7 @@
#include "Abstract.hpp"
namespace AL::Server {
namespace LV::Server {
namespace fs = std::filesystem;

View File

@@ -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))

View File

@@ -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);
}
};
}
}

View File

@@ -12,7 +12,7 @@
#include <unordered_set>
#include "SaveBackends/Filesystem.hpp"
namespace AL::Server {
namespace LV::Server {
GameServer::~GameServer() {
shutdown("on ~GameServer");

View File

@@ -21,7 +21,7 @@
#include "SaveBackend.hpp"
namespace AL::Server {
namespace LV::Server {
namespace fs = std::filesystem;

View File

@@ -9,7 +9,7 @@
#include <unordered_set>
namespace AL::Server {
namespace LV::Server {
RemoteClient::~RemoteClient() {
shutdown("~RemoteClient()");

View File

@@ -9,7 +9,7 @@
#include <unordered_map>
#include <unordered_set>
namespace AL::Server {
namespace LV::Server {
/*
Шаблоны игрового контента, которые необходимо поддерживать в актуальном

View File

@@ -1,6 +1,6 @@
#include "SaveBackend.hpp"
namespace AL::Server {
namespace LV::Server {
IWorldSaveBackend::~IWorldSaveBackend() = default;
IPlayerSaveBackend::~IPlayerSaveBackend() = default;

View File

@@ -8,7 +8,7 @@
#include <unordered_map>
namespace AL::Server {
namespace LV::Server {
struct SB_Region {
std::vector<VoxelCube_Region> Voxels;

View File

@@ -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);
}
}
}

View File

@@ -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;
};
}
}

View File

@@ -1,7 +1,7 @@
#include "World.hpp"
namespace AL::Server {
namespace LV::Server {
World::World(WorldId_t id) {

View File

@@ -7,7 +7,7 @@
#include <unordered_map>
namespace AL::Server {
namespace LV::Server {
class GameServer;

View File

@@ -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
View File

@@ -0,0 +1,4 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400