mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Refactored some code relating to colours, trivially simplified some calculations
This commit is contained in:
@@ -68,7 +68,7 @@ class ButtonEventScene < EventScene
|
||||
# End scene
|
||||
$game_temp.background_bitmap = Graphics.snap_to_bitmap
|
||||
Graphics.freeze
|
||||
@viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
@viewport.color = Color.black # Ensure screen is black
|
||||
Graphics.transition(8, "fadetoblack")
|
||||
$game_temp.background_bitmap.dispose
|
||||
scene.dispose
|
||||
|
||||
@@ -45,8 +45,7 @@ class PokemonEggHatch_Scene
|
||||
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
@sprites["overlay"].z = 200
|
||||
@sprites["overlay"].bitmap = Bitmap.new(Graphics.width, Graphics.height)
|
||||
@sprites["overlay"].bitmap.fill_rect(0, 0, Graphics.width, Graphics.height,
|
||||
Color.new(255, 255, 255))
|
||||
@sprites["overlay"].bitmap.fill_rect(0, 0, Graphics.width, Graphics.height, Color.white)
|
||||
@sprites["overlay"].opacity = 0
|
||||
# Start up scene
|
||||
pbFadeInAndShow(@sprites)
|
||||
|
||||
@@ -70,7 +70,7 @@ class PokemonTrade_Scene
|
||||
picturePoke.setOrigin(0, PictureOrigin::BOTTOM)
|
||||
picturePoke.setVisible(0, true)
|
||||
# Change Pokémon color
|
||||
picturePoke.moveColor(2, 5, Color.new(31 * 8, 22 * 8, 30 * 8, 255))
|
||||
picturePoke.moveColor(2, 5, Color.new(248, 176, 140))
|
||||
# Recall
|
||||
delay = picturePoke.totalDuration
|
||||
picturePoke.setSE(delay, "Battle recall")
|
||||
@@ -110,7 +110,7 @@ class PokemonTrade_Scene
|
||||
# Starting position of sprite
|
||||
picturePoke.setOrigin(0, PictureOrigin::BOTTOM)
|
||||
picturePoke.setZoom(0, 0)
|
||||
picturePoke.setColor(0, Color.new(31 * 8, 22 * 8, 30 * 8, 255))
|
||||
picturePoke.setColor(0, Color.new(248, 176, 240))
|
||||
picturePoke.setVisible(0, false)
|
||||
# Dropping ball
|
||||
y = Graphics.height - 96 - 16 - 16 # end point of Poké Ball
|
||||
@@ -141,7 +141,7 @@ class PokemonTrade_Scene
|
||||
picturePoke.moveXY(delay, 8, Graphics.width / 2, @sprites["rsprite2"].y)
|
||||
# Return Pokémon's color to normal and play cry
|
||||
delay = picturePoke.totalDuration
|
||||
picturePoke.moveColor(delay, 5, Color.new(31 * 8, 22 * 8, 30 * 8, 0))
|
||||
picturePoke.moveColor(delay, 5, Color.new(248, 176, 240, 0))
|
||||
cry = GameData::Species.cry_filename_from_pokemon(@pokemon2)
|
||||
picturePoke.setSE(delay, cry) if cry
|
||||
# Play animation
|
||||
|
||||
@@ -161,7 +161,7 @@ class HallOfFame_Scene
|
||||
def xpositionformula(battlernumber)
|
||||
ret = 0
|
||||
if SINGLEROW
|
||||
ret = battlernumber % 2 * 2
|
||||
ret = (battlernumber % 2) * 2
|
||||
else
|
||||
ret = (battlernumber / 3).even? ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
|
||||
end
|
||||
@@ -173,7 +173,7 @@ class HallOfFame_Scene
|
||||
if SINGLEROW
|
||||
ret = 1
|
||||
else
|
||||
ret = (battlernumber / 3) % 2 * 2
|
||||
ret = ((battlernumber / 3) % 2) * 2
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
@@ -201,7 +201,7 @@ _END_
|
||||
pbBGMFade(2.0)
|
||||
$game_temp.background_bitmap = Graphics.snap_to_bitmap
|
||||
Graphics.freeze
|
||||
viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
viewport.color = Color.black # Ensure screen is black
|
||||
Graphics.transition(8, "fadetoblack")
|
||||
$game_temp.background_bitmap.dispose
|
||||
@background_sprite.dispose
|
||||
|
||||
Reference in New Issue
Block a user