[decompiler] Make addition nicer (#733)

* temp

* update refs

* update reference

* fix tests
This commit is contained in:
water111
2021-08-01 18:24:58 -04:00
committed by GitHub
parent e70d179496
commit 12446037bd
42 changed files with 294 additions and 536 deletions
@@ -85,16 +85,16 @@
(+! (-> arg0 data s5-0 total) (logand -16 (+ v1-11 15)))
)
(set! (-> arg0 data (+ s5-0 1) name) "collision-poly")
(+! (-> arg0 data (+ s5-0 1) count) (the-as int (-> s4-0 poly-count)))
(+! (-> arg0 data (+ s5-0 1) count) (-> s4-0 poly-count))
(let ((v1-22 (+ (-> s4-0 strip-data-len) (-> s4-0 poly-count))))
(+! (-> arg0 data (+ s5-0 1) used) (the-as int v1-22))
(+! (-> arg0 data (+ s5-0 1) total) (the-as int v1-22))
(+! (-> arg0 data (+ s5-0 1) used) v1-22)
(+! (-> arg0 data (+ s5-0 1) total) v1-22)
)
(set! (-> arg0 data (+ s5-0 2) name) "collision-vertex")
(+! (-> arg0 data (+ s5-0 2) count) (the-as int (-> s4-0 vertex-count)))
(+! (-> arg0 data (+ s5-0 2) count) (-> s4-0 vertex-count))
(let ((v1-31 (* (-> s4-0 vertex-data-qwc) 16)))
(+! (-> arg0 data (+ s5-0 2) used) (the-as int v1-31))
(let ((v0-2 (+ (-> arg0 data (+ s5-0 2) total) (the-as int v1-31))))
(+! (-> arg0 data (+ s5-0 2) used) v1-31)
(let ((v0-2 (+ (-> arg0 data (+ s5-0 2) total) v1-31)))
(set! (-> arg0 data (+ s5-0 2) total) v0-2)
(the-as collide-fragment v0-2)
)
@@ -699,10 +699,7 @@
;; definition for method 5 of type collide-shape-prim-group
;; INFO: Return type mismatch uint vs int.
(defmethod asize-of collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as
int
(+ (-> obj type size) (the-as uint (* (+ (-> obj allocated-prims) -1) 4)))
)
(the-as int (+ (-> obj type size) (* (+ (-> obj allocated-prims) -1) 4)))
)
;; definition for method 0 of type collide-shape
@@ -802,7 +799,7 @@
(object-new
allocation
type-to-make
(the-as int (+ (-> type-to-make size) (the-as uint (* (+ arg0 -1) 32))))
(the-as int (+ (-> type-to-make size) (* (+ arg0 -1) 32)))
)
)
)
@@ -820,10 +817,7 @@
;; definition for method 5 of type collide-sticky-rider-group
;; INFO: Return type mismatch uint vs int.
(defmethod asize-of collide-sticky-rider-group ((obj collide-sticky-rider-group))
(the-as
int
(+ (-> obj type size) (the-as uint (* (+ (-> obj allocated-riders) -1) 32)))
)
(the-as int (+ (-> obj type size) (* (+ (-> obj allocated-riders) -1) 32)))
)
;; definition for symbol *collide-shape-prim-backgnd*, type collide-shape-prim-mesh