[Decomp] Math library: transform and quaternion (#344)

* decompile transform

* types for quaternion

* part of quaternion

* finish quaternion

* fix offline test reference

* wip fix to let issue

* fix
This commit is contained in:
water111
2021-04-02 11:35:14 -04:00
committed by GitHub
parent 7867de8fd7
commit 9969445cf7
44 changed files with 3485 additions and 459 deletions
+13 -16
View File
@@ -1090,7 +1090,7 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPool) {
" (v1-6 (the-as process s4-0))\n"
" )\n"
" (t9-1 a0-2 a1-2 a2-1 (if (the-as process v1-6)\n"
" (-> (the-as (pointer process-tree) v1-6) 0 self)\n"
" (-> (the-as (pointer process) v1-6) 0 self)\n"
" )\n"
" (-> arg0 name)\n"
" )\n"
@@ -1099,16 +1099,16 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPool) {
" )\n"
" (the-as process (cond\n"
" (s4-0\n"
" (set! (-> (the-as (pointer process-tree) s4-0) 0 type) arg1)\n"
" (-> (the-as (pointer process-tree) s4-0) 0)\n"
" (set! (-> (the-as (pointer process) s4-0) 0 type) arg1)\n"
" (-> (the-as (pointer process) s4-0) 0)\n"
" )\n"
" (else\n"
" (format\n"
" 0\n"
" \"WARNING: ~A ~A could not be allocated, because ~A was empty.~%\"\n"
" arg1\n"
" (if (the-as (pointer process-tree) s4-0)\n"
" (-> (the-as (pointer process-tree) s4-0) 0 self)\n"
" (if (the-as (pointer process) s4-0)\n"
" (-> (the-as (pointer process) s4-0) 0 self)\n"
" )\n"
" (-> arg0 name)\n"
" )\n"
@@ -1123,8 +1123,8 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPool) {
func, type, expected, false, "dead-pool",
{{"L315", "WARNING: ~A ~A had to be allocated from the debug pool, because ~A was empty.~%"},
{"L314", "WARNING: ~A ~A could not be allocated, because ~A was empty.~%"}},
"[\t\t[24, \"v1\", \"(pointer process-tree)\"],\n"
"\t\t[[30,39], \"s4\", \"(pointer process-tree)\"]]");
"[\t\t[24, \"v1\", \"(pointer process)\"],\n"
"\t\t[[30,39], \"s4\", \"(pointer process)\"]]");
}
TEST_F(FormRegressionTest, ExprMethod15DeadPool) {
@@ -2016,13 +2016,12 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPoolHeap) {
" ((v1-5 (-> s1-0 next)))\n"
" (set! (-> s1-0 next) s4-0)\n"
" (set! (-> s4-0 next) v1-5)\n"
" (when v1-5 (set! (-> v1-5 prev) s4-0) (let ((v1-6 s4-0))))\n"
" (if v1-5 (set! (-> v1-5 prev) s4-0))\n"
" )\n"
" (set! (-> s4-0 prev) s1-0)\n"
" (when\n"
" (if\n"
" (= s1-0 (-> arg0 alive-list prev))\n"
" (set! (-> arg0 alive-list prev) s4-0)\n"
" (let ((v1-9 s4-0)))\n"
" )\n"
" (let\n"
" ((a0-4 (gap-location arg0 s1-0)))\n"
@@ -2042,13 +2041,12 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPoolHeap) {
" (= (-> arg0 first-gap) s1-0)\n"
" (set! (-> arg0 first-gap) (find-gap arg0 s4-0))\n"
" )\n"
" (when\n"
" (if\n"
" (or\n"
" (not (-> arg0 first-shrink))\n"
" (< (the-as int s3-0) (the-as int (-> arg0 first-shrink process)))\n"
" )\n"
" (set! (-> arg0 first-shrink) s4-0)\n"
" (let ((v1-22 s4-0)))\n"
" )\n"
" (set! (-> s3-0 parent) (-> arg0 ppointer))\n"
" (set! (-> s3-0 pool) arg0)\n"
@@ -2593,8 +2591,8 @@ TEST_F(FormRegressionTest, ExprMethod16DeadPoolHeap) {
" (format *stdcon* \"~3LLow Actor Memory~%~0L\" a2-0)\n"
" )\n"
" )\n"
" ((< f0-2 (l.f L347)) (set! arg1 (shl arg1 2)) (let ((v1-10 arg1))))\n"
" ((< f0-2 (l.f L348)) (set! arg1 (shl arg1 1)) (let ((v1-12 arg1))))\n"
" ((< f0-2 (l.f L347)) (set! arg1 (shl arg1 2)))\n"
" ((< f0-2 (l.f L348)) (set! arg1 (shl arg1 1)))\n"
" )\n"
" )\n"
" (set! (-> arg0 compact-count-targ) (the-as uint arg1))\n"
@@ -2608,7 +2606,6 @@ TEST_F(FormRegressionTest, ExprMethod16DeadPoolHeap) {
" (not v1-13)\n"
" (set! v1-13 (-> arg0 alive-list next))\n"
" (set! (-> arg0 first-shrink) v1-13)\n"
" (let ((a0-5 v1-13)))\n"
" )\n"
" (if v1-13 (shrink-heap arg0 (-> v1-13 process)))\n"
" )\n"
@@ -2818,7 +2815,7 @@ TEST_F(FormRegressionTest, ExprMethod18DeadPoolHeap) {
" ((v1-19 (-> a1-3 next)))\n"
" (set! (-> a1-3 next) s4-0)\n"
" (set! (-> s4-0 next) v1-19)\n"
" (when v1-19 (set! (-> v1-19 prev) s4-0) (let ((v1-20 s4-0))))\n"
" (if v1-19 (set! (-> v1-19 prev) s4-0))\n"
" )\n"
" (set! (-> s4-0 prev) a1-3)\n"
" (set! (-> arg0 alive-list prev) s4-0)\n"