mirror of
https://github.com/open-goal/jak-project
synced 2026-06-17 23:21:41 -04:00
5f1ed7ab60
* decomp: mostly finish `cam-master` * decomp/scripts: lots of work in cam-states * stash * Merge remote-tracking branch 'water111/master' into decomp/camera-master Updated submodule third-party/googletest * decompiler: Add support for non power of 2 offsets for inline arr access * decomp: mostly finish `cam-states` need to fix a macro issue * blocked: `cam-master` decompiler crash when adding casts * decomp: finish `cam-states-dbg` * decomp: mostly finish `pov-camera` with the exception of joint-related code * decomp: `cam-debug` finished decompiling, no way does this compile yet though * decomp: considerable work done in `cam-layout` * decomp: `cam-layout` almost done! * decomp: `pov-camera` finished, TC tests will fail for now * decomp: working on resolving issues * decomp: cam-layout decompiling * fixing more issues in cam-master...one event handler remains * skip problematic function in `cam-master` for now * gsrc: update res macros * decomp: finish `cam-states` * decomp: giving up on `cam-debug` * tests: allow skipping state handlers in ref tests * decomp: working through cam-layout bugs * decomp: allow for shifting non-integers * decomp: finalize `cam-layout` and `cam-master` * decomp: finalize `cam-states` * cleanup: bi-annual formatting of the casting files * formatting * decomp: start working on beach-obs * blocked: `beach-obs` mostly finished, but handle cast issues and unknown `prebind` func signature * blocked: `villagep-obs` done, `s6` not being referred to as `self` * decomp: finish `citadel-obs` * decomp: finish `darkcave-obs` * blocked: need to allow `hud-h` to decompile properly (#f as static pointer) * decomp: finish `jungle-obs` * decomp: finish `village-obs` * blocked: `misty-obs` handle cast issues * decomp: finish `village2-obs` * decomp: 1 function left in `swamp-obs`, particle related -- maybe we know now? * decomp: finish `swamp-obs` * blocked: `maincave-obs` handle casts * decomp: finish `sunken-obs` * blocked: `rolling-obs` handle casts and hud-parts * decomp: finish `firecanyon-obs` * decomp: finish `ogre-obs` * blocked: `village3-obs` gives up type analysis! * blocked: `snow-obs` has hud-parts and handle casts code * decomp: finish `snow-flutflut-obs` * blocked: `lavatube-obs` has s6-1 issue * blocked: `title-obs` handle cast issues * fixed post merge problems * decomp: finish `jungleb-obs` * blocked: `training-obs` has `s6-1` issue * fix type consistency * scripts: Extend update script to handle the game-text-id enum as well * git: Update git attributes to effectively halve PR burden * fixed `sound-play-by-name` signature * fix particle definitions in firecanyon-obs * fix func signature in racer-states * update ref tests * tests: update current ref tests * tests: add `joint` to ref-tests * tests: add `process-drawable` to ref-tests * updated gsrc * add back manual fix * address most feedback, update source files * get rid of forward declarations in `darkcave-obs` Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
94 lines
2.4 KiB
Common Lisp
Vendored
Generated
94 lines
2.4 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type ticky
|
|
(deftype ticky (structure)
|
|
((delay-til-ramp int64 :offset-assert 0)
|
|
(delay-til-timeout int64 :offset-assert 8)
|
|
(starting-time int64 :offset-assert 16)
|
|
(last-tick-time int64 :offset-assert 24)
|
|
)
|
|
:method-count-assert 12
|
|
:size-assert #x20
|
|
:flag-assert #xc00000020
|
|
(:methods
|
|
(sleep (_type_ uint) none 9)
|
|
(reached-delay? (_type_ uint) symbol 10)
|
|
(completed? (_type_) symbol 11)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type ticky
|
|
(defmethod inspect ticky ((obj ticky))
|
|
(format #t "[~8x] ~A~%" obj 'ticky)
|
|
(format #t "~Tdelay-til-ramp: ~D~%" (-> obj delay-til-ramp))
|
|
(format #t "~Tdelay-til-timeout: ~D~%" (-> obj delay-til-timeout))
|
|
(format #t "~Tstarting-time: ~D~%" (-> obj starting-time))
|
|
(format #t "~Tlast-tick-time: ~D~%" (-> obj last-tick-time))
|
|
obj
|
|
)
|
|
|
|
;; definition for method 9 of type ticky
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod sleep ticky ((obj ticky) (arg0 uint))
|
|
(set! (-> obj starting-time) (-> *display* base-frame-counter))
|
|
(set! (-> obj delay-til-timeout) (the-as int arg0))
|
|
(set!
|
|
(-> obj delay-til-ramp)
|
|
(the-as int (max 0 (the-as int (+ arg0 -1200))))
|
|
)
|
|
(set! (-> obj last-tick-time) 0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 11 of type ticky
|
|
(defmethod completed? ticky ((obj ticky))
|
|
(let ((gp-0 #f))
|
|
(let ((v1-2 (- (-> *display* base-frame-counter) (-> obj starting-time))))
|
|
(cond
|
|
((>= v1-2 (-> obj delay-til-timeout))
|
|
(set! gp-0 #t)
|
|
)
|
|
(else
|
|
(let*
|
|
((f0-1
|
|
(fmin
|
|
1.0
|
|
(/
|
|
(the float (max 0 (- v1-2 (-> obj delay-til-ramp))))
|
|
(the float (- (-> obj delay-til-timeout) (-> obj delay-til-ramp)))
|
|
)
|
|
)
|
|
)
|
|
(v1-7 (the int (lerp 105.0 41.0 f0-1)))
|
|
)
|
|
(when
|
|
(>= (- (-> *display* base-frame-counter) (-> obj last-tick-time)) v1-7)
|
|
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
|
|
(sound-play-by-name
|
|
(static-sound-name "stopwatch")
|
|
(new-sound-id)
|
|
1024
|
|
0
|
|
0
|
|
1
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
gp-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 10 of type ticky
|
|
(defmethod reached-delay? ticky ((obj ticky) (arg0 uint))
|
|
(>=
|
|
(- (-> *display* base-frame-counter) (-> obj starting-time))
|
|
(the-as int arg0)
|
|
)
|
|
)
|