supercasiobros/src/tile.c

28 lines
612 B
C
Raw Normal View History

2019-11-16 11:44:09 +01:00
#include "tile.h"
#include <gint/display.h>
2019-11-20 15:33:34 +01:00
extern image_t img_tuyau;
tileset_t tuyau={&img_tuyau, 8, 8, 1};
extern image_t img_brick;
tileset_t brick={&img_brick, 8, 8, 1};
extern image_t img_stone;
tileset_t earth={&img_stone, 8, 8, 1};
extern image_t img_gift;
tileset_t gift={&img_gift, 8, 8, 1};
extern image_t img_coin;
tileset_t coin={&img_coin, 8, 8, 1};
void draw_tile(int sx, int sy, tileset_t const * const set, int x, int y)
2019-11-16 11:44:09 +01:00
{
2019-11-21 19:30:23 +01:00
dsubimage(sx, 64-sy-set->height,
2019-11-20 15:33:34 +01:00
set->sheet,
x*(set->width+set->padding), y*(set->height+set->padding),
set->width,set->height,
DIMAGE_NONE);
2019-11-16 11:44:09 +01:00
}