Simplify some
This commit is contained in:
parent
b49129ad1f
commit
878cec8c76
@ -274,10 +274,9 @@ init 5 python:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Freezes the animation
|
# Freezes the animation
|
||||||
path, _, _, _ = self.atl_partial.args
|
(*_, opos, pos), _, _, _ = self.atl_partial.args
|
||||||
pos = path[-1]
|
xzoom = -1 if (pos > opos) else 1
|
||||||
xzoom = -1 if (path[-1] > path[-2]) else 1
|
zpos = self.zorder + (config.screen_height / pos[1])
|
||||||
zpos = self.zorder + (1.0 / (pos[1] / config.screen_height))
|
|
||||||
|
|
||||||
self.pos = pos
|
self.pos = pos
|
||||||
self.xzoom = xzoom
|
self.xzoom = xzoom
|
||||||
@ -316,14 +315,16 @@ init 5 python:
|
|||||||
|
|
||||||
segment_time = (timer - internal_time) / times[current_segment]
|
segment_time = (timer - internal_time) / times[current_segment]
|
||||||
next_segment = current_segment + 1
|
next_segment = current_segment + 1
|
||||||
|
path_current_segment = path[current_segment]
|
||||||
|
path_next_segment = path[next_segment]
|
||||||
|
|
||||||
# Adjust XY position
|
# Adjust XY position
|
||||||
trans.pos = renpy.atl.interpolate(warper(segment_time), path[current_segment], path[next_segment], renpy.atl.PROPERTIES["pos"])
|
trans.pos = renpy.atl.interpolate(warper(segment_time), path_current_segment, path_next_segment, renpy.atl.PROPERTIES["pos"])
|
||||||
self.pos = trans.pos
|
self.pos = trans.pos
|
||||||
|
|
||||||
# Adjust X zoom based on target X position
|
# Adjust X zoom based on target X position
|
||||||
# 1 = Facing Right, -1 = Facing Left
|
# 1 = Facing Right, -1 = Facing Left
|
||||||
trans.xzoom = 1 if (path[current_segment][0] > path[next_segment][0]) else -1
|
trans.xzoom = 1 if (path_current_segment[0] > path_next_segment[0]) else -1
|
||||||
self.xzoom = trans.xzoom
|
self.xzoom = trans.xzoom
|
||||||
|
|
||||||
# Adjust zoom
|
# Adjust zoom
|
||||||
@ -332,13 +333,13 @@ init 5 python:
|
|||||||
# Adjust Z position based on Y axis
|
# Adjust Z position based on Y axis
|
||||||
# TODO: Add room support with bottom, middle, and top vanishing points.
|
# TODO: Add room support with bottom, middle, and top vanishing points.
|
||||||
# room_scale = 0.5
|
# room_scale = 0.5
|
||||||
# zpos1 = ((path[current_segment][1] / 600.0) * 1000.0) * room_scale
|
# zpos1 = ((path_current_segment[1] / 600.0) * 1000.0) * room_scale
|
||||||
# zpos2 = ((path[next_segment][1] / 600.0) * 1000.0) * room_scale
|
# zpos2 = ((path_next_segment[1] / 600.0) * 1000.0) * room_scale
|
||||||
# trans.zpos = renpy.atl.interpolate(warper(segment_time), zpos1, zpos2, renpy.atl.PROPERTIES["zpos"])
|
# trans.zpos = renpy.atl.interpolate(warper(segment_time), zpos1, zpos2, renpy.atl.PROPERTIES["zpos"])
|
||||||
# self.zpos = trans.zpos
|
# self.zpos = trans.zpos
|
||||||
|
|
||||||
# TODO: Using zorders is suboptimal and expensive, using 3D staging would be preferable.
|
# TODO: Using zorders is suboptimal and expensive, using 3D staging would be preferable.
|
||||||
zpos = self.zorder + (1.0 / (self.pos[1] / config.screen_height))
|
zpos = self.zorder + (config.screen_height / self.pos[1])
|
||||||
renpy.change_zorder(self.layer, self.tag, zpos)
|
renpy.change_zorder(self.layer, self.tag, zpos)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user