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

View file

@ -81,7 +81,7 @@ class DynamicLight
end
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
#def remove(x, y)

View file

@ -210,7 +210,7 @@ struct LightSource {
{};
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);
}
};