mirror of
https://github.com/zoriya/Gamacon.git
synced 2026-05-31 10:36:14 +00:00
Fixing the position of the entity drawn by the map
This commit is contained in:
@@ -97,7 +97,7 @@ struct vertex_component *info, float dt)
|
||||
return;
|
||||
tl = get_tile_from_pos(info, gc_vector2_add(pos, *(gc_vector2 *)&w));
|
||||
for (i = 0; info->map[i].corners[0]; i++) {
|
||||
sfmlrenderer_manage_hovered_tile(this, &info->map[i] == tl);
|
||||
sfmlrenderer_manage_hovered_tile(this, &info->map[i] == tl || info->map[i].entity);
|
||||
sfmlrenderer_draw_tile(engine, pos, &info->map[i], dt);
|
||||
}
|
||||
// printf("-----------------------------------------------------------\n");
|
||||
|
||||
@@ -21,7 +21,7 @@ struct tile *tile, gc_vector2 map_offset) {
|
||||
link->tile = tile;
|
||||
if (!tra)
|
||||
return;
|
||||
tra->position = gc_vector2_from_coords(c->x, c->y, c->z);
|
||||
tra->position = gc_vector2_from_coords(c->x + .5, c->y + .5, c->z);
|
||||
tra->position.x += map_offset.x;
|
||||
tra->position.y += map_offset.y;
|
||||
tra->position.y *= -1;
|
||||
|
||||
Reference in New Issue
Block a user