mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
More tweaks from the Rubocop overlord
This commit is contained in:
@@ -245,8 +245,8 @@ module RPG
|
||||
return
|
||||
end
|
||||
if @weatherTypes[weather_type][0].category == :Rain && index.odd? # Splash
|
||||
sprite.x = @ox - sprite.bitmap.width + rand(Graphics.width + sprite.bitmap.width * 2)
|
||||
sprite.y = @oy - sprite.bitmap.height + rand(Graphics.height + sprite.bitmap.height * 2)
|
||||
sprite.x = @ox - sprite.bitmap.width + rand(Graphics.width + (sprite.bitmap.width * 2))
|
||||
sprite.y = @oy - sprite.bitmap.height + rand(Graphics.height + (sprite.bitmap.height * 2))
|
||||
lifetimes[index] = (rand(30...50)) * 0.01 # 0.3-0.5 seconds
|
||||
else
|
||||
x_speed = @weatherTypes[weather_type][0].particle_delta_x
|
||||
@@ -255,14 +255,14 @@ module RPG
|
||||
if gradient.abs >= 1
|
||||
# Position sprite to the right of the screen
|
||||
sprite.x = @ox + Graphics.width + rand(Graphics.width)
|
||||
sprite.y = @oy + Graphics.height - rand(Graphics.height + sprite.bitmap.height - Graphics.width / gradient)
|
||||
distance_to_cover = sprite.x - @ox - Graphics.width / 2 + sprite.bitmap.width + rand(Graphics.width * 8 / 5)
|
||||
sprite.y = @oy + Graphics.height - rand(Graphics.height + sprite.bitmap.height - (Graphics.width / gradient))
|
||||
distance_to_cover = sprite.x - @ox - (Graphics.width / 2) + sprite.bitmap.width + rand(Graphics.width * 8 / 5)
|
||||
lifetimes[index] = (distance_to_cover.to_f / x_speed).abs
|
||||
else
|
||||
# Position sprite to the top of the screen
|
||||
sprite.x = @ox - sprite.bitmap.width + rand(Graphics.width + sprite.bitmap.width - gradient * Graphics.height)
|
||||
sprite.x = @ox - sprite.bitmap.width + rand(Graphics.width + sprite.bitmap.width - (gradient * Graphics.height))
|
||||
sprite.y = @oy - sprite.bitmap.height - rand(Graphics.height)
|
||||
distance_to_cover = @oy - sprite.y + Graphics.height / 2 + rand(Graphics.height * 8 / 5)
|
||||
distance_to_cover = @oy - sprite.y + (Graphics.height / 2) + rand(Graphics.height * 8 / 5)
|
||||
lifetimes[index] = (distance_to_cover.to_f / y_speed).abs
|
||||
end
|
||||
end
|
||||
@@ -333,8 +333,8 @@ module RPG
|
||||
|
||||
def update_tile_position(sprite, index)
|
||||
return if !sprite || !sprite.bitmap || !sprite.visible
|
||||
sprite.x = @tile_x.round + (index % @tiles_wide) * sprite.bitmap.width
|
||||
sprite.y = @tile_y.round + (index / @tiles_wide) * sprite.bitmap.height
|
||||
sprite.x = @tile_x.round + ((index % @tiles_wide) * sprite.bitmap.width)
|
||||
sprite.y = @tile_y.round + ((index / @tiles_wide) * sprite.bitmap.height)
|
||||
sprite.x += @tiles_wide * sprite.bitmap.width if sprite.x - @ox < -sprite.bitmap.width
|
||||
sprite.y -= @tiles_tall * sprite.bitmap.height if sprite.y - @oy > Graphics.height
|
||||
sprite.visible = true
|
||||
@@ -372,10 +372,10 @@ module RPG
|
||||
@fade_time < [FADE_NEW_TONE_END - @time_shift, 0].max
|
||||
weather_max = @target_max
|
||||
fract = (@fade_time - [FADE_NEW_TONE_START - @time_shift, 0].max) / (FADE_NEW_TONE_END - FADE_NEW_TONE_START)
|
||||
tone_red = @target_tone.red + (1 - fract) * (@old_tone.red - @target_tone.red)
|
||||
tone_green = @target_tone.green + (1 - fract) * (@old_tone.green - @target_tone.green)
|
||||
tone_blue = @target_tone.blue + (1 - fract) * (@old_tone.blue - @target_tone.blue)
|
||||
tone_gray = @target_tone.gray + (1 - fract) * (@old_tone.gray - @target_tone.gray)
|
||||
tone_red = @target_tone.red + ((1 - fract) * (@old_tone.red - @target_tone.red))
|
||||
tone_green = @target_tone.green + ((1 - fract) * (@old_tone.green - @target_tone.green))
|
||||
tone_blue = @target_tone.blue + ((1 - fract) * (@old_tone.blue - @target_tone.blue))
|
||||
tone_gray = @target_tone.gray + ((1 - fract) * (@old_tone.gray - @target_tone.gray))
|
||||
else
|
||||
tone_red = @viewport.tone.red
|
||||
tone_green = @viewport.tone.green
|
||||
|
||||
@@ -153,12 +153,12 @@ class LightEffect_Basic < LightEffect
|
||||
super
|
||||
if (Object.const_defined?(:ScreenPosHelper) rescue false)
|
||||
@light.x = ScreenPosHelper.pbScreenX(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - Game_Map::TILE_HEIGHT / 2
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - (Game_Map::TILE_HEIGHT / 2)
|
||||
@light.zoom_x = ScreenPosHelper.pbScreenZoomX(@event)
|
||||
@light.zoom_y = @light.zoom_x
|
||||
else
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y - Game_Map::TILE_HEIGHT / 2
|
||||
@light.y = @event.screen_y - (Game_Map::TILE_HEIGHT / 2)
|
||||
end
|
||||
@light.tone = $game_screen.tone
|
||||
end
|
||||
@@ -188,12 +188,12 @@ class LightEffect_DayNight < LightEffect
|
||||
if @light.opacity > 0
|
||||
if (Object.const_defined?(:ScreenPosHelper) rescue false)
|
||||
@light.x = ScreenPosHelper.pbScreenX(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - Game_Map::TILE_HEIGHT / 2
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - (Game_Map::TILE_HEIGHT / 2)
|
||||
@light.zoom_x = ScreenPosHelper.pbScreenZoomX(@event)
|
||||
@light.zoom_y = ScreenPosHelper.pbScreenZoomY(@event)
|
||||
else
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y - Game_Map::TILE_HEIGHT / 2
|
||||
@light.y = @event.screen_y - (Game_Map::TILE_HEIGHT / 2)
|
||||
end
|
||||
@light.tone.set($game_screen.tone.red,
|
||||
$game_screen.tone.green,
|
||||
|
||||
Reference in New Issue
Block a user