diff --git a/main.py b/main.py
index 0b959da..9a3aa78 100644
--- a/main.py
+++ b/main.py
@@ -1,4 +1,6 @@
import pygame
+import subprocess
+
pygame.init()
@@ -36,14 +38,22 @@ pacman_posy = 0
pacman_movespeed = 5
pacman_startpoint = {0,0}
pacman_size = 26
+pacman_animation = list()
+pacman_animation.append(pygame.image.load("models/pacman_1_1.png"))
+pacman_animation.append(pygame.image.load("models/pacman_1_2.png"))
+pacman_animation.append(pygame.image.load("models/pacman_1_3.png"))
+pacman_animation.append(pygame.image.load("models/pacman_1_4.png"))
+pacman_animation.append(pygame.image.load("models/pacman_1_5.png"))
+
+#TODO Pacman Animation has to been added
#Labels
-
+short_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
+hash_label = font1.render(F"git-hash: {short_hash}", 1, SCHWARZ)
#Movement
movedirection = {"up":False, "down":False, "left":False, "right":False}
-
map1 = list()
movement_map = list()
@@ -79,6 +89,8 @@ print(F"Center correction: {movement_map_center}")
pacman_posx += movement_map[0]["x"]+movement_map_center
pacman_posy += movement_map[0]["y"]+movement_map_center
+count = 0
+count2 = 0
while(gamestate==True):
MAINSCREEN.fill(WEISS)
@@ -128,8 +140,15 @@ while(gamestate==True):
pacman_posx -= pacman_movespeed
+ #print(pacman_animation)
- MAINSCREEN.blit(pacman, (pacman_posx,pacman_posy))
+ MAINSCREEN.blit(pacman_animation[count], (pacman_posx,pacman_posy))
+ print(count2)
+
+ count += 1
+
+ if count == 5: count = 0
+
for row in map1:
#print(row)
MAINSCREEN.blit(row["object"], (row["x"],row["y"]))
@@ -138,7 +157,10 @@ while(gamestate==True):
if(movedirection[item]==True):
print(F"Pacman-Position: x:{pacman_posx} y:{pacman_posy}")
-
+ #Adds visual character for vaild movementpath (DEBUG ONLY)
+ for coord in movement_map:
+ tmp = font1.render("X", 1, ROT)
+ MAINSCREEN.blit(tmp, (coord["x"], coord["y"]))
pacman_pos_label = font1.render(F"x:{pacman_posx} y:{pacman_posy}", 1, SCHWARZ)
@@ -146,9 +168,13 @@ while(gamestate==True):
MAINSCREEN.blit(pacman_pos_label, (CENTER_X,MAINSCREEN_SIZE[1]-40))
MAINSCREEN.blit(fps_label, (CENTER_X - 150,MAINSCREEN_SIZE[1]-40))
+ MAINSCREEN.blit(hash_label, (10, MAINSCREEN_SIZE[1]-40))
pygame.display.flip()
clock.tick(60)
+ count2 += 1
+ if(count2 == 60):
+ count2 = 0
\ No newline at end of file
diff --git a/models/pacman_1.png b/models/pacman_1.png
index eac5a7e..9febe77 100644
Binary files a/models/pacman_1.png and b/models/pacman_1.png differ
diff --git a/models/pacman_1.svg b/models/pacman_1.svg
index 82357c2..d3e7d1c 100644
--- a/models/pacman_1.svg
+++ b/models/pacman_1.svg
@@ -26,30 +26,108 @@
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
- inkscape:zoom="0.94167964"
- inkscape:cx="227.25351"
- inkscape:cy="267.60693"
+ inkscape:zoom="45.254834"
+ inkscape:cx="14.042699"
+ inkscape:cy="12.794213"
inkscape:window-width="2560"
inkscape:window-height="1412"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
- inkscape:current-layer="layer1" />
+ inkscape:current-layer="layer1"
+ showgrid="false">
+
+
+
+
+
+
+ id="defs1">
+
+
+
+
+
-
+
+
+
diff --git a/models/pacman_1_1.png b/models/pacman_1_1.png
new file mode 100644
index 0000000..63bbbe3
Binary files /dev/null and b/models/pacman_1_1.png differ
diff --git a/models/pacman_1_1.svg b/models/pacman_1_1.svg
new file mode 100644
index 0000000..cf11226
--- /dev/null
+++ b/models/pacman_1_1.svg
@@ -0,0 +1,155 @@
+
+
+
+
diff --git a/models/pacman_1_2.png b/models/pacman_1_2.png
new file mode 100644
index 0000000..c609e71
Binary files /dev/null and b/models/pacman_1_2.png differ
diff --git a/models/pacman_1_2.svg b/models/pacman_1_2.svg
new file mode 100644
index 0000000..fe013e5
--- /dev/null
+++ b/models/pacman_1_2.svg
@@ -0,0 +1,155 @@
+
+
+
+
diff --git a/models/pacman_1_3.png b/models/pacman_1_3.png
new file mode 100644
index 0000000..76984d8
Binary files /dev/null and b/models/pacman_1_3.png differ
diff --git a/models/pacman_1_3.svg b/models/pacman_1_3.svg
new file mode 100644
index 0000000..272044e
--- /dev/null
+++ b/models/pacman_1_3.svg
@@ -0,0 +1,155 @@
+
+
+
+
diff --git a/models/pacman_1_4.png b/models/pacman_1_4.png
new file mode 100644
index 0000000..72670f6
Binary files /dev/null and b/models/pacman_1_4.png differ
diff --git a/models/pacman_1_4.svg b/models/pacman_1_4.svg
new file mode 100644
index 0000000..9ae9d3e
--- /dev/null
+++ b/models/pacman_1_4.svg
@@ -0,0 +1,155 @@
+
+
+
+
diff --git a/models/pacman_1_5.png b/models/pacman_1_5.png
new file mode 100644
index 0000000..8ed8785
Binary files /dev/null and b/models/pacman_1_5.png differ
diff --git a/models/pacman_1_5.svg b/models/pacman_1_5.svg
new file mode 100644
index 0000000..8361fb8
--- /dev/null
+++ b/models/pacman_1_5.svg
@@ -0,0 +1,155 @@
+
+
+
+