summaryrefslogtreecommitdiff
path: root/img2map
diff options
context:
space:
mode:
authoresquizo <esquizo+noreply@esquizo.net>2026-06-03 23:39:16 -0300
committeresquizo <esquizo+noreply@esquizo.net>2026-06-03 23:39:16 -0300
commitbf2520d71e770c303c6878a1515e069b22eb4452 (patch)
tree2fe897d9c317b5cd78423b0c9b837b2a198f66c5 /img2map
parentb432ece87df0260290f0f8f408bdcaf922d05c22 (diff)
game: adicionado goal entity
Diffstat (limited to 'img2map')
-rwxr-xr-ximg2map6
1 files changed, 6 insertions, 0 deletions
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]};")