comparison src/map.h @ 46:b815621df3e3

core: remove all fixed width integers, closes #2460
author David Demelier <markand@malikania.fr>
date Wed, 15 Jan 2020 22:31:17 +0100
parents 22a09a5ee476
children 402aa7dcffe1
comparison
equal deleted inserted replaced
45:e10fd1b6323f 46:b815621df3e3
23 * \file map.h 23 * \file map.h
24 * \brief Game map. 24 * \brief Game map.
25 */ 25 */
26 26
27 #include <stdbool.h> 27 #include <stdbool.h>
28 #include <stdint.h>
29 28
30 #include "sprite.h" 29 #include "sprite.h"
31 30
32 /** 31 /**
33 * \brief Max title length for a map. 32 * \brief Max title length for a map.
38 37
39 /** 38 /**
40 * \brief Map layer. 39 * \brief Map layer.
41 */ 40 */
42 struct map_layer { 41 struct map_layer {
43 uint16_t *tiles; /*!< Array of tiles, depending on the map size. */ 42 unsigned short *tiles; /*!< (RO) Array of tiles, depending on the map size. */
44 }; 43 };
45 44
46 /** 45 /**
47 * \brief Map object. 46 * \brief Map object.
48 */ 47 */
49 struct map { 48 struct map {
50 char title[MAP_TITLE_MAX]; /*!< (RW) The map title */ 49 char title[MAP_TITLE_MAX]; /*!< (RW) The map title */
51 struct texture *tileset; /*!< (RW) Tileset to use */ 50 struct texture *tileset; /*!< (RW) Tileset to use */
52 struct texture *picture; /*!< (RO) Map drawn into a picture */ 51 struct texture *picture; /*!< (RO) Map drawn into a picture */
53 struct sprite sprite; /*!< (RO) Sprite to render */ 52 struct sprite sprite; /*!< (RO) Sprite to render */
54 uint16_t width; /*!< (RO) Map width in cells */ 53 unsigned int width; /*!< (RO) Map width in cells */
55 uint16_t height; /*!< (RO) Map height in cells */ 54 unsigned int height; /*!< (RO) Map height in cells */
56 uint8_t tilewidth; /*!< (RO) Pixels per cell (width) */ 55 unsigned short tilewidth; /*!< (RO) Pixels per cell (width) */
57 uint8_t tileheight; /*!< (RO) Pixels per cell (height) */ 56 unsigned short tileheight; /*!< (RO) Pixels per cell (height) */
58 struct map_layer layers[2]; /*!< (RO) Layers (background, foreground) */ 57 struct map_layer layers[2]; /*!< (RO) Layers (background, foreground) */
59 }; 58 };
60 59
61 /** 60 /**
62 * Open a map. 61 * Open a map.