mirror of
https://github.com/zoriya/Gamacon.git
synced 2026-05-28 09:27:29 +00:00
fix the click with the offset of map
This commit is contained in:
@@ -73,7 +73,7 @@ struct transform_component *pos, struct vertex_component *info)
|
||||
|
||||
if (!info || !info->map)
|
||||
return;
|
||||
tl = get_tile_from_pos(info, (gc_vector2){wp.x, wp.y});
|
||||
tl = get_tile_from_pos(info, (gc_vector2){wp.x - pos->position.x, wp.y + pos->position.y});
|
||||
for (i = 0; info->map[i].corners[0]; i++);
|
||||
for (i--; i >= 0; i--) {
|
||||
draw_tile(this, pos->position, &info->map[i], &info->map[i] == tl);
|
||||
|
||||
Reference in New Issue
Block a user