mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -04:00
[decompiler] detect cpad-hold? and cpad-pressed? (#986)
* [decompiler] detect `cpad-hold?` and `cpad-pressed?` * cleanup cpad macro button lookup * better * fix
This commit is contained in:
+3
-13
@@ -148,15 +148,12 @@
|
||||
(cond
|
||||
((!= (-> obj decision) 'undecided)
|
||||
)
|
||||
((and
|
||||
(logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x))
|
||||
(not (-> obj only-allow-cancel))
|
||||
)
|
||||
((and (cpad-pressed? 0 x) (not (-> obj only-allow-cancel)))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x))
|
||||
(set! (-> obj decision) 'yes)
|
||||
)
|
||||
((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
|
||||
((cpad-pressed? 0 triangle)
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
|
||||
(set! (-> obj decision) 'no)
|
||||
@@ -1404,14 +1401,7 @@
|
||||
22
|
||||
)
|
||||
)
|
||||
(when
|
||||
(and
|
||||
(logtest?
|
||||
(-> *cpad-list* cpads 0 button0-rel 0)
|
||||
(pad-buttons circle)
|
||||
)
|
||||
(process-grab? *target*)
|
||||
)
|
||||
(when (and (cpad-pressed? 0 circle) (process-grab? *target*))
|
||||
(logclear!
|
||||
(-> *cpad-list* cpads 0 button0-abs 0)
|
||||
(pad-buttons circle)
|
||||
|
||||
Reference in New Issue
Block a user