<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>mm9/blue/stand.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -25,8 +25,8 @@ class String
     &quot;#{self}.yml&quot;.is_file?
   end
   
-  def anim(tile_width, tile_height)
-    Animation.cache(self, tile_width, tile_height)
+  def anim(tile_width, tile_height, duration=1)
+    Animation.cache(self, tile_width, tile_height, duration)
   end
   
   def img
@@ -50,7 +50,7 @@ class Animation
       @frames = []
     
       @yml['frames'].each do |frame|
-        @frames &lt;&lt; [frame['duration'] || 3, Image.cache(frame['image'])]
+        @frames &lt;&lt; [frame['duration'] || duration, Image.cache(frame['image'])]
       end
     end
 #  rescue
@@ -58,7 +58,8 @@ class Animation
   end
   
   def draw x, y, order=0, zoom_x=1, zoom_y=1
-    @frames[Gosu::milliseconds / 100 % @frames.size][1].draw(x, y, order, zoom_x, zoom_y)
+    current_frame = (Gosu::milliseconds / (100*@frames[0][0]) % @frames.size) # hackish
+    @frames[current_frame][1].draw(x, y, order, zoom_x, zoom_y)
   end
 end
 </diff>
      <filename>activeresource.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ class Window &lt; Gosu::Window
     @@resolution = r
   end
   
-  def self.fullscreen= f
+  def self.fullscreen f
     @@fullscreen = f
   end
 </diff>
      <filename>backend/output/gosu.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,32 +5,55 @@ require &quot;yaml&quot;
 # thx http://youtube.com/watch?v=9pUmfxM9h54
 
 class Mm9 &lt; Game
+  fullscreen false
+
   def setup
-    @objects &lt;&lt; Ball.new
+    @objects &lt;&lt; Player.new
   end
 
   def draw
     super
-    &quot;mm9/blue/run&quot;.anim(24,24).draw(mouse_x,mouse_y) # zoom
   end
 end
 
-class Ball &lt; Gameobject
+class Player &lt; Gameobject
   def initialize
     @x = 0
     @y = 0
-    @velocity_x = 10
-    @velocity_y = 10
+    @velocity_x = 0
+    @velocity_y = 0
+    @speed = 4
+    
+    set_keys(Gosu::Button::KbRight =&gt; :run_right,
+             Gosu::Button::KbLeft =&gt; :run_left)
+  end
+  
+  def run_right(down)
+    if down
+      @velocity_x = @speed
+    else
+      @velocity_x = 0
+    end
+  end
+  
+  def run_left(down)
+    if down
+      @velocity_x = -@speed
+    else
+      @velocity_x = 0
+    end
   end
   
   def update
     @x += @velocity_x
     @y += @velocity_y
-    @velocity_x = -@velocity_x if @x &gt; $game.width or @x &lt; 0
-    @velocity_y = -@velocity_y if @y &gt; $game.height or @y &lt; 0
   end
   
   def draw
-    &quot;mm9/green_standing&quot;.img.draw(@x, @y, 0, 1+(@y.to_f/$game.height)*2, 1+(@y.to_f/$game.height)*2)
+    if @velocity_x &gt; 0
+      &quot;mm9/blue/run&quot;.anim(24,24).draw(@x, @y) # zoom
+    else
+      &quot;mm9/blue/stand&quot;.anim(24,24,50).draw(@x, @y)
+    end
   end
 end
\ No newline at end of file</diff>
      <filename>mm9/mm9.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8c64ddaea9559310929ef4ffbee38cafd797f6ef</id>
    </parent>
  </parents>
  <author>
    <name>Florian Hufsky</name>
    <email>florian.hufsky@gmail.com</email>
  </author>
  <url>http://github.com/oneup/puituniverse/commit/28cddc638d88d376bc6d6dceee79aca0c5242999</url>
  <id>28cddc638d88d376bc6d6dceee79aca0c5242999</id>
  <committed-date>2008-11-28T09:46:39-08:00</committed-date>
  <authored-date>2008-11-28T09:46:39-08:00</authored-date>
  <message>animation hack</message>
  <tree>032e881a240606b37ff3d805250f31d5defe0688</tree>
  <committer>
    <name>Florian Hufsky</name>
    <email>florian.hufsky@gmail.com</email>
  </committer>
</commit>
