center drawing
This commit is contained in:
parent
c165e7b51b
commit
0509f62e2f
|
@ -17,3 +17,4 @@
|
|||
#define JUMP_GRACE 6
|
||||
#define BURN_DEATH 3
|
||||
#define BOUNCE_SPEED -2.0f
|
||||
#define DRAW_OFF_X -2
|
||||
|
|
|
@ -106,8 +106,9 @@ level_draw(void)
|
|||
while (i-- > 0) {
|
||||
const struct VisualData *const vd = &level.visual_data[i];
|
||||
if (vd->visible) {
|
||||
dsubimage(vd->x, vd->y, &bimg_tileset, vd->img_x,
|
||||
vd->img_y, TILE_SIZE, TILE_SIZE, 0);
|
||||
dsubimage(vd->x + DRAW_OFF_X, vd->y, &bimg_tileset,
|
||||
vd->img_x, vd->img_y, TILE_SIZE, TILE_SIZE,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ player_update(struct Player *p)
|
|||
void
|
||||
player_draw(struct Player *p)
|
||||
{
|
||||
draw_rectangle(C_WHITE, p->pos.x, p->pos.y, PLAYER_WIDTH,
|
||||
draw_rectangle(C_WHITE, p->pos.x + DRAW_OFF_X, p->pos.y, PLAYER_WIDTH,
|
||||
PLAYER_HEIGHT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue