[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:
ManDude
2021-12-02 00:41:49 +00:00
committed by GitHub
parent 6a4348287e
commit d845524c23
30 changed files with 308 additions and 355 deletions
+3 -13
View File
@@ -25,11 +25,7 @@
)
(hide-progress-icons)
(let ((s5-0 (-> *level-task-data* arg0)))
(if
(and
(= *cheat-mode* 'debug)
(logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3))
)
(if (and (= *cheat-mode* 'debug) (cpad-hold? 0 l3))
(format *stdcon* "fcd:~d~%" (-> *game-info* fuel-cell-deaths))
)
(set! (-> *progress-process* 0 particles 14 init-pos x) -320.0)
@@ -1994,14 +1990,8 @@
(not
(and
(= *progress-cheat* 'language)
(logtest?
(-> *cpad-list* cpads 0 button0-abs 0)
(pad-buttons l2)
)
(logtest?
(-> *cpad-list* cpads 0 button0-abs 0)
(pad-buttons r2)
)
(cpad-hold? 0 l2)
(cpad-hold? 0 r2)
)
)
)