The bitmap wars source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

map.h 591B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef MAP_H
  2. #define MAP_H
  3. extern const int dim_x;
  4. extern const int dim_y;
  5. #include <stdbool.h>
  6. #include "item.h"
  7. #define EARTH 0
  8. #define WATER 1
  9. #define MOUNTAIN 2
  10. struct generic_map // map à l'échelle d'un point
  11. {
  12. int terrain;
  13. bool explored; // brouillard de guerre
  14. generic_item item;
  15. };
  16. typedef struct generic_map generic_map;
  17. void create_map();
  18. // hidden true, shown false
  19. bool get_visibility(int x, int y);
  20. int get_terrain(int x,int y);
  21. generic_item* get_item(int x, int y);
  22. void set_item(int x, int y, generic_item const * const item);
  23. void display();
  24. #endif