[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
@@ -645,10 +645,7 @@
(- (-> obj summed-len) (-> obj point arg0 tp-length))
)
(vector-!
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 arg0)))
)
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 arg0)))
(the-as vector (-> obj point v1-11))
(the-as vector (-> obj point arg0))
)
@@ -656,10 +653,7 @@
(set!
(-> obj point arg0 tp-length)
(vector-normalize-ret-len!
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 arg0)))
)
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 arg0)))
1.0
)
)
@@ -754,16 +748,13 @@
(vector-dot
(the-as
vector
(+
(the-as uint (-> obj point 0 direction))
(the-as uint (* 48 v1-15))
)
(+ (the-as uint (-> obj point 0 direction)) (* 48 v1-15))
)
(the-as
vector
(+
(the-as uint (the-as vector (-> obj point 0 direction)))
(the-as uint (* 48 a0-14))
(* 48 a0-14)
)
)
)
@@ -818,16 +809,13 @@
(vector-dot
(the-as
vector
(+
(the-as uint (-> obj point 0 direction))
(the-as uint (* 48 s4-1))
)
(+ (the-as uint (-> obj point 0 direction)) (* 48 s4-1))
)
(the-as
vector
(+
(the-as uint (the-as vector (-> obj point 0 direction)))
(the-as uint (* 48 v1-11))
(* 48 v1-11)
)
)
)
@@ -858,20 +846,14 @@
(s2-0 (-> obj end-point))
)
(vector-!
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 s2-0)))
)
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 s2-0)))
arg0
(the-as vector (-> obj point s2-0))
)
(set!
(-> obj point s2-0 tp-length)
(vector-normalize-ret-len!
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 s2-0)))
)
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 s2-0)))
1.0
)
)
@@ -1031,14 +1013,8 @@
(let ((s1-0 (-> obj point v1-8 next)))
(vector-!
s2-0
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 s1-0)))
)
(the-as
vector
(+ (the-as uint (-> obj point 0 direction)) (the-as uint (* 48 v1-8)))
)
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 s1-0)))
(the-as vector (+ (the-as uint (-> obj point 0 direction)) (* 48 v1-8)))
)
(let* ((f0-4 (vector-normalize-ret-len! s2-0 1.0))
(f0-5 (* 0.5 f0-4))
@@ -2418,7 +2394,3 @@
)
arg0
)