From f847c7ce239d3ed59bdf70db421d92e5f91cc7a6 Mon Sep 17 00:00:00 2001 From: ViktorLjung Date: Thu, 13 Mar 2014 19:39:11 +0100 Subject: [PATCH] Delete orig :P --- Escape-the-Dawn/GameWorld.cpp.orig | 174 ----------------------------- Escape-the-Dawn/GameWorld.h.orig | 53 --------- 2 files changed, 227 deletions(-) delete mode 100644 Escape-the-Dawn/GameWorld.cpp.orig delete mode 100644 Escape-the-Dawn/GameWorld.h.orig diff --git a/Escape-the-Dawn/GameWorld.cpp.orig b/Escape-the-Dawn/GameWorld.cpp.orig deleted file mode 100644 index 4de26d7..0000000 --- a/Escape-the-Dawn/GameWorld.cpp.orig +++ /dev/null @@ -1,174 +0,0 @@ -#include "GameWorld.h" - - -void GameWorld::Initialize() -{ - World::Initialize(); - - //AddSystem("LevelGenerationSystem"); - AddSystem("InputSystem"); - AddSystem("CollisionSystem"); - //AddSystem("ParticleSystem"); - AddSystem("PlayerSystem"); - AddSystem("SoundSystem"); - AddSystem("RenderSystem"); - - std::shared_ptr transform; - std::shared_ptr model; - std::shared_ptr pointLight; - std::shared_ptr camera; - std::shared_ptr bounds; - std::shared_ptr collision; - EntityID ent; - - // Camera - entcamera = CreateEntity(); - SetProperty(entcamera, "Name", std::string("Camera")); - transform = AddComponent(entcamera, "Transform"); - AddComponent(entcamera, "Input"); - transform->Position = glm::vec3(0.f, 2.f, 10.f); - camera = AddComponent(entcamera, "Camera"); - camera->FOV = 45.f; - camera->FarClip = 1000.f; - camera->NearClip = 0.01f; - transform->Orientation = glm::angleAxis(glm::radians(25.0f),glm::vec3(1,0,0)); - collision = AddComponent(entcamera, "Collision"); - collision->Phantom = false; - bounds = AddComponent(entcamera, "Bounds"); - bounds->Origin = transform->Position; - bounds->VolumeVector = glm::vec3(4.f,2.f,2.f); - - // Fucking lights - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(0.f, 4.f, 0.f); - transform->Position = glm::vec3(10.f, 2.f, 5.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(1.0, 1.0, 5.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "sphere.obj"; - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(10.f, 4.f, 0.f); - transform->Position = glm::vec3(0.f, 2.f, 5.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(1.0, 1.0, 1.0); - pointLight->Specular = glm::vec3(3.0, 3.0, 3.0); - pointLight->Diffuse = glm::vec3(3.0, 0.0, 0.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "sphere.obj"; - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(0.f, -4.f, 0.f); - transform->Position = glm::vec3(-10.f, 2.f, 5.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(0.0, 3.0, 0.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "sphere.obj"; - - //ground - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(0.f, 0.f, 0.f); - model = AddComponent(ent, "Model"); - model->ModelFile = "plane.obj"; - - // Player -<<<<<<< HEAD - player1 = CreateEntity(); - transform = AddComponent(player1, "Transform"); - transform->Position = glm::vec3(0.f, 0.f, 0.f); - model = AddComponent(player1, "Model"); - model->ModelFile = "ship.obj"; - collision = AddComponent(player1, "Collision"); - collision->Phantom = false; - bounds = AddComponent(player1, "Bounds"); - bounds->Origin = transform->Position; - bounds->VolumeVector = glm::vec3(10.f,10.f,5.f); - - - player2 = CreateEntity(); - transform = AddComponent(player2, "Transform"); - transform->Position = glm::vec3(10.f, 0.f, 0.f); - model = AddComponent(player2, "Model"); -======= - m_Player = CreateEntity(); - transform = AddComponent(m_Player, "Transform"); - transform->Position = glm::vec3(0.f, 4.f, 0.f); - model = AddComponent(m_Player, "Model"); - model->ModelFile = "ship.obj"; - auto bounds = AddComponent(m_Player, "Bounds"); - bounds->Origin = glm::vec3(0.f); - bounds->VolumeVector = glm::vec3(1.0f, 2.0f, 3.0f); - - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(10.f, 4.f, 0.f); - model = AddComponent(ent, "Model"); ->>>>>>> 21b2e3bdc15ac8b21f027a7f531574f46187ae80 - model->ModelFile = "ship.obj"; - collision = AddComponent(player2, "Collision"); - collision->Phantom = false; - bounds = AddComponent(player2, "Bounds"); - bounds->Origin = transform->Position; - bounds->VolumeVector = glm::vec3(2.f,2.f,2.f); -} - -void GameWorld::Update(double dt) -{ - World::Update(dt); -<<<<<<< HEAD - if(GetSystem("CollisionSystem")->Intersects(player1, entcamera)) - assert(false); -======= - - auto transform = GetComponent(m_Player, "Transform"); - transform->Orientation = transform->Orientation * glm::angleAxis(dt, glm::vec3(0, 0, 1)); ->>>>>>> 21b2e3bdc15ac8b21f027a7f531574f46187ae80 -} - -void GameWorld::RegisterComponents() -{ - m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); }); - m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); }); - m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); }); - m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); }); - m_ComponentFactory.Register("Input", []() { return new Components::Input(); }); - m_ComponentFactory.Register("Model", []() { return new Components::Model(); }); - m_ComponentFactory.Register("ParticleEmitter", []() { return new Components::ParticleEmitter(); }); - m_ComponentFactory.Register("PointLight", []() { return new Components::PointLight(); }); - m_ComponentFactory.Register("PowerUp", []() { return new Components::PowerUp(); }); - m_ComponentFactory.Register("SoundEmitter", []() { return new Components::SoundEmitter(); }); - m_ComponentFactory.Register("Sprite", []() { return new Components::Sprite(); }); - m_ComponentFactory.Register("Stat", []() { return new Components::Stat(); }); - m_ComponentFactory.Register("Template", []() { return new Components::Template(); }); - m_ComponentFactory.Register("Transform", []() { return new Components::Transform(); }); -} - -void GameWorld::RegisterSystems() -{ - //m_SystemFactory.Register("LevelGenerationSystem", [this]() { return new Systems::LevelGenerationSystem(this); }); - m_SystemFactory.Register("InputSystem", [this]() { return new Systems::InputSystem(this, m_Renderer); }); - m_SystemFactory.Register("CollisionSystem", [this]() { return new Systems::CollisionSystem(this); }); - //m_SystemFactory.Register("ParticleSystem", [this]() { return new Systems::ParticleSystem(this); }); - m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); }); - m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this); }); - m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_Renderer); }); -} \ No newline at end of file diff --git a/Escape-the-Dawn/GameWorld.h.orig b/Escape-the-Dawn/GameWorld.h.orig deleted file mode 100644 index c281acc..0000000 --- a/Escape-the-Dawn/GameWorld.h.orig +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef GameWorld_h__ -#define GameWorld_h__ - -#include "World.h" -#include "Renderer.h" - -#include "Systems/CollisionSystem.h" -#include "Systems/InputSystem.h" -#include "Systems/LevelGenerationSystem.h" -#include "Systems/ParticleSystem.h" -#include "Systems/PlayerSystem.h" -#include "Systems/RenderSystem.h" -#include "Systems/SoundSystem.h" - -#include "Components/Bounds.h" -#include "Components/Camera.h" -#include "Components/Collision.h" -#include "Components/DirectionalLight.h" -#include "Components/Input.h" -#include "Components/Model.h" -#include "Components/ParticleEmitter.h" -#include "Components/PointLight.h" -#include "Components/PowerUp.h" -#include "Components/SoundEmitter.h" -#include "Components/Sprite.h" -#include "Components/Stat.h" -#include "Components/Template.h" -#include "Components/Transform.h" - -class GameWorld : public World -{ -public: - GameWorld(std::shared_ptr renderer) - : m_Renderer(renderer), World() { } - - void Initialize(); - - void RegisterSystems() override; - void RegisterComponents() override; - - void Update(double dt) ; - -private: - std::shared_ptr m_Renderer; -<<<<<<< HEAD - EntityID entcamera, player1, player2; -======= - - EntityID m_Player; ->>>>>>> 21b2e3bdc15ac8b21f027a7f531574f46187ae80 -}; - -#endif // GameWorld_h__