mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 18:12:50 -04:00
[decompiler] Make addition nicer (#733)
* temp * update refs * update reference * fix tests
This commit is contained in:
@@ -216,16 +216,13 @@
|
||||
(-> pad buzz-time buzz-idx)
|
||||
(max
|
||||
(the-as int (-> pad buzz-time buzz-idx))
|
||||
(the-as int (+ (get-current-time) (the-as uint duration)))
|
||||
(the-as int (+ (get-current-time) duration))
|
||||
)
|
||||
)
|
||||
)
|
||||
((< (-> pad buzz-val buzz-idx) (the-as uint buzz-amount))
|
||||
(set! (-> pad buzz-val buzz-idx) (the-as uint buzz-amount))
|
||||
(set!
|
||||
(-> pad buzz-time buzz-idx)
|
||||
(+ (get-current-time) (the-as uint duration))
|
||||
)
|
||||
(set! (-> pad buzz-time buzz-idx) (+ (get-current-time) duration))
|
||||
)
|
||||
)
|
||||
0
|
||||
|
||||
@@ -36,12 +36,7 @@
|
||||
rpc-buffer
|
||||
((allocation symbol) (type-to-make type) (arg0 uint) (arg1 uint))
|
||||
(let*
|
||||
((a2-2
|
||||
(+
|
||||
(+ (-> type-to-make size) 63)
|
||||
(the-as uint (* (the-as int arg0) (the-as int arg1)))
|
||||
)
|
||||
)
|
||||
((a2-2 (+ (-> type-to-make size) 63 (* (the-as int arg0) (the-as int arg1))))
|
||||
(v0-0 (object-new allocation type-to-make (the-as int a2-2)))
|
||||
)
|
||||
(set! (-> v0-0 elt-size) arg0)
|
||||
|
||||
@@ -100,10 +100,7 @@
|
||||
(set! (-> arg0 begin-level) 0)
|
||||
0
|
||||
(.mfc0 a1-0 Count)
|
||||
(+!
|
||||
(-> arg0 prev-time-elapsed)
|
||||
(the-as uint (- a1-0 (the-as int (-> arg0 start-time))))
|
||||
)
|
||||
(+! (-> arg0 prev-time-elapsed) (- a1-0 (the-as int (-> arg0 start-time))))
|
||||
)
|
||||
(the-as uint 0)
|
||||
)
|
||||
@@ -130,10 +127,7 @@
|
||||
(when (zero? (-> arg0 begin-level))
|
||||
0
|
||||
(.mfc0 a1-0 Count)
|
||||
(+!
|
||||
(-> arg0 prev-time-elapsed)
|
||||
(the-as uint (- a1-0 (the-as int (-> arg0 start-time))))
|
||||
)
|
||||
(+! (-> arg0 prev-time-elapsed) (- a1-0 (the-as int (-> arg0 start-time))))
|
||||
)
|
||||
(the-as uint 0)
|
||||
)
|
||||
@@ -146,7 +140,7 @@
|
||||
(when (> (-> arg0 begin-level) 0)
|
||||
0
|
||||
(.mfc0 v1-3 Count)
|
||||
(+! v0-0 (the-as uint (- v1-3 (the-as int (-> arg0 start-time)))))
|
||||
(+! v0-0 (- v1-3 (the-as int (-> arg0 start-time))))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user