diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2016-09-25 18:38:34 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2016-09-25 18:38:34 +0200 |
commit | 2c12d19204aa198bf8537bcdb137b40f0c7317e9 (patch) | |
tree | 2b0ea3e0feb0df50449fdd99e0b1dfa3a2f82c16 /AmpelJonas/cObjectHandler.h | |
download | termgl-2c12d19204aa198bf8537bcdb137b40f0c7317e9.tar.gz |
Initial
Diffstat (limited to 'AmpelJonas/cObjectHandler.h')
-rw-r--r-- | AmpelJonas/cObjectHandler.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/AmpelJonas/cObjectHandler.h b/AmpelJonas/cObjectHandler.h new file mode 100644 index 0000000..47598f2 --- /dev/null +++ b/AmpelJonas/cObjectHandler.h @@ -0,0 +1,32 @@ +#pragma once +#include "stdafx.h" + +//movemodes +#define _MOVE_RELATIVE 0 +#define _MOVE_ABSOULUTE 1 + +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<cObject*> objects; + cRender *render; +};
\ No newline at end of file |