mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 21:28:00 -04:00
undo changes to goalsrc
This commit is contained in:
+52
-52
@@ -3,11 +3,11 @@
|
||||
|
||||
;; definition for method 7 of type process-taskable
|
||||
;; WARN: Return type mismatch process-focusable vs process-taskable.
|
||||
(defmethod relocate process-taskable ((obj process-taskable) (arg0 int))
|
||||
(if (nonzero? (-> obj task))
|
||||
(&+! (-> obj task) arg0)
|
||||
(defmethod relocate process-taskable ((this process-taskable) (arg0 int))
|
||||
(if (nonzero? (-> this task))
|
||||
(&+! (-> this task) arg0)
|
||||
)
|
||||
(the-as process-taskable ((method-of-type process-focusable relocate) obj arg0))
|
||||
(the-as process-taskable ((method-of-type process-focusable relocate) this arg0))
|
||||
)
|
||||
|
||||
;; definition for function process-taskable-anim-loop
|
||||
@@ -34,38 +34,38 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
|
||||
;; definition for method 34 of type process-taskable
|
||||
(defmethod process-taskable-method-34 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-34 process-taskable ((this process-taskable))
|
||||
#t
|
||||
)
|
||||
|
||||
;; definition for method 35 of type process-taskable
|
||||
;; WARN: Return type mismatch art-joint-anim vs art-element.
|
||||
(defmethod get-art-elem process-taskable ((obj process-taskable))
|
||||
(defmethod get-art-elem process-taskable ((this process-taskable))
|
||||
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
|
||||
@returns the appropriate [[art-element]] for the given NPC"
|
||||
(the-as art-element (if (> (-> obj skel active-channels) 0)
|
||||
(-> obj skel root-channel 0 frame-group)
|
||||
(the-as art-element (if (> (-> this skel active-channels) 0)
|
||||
(-> this skel root-channel 0 frame-group)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 36 of type process-taskable
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod process-taskable-method-36 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-36 process-taskable ((this process-taskable))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 37 of type process-taskable
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod process-taskable-method-37 process-taskable ((obj process-taskable))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(defmethod process-taskable-method-37 process-taskable ((this process-taskable))
|
||||
(let ((v1-1 (-> this draw shadow-ctrl)))
|
||||
(cond
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-control-status on-screen))
|
||||
((and (-> this draw shadow)
|
||||
(zero? (-> this draw cur-lod))
|
||||
(logtest? (-> this draw status) (draw-control-status on-screen))
|
||||
)
|
||||
(shadow-control-method-13 v1-1 (-> obj draw origin) -4096.0 4096.0 32768.0)
|
||||
(shadow-control-method-13 v1-1 (-> this draw origin) -4096.0 4096.0 32768.0)
|
||||
)
|
||||
(else
|
||||
(logior! (-> v1-1 settings flags) (shadow-flags disable-draw))
|
||||
@@ -90,7 +90,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (current-time))
|
||||
(set-time! (-> self state-time))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw-bounds))
|
||||
(let ((v1-6 (-> self root root-prim)))
|
||||
(set! (-> v1-6 prim-core collide-as) (collide-spec))
|
||||
@@ -109,7 +109,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
(let ((v1-1 (get-current-task-event (-> self task))))
|
||||
(if (and (nonzero? (-> v1-1 action)) (or (not (logtest? (-> self draw status) (draw-control-status on-screen)))
|
||||
(logtest? (-> v1-1 flags) (game-task-flags gatflag-01))
|
||||
(< (- (current-time) (-> self birth-time)) (seconds 0.1))
|
||||
(not (time-elapsed? (-> self birth-time) (seconds 0.1)))
|
||||
)
|
||||
)
|
||||
(go-virtual idle)
|
||||
@@ -146,7 +146,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (current-time))
|
||||
(set-time! (-> self state-time))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self draw status) (draw-control-status no-draw))
|
||||
@@ -199,7 +199,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
(< (vector-vector-distance (target-pos 0) s5-0) f30-0)
|
||||
)
|
||||
)
|
||||
(< (- (current-time) (-> self want-to-say)) (seconds 4))
|
||||
(not (time-elapsed? (-> self want-to-say) (seconds 4)))
|
||||
)
|
||||
(or (not (load-in-progress? *level*)) (= (-> gp-0 action) (game-task-action say)))
|
||||
(and (not (movie?))
|
||||
@@ -219,7 +219,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
(process-taskable-method-34 self)
|
||||
)
|
||||
(when (or (= (-> gp-0 action) (game-task-action say)) (< (- (current-time) (-> self want-to-say)) (seconds 4)))
|
||||
(when (or (= (-> gp-0 action) (game-task-action say)) (not (time-elapsed? (-> self want-to-say) (seconds 4))))
|
||||
(case (-> gp-0 action)
|
||||
(((game-task-action play))
|
||||
(go-virtual play-game gp-0)
|
||||
@@ -245,7 +245,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
(let ((v1-86 s5-1))
|
||||
(set! (-> v1-86 scale) 0.9)
|
||||
)
|
||||
(set! (-> s5-1 flags) (font-flags shadow kerning left large))
|
||||
(set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large))
|
||||
(print-game-text (lookup-text! *common-text* (-> self talk-message) #f) s5-1 #f 44 (bucket-id progress))
|
||||
)
|
||||
(when (cpad-pressed? 0 triangle)
|
||||
@@ -295,7 +295,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
:exit (behavior ()
|
||||
(set! (-> self last-talk) (-> *display* game-clock frame-counter))
|
||||
(if (< (- (current-time) (-> self want-to-say)) (seconds 4))
|
||||
(if (not (time-elapsed? (-> self want-to-say) (seconds 4)))
|
||||
(set! (-> self will-talk) #t)
|
||||
(set! (-> self will-talk) #f)
|
||||
)
|
||||
@@ -335,7 +335,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
:exit (-> (method-of-type process-taskable active) exit)
|
||||
:code (behavior ((arg0 game-task-event))
|
||||
(let ((gp-0 (current-time)))
|
||||
(until (>= (- (current-time) gp-0) (seconds 0.5))
|
||||
(until (time-elapsed? gp-0 (seconds 0.5))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -346,8 +346,8 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
|
||||
;; definition for method 31 of type process-taskable
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod process-taskable-method-31 process-taskable ((obj process-taskable))
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(defmethod process-taskable-method-31 process-taskable ((this process-taskable))
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
|
||||
(set! (-> s5-0 total-prims) (the-as uint 4))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-spec civilian))
|
||||
@@ -379,7 +379,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
(set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as))
|
||||
(set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with))
|
||||
)
|
||||
(set! (-> obj root) s5-0)
|
||||
(set! (-> this root) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -387,27 +387,27 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
|
||||
;; definition for method 32 of type process-taskable
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod process-taskable-method-32 process-taskable ((obj process-taskable))
|
||||
(logior! (-> obj skel status) (joint-control-status eye-anim))
|
||||
(set! (-> obj talk-message) (text-id press-triangle-to-talk))
|
||||
(set! (-> obj bounce-away) #t)
|
||||
(set! (-> obj will-talk) #t)
|
||||
(set! (-> obj look-at-me) #t)
|
||||
(set! (-> obj hide-during-movie) #t)
|
||||
(set! (-> obj neck-joint-index) -1)
|
||||
(set! (-> obj talk-distance) (res-lump-float (-> obj entity) 'distance :default 32768.0))
|
||||
(set! (-> obj talk-height) (res-lump-float (-> obj entity) 'height :default 8192.0))
|
||||
(set! (-> obj slave) (the-as handle #f))
|
||||
(set! (-> obj draw shadow-ctrl)
|
||||
(defmethod process-taskable-method-32 process-taskable ((this process-taskable))
|
||||
(logior! (-> this skel status) (joint-control-status eye-anim))
|
||||
(set! (-> this talk-message) (text-id press-triangle-to-talk))
|
||||
(set! (-> this bounce-away) #t)
|
||||
(set! (-> this will-talk) #t)
|
||||
(set! (-> this look-at-me) #t)
|
||||
(set! (-> this hide-during-movie) #t)
|
||||
(set! (-> this neck-joint-index) -1)
|
||||
(set! (-> this talk-distance) (res-lump-float (-> this entity) 'distance :default 32768.0))
|
||||
(set! (-> this talk-height) (res-lump-float (-> this entity) 'height :default 8192.0))
|
||||
(set! (-> this slave) (the-as handle #f))
|
||||
(set! (-> this draw shadow-ctrl)
|
||||
(new 'process 'shadow-control 0.0 0.0 614400.0 (shadow-flags shdf02 shdf03 shdf04 disable-draw) 245760.0)
|
||||
)
|
||||
(let ((s5-0 0))
|
||||
(let ((v1-15 (the-as joint (get-art-by-name-method (-> obj draw jgeo) "main" (the-as type #f)))))
|
||||
(let ((v1-15 (the-as joint (get-art-by-name-method (-> this draw jgeo) "main" (the-as type #f)))))
|
||||
(if v1-15
|
||||
(set! s5-0 (+ (-> v1-15 number) 1))
|
||||
)
|
||||
)
|
||||
(let ((v1-19 (the-as collide-shape-prim-group (-> obj root root-prim))))
|
||||
(let ((v1-19 (the-as collide-shape-prim-group (-> this root root-prim))))
|
||||
(set! (-> v1-19 transform-index) s5-0)
|
||||
(dotimes (a0-7 (the-as int (-> v1-19 num-children)))
|
||||
(set! (-> v1-19 child a0-7 transform-index) s5-0)
|
||||
@@ -420,7 +420,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
|
||||
;; definition for method 33 of type process-taskable
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-art! process-taskable ((obj process-taskable))
|
||||
(defmethod init-art! process-taskable ((this process-taskable))
|
||||
"@see [[initialize-skeleton]]"
|
||||
0
|
||||
(none)
|
||||
@@ -428,29 +428,29 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
|
||||
;; definition for method 11 of type process-taskable
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! process-taskable ((obj process-taskable) (arg0 entity-actor))
|
||||
(defmethod init-from-entity! process-taskable ((this process-taskable) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(stack-size-set! (-> obj main-thread) 512)
|
||||
(process-taskable-method-31 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(set! (-> obj task)
|
||||
(stack-size-set! (-> this main-thread) 512)
|
||||
(process-taskable-method-31 this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(set! (-> this task)
|
||||
(new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0))
|
||||
)
|
||||
(init-art! obj)
|
||||
(process-taskable-method-32 obj)
|
||||
(init-art! this)
|
||||
(process-taskable-method-32 this)
|
||||
(when (logtest? #x1000000 (res-lump-value arg0 'options uint128 :time -1000000000.0))
|
||||
(let* ((s5-1 *level*)
|
||||
(s4-2 (method-of-object s5-1 art-group-get-by-name))
|
||||
)
|
||||
(format (clear *temp-string*) "skel-~S" (-> obj draw art-group name))
|
||||
(format (clear *temp-string*) "skel-~S" (-> this draw art-group name))
|
||||
(let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer uint32) #f))))
|
||||
(when s4-3
|
||||
(let ((s5-2 (process-spawn manipy :init manipy-init (-> obj root trans) (-> obj entity) s4-3 #f 0 :to obj)))
|
||||
(let ((s5-2 (process-spawn manipy :init manipy-init (-> this root trans) (-> this entity) s4-3 #f 0 :to this)))
|
||||
(send-event (ppointer->process s5-2) 'anim-mode 'mirror)
|
||||
(send-event (ppointer->process s5-2) 'mirror #t)
|
||||
)
|
||||
@@ -458,7 +458,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
|
||||
(go (method-of-object obj hide))
|
||||
(set! (-> this event-hook) (-> (method-of-object this idle) event))
|
||||
(go (method-of-object this hide))
|
||||
(none)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user