supercasiobros/src/tile.c

47 lines
1.1 KiB
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};
extern image_t img_nuage;
tileset_t nuage={&img_nuage, 8, 8, 0};
extern image_t img_buisson;
tileset_t buisson={&img_buisson, 8, 8, 0};
extern image_t img_colline;
tileset_t colline={&img_colline, 8, 8, 0};
extern image_t img_bloc;
tileset_t bloc={&img_bloc, 8, 8, 0};
extern image_t img_champi;
tileset_t champi={&img_champi, 8, 8, 0};
extern image_t img_fleur;
tileset_t fleur={&img_fleur, 8, 8, 0};
extern image_t img_bullet;
tileset_t bullet={&img_bullet, 4, 4, 1};
2019-11-20 15:33:34 +01:00
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
}