VOXELRENDER: removed voxelworld dependency

master
Martin Gerhardy 2020-05-13 21:00:29 +02:00
parent 9832d68ee7
commit 3db58a3ece
6 changed files with 7 additions and 9 deletions

View File

@ -42,5 +42,5 @@ set(FILES
shared/worldparams.lua
)
engine_add_executable(TARGET ${PROJECT_NAME} SRCS ${SRCS} FILES ${FILES} LUA_SRCS ${LUA_SRCS} WINDOWED)
engine_target_link_libraries(TARGET ${PROJECT_NAME} DEPENDENCIES nuklear animation voxelrender util stock http audio)
engine_target_link_libraries(TARGET ${PROJECT_NAME} DEPENDENCIES nuklear animation voxelrender voxelworld util stock http audio)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -50,7 +50,7 @@ Client::Client(const metric::MetricPtr& metric, const animation::AnimationCacheP
Super(metric, filesystem, eventBus, timeProvider, texturePool, meshRenderer, textureAtlasRenderer), _animationCache(animationCache),
_network(network), _worldMgr(world), _clientPager(worldPager), _messageSender(messageSender), _movement(soundManager),
_stockDataProvider(stockDataProvider), _volumeCache(volumeCache),
_meshCache(meshCache), _camera(world, _worldRenderer), _soundManager(soundManager) {
_meshCache(meshCache), _camera(_worldRenderer), _soundManager(soundManager) {
init(ORGANISATION, "client");
}

View File

@ -30,7 +30,7 @@ set(FILES
shared/water-distortion.png
shared/water-normal.png
)
engine_add_module(TARGET ${LIB} SRCS ${SRCS} ${SRCS_SHADERS} FILES ${FILES} DEPENDENCIES frontend render voxelfont voxelworld)
engine_add_module(TARGET ${LIB} SRCS ${SRCS} ${SRCS_SHADERS} FILES ${FILES} DEPENDENCIES frontend render voxelfont)
generate_shaders(${LIB} world water voxel postprocess)
gtest_suite_sources(tests

View File

@ -5,7 +5,6 @@
#pragma once
#include "video/Camera.h"
#include "voxelworld/WorldMgr.h"
#include "WorldRenderer.h"
#include "core/command/ActionButton.h"
#include "core/BindingContext.h"
@ -18,7 +17,6 @@ namespace voxelrender {
class PlayerCamera {
private:
video::Camera _camera;
voxelworld::WorldMgrPtr _worldMgr;
WorldRenderer& _worldRenderer;
core::VarPtr _maxTargetDistance;
@ -40,8 +38,8 @@ private:
void setCameraFirstPerson();
void setCameraTarget();
public:
PlayerCamera(const voxelworld::WorldMgrPtr &world, voxelrender::WorldRenderer &worldRenderer, int keyBindingContext = core::BindingContext::World) :
_worldMgr(world), _worldRenderer(worldRenderer), _keyBindingContext(keyBindingContext) {
PlayerCamera(voxelrender::WorldRenderer &worldRenderer, int keyBindingContext = core::BindingContext::World) :
_worldRenderer(worldRenderer), _keyBindingContext(keyBindingContext) {
}
void setTarget(const glm::vec3& position);

View File

@ -14,4 +14,4 @@ set(LUA_ATTRIBUTES
set(LUA_SRCS ${LUA_ATTRIBUTES})
engine_add_executable(TARGET ${PROJECT_NAME} SRCS ${SRCS} FILES ${FILES} LUA_SRCS ${LUA_SRCS} WINDOWED)
engine_target_link_libraries(TARGET ${PROJECT_NAME} DEPENDENCIES imgui voxelrender attrib testcore audio)
engine_target_link_libraries(TARGET ${PROJECT_NAME} DEPENDENCIES imgui voxelrender voxelworld attrib testcore audio)

View File

@ -38,7 +38,7 @@ MapView::MapView(const metric::MetricPtr& metric, const animation::AnimationCach
Super(metric, filesystem, eventBus, timeProvider),
_animationCache(animationCache), _worldMgr(worldMgr), _worldPager(worldPager), _movement(soundManager),
_stockDataProvider(stockDataProvider), _volumeCache(volumeCache), _meshCache(meshCache),
_camera(worldMgr, _worldRenderer), _soundManager(soundManager) {
_camera(_worldRenderer), _soundManager(soundManager) {
init(ORGANISATION, "mapview");
}