diff --git a/binding-mri/module_rpg1.rb b/binding-mri/module_rpg1.rb index 32aa087..5b9286b 100644 --- a/binding-mri/module_rpg1.rb +++ b/binding-mri/module_rpg1.rb @@ -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 diff --git a/scripts/DynamicLight.rb b/scripts/DynamicLight.rb index 73f95d3..1886749 100644 --- a/scripts/DynamicLight.rb +++ b/scripts/DynamicLight.rb @@ -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) diff --git a/src/etc.h b/src/etc.h index 151afbb..e314a40 100644 --- a/src/etc.h +++ b/src/etc.h @@ -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); } };