diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2012-05-25 19:08:33 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2012-05-25 19:08:33 (GMT) |
commit | 6b2c2f152a025586ff296b1320f96a12f8617ee2 (patch) | |
tree | dc5bd36917b81a533f6bba9d936a99bdecf4f981 | |
parent | 326d598606abc975ace1b2e44f93ec080fc80412 (diff) |
fix black rectangle in the background
-rw-r--r-- | horse.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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])) |