Negative Light

This commit is contained in:
Issac332 2026-07-01 16:32:28 +03:00
parent ed75490323
commit eec30c4786
3 changed files with 6 additions and 6 deletions

View File

@ -72,8 +72,8 @@ module RPG
self.load_bitmap("Graphics/Icons/", filename) self.load_bitmap("Graphics/Icons/", filename)
end end
def self.panorama(filename, hue) def self.panorama(filename, hue)
if Graphics.width == 1280 && File.exist?("Graphics/Panoramas/" + filename + "_16.png") if Graphics.width == 1280 && File.exist?("Graphics/Panoramas/" + filename + "_16.png")
self.load_bitmap("Graphics/Panoramas/", filename + "_16", hue) self.load_bitmap("Graphics/Panoramas/", filename + "_16", hue)
else else
self.load_bitmap("Graphics/Panoramas/", filename, hue) self.load_bitmap("Graphics/Panoramas/", filename, hue)
end end
@ -223,7 +223,7 @@ module RPG
end end
@_animation_sprites = [] @_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(animation) if @_animation.position != 3 or not @@_animations.include?(animation)
for i in 0..15 for _ in 0..15
sprite = ::Sprite.new(self.viewport) sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap sprite.bitmap = bitmap
sprite.visible = false sprite.visible = false
@ -250,7 +250,7 @@ module RPG
@@_reference_count[bitmap] = 1 @@_reference_count[bitmap] = 1
end end
@_loop_animation_sprites = [] @_loop_animation_sprites = []
for i in 0..15 for _ in 0..15
sprite = ::Sprite.new(self.viewport) sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap sprite.bitmap = bitmap
sprite.visible = false sprite.visible = false

View File

@ -81,7 +81,7 @@ class DynamicLight
end end
def has_effect(source) def has_effect(source)
source[2] > 0 && source[3] > 0 && source[4].alpha >= 0 && (source[4].red > 0 || source[4].green > 0 || source[4].blue > 0) source[2] != 0 && source[3] > 0 && source[4].alpha >= 0 && (source[4].red != 0 || source[4].green != 0 || source[4].blue != 0)
end end
#def remove(x, y) #def remove(x, y)

View File

@ -210,7 +210,7 @@ struct LightSource {
{}; {};
bool hasEffect(){ bool hasEffect(){
return radius > 0.0 && power > 0.0 && color.alpha >= 0.0 && (color.red > 0.0 || color.green > 0.0 || color.blue > 0.0); return radius > 0.0 && power != 0.0 && color.alpha >= 0.0 && (color.red != 0.0 || color.green != 0.0 || color.blue != 0.0);
} }
}; };