Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 19 lines (16 sloc) 0.687 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef _OBJECT_H
#define _OBJECT_H

#include "DeleteEmitter.h"
#include "libs.h"

class Object : public DeleteEmitter {
public:
enum Type { OBJECT, BODY, MODELBODY, DYNAMICBODY, SHIP, PLAYER, SPACESTATION, TERRAINBODY, PLANET, STAR, CARGOBODY, CITYONPLANET, PROJECTILE, MISSILE, HYPERSPACECLOUD };
virtual Type GetType() const { return OBJECT; }
virtual bool IsType(Type c) const { return GetType() == c; }
};
#define OBJDEF(__thisClass,__parentClass,__TYPE) \
virtual Object::Type GetType() const { return Object::__TYPE; } \
virtual bool IsType(Type c) const { \
if (__thisClass::GetType() == (c)) return true; \
else return __parentClass::IsType(c); }
#endif /* _OBJECT_H */
Something went wrong with that request. Please try again.