mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Anim Editor: z-related bug fix, full-screen graphic size is now more lenient
This commit is contained in:
@@ -102,9 +102,17 @@ module AnimationPlayer::Helper
|
|||||||
if focus.is_a?(Array)
|
if focus.is_a?(Array)
|
||||||
distance = GameData::Animation::USER_AND_TARGET_SEPARATION[2]
|
distance = GameData::Animation::USER_AND_TARGET_SEPARATION[2]
|
||||||
if z >= 0
|
if z >= 0
|
||||||
sprite.z = z + focus[0]
|
if focus[0] > focus[1]
|
||||||
|
sprite.z = focus[0] + z
|
||||||
|
else
|
||||||
|
sprite.z = focus[0] - z
|
||||||
|
end
|
||||||
elsif z <= distance
|
elsif z <= distance
|
||||||
sprite.z = z + focus[1]
|
if focus[0] > focus[1]
|
||||||
|
sprite.z = focus[1] + z + distance
|
||||||
|
else
|
||||||
|
sprite.z = focus[1] - z + distance
|
||||||
|
end
|
||||||
else
|
else
|
||||||
sprite.z = focus[0] + ((z.to_f / distance) * (focus[1] - focus[0])).to_i
|
sprite.z = focus[0] + ((z.to_f / distance) * (focus[1] - focus[0])).to_i
|
||||||
end
|
end
|
||||||
@@ -149,7 +157,7 @@ module AnimationPlayer::Helper
|
|||||||
sprite.bitmap = RPG::Cache.load_bitmap("Graphics/Battle animations/", particle[:graphic])
|
sprite.bitmap = RPG::Cache.load_bitmap("Graphics/Battle animations/", particle[:graphic])
|
||||||
sprite.src_rect.set(0, 0, sprite.bitmap.width, sprite.bitmap.height)
|
sprite.src_rect.set(0, 0, sprite.bitmap.width, sprite.bitmap.height)
|
||||||
if [:foreground, :midground, :background].include?(particle[:focus]) &&
|
if [:foreground, :midground, :background].include?(particle[:focus]) &&
|
||||||
sprite.bitmap.width == Settings::SCREEN_WIDTH &&
|
sprite.bitmap.width >= Settings::SCREEN_WIDTH &&
|
||||||
sprite.bitmap.height >= Settings::SCREEN_HEIGHT - BATTLE_MESSAGE_BAR_HEIGHT
|
sprite.bitmap.height >= Settings::SCREEN_HEIGHT - BATTLE_MESSAGE_BAR_HEIGHT
|
||||||
sprite.ox = 0
|
sprite.ox = 0
|
||||||
sprite.oy = 0
|
sprite.oy = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user