mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 03:30:01 -04:00
formatter: handle multi-quoted expressions
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
'readwrite (or 'rw) means both
|
||||
#f means neither, turning this into a fancy macro around rlet."
|
||||
`(rlet (,@(apply (lambda (x) `(,x :class vf)) regs))
|
||||
,@(if (or (eq? rw 'read) (eq? rw 'readwrite) (eq? rw 'rw)) (apply (lambda (y) `(load-vf ,y)) regs) '())
|
||||
,@(if (or (eq? rw ''read) (eq? rw ''readwrite) (eq? rw ''rw)) (apply (lambda (y) `(load-vf ,y)) regs) '())
|
||||
,@body
|
||||
;; this will mess up the return value!
|
||||
,@(if (or (eq? rw 'write) (eq? rw 'readwrite) (eq? rw 'rw)) (apply (lambda (y) `(save-vf ,y)) regs) '())))
|
||||
,@(if (or (eq? rw ''write) (eq? rw ''readwrite) (eq? rw ''rw)) (apply (lambda (y) `(save-vf ,y)) regs) '())))
|
||||
|
||||
@@ -197,13 +197,13 @@
|
||||
|
||||
(defmacro dm-lambda-boolean-flag (val)
|
||||
"helper macro for making boolean buttons that don't just access symbols directly"
|
||||
`(lambda (arg (msg debug-menu-msg))
|
||||
`,(lambda (arg (msg debug-menu-msg))
|
||||
(if (= msg (debug-menu-msg press)) (not! ,val))
|
||||
,val))
|
||||
|
||||
(defmacro dm-lambda-int-var (val)
|
||||
"helper macro for making int buttons"
|
||||
`(lambda (arg (msg debug-menu-msg) (newval int))
|
||||
`,(lambda (arg (msg debug-menu-msg) (newval int))
|
||||
(cond
|
||||
((= msg (debug-menu-msg press)) (set! ,val newval))
|
||||
(else ,val))))
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
(defmacro dm-lambda-meters-var (val)
|
||||
"helper macro for making meters buttons"
|
||||
`(lambda (arg (msg debug-menu-msg) (newval float))
|
||||
`,(lambda (arg (msg debug-menu-msg) (newval float))
|
||||
(cond
|
||||
((= msg (debug-menu-msg press)) (set! ,val (meters newval)))
|
||||
(else (* (1/ METER_LENGTH) ,val)))))
|
||||
|
||||
Reference in New Issue
Block a user