mirror of
https://github.com/open-goal/jak-project
synced 2026-06-27 10:52:59 -04:00
80a002f8c0
* make birthing work * fix float representation on defskelgroup * test * update * debugger improvements & dont upload aux sprites * ? * fix progress * fixes * fixes * Create bea.gd * fix test * fix xmm reg clobbering in kernel (water) * cleanup cam-start * clear gamepad state every frame * allow controller connects and disconnects while running
308 lines
7.8 KiB
Common Lisp
Vendored
Generated
308 lines
7.8 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type warrior
|
|
(deftype warrior (process-taskable)
|
|
()
|
|
:heap-base #x110
|
|
:method-count-assert 53
|
|
:size-assert #x17c
|
|
:flag-assert #x350110017c
|
|
)
|
|
|
|
;; definition for method 3 of type warrior
|
|
(defmethod inspect warrior ((obj warrior))
|
|
(let ((t9-0 (method-of-type process-taskable inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defskelgroup *warrior-sg* warrior
|
|
0
|
|
5
|
|
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 4)
|
|
:longest-edge (meters 0)
|
|
:shadow 4
|
|
)
|
|
|
|
;; definition for method 52 of type warrior
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod dummy-52 warrior ((obj warrior))
|
|
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
|
(when v1-1
|
|
(let ((f0-0 (-> obj root-override trans y)))
|
|
(let ((a0-2 v1-1))
|
|
(set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0)))
|
|
)
|
|
0
|
|
(set! (-> v1-1 settings top-plane w) (- (+ 3072.0 f0-0)))
|
|
)
|
|
0
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 48 of type warrior
|
|
(defmethod draw-npc-shadow warrior ((obj warrior))
|
|
(-> obj draw shadow-ctrl)
|
|
(cond
|
|
((and
|
|
(-> obj draw shadow)
|
|
(zero? (-> obj draw cur-lod))
|
|
(logtest? (-> obj draw status) 8)
|
|
)
|
|
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
|
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
|
)
|
|
0
|
|
(dummy-14 (-> obj draw shadow-ctrl))
|
|
)
|
|
(else
|
|
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
|
(logior! (-> v1-14 settings flags) 32)
|
|
)
|
|
0
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 32 of type warrior
|
|
(defmethod play-anim! warrior ((obj warrior) (arg0 symbol))
|
|
(with-pp
|
|
(set! (-> obj talk-message) (the-as uint 260))
|
|
(case (current-status (-> obj tasks))
|
|
(((task-status need-hint) (task-status need-introduction))
|
|
(if arg0
|
|
(close-status! (-> obj tasks) (task-status need-introduction))
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "warrior-introduction"
|
|
:index 6
|
|
:parts 29
|
|
:command-list
|
|
'(
|
|
((the binteger 125)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 260)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 574)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 918)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 1174)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 1174)
|
|
shadow
|
|
self
|
|
#f
|
|
)
|
|
((the binteger 1301)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 1301)
|
|
shadow
|
|
self
|
|
#t
|
|
)
|
|
((the binteger 2025)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 2322)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 2560) joint "cameraB")
|
|
)
|
|
)
|
|
)
|
|
(((task-status need-reminder))
|
|
(set! (-> obj skippable) #t)
|
|
(new 'static 'spool-anim
|
|
:name "warrior-reminder-1"
|
|
:index 7
|
|
:parts 3
|
|
:command-list '()
|
|
)
|
|
)
|
|
(((task-status need-reward-speech))
|
|
(cond
|
|
(arg0
|
|
(set! (-> obj cell-for-task) (current-task (-> obj tasks)))
|
|
(close-current! (-> obj tasks))
|
|
(send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc)))
|
|
(send-event
|
|
(-> (entity-by-type allpontoons) extra process)
|
|
'clone
|
|
(process->handle obj)
|
|
)
|
|
(dotimes (s5-2 (entity-actor-count (-> obj entity) 'alt-actor))
|
|
(entity-birth-no-kill
|
|
(entity-actor-lookup (-> obj entity) 'alt-actor s5-2)
|
|
)
|
|
(let ((s4-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> s4-2 from) pp)
|
|
(set! (-> s4-2 num-params) 0)
|
|
(set! (-> s4-2 message) 'die)
|
|
(let ((s3-0 send-event-function)
|
|
(v1-25 (entity-actor-lookup (-> obj entity) 'alt-actor s5-2))
|
|
)
|
|
(s3-0 (if v1-25
|
|
(-> v1-25 extra process)
|
|
)
|
|
s4-2
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(set! (-> obj will-talk) #t)
|
|
(set! (-> obj talk-message) (the-as uint 282))
|
|
)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "warrior-resolution"
|
|
:index 8
|
|
:parts 6
|
|
:command-list
|
|
'(
|
|
((the binteger 508)
|
|
blackout
|
|
(the binteger 10)
|
|
)
|
|
((the binteger 511) blackout 0)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(if arg0
|
|
(format
|
|
0
|
|
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
|
|
(-> obj name)
|
|
(task-status->string (current-status (-> obj tasks)))
|
|
)
|
|
)
|
|
(-> obj draw art-group data 5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 31 of type warrior
|
|
(defmethod get-art-elem warrior ((obj warrior))
|
|
(-> obj draw art-group data 5)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate play-anim (warrior)
|
|
:virtual #t
|
|
:exit
|
|
(behavior ()
|
|
(send-event (-> (entity-by-type allpontoons) extra process) 'end-mode)
|
|
((-> (method-of-type process-taskable play-anim) exit))
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 43 of type warrior
|
|
(defmethod TODO-RENAME-43 warrior ((obj warrior))
|
|
(when
|
|
(TODO-RENAME-10
|
|
(-> obj ambient)
|
|
(new 'stack-no-clear 'vector)
|
|
600
|
|
61440.0
|
|
obj
|
|
)
|
|
(let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
|
(f0-2 (+ -1.0 (the-as float v1-4)))
|
|
)
|
|
(cond
|
|
((< 0.66 f0-2)
|
|
(play-ambient (-> obj ambient) "WAR-LO1A" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.33 f0-2)
|
|
(play-ambient (-> obj ambient) "WAR-LO1B" #f (-> obj root-override trans))
|
|
)
|
|
(else
|
|
(play-ambient (-> obj ambient) "WAR-LO1C" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 41 of type warrior
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod initialize-collision warrior ((obj warrior) (arg0 int) (arg1 vector))
|
|
(let
|
|
((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
|
|
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
|
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
|
|
(set! (-> s4-0 collide-with) (the-as uint 16))
|
|
(set! (-> s4-0 prim-core action) (the-as uint 1))
|
|
(set! (-> s4-0 prim-core offense) 4)
|
|
(set-vector! (-> s4-0 local-sphere) -3072.0 8192.0 0.0 11264.0)
|
|
(dummy-46 s5-0)
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
|
|
(set! (-> s3-0 collide-with) (the-as uint 16))
|
|
(set! (-> s3-0 prim-core action) (the-as uint 1))
|
|
(set! (-> s3-0 prim-core offense) 4)
|
|
(set-vector! (-> s3-0 local-sphere) -2048.0 9216.0 0.0 8192.0)
|
|
)
|
|
(dummy-28 s4-0)
|
|
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
|
|
(set! (-> s3-1 collide-with) (the-as uint 16))
|
|
(set! (-> s3-1 prim-core action) (the-as uint 1))
|
|
(set! (-> s3-1 prim-core offense) 4)
|
|
(set-vector! (-> s3-1 local-sphere) 0.0 2048.0 0.0 4096.0)
|
|
)
|
|
(dummy-28 s4-0)
|
|
)
|
|
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
|
(dummy-50 s5-0)
|
|
(set! (-> obj root-override) s5-0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 11 of type warrior
|
|
(defmethod init-from-entity! warrior ((obj warrior) (arg0 entity-actor))
|
|
(dummy-40
|
|
obj
|
|
arg0
|
|
*warrior-sg*
|
|
3
|
|
33
|
|
(new 'static 'vector :y -4096.0 :w 10240.0)
|
|
5
|
|
)
|
|
(set! (-> obj tasks) (get-task-control (game-task village2-warrior-money)))
|
|
(set! (-> obj sound-flava) (the-as uint 15))
|
|
(set! (-> obj draw light-index) (the-as uint 3))
|
|
(dummy-42 obj)
|
|
(none)
|
|
)
|