update ref tests

This commit is contained in:
water
2022-10-29 16:15:03 -04:00
parent 1523933cd7
commit b8b4ec1f25
5 changed files with 96 additions and 80 deletions
+36 -19
View File
@@ -651,7 +651,7 @@
(vector+! (-> self draw origin) (-> self root-override2 trans) (-> self draw bounds))
(set! (-> self draw origin w) (-> self draw bounds w))
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((v1-9 (-> self root-override2 root-prim)))
(let ((v1-9 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core collide-with) (collide-spec))
)
@@ -670,9 +670,13 @@
(suspend)
)
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((v1-29 (-> self root-override2 root-prim)))
(set! (-> v1-29 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-29 prim-core collide-with) (-> self root-override2 backup-collide-with))
(let ((v1-29 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-29 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
)
(set! (-> v1-29 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
)
)
(go-virtual idle)
(none)
@@ -684,7 +688,7 @@
:event crate-standard-event-handler
:code (behavior ()
(suspend)
(collide-shape-method-46 (-> self root-override2))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(carry-info-method-9 (-> self carry))
(logior! (-> self mask) (process-mask sleep))
(until #f
@@ -714,7 +718,7 @@
(ja-post)
(carry-info-method-9 (-> self carry))
(carry-info-method-13 (-> self carry))
(collide-shape-method-46 (-> self root-override2))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(none)
)
)
@@ -751,16 +755,22 @@
(none)
)
:trans (behavior ()
(when (and (logtest? (-> self root-override2 status) (cshape-moving-flags on-surface))
(< 0.8 (-> self root-override2 surface-angle))
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override2)) status) (cshape-moving-flags on-surface))
(< 0.8 (-> (the-as collide-shape-moving (-> self root-override2)) surface-angle))
)
(vector-reset! (-> self root-override2 transv))
(when (= (vector-length (-> self root-override2 transv)) 0.0)
(set! (-> self root-override2 root-prim local-sphere w) (-> self carry backup-radius))
(set! (-> (the-as collide-shape-moving (-> self root-override2)) root-prim local-sphere w)
(-> self carry backup-radius)
)
(set! (-> self base quad) (-> self root-override2 trans quad))
(let ((v1-16 (-> self root-override2 root-prim)))
(set! (-> v1-16 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-16 prim-core collide-with) (-> self root-override2 backup-collide-with))
(let ((v1-16 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-16 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
)
(set! (-> v1-16 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
)
)
(go-virtual idle)
)
@@ -773,8 +783,13 @@
(-> self root-override2 transv)
(compute-acc-due-to-gravity (-> self root-override2) (new-stack-vector0) 0.0)
)
(if (< (-> self root-override2 dynam gravity-max) (vector-length (-> self root-override2 transv)))
(vector-normalize! (-> self root-override2 transv) (-> self root-override2 dynam gravity-max))
(if (< (-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
(vector-length (-> self root-override2 transv))
)
(vector-normalize!
(-> self root-override2 transv)
(-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
)
)
(let ((gp-1 (-> self root-override2)))
(let ((a2-1 (new 'stack-no-clear 'collide-query)))
@@ -834,13 +849,13 @@
)
(when v1-3
(let* ((gp-1 (-> (the-as process-drawable v1-3) root))
(v1-4 (if (type? gp-1 collide-shape)
(v1-4 (if (type? (the-as collide-shape-moving gp-1) collide-shape)
gp-1
)
)
)
(when v1-4
(let* ((gp-2 (-> self root-override2 root-prim prim-core))
(let* ((gp-2 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim prim-core))
(a1-3 (-> (the-as collide-shape-moving v1-4) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3)))
)
@@ -1162,7 +1177,7 @@
)
)
)
(let ((v1-20 (-> self root-override2 root-prim)))
(let ((v1-20 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-20 prim-core collide-as) (collide-spec))
(set! (-> v1-20 prim-core collide-with) (collide-spec))
)
@@ -1302,7 +1317,7 @@
"Initialize the [[crate]]'s skeleton and other parameters based on the crate type."
(case (-> obj look)
(('iron)
(set! (-> obj root-override2 penetrated-by)
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
(penetrate flop uppercut tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
@@ -1312,7 +1327,9 @@
)
)
(('steel)
(set! (-> obj root-override2 penetrated-by) (penetrate tube vehicle flut-attack board dark-skin explode))
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
(penetrate tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-crate-krimson" (the-as (pointer uint32) #f)))
-2
View File
@@ -307,8 +307,6 @@
(none)
)
;; definition for method 12 of type perf-stat
;; WARN: Return type mismatch int vs none.
(defmethod read! perf-stat ((obj perf-stat))
(local-vars (v1-1 int) (v1-3 int))
(b! (zero? (-> obj ctrl)) cfg-2 :delay (nop!))
+1 -1
View File
@@ -2469,7 +2469,7 @@
(reset-actors 'debug)
0
(disable-irq)
(.mtc0 Count r0)
(.mtc0 Count 0)
(.sync.p)
(birth! gp-0)
(.mfc0 s4-0 Count)
+8 -8
View File
@@ -998,11 +998,11 @@
)
(+! (-> a1-16 count) 1)
(b! (zero? a2-6) cfg-7 :delay (nop!))
(.mtc0 Perf r0)
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mtpc pcr0 r0)
(.mtpc pcr1 r0)
(.mtpc pcr0 0)
(.mtpc pcr1 0)
(.sync.l)
(.sync.p)
(.mtc0 Perf a2-6)
@@ -1019,7 +1019,7 @@
)
(let ((v1-26 (-> *perf-stats* data 44)))
(b! (zero? (-> v1-26 ctrl)) cfg-9 :delay (nop!))
(.mtc0 Perf r0)
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mfpc a0-4 pcr0)
@@ -1034,11 +1034,11 @@
)
(+! (-> v1-29 count) 1)
(b! (zero? a0-8) cfg-11 :delay (nop!))
(.mtc0 Perf r0)
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mtpc pcr0 r0)
(.mtpc pcr1 r0)
(.mtpc pcr0 0)
(.mtpc pcr1 0)
(.sync.l)
(.sync.p)
(.mtc0 Perf a0-8)
@@ -1050,7 +1050,7 @@
(draw-prototype-inline-array-shrub proto-array-len proto-array-data)
(let ((v1-32 (-> *perf-stats* data 45)))
(b! (zero? (-> v1-32 ctrl)) cfg-13 :delay (nop!))
(.mtc0 Perf r0)
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mfpc a0-11 pcr0)
+51 -50
View File
@@ -8,8 +8,8 @@
)
(deftype grid-hash-box (structure)
((min uint8 3 :offset-assert 0)
(max uint8 3 :offset-assert 3)
((min int8 3 :offset-assert 0)
(max int8 3 :offset-assert 3)
)
:pack-me
:method-count-assert 9
@@ -30,44 +30,45 @@
)
(deftype grid-hash (basic)
((work basic :offset-assert 4)
(search-box grid-hash-box :inline :offset-assert 8)
(bucket-size int16 :offset-assert 14)
(axis-scale uint32 3 :offset-assert 16)
(dimension-array uint8 3 :offset-assert 28)
(vertical-cell-count int8 :offset-assert 31)
(bucket-array uint32 :offset-assert 32)
(box-min uint32 3 :offset-assert 36)
(box-max uint32 3 :offset-assert 48)
(object-count int16 :offset-assert 60)
(bucket-count int16 :offset-assert 62)
(min-cell-size float :offset-assert 64)
(bucket-memory-size int32 :offset-assert 68)
(mem-bucket-array uint32 :offset-assert 72)
(spr-bucket-array uint32 :offset-assert 76)
(debug-draw basic :offset-assert 80)
(use-scratch-ram basic :offset-assert 84)
((work grid-hash-work :offset-assert 4)
(search-box grid-hash-box :inline :offset-assert 8)
(bucket-size int16 :offset-assert 14)
(axis-scale uint32 3 :offset-assert 16)
(dimension-array int8 3 :offset-assert 28)
(vertical-cell-count int8 :offset-assert 31)
(bucket-array (pointer grid-hash-word) :offset-assert 32)
(box-min float 3 :offset-assert 36)
(box-max float 3 :offset-assert 48)
(object-count int16 :offset-assert 60)
(bucket-count int16 :offset-assert 62)
(min-cell-size float :offset-assert 64)
(bucket-memory-size int32 :offset-assert 68)
(mem-bucket-array (pointer grid-hash-word) :offset-assert 72)
(spr-bucket-array (pointer grid-hash-word) :offset-assert 76)
(debug-draw symbol :offset-assert 80)
(use-scratch-ram symbol :offset-assert 84)
)
:method-count-assert 25
:size-assert #x58
:flag-assert #x1900000058
(:methods
(grid-hash-method-9 () none 9)
(grid-hash-method-10 () none 10)
(grid-hash-method-11 () none 11)
(new (symbol type process int) _type_ 0)
(grid-hash-method-9 (_type_ int (array float) int) none 9)
(grid-hash-method-10 (_type_) none 10)
(grid-hash-method-11 (_type_) none 11)
(grid-hash-method-12 (_type_ vector) grid-hash-box 12)
(grid-hash-method-13 (_type_ vector float) grid-hash-box 13)
(grid-hash-method-14 () none 14)
(grid-hash-method-15 () none 15)
(grid-hash-method-16 () none 16)
(grid-hash-method-17 () none 17)
(grid-hash-method-18 () none 18)
(grid-hash-method-19 () none 19)
(grid-hash-method-20 () none 20)
(grid-hash-method-21 () none 21)
(grid-hash-method-22 () none 22)
(grid-hash-method-23 () none 23)
(grid-hash-method-24 () none 24)
(draw-grid (_type_ rgba) none 14)
(dump-grid-info (_type_) none 15)
(grid-hash-method-16 (_type_ grid-hash-box grid-hash-box) none 16)
(grid-hash-method-17 (_type_) none 17)
(grid-hash-method-18 (_type_ grid-hash-box int) none 18)
(grid-hash-method-19 (_type_ grid-hash-box int) none 19)
(grid-hash-method-20 (_type_ grid-hash-box (pointer uint8)) none 20)
(grid-hash-method-21 (_type_ float int int) none 21)
(grid-hash-method-22 (_type_ grid-hash-box sphere) none 22)
(grid-hash-method-23 (_type_ grid-hash-box vector vector float) none 23)
(update-grid (_type_) none 24)
)
)
@@ -138,15 +139,15 @@
:size-assert #x68
:flag-assert #x2200000068
(:methods
(sphere-hash-method-25 () none 25)
(sphere-hash-method-26 () none 26)
(sphere-hash-method-27 () none 27)
(sphere-hash-method-28 () none 28)
(sphere-hash-method-29 () none 29)
(clear-objects! (_type_) none 25)
(sphere-hash-method-26 (_type_ vector) none 26)
(sphere-hash-method-27 (_type_) none 27)
(sphere-hash-method-28 (_type_) none 28)
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none 29)
(sphere-hash-method-30 (_type_ find-nav-sphere-ids-params) none 30)
(sphere-hash-method-31 () none 31)
(sphere-hash-method-32 () none 32)
(sphere-hash-method-33 () none 33)
(sphere-hash-method-31 (_type_ vector int int) none 31)
(sphere-hash-method-32 (_type_ vector vector float int) symbol 32)
(sphere-hash-method-33 (_type_ object int) none 33)
)
)
@@ -202,21 +203,21 @@
)
(deftype spatial-hash (sphere-hash)
((object-array uint32 :offset-assert 104)
(mem-object-array uint32 :offset-assert 108)
(spr-object-array uint32 :offset-assert 112)
((object-array (pointer hash-object-info) :offset-assert 104)
(mem-object-array (pointer hash-object-info) :offset-assert 108)
(spr-object-array (pointer hash-object-info) :offset-assert 112)
)
:method-count-assert 41
:size-assert #x74
:flag-assert #x2900000074
(:methods
(spatial-hash-method-34 () none 34)
(spatial-hash-method-35 () none 35)
(spatial-hash-method-34 (_type_ vector hash-object-info) int 34)
(spatial-hash-method-35 (_type_) none 35)
(spatial-hash-method-36 (_type_ sphere (pointer collide-shape) int) int 36)
(spatial-hash-method-37 () none 37)
(spatial-hash-method-38 () none 38)
(spatial-hash-method-39 () none 39)
(spatial-hash-method-40 () none 40)
(spatial-hash-method-37 (_type_) none 37)
(spatial-hash-method-38 (_type_) none 38)
(spatial-hash-method-39 (_type_ object hash-object-info) none 39)
(spatial-hash-method-40 (_type_) none 40)
)
)