Files
jak-project/test/decompiler/reference/levels/common/babak_REF.gc
T
ManDude a7eee4fdc9 [game] pc port progress menu (#1281)
* fix typo

* more typo

* shorten discord rpc text

* allow expanding enums after the fact (untested)

* make `game_text` work similar to subtitles

* update progress decomp

* update some types + `do-not-decompile` in bitfield

* fixes and fall back to original progress code

* update `progress` decomp with new enums

* update config files

* fix enums and debug menu

* always allocate (but not use) a lot of particles

* small rework to display mode options

* revert resolution/aspect-ratio symbol mess

* begin the override stuff

* make `progress-draw` more readable

* more fixes

* codacy good boy points

* first step overriding code

* finish progress overrides, game options menu fully functional!

* minor fixes

* Update game.gp

* Update sparticle-launcher.gc

* clang

* change camera controls text

* oops

* some cleanup

* derp

* nice job

* implement menu scrolling lol

* make scrollable menus less cramped, fix arrows

* make some carousell things i guess

* add msaa carousell to test

* oops

* Update progress-pc.gc

* make `pc-get-screen-size` (untested)

* resolution menu

* input fixes

* return when selecting resolution

* scroll fixes

* Update progress-pc.gc

* add "fit to screen" button

* bug

* complete resolutions menu

* aspect ratio menu

* subtitles language

* subtitle speaker

* final adjustments

* ref test

* fix tests

* fix ref!

* reduce redundancy a bit

* fix mem leaks?

* save settings on progress exit

* fix init reorder

* remove unused code

* rename goal project-like files to the project extension

* sha display toggle

* aspect ratio settings fixes

* dont store text db's in compiler

* properly save+load native aspect stuff
2022-04-11 18:38:54 -04:00

481 lines
19 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type babak
(deftype babak (nav-enemy)
()
:heap-base #x120
:method-count-assert 76
:size-assert #x190
:flag-assert #x4c01200190
(:states
babak-run-to-cannon
)
)
;; definition for method 3 of type babak
(defmethod inspect babak ((obj babak))
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(defskelgroup *babak-sg* babak
0
-1
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 2 0 3)
:longest-edge (meters 1)
:shadow 4
)
;; failed to figure out what this is:
(defstate nav-enemy-patrol (babak)
:virtual #t
:code
(behavior ()
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 10)
)
(ja-channel-push! 1 45)
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 6)))
(set! (-> gp-0 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 6)) data 0 length) -1))
)
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) (ja-aframe 12.0 0))
(joint-control-channel-group! gp-0 (the-as art-joint-anim (-> self draw art-group data 6)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group data 0 length) -1)))
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
(else
(ja-channel-push! 1 60)
)
)
((the-as (function none) (-> (method-of-type nav-enemy nav-enemy-patrol) code)))
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (babak)
:virtual #t
:code
(behavior ()
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 14)
)
(let ((a0-5 (-> self skel root-channel 0)))
(set! (-> a0-5 param 0) (the float (+ (-> a0-5 frame-group data 0 length) -1)))
(set! (-> a0-5 param 1) 1.0)
(joint-control-channel-group! a0-5 (the-as art-joint-anim #f) num-func-seek!)
)
(ja-channel-push! 1 51)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 frame-group) (the-as art-joint-anim (-> self draw art-group data (-> self nav-info run-anim))))
(set! (-> a0-7 param 0)
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self nav-info run-anim))) data 0 length) -1)
)
)
(set! (-> a0-7 param 1) f30-0)
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim (-> self draw art-group data (-> self nav-info run-anim)))
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(let ((a0-8 (-> self skel root-channel 0)))
(set! (-> a0-8 param 0) (the float (+ (-> a0-8 frame-group data 0 length) -1)))
(set! (-> a0-8 param 1) f30-0)
(joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
(else
(ja-channel-push! 1 60)
(let ((v1-42 (-> self skel root-channel 0)))
(set! (-> v1-42 frame-group)
(the-as art-joint-anim (-> self draw art-group data (-> self nav-info run-anim)))
)
)
(let ((v1-45 (-> self skel root-channel 0)))
(set! (-> v1-45 num-func) num-func-identity)
(set! (-> v1-45 frame-num) 0.0)
)
)
)
(while #t
(suspend)
(let ((a0-17 (-> self skel root-channel 0)))
(set! (-> a0-17 param 0) f30-0)
(joint-control-channel-group-eval! a0-17 (the-as art-joint-anim #f) num-func-loop!)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (babak)
:virtual #t
:code
(behavior ()
(set! (-> self turn-time) (seconds 0.2))
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
(when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
)
(ja-channel-push! 1 30)
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
(set! (-> gp-0 param 0) (ja-aframe 68.0 0))
(set! (-> gp-0 param 1) f30-0)
(set! (-> gp-0 frame-num) 0.0)
(joint-control-channel-group! gp-0 (the-as art-joint-anim (-> self draw art-group data 11)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 param 0) (ja-aframe 68.0 0))
(set! (-> gp-1 param 1) f30-0)
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
(while #t
(when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(let ((a0-9 (-> self skel root-channel 0)))
(set! (-> a0-9 param 0) 1.0)
(joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-loop!)
)
(ja-channel-push! 1 60)
(let ((v1-25 (-> self skel root-channel 0)))
(set! (-> v1-25 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
)
(let ((v1-28 (-> self skel root-channel 0)))
(set! (-> v1-28 num-func) num-func-identity)
(set! (-> v1-28 frame-num) 0.0)
)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(let ((a0-15 (-> self skel root-channel 0)))
(set! (-> a0-15 param 0) 0.75)
(joint-control-channel-group-eval! a0-15 (the-as art-joint-anim #f) num-func-loop!)
)
)
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
)
(if (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 5)
)
)
(ja-channel-push! 1 60)
)
(let ((a0-23 (-> self skel root-channel 0)))
(set! (-> a0-23 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
(set! (-> a0-23 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1))
)
(set! (-> a0-23 param 1) f30-0)
(set! (-> a0-23 frame-num) 0.0)
(joint-control-channel-group! a0-23 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-24 (-> self skel root-channel 0)))
(set! (-> a0-24 param 0) (the float (+ (-> a0-24 frame-group data 0 length) -1)))
(set! (-> a0-24 param 1) f30-0)
(joint-control-channel-group-eval! a0-24 (the-as art-joint-anim #f) num-func-seek!)
)
)
(when (nav-enemy-rnd-percent? 0.3)
(ja-channel-push! 1 30)
(let ((gp-2 (-> self skel root-channel 0)))
(set! (-> gp-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
(set! (-> gp-2 param 0) (ja-aframe 68.0 0))
(set! (-> gp-2 param 1) f30-0)
(set! (-> gp-2 frame-num) 0.0)
(joint-control-channel-group! gp-2 (the-as art-joint-anim (-> self draw art-group data 11)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((gp-3 (-> self skel root-channel 0)))
(set! (-> gp-3 param 0) (ja-aframe 68.0 0))
(set! (-> gp-3 param 1) f30-0)
(joint-control-channel-group-eval! gp-3 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (babak)
:virtual #t
:code
(behavior ()
(set! (-> self rotate-speed) 218453.33)
(set! (-> self turn-time) (seconds 0.5))
(ja-channel-push! 1 45)
(let ((s4-0 (-> self collide-info))
(s5-0 (target-pos 0))
)
(when (< (fabs
(deg-diff (y-angle s4-0) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans))))
)
12743.111
)
(let ((a0-6 (-> self skel root-channel 0)))
(set! (-> a0-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 9)))
(set! (-> a0-6 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 9)) data 0 length) -1))
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 9)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group data 0 length) -1)))
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
)
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
(nav-enemy-get-new-patrol-point)
(let ((a0-12 (-> self skel root-channel 0)))
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 10)))
(set! (-> a0-12 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 10)) data 0 length) -1))
)
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group! a0-12 (the-as art-joint-anim (-> self draw art-group data 10)) num-func-seek!)
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self collide-info)
(-> self nav destination-pos)
(-> self rotate-speed)
(-> self turn-time)
)
(suspend)
(let ((a0-14 (-> self skel root-channel 0)))
(set! (-> a0-14 param 0) (the float (+ (-> a0-14 frame-group data 0 length) -1)))
(set! (-> a0-14 param 1) 1.0)
(joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-jump-land (babak)
:virtual #t
:code
(behavior ()
(let ((a0-0 (-> self skel root-channel 0)))
(set! (-> a0-0 param 0) (the float (+ (-> a0-0 frame-group data 0 length) -1)))
(set! (-> a0-0 param 1) 1.0)
(joint-control-channel-group! a0-0 (the-as art-joint-anim #f) num-func-seek!)
)
(ja-channel-push! 1 22)
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data (-> self nav-info jump-land-anim)))
)
(set! (-> gp-0 param 0) (ja-aframe 32.0 0))
(set! (-> gp-0 param 1) 0.5)
(set! (-> gp-0 frame-num) 0.0)
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data (-> self nav-info jump-land-anim)))
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 param 0) (ja-aframe 32.0 0))
(set! (-> gp-1 param 1) 0.5)
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
)
)
(go-virtual nav-enemy-chase)
(none)
)
)
;; definition for symbol *babak-nav-enemy-info*, type nav-enemy-info
(define *babak-nav-enemy-info* (new 'static 'nav-enemy-info
:idle-anim 5
:walk-anim 6
:turn-anim 16
:notice-anim 7
:run-anim 8
:jump-anim 13
:jump-land-anim 14
:victory-anim 11
:taunt-anim 11
:die-anim 12
:neck-joint 5
:player-look-at-joint 5
:run-travel-speed (meters 6)
:run-rotate-speed (degrees 2880.0)
:run-acceleration (meters 1)
:run-turn-time (seconds 0.1)
:walk-travel-speed (meters 3)
:walk-rotate-speed (degrees 720.0)
:walk-acceleration (meters 1)
:walk-turn-time (seconds 0.5)
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:shadow-size (meters 2)
:notice-nav-radius (meters 2)
:nav-nearest-y-threshold (meters 10)
:notice-distance (meters 30)
:proximity-notice-distance (meters 20)
:stop-chase-distance (meters 40)
:frustration-distance (meters 8)
:frustration-time (seconds 4)
:die-anim-hold-frame 24.0
:jump-anim-start-frame 10.0
:jump-land-anim-end-frame 10000000000.0
:jump-height-min (meters 3)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:use-align #t
:draw-shadow #t
:move-to-ground #t
:hover-if-no-ground #f
:use-momentum #f
:use-flee #t
:use-proximity-notice #t
:use-jump-blocked #t
:use-jump-patrol #f
:gnd-collide-with (collide-kind background)
:debug-draw-neck #f
:debug-draw-jump #f
)
)
;; definition for method 47 of type babak
;; INFO: Return type mismatch int vs none.
(defmethod initialize-collision babak ((obj babak))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
(set! (-> s4-0 prim-core collide-as) (collide-kind enemy))
(set! (-> s4-0 collide-with) (collide-kind target))
(set! (-> s4-0 prim-core action) (collide-action solid))
(set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0)
(set-root-prim! s5-0 s4-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (collide-kind enemy))
(set! (-> s3-0 collide-with) (collide-kind target))
(set! (-> s3-0 prim-core action) (collide-action solid))
(set! (-> s3-0 prim-core offense) (collide-offense touch))
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 3072.0)
(append-prim s4-0 s3-0)
)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (collide-kind enemy))
(set! (-> s3-1 collide-with) (collide-kind target))
(set! (-> s3-1 prim-core action) (collide-action solid))
(set! (-> s3-1 prim-core offense) (collide-offense touch))
(set-vector! (-> s3-1 local-sphere) 0.0 9830.4 0.0 3072.0)
(append-prim s4-0 s3-1)
)
(let ((s3-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-2 prim-core collide-as) (collide-kind enemy))
(set! (-> s3-2 collide-with) (collide-kind target))
(set! (-> s3-2 prim-core offense) (collide-offense normal-attack))
(set! (-> s3-2 transform-index) 6)
(set-vector! (-> s3-2 local-sphere) 0.0 0.0 0.0 2048.0)
(append-prim s4-0 s3-2)
)
)
(set! (-> s5-0 nav-radius) 6144.0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)
0
(none)
)
;; definition for method 48 of type babak
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 babak ((obj babak))
(initialize-skeleton obj *babak-sg* '())
(TODO-RENAME-45 obj *babak-nav-enemy-info*)
(set! (-> obj neck up) (the-as uint 0))
(set! (-> obj neck nose) (the-as uint 1))
(set! (-> obj neck ear) (the-as uint 2))
0
(none)
)
;; definition for method 59 of type babak
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-59 babak ((obj babak))
(cond
((and (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
(logtest? (-> obj enemy-info options) (fact-options has-power-cell))
)
(go (method-of-object obj nav-enemy-fuel-cell))
)
((logtest? (-> obj enemy-info options) (fact-options fop5))
(go (method-of-object obj nav-enemy-wait-for-cue))
)
(else
(go (method-of-object obj nav-enemy-idle))
)
)
0
(none)
)