mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Refactored some code relating to colours, trivially simplified some calculations
This commit is contained in:
@@ -69,7 +69,7 @@ class DarknessSprite < Sprite
|
||||
end
|
||||
|
||||
def refresh
|
||||
@darkness.fill_rect(0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 255))
|
||||
@darkness.fill_rect(0, 0, Graphics.width, Graphics.height, Color.black)
|
||||
cx = Graphics.width / 2
|
||||
cy = Graphics.height / 2
|
||||
cradius = @radius
|
||||
|
||||
@@ -138,7 +138,7 @@ def pbBattleAnimation(bgm = nil, battletype = 0, foe = nil)
|
||||
$PokemonGlobal.nextBattleBack = nil
|
||||
$PokemonEncounters.reset_step_count
|
||||
# Fade back to the overworld in 0.4 seconds
|
||||
viewport.color = Color.new(0, 0, 0, 255)
|
||||
viewport.color = Color.black
|
||||
timer = 0.0
|
||||
loop do
|
||||
Graphics.update
|
||||
@@ -179,7 +179,7 @@ def pbBattleAnimationCore(anim, viewport, location, num_flashes = 2)
|
||||
$game_temp.background_bitmap = Graphics.snap_to_bitmap
|
||||
# Play main animation
|
||||
Graphics.freeze
|
||||
viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
viewport.color = Color.black # Ensure screen is black
|
||||
Graphics.transition(25, "Graphics/Transitions/" + anim)
|
||||
# Slight pause after animation before starting up the battle scene
|
||||
pbWait(Graphics.frame_rate / 10)
|
||||
@@ -421,7 +421,7 @@ SpecialBattleIntroAnimations.register("alternate_vs_trainer_animation", 50, #
|
||||
viewvs.dispose
|
||||
viewopp.dispose
|
||||
viewplayer.dispose
|
||||
viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
viewport.color = Color.black # Ensure screen is black
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ def pbHiddenMoveAnimation(pokemon)
|
||||
strobebitmap = AnimatedBitmap.new("Graphics/Pictures/hiddenMoveStrobes")
|
||||
strobes = []
|
||||
15.times do |i|
|
||||
strobe = BitmapSprite.new(26 * 2, 8 * 2, viewport)
|
||||
strobe.bitmap.blt(0, 0, strobebitmap.bitmap, Rect.new(0, (i % 2) * 8 * 2, 26 * 2, 8 * 2))
|
||||
strobe = BitmapSprite.new(52, 16, viewport)
|
||||
strobe.bitmap.blt(0, 0, strobebitmap.bitmap, Rect.new(0, (i % 2) * 16, 52, 16))
|
||||
strobe.z = (i.even? ? 2 : 0)
|
||||
strobe.visible = false
|
||||
strobes.push(strobe)
|
||||
|
||||
Reference in New Issue
Block a user