From 27e5b07ef6b46c247764d9aa1cd3c07d8c003a5e Mon Sep 17 00:00:00 2001 From: Erik Persson Date: Tue, 19 Nov 2013 18:35:35 +0100 Subject: [PATCH] object and worldObject --- Code/GameLogic/Game.h | 5 ++++- Code/GameLogic/Object.cpp | 13 ++++++++++++ Code/GameLogic/Object.h | 24 ++++++++++++++++++++++ Code/GameLogic/Player.h | 12 +++++++++-- Code/GameLogic/WorldObject.cpp | 11 ++++++++++ Code/GameLogic/WorldObject.h | 22 ++++++++++++++++++++ Code/OysterGraphics/Core/ShaderManager.cpp | 2 -- 7 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 Code/GameLogic/Object.cpp create mode 100644 Code/GameLogic/Object.h create mode 100644 Code/GameLogic/WorldObject.cpp create mode 100644 Code/GameLogic/WorldObject.h diff --git a/Code/GameLogic/Game.h b/Code/GameLogic/Game.h index 174a3a65..122ffc7d 100644 --- a/Code/GameLogic/Game.h +++ b/Code/GameLogic/Game.h @@ -14,11 +14,14 @@ namespace GameLogic ~Game(void); void Init(); + void StartGame(); + + void Update(); + private: Level *level; Player *player; - }; } diff --git a/Code/GameLogic/Object.cpp b/Code/GameLogic/Object.cpp new file mode 100644 index 00000000..892e5f1c --- /dev/null +++ b/Code/GameLogic/Object.cpp @@ -0,0 +1,13 @@ +#include "Object.h" + +using namespace GameLogic; + + +Object::Object(void) +{ +} + + +Object::~Object(void) +{ +} diff --git a/Code/GameLogic/Object.h b/Code/GameLogic/Object.h new file mode 100644 index 00000000..9da0d596 --- /dev/null +++ b/Code/GameLogic/Object.h @@ -0,0 +1,24 @@ +#ifndef OBJECT_H +#define OBJECT_H + +namespace GameLogic +{ + + class Object + { + + public: + Object(void); + ~Object(void); + + private: + + protected: + //model + //rigidBody + + }; + +} + +#endif \ No newline at end of file diff --git a/Code/GameLogic/Player.h b/Code/GameLogic/Player.h index 776973c6..1b53740b 100644 --- a/Code/GameLogic/Player.h +++ b/Code/GameLogic/Player.h @@ -1,18 +1,26 @@ #ifndef PLAYER_H #define PLAYER_H +#include "Object.h" + namespace GameLogic { - class Player + class Player : public Object { public: Player(void); ~Player(void); - private: + void Update(); + void Move(); + void Shoot(); + + private: + //Life + //weapon }; } diff --git a/Code/GameLogic/WorldObject.cpp b/Code/GameLogic/WorldObject.cpp new file mode 100644 index 00000000..415ceca6 --- /dev/null +++ b/Code/GameLogic/WorldObject.cpp @@ -0,0 +1,11 @@ +#include "WorldObject.h" + + +WorldObject::WorldObject(void) +{ +} + + +WorldObject::~WorldObject(void) +{ +} diff --git a/Code/GameLogic/WorldObject.h b/Code/GameLogic/WorldObject.h new file mode 100644 index 00000000..9f15a62d --- /dev/null +++ b/Code/GameLogic/WorldObject.h @@ -0,0 +1,22 @@ +#ifndef WORLDOBJECT_H +#define WORLDOBJECT_H + +#include "Object.h" + +namespace GameLogic +{ + + class WorldObject : public Object + { + + public: + WorldObject(void); + ~WorldObject(void); + + private: + + + }; + +} +#endif \ No newline at end of file diff --git a/Code/OysterGraphics/Core/ShaderManager.cpp b/Code/OysterGraphics/Core/ShaderManager.cpp index fe40bb84..58242107 100644 --- a/Code/OysterGraphics/Core/ShaderManager.cpp +++ b/Code/OysterGraphics/Core/ShaderManager.cpp @@ -149,7 +149,6 @@ namespace Oyster } if(FAILED(Oyster::Core::Device->CreatePixelShader(Shader->GetBufferPointer(),Shader->GetBufferSize(),NULL,&pixel))) { - Error->Release(); Shader->Release(); return false; } @@ -205,7 +204,6 @@ namespace Oyster } if(FAILED(Oyster::Core::Device->CreateVertexShader(Shader->GetBufferPointer(),Shader->GetBufferSize(),NULL,&vertex))) { - Error->Release(); Shader->Release(); return false; }