Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reworking engine API. Some files for successful building

  • Loading branch information...
commit 884329a436b2a7172076f34b4b2c64226cca15fb 1 parent 0c8062e
@Ockonal Ockonal authored
View
8 include/Engine.hpp
@@ -34,7 +34,7 @@ namespace Engine
GameApplication &Application() { return GameApplication::get_mutable_instance(); }
void setDimension(string &dimension) { Utils::get_mutable_instance().setDimension(dimension); }
const float GetElapsed() { return GameApplication::get_const_instance().getElapsed(); }
-
+/*
Object *MakeObject(const string& entityName)
{
return EntityManager::get_mutable_instance().MakeObject(entityName);
@@ -59,7 +59,7 @@ namespace Engine
return EntityManager::get_mutable_instance().GetLight(entityName);
}
- /*Camera *MakeCamera(const string &cameraName, bool attachViewport = false, Camera::CameraType camType = Camera::DONT_USE,
+ Camera *MakeCamera(const string &cameraName, bool attachViewport = false, Camera::CameraType camType = Camera::DONT_USE,
const float nearClip = 1, const float farClip = 1000,
bool autoAR = true, const float FOV = 90, vec3 pos = vec3(0, 1000, 1000), vec3 lookAt = vec3(0, 0, 0))
{
@@ -73,7 +73,7 @@ namespace Engine
localTemp->setCameraType(camType);
return localTemp;
- }*/
+ }
Camera *MakeCamera(const string &name, const string filename)
{
@@ -86,7 +86,7 @@ namespace Engine
{
return EntityManager::get_mutable_instance().GetCamera(cameraName);
}
-
+*/
unsigned int GetWidth() { return Systems::GetGraphic().getWindow()->getWidth(); }
unsigned int GetHeight() { return Systems::GetGraphic().getWindow()->getHeight(); }
View
2  samples/pong-cpp/main.cpp
@@ -33,6 +33,7 @@ class GameState : public State
{
public:
void init() {
+ /*
//World::MakeCamera("MenuCamera", true, Camera::FREE);
Camera *cam = World::MakeCamera("MainCamera", "MainCamera");
//GraphicSystem::get_mutable_instance().getViewport()->setCamera(cam->cameraHandle());
@@ -48,6 +49,7 @@ class GameState : public State
World::GetLight("SpotLight")->lightHandle()->setPosition(vec3(300, 300, 0));
World::MakeObject("ErrorObject");
+ */
}
string type() { return "GameState"; }
View
31 src/Managers/EntityManager.cpp
@@ -1,36 +1,5 @@
#include "Managers/EntityManager.hpp"
-Object *EntityManager::MakeObject(const string& entityName)
-{
- return this->MakeEntity<Object>(entityName);
-}
-
-Object *EntityManager::GetObject(const string& entityName)
-{
- return this->GetEntity<Object>(entityName);
-}
-
-Light *EntityManager::MakeLight(const string& entityName)
-{
- return this->MakeEntity<Light>(entityName);
-}
-
-Light *EntityManager::GetLight(const string& entityName)
-{
- return this->GetEntity<Light>(entityName);
-}
-
-Camera *EntityManager::MakeCamera(const string& cameraName)
-{
- return this->MakeEntity<Camera>(cameraName);
-}
-
-Camera *EntityManager::GetCamera(const string& cameraName)
-{
- return this->GetEntity<Camera>(cameraName);
-}
-
-
bool EntityManager::DeleteEntity(const string& entityName)
{
if (mEntityList.count(entityName) == 0)
Please sign in to comment.
Something went wrong with that request. Please try again.