From 7015245de4af673af3e6fa62d5d0f9c2e0c2a8a1 Mon Sep 17 00:00:00 2001 From: jonas Date: Thu, 27 Dec 2018 00:26:34 +0100 Subject: cleaned working tree --- cObjectHandler.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cObjectHandler.h (limited to 'cObjectHandler.h') diff --git a/cObjectHandler.h b/cObjectHandler.h new file mode 100644 index 0000000..1749c9b --- /dev/null +++ b/cObjectHandler.h @@ -0,0 +1,37 @@ +#pragma once + +#include + +#include "cObject.h" + +//movemodes +#define _MOVE_RELATIVE 0 +#define _MOVE_ABSOULUTE 1 + +using namespace std; + +class cObject; //Circular dependency break (Bad practice. I Know.) + +class cObjectHandler +{ +public: + cObjectHandler(cRender *_render); + + int createObject(cObject *_object); + //Adds _object to managed objects vector + //returns Identifier for newly created vector + + int moveObject(int _object, sPos _pos, int _mode); + //Alters position of _object by _pos either relative to old position or Absolute + //Depending on selected _mode (_MOVE_RELATIVE / _MOVE_ABSOLUTE). + + int destroyObject(int _object); + //removes _object from vector after deleting it + + int write(); + //writes all objects in objects[] to render buffer + +private: + vector objects; + cRender *render; +}; -- cgit v1.2.3