mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
g/j2: speed up level-select menu scrolling (#3013)
This commit is contained in:
@@ -2880,6 +2880,42 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; og:preserve-this - Added to make scrolling these menus faster (jak3 has this)
|
||||
((or (cpad-pressed? 0 left) (and (cpad-hold? 0 left) (>= (- (current-time) (-> obj last-move)) (seconds 0.075))))
|
||||
(when (> (-> obj task-index) 0)
|
||||
(set! (-> obj last-move) (current-time))
|
||||
(set! s4-0 #t)
|
||||
(set! (-> obj task-index) (max (- (-> obj task-index) 5) 0))
|
||||
(set! (-> arg0 sliding-height) 0.0)))
|
||||
;; og:preserve-this - Added to make scrolling these menus faster (jak3 has this)
|
||||
((or (cpad-pressed? 0 right) (and (cpad-hold? 0 right) (>= (- (current-time) (-> obj last-move)) (seconds 0.075))))
|
||||
(let ((max-task-index -1))
|
||||
(dotimes (s2-0 (-> *game-info* play-list length))
|
||||
(let* ((v1-41 (-> *game-info* play-list s2-0))
|
||||
(a0-20 (-> arg0 current))
|
||||
(a0-22 (cond
|
||||
((= a0-20 'select-pre-start)
|
||||
(or (-> v1-41 play-continue) (-> v1-41 pre-play-continue))
|
||||
)
|
||||
((= a0-20 'select-kiosk-start)
|
||||
(-> v1-41 kiosk-play-continue)
|
||||
)
|
||||
(else
|
||||
(-> v1-41 play-continue)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a0-22 (lookup-text! *common-text* (-> v1-41 text-name) #t))
|
||||
(+! max-task-index 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (-> obj task-index) max-task-index)
|
||||
(set! (-> obj last-move) (current-time))
|
||||
(set! s4-0 #t)
|
||||
(set! (-> obj task-index) (min (+ (-> obj task-index) 5) max-task-index))
|
||||
(set! (-> arg0 sliding-height) 0.0))))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm))
|
||||
|
||||
Reference in New Issue
Block a user