summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-08 04:03:58 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-08 04:03:58 +0200
commitc7e08b140b33ff9ac47123b9a892c1209ff72c95 (patch)
treea043b76dea64f8bfb180889022292fd8266b96e8
parent5e3c0df770b759ade210f3b6a4eafb5a0788912b (diff)
cleanup + virus zoom fix
-rw-r--r--test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test.py b/test.py
index f373dc4..a343116 100644
--- a/test.py
+++ b/test.py
@@ -98,7 +98,7 @@ def drawCell(cell):
if cell.is_virus:
color = (0,255,0)
color2 = (100,255,0)
- polygon = generateVirus(int(cell.size*0.3), 5, radius, (cx, cy))
+ polygon = generateVirus(int(cell.size*0.3), 10*zoom, radius, (cx, cy))
gfxdraw.filled_polygon(screen, polygon, color2)
gfxdraw.aapolygon(screen, polygon, color)
@@ -133,10 +133,12 @@ c.send_spectate()
screensize=(800,600)
screen=pygame.display.set_mode(screensize,HWSURFACE|DOUBLEBUF|RESIZABLE)
+zoom = calc_zoom()
i=0
mb=pygame.mouse.get_pressed()
+
while True:
pygame.event.pump()
@@ -144,9 +146,7 @@ while True:
if event.type==VIDEORESIZE:
screensize = event.dict['size']
screen=pygame.display.set_mode(screensize,HWSURFACE|DOUBLEBUF|RESIZABLE)
- zoom1 = screensize[0] / 2051.
- zoom2 = screensize[1] / 1216.
- zoom = max(zoom1,zoom2)
+ zoom = calc_zoom()
pygame.display.update()
i=i+1