Code tidying with Rubocop

This commit is contained in:
Maruno17
2023-07-18 22:42:10 +01:00
parent 6053363715
commit a5734eaf46
68 changed files with 276 additions and 232 deletions

View File

@@ -1,5 +1,5 @@
class Sprite_SurfBase
attr_reader :visible
attr_reader :visible
def initialize(parent_sprite, viewport = nil)
@parent_sprite = parent_sprite

View File

@@ -44,7 +44,8 @@ class Spriteset_Map
@@viewport3 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Flashing
@@viewport3.z = 500
def self.viewport # For access by Spriteset_Global
# For access by Spriteset_Global.
def self.viewport
return @@viewport1
end

View File

@@ -105,7 +105,8 @@ class Sprite_Shadow < RPG::Sprite
end
end
def in_range?(element, object, range) # From Near's Anti Lag Script, edited
# From Near's Anti Lag Script, edited.
def in_range?(element, object, range)
elemScreenX = ScreenPosHelper.pbScreenX(element)
elemScreenY = ScreenPosHelper.pbScreenY(element)
objScreenX = ScreenPosHelper.pbScreenX(object)

View File

@@ -53,8 +53,8 @@ def getCubicPoint2(src, t)
y1 = src[7]
x1 = cx1 + ((x1 - cx1) * t)
x0 = x0 + ((cx0 - x0) * t)
cx0 = cx0 + ((cx1 - cx0) * t)
x0 += ((cx0 - x0) * t)
cx0 += ((cx1 - cx0) * t)
cx1 = cx0 + ((x1 - cx0) * t)
cx0 = x0 + ((cx0 - x0) * t)
cx = cx0 + ((cx1 - cx0) * t)
@@ -64,8 +64,8 @@ def getCubicPoint2(src, t)
# d = x0
# cx = a*t*t*t + b*t*t + c*t + d
y1 = cy1 + ((y1 - cy1) * t)
y0 = y0 + ((cy0 - y0) * t)
cy0 = cy0 + ((cy1 - cy0) * t)
y0 += ((cy0 - y0) * t)
cy0 += ((cy1 - cy0) * t)
cy1 = cy0 + ((y1 - cy0) * t)
cy0 = y0 + ((cy0 - y0) * t)
cy = cy0 + ((cy1 - cy0) * t)