mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 07:25:37 -04:00
Create abutton-idx enum, replace magic numbers across codebase (#3646)
Found out the hard way that the `abutton` array for pressure sensitivity uses a different order than the `pad-buttons` enum, so I created a new enum for abutton indexing. I replaced any magic numbers across the codebase where it made sense, e.g. `(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)` becomes `(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx x))`
This commit is contained in:
@@ -287,25 +287,41 @@
|
||||
)
|
||||
|
||||
(defenum pad-buttons
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(select 0)
|
||||
(l3 1)
|
||||
(r3 2)
|
||||
(start 3)
|
||||
(up 4)
|
||||
(right 5)
|
||||
(down 6)
|
||||
(left 7)
|
||||
(l2 8)
|
||||
(r2 9)
|
||||
(l1 10)
|
||||
(r1 11)
|
||||
(triangle 12)
|
||||
(circle 13)
|
||||
(x 14)
|
||||
(square 15)
|
||||
)
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(select 0)
|
||||
(l3 1)
|
||||
(r3 2)
|
||||
(start 3)
|
||||
(up 4)
|
||||
(right 5)
|
||||
(down 6)
|
||||
(left 7)
|
||||
(l2 8)
|
||||
(r2 9)
|
||||
(l1 10)
|
||||
(r1 11)
|
||||
(triangle 12)
|
||||
(circle 13)
|
||||
(x 14)
|
||||
(square 15)
|
||||
)
|
||||
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11)
|
||||
)
|
||||
|
||||
(defenum gs-psm
|
||||
:bitfield #f
|
||||
|
||||
@@ -4202,6 +4202,22 @@ and the state of the VU memory buffers at the end of the bucket."
|
||||
(confirm 24)
|
||||
)
|
||||
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11)
|
||||
)
|
||||
|
||||
(defenum mouse-buttons
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
|
||||
@@ -4603,6 +4603,24 @@
|
||||
)
|
||||
;; ---pad:pad-buttons
|
||||
|
||||
;; +++pad:abutton-idx
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11)
|
||||
)
|
||||
;; ---pad:abutton-idx
|
||||
|
||||
;; +++pad:mouse-buttons
|
||||
(defenum mouse-buttons
|
||||
:bitfield #t
|
||||
|
||||
@@ -556,7 +556,7 @@
|
||||
(if (cpad-hold? arg2 r1)
|
||||
(set! (-> arg1 y)
|
||||
(+ 0.5
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 9))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
(the-as float 0.0)
|
||||
(the-as float 32.0)
|
||||
(the-as float 230.0)
|
||||
@@ -567,7 +567,7 @@
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y)
|
||||
(+ 0.5
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 8))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
(the-as float 0.0)
|
||||
(the-as float 32.0)
|
||||
(the-as float 230.0)
|
||||
|
||||
@@ -72,35 +72,59 @@
|
||||
(set! (-> arg0 x)
|
||||
(- (-> arg0 x)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 6)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed)))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx x))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed)))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 triangle)
|
||||
(+! (-> arg0 x)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 4)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx triangle))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 square)
|
||||
(+! (-> arg0 y)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 7)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx square))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 circle)
|
||||
(set! (-> arg0 y)
|
||||
(- (-> arg0 y)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 5)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed))))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx circle))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed))))))))
|
||||
(when arg2
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 l2)
|
||||
(+! (-> arg0 z)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 10)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l2))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 r2)
|
||||
(set! (-> arg0 z)
|
||||
(- (-> arg0 z)
|
||||
(+ (-> *CAM_FREE-bank* rot-speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 11)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* rot-speed))))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r2))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* rot-speed))))))))
|
||||
(cond
|
||||
((not *cam-free-move-along-z*))
|
||||
((not *camera-read-analog*))
|
||||
@@ -109,48 +133,80 @@
|
||||
(if (cpad-hold? arg3 r1)
|
||||
(+! (-> arg1 y)
|
||||
(+ (* 0.2 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 9)) 0.0 32.0 230.0 (* 0.2 (-> *CAM_FREE-bank* speed)))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(* 0.2 (-> *CAM_FREE-bank* speed)))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 l1)
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y)
|
||||
(+ (* 0.2 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 8)) 0.0 32.0 230.0 (* 0.2 (-> *CAM_FREE-bank* speed)))))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(* 0.2 (-> *CAM_FREE-bank* speed)))))))))
|
||||
(else
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 r1)
|
||||
(+! (-> arg1 y)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 9)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 l1)
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 8)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)))))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed)))))))))
|
||||
(when (and (!= *master-mode* 'menu) (not *cam-layout*))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 left)
|
||||
(+! (-> arg1 x)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 1)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx left))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 right)
|
||||
(set! (-> arg1 x)
|
||||
(- (-> arg1 x)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 0)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx right))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed)))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 up)
|
||||
(+! (-> arg1 z)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 2)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx up))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed))))))
|
||||
(when *camera-read-buttons*
|
||||
(if (cpad-hold? arg3 down)
|
||||
(set! (-> arg1 z)
|
||||
(- (-> arg1 z)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 3)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))))))))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx down))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
(-> *CAM_FREE-bank* speed))))))))
|
||||
(when *camera-read-analog*
|
||||
(let ((f28-14 (analog-input (the-as int (-> *cpad-list* cpads arg3 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(f30-14 (analog-input (the-as int (-> *cpad-list* cpads arg3 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
|
||||
@@ -45,6 +45,21 @@
|
||||
(x 14)
|
||||
(square 15))
|
||||
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11))
|
||||
|
||||
(defenum pad-type
|
||||
(normal 4)
|
||||
(analog 5)
|
||||
@@ -156,22 +171,19 @@
|
||||
(set! (-> gp-0 cpads 3) (new 'global 'cpad-info 3))
|
||||
gp-0))
|
||||
|
||||
;; Allocates enough input frames to support counting 50ms of time at 300fps.
|
||||
;; Allocates enough input frames to support counting 50ms of time at 300fps.
|
||||
(deftype cpad-history (basic)
|
||||
((button0-abs pad-buttons 15) ;; bitmask of buttons, pressed or not, with history
|
||||
(button0-rel pad-buttons 15) ;; bitmask of if button going down.
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
;; List of extended history for controllers at high fps. It always has 4 controllers.
|
||||
(deftype cpad-history-list (basic)
|
||||
((num-cpads int32)
|
||||
(cpads cpad-history 4) ;; modified from 2->4 for PC 4-pad support
|
||||
((num-cpads int32)
|
||||
(cpads cpad-history 4) ;; modified from 2->4 for PC 4-pad support
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
)
|
||||
)
|
||||
(new (symbol type) _type_)))
|
||||
|
||||
(defmethod new cpad-history-list ((allocation symbol) (type-to-make type))
|
||||
"Create a cpad-history-list for 4 controllers. It's fine to do this even if controllers
|
||||
@@ -182,9 +194,7 @@
|
||||
(set! (-> this cpads 1) (new 'global 'cpad-history))
|
||||
(set! (-> this cpads 2) (new 'global 'cpad-history))
|
||||
(set! (-> this cpads 3) (new 'global 'cpad-history))
|
||||
this
|
||||
)
|
||||
)
|
||||
this))
|
||||
|
||||
(defun analog-input ((in int) (offset float) (center-val float) (max-val float) (out-range float))
|
||||
"Convert integer input from pad into a float between -out-range and +out-range.
|
||||
@@ -245,17 +255,14 @@
|
||||
|
||||
;; the four controllers
|
||||
(define *cpad-list* (new 'global 'cpad-list))
|
||||
|
||||
;; the cpad-history for each controller
|
||||
(define *cpad-history-list* (new 'global 'cpad-history-list))
|
||||
|
||||
(desfun generate-frame-checks (pad-idx frames)
|
||||
(if (= frames 0)
|
||||
0
|
||||
`(logior (-> *cpad-history-list* cpads ,pad-idx button0-rel ,(- frames 1))
|
||||
,(generate-frame-checks pad-idx (- frames 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
`(logior (-> *cpad-history-list* cpads ,pad-idx button0-rel ,(- frames 1)) ,(generate-frame-checks pad-idx (- frames 1)))))
|
||||
|
||||
;; weird leftover debug thing, enabling overrides the x position of both sticks on all controllers.
|
||||
(define *cpad-debug* #f)
|
||||
@@ -268,7 +275,7 @@
|
||||
(let ((pad-list *cpad-list*))
|
||||
(dotimes (pad-idx (-> pad-list num-cpads))
|
||||
(let ((pad (-> *cpad-list* cpads pad-idx))
|
||||
(history (-> *cpad-history-list* cpads pad-idx)))
|
||||
(history (-> *cpad-history-list* cpads pad-idx)))
|
||||
;; read from hardware.
|
||||
(cpad-get-data pad)
|
||||
(cond
|
||||
@@ -295,61 +302,49 @@
|
||||
(set! (-> pad button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
(set! (-> pad button0-rel 2) (-> pad button0-rel 1))
|
||||
(set! (-> pad button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
;; og:preserve-this high fps fix
|
||||
;; og:preserve-this high fps fix
|
||||
(when (>= (-> *pc-settings* target-fps) 300)
|
||||
(set! (-> history button0-abs 14) (-> history button0-abs 13))
|
||||
(set! (-> history button0-abs 13) (-> history button0-abs 12))
|
||||
(set! (-> history button0-abs 12) (-> history button0-abs 11))
|
||||
|
||||
(set! (-> history button0-rel 14) (-> history button0-rel 13))
|
||||
(set! (-> history button0-rel 13) (-> history button0-rel 12))
|
||||
(set! (-> history button0-rel 12) (-> history button0-rel 11))
|
||||
)
|
||||
(set! (-> history button0-abs 14) (-> history button0-abs 13))
|
||||
(set! (-> history button0-abs 13) (-> history button0-abs 12))
|
||||
(set! (-> history button0-abs 12) (-> history button0-abs 11))
|
||||
(set! (-> history button0-rel 14) (-> history button0-rel 13))
|
||||
(set! (-> history button0-rel 13) (-> history button0-rel 12))
|
||||
(set! (-> history button0-rel 12) (-> history button0-rel 11)))
|
||||
(when (>= (-> *pc-settings* target-fps) 240)
|
||||
(set! (-> history button0-abs 11) (-> history button0-abs 10))
|
||||
(set! (-> history button0-abs 10) (-> history button0-abs 9))
|
||||
(set! (-> history button0-abs 9) (-> history button0-abs 8))
|
||||
(set! (-> history button0-rel 11) (-> history button0-rel 10))
|
||||
(set! (-> history button0-rel 10) (-> history button0-rel 9))
|
||||
(set! (-> history button0-rel 9) (-> history button0-rel 8))
|
||||
)
|
||||
(set! (-> history button0-abs 11) (-> history button0-abs 10))
|
||||
(set! (-> history button0-abs 10) (-> history button0-abs 9))
|
||||
(set! (-> history button0-abs 9) (-> history button0-abs 8))
|
||||
(set! (-> history button0-rel 11) (-> history button0-rel 10))
|
||||
(set! (-> history button0-rel 10) (-> history button0-rel 9))
|
||||
(set! (-> history button0-rel 9) (-> history button0-rel 8)))
|
||||
(when (>= (-> *pc-settings* target-fps) 165)
|
||||
(set! (-> history button0-abs 8) (-> history button0-abs 7))
|
||||
(set! (-> history button0-rel 8) (-> history button0-rel 7))
|
||||
)
|
||||
(when (>= (-> *pc-settings* target-fps) 150)
|
||||
(set! (-> history button0-abs 7) (-> history button0-abs 6))
|
||||
(set! (-> history button0-abs 6) (-> history button0-abs 5))
|
||||
|
||||
(set! (-> history button0-rel 7) (-> history button0-rel 6))
|
||||
(set! (-> history button0-rel 6) (-> history button0-rel 5))
|
||||
)
|
||||
(set! (-> history button0-abs 8) (-> history button0-abs 7))
|
||||
(set! (-> history button0-rel 8) (-> history button0-rel 7)))
|
||||
(when (>= (-> *pc-settings* target-fps) 150)
|
||||
(set! (-> history button0-abs 7) (-> history button0-abs 6))
|
||||
(set! (-> history button0-abs 6) (-> history button0-abs 5))
|
||||
(set! (-> history button0-rel 7) (-> history button0-rel 6))
|
||||
(set! (-> history button0-rel 6) (-> history button0-rel 5)))
|
||||
(when (>= (-> *pc-settings* target-fps) 120)
|
||||
(set! (-> history button0-abs 5) (-> history button0-abs 4))
|
||||
(set! (-> history button0-abs 4) (-> history button0-abs 3))
|
||||
(set! (-> history button0-rel 5) (-> history button0-rel 4))
|
||||
(set! (-> history button0-rel 4) (-> history button0-rel 3))
|
||||
)
|
||||
(set! (-> history button0-abs 5) (-> history button0-abs 4))
|
||||
(set! (-> history button0-abs 4) (-> history button0-abs 3))
|
||||
(set! (-> history button0-rel 5) (-> history button0-rel 4))
|
||||
(set! (-> history button0-rel 4) (-> history button0-rel 3)))
|
||||
(when (>= (-> *pc-settings* target-fps) 75)
|
||||
(set! (-> history button0-abs 3) (-> history button0-abs 2))
|
||||
(set! (-> history button0-rel 3) (-> history button0-rel 2))
|
||||
)
|
||||
(set! (-> history button0-abs 3) (-> history button0-abs 2))
|
||||
(set! (-> history button0-rel 3) (-> history button0-rel 2)))
|
||||
(set! (-> history button0-abs 2) (-> history button0-abs 1))
|
||||
(set! (-> history button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
(set! (-> history button0-rel 2) (-> history button0-rel 1))
|
||||
(set! (-> history button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
;; we might want to clear a button after it is pressed, so we back it up in a "shadow" field
|
||||
(let ((current-button0 (-> pad button0)))
|
||||
(set! (-> pad button0-shadow-abs 0) (the-as pad-buttons current-button0))
|
||||
(set! (-> pad button0-abs 0) (the-as pad-buttons current-button0))
|
||||
(set! (-> history button0-abs 0) (-> pad button0-abs 0))
|
||||
)
|
||||
(set! (-> history button0-abs 0) (-> pad button0-abs 0)))
|
||||
;; buttons going down
|
||||
(set! (-> pad button0-rel 0) (logclear (-> pad button0-abs 0) (-> pad button0-abs 1)))
|
||||
(set! (-> history button0-rel 0) (-> pad button0-rel 0))
|
||||
|
||||
(set! (-> history button0-rel 0) (-> pad button0-rel 0))
|
||||
;; some debugging thing they wrote at some point
|
||||
(when *cpad-debug*
|
||||
(set! (-> pad leftx) (the-as uint 255))
|
||||
|
||||
@@ -245,13 +245,10 @@
|
||||
(remove-exit)
|
||||
(go target-duck-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet?))
|
||||
(go target-attack))
|
||||
(if (and (recently-pressed? circle) (can-feet?)) (go target-attack))
|
||||
(if (can-hands? #t) (go target-running-attack))
|
||||
(slide-down-test)
|
||||
(fall-test))
|
||||
@@ -405,13 +402,10 @@
|
||||
(remove-exit)
|
||||
(go target-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet?))
|
||||
(go target-attack))
|
||||
(if (and (recently-pressed? circle) (can-feet?)) (go target-attack))
|
||||
(if (can-hands? #t) (go target-running-attack))
|
||||
(when (and (turn-around?) (time-elapsed? (-> self state-time) (seconds 0.3)))
|
||||
(set! (-> self control transv quad) (-> self control unknown-vector-array10 (-> self control unknown-int10) quad))
|
||||
@@ -612,8 +606,7 @@
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?)) (go target-attack))
|
||||
(if (can-hands? #t) (go target-running-attack))
|
||||
@@ -762,8 +755,7 @@
|
||||
(go target-stance))
|
||||
(if (move-legs?) (go target-duck-walk))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(when (and (recently-pressed? x) (can-jump? #f))
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(go target-high-jump (-> *TARGET-bank* duck-jump-height-min) (-> *TARGET-bank* duck-jump-height-max) 'duck)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))))
|
||||
@@ -815,8 +807,7 @@
|
||||
(go target-walk))
|
||||
(if (not (move-legs?)) (go target-duck-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(when (and (recently-pressed? x) (can-jump? #f))
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(go target-high-jump (-> *TARGET-bank* duck-jump-height-min) (-> *TARGET-bank* duck-jump-height-max) 'duck)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))))
|
||||
@@ -874,7 +865,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax (-> self control unknown-float123)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(target-falling-trans #f (the-as time-frame (if (ja-group? eichar-jump-loop-ja) 15 -1)))
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0)
|
||||
@@ -1189,10 +1180,9 @@
|
||||
600
|
||||
1500))
|
||||
:trans
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
(if (and (not (can-exit-duck?)) (can-duck?)) (go target-duck-stance))
|
||||
(when (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
@@ -1236,9 +1226,8 @@
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 74)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
(level-hint-spawn (text-id misty-eco-red-first-use) "sksp0072" (the-as entity #f) *entity-pool* (game-task none)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
(suspend)
|
||||
(ja :num! (seek! max (-> self control unknown-surface01 align-speed))))
|
||||
@@ -1852,9 +1841,8 @@
|
||||
((time-elapsed? (-> self state-hook-time) (-> *TARGET-bank* wheel-jump-post-window))
|
||||
(set! (-> self state-hook) (the-as (function none :behavior target) nothing)))
|
||||
(else
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? 'target-wheel-flip))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? 'target-wheel-flip))
|
||||
(go target-wheel-flip (-> *TARGET-bank* wheel-flip-height) (-> *TARGET-bank* wheel-flip-dist)))))
|
||||
(none)))
|
||||
(go target-duck-stance))
|
||||
@@ -1933,9 +1921,8 @@
|
||||
((time-elapsed? (-> self state-hook-time) (seconds 0.1))
|
||||
(set! (-> self state-hook) (the-as (function none :behavior target) nothing)))
|
||||
(else
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-high-jump (-> *TARGET-bank* flip-jump-height-min) (-> *TARGET-bank* flip-jump-height-max) 'flip))))
|
||||
(none)))
|
||||
(if (ja-group? eichar-jump-loop-ja) (go target-hit-ground #f) (go target-stance)))
|
||||
|
||||
@@ -347,8 +347,8 @@
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf))
|
||||
(init-vf0-vector)
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(init-vf0-vector)
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(when (and (recently-pressed? r2 circle square)
|
||||
(and (= (-> self fact eco-type) (pickup-type eco-yellow)) (>= (-> self fact eco-level) 1.0))
|
||||
(time-elapsed? (-> self control unknown-dword82) (seconds 0.5))
|
||||
@@ -427,7 +427,7 @@
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf))
|
||||
(init-vf0-vector)
|
||||
;; og:preserve-this - High FPS Fix
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(when (and (recently-pressed? r2 circle square)
|
||||
(time-elapsed? (-> self control unknown-dword82) (seconds 0.45))
|
||||
(and (= (-> self fact eco-type) (pickup-type eco-yellow)) (>= (-> self fact eco-level) 1.0))
|
||||
@@ -590,7 +590,7 @@
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action swingpole-active))
|
||||
(set! (-> self control unknown-handle10) (the-as handle #f)))
|
||||
:trans
|
||||
(behavior ()
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(when (and (recently-pressed? x)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
@@ -748,7 +748,7 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (and (time-elapsed? (-> self state-time) (seconds 0.2))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(recently-pressed? x)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump))))
|
||||
(cond
|
||||
@@ -1036,7 +1036,7 @@
|
||||
:frame-num
|
||||
(ja-aframe (the-as float (if (= arg1 (-> *FACT-bank* eco-full-inc)) 0.0 6.0)) 0))
|
||||
(until (ja-done? 0)
|
||||
;; og:preserve-this - High FPS Fix
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump))))
|
||||
@@ -1078,8 +1078,7 @@
|
||||
(if (and (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1) (can-duck?)) (go target-duck-stance))
|
||||
(if (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0) (go target-wade-walk))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
(sound-play "swim-stroke")
|
||||
@@ -1107,8 +1106,7 @@
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0) (go target-wade-stance))
|
||||
(if (and (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1) (can-duck?)) (go target-duck-walk))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
(sound-play "swim-stroke")
|
||||
@@ -1254,14 +1252,11 @@
|
||||
(set-zero! (-> self water bob)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11))) (time-elapsed? (-> self state-time) (seconds 0.1)))
|
||||
(if (logtest? (-> self water flags) (water-flags wt10)) (go target-wade-stance) (go target-stance)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(time-elapsed? (-> self water enter-swim-time) (seconds 0.1)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f) (time-elapsed? (-> self water enter-swim-time) (seconds 0.1)))
|
||||
(go target-swim-jump (-> *TARGET-bank* swim-jump-height-min) (-> *TARGET-bank* swim-jump-height-max)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? square)
|
||||
(< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? square) (< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground)))
|
||||
(go target-swim-down))
|
||||
(if (and (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(let ((gp-0 (ja-group)))
|
||||
@@ -1315,14 +1310,11 @@
|
||||
(set-zero! (-> self water bob)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11))) (time-elapsed? (-> self water swim-time) (seconds 0.1)))
|
||||
(if (logtest? (-> self water flags) (water-flags wt10)) (go target-wade-stance) (go target-stance)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(time-elapsed? (-> self water enter-swim-time) (seconds 0.1)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f) (time-elapsed? (-> self water enter-swim-time) (seconds 0.1)))
|
||||
(go target-swim-jump (-> *TARGET-bank* swim-jump-height-min) (-> *TARGET-bank* swim-jump-height-max)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? square)
|
||||
(< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? square) (< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground)))
|
||||
(go target-swim-down))
|
||||
(cond
|
||||
((= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
|
||||
@@ -500,13 +500,17 @@
|
||||
(define-extern pc-get-window-scale (function (pointer float) (pointer float) none))
|
||||
|
||||
(define-extern pc-set-window-size! (function int int none))
|
||||
|
||||
(define-extern pc-get-display-id (function int))
|
||||
|
||||
(define-extern pc-set-display-id! (function int none))
|
||||
|
||||
(define-extern pc-set-display-mode! (function symbol none))
|
||||
|
||||
(define-extern pc-get-num-resolutions (function int))
|
||||
|
||||
(define-extern pc-get-resolution (function int (pointer int64) (pointer int64) none))
|
||||
|
||||
(define-extern pc-is-supported-resolution? (function int int symbol))
|
||||
|
||||
(define-extern pc-set-frame-rate (function int none))
|
||||
|
||||
@@ -385,8 +385,7 @@
|
||||
(behavior ()
|
||||
(if (move-legs?) (go target-flut-walk))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)))
|
||||
(if (can-hands? #t) (go target-flut-running-attack))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
@@ -437,8 +436,7 @@
|
||||
(behavior ()
|
||||
(if (not (move-legs?)) (go target-flut-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)))
|
||||
(if (can-hands? #t) (go target-flut-running-attack))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
@@ -545,7 +543,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax (-> self control unknown-float123)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf)) (go target-flut-hit-ground))
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0)
|
||||
@@ -690,10 +688,9 @@
|
||||
(-> target-flut-start
|
||||
exit)
|
||||
:trans
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)))
|
||||
(if (move-legs?) (go target-flut-walk))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
|
||||
@@ -248,8 +248,8 @@
|
||||
(target-racing-center-anim)
|
||||
((-> target-racing-start exit)))
|
||||
:trans
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? l1 r1)
|
||||
(or (not (time-elapsed? (-> self control unknown-dword11) (seconds 0.1)))
|
||||
(< (vector-dot (-> self control dynam gravity-normal)
|
||||
@@ -369,7 +369,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax (-> self control unknown-float123)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(cond
|
||||
((cpad-pressed? (-> self control unknown-cpad-info00 number) l1 r1) (set-time! (-> self racer slide-down-time 0)))
|
||||
((not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1)) (set! (-> self racer slide-down-time 0) 0) 0)
|
||||
@@ -432,7 +432,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax (-> self control unknown-float123)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? l1 r1)
|
||||
(or (not (time-elapsed? (-> self control unknown-dword11) (seconds 0.2)))
|
||||
|
||||
@@ -748,23 +748,23 @@
|
||||
(f28-1 (* f28-0
|
||||
(cond
|
||||
((zero? v1-17)
|
||||
(- (fmax (analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 8))
|
||||
(- (fmax (analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
255.0
|
||||
1.0)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 9))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
255.0
|
||||
1.0))))
|
||||
((= v1-17 1)
|
||||
(fmax (analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 8))
|
||||
(fmax (analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
255.0
|
||||
1.0)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 9))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
255.0
|
||||
|
||||
@@ -22,13 +22,10 @@
|
||||
(remove-exit)
|
||||
(go target-duck-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet?))
|
||||
(go target-attack))
|
||||
(if (and (recently-pressed? circle) (can-feet?)) (go target-attack))
|
||||
(if (can-hands? #t) (go target-running-attack))
|
||||
(slide-down-test)
|
||||
(fall-test))
|
||||
@@ -134,13 +131,10 @@
|
||||
(remove-exit)
|
||||
(go target-ice-stance))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f)))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet?))
|
||||
(go target-attack))
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? circle) (can-feet?)) (go target-attack))
|
||||
(if (can-hands? #t) (go target-running-attack))
|
||||
(slide-down-test)
|
||||
(fall-test))
|
||||
|
||||
@@ -435,10 +435,9 @@
|
||||
(-> target-tube-start
|
||||
exit)
|
||||
:trans
|
||||
(behavior ()
|
||||
(behavior ()
|
||||
;; og:preserve-this - High FPS Fix
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f))
|
||||
(if (and (recently-pressed? x) (can-jump? #f))
|
||||
(go target-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max))))
|
||||
:code
|
||||
(behavior ()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
(deftype test-actor (process-drawable)
|
||||
((root collide-shape-moving :override)
|
||||
(birth-time time-frame)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
(require "kernel-defs.gc")
|
||||
|
||||
|
||||
;; LiveSplit ASL requires all settings to initalized _before_ you connect the process
|
||||
;; Therefore everything has to be laid out in a predictable fashion before hand
|
||||
;; So this is a lot of hard-coding, but not too bad when just copied from the debug menu code
|
||||
@@ -172,8 +170,10 @@
|
||||
(com-rolling-moles uint8)
|
||||
(com-rolling-race uint8)
|
||||
;; end marker just to make things look nice in a memory view
|
||||
(end-marker uint8 4)))
|
||||
(end-marker uint8 4)))
|
||||
|
||||
(define-extern *autosplit-info-jak1* autosplit-info-jak1)
|
||||
|
||||
(define-extern update-autosplit-info-jak1 (function none))
|
||||
|
||||
(define-extern update-autosplit-jak1-new-game (function none))
|
||||
|
||||
@@ -277,7 +277,6 @@
|
||||
(if (task-closed? (game-task rolling-moles) (task-status need-reminder)) 1 0))
|
||||
(set! (-> *autosplit-info-jak1* com-rolling-race)
|
||||
(if (task-closed? (game-task rolling-race) (task-status need-reminder)) 1 0))
|
||||
|
||||
;; end
|
||||
(none))
|
||||
|
||||
|
||||
@@ -140,10 +140,8 @@
|
||||
(set! (-> *pc-settings* ps2-actor-vis?) #t)
|
||||
;; ensure FPS set to `60`
|
||||
(when (!= (-> *pc-settings* target-fps) 60)
|
||||
(set-frame-rate! *pc-settings* 60 #t)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(set-frame-rate! *pc-settings* 60 #t))
|
||||
(none))
|
||||
|
||||
(defun start-speedrun ((category speedrun-category))
|
||||
;; randomize game id so the autosplitter knows to restart
|
||||
|
||||
+142
-137
@@ -36,14 +36,14 @@
|
||||
(let ((display-mode (pc-get-display-mode)))
|
||||
(cond
|
||||
((= display-mode 'windowed)
|
||||
(set! (-> obj window-width) width)
|
||||
(set! (-> obj window-height) height)
|
||||
(format 0 "Setting window size to ~D x ~D~%" width height)
|
||||
(pc-set-window-size! (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height))))
|
||||
(set! (-> obj window-width) width)
|
||||
(set! (-> obj window-height) height)
|
||||
(format 0 "Setting window size to ~D x ~D~%" width height)
|
||||
(pc-set-window-size! (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height))))
|
||||
(else
|
||||
(format 0 "Setting borderless/fullscreen size to ~D x ~D~%" width height)
|
||||
(set! (-> obj width) width)
|
||||
(set! (-> obj height) height))))
|
||||
(format 0 "Setting borderless/fullscreen size to ~D x ~D~%" width height)
|
||||
(set! (-> obj width) width)
|
||||
(set! (-> obj height) height))))
|
||||
(none))
|
||||
|
||||
(defmethod set-aspect! ((obj pc-settings) (aw int) (ah int))
|
||||
@@ -412,30 +412,30 @@
|
||||
(let ((version PC_KERNEL_VERSION))
|
||||
(with-settings-scope (file)
|
||||
(case-str (file-stream-read-word file)
|
||||
(("settings")
|
||||
(set! version (the pckernel-version (file-stream-read-int file)))
|
||||
(cond
|
||||
((and (= (-> version major) PC_KERNEL_VER_MAJOR) (= (-> version minor) PC_KERNEL_VER_MINOR))
|
||||
;; minor or no difference
|
||||
)
|
||||
(else
|
||||
;; major difference
|
||||
(format 0
|
||||
"PC kernel version mismatch! Got ~D.~D vs ~D.~D~%"
|
||||
PC_KERNEL_VER_MAJOR
|
||||
PC_KERNEL_VER_MINOR
|
||||
(-> version major)
|
||||
(-> version minor))
|
||||
(file-stream-close file)
|
||||
(return #f)))
|
||||
(dosettings (file) (handle-input-settings obj file))
|
||||
;; upgrade settings if minor changes
|
||||
;; remember to delete this when major changes to the version number are made
|
||||
(when (and (= PC_KERNEL_VER_MAJOR 1)
|
||||
(= PC_KERNEL_VER_MINOR 10)
|
||||
(or (> 3 (-> version build)) (and (= 3 (-> version build)) (> 1 (-> version revision)))))
|
||||
;; 1.10 upgrade: turn envmap on
|
||||
(set! (-> obj force-envmap?) #t))))))
|
||||
(("settings")
|
||||
(set! version (the pckernel-version (file-stream-read-int file)))
|
||||
(cond
|
||||
((and (= (-> version major) PC_KERNEL_VER_MAJOR) (= (-> version minor) PC_KERNEL_VER_MINOR))
|
||||
;; minor or no difference
|
||||
)
|
||||
(else
|
||||
;; major difference
|
||||
(format 0
|
||||
"PC kernel version mismatch! Got ~D.~D vs ~D.~D~%"
|
||||
PC_KERNEL_VER_MAJOR
|
||||
PC_KERNEL_VER_MINOR
|
||||
(-> version major)
|
||||
(-> version minor))
|
||||
(file-stream-close file)
|
||||
(return #f)))
|
||||
(dosettings (file) (handle-input-settings obj file))
|
||||
;; upgrade settings if minor changes
|
||||
;; remember to delete this when major changes to the version number are made
|
||||
(when (and (= PC_KERNEL_VER_MAJOR 1)
|
||||
(= PC_KERNEL_VER_MINOR 10)
|
||||
(or (> 3 (-> version build)) (and (= 3 (-> version build)) (> 1 (-> version revision)))))
|
||||
;; 1.10 upgrade: turn envmap on
|
||||
(set! (-> obj force-envmap?) #t))))))
|
||||
(file-stream-close file))
|
||||
(format 0 "pc settings file read: ~A~%" filename)
|
||||
;; restore the windowed mode resolution properly
|
||||
@@ -446,108 +446,113 @@
|
||||
(defmethod handle-input-settings ((obj pc-settings) (file file-stream))
|
||||
"handle the text parsing input for the 'settings' group"
|
||||
(case-str *pc-temp-string*
|
||||
(("fps") (set-frame-rate! obj (file-stream-read-int file) #t))
|
||||
(("window-size")
|
||||
(set! (-> obj window-width) (file-stream-read-int file))
|
||||
(set! (-> obj window-height) (file-stream-read-int file)))
|
||||
(("game-size")
|
||||
;; Check to see if the game-size is a valid resolution on this persons device
|
||||
;; on some machines, this has been proven to cause the black-screen issue https://github.com/open-goal/jak-project/issues/3563
|
||||
;; Correlating with logs like:
|
||||
;; - OpenGL error 0x502 S8246 T824C: GL_INVALID_OPERATION error generated. Source and destination dimensions must be identical with the current filtering modes.
|
||||
(let* ((saved-width (file-stream-read-int file))
|
||||
(saved-height (file-stream-read-int file))
|
||||
(supported-resolution? (pc-is-supported-resolution? saved-width saved-height)))
|
||||
(cond
|
||||
(supported-resolution?
|
||||
(format 0 "[PC Settings]: Valid game-size resolution ~D x ~D~%" saved-width saved-height)
|
||||
(set! (-> obj width) saved-width)
|
||||
(set! (-> obj height) saved-height))
|
||||
(else
|
||||
(pc-get-active-display-size (&-> obj width) (&-> obj height))
|
||||
(format 0 "[PC Settings]: Invalid game-size resolution ~D x ~D, defaulting to ~D x ~D~%" saved-width saved-height (-> obj width) (-> obj height))))))
|
||||
(("msaa") (set! (-> obj gfx-msaa) (file-stream-read-int file)))
|
||||
(("aspect-state")
|
||||
;; game aspect
|
||||
(set-game-setting! obj 'aspect-ratio (file-stream-read-symbol file))
|
||||
;; aspect ratio
|
||||
(set! (-> obj aspect-custom-x) (file-stream-read-int file))
|
||||
(set! (-> obj aspect-custom-y) (file-stream-read-int file))
|
||||
;; aspect auto
|
||||
(set! (-> obj aspect-ratio-auto?) (file-stream-read-symbol file))
|
||||
(unless (-> obj aspect-ratio-auto?)
|
||||
(set-aspect! obj (-> obj aspect-custom-x) (-> obj aspect-custom-y))))
|
||||
;; TODO - moved to C++, has to remain because settings parsing can't handle
|
||||
;; unexpected keys
|
||||
(("display-mode") (file-stream-read-symbol file))
|
||||
;; TODO - moved to C++, has to remain because settings parsing can't handle
|
||||
;; unexpected keys
|
||||
(("monitor") (file-stream-read-int file))
|
||||
(("letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file)))
|
||||
(("vsync") (set! (-> obj vsync?) (file-stream-read-symbol file)))
|
||||
(("font-scale") (set! (-> obj font-scale) (file-stream-read-float file)))
|
||||
(("audio-latency-ms") (set! (-> obj audio-latency-ms) (file-stream-read-int file)))
|
||||
(("audio-pan-override") (set! (-> obj audio-pan-override) (file-stream-read-float file)))
|
||||
(("audio-volume-override") (set! (-> obj audio-volume-override) (file-stream-read-float file)))
|
||||
(("audio-channel-nb") (set! (-> obj audio-channel-nb) (file-stream-read-int file)))
|
||||
(("gfx-renderer") (set! (-> obj gfx-renderer) (the-as pc-gfx-renderer (file-stream-read-int file))))
|
||||
(("gfx-resolution") (set! (-> obj gfx-resolution) (file-stream-read-float file)))
|
||||
(("gfx-anisotropy") (set! (-> obj gfx-anisotropy) (file-stream-read-float file)))
|
||||
(("shrub-dist-mod") (set! (-> obj shrub-dist-mod) (file-stream-read-float file)))
|
||||
(("lod-dist-mod") (set! (-> obj lod-dist-mod) (file-stream-read-float file)))
|
||||
(("lod-force-tfrag") (set! (-> obj lod-force-tfrag) (file-stream-read-int file)))
|
||||
(("lod-force-tie") (set! (-> obj lod-force-tie) (file-stream-read-int file)))
|
||||
(("lod-force-ocean") (set! (-> obj lod-force-ocean) (file-stream-read-int file)))
|
||||
(("lod-force-actor") (set! (-> obj lod-force-actor) (file-stream-read-int file)))
|
||||
(("game-language") (set-game-language! obj (the-as language-enum (file-stream-read-int file))))
|
||||
(("subtitle-speaker") (set! (-> obj subtitle-speaker?) (file-stream-read-symbol file)))
|
||||
(("territory") (set! (-> obj territory) (file-stream-read-int file)))
|
||||
(("ignore-controller-win-unfocused?") (set-ignore-controller-in-bg! obj (file-stream-read-symbol file)))
|
||||
(("controller-hp-led?") (set! (-> obj controller-led-hp?) (file-stream-read-symbol file)))
|
||||
(("controller-eco-led?") (set! (-> obj controller-led-eco?) (file-stream-read-symbol file)))
|
||||
(("controller-heat-led?") (set! (-> obj controller-led-heat?) (file-stream-read-symbol file)))
|
||||
(("stick-deadzone") (set! (-> obj stick-deadzone) (file-stream-read-float file)))
|
||||
;; TODO - remove this eventually, setting moved into json input-settings
|
||||
;; has to stay here or the settings parsing code explodes
|
||||
(("keyboard-enabled?") (file-stream-read-symbol file))
|
||||
(("mouse-enabled?") (set! (-> obj mouse-enabled?) (file-stream-read-symbol file)))
|
||||
(("mouse-camera?") (set! (-> obj mouse-camera?) (file-stream-read-symbol file)))
|
||||
(("mouse-xsens") (set! (-> obj mouse-xsens) (file-stream-read-float file)))
|
||||
(("mouse-ysens") (set! (-> obj mouse-ysens) (file-stream-read-float file)))
|
||||
(("mouse-movement?") (set! (-> obj mouse-movement?) (file-stream-read-symbol file)))
|
||||
(("auto-hide-cursor?") (set! (-> obj auto-hide-cursor?) (file-stream-read-symbol file)))
|
||||
(("ps2-read-speed?") (set! (-> obj ps2-read-speed?) (file-stream-read-symbol file)))
|
||||
(("ps2-parts?") (set! (-> obj ps2-parts?) (file-stream-read-symbol file)))
|
||||
(("ps2-music?") (set! (-> obj ps2-music?) (file-stream-read-symbol file)))
|
||||
(("ps2-se?") (set! (-> obj ps2-se?) (file-stream-read-symbol file)))
|
||||
(("ps2-hints?") (set! (-> obj ps2-hints?) (file-stream-read-symbol file)))
|
||||
(("ps2-shadow?") (set! (-> obj ps2-shadow?) (file-stream-read-symbol file)))
|
||||
(("ps2-lod-dist?") (set! (-> obj ps2-lod-dist?) (file-stream-read-symbol file)))
|
||||
(("force-envmap?") (set! (-> obj force-envmap?) (file-stream-read-symbol file)))
|
||||
(("force-actors?") (set! (-> obj ps2-actor-vis?) (not (file-stream-read-symbol file))))
|
||||
(("music-fade?") (file-stream-read-symbol file)) ;; TODO remove
|
||||
(("use-vis?") (set! (-> obj use-vis?) (file-stream-read-symbol file)))
|
||||
(("hinttitles?") (set! (-> obj hinttitles?) (file-stream-read-symbol file)))
|
||||
(("discord-rpc?") (set! (-> obj discord-rpc?) (file-stream-read-symbol file)))
|
||||
(("speedrunner-mode?") (set! (-> obj speedrunner-mode?) (file-stream-read-symbol file)))
|
||||
(("cutscene-skips?") (file-stream-read-symbol file)) ;; TODO remove
|
||||
(("first-camera-h-inverted?") (set! (-> obj first-camera-h-inverted?) (file-stream-read-symbol file)))
|
||||
(("first-camera-v-inverted?") (set! (-> obj first-camera-v-inverted?) (file-stream-read-symbol file)))
|
||||
(("third-camera-h-inverted?") (set! (-> obj third-camera-h-inverted?) (file-stream-read-symbol file)))
|
||||
(("third-camera-v-inverted?") (set! (-> obj third-camera-v-inverted?) (file-stream-read-symbol file)))
|
||||
(("music-fadein?") (set! (-> obj music-fadein?) (file-stream-read-symbol file)))
|
||||
(("music-fadeout?") (set! (-> obj music-fadeout?) (file-stream-read-symbol file)))
|
||||
(("controller-led-brightness") (set! (-> obj controller-led-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-min-brightness") (set! (-> obj controller-led-min-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-max-brightness") (set! (-> obj controller-led-max-brightness) (file-stream-read-float file)))
|
||||
(("memcard-volume-sfx") (set! (-> obj memcard-volume-sfx) (file-stream-read-float file)))
|
||||
(("memcard-volume-music") (set! (-> obj memcard-volume-music) (file-stream-read-float file)))
|
||||
(("memcard-volume-dialog") (set! (-> obj memcard-volume-dialog) (file-stream-read-float file)))
|
||||
(("memcard-vibration?") (set! (-> obj memcard-vibration?) (file-stream-read-symbol file)))
|
||||
;; debug
|
||||
(("debug-font-scale") (set! (-> obj debug-font-scale) (file-stream-read-float file)))
|
||||
(("debug-font-scale-auto?") (set! (-> obj debug-font-scale-auto?) (file-stream-read-symbol file)))
|
||||
(("panic") (when (file-stream-read-symbol file) (reset obj #t) (return #f))))
|
||||
(("fps") (set-frame-rate! obj (file-stream-read-int file) #t))
|
||||
(("window-size")
|
||||
(set! (-> obj window-width) (file-stream-read-int file))
|
||||
(set! (-> obj window-height) (file-stream-read-int file)))
|
||||
(("game-size")
|
||||
;; Check to see if the game-size is a valid resolution on this persons device
|
||||
;; on some machines, this has been proven to cause the black-screen issue https://github.com/open-goal/jak-project/issues/3563
|
||||
;; Correlating with logs like:
|
||||
;; - OpenGL error 0x502 S8246 T824C: GL_INVALID_OPERATION error generated. Source and destination dimensions must be identical with the current filtering modes.
|
||||
(let* ((saved-width (file-stream-read-int file))
|
||||
(saved-height (file-stream-read-int file))
|
||||
(supported-resolution? (pc-is-supported-resolution? saved-width saved-height)))
|
||||
(cond
|
||||
(supported-resolution?
|
||||
(format 0 "[PC Settings]: Valid game-size resolution ~D x ~D~%" saved-width saved-height)
|
||||
(set! (-> obj width) saved-width)
|
||||
(set! (-> obj height) saved-height))
|
||||
(else
|
||||
(pc-get-active-display-size (&-> obj width) (&-> obj height))
|
||||
(format 0
|
||||
"[PC Settings]: Invalid game-size resolution ~D x ~D, defaulting to ~D x ~D~%"
|
||||
saved-width
|
||||
saved-height
|
||||
(-> obj width)
|
||||
(-> obj height))))))
|
||||
(("msaa") (set! (-> obj gfx-msaa) (file-stream-read-int file)))
|
||||
(("aspect-state")
|
||||
;; game aspect
|
||||
(set-game-setting! obj 'aspect-ratio (file-stream-read-symbol file))
|
||||
;; aspect ratio
|
||||
(set! (-> obj aspect-custom-x) (file-stream-read-int file))
|
||||
(set! (-> obj aspect-custom-y) (file-stream-read-int file))
|
||||
;; aspect auto
|
||||
(set! (-> obj aspect-ratio-auto?) (file-stream-read-symbol file))
|
||||
(unless (-> obj aspect-ratio-auto?)
|
||||
(set-aspect! obj (-> obj aspect-custom-x) (-> obj aspect-custom-y))))
|
||||
;; TODO - moved to C++, has to remain because settings parsing can't handle
|
||||
;; unexpected keys
|
||||
(("display-mode") (file-stream-read-symbol file))
|
||||
;; TODO - moved to C++, has to remain because settings parsing can't handle
|
||||
;; unexpected keys
|
||||
(("monitor") (file-stream-read-int file))
|
||||
(("letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file)))
|
||||
(("vsync") (set! (-> obj vsync?) (file-stream-read-symbol file)))
|
||||
(("font-scale") (set! (-> obj font-scale) (file-stream-read-float file)))
|
||||
(("audio-latency-ms") (set! (-> obj audio-latency-ms) (file-stream-read-int file)))
|
||||
(("audio-pan-override") (set! (-> obj audio-pan-override) (file-stream-read-float file)))
|
||||
(("audio-volume-override") (set! (-> obj audio-volume-override) (file-stream-read-float file)))
|
||||
(("audio-channel-nb") (set! (-> obj audio-channel-nb) (file-stream-read-int file)))
|
||||
(("gfx-renderer") (set! (-> obj gfx-renderer) (the-as pc-gfx-renderer (file-stream-read-int file))))
|
||||
(("gfx-resolution") (set! (-> obj gfx-resolution) (file-stream-read-float file)))
|
||||
(("gfx-anisotropy") (set! (-> obj gfx-anisotropy) (file-stream-read-float file)))
|
||||
(("shrub-dist-mod") (set! (-> obj shrub-dist-mod) (file-stream-read-float file)))
|
||||
(("lod-dist-mod") (set! (-> obj lod-dist-mod) (file-stream-read-float file)))
|
||||
(("lod-force-tfrag") (set! (-> obj lod-force-tfrag) (file-stream-read-int file)))
|
||||
(("lod-force-tie") (set! (-> obj lod-force-tie) (file-stream-read-int file)))
|
||||
(("lod-force-ocean") (set! (-> obj lod-force-ocean) (file-stream-read-int file)))
|
||||
(("lod-force-actor") (set! (-> obj lod-force-actor) (file-stream-read-int file)))
|
||||
(("game-language") (set-game-language! obj (the-as language-enum (file-stream-read-int file))))
|
||||
(("subtitle-speaker") (set! (-> obj subtitle-speaker?) (file-stream-read-symbol file)))
|
||||
(("territory") (set! (-> obj territory) (file-stream-read-int file)))
|
||||
(("ignore-controller-win-unfocused?") (set-ignore-controller-in-bg! obj (file-stream-read-symbol file)))
|
||||
(("controller-hp-led?") (set! (-> obj controller-led-hp?) (file-stream-read-symbol file)))
|
||||
(("controller-eco-led?") (set! (-> obj controller-led-eco?) (file-stream-read-symbol file)))
|
||||
(("controller-heat-led?") (set! (-> obj controller-led-heat?) (file-stream-read-symbol file)))
|
||||
(("stick-deadzone") (set! (-> obj stick-deadzone) (file-stream-read-float file)))
|
||||
;; TODO - remove this eventually, setting moved into json input-settings
|
||||
;; has to stay here or the settings parsing code explodes
|
||||
(("keyboard-enabled?") (file-stream-read-symbol file))
|
||||
(("mouse-enabled?") (set! (-> obj mouse-enabled?) (file-stream-read-symbol file)))
|
||||
(("mouse-camera?") (set! (-> obj mouse-camera?) (file-stream-read-symbol file)))
|
||||
(("mouse-xsens") (set! (-> obj mouse-xsens) (file-stream-read-float file)))
|
||||
(("mouse-ysens") (set! (-> obj mouse-ysens) (file-stream-read-float file)))
|
||||
(("mouse-movement?") (set! (-> obj mouse-movement?) (file-stream-read-symbol file)))
|
||||
(("auto-hide-cursor?") (set! (-> obj auto-hide-cursor?) (file-stream-read-symbol file)))
|
||||
(("ps2-read-speed?") (set! (-> obj ps2-read-speed?) (file-stream-read-symbol file)))
|
||||
(("ps2-parts?") (set! (-> obj ps2-parts?) (file-stream-read-symbol file)))
|
||||
(("ps2-music?") (set! (-> obj ps2-music?) (file-stream-read-symbol file)))
|
||||
(("ps2-se?") (set! (-> obj ps2-se?) (file-stream-read-symbol file)))
|
||||
(("ps2-hints?") (set! (-> obj ps2-hints?) (file-stream-read-symbol file)))
|
||||
(("ps2-shadow?") (set! (-> obj ps2-shadow?) (file-stream-read-symbol file)))
|
||||
(("ps2-lod-dist?") (set! (-> obj ps2-lod-dist?) (file-stream-read-symbol file)))
|
||||
(("force-envmap?") (set! (-> obj force-envmap?) (file-stream-read-symbol file)))
|
||||
(("force-actors?") (set! (-> obj ps2-actor-vis?) (not (file-stream-read-symbol file))))
|
||||
(("music-fade?") (file-stream-read-symbol file)) ;; TODO remove
|
||||
(("use-vis?") (set! (-> obj use-vis?) (file-stream-read-symbol file)))
|
||||
(("hinttitles?") (set! (-> obj hinttitles?) (file-stream-read-symbol file)))
|
||||
(("discord-rpc?") (set! (-> obj discord-rpc?) (file-stream-read-symbol file)))
|
||||
(("speedrunner-mode?") (set! (-> obj speedrunner-mode?) (file-stream-read-symbol file)))
|
||||
(("cutscene-skips?") (file-stream-read-symbol file)) ;; TODO remove
|
||||
(("first-camera-h-inverted?") (set! (-> obj first-camera-h-inverted?) (file-stream-read-symbol file)))
|
||||
(("first-camera-v-inverted?") (set! (-> obj first-camera-v-inverted?) (file-stream-read-symbol file)))
|
||||
(("third-camera-h-inverted?") (set! (-> obj third-camera-h-inverted?) (file-stream-read-symbol file)))
|
||||
(("third-camera-v-inverted?") (set! (-> obj third-camera-v-inverted?) (file-stream-read-symbol file)))
|
||||
(("music-fadein?") (set! (-> obj music-fadein?) (file-stream-read-symbol file)))
|
||||
(("music-fadeout?") (set! (-> obj music-fadeout?) (file-stream-read-symbol file)))
|
||||
(("controller-led-brightness") (set! (-> obj controller-led-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-min-brightness") (set! (-> obj controller-led-min-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-max-brightness") (set! (-> obj controller-led-max-brightness) (file-stream-read-float file)))
|
||||
(("memcard-volume-sfx") (set! (-> obj memcard-volume-sfx) (file-stream-read-float file)))
|
||||
(("memcard-volume-music") (set! (-> obj memcard-volume-music) (file-stream-read-float file)))
|
||||
(("memcard-volume-dialog") (set! (-> obj memcard-volume-dialog) (file-stream-read-float file)))
|
||||
(("memcard-vibration?") (set! (-> obj memcard-vibration?) (file-stream-read-symbol file)))
|
||||
;; debug
|
||||
(("debug-font-scale") (set! (-> obj debug-font-scale) (file-stream-read-float file)))
|
||||
(("debug-font-scale-auto?") (set! (-> obj debug-font-scale-auto?) (file-stream-read-symbol file)))
|
||||
(("panic") (when (file-stream-read-symbol file) (reset obj #t) (return #f))))
|
||||
0)
|
||||
|
||||
(defmethod handle-output-settings ((obj pc-settings) (file file-stream))
|
||||
@@ -644,10 +649,10 @@
|
||||
(format 0 "[PC] PC Settings found at '~S' but could not be loaded, using defaults!~%" *pc-temp-string-1*)
|
||||
(reset obj #t)))
|
||||
(else
|
||||
(format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*)
|
||||
(reset obj #t)
|
||||
;; save the file so users aren't confused, and so we can debug what the game is producing for them
|
||||
(commit-to-file obj)))
|
||||
(format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*)
|
||||
(reset obj #t)
|
||||
;; save the file so users aren't confused, and so we can debug what the game is producing for them
|
||||
(commit-to-file obj)))
|
||||
0)
|
||||
|
||||
(defmethod initialize ((obj pc-settings))
|
||||
|
||||
@@ -198,8 +198,7 @@
|
||||
(memcard-volume-sfx float)
|
||||
(memcard-volume-music float)
|
||||
(memcard-volume-dialog float)
|
||||
(memcard-vibration? symbol)
|
||||
)
|
||||
(memcard-vibration? symbol))
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(initialize (_type_) _type_)
|
||||
@@ -326,12 +325,17 @@
|
||||
(let* ((saved-width (-> obj width))
|
||||
(saved-height (-> obj height))
|
||||
(supported-resolution? (pc-is-supported-resolution? saved-width saved-height)))
|
||||
(cond
|
||||
(supported-resolution?
|
||||
(format 0 "[PC Settings]: Valid default game-size resolution set ~D x ~D~%" saved-width saved-height))
|
||||
(else
|
||||
(pc-get-active-display-size (&-> obj width) (&-> obj height))
|
||||
(format 0 "[PC Settings]: Invalid game-size resolution ~D x ~D, defaulting to ~D x ~D~%" saved-width saved-height (-> obj width) (-> obj height)))))
|
||||
(cond
|
||||
(supported-resolution?
|
||||
(format 0 "[PC Settings]: Valid default game-size resolution set ~D x ~D~%" saved-width saved-height))
|
||||
(else
|
||||
(pc-get-active-display-size (&-> obj width) (&-> obj height))
|
||||
(format 0
|
||||
"[PC Settings]: Invalid game-size resolution ~D x ~D, defaulting to ~D x ~D~%"
|
||||
saved-width
|
||||
saved-height
|
||||
(-> obj width)
|
||||
(-> obj height)))))
|
||||
(format 0 "[PC Settings]: fullscreen resolution defaulted to ~D x ~D~%" (-> obj width) (-> obj height))
|
||||
(set! (-> obj gfx-msaa) PC_DEFAULT_MSAA) ;; default msaa
|
||||
0)
|
||||
@@ -422,8 +426,7 @@
|
||||
`(debug-font-scale-factor *pc-settings*))
|
||||
|
||||
(defmacro fullscreen? ()
|
||||
`(or (= (pc-get-display-mode) 'fullscreen)
|
||||
(= (pc-get-display-mode) 'borderless)))
|
||||
`(or (= (pc-get-display-mode) 'fullscreen) (= (pc-get-display-mode) 'borderless)))
|
||||
|
||||
(defun bcd->dec ((bcd uint))
|
||||
"Convert a number encoded in BCD to its decimal equivalent"
|
||||
|
||||
@@ -77,8 +77,7 @@
|
||||
(extra-hud? symbol) ;; extra hud elements.
|
||||
(secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets!
|
||||
(scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?)
|
||||
(memcard-play-hints? symbol)
|
||||
))
|
||||
(memcard-play-hints? symbol)))
|
||||
|
||||
(define *pc-settings* (the pc-settings-jak1 #f))
|
||||
|
||||
|
||||
@@ -139,8 +139,7 @@
|
||||
(when (zero? (-> date stat))
|
||||
(set-time-of-day (+ (the float (bcd->dec (-> date hour))) (/ (the float (bcd->dec (-> date minute))) 60))))))
|
||||
(pc-set-gfx-hack (pc-gfx-hack no-tex) (logtest? (-> obj cheats) (pc-cheats no-tex)))
|
||||
(if (or (pc-cheats? (-> obj cheats) mirror)
|
||||
*PC-MIRROR-MODE-SET*)
|
||||
(if (or (pc-cheats? (-> obj cheats) mirror) *PC-MIRROR-MODE-SET*)
|
||||
(sound-set-mirror-mode (sound-mirror-mode mirrored))
|
||||
(sound-set-mirror-mode (sound-mirror-mode normal)))
|
||||
;; run cheats end!!!
|
||||
@@ -437,36 +436,36 @@
|
||||
"handle the text parsing input for the 'settings' group"
|
||||
((method-of-type pc-settings handle-input-settings) obj file)
|
||||
(case-str *pc-temp-string*
|
||||
(("money-starburst?") (set! (-> obj money-starburst?) (file-stream-read-symbol file)))
|
||||
(("extra-hud?") (set! (-> obj extra-hud?) (file-stream-read-symbol file)))
|
||||
(("skip-movies?") (set! (-> obj skip-movies?) (file-stream-read-symbol file)))
|
||||
(("subtitles?") (set! (-> obj subtitles?) (file-stream-read-symbol file)))
|
||||
(("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("scenes-seen") (dotimes (i PC_SPOOL_LOG_LENGTH) (set! (-> obj scenes-seen i) (file-stream-read-int file))))
|
||||
(("memcard-play-hints?") (set! (-> obj memcard-play-hints?) (file-stream-read-symbol file)))
|
||||
(("secrets")
|
||||
(dosettings (file)
|
||||
(case-str *pc-temp-string*
|
||||
(("hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file)))
|
||||
(("hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file)))
|
||||
(("hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file)))
|
||||
(("hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file)))
|
||||
(("hud-watch?") (set! (-> obj secrets hud-watch?) (file-stream-read-symbol file)))
|
||||
(("watch-12hr?") (set! (-> obj secrets watch-12hr?) (file-stream-read-symbol file)))
|
||||
(("art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file))))
|
||||
(("hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file)))
|
||||
(("hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file)))
|
||||
(("hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file)))
|
||||
(("cheats")
|
||||
(set! (-> obj cheats-known) (the pc-cheats (file-stream-read-int file)))
|
||||
(set! (-> obj cheats) (logand (-> obj cheats-known) (file-stream-read-int file))))
|
||||
(("music")
|
||||
(dotimes (i PC_MUSIC_LOG_LENGTH)
|
||||
(when (!= #x29 (file-stream-get-next-char-ret file))
|
||||
(with-settings-scope (file)
|
||||
(set! (-> obj secrets music i name) (file-stream-read-symbol file))
|
||||
(set! (-> obj secrets music i flava-mask) (file-stream-read-int file))))))))))
|
||||
(("money-starburst?") (set! (-> obj money-starburst?) (file-stream-read-symbol file)))
|
||||
(("extra-hud?") (set! (-> obj extra-hud?) (file-stream-read-symbol file)))
|
||||
(("skip-movies?") (set! (-> obj skip-movies?) (file-stream-read-symbol file)))
|
||||
(("subtitles?") (set! (-> obj subtitles?) (file-stream-read-symbol file)))
|
||||
(("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("scenes-seen") (dotimes (i PC_SPOOL_LOG_LENGTH) (set! (-> obj scenes-seen i) (file-stream-read-int file))))
|
||||
(("memcard-play-hints?") (set! (-> obj memcard-play-hints?) (file-stream-read-symbol file)))
|
||||
(("secrets")
|
||||
(dosettings (file)
|
||||
(case-str *pc-temp-string*
|
||||
(("hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file)))
|
||||
(("hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file)))
|
||||
(("hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file)))
|
||||
(("hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file)))
|
||||
(("hud-watch?") (set! (-> obj secrets hud-watch?) (file-stream-read-symbol file)))
|
||||
(("watch-12hr?") (set! (-> obj secrets watch-12hr?) (file-stream-read-symbol file)))
|
||||
(("art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file))))
|
||||
(("hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file)))
|
||||
(("hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file)))
|
||||
(("hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file)))
|
||||
(("cheats")
|
||||
(set! (-> obj cheats-known) (the pc-cheats (file-stream-read-int file)))
|
||||
(set! (-> obj cheats) (logand (-> obj cheats-known) (file-stream-read-int file))))
|
||||
(("music")
|
||||
(dotimes (i PC_MUSIC_LOG_LENGTH)
|
||||
(when (!= #x29 (file-stream-get-next-char-ret file))
|
||||
(with-settings-scope (file)
|
||||
(set! (-> obj secrets music i name) (file-stream-read-symbol file))
|
||||
(set! (-> obj secrets music i flava-mask) (file-stream-read-int file))))))))))
|
||||
0)
|
||||
|
||||
(defmethod handle-output-settings ((obj pc-settings-jak1) (file file-stream))
|
||||
|
||||
+327
-296
@@ -225,10 +225,14 @@
|
||||
:name (text-id input-options)
|
||||
:scale #t
|
||||
:param3 (game-option-menu input-options))
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id play-hints) :scale #t
|
||||
:on-confirm
|
||||
(lambda ()
|
||||
(set! (-> *setting-control* default play-hints) (-> *pc-settings* memcard-play-hints?))))
|
||||
(new 'static
|
||||
'game-option
|
||||
:option-type (game-option-type on-off)
|
||||
:name (text-id play-hints)
|
||||
:scale #t
|
||||
:on-confirm
|
||||
(lambda ()
|
||||
(set! (-> *setting-control* default play-hints) (-> *pc-settings* memcard-play-hints?))))
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id subtitles) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id hinttitles) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type language) :name (text-id language) :scale #t)
|
||||
@@ -649,8 +653,12 @@
|
||||
(new 'static 'game-option :option-type (game-option-type lod-fg) :name (text-id lod-fg) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id ps2-parts) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id force-envmap) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id force-actors) :scale #t
|
||||
:option-disabled-func
|
||||
(new 'static
|
||||
'game-option
|
||||
:option-type (game-option-type on-off)
|
||||
:name (text-id force-actors)
|
||||
:scale #t
|
||||
:option-disabled-func
|
||||
(lambda ()
|
||||
(-> *pc-settings* speedrunner-mode?)))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t)))
|
||||
@@ -1420,362 +1428,378 @@
|
||||
|
||||
(defun pc-sprite-adjust-left ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 4.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) -6.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) -10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) -14.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) -16.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) -25.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) -26.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -37.0)
|
||||
(else
|
||||
(+ 121.37227965381875
|
||||
(* -145.13874571806738 aspect-ratio)
|
||||
(* 48.695824268929236 aspect-ratio aspect-ratio)
|
||||
(* -5.737940185600177 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 4.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) -6.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) -10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) -14.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) -16.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) -25.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) -26.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -37.0)
|
||||
(else
|
||||
(+ 121.37227965381875
|
||||
(* -145.13874571806738 aspect-ratio)
|
||||
(* 48.695824268929236 aspect-ratio aspect-ratio)
|
||||
(* -5.737940185600177 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-right ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -33.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) -6.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 26.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 29.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 45.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 46.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 65.0)
|
||||
(else
|
||||
(+ -205.4294994422315
|
||||
(* 245.07283711809043 aspect-ratio)
|
||||
(* -81.04347133064093 aspect-ratio aspect-ratio)
|
||||
(* 9.423126530695802 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -33.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) -6.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 26.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 29.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 45.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 46.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 65.0)
|
||||
(else
|
||||
(+ -205.4294994422315
|
||||
(* 245.07283711809043 aspect-ratio)
|
||||
(* -81.04347133064093 aspect-ratio aspect-ratio)
|
||||
(* 9.423126530695802 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-cross-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) -5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 17.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 30.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 30.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 45.0)
|
||||
(else
|
||||
(+ -98.75041386103345
|
||||
(* 104.4004528706783 aspect-ratio)
|
||||
(* -27.27525895954647 aspect-ratio aspect-ratio)
|
||||
(* 2.6112419651912617 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) -5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 17.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 30.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 30.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 45.0)
|
||||
(else
|
||||
(+ -98.75041386103345
|
||||
(* 104.4004528706783 aspect-ratio)
|
||||
(* -27.27525895954647 aspect-ratio aspect-ratio)
|
||||
(* 2.6112419651912617 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-cross-y ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0)
|
||||
(else
|
||||
(+ -92.55990871923132
|
||||
(* 104.71302956908977 aspect-ratio)
|
||||
(* -32.46993312399963 aspect-ratio aspect-ratio)
|
||||
(* 3.4672700107735115 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 20.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0)
|
||||
(else
|
||||
(+ -92.55990871923132
|
||||
(* 104.71302956908977 aspect-ratio)
|
||||
(* -32.46993312399963 aspect-ratio aspect-ratio)
|
||||
(* 3.4672700107735115 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-square-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 17.0)
|
||||
(else
|
||||
(+ -22.034620779370684
|
||||
(* 15.66980500404166 aspect-ratio)
|
||||
(* 2.6395010789749374 aspect-ratio aspect-ratio)
|
||||
(* -1.1122480459486384 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 8.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 17.0)
|
||||
(else
|
||||
(+ -22.034620779370684
|
||||
(* 15.66980500404166 aspect-ratio)
|
||||
(* 2.6395010789749374 aspect-ratio aspect-ratio)
|
||||
(* -1.1122480459486384 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-square-y ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 15.0)
|
||||
(else
|
||||
(+ -35.887413062108386
|
||||
(* 28.768844269882614 aspect-ratio)
|
||||
(* -0.854904339304392 aspect-ratio aspect-ratio)
|
||||
(* -0.9020647898186882 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) -10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 15.0)
|
||||
(else
|
||||
(+ -35.887413062108386
|
||||
(* 28.768844269882614 aspect-ratio)
|
||||
(* -0.854904339304392 aspect-ratio aspect-ratio)
|
||||
(* -0.9020647898186882 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-triangle-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0)
|
||||
(else
|
||||
(+ 9.074933988821043
|
||||
(* -16.012653345486786 aspect-ratio)
|
||||
(* 8.413647131791468 aspect-ratio aspect-ratio)
|
||||
(* -1.2341491172835792 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0)
|
||||
(else
|
||||
(+ 9.074933988821043
|
||||
(* -16.012653345486786 aspect-ratio)
|
||||
(* 8.413647131791468 aspect-ratio aspect-ratio)
|
||||
(* -1.2341491172835792 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-triangle-y ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ 24.319264777517994
|
||||
(* -43.26989970602368 aspect-ratio)
|
||||
(* 23.07604741978599 aspect-ratio aspect-ratio)
|
||||
(* -3.494974989657488 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 5.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ 24.319264777517994
|
||||
(* -43.26989970602368 aspect-ratio)
|
||||
(* 23.07604741978599 aspect-ratio aspect-ratio)
|
||||
(* -3.494974989657488 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-circle-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ 7.769390144448719
|
||||
(* -13.422040271641388 aspect-ratio)
|
||||
(* 6.780103459545601 aspect-ratio aspect-ratio)
|
||||
(* -0.9064673601247457 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ 7.769390144448719
|
||||
(* -13.422040271641388 aspect-ratio)
|
||||
(* 6.780103459545601 aspect-ratio aspect-ratio)
|
||||
(* -0.9064673601247457 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-circle-y ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) -7.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) -7.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0)
|
||||
(else
|
||||
(+ -32.088654921966715
|
||||
(* 56.69193997766507 aspect-ratio)
|
||||
(* -29.856150879331594 aspect-ratio aspect-ratio)
|
||||
(* 4.401442349782235 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) -7.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) -7.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0)
|
||||
(else
|
||||
(+ -32.088654921966715
|
||||
(* 56.69193997766507 aspect-ratio)
|
||||
(* -29.856150879331594 aspect-ratio aspect-ratio)
|
||||
(* 4.401442349782235 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-percent-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0)
|
||||
(else
|
||||
(+ -46.209527361482614
|
||||
(* 59.19334582683605 aspect-ratio)
|
||||
(* -17.978708435875035 aspect-ratio aspect-ratio)
|
||||
(* 1.9546083242648873 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 12.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 18.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0)
|
||||
(else
|
||||
(+ -46.209527361482614
|
||||
(* 59.19334582683605 aspect-ratio)
|
||||
(* -17.978708435875035 aspect-ratio aspect-ratio)
|
||||
(* 1.9546083242648873 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-autosave-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 18.0)
|
||||
(else
|
||||
(+ -25.454818080453748
|
||||
(* 28.58764000115764 aspect-ratio)
|
||||
(* -5.122397663089315 aspect-ratio aspect-ratio)
|
||||
(* 0.1450488213340339 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 18.0)
|
||||
(else
|
||||
(+ -25.454818080453748
|
||||
(* 28.58764000115764 aspect-ratio)
|
||||
(* -5.122397663089315 aspect-ratio aspect-ratio)
|
||||
(* 0.1450488213340339 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-orb-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ -3.26385961093079
|
||||
(* 6.476532684613467 aspect-ratio)
|
||||
(* -4.083859180614655 aspect-ratio aspect-ratio)
|
||||
(* 0.819204392897082 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0)
|
||||
(else
|
||||
(+ -3.26385961093079
|
||||
(* 6.476532684613467 aspect-ratio)
|
||||
(* -4.083859180614655 aspect-ratio aspect-ratio)
|
||||
(* 0.819204392897082 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-orb-glow-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 4.0)
|
||||
(else
|
||||
(+ -2.6110876887446324
|
||||
(* 5.181226147690773 aspect-ratio)
|
||||
(* -3.267087344491723 aspect-ratio aspect-ratio)
|
||||
(* 0.6553635143176653 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 4.0)
|
||||
(else
|
||||
(+ -2.6110876887446324
|
||||
(* 5.181226147690773 aspect-ratio)
|
||||
(* -3.267087344491723 aspect-ratio aspect-ratio)
|
||||
(* 0.6553635143176653 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-orb-text-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 10.0)
|
||||
(else
|
||||
(+ -6.52771922186158
|
||||
(* 12.953065369226934 aspect-ratio)
|
||||
(* -8.16771836122931 aspect-ratio aspect-ratio)
|
||||
(* 1.638408785794164 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 10.0)
|
||||
(else
|
||||
(+ -6.52771922186158
|
||||
(* 12.953065369226934 aspect-ratio)
|
||||
(* -8.16771836122931 aspect-ratio aspect-ratio)
|
||||
(* 1.638408785794164 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-cell-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0)
|
||||
(else
|
||||
(+ 6.52771922186158
|
||||
(* -12.953065369226934 aspect-ratio)
|
||||
(* 8.16771836122931 aspect-ratio aspect-ratio)
|
||||
(* -1.638408785794164 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0)
|
||||
(else
|
||||
(+ 6.52771922186158
|
||||
(* -12.953065369226934 aspect-ratio)
|
||||
(* 8.16771836122931 aspect-ratio aspect-ratio)
|
||||
(* -1.638408785794164 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-cell-text-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 2.0)
|
||||
(else
|
||||
(+ -1.3055438443723162
|
||||
(* 2.5906130738453865 aspect-ratio)
|
||||
(* -1.6335436722458616 aspect-ratio aspect-ratio)
|
||||
(* 0.32768175715883263 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 2.0)
|
||||
(else
|
||||
(+ -1.3055438443723162
|
||||
(* 2.5906130738453865 aspect-ratio)
|
||||
(* -1.6335436722458616 aspect-ratio aspect-ratio)
|
||||
(* 0.32768175715883263 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-buzzer-text-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -5.0)
|
||||
(else
|
||||
(+ 3.26385961093079
|
||||
(* -6.476532684613467 aspect-ratio)
|
||||
(* 4.083859180614655 aspect-ratio aspect-ratio)
|
||||
(* -0.819204392897082 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) -5.0)
|
||||
(else
|
||||
(+ 3.26385961093079
|
||||
(* -6.476532684613467 aspect-ratio)
|
||||
(* 4.083859180614655 aspect-ratio aspect-ratio)
|
||||
(* -0.819204392897082 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(defun pc-sprite-adjust-options-text-x ((aspect-ratio float))
|
||||
(cond
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0)
|
||||
(else
|
||||
(+ -1.9583157665584714
|
||||
(* 3.885919610768078 aspect-ratio)
|
||||
(* -2.450315508368792 aspect-ratio aspect-ratio)
|
||||
(* 0.491522635738249 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0)
|
||||
((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0)
|
||||
(else
|
||||
(+ -1.9583157665584714
|
||||
(* 3.885919610768078 aspect-ratio)
|
||||
(* -2.450315508368792 aspect-ratio aspect-ratio)
|
||||
(* 0.491522635738249 aspect-ratio aspect-ratio aspect-ratio)))))
|
||||
|
||||
(define *PC-CROSS-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-CROSS-Y-ADJUST* 0.0)
|
||||
|
||||
(define *PC-SQUARE-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-SQUARE-Y-ADJUST* 0.0)
|
||||
|
||||
(define *PC-TRIANGLE-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-TRIANGLE-Y-ADJUST* 0.0)
|
||||
|
||||
(define *PC-CIRCLE-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-CIRCLE-Y-ADJUST* 0.0)
|
||||
|
||||
(define *PC-PERCENT-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-AUTOSAVE-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-ORB-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-ORB-GLOW-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-ORB-TEXT-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-CELL-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-CELL-TEXT-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-BUZZER-TEXT-X-ADJUST* 0.0)
|
||||
|
||||
(define *PC-OPTIONS-TEXT-X-ADJUST* 0.0)
|
||||
|
||||
(defmethod adjust-ratios ((this progress) (aspect symbol) (video-mode symbol))
|
||||
@@ -1878,7 +1902,11 @@
|
||||
(let ((s4-2 (new 'stack
|
||||
'font-context
|
||||
*font-default-matrix*
|
||||
(the int (+ *PC-OPTIONS-TEXT-X-ADJUST* (- 423.0 (the float (/ (-> this left-x-offset) 2))) f30-0 (the float (adjust-pos s5-0 150))))
|
||||
(the int
|
||||
(+ *PC-OPTIONS-TEXT-X-ADJUST*
|
||||
(- 423.0 (the float (/ (-> this left-x-offset) 2)))
|
||||
f30-0
|
||||
(the float (adjust-pos s5-0 150))))
|
||||
131
|
||||
0.0
|
||||
(font-color default)
|
||||
@@ -1893,7 +1921,9 @@
|
||||
(let ((v1-36 s4-2)) (set! (-> v1-36 scale) 1.3))
|
||||
(let ((a0-31 s4-2)) (set! (-> a0-31 color) (font-color progress-percent)))
|
||||
(set! (-> s4-2 origin x)
|
||||
(+ *PC-PERCENT-X-ADJUST* (- 435.0 (the float (if (< (-> *progress-process* 0 completion-percentage) 10.0) 93 80))) f30-0))
|
||||
(+ *PC-PERCENT-X-ADJUST*
|
||||
(- 435.0 (the float (if (< (-> *progress-process* 0 completion-percentage) 10.0) 93 80)))
|
||||
f30-0))
|
||||
(set! (-> s4-2 origin y) 180.0)
|
||||
(set! (-> s4-2 flags) (font-flags shadow kerning middle middle-vert large))
|
||||
(let ((s3-3 print-game-text))
|
||||
@@ -1947,13 +1977,15 @@
|
||||
(let* ((f28-2 (* 0.00024414062 (the float (-> *progress-process* 0 in-out-position))))
|
||||
(f30-1 (* 300.0 f28-2)))
|
||||
(set! (-> this particles 18 init-pos x)
|
||||
(+ *PC-ORB-GLOW-X-ADJUST* (the float (+ (the int (the float (adjust-pos s5-0 50))) 394 (the int f30-1) (-> this right-x-offset)))))
|
||||
(+ *PC-ORB-GLOW-X-ADJUST*
|
||||
(the float (+ (the int (the float (adjust-pos s5-0 50))) 394 (the int f30-1) (-> this right-x-offset)))))
|
||||
(set! (-> this particles 18 init-pos y) (the float (- 40 (the int (* 80.0 f28-2)))))
|
||||
(set! (-> this icons 5 icon-x)
|
||||
(+ (the int *PC-ORB-X-ADJUST*) (the int (the float (adjust-pos s5-0 50))) 393 (the int f30-1) (-> this right-x-offset)))
|
||||
(set! (-> this icons 5 icon-y) (- (-> this small-orb-y-offset) (the int (* 80.0 f28-2))))
|
||||
(set! (-> this particles 16 init-pos x)
|
||||
(+ *PC-CELL-X-ADJUST* (the float (+ (the int (the float (adjust-pos s5-0 100))) 425 (the int f30-1) (-> this right-x-offset)))))
|
||||
(+ *PC-CELL-X-ADJUST*
|
||||
(the float (+ (the int (the float (adjust-pos s5-0 100))) 425 (the int f30-1) (-> this right-x-offset)))))
|
||||
(set! (-> this particles 16 init-pos y) (the float (- 112 (the int (* 60.0 f28-2)))))
|
||||
(set! (-> this particles 17 init-pos x)
|
||||
(the float
|
||||
@@ -1965,7 +1997,6 @@
|
||||
0
|
||||
(none))
|
||||
|
||||
|
||||
(defun init-game-options ((obj progress))
|
||||
"Set the options for all of the menus."
|
||||
;; start off by making them all invalid
|
||||
|
||||
@@ -764,14 +764,14 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg2 r1)
|
||||
(set! (-> arg1 y)
|
||||
(+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 9)) 0.0 32.0 230.0 0.5) (-> arg1 y))
|
||||
(+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx r1))) 0.0 32.0 230.0 0.5) (-> arg1 y)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg2 l1)
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y) (+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 8)) 0.0 32.0 230.0 0.5)))
|
||||
(- (-> arg1 y) (+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx l1))) 0.0 32.0 230.0 0.5))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
(if (cpad-hold? arg3 x)
|
||||
(set! (-> arg0 x)
|
||||
(- (-> arg0 x) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 6))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx x))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -169,7 +169,7 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg3 triangle)
|
||||
(+! (-> arg0 x) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 4))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx triangle))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -182,7 +182,7 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg3 square)
|
||||
(+! (-> arg0 y) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 7))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx square))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -196,7 +196,7 @@
|
||||
(if (cpad-hold? arg3 circle)
|
||||
(set! (-> arg0 y)
|
||||
(- (-> arg0 y) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 5))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx circle))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -212,7 +212,7 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg3 l2)
|
||||
(+! (-> arg0 z) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 10))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l2))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -226,7 +226,7 @@
|
||||
(if (cpad-hold? arg3 r2)
|
||||
(set! (-> arg0 z)
|
||||
(- (-> arg0 z) (+ (-> *CAM_FREE-bank* rot-speed) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 11))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r2))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -243,7 +243,7 @@
|
||||
(if (cpad-hold? arg3 left)
|
||||
(+! (-> arg1 x)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 1)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx left))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -253,7 +253,7 @@
|
||||
(set! (-> arg1 x)
|
||||
(- (-> arg1 x)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 0)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx right))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -263,7 +263,7 @@
|
||||
(if (cpad-hold? arg3 up)
|
||||
(+! (-> arg1 z)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 2)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx up))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -273,7 +273,7 @@
|
||||
(set! (-> arg1 z)
|
||||
(- (-> arg1 z)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 3)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx down))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -288,7 +288,7 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg3 r1)
|
||||
(+! (-> arg1 y) (+ (* 0.2 (-> *CAM_FREE-bank* speed)) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 9))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -302,7 +302,7 @@
|
||||
(if (cpad-hold? arg3 l1)
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y) (+ (* 0.2 (-> *CAM_FREE-bank* speed)) (analog-input
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton 8))
|
||||
(the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -319,7 +319,7 @@
|
||||
(if (cpad-hold? arg3 r1)
|
||||
(+! (-> arg1 y)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 9)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx r1))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -329,7 +329,7 @@
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y)
|
||||
(+ (-> *CAM_FREE-bank* speed)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton 8)) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg3 abutton (abutton-idx l1))) 0.0 32.0 230.0 (-> *CAM_FREE-bank* speed)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2450,7 +2450,7 @@
|
||||
(if (cpad-hold? (-> *CAMERA-bank* joypad) r1)
|
||||
(+! f30-2 (+ (* 10922.667 (seconds-per-frame))
|
||||
(analog-input
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton 9))
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -2464,7 +2464,7 @@
|
||||
(if (cpad-hold? (-> *CAMERA-bank* joypad) l1)
|
||||
(set! f30-2 (- f30-2 (+ (* 10922.667 (seconds-per-frame))
|
||||
(analog-input
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton 8))
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
|
||||
@@ -1653,17 +1653,17 @@
|
||||
;; right = 5th bit and 1st index for pressure
|
||||
;; left = 7th bit and 2nd index for pressure
|
||||
(let ((right-pressed? (logtest? (-> this button0) (pad-buttons right)))
|
||||
(right-pressure (-> this abutton 0))
|
||||
(right-pressure (-> this abutton (abutton-idx right))) ;; og:preserve-this abutton indexing
|
||||
(left-pressed? (logtest? (-> this button0) (pad-buttons left)))
|
||||
(left-pressure (-> this abutton 1)))
|
||||
(left-pressure (-> this abutton (abutton-idx left)))) ;; og:preserve-this abutton indexing
|
||||
(when right-pressed?
|
||||
(logclear! (-> this button0) (pad-buttons right))
|
||||
(logior! (-> this button0) (pad-buttons left)))
|
||||
(when left-pressed?
|
||||
(logclear! (-> this button0) (pad-buttons left))
|
||||
(logior! (-> this button0) (pad-buttons right)))
|
||||
(set! (-> this abutton 0) left-pressure)
|
||||
(set! (-> this abutton 1) right-pressure))))
|
||||
(set! (-> this abutton (abutton-idx right)) left-pressure) ;; og:preserve-this abutton indexing
|
||||
(set! (-> this abutton (abutton-idx left)) right-pressure)))) ;; og:preserve-this abutton indexing
|
||||
0)
|
||||
|
||||
(defmethod game-info-method-28 ((this game-info) (arg0 game-score) (arg1 float))
|
||||
|
||||
@@ -48,6 +48,21 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
(confirm 24)
|
||||
)
|
||||
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11))
|
||||
|
||||
(defenum pad-type
|
||||
(normal 4)
|
||||
(analog 5)
|
||||
@@ -460,73 +475,73 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
(set! (-> history button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
(when (= (-> pad status) 115)
|
||||
(set! (-> pad abutton 0) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right))
|
||||
(set! (-> pad abutton (abutton-idx right)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 1) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons left))
|
||||
(set! (-> pad abutton (abutton-idx left)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons left)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 2) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons up))
|
||||
(set! (-> pad abutton (abutton-idx up)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons up)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 3) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons down))
|
||||
(set! (-> pad abutton (abutton-idx down)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons down)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 6) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons x))
|
||||
(set! (-> pad abutton (abutton-idx x)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons x)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 5) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons circle))
|
||||
(set! (-> pad abutton (abutton-idx circle)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons circle)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 4) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons triangle))
|
||||
(set! (-> pad abutton (abutton-idx triangle)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons triangle)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 7) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons square))
|
||||
(set! (-> pad abutton (abutton-idx square)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons square)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 8) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l1))
|
||||
(set! (-> pad abutton (abutton-idx l1)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l1)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 10) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l2))
|
||||
(set! (-> pad abutton (abutton-idx l2)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l2)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 9) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r1))
|
||||
(set! (-> pad abutton (abutton-idx r1)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r1)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 11) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r2))
|
||||
(set! (-> pad abutton (abutton-idx r2)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r2)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
|
||||
@@ -993,7 +993,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -1541,7 +1541,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -1693,7 +1693,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -1830,7 +1830,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
|
||||
@@ -2282,7 +2282,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
((-> target-mech-carry-falling trans))
|
||||
|
||||
@@ -616,7 +616,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
((-> target-carry-falling trans))
|
||||
|
||||
@@ -1014,7 +1014,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(let ((t9-0 target-falling-trans)
|
||||
|
||||
@@ -378,8 +378,8 @@
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 x) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> s5-0 w) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> s5-0 y) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6)))))
|
||||
(set! (-> s5-0 z) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7)))))
|
||||
(set! (-> s5-0 y) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(set! (-> s5-0 z) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx square)))))) ;; og:preserve-this abutton indexing
|
||||
(vehicle-method-95 this (the-as vector (&-> s5-0 x)))
|
||||
)
|
||||
(if (or (cpad-hold? 0 l1) (and (logtest? (-> this info flags) 512) (cpad-hold? 0 r1)))
|
||||
|
||||
@@ -699,7 +699,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self control status) (collide-status on-surface))
|
||||
|
||||
@@ -802,14 +802,14 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg2 r1)
|
||||
(set! (-> arg1 y)
|
||||
(+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 9)) 0.0 32.0 230.0 0.5) (-> arg1 y))
|
||||
(+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx r1))) 0.0 32.0 230.0 0.5) (-> arg1 y)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg2 l1)
|
||||
(set! (-> arg1 y)
|
||||
(- (-> arg1 y) (+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton 8)) 0.0 32.0 230.0 0.5)))
|
||||
(- (-> arg1 y) (+ 0.5 (analog-input (the-as int (-> *cpad-list* cpads arg2 abutton (abutton-idx l1))) 0.0 32.0 230.0 0.5))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
(if (cpad-hold? arg4 r1)
|
||||
(+! (-> arg2 y)
|
||||
(+ (* 0.2 f30-0)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg4 abutton 9)) 0.0 32.0 230.0 (* 0.2 f30-0))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg4 abutton (abutton-idx r1))) 0.0 32.0 230.0 (* 0.2 f30-0)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -223,7 +223,7 @@
|
||||
(set! (-> arg2 y)
|
||||
(- (-> arg2 y)
|
||||
(+ (* 0.2 f30-0)
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg4 abutton 8)) 0.0 32.0 230.0 (* 0.2 f30-0))
|
||||
(analog-input (the-as int (-> *cpad-list* cpads arg4 abutton (abutton-idx l1))) 0.0 32.0 230.0 (* 0.2 f30-0)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -234,7 +234,7 @@
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? arg4 r1)
|
||||
(+! (-> arg2 y)
|
||||
(+ f30-0 (analog-input (the-as int (-> *cpad-list* cpads arg4 abutton 9)) 0.0 32.0 230.0 f30-0))
|
||||
(+ f30-0 (analog-input (the-as int (-> *cpad-list* cpads arg4 abutton (abutton-idx r1))) 0.0 32.0 230.0 f30-0)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -242,7 +242,7 @@
|
||||
(if (cpad-hold? arg4 l1)
|
||||
(set! (-> arg2 y)
|
||||
(- (-> arg2 y)
|
||||
(+ f30-0 (analog-input (the-as int (-> *cpad-list* cpads arg4 abutton 8)) 0.0 32.0 230.0 f30-0))
|
||||
(+ f30-0 (analog-input (the-as int (-> *cpad-list* cpads arg4 abutton (abutton-idx l1))) 0.0 32.0 230.0 f30-0)) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2628,7 +2628,7 @@
|
||||
(if (cpad-hold? (-> *CAMERA-bank* joypad) r1)
|
||||
(+! f30-2 (+ (* 10922.667 (seconds-per-frame))
|
||||
(analog-input
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton 9))
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton (abutton-idx r1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
@@ -2642,7 +2642,7 @@
|
||||
(if (cpad-hold? (-> *CAMERA-bank* joypad) l1)
|
||||
(set! f30-2 (- f30-2 (+ (* 10922.667 (seconds-per-frame))
|
||||
(analog-input
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton 8))
|
||||
(the-as int (-> *cpad-list* cpads (-> *CAMERA-bank* joypad) abutton (abutton-idx l1))) ;; og:preserve-this abutton indexing
|
||||
0.0
|
||||
32.0
|
||||
230.0
|
||||
|
||||
@@ -49,6 +49,24 @@
|
||||
)
|
||||
;; ---pad-buttons
|
||||
|
||||
;; +++abutton-idx
|
||||
(defenum abutton-idx
|
||||
:type uint8
|
||||
(right 0)
|
||||
(left 1)
|
||||
(up 2)
|
||||
(down 3)
|
||||
(triangle 4)
|
||||
(circle 5)
|
||||
(x 6)
|
||||
(square 7)
|
||||
(l1 8)
|
||||
(r1 9)
|
||||
(l2 10)
|
||||
(r2 11)
|
||||
)
|
||||
;; ---abutton-idx
|
||||
|
||||
;; TODO
|
||||
;; (#when PC_PORT
|
||||
;; ;; redefined from C kernel
|
||||
@@ -459,73 +477,73 @@
|
||||
(set! (-> history button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
(when (= (-> pad status) 115)
|
||||
(set! (-> pad abutton 0) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right))
|
||||
(set! (-> pad abutton (abutton-idx right)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 1) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons left))
|
||||
(set! (-> pad abutton (abutton-idx left)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons left)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 2) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons up))
|
||||
(set! (-> pad abutton (abutton-idx up)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons up)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 3) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons down))
|
||||
(set! (-> pad abutton (abutton-idx down)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons down)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 6) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons x))
|
||||
(set! (-> pad abutton (abutton-idx x)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons x)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 5) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons circle))
|
||||
(set! (-> pad abutton (abutton-idx circle)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons circle)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 4) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons triangle))
|
||||
(set! (-> pad abutton (abutton-idx triangle)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons triangle)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 7) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons square))
|
||||
(set! (-> pad abutton (abutton-idx square)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons square)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 8) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l1))
|
||||
(set! (-> pad abutton (abutton-idx l1)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l1)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 10) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l2))
|
||||
(set! (-> pad abutton (abutton-idx l2)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l2)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 9) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r1))
|
||||
(set! (-> pad abutton (abutton-idx r1)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r1)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 11) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r2))
|
||||
(set! (-> pad abutton (abutton-idx r2)) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r2)) ;; og:preserve-this abutton indexing
|
||||
255
|
||||
0
|
||||
)
|
||||
|
||||
@@ -1072,7 +1072,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -1658,7 +1658,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -1810,7 +1810,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -2046,7 +2046,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
@@ -2173,7 +2173,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv))
|
||||
|
||||
@@ -1929,7 +1929,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
((-> target-flut-falling trans))
|
||||
|
||||
@@ -855,7 +855,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(case (-> self control unknown-spool-anim00)
|
||||
|
||||
@@ -2267,7 +2267,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
((-> target-mech-carry-falling trans))
|
||||
|
||||
@@ -1137,7 +1137,7 @@
|
||||
(set! (-> self control unknown-float36)
|
||||
(fmax
|
||||
(-> self control unknown-float36)
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6)))
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton (abutton-idx x)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
)
|
||||
(let ((t9-0 target-falling-trans)
|
||||
|
||||
@@ -1116,8 +1116,8 @@
|
||||
(defmethod vehicle-method-88 ((this h-sled) (arg0 vehicle-controls))
|
||||
(set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6)))))
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7)))))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx square)))))) ;; og:preserve-this abutton indexing
|
||||
(if (cpad-pressed? 0 r1)
|
||||
(logior! (-> arg0 flags) (vehicle-controls-flag vcf1))
|
||||
)
|
||||
|
||||
@@ -600,9 +600,9 @@
|
||||
(defmethod vehicle-method-88 ((this wvehicle) (arg0 vehicle-controls))
|
||||
(set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6)))))
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7)))))
|
||||
(set! (-> arg0 handbrake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 5)))))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx square)))))) ;; og:preserve-this abutton indexing
|
||||
(set! (-> arg0 handbrake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx circle)))))) ;; og:preserve-this abutton indexing
|
||||
(cond
|
||||
((-> *setting-control* user-current jump)
|
||||
(if (cpad-hold? 0 l1)
|
||||
|
||||
@@ -473,8 +473,8 @@
|
||||
)
|
||||
(set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6)))))
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7)))))
|
||||
(set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx x)))))) ;; og:preserve-this abutton indexing
|
||||
(set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton (abutton-idx square)))))) ;; og:preserve-this abutton indexing
|
||||
(when (or (cpad-hold? 0 l1) (and (logtest? (-> this info flags) 2048) (cpad-hold? 0 r1)))
|
||||
(if (logtest? (-> this info flags) 16)
|
||||
(logior! (-> arg0 flags) (vehicle-controls-flag vcf0))
|
||||
|
||||
@@ -1306,8 +1306,8 @@
|
||||
(set! (-> self zoom) (fmax (fmin (-> self zoom) (-> self char zoom-max)) (-> self char zoom-min)))
|
||||
)
|
||||
)
|
||||
(let ((f1-11 (the float (-> v1-7 abutton 9)))
|
||||
(f0-18 (the float (-> v1-7 abutton 8)))
|
||||
(let ((f1-11 (the float (-> v1-7 abutton (abutton-idx r1)))) ;; og:preserve-this abutton indexing
|
||||
(f0-18 (the float (-> v1-7 abutton (abutton-idx l1)))) ;; og:preserve-this abutton indexing
|
||||
)
|
||||
(+! (-> self updown) (* 50.0 (seconds-per-frame) f1-11))
|
||||
(set! (-> self updown) (- (-> self updown) (* 50.0 (seconds-per-frame) f0-18)))
|
||||
|
||||
Reference in New Issue
Block a user