mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
debug light fix
This commit is contained in:
parent
2ea506b296
commit
ac42a6f5a9
1 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue