;;-*-Lisp-*- (in-package goal) ;; name: collide-target-h.gc ;; name in dgo: collide-target-h ;; dgos: GAME, ENGINE ;; We believe that target's control-info may contain an array of these. ;; Each collide-history is a record of a single collision event. (deftype collide-history (structure) ((intersect vector :inline :offset-assert 0) (trans vector :inline :offset-assert 16) (transv vector :inline :offset-assert 32) (transv-out vector :inline :offset-assert 48) (local-normal vector :inline :offset-assert 64) (surface-normal vector :inline :offset-assert 80) (time time-frame :offset-assert 96) (status uint64 :offset-assert 104) (pat pat-surface :offset-assert 112) (reaction-flag uint32 :offset-assert 116) ) :method-count-assert 10 :size-assert #x78 :flag-assert #xa00000078 (:methods (update! (_type_ collide-shape-moving vector vector vector) _type_ 9) ) ) ;; This is the collide shape for target (Jak). ;; It is complicated. (deftype control-info (collide-shape-moving) ( (unknown-vector00 vector :inline :offset 448) ;; from - logic-target::build-conversions (unknown-vector01 vector :inline :offset 464) ;; from - logic-target::turn-to-vector (unknown-vector02 vector :inline :offset 480) ;; from - logic-target::do-rotations2 (unknown-quaternion00 quaternion :inline :offset 496) ;; from - target-util::(method 27 control-info) (unknown-quaternion01 quaternion :inline :offset 512) ;; from - logic-target::do-rotations2 (unknown-float00 float :offset 528) ;; from - logic-target::do-rotations2 (unknown-float01 float :offset 532) (unknown-float02 float :offset 536) ;; from - logic-target::add-thrust (unknown-vector10 vector :inline :offset 544) ;; from - logic-target::flat-setup (unknown-vector11 vector :inline :offset 560) ;; from - logic-target::target-no-move-post (unknown-vector12 vector :inline :offset 576) (unknown-vector13 vector :inline :offset 592) ;; from - collide-shape::method-37 | target::mod-var-jump (unknown-vector14 vector :inline :offset 608) ;; from - logic-target::target-no-move-post (unknown-vector15 vector :inline :offset 624) ;; from - collide-shape::method-37 | target-handler::target-exit (unknown-vector16 vector :inline :offset 640) ;; from - collide-shape::method-37 (unknown-dynamics00 dynamics :offset 656) ;; from - logic-target::bend-gravity (unknown-surface00 surface :offset 660) (unknown-surface01 surface :offset 664) ;; not a symbol - target-util::target-align-vel-z-adjust (unknown-cpad-info00 cpad-info :offset 668) ;; not a symbol - target-util::move-legs? (unknown-float10 float :offset 672) ;; from - logic-target::turn-to-vector (unknown-float11 float :offset 676) ;; from - logic-target::turn-to-vector (unknown-float12 float :offset 680) ;; from - logic-target::turn-to-vector (unknown-float13 float :offset 684) ;; from - logic-target::turn-to-vector (unknown-vector20 vector :inline :offset 688) ;; from - logic-target::turn-to-vector (unknown-vector21 vector :inline :offset 704) ;; from - logic-target::turn-to-vector (unknown-vector22 vector :inline :offset 720) ;; from - logic-target::turn-to-vector (unknown-vector23 vector :inline :offset 736) ;; from - logic-target::turn-to-vector ; (unknown-dword-temp-01 uint64 :offset 776) ;; from - logic-target::read-pad (unknown-vector-array00 vector 7 :inline :offset 752) ;; from - logic-target::turn-to-vector (unknown-vector30 vector :inline :offset 880) ;; from - logic-target::read-pad (unknown-vector31 vector :inline :offset 896) ;; from - logic-target::read-pad (unknown-float20 float :offset 912) ;; from - logic-target::read-pad (unknown-float21 float :offset 916) ;; from - logic-target::read-pad (unknown-dword00 uint64 :offset 920) ;; from - logic-target::read-pad (unknown-matrix00 matrix :inline :offset 928) ;; from - target-util::(method 16 target) (unknown-matrix01 matrix :inline :offset 992) ;; from - target-util::(method 16 target) (unknown-matrix02 matrix :inline :offset 1056) ;; from - logic-target::joint-points (unknown-qword00 uint128 :offset 1136) (unknown-float30 float :offset 1140) ;; from - logic-target::target-calc-camera-pos (unknown-vector40 vector :inline :offset 1152) ;; from - logic-target::target-real-post (unknown-float40 float :offset 1172) ;; from - target-death::lambda-1 (unknown-float41 float :offset 1176) ;; from - logic-target::do-rotations2 (unknown-int00 int32 :offset 1180) ;; from - logic-target::joint-points (unknown-float50 float :offset 1168) ;; from - logic-target::target-real-post (unknown-vector50 vector :inline :offset 1184) ;; from - logic-target::build-conversions (unknown-vector51 vector :inline :offset 1200) ;; from - logic-target::build-conversions (unknown-vector52 vector :inline :offset 1216) (unknown-vector53 vector :inline :offset 1232) (last-known-safe-ground vector :inline :offset 1248) (unknown-vector55 vector :inline :offset 1264) (unknown-dword10 time-frame :offset 1280) ;; from - collide-reaction-target::target-collision-reaction (unknown-dword11 time-frame :offset 1288) ;; from - target-util::can-jump? (unknown-float60 float :offset 1300) ;; from - target-util::can-duck? (unknown-float61 float :offset 1304) ;; from - target-util::target-align-vel-z-adjust (unknown-float62 float :offset 1308) ;; from - target-util::target-print-stats (unknown-float63 float :offset 1312) ;; from - logic-target::target-compute-slopes (unknown-float64 float :offset 1316) ;; from - logic-target::target-compute-slopes (unknown-dword20 time-frame :offset 1320) ;; from target-util::turn-around? - TODO (unknown-dword21 time-frame :offset 1328) ;; from target-util::turn-around? - TODO (unknown-dword-coverage int64 :offset 1336) (unknown-float-coverage-0 float :offset 1344) (unknown-float-coverage-1 float :offset 1348) (unknown-float-coverage-2 float :offset 1352) (unknown-u32-coverage-0 uint32 :offset 1356) (unknown-vector-coverage-0 vector :inline :offset 1376) (unknown-vector-coverage-1 vector :inline :offset 1392) (unknown-vector-coverage-2 vector :inline :offset 1440) (unknown-vector-coverage-3 vector :inline :offset 1472) (unknown-vector60 vector :inline :offset 1456) ;; from - logic-target::add-thrust (unknown-vector61 vector :inline :offset 1504) ;; from - logic-target::add-thrust (unknown-float70 float :offset 1520) ;; from - logic-target::add-thrust (unknown-float71 float :offset 1524) ;; from - collide-shape::method-37 (unknown-vector70 vector :inline :offset 1536) ;; from - logic-target::add-thrust (unknown-vector71 vector :inline :offset 1552) ;; from - target-tube::tube-thrust (unknown-vector72 vector :inline :offset 1568) ;; from - collide-reaction-racer::racer-collision-reaction (unknown-vector73 vector :inline :offset 1584) ;; from - collide-reaction-racer::racer-collision-reaction (unknown-handle00 handle :offset 1600) ;; from logic-target::reset-target-state (unknown-sphere-array00 collide-shape-prim-sphere 3 :offset 1608) ;; from target-util::target-collide-set! and from target-util::target-danger-set! (unknown-sphere00 collide-shape-prim-sphere :offset 1632) ;; from target-util::target-danger-set! (unknown-sphere01 collide-shape-prim-sphere :offset 1636) ;; from target-util::target-danger-set! (unknown-sphere02 collide-shape-prim-sphere :offset 1640) ;; from target-util::target-danger-set! (unknown-int50 int32 :offset 1656) ;; from target::(enter target-wheel) (unknown-dword30 time-frame :offset 1664) ;; from target::(trans target-walk) (unknown-dword31 time-frame :offset 1672) ;; from target-util::can-hands? (unknown-dword32 time-frame :offset 1680) ;; from target-util::can-hands? (unknown-dword33 time-frame :offset 1688) ;; from target-util::can-feet? (unknown-dword34 time-frame :offset 1696) ;; from target-util::can-feet? (unknown-dword35 time-frame :offset 1704) ;; from target::(exit target-slide-down) (unknown-dword36 time-frame :offset 1712) ;; from target::(trans target-jump) (unknown-float80 float :offset 1724) ;; from logic-target::bend-gravity (unknown-float81 float :offset 1728) ;; from logic-target::bend-gravity (unknown-float82 float :offset 1732) ;; from logic-target::bend-gravity (unknown-vector80 vector :inline :offset 1744) ;; from logic-target::joint-points (unknown-cspace00 cspace :inline :offset 1760) ;; from logic-target::joint-points (unknown-vector90 vector :score 100 :inline :offset 1776) ;; from logic-target::target-compute-edge (unknown-vector91 vector :inline :offset 1792) ;; from logic-target::target-compute-edge (unknown-vector92 vector :inline :offset 1824) ;; from logic-target::joint-points (unknown-cspace10 cspace :inline :offset 1808) ;; from logic-target::joint-points (unknown-symbol00 symbol :offset 1840) ;; from target-util::target-danger-set! (unknown-float90 float :offset 1844) ;; from target-util::target-danger-set! (unknown-float91 float :offset 1848) ;; from target-util::target-collide-set! (unknown-vector-array10 vector 16 :inline :offset 1856) ;; from target-util::turn-around? (unknown-float100 float :offset 2112) ;; from target-util::turn-around? (unknown-int10 int32 :offset 2116) ;; from target-util::turn-around? (unknown-float110 float :offset 2120) ;; from logic-target::target-compute-edge (unknown-vector100 vector :inline :offset 2128) ;; from logic-target::target-compute-edge (unknown-vector101 vector :inline :offset 2144) ;; from logic-target::target-compute-edge (unknown-dword40 time-frame :offset 2160) ;; from logic-target::target-compute-edge (unknown-dword41 time-frame :offset 2168) ;; from logic-target::target-compute-edge (unknown-handle10 handle :offset 2176) ;; from logic-target::target-compute-pole - probably a swingpole (unknown-uint20 uint32 :offset 2184) ;; from target::(trans target-running-attack) (unknown-spoolanim00 spool-anim :offset 2184) ;; from target2::(trans target-stance-ambient) (unknown-int20 int32 :offset 2184) ;; from (anon-function 1 basebutton) (unknown-symbol20 symbol :offset 2184) ;; from (anon-function 1 basebutton) (unknown-float120 float :offset 2184) ;; from target::mod-var-jump (unknown-int21 int32 :offset 2188) ;; from logic-target::target-compute-pole (unknown-uint30 uint32 :offset 2188) ;; from target::(code target-running-attack) (unknown-float121 float :offset 2188) ;; from target::mod-var-jump (unknown-uint31 uint32 :offset 2192) ;; from target::(trans target-running-attack) (unknown-float122 float :offset 2196) ;; from target::(trans target-jump) (unknown-float123 float :offset 2200) ;; from target::mod-var-jump (unknown-float124 float :offset 2204) ;; from target::init-var-jump (unknown-vector102 vector :inline :offset 2224) ;; from (anon-function 3 basebutton) (unknown-vector103 vector :inline :offset 2240) ;; from (anon-function 3 basebutton) (unknown-quaternion02 quaternion :inline :offset 2256) ;; from racer-states::(code target-racing-get-on) (unknown-quaternion03 quaternion :inline :offset 2272) ;; from racer-states::(code target-racing-get-on) (unknown-smush00 smush-control :inline :offset 2288) ;; from (event target-fishing) (unknown-vector110 vector :inline :offset 2320) ;; from logic-target::flag-setup (unknown-vector111 vector :inline :offset 2336) ;; from logic-target::flag-setup (unknown-symbol30 symbol :offset 2384) ;; from target-util::target-danger-set! (unknown-int31 uint32 :offset 2384) ;; from target:: (event target-running-attack) (unknown-dword50 int64 :offset 2392) ;; from target-util::target-start-attack (unknown-dword51 int64 :offset 2400) ;; from target-util::target-start-attack (unknown-pointer00 pointer :offset 2416) ;; from target-handler::target-standard-event-handler (unknown-symbol40 symbol :offset 2428) ;; from logic-target::post-flag-setup (unknown-dword60 int64 :offset 2432) ;; from target::(enter target-jump) (unknown-dword61 int64 :offset 2440) ;; from target::(enter target-jump) (unknown-dword62 int64 :offset 2448) ;; from target::(enter target-jump) - probably some sort of object64 that's used as a vector? (unknown-dword63 int64 :offset 2456) ;; from target::(enter target-jump) (unknown-halfword00 int16 :offset 2488) ;; from logic-target::target-move-dist ;; these were determined from racer-collision-reaction. (history-length int16 :offset 2490) (history-data collide-history 128 :inline :offset-assert 2496) (unknown-float140 float :offset 18944) (unknown-dword70 time-frame :offset 18952) ;; from logic-target::add-thrust (unknown-int40 int32 :offset 18880) ;; from logic-target::flag-setup (unknown-dword80 time-frame :offset 18888) ;; from logic-target::post-flag-setup (unknown-dword81 time-frame :offset 18896) ;; from logic-target::post-flag-setup (unknown-float130 float :offset 18904) ;; from target2::target-swim-tilt (unknown-float131 float :offset 18908) ;; from target2::target-swim-tilt (unknown-dword82 time-frame :offset 18912) ;; from logic-target::reset-target-state (unknown-vector120 vector :inline :offset 18928) ;; from target::(code target-running-attack) (unknown-float150 float :offset 18944) ;; from target::(code target-wheel-flip) (unknown-vector121 vector :inline :offset 18960) ;; from target collide response (unknown-int60 uint32 :offset 18976) ;; from logic-target::print-target-stats (unknown-soundid00 sound-id :offset 18980) ;; from powerups::target-powerup-process (unknown-float141 float :offset 18984) ;; from powerups::target-powerup-process ) :size-assert #x4a2c :method-count-assert 65 :flag-assert #x4100004a2c ) (defmethod update! collide-history ((obj collide-history) (cshape collide-shape-moving) (xs vector) (transv vector) (transv-out vector)) "Update the collide-history element." (set! (-> obj intersect quad) (-> xs quad)) (set! (-> obj transv quad) (-> transv quad)) (set! (-> obj transv-out quad) (-> transv-out quad)) (set! (-> obj trans quad) (-> cshape trans quad)) (set! (-> obj local-normal quad) (-> cshape local-normal quad)) (set! (-> obj surface-normal quad) (-> cshape surface-normal quad)) (set! (-> obj time) (-> *display* base-frame-counter)) (set! (-> obj status) (-> cshape status)) (set! (-> obj reaction-flag) (-> cshape reaction-flag)) (set! (-> obj pat) (-> cshape cur-pat)) obj )