Files
jak-project/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc
T
ManDude 1f4044b9ff Jak 2 controller LED implementation (#3035)
Adds controller LED features to Jak 2:
- progressive flickering denoting health
- copies tomb simon says puzzle colors
- unique colors for each gun
- orange color for being indax
- yellow color for being in mech
- purple color for being darkjak
- blue color for being in board
- red flash when wanted.

May add more features later?

Also did some minor clean-up on some types.
2023-09-28 02:47:09 +01:00

468 lines
22 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
(local-vars (gp-0 game-info))
;; definition of type game-bank
(deftype game-bank (basic)
((life-max-default float :offset-assert 4)
(life-start-default float :offset-assert 8)
(life-single-inc float :offset-assert 12)
(money-task-inc float :offset-assert 16)
(money-oracle-inc float :offset-assert 20)
)
:method-count-assert 9
:size-assert #x18
:flag-assert #x900000018
)
;; definition for method 3 of type game-bank
(defmethod inspect game-bank ((this game-bank))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlife-max-default: ~f~%" (-> this life-max-default))
(format #t "~1Tlife-start-default: ~f~%" (-> this life-start-default))
(format #t "~1Tlife-single-inc: ~f~%" (-> this life-single-inc))
(format #t "~1Tmoney-task-inc: ~f~%" (-> this money-task-inc))
(format #t "~1Tmoney-oracle-inc: ~f~%" (-> this money-oracle-inc))
(label cfg-4)
this
)
;; definition for symbol *GAME-bank*, type game-bank
(define *GAME-bank* (new 'static 'game-bank
:life-max-default 99.0
:life-start-default 5.0
:life-single-inc 1.0
:money-task-inc 90.0
:money-oracle-inc 120.0
)
)
;; definition of type actor-id
(deftype actor-id (uint32)
()
:method-count-assert 9
:size-assert #x4
:flag-assert #x900000004
)
;; definition of type highscore-info
(deftype highscore-info (structure)
((flags highscore-flags :offset-assert 0)
(award-scores float 3 :offset-assert 4)
(bronze-score float :offset 4)
(silver-score float :offset 8)
(gold-score float :offset 12)
)
:method-count-assert 10
:size-assert #x10
:flag-assert #xa00000010
(:methods
(get-rank (_type_ float) int 9)
)
)
;; definition for method 3 of type highscore-info
(defmethod inspect highscore-info ((this highscore-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'highscore-info)
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Taward-scores[3] @ #x~X~%" (-> this award-scores))
(format #t "~1Tbronze-score: ~f~%" (-> this bronze-score))
(format #t "~1Tsilver-score: ~f~%" (-> this silver-score))
(format #t "~1Tgold-score: ~f~%" (-> this gold-score))
(label cfg-4)
this
)
;; definition of type level-buffer-state
(deftype level-buffer-state (structure)
((name symbol :offset-assert 0)
(display? symbol :offset-assert 4)
(force-vis? symbol :offset-assert 8)
(force-inside? symbol :offset-assert 12)
)
:pack-me
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type level-buffer-state
(defmethod inspect level-buffer-state ((this level-buffer-state))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'level-buffer-state)
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tdisplay?: ~A~%" (-> this display?))
(format #t "~1Tforce-vis?: ~A~%" (-> this force-vis?))
(format #t "~1Tforce-inside?: ~A~%" (-> this force-inside?))
(label cfg-4)
this
)
;; definition of type load-state
(deftype load-state (basic)
((want level-buffer-state 6 :inline :offset-assert 4)
(want-sound symbol 3 :offset-assert 100)
(vis-nick symbol :offset-assert 112)
(command-list pair :offset-assert 116)
(object-name string 256 :offset-assert 120)
(object-status basic 256 :offset-assert 1144)
)
:method-count-assert 22
:size-assert #x878
:flag-assert #x1600000878
(:methods
(new (symbol type) _type_ 0)
(reset! (_type_) _type_ 9)
(update! (_type_) int 10)
(want-levels (_type_ (pointer symbol)) int 11)
(want-sound-banks (_type_ (pointer symbol)) none 12)
(want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15)
(want-force-inside (_type_ symbol symbol) none 16)
(execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19)
(restore-load-state (_type_) int 20)
(add-borrow-levels (_type_) none 21)
)
)
;; definition for method 3 of type load-state
(defmethod inspect load-state ((this load-state))
(when (not this)
(set! this this)
(goto cfg-10)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Twant[6] @ #x~X~%" (-> this want))
(dotimes (s5-0 6)
(format #t "~T [~D]~1Twant: ~`level-buffer-state`P~%" s5-0 (-> this want s5-0))
)
(format #t "~1Twant-sound[3] @ #x~X~%" (-> this want-sound))
(dotimes (s5-1 3)
(format #t "~T [~D]~1Twant-sound: ~`symbol`P~%" s5-1 (-> this want-sound s5-1))
)
(format #t "~1Tvis-nick: ~A~%" (-> this vis-nick))
(format #t "~1Tcommand-list: ~A~%" (-> this command-list))
(format #t "~1Tobject-name[256] @ #x~X~%" (-> this object-name))
(format #t "~1Tobject-status[256] @ #x~X~%" (-> this object-status))
(label cfg-10)
this
)
;; definition for method 0 of type load-state
(defmethod new load-state ((allocation symbol) (type-to-make type))
(reset! (object-new allocation type-to-make (the-as int (-> type-to-make size))))
)
;; definition of type continue-point
(deftype continue-point (basic)
((name string :offset-assert 4)
(level symbol :offset-assert 8)
(flags continue-flags :offset-assert 12)
(trans vector :inline :offset-assert 16)
(quat vector :inline :offset-assert 32)
(camera-trans vector :inline :offset-assert 48)
(camera-rot vector3s 3 :inline :offset-assert 64)
(on-goto pair :offset-assert 100)
(vis-nick symbol :offset-assert 104)
(want level-buffer-state 6 :inline :offset-assert 108)
(want-sound symbol 3 :offset-assert 204)
)
:method-count-assert 12
:size-assert #xd8
:flag-assert #xc000000d8
(:methods
(debug-draw (_type_) int 9)
(continue-point-method-10 (_type_ load-state) continue-point 10)
(move-camera! (_type_) none 11)
)
)
;; definition for method 3 of type continue-point
(defmethod inspect continue-point ((this continue-point))
(when (not this)
(set! this this)
(goto cfg-10)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(format #t "~1Tquat: ~`vector`P~%" (-> this quat))
(format #t "~1Tcamera-trans: ~`vector`P~%" (-> this camera-trans))
(format #t "~1Tcamera-rot[9] @ #x~X~%" (-> this camera-rot))
(format #t "~1Ton-goto: ~A~%" (-> this on-goto))
(format #t "~1Tvis-nick: ~A~%" (-> this vis-nick))
(format #t "~1Twant[6] @ #x~X~%" (-> this want))
(dotimes (s5-0 6)
(format #t "~T [~D]~1Twant: ~`level-buffer-state`P~%" s5-0 (-> this want s5-0))
)
(format #t "~1Twant-sound[3] @ #x~X~%" (-> this want-sound))
(dotimes (s5-1 3)
(format #t "~T [~D]~1Twant-sound: ~`symbol`P~%" s5-1 (-> this want-sound s5-1))
)
(label cfg-10)
this
)
;; definition of type game-info
(deftype game-info (basic)
((mode symbol :offset-assert 4)
(save-name string :offset-assert 8)
(life float :offset-assert 12)
(life-max float :offset-assert 16)
(money float :offset-assert 20)
(money-total float :offset-assert 24)
(money-per-level uint8 32 :offset-assert 28)
(deaths-per-level uint8 32 :offset-assert 60)
(buzzer-total float :offset-assert 92)
(fuel float :offset-assert 96)
(gem float :offset-assert 100)
(gem-total float :offset-assert 104)
(skill float :offset-assert 108)
(skill-total float :offset-assert 112)
(karma float :offset-assert 116)
(eco-pill-dark float :offset-assert 120)
(eco-pill-dark-total float :offset-assert 124)
(features game-feature :offset-assert 128)
(debug-features game-feature :offset-assert 136)
(secrets game-secrets :offset-assert 144)
(unknown-pad1 uint32 :offset-assert 148)
(purchase-secrets game-secrets :offset-assert 152)
(unknown-pad2 uint32 :offset-assert 156)
(gun-type pickup-type :offset-assert 160)
(gun-ammo float 4 :offset-assert 164)
(shield float :offset-assert 180)
(score float :offset-assert 184)
(score-owner handle :offset-assert 192)
(timer time-frame :offset-assert 200)
(timer-owner handle :offset-assert 208)
(timer-flash symbol :offset-assert 216)
(counter float :offset-assert 220)
(counter-flash basic :offset-assert 224)
(attack-id uint32 :offset-assert 228)
(perm-list entity-perm-array :offset-assert 232)
(task-perm-list entity-perm-array :offset-assert 236)
(current-continue continue-point :offset-assert 240)
(last-continue continue-point :offset-assert 244)
(play-list (array game-task-info) :offset-assert 248)
(sub-task-list (array game-task-node-info) :offset-assert 252)
(mission-list (array game-task-node-info) :offset-assert 256)
(task-counter uint32 :offset-assert 260)
(unknown-pad6 (array uint16) :offset-assert 264)
(level-opened uint8 32 :offset-assert 268)
(total-deaths int32 :offset-assert 300)
(continue-deaths int32 :offset-assert 304)
(task-deaths int32 :offset-assert 308)
(total-trys int32 :offset-assert 312)
(game-start-time time-frame :offset-assert 320)
(continue-time time-frame :offset-assert 328)
(death-time time-frame :offset-assert 336)
(hit-time time-frame :offset-assert 344)
(task-pickup-time time-frame :offset-assert 352)
(unknown-array1 (array time-frame) :offset-assert 360)
(task-enter-times (array time-frame) :offset-assert 364)
(task-in-times (array time-frame) :offset-assert 368)
(death-pos vector-array :offset 372)
(stop-watch-start uint64 :offset-assert 376)
(stop-watch-stop uint64 :offset-assert 384)
(blackout-time time-frame :offset-assert 392)
(letterbox-time time-frame :offset-assert 400)
(hint-play-time time-frame :offset-assert 408)
(display-text-time time-frame :offset-assert 416)
(display-text-handle handle :offset-assert 424)
(death-movie-tick int32 :offset-assert 432)
(want-auto-save symbol :offset-assert 436)
(auto-save-proc handle :offset-assert 440)
(auto-save-status mc-status-code :offset-assert 448)
(auto-save-card int32 :offset-assert 452)
(auto-save-which int32 :offset-assert 456)
(auto-save-count int32 :offset-assert 460)
(pov-camera-handle handle :offset-assert 464)
(other-camera-handle handle :offset-assert 472)
(controller handle 2 :offset-assert 480)
(race-timer uint64 :offset-assert 496)
(race-current-lap-count int32 :offset-assert 504)
(race-total-lap-count int32 :offset-assert 508)
(race-position int32 :offset-assert 512)
(race-number-turbos int32 :offset-assert 516)
(bot-health float 3 :offset-assert 520)
(demo-state uint32 :offset-assert 532)
(wanted-flash symbol :offset-assert 536)
(distance float :offset-assert 540)
(kiosk-timeout uint64 :offset-assert 544)
(pause-start-time time-frame :offset-assert 552)
(game-score (array float) :offset-assert 560)
(goal float :offset-assert 564)
(miss float :offset-assert 568)
(miss-max float :offset-assert 572)
(task-close-times (array time-frame) :offset-assert 576)
(live-eco-pill-count int32 :offset-assert 580)
(live-gem-count int32 :offset-assert 584)
(air-supply float :offset-assert 588)
(homing-beacon int32 :offset-assert 592)
(dark-eco-pickup int32 :offset-assert 596)
(green-eco-pickup int32 :offset-assert 600)
)
:method-count-assert 31
:size-assert #x25c
:flag-assert #x1f0000025c
(:methods
(initialize! (_type_ symbol game-save string) _type_ 9)
(give (_type_ symbol float handle) float 10)
(task-complete? (_type_ game-task) symbol 11)
(subtask-index-by-name (_type_ string) int 12)
(set-subtask-hook! (_type_ game-task-node int function) function 13)
(actor-perm (_type_ actor-id) entity-perm 14)
(task-perm-by-index (_type_ int) entity-perm 15)
(copy-perms-from-level! (_type_ level) int 16)
(copy-perms-to-level! (_type_ level) int 17)
(debug-inspect (_type_ symbol) _type_ 18)
(get-current-continue-forced (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic symbol) continue-point 21)
(game-info-method-22 (_type_) int 22)
(save-game (_type_ game-save string) game-save 23)
(load-game (_type_ game-save) game-save 24)
(you-suck-stage (_type_ symbol) int 25)
(you-suck-scale (_type_ object) float 26)
(get-next-attack-id (_type_) uint 27)
(game-info-method-28 (_type_ game-score float) int 28)
(get-game-score-ref (_type_ int) (pointer float) 29)
(calculate-percentage (_type_) float 30)
)
)
;; definition for method 3 of type game-info
(defmethod inspect game-info ((this game-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tmode: ~A~%" (-> this mode))
(format #t "~1Tsave-name: ~A~%" (-> this save-name))
(format #t "~1Tlife: ~f~%" (-> this life))
(format #t "~1Tlife-max: ~f~%" (-> this life-max))
(format #t "~1Tmoney: ~f~%" (-> this money))
(format #t "~1Tmoney-total: ~f~%" (-> this money-total))
(format #t "~1Tmoney-per-level[32] @ #x~X~%" (-> this money-per-level))
(format #t "~1Tdeaths-per-level[32] @ #x~X~%" (-> this deaths-per-level))
(format #t "~1Tbuzzer-total: ~f~%" (-> this buzzer-total))
(format #t "~1Tfuel: ~f~%" (-> this fuel))
(format #t "~1Tgem: ~f~%" (-> this gem))
(format #t "~1Tgem-total: ~f~%" (-> this gem-total))
(format #t "~1Tskill: ~f~%" (-> this skill))
(format #t "~1Tskill-total: ~f~%" (-> this skill-total))
(format #t "~1Tkarma: ~f~%" (-> this karma))
(format #t "~1Teco-pill-dark: ~f~%" (-> this eco-pill-dark))
(format #t "~1Teco-pill-dark-total: ~f~%" (-> this eco-pill-dark-total))
(format #t "~1Tfeatures: ~D~%" (-> this features))
(format #t "~1Tdebug-features: ~D~%" (-> this debug-features))
(format #t "~1Tsecrets: ~D~%" (-> this secrets))
(format #t "~1Tpurchase-secrets: ~D~%" (-> this purchase-secrets))
(format #t "~1Tgun-type: ~D~%" (-> this gun-type))
(format #t "~1Tgun-ammo[4] @ #x~X~%" (-> this gun-ammo))
(format #t "~1Tshield: ~f~%" (-> this shield))
(format #t "~1Tscore: ~f~%" (-> this score))
(format #t "~1Tscore-owner: ~D~%" (-> this score-owner))
(format #t "~1Ttimer: ~D~%" (-> this timer))
(format #t "~1Ttimer-owner: ~D~%" (-> this timer-owner))
(format #t "~1Ttimer-flash: ~A~%" (-> this timer-flash))
(format #t "~1Tcounter: ~f~%" (-> this counter))
(format #t "~1Tcounter-flash: ~A~%" (-> this counter-flash))
(format #t "~1Tattack-id: ~D~%" (-> this attack-id))
(format #t "~1Tperm-list: ~A~%" (-> this perm-list))
(format #t "~1Ttask-perm-list: ~A~%" (-> this task-perm-list))
(format #t "~1Tcurrent-continue: ~A~%" (-> this current-continue))
(format #t "~1Tlast-continue: ~A~%" (-> this last-continue))
(format #t "~1Ttask-counter: ~D~%" (-> this task-counter))
(format #t "~1Tlevel-opened[32] @ #x~X~%" (-> this level-opened))
(format #t "~1Ttotal-deaths: ~D~%" (-> this total-deaths))
(format #t "~1Tcontinue-deaths: ~D~%" (-> this continue-deaths))
(format #t "~1Ttask-deaths: ~D~%" (-> this task-deaths))
(format #t "~1Ttotal-trys: ~D~%" (-> this total-trys))
(format #t "~1Tgame-start-time: ~D~%" (-> this game-start-time))
(format #t "~1Tcontinue-time: ~D~%" (-> this continue-time))
(format #t "~1Tdeath-time: ~D~%" (-> this death-time))
(format #t "~1Thit-time: ~D~%" (-> this hit-time))
(format #t "~1Ttask-pickup-time: ~D~%" (-> this task-pickup-time))
(format #t "~1Tdeath-pos: ~A~%" (-> this death-pos))
(format #t "~1Tstop-watch-start: ~D~%" (-> this stop-watch-start))
(format #t "~1Tstop-watch-stop: ~D~%" (-> this stop-watch-stop))
(format #t "~1Tblackout-time: ~D~%" (-> this blackout-time))
(format #t "~1Tletterbox-time: ~D~%" (-> this letterbox-time))
(format #t "~1Thint-play-time: ~D~%" (-> this hint-play-time))
(format #t "~1Tdisplay-text-time: ~D~%" (-> this display-text-time))
(format #t "~1Tdisplay-text-handle: ~D~%" (-> this display-text-handle))
(format #t "~1Tdeath-movie-tick: ~D~%" (-> this death-movie-tick))
(format #t "~1Twant-auto-save: ~A~%" (-> this want-auto-save))
(format #t "~1Tauto-save-proc: ~D~%" (-> this auto-save-proc))
(format #t "~1Tauto-save-status: ~D~%" (-> this auto-save-status))
(format #t "~1Tauto-save-card: ~D~%" (-> this auto-save-card))
(format #t "~1Tauto-save-which: ~D~%" (-> this auto-save-which))
(format #t "~1Tauto-save-count: ~D~%" (-> this auto-save-count))
(format #t "~1Tpov-camera-handle: ~D~%" (-> this pov-camera-handle))
(format #t "~1Tother-camera-handle: ~D~%" (-> this other-camera-handle))
(format #t "~1Tcontroller[2] @ #x~X~%" (-> this controller))
(format #t "~1Trace-timer: ~D~%" (-> this race-timer))
(format #t "~1Trace-current-lap-count: ~D~%" (-> this race-current-lap-count))
(format #t "~1Trace-total-lap-count: ~D~%" (-> this race-total-lap-count))
(format #t "~1Trace-position: ~D~%" (-> this race-position))
(format #t "~1Trace-number-turbos: ~D~%" (-> this race-number-turbos))
(format #t "~1Tbot-health[3] @ #x~X~%" (-> this bot-health))
(format #t "~1Tdemo-state: ~D~%" (-> this demo-state))
(format #t "~1Twanted-flash: ~A~%" (-> this wanted-flash))
(format #t "~1Tdistance: ~f~%" (-> this distance))
(format #t "~1Tkiosk-timeout: ~D~%" (-> this kiosk-timeout))
(format #t "~1Tpause-start-time: ~D~%" (-> this pause-start-time))
(format #t "~1Tgame-score: ~A~%" (-> this game-score))
(format #t "~1Tgoal: ~f~%" (-> this goal))
(format #t "~1Tmiss: ~f~%" (-> this miss))
(format #t "~1Tmiss-max: ~f~%" (-> this miss-max))
(format #t "~1Tlive-eco-pill-count: ~D~%" (-> this live-eco-pill-count))
(format #t "~1Tlive-gem-count: ~D~%" (-> this live-gem-count))
(format #t "~1Tair-supply: ~f~%" (-> this air-supply))
(format #t "~1Thoming-beacon: ~D~%" (-> this homing-beacon))
(format #t "~1Tdark-eco-pickup: ~D~%" (-> this dark-eco-pickup))
(format #t "~1Tgreen-eco-pickup: ~D~%" (-> this green-eco-pickup))
(label cfg-4)
this
)
;; definition for method 27 of type game-info
(defmethod get-next-attack-id game-info ((this game-info))
(let ((v0-0 (+ (-> this attack-id) 1)))
(set! (-> this attack-id) v0-0)
v0-0
)
)
;; failed to figure out what this is:
(set! gp-0
(when (or (not *game-info*) (zero? *game-info*))
(set! gp-0 (new 'static 'game-info :mode 'debug :current-continue #f :last-continue #f))
(set! (-> gp-0 unknown-array1) (the-as (array time-frame) (new 'global 'boxed-array uint64 110)))
(set! (-> gp-0 task-close-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 110)))
(set! (-> gp-0 task-enter-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 32)))
(set! (-> gp-0 task-in-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 32)))
(set! *game-info* gp-0)
gp-0
)
)