From bf2520d71e770c303c6878a1515e069b22eb4452 Mon Sep 17 00:00:00 2001 From: esquizo Date: Wed, 3 Jun 2026 23:39:16 -0300 Subject: game: adicionado goal entity --- img2map | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'img2map') diff --git a/img2map b/img2map index 128fc63..2260fc6 100755 --- a/img2map +++ b/img2map @@ -8,6 +8,7 @@ width, height = img.size map_pixels = [ ] player_position = (0, 0) +goal_position = (0, 0) ghosts = [] teles = [] @@ -23,6 +24,9 @@ for y in range(height): if (r == 0x00) and (g == 0x00) and (b == 0xFF): player_position = (x, y) + if (r == 0x00) and (g == 0xFF) and (b == 0x00): + goal_position = (x, y) + if (r == 0xFF) and (g == 0x00) and (b == 0x00): ghosts.append((x, y)) @@ -49,3 +53,5 @@ print("};") print("char map_data[] = {") print("".join([ f"{x}," for x in map_pixels ])) print("};") + +print(f"int goalx = {goal_position[0]}, goaly = {goal_position[1]};") -- cgit v1.2.3