NEWS: Welcome to my new homepage! <3

tile.h - freezo - A retro platform game

freezo

A retro platform game
git clone git://192.168.2.2/freezo
Log | Files | Refs | README

tile.h (583B)


      1 #pragma once
      2 
      3 typedef struct Tile tile_t;
      4 
      5 #include "util.h"
      6 #include "game.h"
      7 
      8 typedef 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_e;
     18 
     19 struct Tile {
     20   pos_t pos;
     21   tile_e type;
     22 };
     23 
     24 tile_t *tile_create(pos_t pos, tile_e type);
     25 void tile_update(tile_t *tile, game_t *game);
     26 void tile_draw(tile_t *tile, game_t *game);
     27 tile_t *tile_get(game_t *game, int x, int y);
     28 bool tile_ground(tile_t *tile);
     29 bool tile_solid(tile_t *tile);
     30 bool tile_wall(tile_t *tile);
     31 void tile_free(tile_t *tile);