mirror of
https://github.com/open-goal/jak-project
synced 2026-08-31 09:41:05 -04:00
dd959d0d0d
* decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)` * decomp: almost finish `process-taskable` * blocked: mistycannon / pelican * decomp: finish `babak-with-cannon` write a script to fix gsrc * decomp: finish `process-taskable` * decomp: finish `flutflut` and `yakow` * decomp: finish `fishermans-boat` * blocked: state decomp `training-obs` * decomp: finish `muse` * decomp: finish `bonelurker` * blocked: state decomp in `quicksandlurker`| `balloonlurker` * decomp: finish `assistant-village2` * scripts: script to help updating goal_src * starting to update goal_src * tests: update ref tests * src: more src updating * src: waiting on `process-taskable` and `muse` * blocked: `citb-plat` state decomp * decomp: finish `square-platform` * blocked: `orbit-plat` due to overlays + static data * decomp: finish `qbert-plat` * blocked: almost finish `misty-conveyor`, sparticle-callback * blocked: jungle-mirrors * blocked: state decomp in `swamp-blimp` * decomp: finish `swamp-bat` * decomp: finish `swamp-rat` * decomp: finish `swamp-rat-nest` * blocked: state decomp `kermit` * decomp: finish `cavecrystal-light` * decomp: finish `spiderwebs` * blocked: state decomp `dark-crystal` * decomp: finish `baby-spider` * decomp: finish `mother-spider-h` * decomp: finish `mother-spider-proj` * blocked: state decomp in `gnawer` * blocked: state decomp in `driller-lurker` * blocked: `sun-exit-chamber` breaks when adding handle cast * decomp: finish `sunken-water` * blocked: `target-tube` ShortCircuitElement::push_to_stack * decomp: finish `sunken-fish` * blocked: `minecart` decomp crash when adding stack cast * decomp: finish `assistant-village3` * decomp: finish `sage-village3` * blocked: `cave-trap` done but ran into `go` issue * blocked: `spider-egg` state decomp * decomp: finish `target-snowball` * blocked/stuck: `target-ice` decomp issue around cpad * pausing: ice-cube has some weird collide-shape-prim handling * blocked: `snow-ball` state decomp * blocked: `snow-bumper` state decomp * decomp: finish `snow-ram-h` * decomp: finish `yeti` * decomp: finish `assistant-lavatube` * re-enable the float cast log * decomp: updating to new sparticle definitions * decomp: address feedback up to `swamp-rat-nest` * address remaining feedback * all-types: move the `pointer` def * add back temporary `hud-hidden?`
170 lines
4.4 KiB
Common Lisp
Vendored
170 lines
4.4 KiB
Common Lisp
Vendored
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type snowball-info
|
|
(deftype snowball-info (basic)
|
|
((entity basic :offset-assert 4)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x8
|
|
:flag-assert #x900000008
|
|
)
|
|
|
|
;; definition for method 3 of type snowball-info
|
|
(defmethod inspect snowball-info ((obj snowball-info))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tentity: ~A~%" (-> obj entity))
|
|
obj
|
|
)
|
|
|
|
;; definition of type snowball-bank
|
|
(deftype snowball-bank (basic)
|
|
()
|
|
:method-count-assert 9
|
|
:size-assert #x4
|
|
:flag-assert #x900000004
|
|
)
|
|
|
|
;; definition for method 3 of type snowball-bank
|
|
(defmethod inspect snowball-bank ((obj snowball-bank))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *SNOWBALL-bank*, type snowball-bank
|
|
(define *SNOWBALL-bank* (the-as snowball-bank L24))
|
|
|
|
;; definition for function target-snowball-post
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior target-snowball-post target ()
|
|
(let ((gp-0 (the int (-> *display* time-ratio))))
|
|
(set-time-ratios *display* 1.0)
|
|
(countdown (s5-0 gp-0)
|
|
(set! (-> self control unknown-int40) s5-0)
|
|
(flag-setup)
|
|
(build-conversions (-> self control transv))
|
|
(reverse-conversions (-> self control transv))
|
|
(post-flag-setup)
|
|
)
|
|
(set-time-ratios *display* (the float gp-0))
|
|
)
|
|
(rot->dir-targ! (-> self control))
|
|
(ja-post)
|
|
(joint-points)
|
|
(do-target-shadow)
|
|
(target-powerup-process)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate target-snowball-start (target)
|
|
:event
|
|
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
(the-as object (cond
|
|
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
|
'snowball
|
|
)
|
|
((let ((v1-3 arg2))
|
|
(= v1-3 'end-mode)
|
|
)
|
|
enter-state
|
|
(-> *TARGET-bank* duck-jump-height-min)
|
|
(-> *TARGET-bank* duck-jump-height-max)
|
|
(go target-jump)
|
|
)
|
|
(else
|
|
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:exit
|
|
(behavior ()
|
|
(when (!= (-> self next-state name) 'target-snowball)
|
|
(let ((v1-1 (-> self manipy)))
|
|
(when v1-1
|
|
(deactivate (-> v1-1 0))
|
|
(set! (-> self manipy) (the-as (pointer manipy) #f))
|
|
)
|
|
)
|
|
(set!
|
|
(-> self control root-prim prim-core action)
|
|
(logand -4097 (-> self control root-prim prim-core action))
|
|
)
|
|
(set! (-> self control unknown-surface00) *walk-mods*)
|
|
(set!
|
|
(-> self control dynam gravity-max)
|
|
(-> self control unknown-dynamics00 gravity-max)
|
|
)
|
|
(set!
|
|
(-> self control dynam gravity-length)
|
|
(-> self control unknown-dynamics00 gravity-length)
|
|
)
|
|
(target-collide-set! 'normal 0.0)
|
|
(set! (-> self control reaction) target-collision-reaction)
|
|
(target-exit)
|
|
)
|
|
(none)
|
|
)
|
|
:code
|
|
(behavior ((arg0 handle))
|
|
(target-exit)
|
|
(set! *display-profile* #f)
|
|
(set! *display-entity-errors* #f)
|
|
(if (zero? (-> self snowball))
|
|
(set! (-> self snowball) (new 'process 'snowball-info))
|
|
)
|
|
(set! (-> self snowball entity) #f)
|
|
(let ((a0-2 (handle->process arg0)))
|
|
(if a0-2
|
|
(set! (-> self snowball entity) (-> a0-2 entity))
|
|
)
|
|
)
|
|
(reset-target-state #t)
|
|
(set! (-> self control transv quad) (the-as uint128 0))
|
|
(set! (-> self control unknown-float01) 0.0)
|
|
(let* ((a0-6 (-> self control))
|
|
(t9-3 (method-of-object a0-6 TODO-RENAME-28))
|
|
)
|
|
(new 'static 'vector :y 4096.0 :w 1.0)
|
|
(t9-3 a0-6)
|
|
)
|
|
(logior! (-> self control root-prim prim-core action) 4096)
|
|
(ja-channel-set! 1)
|
|
(let ((gp-1 (-> self skel root-channel 0)))
|
|
(joint-control-channel-group-eval!
|
|
gp-1
|
|
(the-as art-joint-anim (-> self draw art-group data 5))
|
|
num-func-identity
|
|
)
|
|
(set! (-> gp-1 frame-num) 0.0)
|
|
)
|
|
(remove-exit)
|
|
(go target-snowball)
|
|
(none)
|
|
)
|
|
:post
|
|
(the-as (function none :behavior target) target-post)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate target-snowball (target)
|
|
:event
|
|
(-> target-snowball-start event)
|
|
:exit
|
|
(-> target-snowball-start exit)
|
|
:code
|
|
(behavior ()
|
|
(while #t
|
|
(suspend)
|
|
)
|
|
(none)
|
|
)
|
|
:post
|
|
(behavior ()
|
|
(target-snowball-post)
|
|
(none)
|
|
)
|
|
)
|