mirror of
https://github.com/open-goal/jak-project
synced 2026-08-01 08:27:22 -04:00
d264779173
* d/jak2: finish `glist` and `glist-h` partially done `time-of-day` * d/jak2: finish `camera` and `cam-interface` * d/jak2: partially finish `cam-master` `cam-states`, and `cam-update` finish `cam-states-dbg` `cam-combiner` `cam-debug` and `cam-start` * tests: update ref tests * scripts: add scripts to automatically update gsrc files * d/jak2: update gsrc
211 lines
5.8 KiB
Common Lisp
211 lines
5.8 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: entity-h.gc
|
|
;; name in dgo: entity-h
|
|
;; dgos: ENGINE, GAME
|
|
|
|
(defenum entity-perm-status
|
|
:bitfield #t
|
|
:type uint16
|
|
(bit-0 0)
|
|
(bit-1 1)
|
|
(dead 2)
|
|
(bit-3 3)
|
|
(bit-4 4)
|
|
(bit-5 5)
|
|
(subtask-complete 6)
|
|
(bit-7 7)
|
|
(complete 8)
|
|
(bit-9 9)
|
|
(bit-10 10)
|
|
)
|
|
|
|
(declare-type race-mesh basic)
|
|
|
|
;; NOTE - for cam-start
|
|
(define-extern reset-cameras (function none))
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(define *generate-actor-vis* #f)
|
|
|
|
(define *generate-actor-vis-start* #f)
|
|
|
|
(define *generate-actor-vis-output* #f)
|
|
|
|
(deftype entity-perm (structure)
|
|
((user-object object 2 :offset-assert 0)
|
|
(user-uint64 uint64 :offset 0)
|
|
(user-float float 2 :offset 0)
|
|
(user-int32 int32 2 :offset 0)
|
|
(user-uint32 uint32 2 :offset 0)
|
|
(user-int16 int16 4 :offset 0)
|
|
(user-uint16 uint16 4 :offset 0)
|
|
(user-int8 int8 8 :offset 0)
|
|
(user-uint8 uint8 8 :offset 0)
|
|
(status entity-perm-status :offset 8)
|
|
(dummy uint8 1 :offset 10)
|
|
(task uint8 :offset 11)
|
|
(aid actor-id :offset 12)
|
|
(quad uint128 :offset 0)
|
|
)
|
|
:method-count-assert 10
|
|
:size-assert #x10
|
|
:flag-assert #xa00000010
|
|
(:methods
|
|
(entity-perm-method-9 () none 9)
|
|
)
|
|
)
|
|
|
|
(deftype entity-links (structure)
|
|
((prev-link entity-links :offset-assert 0)
|
|
(next-link entity-links :offset-assert 4)
|
|
(entity entity :offset-assert 8)
|
|
(process process :offset-assert 12)
|
|
(level level :offset-assert 16)
|
|
(vis-id int32 :offset-assert 20)
|
|
(kill-mask task-mask :offset-assert 24)
|
|
(vis-dist meters :offset-assert 28)
|
|
(trans vector :inline :offset-assert 32)
|
|
(perm entity-perm :inline :offset-assert 48)
|
|
(status uint16 :offset 56)
|
|
(aid uint32 :offset 60)
|
|
(task uint8 :offset 59)
|
|
)
|
|
:method-count-assert 10
|
|
:size-assert #x40
|
|
:flag-assert #xa00000040
|
|
(:methods
|
|
(entity-links-method-9 () none 9)
|
|
)
|
|
)
|
|
|
|
(deftype entity-perm-array (inline-array-class)
|
|
((data entity-perm :inline :dynamic :offset-assert 16)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
(set! (-> entity-perm-array heap-base) (the-as uint 16))
|
|
|
|
(deftype entity-links-array (inline-array-class)
|
|
((data entity-links :inline :dynamic :offset-assert 16)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
(set! (-> entity-links-array heap-base) (the-as uint 64))
|
|
|
|
(deftype entity (res-lump)
|
|
((trans vector :inline :offset-assert 32)
|
|
(aid uint32 :offset-assert 48)
|
|
)
|
|
:method-count-assert 27
|
|
:size-assert #x34
|
|
:flag-assert #x1b00000034
|
|
(:methods
|
|
(entity-method-22 () none 22)
|
|
(entity-method-23 () none 23)
|
|
(entity-method-24 () none 24)
|
|
(entity-method-25 () none 25)
|
|
(entity-method-26 () none 26)
|
|
)
|
|
)
|
|
|
|
(deftype entity-camera (entity)
|
|
((connect connectable :inline :offset-assert 64)
|
|
)
|
|
:method-count-assert 27
|
|
:size-assert #x50
|
|
:flag-assert #x1b00000050
|
|
)
|
|
|
|
(deftype entity-nav-mesh (entity)
|
|
((nav-mesh nav-mesh :offset-assert 52)
|
|
)
|
|
:method-count-assert 29
|
|
:size-assert #x38
|
|
:flag-assert #x1d00000038
|
|
(:methods
|
|
(entity-nav-mesh-method-27 () none 27)
|
|
(entity-nav-mesh-method-28 () none 28)
|
|
)
|
|
)
|
|
|
|
(deftype entity-race-mesh (entity)
|
|
((race-mesh race-mesh :offset-assert 52)
|
|
)
|
|
:method-count-assert 29
|
|
:size-assert #x38
|
|
:flag-assert #x1d00000038
|
|
(:methods
|
|
(entity-race-mesh-method-27 () none 27)
|
|
(entity-race-mesh-method-28 () none 28)
|
|
)
|
|
)
|
|
|
|
(deftype entity-actor (entity)
|
|
((etype type :offset 56)
|
|
(task game-task :offset-assert 60)
|
|
(kill-mask task-mask :offset 52)
|
|
(vis-id int16 :offset-assert 62)
|
|
(quat quaternion :inline :offset-assert 64)
|
|
)
|
|
:method-count-assert 33
|
|
:size-assert #x50
|
|
:flag-assert #x2100000050
|
|
(:methods
|
|
(next-actor (_type_) entity-actor 27)
|
|
(prev-actor (_type_) entity-actor 28)
|
|
(entity-actor-method-29 () none 29)
|
|
(entity-actor-method-30 () none 30)
|
|
(entity-actor-method-31 () none 31)
|
|
(entity-actor-method-32 () none 32)
|
|
)
|
|
)
|
|
|
|
(deftype actor-reference (structure)
|
|
((actor basic :offset-assert 0)
|
|
(id uint32 :offset-assert 4)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x8
|
|
:flag-assert #x900000008
|
|
)
|
|
|
|
(deftype actor-group (inline-array-class)
|
|
((data actor-reference :inline :dynamic :offset-assert 16)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
(set! (-> actor-group heap-base) (the-as uint 8))
|
|
|
|
(deftype entity-info (basic)
|
|
((ptype type :offset-assert 4)
|
|
(package string :offset-assert 8)
|
|
(art-group pair :offset-assert 12)
|
|
(pool symbol :offset-assert 16)
|
|
(heap-size int32 :offset-assert 20)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x18
|
|
:flag-assert #x900000018
|
|
)
|
|
|
|
(deftype actor-bank (basic)
|
|
((pause-dist meters :offset-assert 4)
|
|
(birth-dist meters :offset-assert 8)
|
|
(birth-max int32 :offset-assert 12)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
(define *ACTOR-bank* (new 'static 'actor-bank :pause-dist (meters 50) :birth-dist (meters 220) :birth-max 10))
|