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

@@ -68,6 +68,7 @@ var file := {
"bridge_animation": 0,
"visible_timers": 0,
"transition_animation": 0,
"smbs_scroll": 0,
"colour_pipes": 1,
"firebar_style": 0,
"extra_particles": 0

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

View File

@@ -41,6 +41,9 @@ func resource_pack_loaded(new_value := []) -> void:
func colourful_pipes_changed(new_value := 0) -> void:
Settings.file.visuals.colour_pipes = new_value
func smbs_scroll_changed(new_value := 0) -> void:
Settings.file.visuals.smbs_scroll = new_value
func visible_timers_changed(new_value := 0) -> void:
Settings.file.visuals.visible_timers = new_value
@@ -69,6 +72,7 @@ func set_value(value_name := "", value = null) -> void:
"resource_packs": resource_pack_loaded,
"bridge_animation": bridge_changed,
"transition_animation": transform_style_changed,
"smbs_scroll": smbs_scroll_changed,
"colour_pipes": colourful_pipes_changed,
"firebar_style": firebar_style_changed,
"extra_particles": extra_particles