diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-06-03 23:39:16 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-06-03 23:39:16 -0300 |
| commit | bf2520d71e770c303c6878a1515e069b22eb4452 (patch) | |
| tree | 2fe897d9c317b5cd78423b0c9b837b2a198f66c5 /img2map | |
| parent | b432ece87df0260290f0f8f408bdcaf922d05c22 (diff) | |
game: adicionado goal entity
Diffstat (limited to 'img2map')
| -rwxr-xr-x | img2map | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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]};") |
