tilepane.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef ERUTA_TILEPANE_H
  2. #define ERUTA_TILEPANE_H
  3. // Uses camera too
  4. #include "camera.h"
  5. typedef struct Tilepane_ Tilepane;
  6. Tilepane * tilepane_done (Tilepane * pane );
  7. Tilepane * tilepane_free (Tilepane * pane );
  8. Tilepane * tilepane_init (Tilepane * pane , Tileset * set , int gridwide , int gridhigh );
  9. Tilepane * tilepane_new (Tileset * set , int gridwide , int gridhigh );
  10. int tilepane_gridwide (Tilepane * pane );
  11. int tilepane_gridhigh (Tilepane * pane );
  12. int tilepane_tilewide (Tilepane * pane );
  13. int tilepane_tilehigh (Tilepane * pane );
  14. int tilepane_wide (Tilepane * pane );
  15. int tilepane_high (Tilepane * pane );
  16. int tilepane_outsidegrid (Tilepane * pane , int gridx , int gridy );
  17. Tile * tilepane_set (Tilepane * pane , int gridx , int gridy , Tile * tile );
  18. Tile * tilepane_get (Tilepane * pane , int gridx , int gridy );
  19. int tilepane_getindex (Tilepane * pane , int gridx , int gridy );
  20. Tile * tilepane_rect (Tilepane * pane , int gridx , int gridy , int gridw , int gridh , Tile * tile );
  21. Tile * tilepane_fill (Tilepane * pane , Tile * tile );
  22. void tilepane_draw (Tilepane * pane , Camera * camera );
  23. void tilepane_update (Tilepane * pane , double dt );
  24. Tileset * tilepane_tileset_ (Tilepane * pane , Tileset * set );
  25. Tileset * tilepane_tileset (Tilepane * pane );
  26. Tile * tilepane_getfromset (Tilepane * pane , int index );
  27. Tile * tilepane_setindex (Tilepane * pane , int gridx , int gridy , int index );
  28. Tile * tilepane_rectindex (Tilepane * pane , int gridx , int gridy , int gridw , int gridh , int index );
  29. Tile * tilepane_fillindex (Tilepane * pane , int index );
  30. bool tilepane_init_blend(Tilepane * self, int index);
  31. void tilepane_draw_blends(Tilepane * pane, Camera * camera);
  32. void tilepane_draw_shadows_of(Tilepane * pane, Tilepane * pane_below, Camera * camera);
  33. int tilepane_set_flags(Tilepane * pane, int gridx, int gridy, int flags);
  34. int tilepane_get_flags(Tilepane * pane, int gridx, int gridy);
  35. void tilepane_set_raw_flags(Tilepane * pane, int gridx, int gridy, int flags);
  36. int tilepane_get_raw_flags(Tilepane * pane, int gridx, int gridy);
  37. #endif