Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Object {
- private:
- vec2 pos, source0, source1, dest0, dest1;
- float ang;
- map<string, float> data_float;
- map<string, int> data_int;
- map<string, string> data_string;
- texture tex;
- public:
- Object();
- Object(vec2 position);
- void Draw();
- void Update();
- };
- Object *activeObjects[MAX_OBJECTS];
- void objectAdd(Object *object) {
- int _i = 0;
- while (_i < MAX_OBJECTS && activeObjects[_i] != NULL)
- _i++;
- if (_i < MAX_OBJECTS)
- activeObjects[_i] = object;
- }
- class Object {
- private:
- vec2 pos, source0, source1, dest0, dest1;
- float ang;
- map<string, float> data_float;
- map<string, int> data_int;
- map<string, string> data_string;
- texture tex;
- public:
- Object() {
- objectAdd(this);
- }
- Object(vec2 position) {
- pos = position;
- }
- void Draw() {
- drawTexture2(tex, source0, source1, dest0, dest1, pos, ang);
- }
- void Update() {
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement