thing_struct.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef THING_STRUCT_H_INCLUDED
  2. #define THING_STRUCT_H_INCLUDED
  3. #include "bevec.h"
  4. #include "area.h"
  5. #include "bump.h"
  6. #include "spritestate.h"
  7. /**
  8. * A Thing is any in-game object that appears the world/map view.
  9. */
  10. struct Thing_ {
  11. int kind; /* What kind of thing it is. Same as collision type. */
  12. int id; /* Numericial ID. */
  13. int flags; /* State flags. */
  14. Area * area; /* Area the thing is in, if any. */
  15. BumpBody * physical; /* Physical body of the thing. Is NULL for statical body. */
  16. BumpHull * hull; /* Main colision hull of the thing. */
  17. int z; /* Layer the thing is in. */
  18. void * data; /* Logical data of the thing. */
  19. BeVec size; /* size of outline of shape */
  20. BeVec spos;
  21. /* Sprite information. Also used as the reference for the direction
  22. * the thing is facing.
  23. */
  24. SpriteState spritestate;
  25. /* Link back to "owner" for attacks, etc. Null if independent. */
  26. struct Thing_ * owner;
  27. /* Linked things, such as searchers, attacks, spells. */
  28. struct Thing_ * linked[THING_LINKED_MAX];
  29. };
  30. #endif