chore: storing version and changelog

This commit is contained in:
BHSDuncan
2022-10-31 20:45:30 +00:00
parent d5b15b3f5c
commit fed2a98270
4 changed files with 28 additions and 15 deletions

View File

@@ -1,3 +1,16 @@
## [4.0.0-alpha.224](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.224) (2022-10-31)
### Bug Fixes
* camera_push now validates against camera_node like ESCCamera. ([3009fe1](https://github.com/godot-escoria/escoria-demo-game/commit/3009fe1242a83f18a6f8a7c8daa9ce9f679056e2))
* cleaning up and updating validation code. ([e807044](https://github.com/godot-escoria/escoria-demo-game/commit/e807044e45d75548858b671e85faa6ea6209d2ec))
* room 7 lift interaction fixed based on new camera behavior. ([1657c0d](https://github.com/godot-escoria/escoria-demo-game/commit/1657c0d452757b786ec60de32a424e9d7a2555bc))
* updates camera limit checking in commands to respect viewport limits (i.e. taking into account camera centre and half-screen limits); also updates warning message and no longer fails on limit violation. ([d95d26f](https://github.com/godot-escoria/escoria-demo-game/commit/d95d26ff5fb00030c4d8a06ea95f7b040e2f2bc2))
* Updates those camera commands that make use of translation to compensate for drag margins. ([cc74206](https://github.com/godot-escoria/escoria-demo-game/commit/cc74206e6c1877d50ab29f3febd65f533620cfd5))
## [4.0.0-alpha.223](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.223) (2022-10-31) ## [4.0.0-alpha.223](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.223) (2022-10-31)

View File

@@ -12,10 +12,10 @@ func generate_viewport_warning(pos: Vector2, camera: ESCCamera) -> void:
var camera_limit: Rect2 = camera.get_camera_limit_rect() var camera_limit: Rect2 = camera.get_camera_limit_rect()
var message: String = \ var message: String = \
""" """
[%s]: Invalid camera position. Camera cannot be moved to %s as this is outside the viewport with current camera limit %s. [%s]: Invalid camera position. Camera cannot be moved to %s as this is outside the viewport with current camera limit %s.
Current valid ranges for positions are: x = %s inclusive; y = %s inclusive. Current valid ranges for positions are: x = %s inclusive; y = %s inclusive.
""" """
escoria.logger.warn( escoria.logger.warn(
self, self,
message message

View File

@@ -1,7 +1,7 @@
# Camera handling # Camera handling
extends Camera2D extends Camera2D
class_name ESCCamera class_name ESCCamera
# Reference to the tween node for animating camera movements # Reference to the tween node for animating camera movements
var _tween: Tween var _tween: Tween
@@ -112,7 +112,7 @@ func set_target(p_target, p_time : float = 0.0):
self, self,
"Current camera position = %s." % str(self.global_position) "Current camera position = %s." % str(self.global_position)
) )
if p_time == 0.0: if p_time == 0.0:
self.global_position = _target self.global_position = _target
else: else:
@@ -239,7 +239,7 @@ func push(p_target, p_time: float = 0.0, p_type: int = 0):
set_drag_margin_enabled(false, false) set_drag_margin_enabled(false, false)
_convert_current_global_pos_for_disabled_drag_margin() _convert_current_global_pos_for_disabled_drag_margin()
_tween.interpolate_property( _tween.interpolate_property(
self, self,
"global_position", "global_position",
@@ -327,7 +327,7 @@ func check_point_is_inside_viewport_limits(point: Vector2) -> bool:
# **Returns** the inclusive minimum and maximum values for the x-component of the current valid viewport. # **Returns** the inclusive minimum and maximum values for the x-component of the current valid viewport.
func get_current_valid_viewport_values_x() -> Array: func get_current_valid_viewport_values_x() -> Array:
var viewport_rect: Rect2 = get_viewport_rect() var viewport_rect: Rect2 = get_viewport_rect()
return [limit_left + viewport_rect.size.x * 0.5, limit_right - viewport_rect.size.x * 0.5] return [limit_left + viewport_rect.size.x * 0.5, limit_right - viewport_rect.size.x * 0.5]
@@ -337,7 +337,7 @@ func get_current_valid_viewport_values_x() -> Array:
# **Returns* the inclusive minimum and maximum values for the y-component of the current valid viewport. # **Returns* the inclusive minimum and maximum values for the y-component of the current valid viewport.
func get_current_valid_viewport_values_y() -> Array: func get_current_valid_viewport_values_y() -> Array:
var viewport_rect: Rect2 = get_viewport_rect() var viewport_rect: Rect2 = get_viewport_rect()
return [limit_top + viewport_rect.size.y * 0.5, limit_bottom - viewport_rect.size.y * 0.5] return [limit_top + viewport_rect.size.y * 0.5, limit_bottom - viewport_rect.size.y * 0.5]
@@ -353,20 +353,20 @@ func get_camera_limit_rect() -> Rect2:
# the camera limits. # the camera limits.
func clamp_to_viewport_limits() -> void: func clamp_to_viewport_limits() -> void:
var viewport_rect: Rect2 = get_viewport_rect() var viewport_rect: Rect2 = get_viewport_rect()
var cur_camera_pos: Vector2 = self.get_camera_screen_center() var cur_camera_pos: Vector2 = self.get_camera_screen_center()
var ret_position: Vector2 = cur_camera_pos var ret_position: Vector2 = cur_camera_pos
if cur_camera_pos.x - viewport_rect.size.x * 0.5 * zoom.x <= limit_left: if cur_camera_pos.x - viewport_rect.size.x * 0.5 * zoom.x <= limit_left:
ret_position.x = limit_left + viewport_rect.size.x * 0.5 * zoom.x * (1 + drag_margin_left) ret_position.x = limit_left + viewport_rect.size.x * 0.5 * zoom.x * (1 + drag_margin_left)
elif cur_camera_pos.x + viewport_rect.size.x * 0.5 * zoom.x >= limit_right: elif cur_camera_pos.x + viewport_rect.size.x * 0.5 * zoom.x >= limit_right:
ret_position.x = limit_right - viewport_rect.size.x * 0.5 * zoom.x * (1 + drag_margin_right) ret_position.x = limit_right - viewport_rect.size.x * 0.5 * zoom.x * (1 + drag_margin_right)
if cur_camera_pos.y - viewport_rect.size.y * 0.5 * zoom.y <= limit_top: if cur_camera_pos.y - viewport_rect.size.y * 0.5 * zoom.y <= limit_top:
ret_position.y = limit_top + viewport_rect.size.y * 0.5 * zoom.y * (1 + drag_margin_top) ret_position.y = limit_top + viewport_rect.size.y * 0.5 * zoom.y * (1 + drag_margin_top)
elif cur_camera_pos.y + viewport_rect.size.y * 0.5 * zoom.y >= limit_bottom: elif cur_camera_pos.y + viewport_rect.size.y * 0.5 * zoom.y >= limit_bottom:
ret_position.y = limit_bottom - viewport_rect.size.y * 0.5 * zoom.y * (1 + drag_margin_bottom) ret_position.y = limit_bottom - viewport_rect.size.y * 0.5 * zoom.y * (1 + drag_margin_bottom)
self.global_position = ret_position self.global_position = ret_position
@@ -405,7 +405,7 @@ func _convert_current_global_pos_for_disabled_drag_margin() -> void:
func _convert_pos_for_disabled_drag_margin(pos: Vector2) -> Vector2: func _convert_pos_for_disabled_drag_margin(pos: Vector2) -> Vector2:
var viewport_rect: Rect2 = get_viewport_rect() var viewport_rect: Rect2 = get_viewport_rect()
var ret_position: Vector2 = pos var ret_position: Vector2 = pos
# If the current calculated centre of the camera/viewport is close enough to the set camera # If the current calculated centre of the camera/viewport is close enough to the set camera
# limits (i.e. the centre is upto and including half the viewport's size to the limit being # limits (i.e. the centre is upto and including half the viewport's size to the limit being
# tested), then we make sure the global_position is at the same coordinates since Camera2D will # tested), then we make sure the global_position is at the same coordinates since Camera2D will
@@ -418,7 +418,7 @@ func _convert_pos_for_disabled_drag_margin(pos: Vector2) -> Vector2:
ret_position.x = limit_left + viewport_rect.size.x * 0.5 * zoom.x ret_position.x = limit_left + viewport_rect.size.x * 0.5 * zoom.x
elif ret_position.x + viewport_rect.size.x * 0.5 * zoom.x >= limit_right: elif ret_position.x + viewport_rect.size.x * 0.5 * zoom.x >= limit_right:
ret_position.x = limit_right - viewport_rect.size.x * 0.5 * zoom.x ret_position.x = limit_right - viewport_rect.size.x * 0.5 * zoom.x
if ret_position.y - viewport_rect.size.y * 0.5 * zoom.y <= limit_top: if ret_position.y - viewport_rect.size.y * 0.5 * zoom.y <= limit_top:
ret_position.y = limit_top + viewport_rect.size.y * 0.5 * zoom.y ret_position.y = limit_top + viewport_rect.size.y * 0.5 * zoom.y
elif ret_position.y + viewport_rect.size.y * 0.5 * zoom.y >= limit_bottom: elif ret_position.y + viewport_rect.size.y * 0.5 * zoom.y >= limit_bottom:

View File

@@ -1342,9 +1342,9 @@ func export_generate_animations(character_node, num_directions) -> void:
var current_ticks = OS.get_ticks_msec() var current_ticks = OS.get_ticks_msec()
if current_ticks - display_refresh_timer > 30: if current_ticks - display_refresh_timer > 30:
yield(get_tree(), "idle_frame") yield(get_tree(), "idle_frame")
display_refresh_timer = current_ticks display_refresh_timer = current_ticks
if num_directions == 4: if num_directions == 4:
progress_bar_update("Processing "+str(animtype)+" "+str(anim_dir),2) progress_bar_update("Processing "+str(animtype)+" "+str(anim_dir),2)
else: else: