camera_struct.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef CAMERA_STRUCT_H_INCLUDED
  2. #define CAMERA_STRUCT_H_INCLUDED
  3. #include "rebox.h"
  4. #include "inli.h"
  5. #include "thing.h"
  6. /** A Panner is a goal for panning the Camera. */
  7. struct Panner_ {
  8. Point goal;
  9. float speed;
  10. int flags;
  11. };
  12. /** A PannerList is an intrusive linked list of panners. */
  13. struct PannerList_ {
  14. Panner panner;
  15. Inli list;
  16. };
  17. /** A Lockin locks in the Camera in a certain rectangular region. */
  18. struct Lockin_ {
  19. Rebox box;
  20. int flags;
  21. };
  22. /** A LockinList is an intrusive list of Lockins. */
  23. struct LockinList_ {
  24. Lockin lockin;
  25. Inli list;
  26. };
  27. /** Panners a camera can have. */
  28. #define CAMERA_PANNERS 32
  29. /** Trackers a camera can have. */
  30. #define CAMERA_TRACKERS 32
  31. /** The Camera is one (or more if using split screen) of the
  32. * rectangular views that the player has on the game world.
  33. **/
  34. struct Camera_ {
  35. Rebox box;
  36. Point speed;
  37. /* The "walls" the camera has to stay inside if enabled. */
  38. Point walls;
  39. Point wallsize;
  40. /* Head of doubly linked list for the panners. */
  41. PannerList * panners;
  42. /* Head of doubly linked list for the lockins. */
  43. LockinList * lockins;
  44. /* Thing that is being tracked. */
  45. Thing * track;
  46. int flags;
  47. };
  48. #endif