debug light fix

This commit is contained in:
Issac332 2026-07-19 19:13:09 +03:00
parent 2ea506b296
commit ac42a6f5a9

View file

@ -1,8 +1,12 @@
class DynamicLight class DynamicLight
def initialize(viewport) def initialize(viewport)
@debug_sprite = Sprite.new(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.visible = false
@debug_sprite.z = -1
@light_sprite = LightMap.new(viewport) @light_sprite = LightMap.new(viewport)
#@light_sprite.wallmap = Bitmap.new($game_map.width, $game_map.height) #@light_sprite.wallmap = Bitmap.new($game_map.width, $game_map.height)
@ -17,10 +21,8 @@ class DynamicLight
#end #end
@update_connection = Graphics.viewport_resized do |w, h| @update_connection = Graphics.viewport_resized do |w, h|
@debug_sprite.bitmap.rect.width = w; @debug_sprite.zoom_x = w
@debug_sprite.bitmap.rect.height = h; @debug_sprite.zoom_y = h
#@debug_sprite.bitmap.dispose
#@debug_sprite.bitmap = Bitmap.new(w, h)
end end
if $light == nil if $light == nil