Added special scrolling to menu + fixes (#618)

* Added Special Scrolling to the visuals menu

* Added the actual functionality for special scrolling to work with menu

* Fixed PC-8801 mode if smooth transitions are enabled

* Special scrolling, not-so special translations
This commit is contained in:
guzlad
2025-10-18 01:27:25 +02:00
committed by GitHub
parent e7ad269317
commit b1f6024fa7
19 changed files with 25 additions and 4 deletions

View File

@@ -26,8 +26,9 @@ const SCROLL_DIFFERENCE := 48.0
var can_diff := true
# guzlad: old Special scrolling variables kept for reference purposes
static var sp_screen_scroll := false
static var sp_scroll_style := 1
#static var sp_scroll_style := 1
var sp_scrolling := false
@@ -35,6 +36,7 @@ func _exit_tree() -> void:
cam_locked = false
func _physics_process(delta: float) -> void:
sp_screen_scroll = Settings.file.visuals.smbs_scroll > 0
handle_camera(delta)
last_position = global_position
@@ -127,11 +129,13 @@ func do_sp_scroll(direction := 1) -> void:
process_mode = Node.PROCESS_MODE_ALWAYS
get_tree().paused = true
var distance = get_viewport().get_visible_rect().size.x - 32
if sp_scroll_style == 0:
if Settings.file.visuals.smbs_scroll == 1: #Sharp X1 (smooth)
var tween = create_tween()
tween.tween_property(self, "camera_position:x", camera_position.x + (distance * direction), 1)
await tween.finished
else:
else: #PC-8801 (black screen)
if Settings.file.visuals.transition_animation:
Global.get_node("Transition").get_node("TransitionBlock").modulate.a = 1
Global.get_node("Transition").show()
await get_tree().create_timer(0.5).timeout
camera_position.x += distance * direction