Files
jak-project/test/decompiler/reference/jak3/engine/game/main-h_REF.gc
T
Hat Kid 93afb02cf4 decomp3: spawn target, add merc and particle buckets and some temporary hacks (#3445)
This includes all the collision stuff needed to spawn `target`,
decompiles the sparticle code and adds some of the PC hacks needed for
merc to run (it doesn't work quite right and looks bad, likely due to a
combination of code copied from Jak 2 and the time of day hacks).

There are a bunch of temporary hacks (see commits) in place to prevent
the game from crashing quite as much, but it is still extremely prone to
doing so due to lots of missing functions/potentially bad decomp.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2024-04-05 00:07:39 -04:00

484 lines
15 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *stats-poly*, type symbol
(define *stats-poly* #f)
;; definition for symbol *stats-memory*, type symbol
(define *stats-memory* #f)
;; definition for symbol *stats-memory-short*, type symbol
(define *stats-memory-short* #f)
;; definition for symbol *stats-memory-level-index*, type int
(define *stats-memory-level-index* 0)
;; definition for symbol *stats-collide*, type symbol
(define *stats-collide* #f)
;; definition for symbol *stats-bsp*, type symbol
(define *stats-bsp* #f)
;; definition for symbol *stats-buffer*, type symbol
(define *stats-buffer* #f)
;; definition for symbol *stats-target*, type symbol
(define *stats-target* #f)
;; definition for symbol *stats-profile-bars*, type symbol
(define *stats-profile-bars* #f)
;; definition for symbol *stats-perf*, type symbol
(define *stats-perf* #f)
;; definition for symbol *artist-all-visible*, type symbol
(define *artist-all-visible* #f)
;; definition for symbol *artist-flip-visible*, type symbol
(define *artist-flip-visible* #f)
;; definition for symbol *artist-fix-visible*, type symbol
(define *artist-fix-visible* #f)
;; definition for symbol *artist-fix-frustum*, type symbol
(define *artist-fix-frustum* #f)
;; definition for symbol *artist-error-spheres*, type symbol
(define *artist-error-spheres* #f)
;; definition for symbol *artist-use-menu-subdiv*, type symbol
(define *artist-use-menu-subdiv* #f)
;; definition for symbol *display-profile*, type symbol
(define *display-profile* #t)
;; definition for symbol *display-sidekick-stats*, type symbol
(define *display-sidekick-stats* #f)
;; definition for symbol *display-quad-stats*, type symbol
(define *display-quad-stats* #f)
;; definition for symbol *display-tri-stats*, type symbol
(define *display-tri-stats* #f)
;; definition for symbol *display-ground-stats*, type symbol
(define *display-ground-stats* #f)
;; definition for symbol *display-collision-marks*, type symbol
(define *display-collision-marks* #f)
;; definition for symbol *display-collide-cache*, type symbol
(define *display-collide-cache* #f)
;; definition for symbol *display-render-collision*, type symbol
(define *display-render-collision* #f)
;; definition for symbol *display-hipri-collision-marks*, type symbol
(define *display-hipri-collision-marks* #f)
;; definition for symbol *display-edge-collision-marks*, type symbol
(define *display-edge-collision-marks* #f)
;; definition for symbol *display-geo-marks*, type symbol
(define *display-geo-marks* #f)
;; definition for symbol *display-target-marks*, type symbol
(define *display-target-marks* #f)
;; definition for symbol *target-rc-board-controls*, type symbol
(define *target-rc-board-controls* #f)
;; definition for symbol *display-collide-history*, type int
(define *display-collide-history* 0)
;; definition for symbol *amy-cam*, type symbol
(define *amy-cam* #f)
;; definition for symbol *display-xyz-axes*, type symbol
(define *display-xyz-axes* #f)
;; definition for symbol *display-cam-collide-history*, type symbol
(define *display-cam-collide-history* #f)
;; definition for symbol *record-cam-collide-history*, type symbol
(define *record-cam-collide-history* #f)
;; definition for symbol *display-cam-master-marks*, type symbol
(define *display-cam-master-marks* #f)
;; definition for symbol *display-cam-other*, type symbol
(define *display-cam-other* #f)
;; definition for symbol *display-camera-marks*, type symbol
(define *display-camera-marks* #f)
;; definition for symbol *camera-no-mip-correction*, type symbol
(define *camera-no-mip-correction* #f)
;; definition for symbol *camera-turbo-free*, type symbol
(define *camera-turbo-free* #f)
;; definition for symbol *display-cam-los-info*, type symbol
(define *display-cam-los-info* #f)
;; definition for symbol *display-cam-los-debug*, type symbol
(define *display-cam-los-debug* #f)
;; definition for symbol *display-cam-los-marks*, type symbol
(define *display-cam-los-marks* #f)
;; definition for symbol *display-cam-coll-marks*, type symbol
(define *display-cam-coll-marks* #f)
;; definition for symbol *display-camera-info*, type symbol
(define *display-camera-info* #f)
;; definition for symbol *display-camera-old-stats*, type symbol
(define *display-camera-old-stats* #f)
;; definition for symbol *display-camera-last-attacker*, type symbol
(define *display-camera-last-attacker* #f)
;; definition for symbol *display-file-info*, type symbol
(define *display-file-info* #f)
;; definition for symbol *display-actor-marks*, type symbol
(define *display-actor-marks* #f)
;; definition for symbol *display-sprite-info*, type symbol
(define *display-sprite-info* #f)
;; definition for symbol *display-sprite-marks*, type symbol
(define *display-sprite-marks* #f)
;; definition for symbol *display-sprite-spheres*, type symbol
(define *display-sprite-spheres* #f)
;; definition for symbol *display-entity-errors*, type symbol
(define *display-entity-errors* #t)
;; definition for symbol *display-capture-mode*, type symbol
(define *display-capture-mode* #f)
;; definition for symbol *display-instance-info*, type symbol
(define *display-instance-info* #f)
;; definition for symbol *display-deci-count*, type symbol
(define *display-deci-count* #f)
;; definition for symbol *sync-dma*, type symbol
(define *sync-dma* #f)
;; definition for symbol *display-strip-lines*, type strip-lines-controls
(define *display-strip-lines* (the-as strip-lines-controls 0))
;; definition for symbol *display-battle-marks*, type symbol
(define *display-battle-marks* #f)
;; definition for symbol *display-joint-axes*, type symbol
(define *display-joint-axes* #f)
;; definition for symbol *display-nav-marks*, type symbol
(define *display-nav-marks* #f)
;; definition for symbol *display-nav-network*, type symbol
(define *display-nav-network* #f)
;; definition for symbol *display-path-marks*, type symbol
(define *display-path-marks* #f)
;; definition for symbol *display-vol-marks*, type symbol
(define *display-vol-marks* #f)
;; definition for symbol *display-water-marks*, type symbol
(define *display-water-marks* #f)
;; definition for symbol *display-nav-mesh*, type symbol
(define *display-nav-mesh* #f)
;; definition for symbol *display-race-mesh*, type symbol
(define *display-race-mesh* #f)
;; definition for symbol *display-actor-pointer*, type symbol
(define *display-actor-pointer* #f)
;; definition for symbol *display-actor-vis*, type symbol
(define *display-actor-vis* #f)
;; definition for symbol *display-actor-graph*, type symbol
(define *display-actor-graph* #f)
;; definition for symbol *display-traffic-height-map*, type symbol
(define *display-traffic-height-map* #f)
;; definition for symbol *display-trail-graph*, type symbol
(define *display-trail-graph* #f)
;; definition for symbol *display-color-bars*, type symbol
(define *display-color-bars* #f)
;; definition for symbol *display-bug-report*, type symbol
(define *display-bug-report* #f)
;; definition for symbol *display-level-border*, type symbol
(define *display-level-border* #f)
;; definition for symbol *display-memcard-info*, type symbol
(define *display-memcard-info* #f)
;; definition for symbol *display-split-boxes*, type symbol
(define *display-split-boxes* #f)
;; definition for symbol *display-split-box-info*, type symbol
(define *display-split-box-info* #f)
;; definition for symbol *display-texture-distances*, type symbol
(define *display-texture-distances* #f)
;; definition for symbol *display-texture-download*, type symbol
(define *display-texture-download* #f)
;; definition for symbol *display-art-control*, type symbol
(define *display-art-control* #f)
;; definition for symbol *display-gui-control*, type symbol
(define *display-gui-control* #f)
;; definition for symbol *display-level-spheres*, type symbol
(define *display-level-spheres* #f)
;; definition for symbol *time-of-day-fast*, type symbol
(define *time-of-day-fast* #f)
;; definition for symbol *display-iop-info*, type symbol
(define *display-iop-info* #f)
;; definition for symbol *ambient-sound-class*, type symbol
(define *ambient-sound-class* #t)
;; definition for symbol *slow-frame-rate*, type symbol
(define *slow-frame-rate* #f)
;; definition for symbol *display-region-marks*, type symbol
(define *display-region-marks* #f)
;; definition for symbol *execute-regions*, type symbol
(define *execute-regions* #t)
;; definition for symbol *debug-pause*, type symbol
(define *debug-pause* #f)
;; definition for symbol *debug-view-anims*, type symbol
(define *debug-view-anims* #f)
;; definition for symbol *debug-unkillable*, type symbol
(define *debug-unkillable* #f)
;; definition for symbol *debug-player-vehicle-unkillable*, type symbol
(define *debug-player-vehicle-unkillable* #f)
;; definition for symbol *debug-actor*, type process
(define *debug-actor* (the-as process #f))
;; definition for symbol *gun-marks*, type symbol
(define *gun-marks* #f)
;; definition for symbol *bug-report-output-mode*, type symbol
(define *bug-report-output-mode* (if *debug-segment*
'file-stream
'*stdcon*
)
)
;; definition for symbol *display-scene-control*, type scene-controls
(define *display-scene-control* (the-as scene-controls 0))
;; definition for symbol *display-bot-marks*, type bot-marks-controls
(define *display-bot-marks* (the-as bot-marks-controls 0))
;; definition for symbol *display-race-marks*, type race-marks-controls
(define *display-race-marks* (the-as race-marks-controls 0))
;; definition for symbol *race-record-path*, type symbol
(define *race-record-path* #f)
;; definition for symbol *select-race*, type race-selection
(define *select-race* (the-as race-selection 0))
;; definition for symbol *select-race-path*, type int
(define *select-race-path* 0)
;; definition for symbol *bot-record-path*, type int
(define *bot-record-path* -1)
;; definition for symbol *subdivide-draw-mode*, type subdivide-setting
(define *subdivide-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-scissor-draw-mode*, type subdivide-setting
(define *subdivide-scissor-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-foreground-draw-mode*, type subdivide-setting
(define *subdivide-foreground-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-ocean-draw-mode*, type subdivide-setting
(define *subdivide-ocean-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *ocean-height-hack*, type ocean-height-hack
(define *ocean-height-hack* (the-as ocean-height-hack 0))
;; definition (perm) for symbol *dproc*, type process
(define-perm *dproc* process #f)
;; definition for symbol *run*, type symbol
(define *run* #f)
;; definition for symbol *teleport*, type symbol
(define *teleport* #f)
;; definition for symbol *teleport-count*, type int
(define *teleport-count* 0)
;; definition for symbol *draw-hook*, type (function none)
(define *draw-hook* nothing)
;; definition for symbol *debug-hook*, type pair
(define *debug-hook* '())
;; definition for symbol *menu-hook*, type (function debug-menu-context)
(define *menu-hook* (the-as (function debug-menu-context) nothing))
;; definition for symbol *progress-hook*, type (function none)
(define *progress-hook* nothing)
;; definition for symbol *dma-timeout-hook*, type (function none)
(define *dma-timeout-hook* nothing)
;; definition of type frame-stats
(deftype frame-stats (structure)
((field-time time-frame 2)
(field int32)
)
)
;; definition for method 3 of type frame-stats
(defmethod inspect ((this frame-stats))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'frame-stats)
(format #t "~1Tfield-time[2] @ #x~X~%" (-> this field-time))
(format #t "~1Tfield: ~D~%" (-> this field))
(label cfg-4)
this
)
;; definition for symbol *frame-stats*, type frame-stats
(define *frame-stats* (new 'static 'frame-stats))
;; definition of type screen-filter
(deftype screen-filter (basic)
((draw? symbol)
(bucket bucket-id)
(depth int32)
(ztest uint64)
(color vector :inline)
(color-src vector :inline)
(color-dest vector :inline)
(extra vector :inline)
(speed float :overlay-at (-> extra data 0))
(current-interp float :overlay-at (-> extra data 1))
(lock-vsync? symbol)
)
(:methods
(draw (_type_) none)
(setup (_type_ vector vector float bucket-id int int symbol) none)
(disable (_type_) none)
)
)
;; definition for method 3 of type screen-filter
(defmethod inspect ((this screen-filter))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tdraw?: ~A~%" (-> this draw?))
(format #t "~1Tbucket: ~D~%" (-> this bucket))
(format #t "~1Tdepth: #x~X~%" (-> this depth))
(format #t "~1Tztest: #x~X~%" (-> this ztest))
(format #t "~1Tcolor: #<vector @ #x~X>~%" (-> this color))
(format #t "~1Tcolor-src: #<vector @ #x~X>~%" (-> this color-src))
(format #t "~1Tcolor-dest: #<vector @ #x~X>~%" (-> this color-dest))
(format #t "~1Textra: #<vector @ #x~X>~%" (-> this extra))
(format #t "~1Tspeed: ~f~%" (-> this extra x))
(format #t "~1Tcurrent-interp: ~f~%" (-> this extra y))
(format #t "~1Tlock-vsync?: ~A~%" (-> this lock-vsync?))
(label cfg-4)
this
)
;; definition of type col-rend
(deftype col-rend (basic)
((draw? symbol)
(outline? symbol)
(show-back-faces? symbol)
(show-normals? symbol)
(ghost-hidden? symbol)
(show-only uint32)
(cspec collide-spec)
(track uint8)
(bbox-radius float)
(bbox-center vector :inline)
(camera-to-bbox-dist float)
)
(:methods
(draw (_type_) none)
)
)
;; definition for method 3 of type col-rend
(defmethod inspect ((this col-rend))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tdraw?: ~A~%" (-> this draw?))
(format #t "~1Toutline?: ~A~%" (-> this outline?))
(format #t "~1Tshow-back-faces?: ~A~%" (-> this show-back-faces?))
(format #t "~1Tshow-normals?: ~A~%" (-> this show-normals?))
(format #t "~1Tghost-hidden?: ~A~%" (-> this ghost-hidden?))
(format #t "~1Tshow-only: ~D~%" (-> this show-only))
(format #t "~1Tcspec: ~D~%" (-> this cspec))
(format #t "~1Ttrack: ~D~%" (-> this track))
(format #t "~1Tbbox-radius: ~f~%" (-> this bbox-radius))
(format #t "~1Tbbox-center: #<vector @ #x~X>~%" (-> this bbox-center))
(format #t "~1Tcamera-to-bbox-dist: ~f~%" (-> this camera-to-bbox-dist))
(label cfg-4)
this
)
;; definition for symbol *col-rend*, type col-rend
(define *col-rend* (new 'static 'col-rend
:draw? #f
:outline? #t
:show-back-faces? #t
:show-normals? #f
:ghost-hidden? #t
:cspec (collide-spec crate civilian enemy)
:track #x1
:bbox-radius 24576.0
:camera-to-bbox-dist 65536.0
)
)
;; definition (debug) for function debug-actor?
(defun-debug debug-actor? ((arg0 object))
(= arg0 *debug-actor*)
)
;; failed to figure out what this is:
0