merge
This commit is contained in:
commit
3d3c3b2a36
20 files changed
+1036
-5351
No files matched your search
@@ -0,0 +1,81 @@
|
||||
#pragma once
|
||||
|
||||
#include "render/Renderer.h"
|
||||
#include "Environment.h"
|
||||
#include "render/TextureManager.h"
|
||||
#include "items/GameObjectLoader.h"
|
||||
#include "items/InteractiveObject.h"
|
||||
#include "navigation/PathFinder.h"
|
||||
#include "render/ShadowMap.h"
|
||||
|
||||
#include "ScriptEngine.h"
|
||||
#include "dialogue/DialogueSystem.h"
|
||||
namespace ZL
|
||||
{
|
||||
|
||||
class Location
|
||||
{
|
||||
public:
|
||||
Location(Renderer& iRenderer, Inventory& iInventory);
|
||||
|
||||
|
||||
std::shared_ptr<Texture> roomTexture;
|
||||
VertexRenderStruct roomMesh;
|
||||
|
||||
std::unordered_map<std::string, LoadedGameObject> gameObjects;
|
||||
|
||||
std::vector<InteractiveObject> interactiveObjects;
|
||||
|
||||
|
||||
std::unique_ptr<Character> player;
|
||||
std::vector<std::unique_ptr<Character>> npcs;
|
||||
|
||||
float cameraAzimuth = 0.0f;
|
||||
float cameraInclination = M_PI * 30.f / 180.f;
|
||||
|
||||
PathFinder navigation;
|
||||
|
||||
std::unique_ptr<ShadowMap> shadowMap;
|
||||
Eigen::Matrix4f cameraViewMatrix = Eigen::Matrix4f::Identity();
|
||||
InteractiveObject* targetInteractiveObject = nullptr;
|
||||
|
||||
ScriptEngine scriptEngine;
|
||||
Dialogue::DialogueSystem dialogueSystem;
|
||||
|
||||
#ifdef SHOW_PATH
|
||||
std::vector<VertexRenderStruct> debugNavMeshes;
|
||||
void buildDebugNavMeshes();
|
||||
void drawDebugNavigation();
|
||||
#endif
|
||||
bool rightMouseDown = false;
|
||||
int lastMouseX = 0;
|
||||
int lastMouseY = 0;
|
||||
|
||||
|
||||
void setup();
|
||||
void setupNavigation();
|
||||
InteractiveObject* raycastInteractiveObjects(const Eigen::Vector3f& rayOrigin, const Eigen::Vector3f& rayDir);
|
||||
Character* raycastNpcs(const Eigen::Vector3f& rayOrigin, const Eigen::Vector3f& rayDir, float maxDistance = 100.0f);
|
||||
|
||||
void drawGame();
|
||||
void drawShadowDepthPass();
|
||||
void drawGameWithShadows();
|
||||
|
||||
bool setNavigationAreaAvailable(const std::string& areaName, bool available);
|
||||
|
||||
void update(int64_t deltaMs);
|
||||
|
||||
void handleDown(int64_t fingerId, int eventX, int eventY, int mx, int my);
|
||||
void handleUp(int64_t fingerId, int mx, int my);
|
||||
void handleMotion(int64_t fingerId, int eventX, int eventY, int mx, int my);
|
||||
|
||||
bool requestDialogueStart(const std::string& dialogueId);
|
||||
void setDialogueFlag(const std::string& flag, int value);
|
||||
int getDialogueFlag(const std::string& flag) const;
|
||||
|
||||
protected:
|
||||
Renderer& renderer;
|
||||
Inventory& inventory;
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user