<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,7 +19,7 @@
 * Rubygame (its dependancies, SDL)
 * constructor gem
 * publisher gem
-* bacon (for gamebox tests)
+* rsepec (for gamebox tests)
 * algorithms gem (optional for line of site and A*)
 
 == INSTALL:</diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,21 @@
 require 'actor'
+require 'graphical_actor_view'
 
+class EarthView &lt; GraphicalActorView
+
+  def draw(target, x_off, y_off)
+    x = @actor.x
+    y = @actor.y
+
+    img = @actor.image
+    w,h = *img.size
+#    x = x-w/2
+#    y = y-h/2
+    img.blit target.screen, [x+x_off,y+y_off]
+
+    target.screen.draw_box_s [x+x_off,y+y_off], [x+x_off+w,y+y_off+h], [40,40,40,100] if @actor.is? :fading
+  end
+end
 class Earth &lt; Actor
-  
-  has_behavior :graphical
+  has_behavior :graphical, :layered 
 end</diff>
      <filename>examples/mjr_ruby/src/earth.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require 'actor'
 
 class Grass &lt; Actor
-  has_behavior :graphical
+  has_behavior :graphical, :layered
   
 end</diff>
      <filename>examples/mjr_ruby/src/grass.rb</filename>
    </modified>
    <modified>
      <diff>@@ -83,17 +83,17 @@ class MajorRuby &lt; Actor
   end
 
   def would_fit?(x_off, y_off)
-    not @map.solid? @x.floor+x_off+25, @y.floor+y_off+5 and
-    not @map.solid? @x.floor+x_off+25, @y.floor+y_off+45 and
-    not @map.solid? @x.floor+x_off+10, @y.floor+y_off+25 and
-      not @map.solid? @x.floor+x_off+40, @y.floor+y_off+25 
+    not @map.solid? @x.floor+x_off+10, @y.floor+y_off+5 and
+    not @map.solid? @x.floor+x_off+40, @y.floor+y_off+5 and
+    not @map.solid? @x.floor+x_off+10, @y.floor+y_off+45 and
+      not @map.solid? @x.floor+x_off+40, @y.floor+y_off+45 
   end
 
   def collect_gems(gems)
     collected = []
     gems.each do |pg|
       matched = false
-      if (pg.x - @x).abs &lt; 50 and (pg.y - @y).abs &lt; 50
+      if (pg.x+25 - @x).abs &lt; 50 and (pg.y+25 - @y).abs &lt; 50
         matched = true
         play_sound :pretty
         pg.remove_self</diff>
      <filename>examples/mjr_ruby/src/major_ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,15 @@
 require 'actor'
 require 'two_d_grid_map'
+require 'actor_view'
 
+class FogView &lt; ActorView
+  def draw(target, x_off, y_off)
+    target.screen.draw_box_s [0,0],[1024,800],[120,120,120,120]
+  end
+end
+class Fog &lt; Actor
+  has_behavior :layered
+end
 class Mappy &lt; Actor
   attr_reader :major_ruby, :tw, :th, :width, :height, :actors
 
@@ -13,6 +22,8 @@ class Mappy &lt; Actor
     filenames.each_with_index do |fn,i|
       @maps &lt;&lt; load_map(fn,i)
     end
+
+    @fog = spawn :fog
     self.z_level=0
 
     @major_ruby = spawn :major_ruby, :x =&gt; 400, :y =&gt; 100, :map =&gt; self
@@ -36,17 +47,22 @@ class Mappy &lt; Actor
   end
 
   def z_level=(new_z)
+    
     if @actors[@z]
       @actors[@z].each do |a|
-        a.hide
+        a.layer = @z+1
       end
     end
+
+    @fog.layer = @z+2
     @z = new_z
+
     if @actors[@z]
       @actors[@z].each do |a|
-        a.show
+        a.layer = @z+3
       end
     end
+    self.pretty_gems.each { |pg| pg.layer=@z+4 }
   end
 
   def pretty_gems
@@ -85,7 +101,8 @@ class Mappy &lt; Actor
           # no overlap yet
           thing = spawn type, :x =&gt; x*@tw, :y =&gt; y*@tw
           @actors[z] &lt;&lt; thing
-          thing.hide
+          thing.layer = 1
+#          thing.hide
           @pretty_gems[z] &lt;&lt; thing if type == :pretty_gem
           map.place(TwoDGridLocation.new(x,y), thing)
         end</diff>
      <filename>examples/mjr_ruby/src/mappy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,9 +25,8 @@ class PrettyGemView &lt; ActorView
     roto_img = src_img.rotozoom rot, 1, true
     @@roto_imgs[rot] = roto_img 
   end
-
 end
 
 class PrettyGem &lt; Actor
-  has_behavior :graphical, :dancing, :updatable, :layered =&gt; {:layer =&gt; 3}
+  has_behavior :graphical, :dancing, :updatable, :layered 
 end</diff>
      <filename>examples/mjr_ruby/src/pretty_gem.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,9 @@ class Layered &lt; Behavior
     layered_obj = self
     @actor.instance_eval do
       (class &lt;&lt; self; self; end).class_eval do
+        define_method :layer= do |new_layer|
+          layered_obj.layer = new_layer
+        end
         define_method :layer do 
           layered_obj.layer
         end
@@ -31,4 +34,10 @@ class Layered &lt; Behavior
       end
     end
   end
+
+  def layer=(new_layer)
+    @layer = new_layer
+    @actor.hide
+    @actor.show
+  end
 end</diff>
      <filename>lib/gamebox/behaviors/layered.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7941164d10d6d99850de992109520c1051eaecfc</id>
    </parent>
  </parents>
  <author>
    <name>Shawn Anderson</name>
    <email>shawn42@gmail.com</email>
  </author>
  <url>http://github.com/shawn42/gamebox/commit/b860937fe62bf2cf44bf672e20382c4d952cd47d</url>
  <id>b860937fe62bf2cf44bf672e20382c4d952cd47d</id>
  <committed-date>2009-09-21T16:42:27-07:00</committed-date>
  <authored-date>2009-09-21T16:42:27-07:00</authored-date>
  <message>tweaking faded map items... toggling is choppy though</message>
  <tree>14fc30fdac7922486b0abda41e4605602b4df97f</tree>
  <committer>
    <name>Shawn Anderson</name>
    <email>shawn42@gmail.com</email>
  </committer>
</commit>
