d/jak2: partial cleanup pass from main -> gun-part (#2017)

This commit is contained in:
Tyler Wilding
2022-11-13 11:38:25 -05:00
committed by GitHub
parent f39b993f79
commit c8abafcb7a
27 changed files with 34201 additions and 4302 deletions
+62 -52
View File
@@ -20846,6 +20846,13 @@
)
)
(deftype hud-money (hud)
"Not actually defined in jak 2's code, but referenced."
()
:method-count-assert 27
:size-assert #xba4
:flag-assert #x1b0b300ba4)
(deftype hud-ashelin (hud)
()
:method-count-assert 27
@@ -27908,7 +27915,7 @@
:size-assert #x2c0
:flag-assert #xa000002c0
(:methods
(gun-info-method-9 (_type_) none 9)
(gun-info-method-9 (_type_) (inline-array vector) 9)
)
)
@@ -28495,8 +28502,8 @@
;; collectables-part ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern eco-fadeout function) ;; (function sparticle-system sparticle-cpuinfo none)
;; (define-extern eco-track-root-prim-fadeout function) ;; (function sparticle-system sparticle-cpuinfo vector none)
(define-extern eco-fadeout (function sparticle-system sparticle-cpuinfo none)) ;;
(define-extern eco-track-root-prim-fadeout (function sparticle-system sparticle-cpuinfo vector none)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; debug-part ;;
@@ -28660,7 +28667,7 @@
(define-extern target-hit-ground-flop-anim (function symbol symbol none :behavior target))
(define-extern target-hit-ground-anim (function symbol symbol none :behavior target))
(define-extern target-attack-air-anim (function none :behavior target))
(define-extern target-edge-grab-anim (function none :behavior target))
(define-extern target-edge-grab-anim (function float none :behavior target))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; target ;;
@@ -28995,9 +29002,9 @@
(core-position vector :inline :offset-assert 480)
(core-velocity vector :inline :offset-assert 496)
(spin-vector vector :inline :offset-assert 512)
(track-target uint64 :offset-assert 528)
(track-target handle :offset-assert 528)
(size-t float :offset-assert 536)
(result-array uint64 16 :offset-assert 544)
(result-array handle 16 :offset-assert 544)
(charge-sound uint32 :offset-assert 672)
(fire-sound uint32 :offset-assert 676)
(trail-sound uint32 :offset-assert 680)
@@ -29286,7 +29293,7 @@
(fstart-inc float :offset-assert 76)
(fstep float :offset-assert 80)
(fprecision int32 :offset-assert 84)
(factivate-func (function int debug-menu-msg float float float) :offset-assert 88) ;; guessed by decompiler
(factivate-func (function int debug-menu-msg float float float) :offset-assert 88) ;; NOTE - it's weird how the final 2 floats are loaded off the stack as quadwords
(ival int32 :offset 60)
(iundo-val int32 :offset 64)
(irange-min int32 :offset 68)
@@ -29423,9 +29430,9 @@
;; main-collide ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern drawable-sphere-box-intersect? (function drawable bounding-box4w symbol)) ;;
(define-extern instance-sphere-box-intersect? (function drawable instance-tie bounding-box4w symbol)) ;;
(define-extern instance-tfragment-add-debug-sphere (function drawable instance-tie symbol)) ;;
(define-extern drawable-sphere-box-intersect? "TODO" (function drawable bounding-box4w symbol)) ;;
(define-extern instance-sphere-box-intersect? "TODO" (function drawable instance-tie bounding-box4w symbol)) ;;
(define-extern instance-tfragment-add-debug-sphere "TODO" (function drawable instance-tie symbol)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; video ;;
@@ -45924,10 +45931,9 @@
;; ctymark-obs ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype market-object (process-focusable)
((part-explode basic :offset-assert 200)
(explode-matrix matrix :inline :offset-assert 204)
((part-explode basic :offset-assert 204)
(explode-matrix matrix :inline :offset-assert 208)
)
:method-count-assert 29
:size-assert #x110
@@ -45937,65 +45943,44 @@
(die () _type_ :state 28)
)
)
|#
#|
(deftype market-basket-a (market-object)
()
:method-count-assert 29
:size-assert #x110
:flag-assert #x1d00900110
(:methods
)
)
|#
#|
(deftype market-basket-b (market-object)
()
:method-count-assert 29
:size-assert #x110
:flag-assert #x1d00900110
(:methods
)
)
|#
#|
(deftype market-crate (market-object)
()
:method-count-assert 29
:size-assert #x110
:flag-assert #x1d00900110
(:methods
)
)
|#
#|
(deftype market-sack-a (market-object)
()
:method-count-assert 29
:size-assert #x110
:flag-assert #x1d00900110
(:methods
)
)
|#
#|
(deftype market-sack-b (market-object)
()
:method-count-assert 29
:size-assert #x110
:flag-assert #x1d00900110
(:methods
)
)
|#
;; (define-extern check-market-piece-ground function)
;; (define-extern market-activate function)
(define-extern check-market-piece-ground (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float))
(define-extern market-activate (function level none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ctymarka-part ;;
@@ -51347,25 +51332,50 @@
;; ctywide-obs ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype security-wall (UNKNOWN)
()
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
;; Failed to read fields.
(deftype security-wall (process-drawable)
(
(pass int32 :offset-assert 200)
(incoming-attack-id uint32 :offset-assert 204)
(next-message-time int64 :offset-assert 208)
(message int32 :offset-assert 216)
(plane plane :inline :offset-assert 224)
(color vector :inline :offset-assert 240)
(target-pos vector :inline :offset-assert 256)
(flash float :offset-assert 272)
(touch-count int32 :offset-assert 276)
(breach symbol :offset-assert 280)
)
:method-count-assert 25
:size-assert #x11c
:flag-assert #x1900a0011c
(:methods
(security-wall-method-20 () none 20)
(security-wall-method-21 () none 21)
(security-wall-method-22 () none 22)
(security-wall-method-23 () none 23)
(security-wall-method-24 () none 24)
)
)
|#
#|
(deftype fruit-stand (UNKNOWN)
()
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
;; Failed to read fields.
(deftype fruit-stand (process-focusable)
(
(incoming-attack-id uint32 :offset-assert 204)
(hack-counter uint32 :offset-assert 208)
(count-sparts uint32 :offset-assert 212)
(first-sparts uint32 :offset-assert 216)
(num-sparts uint32 :offset-assert 220)
(sparts-index uint32 4 :offset-assert 224)
(sparts-pos vector 4 :inline :offset-assert 240)
)
:method-count-assert 30
:size-assert #x130
:flag-assert #x1e00b00130
(:methods
(fruit-stand-method-27 () none 27)
(fruit-stand-method-28 () none 28)
(fruit-stand-method-29 () none 29)
)
)
|#
#|
(deftype cty-fruit-stand (UNKNOWN)
@@ -466,5 +466,8 @@
],
"generic-obs": [
[9, "(function symbol :behavior touch-tracker)"]
],
"gun-dark-shot": [
[1, "(function handle none :behavior gun-dark-shot)"]
]
}
+1 -1
View File
@@ -140,7 +140,7 @@
// "DGO/SEW.DGO",
// "DGO/VIN.DGO",
// "DGO/CGA.DGO",
// "DGO/CMB.DGO",
"DGO/CMB.DGO",
// "DGO/LGUARD.DGO",
// "DGO/CPA.DGO",
// "DGO/LCITYLOW.DGO",
File diff suppressed because it is too large Load Diff
@@ -397,7 +397,7 @@
"cam-debug-draw-tris": [[16, "vector4w"]],
"draw-string-xy": [[16, "font-context"]],
"(code die gun)": [
[16, "matrix"],
[16, "projectile-init-by-other-params"],
[112, "vector"],
[128, "vector"],
[144, "vector"]
@@ -410,7 +410,7 @@
"gun-post": [
[16, "vector"],
[32, "vector"],
[48, "matrix"],
[48, "projectile-init-by-other-params"],
[144, "vector"],
[160, "vector"],
[176, "vector"]
@@ -1053,7 +1053,6 @@
"(method 26 gun-red-shot)": [[16, "vector"]],
"(method 28 gun-red-shot)": [[16, "collide-query"]],
"(method 24 gun-red-shot)": [[16, "collide-query"]],
"target-gun-fire-dark": [[16, "collide-query"]],
"(method 52 nav-state)": [
[16, "nav-avoid-spheres-params"],
[112, "nav-ray"]
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -8,7 +8,7 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": ["effect-control", "ctywide-scenes", "texture-anim-tables", "traffic-engine"],
"banned_objects": [],
////////////////////////////
// CODE ANALYSIS OPTIONS
+1
View File
@@ -170,6 +170,7 @@
["process-taskable-h", "process-taskable-h", 3, ["ENGINE", "GAME"], "engine/process-drawable"],
["focus", "focus", 3, ["ENGINE", "GAME"], "engine/process-drawable"],
["effect-control-h", "effect-control-h", 3, ["ENGINE", "GAME"], "engine/game"],
["effect-control", "effect-control", 3, ["ENGINE", "GAME"], "engine/game"],
["collide-frag-h", "collide-frag-h", 3, ["ENGINE", "GAME"], "engine/collide"],
["collide-hash-h", "collide-hash-h", 3, ["ENGINE", "GAME"], "engine/spatial-hash"],
["chain-physics-h", "chain-physics-h", 3, ["ENGINE", "GAME"], "engine/physics"],
File diff suppressed because it is too large Load Diff
+20 -2
View File
@@ -5,7 +5,12 @@
;; name in dgo: debug-part
;; dgos: ENGINE, GAME
;; og:ignore-form:sparticle-track-root-money
(deftype hud-money (hud)
"Not actually defined in jak 2's code, but referenced."
()
:method-count-assert 27
:size-assert #xba4
:flag-assert #x1b0b300ba4)
;; DECOMP BEGINS
@@ -1662,7 +1667,20 @@
)
)
;; ERROR: failed type prop at 2: Unknown symbol: hud-money
(defun sparticle-track-root-money ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
"Hopefully unused, it still uses a jak 1 symbol -- [[hud-money]] which no longer exists!"
(let ((v1-1 (-> arg1 key proc)))
(when (!= (-> v1-1 type) hud-money)
(let ((v1-3 (-> v1-1 root trans)))
(set! (-> arg2 x) (-> v1-3 x))
(set! (-> arg2 y) (+ 2048.0 (-> v1-3 y)))
(set! (-> arg2 z) (-> v1-3 z))
)
)
)
0
(none)
)
(defpart 412
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
+3
View File
@@ -31,6 +31,9 @@
(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
(define-extern dma-add-process-drawable (function process-drawable draw-control symbol dma-buffer none))
;; gun
(define-extern line-in-view-frustum? (function vector vector symbol))
;; DECOMP BEGINS
(deftype drawable (basic)
+2 -2
View File
@@ -149,7 +149,7 @@
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref security-wall :method-count 27)
:ptype (type-ref security-wall :method-count 25)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
@@ -170,7 +170,7 @@
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref fruit-stand :method-count 31)
:ptype (type-ref fruit-stand :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
+14 -14
View File
@@ -125,7 +125,7 @@
:size-assert #x2c0
:flag-assert #xa000002c0
(:methods
(gun-info-method-9 (_type_) none 9)
(gun-info-method-9 (_type_) (inline-array vector) 9)
)
)
@@ -196,10 +196,10 @@
)
)
(defskelgroup skel-gun gun gun-lod0-jg -1
((gun-lod0-mg (meters 999999)))
(defskelgroup skel-gun gun 9 -1
((10 (meters 999999)))
:bounds (static-spherem 0 0 0 1.5)
:shadow gun-shadow-mg
:shadow 11
:sort 1
:origin-joint-index 3
)
@@ -214,36 +214,36 @@
)
)
(defskelgroup skel-ammo-yellow gun gun-ammo-yellow-lod0-jg gun-ammo-idle-ja
((gun-ammo-yellow-lod0-mg (meters 999999)))
(defskelgroup skel-ammo-yellow gun 0 8
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:texture-level 6
:sort 1
)
(defskelgroup skel-ammo-red gun gun-ammo-red-lod0-jg gun-ammo-idle-ja
((gun-ammo-red-lod0-mg (meters 999999)))
(defskelgroup skel-ammo-red gun 2 8
((3 (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:texture-level 6
:sort 1
)
(defskelgroup skel-ammo-blue gun gun-ammo-blue-lod0-jg gun-ammo-idle-ja
((gun-ammo-blue-lod0-mg (meters 999999)))
(defskelgroup skel-ammo-blue gun 4 8
((5 (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:texture-level 6
:sort 1
)
(defskelgroup skel-ammo-dark gun gun-ammo-dark-lod0-jg gun-ammo-idle-ja
((gun-ammo-dark-lod0-mg (meters 999999)))
(defskelgroup skel-ammo-dark gun 6 8
((7 (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:texture-level 6
:sort 1
)
(defskelgroup skel-gun-red-cone gun gun-red-cone-lod0-jg gun-red-cone-idle-ja
((gun-red-cone-lod0-mg (meters 999999)))
(defskelgroup skel-gun-red-cone gun 40 42
((41 (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:texture-level 6
)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1829,7 +1829,7 @@
;; WARN: Return type mismatch symbol vs none.
;; WARN: new jak 2 until loop case, check carefully
(defbehavior target-edge-grab-anim target ()
(defbehavior target-edge-grab-anim target ((arg0 float))
(ja-channel-push! 1 (seconds 0.15))
(ja :group! (-> self draw art-group data 35) :num! min)
(until (ja-done? 0)
+18
View File
@@ -142,6 +142,24 @@
;; target-anim
(define-extern target-stance-ambient (state target))
;; target2
(define-extern target-gun-check (function none :behavior target))
(define-extern target-gun-fire (function pickup-type none :behavior target))
(define-extern target-clone-anim (state handle target))
(define-extern target-darkjak-end-mode (function none :behavior target))
(define-extern target-gun-init (function int none :behavior target))
(define-extern target-demo (state symbol target))
(define-extern target-title (state symbol target))
(define-extern target-pole-flip-up (state object object float target))
(define-extern target-pole-flip-forward (state float float float target))
(define-extern target-pole-flip-up-jump (state float float target))
(define-extern target-pole-flip-forward-jump (state float float target))
(define-extern target-edge-grab-jump (state float float target))
(define-extern target-edge-grab-off (state target))
(define-extern *hit-ground-hard-mods* surface)
(define-extern target-death (state symbol target))
(define-extern *float-mods* surface)
;; og:ignore-form:(new 'static 'boxed-array
;; DECOMP BEGINS
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -4,6 +4,7 @@
;; definition for function drawable-sphere-box-intersect?
;; INFO: Used lq/sq
(defun drawable-sphere-box-intersect? ((drawable drawable) (bbox bounding-box4w))
"TODO"
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128))
(rlet ((vf1 :class vf)
(vf2 :class vf)
@@ -45,6 +46,7 @@
;; definition for function instance-sphere-box-intersect?
;; INFO: Used lq/sq
(defun instance-sphere-box-intersect? ((drawable drawable) (tie instance-tie) (bbox bounding-box4w))
"TODO"
(local-vars
(v1-3 uint128)
(v1-4 uint128)
@@ -162,6 +164,7 @@
;; definition for function instance-tfragment-add-debug-sphere
;; INFO: Used lq/sq
(defun instance-tfragment-add-debug-sphere ((drawable drawable) (tie instance-tie))
"TODO"
(local-vars (v1-1 uint128) (v1-2 uint128) (a3-0 float))
(rlet ((vf0 :class vf)
(vf10 :class vf)
@@ -195,7 +198,3 @@
)
)
)
File diff suppressed because it is too large Load Diff
+12 -38
View File
@@ -1748,46 +1748,20 @@
)
;; definition for function sparticle-track-root-money
;; ERROR: failed type prop at 2: Unknown symbol: hud-money
(defun sparticle-track-root-money ((a0-0 sparticle-system) (a1-0 sparticle-cpuinfo) (a2-0 vector))
;; WARN: Return type mismatch int vs none.
(defun sparticle-track-root-money ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
"Hopefully unused, it still uses a jak 1 symbol -- [[hud-money]] which no longer exists!"
(local-vars
(v0-0 none)
(v1-0 sparticle-launch-control)
(v1-1 process-drawable)
(v1-2 none)
(v1-3 none)
(a0-1 none)
(a0-3 none)
(a1-1 none)
(f0-0 none)
(f0-1 none)
(f0-2 none)
(f0-3 none)
(f1-0 none)
(let ((v1-1 (-> arg1 key proc)))
(when (!= (-> v1-1 type) hud-money)
(let ((v1-3 (-> v1-1 root trans)))
(set! (-> arg2 x) (-> v1-3 x))
(set! (-> arg2 y) (+ 2048.0 (-> v1-3 y)))
(set! (-> arg2 z) (-> v1-3 z))
)
)
)
(when (begin
(set! v1-0 (-> a1-0 key))
(set! v1-1 (-> v1-0 proc))
(set! a0-1 (the-as none hud-money))
(set! a1-1 (the-as none (-> v1-1 type)))
(!= a1-1 a0-1)
)
(set! v1-2 (the-as none (l.wu (+ v1-1 124))))
(set! v1-3 (the-as none (+ v1-2 12)))
(set! f0-0 (the-as none (l.f v1-3)))
(s.f! a2-0 f0-0)
(set! a0-3 (the-as none #x45000000))
(set! f0-1 (the-as none (gpr->fpr a0-3)))
(set! f1-0 (the-as none (l.f (+ v1-3 4))))
(set! f0-2 (the-as none (+.s f0-1 f1-0)))
(s.f! (+ a2-0 4) f0-2)
(set! f0-3 (the-as none (l.f (+ v1-3 8))))
(s.f! (+ a2-0 8) f0-3)
(set! v1-4 (the-as none (fpr->gpr f0-3)))
)
(set! v0-0 (the-as none 0))
(ret-none)
0
(none)
)
;; failed to figure out what this is:
+6 -2
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *entity-info*, type (array entity-info)
(define *entity-info* (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref stadium-part :method-count 19)
@@ -142,7 +144,7 @@
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref security-wall :method-count 27)
:ptype (type-ref security-wall :method-count 25)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
@@ -163,7 +165,7 @@
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref fruit-stand :method-count 31)
:ptype (type-ref fruit-stand :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
@@ -186,6 +188,8 @@
)
)
;; definition for function entity-info-lookup
;; WARN: Return type mismatch basic vs entity-info.
(defun entity-info-lookup ((arg0 type))
"Given a type, return the [[entity-info]] from [[*entity-info*]] whos type
matches the `ptype` field. Set's `method 13` on said type that returns the `length`
@@ -1,5 +1,8 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 3 of type sparticle-launcher
;; WARN: Return type mismatch int vs sparticle-launcher.
(defmethod inspect sparticle-launcher ((obj sparticle-launcher))
(format #t "~X: sparticle-launcher~%" obj)
(let ((s5-0 0))
@@ -248,16 +251,22 @@
(the-as sparticle-launcher 0)
)
;; failed to figure out what this is:
(kmemopen global "part-tables")
;; definition for symbol *part-id-table*, type (array sparticle-launcher)
(define *part-id-table* (new 'global 'boxed-array sparticle-launcher 5760))
;; definition for symbol *part-group-id-table*, type (array sparticle-launch-group)
(define *part-group-id-table* (new 'global 'boxed-array sparticle-launch-group 1408))
;; definition for symbol *sp-temp*, type int
(define *sp-temp* 0)
;; failed to figure out what this is:
(kmemclose)
;; definition for function lookup-part-group-by-name
(defun lookup-part-group-by-name ((arg0 string))
"Iterate through the [[*part-group-id-table*]] and return the matching [[sparticle-launch-group]], or [[#f]] otherwise"
(let* ((s5-0 *part-group-id-table*)
@@ -274,6 +283,8 @@
(the-as sparticle-launch-group #f)
)
;; definition for function lookup-part-group-pointer-by-name
;; WARN: Return type mismatch (pointer sparticle-launch-group) vs (pointer object).
(defun lookup-part-group-pointer-by-name ((arg0 string))
"Similar to [[lookup-part-group-by-name]] but returns a pointer instead"
(let* ((s4-0 *part-group-id-table*)
@@ -290,6 +301,7 @@
(the-as (pointer sparticle-launch-group) #f)
)
;; definition for function part-group-pointer?
(defun part-group-pointer? ((arg0 pointer))
"Verifies if the given pointer, points to a [[sparticle-launch-group]]"
(let ((v1-0 *part-group-id-table*))
@@ -297,6 +309,7 @@
)
)
;; definition for function unlink-part-group-by-heap
(defun unlink-part-group-by-heap ((arg0 kheap))
(let* ((v1-0 *part-group-id-table*)
(a2-0 (-> v1-0 length))
@@ -316,7 +329,10 @@
0
)
;; definition for function sp-init-fields!
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition of type sp-queued-launch-particles
(deftype sp-queued-launch-particles (structure)
((sp-system sparticle-system :offset-assert 0)
(sp-launcher sparticle-launcher :offset-assert 4)
@@ -327,6 +343,7 @@
:flag-assert #x900000020
)
;; definition for method 3 of type sp-queued-launch-particles
(defmethod inspect sp-queued-launch-particles ((obj sp-queued-launch-particles))
(when (not obj)
(set! obj obj)
@@ -340,6 +357,7 @@
obj
)
;; definition of type sp-launch-queue
(deftype sp-launch-queue (basic)
((in-use int32 :offset-assert 4)
(queue sp-queued-launch-particles 256 :inline :offset-assert 16)
@@ -349,6 +367,7 @@
:flag-assert #x900002010
)
;; definition for method 3 of type sp-launch-queue
(defmethod inspect sp-launch-queue ((obj sp-launch-queue))
(when (not obj)
(set! obj obj)
@@ -361,16 +380,23 @@
obj
)
;; failed to figure out what this is:
(kmemopen global "launcher-queue")
;; definition for symbol *sp-launcher-lock*, type symbol
(define *sp-launcher-lock* #f)
;; definition for symbol *sp-launch-queue*, type sp-launch-queue
(define *sp-launch-queue* (new 'global 'sp-launch-queue))
;; definition for symbol *sp-launcher-enable*, type symbol
(define *sp-launcher-enable* #t)
;; failed to figure out what this is:
(kmemclose)
;; definition for function particle-setup-adgif
;; WARN: Return type mismatch int vs none.
(defun particle-setup-adgif ((arg0 adgif-shader) (arg1 int))
(let ((a1-1 (lookup-texture-by-id-fast (the-as texture-id arg1)))
(s5-0 #f)
@@ -397,6 +423,7 @@
(none)
)
;; definition of type particle-adgif-cache
(deftype particle-adgif-cache (basic)
((used int32 :offset-assert 4)
(last uint16 :offset-assert 8)
@@ -409,6 +436,7 @@
:flag-assert #x9000019b0
)
;; definition for method 3 of type particle-adgif-cache
(defmethod inspect particle-adgif-cache ((obj particle-adgif-cache))
(when (not obj)
(set! obj obj)
@@ -424,14 +452,20 @@
obj
)
;; failed to figure out what this is:
(kmemopen global "part-adgif-cache")
;; definition for symbol *particle-adgif-cache*, type particle-adgif-cache
(define *particle-adgif-cache* (new 'global 'particle-adgif-cache))
;; failed to figure out what this is:
(set! (-> *particle-adgif-cache* used) 0)
;; failed to figure out what this is:
(kmemclose)
;; definition for function particle-adgif-cache-flush
;; WARN: Return type mismatch int vs none.
(defun particle-adgif-cache-flush ()
"Clear [[*particle-adgif-cache*]]"
(set! (-> *particle-adgif-cache* used) 0)
@@ -440,7 +474,16 @@
(none)
)
;; definition for function particle-adgif
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function particle-adgif-callback
;; WARN: Return type mismatch int vs none.
;; ERROR: Bad vector register dependency: vf16
;; ERROR: Bad vector register dependency: vf17
;; ERROR: Bad vector register dependency: vf18
;; ERROR: Bad vector register dependency: vf19
;; ERROR: Bad vector register dependency: vf20
(defun particle-adgif-callback ((arg0 adgif-shader) (arg1 texture-id))
(local-vars (v1-0 float))
(rlet ((vf16 :class vf)
@@ -474,6 +517,8 @@
)
)
;; definition for function sp-queue-launch
;; INFO: Used lq/sq
(defun sp-queue-launch ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 matrix))
(let ((v1-0 *sp-launch-queue*))
(when (= (-> v1-0 in-use) 256)
@@ -492,6 +537,8 @@
)
)
;; definition for function sp-adjust-launch
;; WARN: Return type mismatch int vs none.
(defun sp-adjust-launch ((arg0 sparticle-launchinfo)
(arg1 sparticle-cpuinfo)
(arg2 (inline-array sp-field-init-spec))
@@ -541,6 +588,8 @@
(none)
)
;; definition for function sp-euler-convert
;; WARN: Return type mismatch int vs none.
(defun sp-euler-convert ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo))
(local-vars (v1-1 float) (v1-2 float))
(rlet ((vf0 :class vf)
@@ -588,6 +637,8 @@
)
)
;; definition for function sp-rotate-system
;; WARN: Return type mismatch int vs none.
(defun sp-rotate-system ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo) (arg2 transformq))
(let ((s5-0 (new 'stack-no-clear 'matrix)))
(let ((a1-1 (new 'stack-no-clear 'quaternion)))
@@ -614,6 +665,7 @@
(none)
)
;; definition of type sp-launch-stack
(deftype sp-launch-stack (structure)
((ra basic :offset-assert 0)
(dummy0 basic :offset-assert 4)
@@ -637,6 +689,8 @@
:flag-assert #x900000130
)
;; definition for method 3 of type sp-launch-stack
;; INFO: Used lq/sq
(defmethod inspect sp-launch-stack ((obj sp-launch-stack))
(when (not obj)
(set! obj obj)
@@ -663,9 +717,16 @@
obj
)
;; definition for function sp-launch-particles-var
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for symbol *death-adgif*, type adgif-shader
(define *death-adgif* (the-as adgif-shader #f))
;; definition for function sp-launch-particles-death
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
;; WARN: Function sp-launch-particles-death has a return type of none, but the expression builder found a return statement.
(defun sp-launch-particles-death ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 vector))
(local-vars (v1-26 float) (v1-28 float))
(rlet ((vf0 :class vf)
@@ -765,6 +826,9 @@
)
)
;; definition for function sp-clear-queue
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun sp-clear-queue ()
(let ((gp-0 *sp-launch-queue*)
(s5-0 *launch-matrix*)
@@ -791,6 +855,8 @@
(none)
)
;; definition for function sp-relaunch-setup-fields
;; WARN: Return type mismatch int vs none.
(defun sp-relaunch-setup-fields ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d))
(let ((a1-1 (-> arg1 init-specs 0))
(s4-0 (logand (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)))
@@ -888,6 +954,8 @@
(none)
)
;; definition for function sp-relaunch-particle-2d
;; WARN: Return type mismatch int vs none.
(defun sp-relaunch-particle-2d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d))
(sp-relaunch-setup-fields arg0 arg1 arg2 arg3)
(when (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort))
@@ -901,6 +969,8 @@
(none)
)
;; definition for function sp-relaunch-particle-3d
;; WARN: Return type mismatch int vs none.
(defun sp-relaunch-particle-3d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d))
(local-vars (v1-9 float) (v1-10 float))
(rlet ((vf0 :class vf)
@@ -978,6 +1048,8 @@
)
)
;; definition for method 9 of type sparticle-launch-control
;; WARN: Return type mismatch int vs none.
(defmethod initialize sparticle-launch-control ((obj sparticle-launch-control) (arg0 sparticle-launch-group) (arg1 process))
(with-pp
(let ((s5-0 0))
@@ -1062,6 +1134,8 @@
)
)
;; definition for method 9 of type sparticle-launch-group
;; WARN: Return type mismatch object vs sparticle-launch-control.
(defmethod create-launch-control sparticle-launch-group ((obj sparticle-launch-group) (arg0 process))
(let ((gp-0 (the-as object (new 'process 'sparticle-launch-control (-> obj length)))))
(when (zero? (the-as sparticle-launch-control gp-0))
@@ -1075,6 +1149,8 @@
)
)
;; definition for method 14 of type sparticle-launch-control
;; WARN: Return type mismatch int vs none.
(defmethod kill-and-free-particles sparticle-launch-control ((obj sparticle-launch-control))
(countdown (v1-0 (-> obj length))
(let ((a0-4 (-> obj data v1-0)))
@@ -1091,12 +1167,15 @@
(none)
)
;; definition for method 15 of type sparticle-launch-control
;; WARN: Return type mismatch int vs none.
(defmethod kill-particles sparticle-launch-control ((obj sparticle-launch-control))
(kill-all-particles-with-key obj)
0
(none)
)
;; definition for method 10 of type sparticle-launch-control
(defmethod is-visible? sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
(let* ((v1-0 (-> obj group))
(f0-0 (-> v1-0 bounds r))
@@ -1128,6 +1207,8 @@
)
)
;; definition for method 12 of type sparticle-launch-control
;; INFO: Used lq/sq
(defmethod spawn-with-matrix sparticle-launch-control ((obj sparticle-launch-control) (arg0 matrix))
(let* ((a2-0 (-> obj origin))
(a3-0 arg0)
@@ -1174,6 +1255,8 @@
(none)
)
;; definition for method 13 of type sparticle-launch-control
;; INFO: Used lq/sq
(defmethod spawn-with-cspace sparticle-launch-control ((obj sparticle-launch-control) (arg0 cspace))
(let* ((v1-0 (-> obj origin))
(a3-0 (-> arg0 bone transform))
@@ -1220,6 +1303,10 @@
(none)
)
;; definition for method 11 of type sparticle-launch-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 11 sparticle-launch-control) has a return type of none, but the expression builder found a return statement.
(defmethod spawn sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
(with-pp
(set! (-> obj origin trans quad) (-> arg0 quad))
@@ -1407,6 +1494,9 @@
)
)
;; definition for function execute-part-engine
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun execute-part-engine ()
(local-vars (sv-96 sparticle-launcher) (sv-104 int))
(let ((gp-0 *sp-particle-system-2d*))
@@ -1512,6 +1602,8 @@
(none)
)
;; definition for function sparticle-track-root
;; WARN: Return type mismatch int vs none.
(defun sparticle-track-root ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector))
(let ((v1-3 (-> arg1 key proc root trans)))
(set! (-> arg2 x) (-> v1-3 x))
@@ -1522,6 +1614,8 @@
(none)
)
;; definition for function sparticle-track-root-prim
;; WARN: Return type mismatch int vs none.
(defun sparticle-track-root-prim ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector))
(let ((v1-4 (-> (the-as collide-shape (-> arg1 key proc root)) root-prim prim-core)))
(set! (-> arg2 x) (-> v1-4 world-sphere x))
@@ -1532,6 +1626,8 @@
(none)
)
;; definition for function sparticle-track-joint
;; WARN: Return type mismatch int vs none.
(defun sparticle-track-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(let* ((v1-1 (-> arg1 key proc))
(a1-1 (the int (-> arg1 user-float)))
@@ -1545,6 +1641,8 @@
(none)
)
;; definition for function sparticle-turn-to-vel
;; WARN: Return type mismatch int vs none.
(defun sparticle-turn-to-vel ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d))
(local-vars (v1-1 float) (v1-2 float))
(rlet ((vf0 :class vf)
@@ -1576,6 +1674,8 @@
)
)
;; definition for function birth-func-copy-rot-color
;; WARN: Return type mismatch int vs none.
(defun birth-func-copy-rot-color ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
@@ -1629,8 +1729,12 @@
)
)
;; definition for symbol *global-toggle*, type int
(define *global-toggle* 0)
;; definition for function birth-func-copy2-rot-color
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun birth-func-copy2-rot-color ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
@@ -1693,6 +1797,8 @@
)
)
;; definition for function birth-func-copy-omega-to-z
;; WARN: Return type mismatch int vs none.
(defun birth-func-copy-omega-to-z ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
@@ -1706,6 +1812,8 @@
(none)
)
;; definition for function birth-func-random-next-time
;; WARN: Return type mismatch int vs none.
(defun birth-func-random-next-time ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
@@ -1717,6 +1825,9 @@
(none)
)
;; definition for function sparticle-respawn-heights
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun sparticle-respawn-heights ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(let ((gp-0 (the-as (array int32) (-> arg1 user-float))))
(when (and (nonzero? gp-0)
@@ -1757,6 +1868,9 @@
(none)
)
;; definition for function sparticle-respawn-timer
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun sparticle-respawn-timer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(when (<= (-> arg1 timer) 0)
(let ((gp-0 (the-as object (-> arg1 user-float))))
@@ -1795,6 +1909,8 @@
(none)
)
;; definition for function sparticle-texture-animate
;; WARN: Return type mismatch symbol vs none.
(defun sparticle-texture-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(let ((v1-0 (the-as (array int32) (-> arg1 user-float))))
(when (nonzero? v1-0)
@@ -1832,6 +1948,11 @@
(none)
)
;; definition for function sparticle-texture-day-night
;; INFO: Used lq/sq
;; WARN: Return type mismatch symbol vs none.
;; ERROR: Bad vector register dependency: vf1
;; ERROR: Bad vector register dependency: vf2
(defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d))
(local-vars
(v1-9 uint128)
@@ -1951,6 +2072,8 @@
)
)
;; definition for function sparticle-mode-animate
;; WARN: Return type mismatch int vs none.
(defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d))
(let ((a0-1 (-> arg1 key))
(v1-0 (the-as object (-> arg1 user-float)))
@@ -1998,7 +2121,11 @@
(none)
)
;; definition for function sparticle-motion-blur
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition (debug) for function sparticle-motion-blur-old
;; WARN: Return type mismatch int vs object.
(defun-debug sparticle-motion-blur-old ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d))
"Unused"
(let ((s2-0 (new 'stack-no-clear 'vector))
@@ -2044,6 +2171,8 @@
0
)
;; definition for function sparticle-set-conerot
;; WARN: Return type mismatch int vs none.
(defun sparticle-set-conerot ((arg0 sparticle-launcher) (arg1 vector))
(let ((s5-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-x)))
(s4-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-y)))
@@ -2057,6 +2186,7 @@
(none)
)
;; definition for function sparticle-next-on-mode-1
(defun sparticle-next-on-mode-1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(if (zero? (-> arg1 key state-mode 0))
(set! (-> arg1 next-time)
@@ -2066,6 +2196,7 @@
0.0
)
;; definition for function check-ground-bounce
(defun check-ground-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(let ((f0-1 (+ (-> arg1 key origin trans y) (-> arg1 user-float))))
(when (and (< (-> arg2 launchrot y) f0-1) (< (-> arg1 vel-sxvel y) 0.0))
@@ -2075,6 +2206,8 @@
)
)
;; definition for function check-drop-group-center
;; WARN: Return type mismatch symbol vs none.
(defun check-drop-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(let ((f0-0 (-> arg1 key origin trans y)))
(if (< (-> arg2 launchrot y) f0-0)
@@ -2084,18 +2217,24 @@
(none)
)
;; definition for function birth-func-y->userdata
;; WARN: Return type mismatch int vs none.
(defun birth-func-y->userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(+! (-> arg1 user-float) (-> arg2 vector 0 y))
0
(none)
)
;; definition for function birth-func-ocean-height
;; WARN: Return type mismatch int vs none.
(defun birth-func-ocean-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
(set! (-> arg2 vector 0 y) (+ (get-height *ocean* (the-as vector (-> arg2 vector)) #t) (-> arg1 user-float)))
0
(none)
)
;; definition for function birth-func-camera-orient
;; WARN: Return type mismatch int vs none.
(defun birth-func-camera-orient ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(local-vars (v1-0 float) (v1-1 float))
(rlet ((vf0 :class vf)
@@ -2133,8 +2272,11 @@
)
)
;; definition for symbol *particle-quat*, type quaternion
(define *particle-quat* (new 'static 'quaternion :w 1.0))
;; definition for function birth-func-set-quat
;; WARN: Return type mismatch int vs none.
(defun birth-func-set-quat ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(local-vars (a0-2 float) (a0-3 float))
(rlet ((vf0 :class vf)
@@ -2167,8 +2309,11 @@
)
)
;; definition for symbol *particle-vel*, type vector
(define *particle-vel* (new 'static 'vector :w 1.0))
;; definition for function birth-func-set-vel
;; WARN: Return type mismatch int vs none.
(defun birth-func-set-vel ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(let ((v1-0 *particle-vel*))
(set! (-> arg1 vel-sxvel x) (-> v1-0 x))
@@ -2179,6 +2324,8 @@
(none)
)
;; definition for function birth-func-texture-group
;; WARN: Return type mismatch int vs none.
(defun birth-func-texture-group ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
(let ((s5-0 (the-as (array int32) (-> arg1 user-float))))
(when (nonzero? s5-0)
@@ -2195,6 +2342,8 @@
(none)
)
;; definition for method 9 of type sparticle-launcher
;; WARN: new jak 2 until loop case, check carefully
(defmethod get-field-spec-by-id sparticle-launcher ((obj sparticle-launcher) (arg0 sp-field-id))
"Returns the [[sp-field-init-spec]] that has the matching [[sp-field-id]]"
(let ((v1-0 0))
@@ -2217,6 +2366,8 @@
(the-as sp-field-init-spec #f)
)
;; definition for method 10 of type sparticle-launcher
;; WARN: Return type mismatch int vs none.
(defmethod setup-user-array sparticle-launcher ((obj sparticle-launcher) (arg0 string))
(let ((s5-0 (get-field-spec-by-id obj (sp-field-id spt-texture)))
(v1-1 (lookup-texture-id-by-name arg0 (the-as string #f)))
+1 -1
View File
@@ -133,7 +133,7 @@
:size-assert #x2c0
:flag-assert #xa000002c0
(:methods
(gun-info-method-9 (_type_) none 9)
(gun-info-method-9 (_type_) (inline-array vector) 9)
)
)
File diff suppressed because it is too large Load Diff
+1 -5
View File
@@ -1847,7 +1847,7 @@
;; definition for function target-edge-grab-anim
;; WARN: Return type mismatch symbol vs none.
;; WARN: new jak 2 until loop case, check carefully
(defbehavior target-edge-grab-anim target ()
(defbehavior target-edge-grab-anim target ((arg0 float))
(ja-channel-push! 1 (seconds 0.15))
(ja :group! (-> self draw art-group data 35) :num! min)
(until (ja-done? 0)
@@ -1879,7 +1879,3 @@
#f
(none)
)
File diff suppressed because it is too large Load Diff
-3
View File
@@ -164,9 +164,6 @@
"(method 21 load-state)",
// debug-part
"sparticle-track-root-money", // references a non-existance jak1 symbol "hud-money"
"(method 16 level)", "unpack-comp-lzo", // asm mods
"update-time-of-day",