so://phie

freezo

A retro platform game
git clone git://soophie.de/freezo

blob: b38da6004eb89c6cc1b43fa5947f54b956cf27a2 (698 bytes)[doc][blame][raw]

1#pragma once

2

3typedef struct Tile tile_t;

4

5#include "util.h"

6#include "game.h"

7

8typedef enum {

9 TILE_AIR,

10 TILE_WOOD_PLATFORM,

11 TILE_STONE_JOINT,

12 TILE_STONE_WALL,

13 TILE_GRASS,

14 TILE_STONE,

15 TILE_SNOW,

16 TILE_SAND,

17 TILE_BG_CHANDELIER,

18 TILE_BG_WINDOW,

19 TILE_BG_BANNER,

20 TILE_BG_BRICK_1,

21 TILE_BG_BRICK_2,

22 TILE_BG_BRICK_3,

23} tile_e;

24

25struct Tile {

26 pos_t pos;

27 tile_e type;

28};

29

30tile_t *tile_create(pos_t pos, tile_e type);

31void tile_update(tile_t *tile, game_t *game);

32void tile_draw(tile_t *tile, game_t *game);

33tile_t *tile_get(game_t *game, int x, int y);

34bool tile_ground(tile_t *tile);

35bool tile_solid(tile_t *tile);

36bool tile_wall(tile_t *tile);

37void tile_free(tile_t *tile);