get started on entity (#793)

This commit is contained in:
water111
2021-08-31 11:05:03 -04:00
committed by GitHub
parent ccdfa01a88
commit 34e8afa0ee
36 changed files with 1931 additions and 340 deletions
+18 -16
View File
@@ -75,7 +75,7 @@
:size-assert #x40
:flag-assert #xa00000040
(:methods
(dummy-9 () none 9)
(dummy-9 (_type_ vector) none 9)
)
)
@@ -147,11 +147,11 @@
:size-assert #x34
:flag-assert #x1b00000034
(:methods
(dummy-22 () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(birth! (_type_) _type_ 22)
(kill! (_type_) _type_ 23)
(add-to-level! (_type_ level-group level actor-id) none 24)
(remove-from-level! (_type_ level-group) _type_ 25)
(get-level (_type_) level 26)
)
)
@@ -203,7 +203,8 @@
;; definition of type entity-ambient-data-array
(deftype entity-ambient-data-array (inline-array-class)
()
((data entity-ambient-data :inline :dynamic :offset-assert 16)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
@@ -214,7 +215,7 @@
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
(format #t "~Tdata[0] @ #x~X~%" (-> obj _data))
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
obj
)
@@ -229,17 +230,18 @@
:flag-assert #x1d00000034
(:methods
(dummy-27 () none 27)
(dummy-28 () none 28)
(birth-ambient! (_type_) none 28)
)
)
;; definition of type entity-actor
(deftype entity-actor (entity)
((nav-mesh nav-mesh :offset-assert 52)
(etype type :offset-assert 56)
(task uint8 :offset-assert 60)
(vis-id uint16 :offset-assert 62)
(quat quaternion :inline :offset-assert 64)
((nav-mesh nav-mesh :offset-assert 52)
(etype type :offset-assert 56)
(task uint8 :offset-assert 60)
(vis-id uint16 :offset-assert 62)
(vis-id-signed int16 :offset 62)
(quat quaternion :inline :offset-assert 64)
)
:method-count-assert 31
:size-assert #x50
@@ -247,8 +249,8 @@
(:methods
(next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28)
(dummy-29 () none 29)
(dummy-30 () none 30)
(debug-print (_type_ symbol type) none 29)
(dummy-30 (_type_ entity-perm-status symbol) none 30)
)
)
+13 -13
View File
@@ -78,19 +78,19 @@
;; definition of type part-tracker
(deftype part-tracker (process)
((root basic :offset-assert 112)
(part basic :offset-assert 116)
(target uint64 :offset-assert 120)
(callback basic :offset-assert 128)
(linger-callback basic :offset-assert 132)
(duration uint64 :offset-assert 136)
(linger-duration uint64 :offset-assert 144)
(start-time uint64 :offset-assert 152)
(offset vector :inline :offset-assert 160)
(userdata uint64 :offset-assert 176)
(user-time uint64 2 :offset-assert 184)
(user-vector vector 2 :inline :offset-assert 208)
(user-handle uint32 2 :offset-assert 240)
((root trsqv :offset-assert 112)
(part sparticle-launch-control :offset-assert 116)
(target uint64 :offset-assert 120)
(callback basic :offset-assert 128)
(linger-callback basic :offset-assert 132)
(duration uint64 :offset-assert 136)
(linger-duration uint64 :offset-assert 144)
(start-time uint64 :offset-assert 152)
(offset vector :inline :offset-assert 160)
(userdata uint64 :offset-assert 176)
(user-time uint64 2 :offset-assert 184)
(user-vector vector 2 :inline :offset-assert 208)
(user-handle uint32 2 :offset-assert 240)
)
:heap-base #x90
:method-count-assert 14
+2 -2
View File
@@ -53,7 +53,7 @@
(unk-data-4 float :offset-assert 160)
(unk-data-5 float :offset-assert 164)
(adgifs adgif-shader-array :offset-assert 168)
(unk-data-6 pointer :offset-assert 172)
(actor-birth-order (pointer uint32) :offset-assert 172)
(unk-data-7 pointer :offset-assert 176)
(unk-data-8 uint32 55 :offset-assert 180)
)
@@ -62,7 +62,7 @@
:flag-assert #x1400000190
(:methods
(relocate (_type_ kheap (pointer uint8)) none :replace 7)
(dummy-18 (_type_) none 18)
(birth (_type_) none 18)
(dummy-19 (_type_) none 19)
)
)
+1 -1
View File
@@ -113,7 +113,7 @@
)
)
)
(when (nonzero? (-> obj unk-data-6))
(when (nonzero? (-> obj actor-birth-order))
(set! (-> mem-use length) (max 58 (-> mem-use length)))
(set! (-> mem-use data 57 name) "bsp-misc")
(+! (-> mem-use data 57 count) 1)
+7 -7
View File
@@ -186,7 +186,7 @@
:flag-assert #x1d00000a30
(:methods
(deactivate (_type_) _type_ 9)
(dummy-10 (_type_ int) symbol 10)
(is-object-visible? (_type_ int) symbol 10)
(add-irq-to-tex-buckets! (_type_) none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
@@ -294,18 +294,18 @@
(level-get-with-status (_type_ symbol) level 10)
(level-get-for-use (_type_ symbol symbol) level 11)
(activate-levels! (_type_) int 12)
(dummy-13 () none 13)
(dummy-14 (_type_ object) none 14)
(dummy-15 () none 15)
(debug-print-entities (_type_ symbol type) none 13)
(debug-draw-actors (_type_ symbol) none 14)
(dummy-15 (_type_) object 15)
(dummy-16 (_type_) int 16)
(level-get-target-inside (_type_) level 17)
(alloc-levels! (_type_ symbol) int 18)
(load-commands-set! (_type_ pair) pair 19)
(art-group-get-by-name (_type_ string) art-group 20)
(load-command-get-index (_type_ symbol int) pair 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(update-vis-volumes (_type_) none 22)
(update-vis-volumes-from-nav-mesh (_type_) none 23)
(print-volume-sizes (_type_) none 24)
(level-status (_type_ symbol) symbol 25)
(level-get-most-disposable (_type_) level 26)
)
+16 -16
View File
@@ -239,21 +239,21 @@
;; definition of type nav-mesh
(deftype nav-mesh (basic)
((user-list engine :offset-assert 4)
(poly-lookup-history uint8 2 :offset-assert 8)
(debug-time uint8 :offset-assert 10)
(static-sphere-count uint8 :offset-assert 11)
(static-sphere uint32 :offset-assert 12)
(bounds sphere :inline :offset-assert 16)
(origin vector :inline :offset-assert 32)
(cache nav-lookup-elem 4 :inline :offset-assert 48)
(node-count int32 :offset-assert 176)
(nodes uint32 :offset-assert 180)
(vertex-count int32 :offset-assert 184)
(vertex uint32 :offset-assert 188)
(poly-count int32 :offset-assert 192)
(poly uint32 :offset-assert 196)
(route uint32 :offset-assert 200)
((user-list engine :offset-assert 4)
(poly-lookup-history uint8 2 :offset-assert 8)
(debug-time uint8 :offset-assert 10)
(static-sphere-count uint8 :offset-assert 11)
(static-sphere uint32 :offset-assert 12)
(bounds sphere :inline :offset-assert 16)
(origin vector :inline :offset-assert 32)
(cache nav-lookup-elem 4 :inline :offset-assert 48)
(node-count int32 :offset-assert 176)
(nodes uint32 :offset-assert 180)
(vertex-count int32 :offset-assert 184)
(vertex (inline-array vector) :offset-assert 188)
(poly-count int32 :offset-assert 192)
(poly uint32 :offset-assert 196)
(route uint32 :offset-assert 200)
)
:method-count-assert 30
:size-assert #xcc
@@ -269,7 +269,7 @@
(dummy-16 () none 16)
(dummy-17 (_type_) none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(compute-bounding-box (_type_ vector vector) none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
+2 -2
View File
@@ -1652,10 +1652,10 @@
(the-as (function none :behavior process) nothing)
)
;; definition for symbol entity-deactivate-handler, type (function process object none)
;; definition for symbol entity-deactivate-handler, type (function process entity none)
(define
entity-deactivate-handler
(the-as (function process object none) nothing)
(the-as (function process entity none) nothing)
)
;; definition for method 10 of type process