changeset 20:23362ba05813

Smoother scrolling
author Radomir Dopieralski <moindev@sheep.art.pl>
date Mon, 17 Dec 2007 13:55:54 +0100
parents c0831cdd7eaa
children 0eb938bf70fe
files lib/game.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lib/game.py	Mon Dec 17 13:52:25 2007 +0100
+++ b/lib/game.py	Mon Dec 17 13:55:54 2007 +0100
@@ -36,16 +36,16 @@
         while 1:
             # Update the screen
             if hscroll or vscroll:
-                if hscroll>3:
-                    hs = 4
-                elif hscroll<-3:
-                    hs = -4
+                if hscroll>4:
+                    hs = 5
+                elif hscroll<-4:
+                    hs = -5
                 else:
                     hs = 0
-                if vscroll>3:
-                    vs = 4
-                elif vscroll<-3:
-                    vs = -4
+                if vscroll>2:
+                    vs = 3
+                elif vscroll<-2:
+                    vs = -3
                 else:
                     vs = 0
                 self.level.scroll(hs, vs)