diff --git a/scripts/Dynamic_Light.rb b/scripts/Dynamic_Light.rb index 35fec7a..d4c5ea6 100644 --- a/scripts/Dynamic_Light.rb +++ b/scripts/Dynamic_Light.rb @@ -1,8 +1,12 @@ class DynamicLight def initialize(viewport) @debug_sprite = Sprite.new(viewport) - @debug_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height) + @debug_sprite.bitmap = Bitmap.new(1, 1) + @debug_sprite.bitmap.fill_rect(0,0,1,1,Color.new(255,255,255)) + @debug_sprite.zoom_x = Graphics.width + @debug_sprite.zoom_y = Graphics.height @debug_sprite.visible = false + @debug_sprite.z = -1 @light_sprite = LightMap.new(viewport) #@light_sprite.wallmap = Bitmap.new($game_map.width, $game_map.height) @@ -17,10 +21,8 @@ class DynamicLight #end @update_connection = Graphics.viewport_resized do |w, h| - @debug_sprite.bitmap.rect.width = w; - @debug_sprite.bitmap.rect.height = h; - #@debug_sprite.bitmap.dispose - #@debug_sprite.bitmap = Bitmap.new(w, h) + @debug_sprite.zoom_x = w + @debug_sprite.zoom_y = h end if $light == nil