Files
jak-project/test/decompiler/reference/jak2/levels/undefined/ruf-task_REF.gc
T
Hat Kid a857061e96 jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321)
There are *a lot* of file changes and while I have carefully gone
through every gsrc change to fix up manual patches, there might still be
spots that I missed.
2023-03-14 22:57:31 -04:00

260 lines
9.3 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type ruft-wait-spot
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! ruft-wait-spot ((obj ruft-wait-spot))
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ruft-wait-spot
(defmethod ai-task-method-11 ruft-wait-spot ((obj ruft-wait-spot) (arg0 bot))
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
(if (and (not (outside-spot-radius? arg0 s3-0 (the-as vector #f) #f)) (player-blocking-spot? arg0 s3-0))
(set! s4-0 -1)
)
)
)
(when (< s4-0 0)
(set! s4-0 (choose-spot arg0 (the-as int (-> obj num-spots)) (the-as (pointer uint) (-> obj spot-indexes))))
(set! (-> obj which-spot) s4-0)
(mem-copy!
(the-as pointer (-> arg0 spot))
(the-as pointer (-> arg0 course spots (-> obj spot-indexes s4-0)))
20
)
)
(if (logtest? *display-bot-marks* (bot-marks-controls bmc16))
(bot-debug-draw-spot-sphere
arg0
(the-as int (-> obj num-spots))
(the-as (pointer uint) (-> obj spot-indexes))
(the-as int (-> obj spot-indexes s4-0))
)
)
)
(when (not ((-> obj check-done) obj (the-as ruffian arg0)))
(let ((a1-10 (handle->process (-> arg0 focus handle))))
(when (and a1-10
(= (-> arg0 focus aware) (enemy-aware enemy-aware-3))
(attacked-by-player? arg0 (the-as process-focusable a1-10))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> arg0 ai-ctrl) ruft-fight-focus arg0)
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
)
)
)
(none)
)
;; definition for method 11 of type ruft-fight-focus
(defmethod ai-task-method-11 ruft-fight-focus ((obj ruft-fight-focus) (arg0 bot))
(let ((a1-1 (handle->process (-> arg0 focus handle))))
(if (and a1-1
(= (-> arg0 focus aware) (enemy-aware enemy-aware-3))
(attacked-by-player? arg0 (the-as process-focusable a1-1))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(logior! (-> arg0 bot-flags) (bot-flags bf00))
(ai-task-control-method-14 (-> arg0 ai-ctrl) obj arg0)
)
)
(none)
)
;; definition for method 10 of type ruft-fight-focus
;; WARN: Return type mismatch bot-flags vs none.
(defmethod ai-task-method-10 ruft-fight-focus ((obj ruft-fight-focus) (arg0 bot))
(logclear! (-> arg0 bot-flags) (bot-flags bf00))
(none)
)
;; definition for method 13 of type ruft-choose-jump
(defmethod ruft-choose-jump-method-13 ruft-choose-jump ((obj ruft-choose-jump) (arg0 ruffian))
(let ((gp-0 0))
(let ((f30-0 -1.0)
(s3-0 (-> arg0 root-override2 trans))
)
(countdown (s2-0 (-> obj num-spots))
(let* ((s1-0 (-> arg0 ruf-course spots (-> obj src-spot-indexes s2-0)))
(f28-0 (vector-vector-xz-distance s3-0 (-> s1-0 center)))
)
(when (and (or (< f30-0 0.0) (< f28-0 f30-0))
(and (not (player-blocking-spot? arg0 s1-0))
(not (player-blocking-spot? arg0 (-> arg0 ruf-course spots (-> obj dest-spot-indexes s2-0))))
)
)
(set! f30-0 f28-0)
(set! gp-0 (the-as int s2-0))
)
)
)
)
gp-0
)
)
;; definition for method 12 of type ruft-choose-jump
(defmethod ruft-choose-jump-method-12 ruft-choose-jump ((obj ruft-choose-jump) (arg0 ruffian))
(let ((a1-5 (-> arg0 ruf-course spots (-> obj src-spot-indexes (-> obj which-spot))))
(s5-0 (-> arg0 ruf-course spots (-> obj dest-spot-indexes (-> obj which-spot))))
)
(when (and (outside-spot-radius? arg0 a1-5 (the-as vector #f) #f) (not (player-blocking-spot? arg0 s5-0)))
(let ((v1-9 (-> arg0 nav)))
(set! (-> v1-9 target-speed) 0.0)
)
0
(set! (-> arg0 enemy-flags) (the-as enemy-flag (logclear (-> arg0 enemy-flags) (enemy-flag vulnerable))))
(when (send-event arg0 'jump 0 (-> s5-0 center))
(mem-copy! (the-as pointer (-> arg0 spot)) (the-as pointer s5-0) 20)
#t
)
)
)
)
;; definition for method 9 of type ruft-choose-jump
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! ruft-choose-jump ((obj ruft-choose-jump))
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ruft-choose-jump
;; WARN: Return type mismatch symbol vs none.
(defmethod ai-task-method-11 ruft-choose-jump ((obj ruft-choose-jump) (arg0 bot))
(let ((s4-0 (-> obj which-spot)))
(when (or (< s4-0 0)
(player-blocking-spot? arg0 (-> arg0 course spots (-> obj src-spot-indexes s4-0)))
(player-blocking-spot? arg0 (-> arg0 course spots (-> obj dest-spot-indexes s4-0)))
)
(set! s4-0 (ruft-choose-jump-method-13 obj (the-as ruffian arg0)))
(set! (-> obj which-spot) s4-0)
(mem-copy!
(the-as pointer (-> arg0 spot))
(the-as pointer (-> arg0 course spots (-> obj src-spot-indexes s4-0)))
20
)
(send-event
(ppointer->process (-> arg0 my-simple-focus))
'move-trans
(-> arg0 course spots (-> obj dest-spot-indexes s4-0))
)
(set! (-> arg0 poi-handle) (ppointer->handle (-> arg0 my-simple-focus)))
)
(when (logtest? *display-bot-marks* (bot-marks-controls bmc16))
(bot-debug-draw-spot-sphere
arg0
(the-as int (-> obj num-spots))
(the-as (pointer uint) (-> obj src-spot-indexes))
(the-as int (-> obj src-spot-indexes s4-0))
)
(bot-debug-draw-spot-sphere
arg0
(the-as int (-> obj num-spots))
(the-as (pointer uint) (-> obj dest-spot-indexes))
(the-as int (-> obj dest-spot-indexes s4-0))
)
)
)
((-> obj check-done) obj (the-as ruffian arg0))
(none)
)
;; definition for method 10 of type ruft-choose-jump
(defmethod ai-task-method-10 ruft-choose-jump ((obj ruft-choose-jump) (arg0 bot))
(clear-poi-and-focus! arg0)
(none)
)
;; definition for method 9 of type ruft-plant-bomb
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! ruft-plant-bomb ((obj ruft-plant-bomb))
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ruft-plant-bomb
(defmethod ai-task-method-11 ruft-plant-bomb ((obj ruft-plant-bomb) (arg0 bot))
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj stand-spot-indexes s4-0))))
(if (and (not (outside-spot-radius? arg0 s3-0 (the-as vector #f) #f)) (player-blocking-spot? arg0 s3-0))
(set! s4-0 -1)
)
)
)
(when (< s4-0 0)
(set! s4-0
(choose-spot arg0 (the-as int (-> obj num-spots)) (the-as (pointer uint) (-> obj stand-spot-indexes)))
)
(set! (-> obj which-spot) s4-0)
(mem-copy!
(the-as pointer (-> arg0 spot))
(the-as pointer (-> arg0 course spots (-> obj stand-spot-indexes s4-0)))
20
)
(send-event
(ppointer->process (-> arg0 my-simple-focus))
'move-trans
(-> arg0 course spots (-> obj face-spot-indexes s4-0))
)
)
(set! (-> arg0 poi-handle) (ppointer->handle (-> arg0 my-simple-focus)))
(if (and (outside-spot-radius? arg0 (the-as bot-spot #f) (the-as vector #f) #f)
(and (enemy-method-95 arg0 (the-as vector (-> arg0 course spots (-> obj face-spot-indexes s4-0))) 10012.445)
(not (logtest? (bot-flags bf21) (-> arg0 bot-flags)))
)
)
(set! (-> arg0 bot-flags) (logior (bot-flags bf20) (-> arg0 bot-flags)))
(logclear! (-> arg0 bot-flags) (bot-flags bf20))
)
(when (logtest? *display-bot-marks* (bot-marks-controls bmc16))
(bot-debug-draw-spot-sphere
arg0
(the-as int (-> obj num-spots))
(the-as (pointer uint) (-> obj stand-spot-indexes))
(the-as int (-> obj stand-spot-indexes s4-0))
)
(bot-debug-draw-spot-sphere
arg0
(the-as int (-> obj num-spots))
(the-as (pointer uint) (-> obj face-spot-indexes))
(the-as int (-> obj face-spot-indexes s4-0))
)
)
)
(when (not ((-> obj check-done) obj (the-as ruffian arg0)))
(let ((a1-17 (handle->process (-> arg0 focus handle))))
(when (and a1-17
(= (-> arg0 focus aware) (enemy-aware enemy-aware-3))
(attacked-by-player? arg0 (the-as process-focusable a1-17))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> arg0 ai-ctrl) ruft-fight-focus arg0)
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
)
)
)
(none)
)
;; definition for method 10 of type ruft-plant-bomb
(defmethod ai-task-method-10 ruft-plant-bomb ((obj ruft-plant-bomb) (arg0 bot))
(clear-poi-and-focus! arg0)
(none)
)