Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-05-25 19:08:33 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-05-25 19:08:33 (GMT)
commit6b2c2f152a025586ff296b1320f96a12f8617ee2 (patch)
treedc5bd36917b81a533f6bba9d936a99bdecf4f981
parent326d598606abc975ace1b2e44f93ec080fc80412 (diff)
fix black rectangle in the background
-rw-r--r--horse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/horse.py b/horse.py
index 967bdb0..50da427 100644
--- a/horse.py
+++ b/horse.py
@@ -61,8 +61,8 @@ class Game():
# paint background image
# TODO: there is probably a better way to tile the background image
# (and perhaps to tile it only once, and save the base image)
- tilex=int(math.ceil(self.screen_size[0]/self.grass_size[0]))
- tiley=int(math.ceil(self.screen_size[1]/self.grass_size[1]))
+ tilex=int(math.ceil(self.screen_size[0]/float(self.grass_size[0])))
+ tiley=int(math.ceil(self.screen_size[1]/float(self.grass_size[1])))
for x in range(0,tilex):
for y in range(0,tiley):
screen.blit(self.grass_image,(x*self.grass_size[0],y*self.grass_size[1]))