mirror of
https://github.com/open-goal/jak-project
synced 2026-05-23 06:54:31 -04:00
d/jak2: finish the majority of sparticle and sparticle-launcher (#1840)
* sparticle-launcher * d/jak2: large amount of `sparticle-launcher` done * d/jak2: finish the majority of `sparticle` * decomp: improve format code ignoring * d/jak2: make bits unique in `sp-cpuinfo-flag` * d/jak1: revert config change
This commit is contained in:
Vendored
+1
-1
@@ -11,7 +11,7 @@
|
||||
"program": "${workspaceFolder}/scripts/gsrc/update-from-decomp.py",
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["--game", "jak2", "--file", "sky-data"]
|
||||
"args": ["--game", "jak2", "--file", "sparticle-h"]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
+160
-142
@@ -27,7 +27,7 @@
|
||||
(define-extern global kheap)
|
||||
(define-extern kheap type)
|
||||
|
||||
|
||||
(define-extern #t symbol)
|
||||
|
||||
;; some types we need.
|
||||
(declare-type sparticle-launch-group basic)
|
||||
@@ -5687,14 +5687,15 @@
|
||||
)
|
||||
|
||||
(declare-type game-text-id uint32)
|
||||
(declare-type engine basic)
|
||||
(deftype level (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(load-name basic :offset-assert 8)
|
||||
(nickname basic :offset-assert 12)
|
||||
(load-name string :offset-assert 8)
|
||||
(nickname string :offset-assert 12)
|
||||
(index int32 :offset-assert 16)
|
||||
(status symbol :offset-assert 20)
|
||||
(borrow-level basic 2 :offset-assert 24)
|
||||
(borrow-from-level basic :offset-assert 32)
|
||||
(borrow-level level 2 :offset-assert 24)
|
||||
(borrow-from-level level :offset-assert 32)
|
||||
(heap kheap :inline :offset-assert 48)
|
||||
(borrow-heap kheap 2 :inline :offset-assert 64)
|
||||
(bsp bsp-header :offset-assert 96)
|
||||
@@ -5741,24 +5742,24 @@
|
||||
(texture-dirty-masks texture-mask 10 :inline :offset-assert 4576)
|
||||
(texture-mask texture-mask 18 :inline :offset-assert 4736)
|
||||
(sky-mask texture-mask :inline :offset-assert 5024)
|
||||
(tfrag-masks basic :offset-assert 5040)
|
||||
(tfrag-masks texture-masks-array :offset-assert 5040)
|
||||
(tfrag-dists pointer :offset-assert 5044)
|
||||
(shrub-masks basic :offset-assert 5048)
|
||||
(shrub-masks texture-masks-array :offset-assert 5048)
|
||||
(shrub-dists pointer :offset-assert 5052)
|
||||
(alpha-masks basic :offset-assert 5056)
|
||||
(alpha-masks texture-masks-array :offset-assert 5056)
|
||||
(alpha-dists pointer :offset-assert 5060)
|
||||
(water-masks basic :offset-assert 5064)
|
||||
(water-masks texture-masks-array :offset-assert 5064)
|
||||
(water-dists pointer :offset-assert 5068)
|
||||
(tfrag-last-calls int32 6 :offset-assert 5072)
|
||||
(texture-anim-array texture-anim-array 10 :offset-assert 5096)
|
||||
(light-hash basic :offset-assert 5136)
|
||||
(light-hash light-hash :offset-assert 5136)
|
||||
(draw-priority float :offset-assert 5140)
|
||||
(draw-index int32 :offset-assert 5144)
|
||||
(part-engine basic :offset-assert 5148)
|
||||
(part-engine engine :offset-assert 5148)
|
||||
(user-object basic 4 :offset-assert 5152)
|
||||
(loaded-text-info-count int32 :offset-assert 5168)
|
||||
(loaded-text-info game-text-info 8 :offset-assert 5172)
|
||||
(level-type basic :offset-assert 5204)
|
||||
(level-type type :offset-assert 5204)
|
||||
(load-order int64 :offset-assert 5208)
|
||||
|
||||
;; ??
|
||||
@@ -7429,14 +7430,14 @@
|
||||
(define-extern relocate-later (function symbol))
|
||||
;; (define-extern texture-page-login function) ;; (function texture-id (function texture-pool texture-page kheap int texture-page) kheap texture-page-dir-entry)
|
||||
(define-extern lookup-texture-by-id (function texture-id texture))
|
||||
;; (define-extern lookup-texture-by-id-fast function)
|
||||
(define-extern lookup-texture-by-id-fast (function texture-id texture))
|
||||
;; (define-extern lookup-texture-by-name function)
|
||||
;; (define-extern lookup-texture-id-by-name function)
|
||||
(define-extern lookup-texture-id-by-name (function string symbol texture-id))
|
||||
;; (define-extern lookup-level-texture-by-name function)
|
||||
(define-extern *shader-list* pair)
|
||||
(define-extern *edit-shader* texture-id)
|
||||
;; (define-extern link-texture-by-id function) ;; (function texture-id adgif-shader texture-page-dir-entry)
|
||||
;; (define-extern adgif-shader<-texture! function) ;; (function adgif-shader texture adgif-shader)
|
||||
(define-extern adgif-shader<-texture! (function adgif-shader texture adgif-shader)) ;;
|
||||
(define-extern adgif-shader-update! (function adgif-shader texture none))
|
||||
;; (define-extern adgif-shader<-texture-with-update! function) ;; (function adgif-shader texture adgif-shader)
|
||||
;; (define-extern hack-texture function)
|
||||
@@ -7444,7 +7445,7 @@
|
||||
(define-extern adgif-shader-login-no-remap (function adgif-shader texture))
|
||||
;; (define-extern adgif-shader-login-fast function) ;; (function adgif-shader texture)
|
||||
;; (define-extern adgif-shader-login-no-remap-fast function) ;; (function adgif-shader texture)
|
||||
;; (define-extern adgif-shader<-texture-simple! function) ;; (function adgif-shader texture adgif-shader)
|
||||
(define-extern adgif-shader<-texture-simple! (function adgif-shader texture adgif-shader)) ;;
|
||||
(define-extern set-dirty-mask!
|
||||
"First arg is the level name off the [[*level*]]'s `default-level`"
|
||||
(function string int int int none))
|
||||
@@ -9576,7 +9577,7 @@
|
||||
:size-assert #x206c
|
||||
:flag-assert #x5c0000206c
|
||||
(:methods
|
||||
(ocean-method-11 () none 11)
|
||||
(ocean-method-11 (_type_ (inline-array vector) symbol) float 11)
|
||||
(ocean-method-12 () none 12)
|
||||
(ocean-method-13 () none 13)
|
||||
(ocean-method-14 () none 14)
|
||||
@@ -18277,14 +18278,20 @@
|
||||
(bit2 2)
|
||||
)
|
||||
|
||||
;; +++sparticle-launcher-h:sp-group-flag
|
||||
(defenum sp-group-flag
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(use-local-clock 0)
|
||||
(always-draw 1)
|
||||
(screen-space 2)
|
||||
(unknown-bit-01 3) ;; beach-part
|
||||
(unk-3 3) ;; beach-part
|
||||
(unk-4 4)
|
||||
(unk-5 5)
|
||||
(unk-6 6)
|
||||
(unk-7 7)
|
||||
)
|
||||
;; ---sparticle-launcher-h:sp-group-flag
|
||||
|
||||
|
||||
(deftype sparticle-birthinfo (structure)
|
||||
@@ -18334,8 +18341,10 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(sparticle-launcher-method-9 (_type_ int) uint 9)
|
||||
(sparticle-launcher-method-10 (_type_) none 10)
|
||||
(get-field-spec-by-id
|
||||
"Returns the [[sp-field-init-spec]] that has the matching [[sp-field-id]]"
|
||||
(_type_ sp-field-id) sp-field-init-spec 9)
|
||||
(sparticle-launcher-method-10 (_type_ string) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -18398,13 +18407,13 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xa00000040
|
||||
(:methods
|
||||
(sparticle-launch-group-method-9 () none 9) ;; (create-launch-control (_type_ process) sparticle-launch-control 9)
|
||||
(create-launch-control (_type_ process) sparticle-launch-control 9) ;;
|
||||
)
|
||||
)
|
||||
|
||||
(deftype sparticle-launch-control (inline-array-class)
|
||||
((group sparticle-launch-group :offset-assert 16) ;; guessed by decompiler
|
||||
(proc process :offset-assert 20) ;; guessed by decompiler
|
||||
(proc process-drawable :offset-assert 20) ;; guessed by decompiler
|
||||
(local-clock int32 :offset-assert 24)
|
||||
(fade float :offset-assert 28)
|
||||
(matrix int8 :offset-assert 32) ;; int32
|
||||
@@ -18420,13 +18429,13 @@
|
||||
:size-assert #x70
|
||||
:flag-assert #x1000000070
|
||||
(:methods
|
||||
(sparticle-launch-control-method-9 () none 9) ;; (initialize (_type_ sparticle-launch-group process) none 9)
|
||||
(sparticle-launch-control-method-10 () none 10) ;; (is-visible? (_type_ vector) symbol 10)
|
||||
(sparticle-launch-control-method-11 () none 11) ;; (spawn (_type_ vector) object 11)
|
||||
(sparticle-launch-control-method-12 () none 12) ;; (kill-and-free-particles (_type_) none 12)
|
||||
(sparticle-launch-control-method-13 () none 13) ;; (kill-particles (_type_) none 13)
|
||||
(sparticle-launch-control-method-14 () none 14)
|
||||
(sparticle-launch-control-method-15 () none 15)
|
||||
(initialize (_type_ sparticle-launch-group process) none 9) ;;
|
||||
(sparticle-launch-control-method-10 (_type_ vector) symbol 10) ;; (is-visible? (_type_ vector) symbol 10)
|
||||
(sparticle-launch-control-method-11 (_type_ vector) none 11) ;; TODO - CFG ;; (spawn (_type_ vector) object 11)
|
||||
(sparticle-launch-control-method-12 (_type_ matrix) none 12)
|
||||
(sparticle-launch-control-method-13 (_type_ cspace) none 13)
|
||||
(kill-and-free-particles (_type_) none 14)
|
||||
(kill-particles (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -18436,30 +18445,34 @@
|
||||
;; sparticle-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; +++sparticle-h:sp-cpuinfo-flag
|
||||
(defenum sp-cpuinfo-flag
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(bit0 0)
|
||||
(bit1 1)
|
||||
(bit2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst
|
||||
(bit3 3)
|
||||
(bit4 4)
|
||||
(sp-cpuinfo-flag-0 0)
|
||||
(sp-cpuinfo-flag-1 1)
|
||||
(sp-cpuinfo-flag-2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst
|
||||
(sp-cpuinfo-flag-3 3)
|
||||
(sp-cpuinfo-flag-4 4)
|
||||
(sp-cpuinfo-flag-5 5)
|
||||
(ready-to-launch 6) ;; maybe just just death?
|
||||
(distort 7) ;; distort sprite
|
||||
(aux-list 8) ;; prevents relaunch, adds to aux
|
||||
(bit9 9)
|
||||
(sp-cpuinfo-flag-9 9)
|
||||
(level0 10)
|
||||
(level1 11)
|
||||
(bit12 12) ;; required to relaunch
|
||||
(bit13 13)
|
||||
(bit14 14)
|
||||
(sp-cpuinfo-flag-12 12) ;; required to relaunch
|
||||
(sp-cpuinfo-flag-13 13)
|
||||
(sp-cpuinfo-flag-14 14)
|
||||
(glow 15) ;; glow sprite
|
||||
(use-global-acc 16)
|
||||
(launch-along-z 17)
|
||||
(left-multiply-quat 18)
|
||||
(right-multiply-quat 19)
|
||||
(set-conerot 20)
|
||||
(sp-cpuinfo-flag-21 21)
|
||||
)
|
||||
;; ---sparticle-h:sp-cpuinfo-flag
|
||||
|
||||
(declare-type sparticle-system basic)
|
||||
(deftype sparticle-cpuinfo (structure)
|
||||
@@ -18467,18 +18480,18 @@
|
||||
(adgif adgif-shader :offset-assert 4)
|
||||
(radius float :offset-assert 8)
|
||||
(omega float :offset-assert 12)
|
||||
(vel-sxvel vector :inline :offset-assert 16)
|
||||
(vel-sxvel vector :inline :offset-assert 16) ;; these are used interchangably as vector3s' as well
|
||||
(rot-syvel vector :inline :offset-assert 32)
|
||||
(fade rgbaf :inline :offset-assert 48)
|
||||
(acc vector :inline :offset-assert 64)
|
||||
(rotvel3d quaternion :inline :offset-assert 80)
|
||||
(vel vector3s :inline :offset 16)
|
||||
(accel vector3s :inline :offset 64)
|
||||
(vel vector :inline :offset 16)
|
||||
(accel vector :inline :offset 64)
|
||||
(scalevelx float :offset 28)
|
||||
(scalevely float :offset 44)
|
||||
(friction float :offset-assert 96)
|
||||
(timer int32 :offset-assert 100)
|
||||
(flags sp-cpuinfo-flag :offset-assert 104) ;; guessed by decompiler
|
||||
(flags sp-cpuinfo-flag :offset-assert 104) ;; NOTE - loaded with lw and lwu?
|
||||
(user-int32 int32 :offset-assert 108)
|
||||
(user-uint32 uint32 :offset 108)
|
||||
(user-float float :offset 108 :score 1)
|
||||
@@ -18492,7 +18505,8 @@
|
||||
(valid uint8 :offset-assert 128) ;; symbol
|
||||
(clock-index uint8 :offset-assert 129)
|
||||
(user1-int16 uint16 :offset-assert 130)
|
||||
(key sparticle-launch-control :offset-assert 132) ;; guessed by decompiler
|
||||
(key sparticle-launch-control :offset-assert 132)
|
||||
(key-alt sparticle-launch-state :offset 132)
|
||||
(binding sparticle-launch-state :offset-assert 136)
|
||||
(data uint32 1 :offset 12) ;; guessed by decompiler
|
||||
(datab uint8 4 :offset 12)
|
||||
@@ -18506,7 +18520,7 @@
|
||||
)
|
||||
|
||||
(deftype sparticle-launchinfo (structure)
|
||||
((launchrot vector :inline :offset-assert 0)
|
||||
((launchrot vector :inline :offset-assert 0) ; NOTE - both used as a vector3s and a normal vector
|
||||
(conerot vector :inline :offset-assert 16)
|
||||
(rotate-x float :offset-assert 32)
|
||||
(rotate-y float :offset-assert 36)
|
||||
@@ -18539,6 +18553,8 @@
|
||||
:method-count-assert 9
|
||||
:size-assert #x34
|
||||
:flag-assert #x900000034
|
||||
(:methods
|
||||
(new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_ 0))
|
||||
)
|
||||
|
||||
(define-extern *sp-60-hz* symbol)
|
||||
@@ -18589,13 +18605,16 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
;; +++camera-h:cam-index-options
|
||||
(defenum cam-index-options
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(RADIAL)
|
||||
(SPHERICAL)
|
||||
)
|
||||
;; ---camera-h:cam-index-options
|
||||
|
||||
;; +++camera-h:slave-los-state
|
||||
(defenum slave-los-state
|
||||
:type uint32
|
||||
(none 0)
|
||||
@@ -18603,6 +18622,7 @@
|
||||
(ccw 2)
|
||||
(between 3)
|
||||
)
|
||||
;; ---camera-h:slave-los-state
|
||||
|
||||
(deftype cam-index (structure)
|
||||
((flags cam-index-options :offset-assert 0) ;; guessed by decompiler
|
||||
@@ -22813,7 +22833,6 @@
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype sp-queued-launch-particles (structure)
|
||||
((sp-system sparticle-system :offset-assert 0) ;; guessed by decompiler
|
||||
(sp-launcher sparticle-launcher :offset-assert 4) ;; guessed by decompiler
|
||||
@@ -22823,34 +22842,28 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype sp-launch-queue (basic)
|
||||
((in-use int32 :offset-assert 4)
|
||||
(queue sp-queued-launch-particles 256 :offset-assert 16) ;; guessed by decompiler
|
||||
(queue sp-queued-launch-particles 256 :inline :offset-assert 16) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x2010
|
||||
:flag-assert #x900002010
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype particle-adgif-cache (basic)
|
||||
((used int32 :offset-assert 4)
|
||||
(last uint16 :offset-assert 8)
|
||||
(lastgif adgif-shader :offset-assert 12)
|
||||
(tidhash uint16 80 :offset-assert 16) ;; guessed by decompiler
|
||||
(spadgif adgif-shader 80 :offset-assert 176) ;; guessed by decompiler
|
||||
(spadgif adgif-shader 80 :inline :offset-assert 176) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x19b0
|
||||
:flag-assert #x9000019b0
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype sp-launch-stack (structure)
|
||||
((ra basic :offset-assert 0)
|
||||
(dummy0 basic :offset-assert 4)
|
||||
@@ -22874,105 +22887,110 @@
|
||||
:flag-assert #x900000130
|
||||
;; field ra uses ~A with a signed load field dummy0 uses ~A with a signed load field dummy1 uses ~A with a signed load field b-spfic uses ~A with a signed load field l-spfic uses ~A with a signed load
|
||||
)
|
||||
|#
|
||||
|
||||
(define-extern *part-id-table* (array sparticle-launcher))
|
||||
(define-extern *part-group-id-table* (array sparticle-launch-group)) ;;
|
||||
;; (define-extern *sp-temp* object)
|
||||
;; (define-extern lookup-part-group-by-name function) ;; (function string basic)
|
||||
;; (define-extern lookup-part-group-pointer-by-name function) ;; (function string (pointer sparticle-launch-group))
|
||||
(define-extern part-group-pointer? (function pointer symbol))
|
||||
;; (define-extern unlink-part-group-by-heap function) ;; (function kheap int)
|
||||
;; (define-extern sp-init-fields! function) ;; (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object)
|
||||
;; (define-extern *sp-launcher-lock* object) ;; symbol
|
||||
;; (define-extern *sp-launch-queue* object) ;; sp-launch-queue
|
||||
;; (define-extern *sp-launcher-enable* object) ;; symbol
|
||||
;; (define-extern particle-setup-adgif function) ;; (function adgif-shader texture-id none)
|
||||
;; (define-extern *particle-adgif-cache* object) ;; particle-adgif-cache
|
||||
;; (define-extern particle-adgif-cache-flush function)
|
||||
;; (define-extern particle-adgif function) ;; (function adgif-shader texture-id none)
|
||||
;; (define-extern particle-adgif-callback function)
|
||||
;; (define-extern sp-queue-launch function) ;; (function sparticle-system sparticle-launcher vector int)
|
||||
;; (define-extern sp-adjust-launch function) ;; (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) none)
|
||||
;; (define-extern sp-euler-convert function) ;; (function sparticle-launchinfo sparticle-cpuinfo none)
|
||||
;; (define-extern sp-rotate-system function) ;; (function sparticle-launchinfo sparticle-cpuinfo transformq none)
|
||||
(define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none))
|
||||
;; (define-extern *death-adgif* object) ;; adgif-shader
|
||||
;; (define-extern sp-launch-particles-death function) ;; (function sparticle-system sparticle-launcher vector none)
|
||||
;; (define-extern sp-clear-queue function) ;; (function none)
|
||||
;; (define-extern sp-relaunch-setup-fields function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)
|
||||
;; (define-extern sp-relaunch-particle-2d function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)
|
||||
;; (define-extern sp-relaunch-particle-3d function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)
|
||||
(define-extern execute-part-engine (function none))
|
||||
;; (define-extern sparticle-track-root function) ;; (function object sparticle-cpuinfo vector none)
|
||||
;; (define-extern sparticle-track-root-prim function) ;; (function object sparticle-cpuinfo vector none)
|
||||
;; (define-extern sparticle-track-joint function)
|
||||
;; (define-extern sparticle-turn-to-vel function)
|
||||
;; (define-extern birth-func-copy-rot-color function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)
|
||||
;; (define-extern *global-toggle* object) ;; int
|
||||
;; (define-extern birth-func-copy2-rot-color function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)
|
||||
;; (define-extern birth-func-copy-omega-to-z function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)
|
||||
;; (define-extern birth-func-random-next-time function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)
|
||||
;; (define-extern sparticle-respawn-heights function)
|
||||
;; (define-extern sparticle-respawn-timer function)
|
||||
;; (define-extern sparticle-texture-animate function)
|
||||
;; (define-extern sparticle-texture-day-night function)
|
||||
;; (define-extern sparticle-mode-animate function)
|
||||
;; (define-extern sparticle-motion-blur function)
|
||||
;; (define-extern sparticle-motion-blur-old function)
|
||||
;; (define-extern sparticle-set-conerot function)
|
||||
;; (define-extern sparticle-next-on-mode-1 function)
|
||||
;; (define-extern check-ground-bounce function)
|
||||
;; (define-extern check-drop-group-center function)
|
||||
;; (define-extern birth-func-y->userdata function) ;; (function sparticle-system sparticle-cpuinfo matrix none)
|
||||
;; (define-extern birth-func-ocean-height function) ;; (function sparticle-system sparticle-cpuinfo matrix none)
|
||||
;; (define-extern birth-func-camera-orient function)
|
||||
(define-extern *particle-quat* quaternion)
|
||||
;; (define-extern birth-func-set-quat function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
;; (define-extern *particle-vel* object)
|
||||
;; (define-extern birth-func-set-vel function)
|
||||
;; (define-extern birth-func-texture-group function)
|
||||
(define-extern *sp-temp* int)
|
||||
(define-extern lookup-part-group-by-name
|
||||
"Iterate through the [[*part-group-id-table*]] and return the matching [[sparticle-launch-group]], or [[#f]] otherwise"
|
||||
(function string sparticle-launch-group))
|
||||
(define-extern lookup-part-group-pointer-by-name
|
||||
"Similar to [[lookup-part-group-by-name]] but returns a pointer instead"
|
||||
(function string (pointer object))) ;;
|
||||
(define-extern part-group-pointer?
|
||||
"Verifies if the given pointer, points to a [[sparticle-launch-group]]"
|
||||
(function pointer symbol))
|
||||
(define-extern unlink-part-group-by-heap (function kheap int)) ;;
|
||||
(define-extern sp-init-fields! (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object)) ;; TODO - mips2c
|
||||
(define-extern *sp-launcher-lock* symbol) ;;
|
||||
(define-extern *sp-launch-queue* sp-launch-queue) ;;
|
||||
(define-extern *sp-launcher-enable* symbol) ;;
|
||||
;; (define-extern particle-setup-adgif (function adgif-shader texture-id none)) ;; TODO - assertion failure
|
||||
(define-extern *particle-adgif-cache* particle-adgif-cache) ;;
|
||||
(define-extern particle-adgif-cache-flush "Clear [[*particle-adgif-cache*]]" (function none))
|
||||
(define-extern particle-adgif (function adgif-shader texture-id none)) ;; TODO - particle-adgif atomic ops, MIPS2C
|
||||
(define-extern particle-adgif-callback (function adgif-shader none)) ;; TODO bad VF dependencies
|
||||
(define-extern sp-queue-launch (function sparticle-system sparticle-launcher matrix int))
|
||||
(define-extern sp-adjust-launch (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) matrix symbol none)) ;;
|
||||
(define-extern sp-euler-convert (function sparticle-launchinfo sparticle-cpuinfo none)) ;;
|
||||
(define-extern sp-rotate-system (function sparticle-launchinfo sparticle-cpuinfo transformq none)) ;;
|
||||
(define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) ;; TODO - mips2c
|
||||
(define-extern *death-adgif* adgif-shader) ;;
|
||||
(define-extern sp-launch-particles-death (function sparticle-system sparticle-launcher vector none)) ;;
|
||||
(define-extern sp-clear-queue (function none)) ;;
|
||||
(define-extern sp-relaunch-setup-fields (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) ;;
|
||||
(define-extern sp-relaunch-particle-2d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) ;;
|
||||
(define-extern sp-relaunch-particle-3d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) ;;
|
||||
(define-extern execute-part-engine (function none)) ;; TODO - whats the basic off the connection?
|
||||
(define-extern sparticle-track-root (function object sparticle-cpuinfo vector none)) ;;
|
||||
(define-extern sparticle-track-root-prim (function object sparticle-cpuinfo vector none)) ;;
|
||||
(define-extern sparticle-track-joint (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-turn-to-vel (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none))
|
||||
(define-extern birth-func-copy-rot-color (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) ;;
|
||||
(define-extern *global-toggle* int) ;;
|
||||
(define-extern birth-func-copy2-rot-color (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) ;;
|
||||
(define-extern birth-func-copy-omega-to-z (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) ;;
|
||||
(define-extern birth-func-random-next-time (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) ;;
|
||||
(define-extern sparticle-respawn-heights (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-respawn-timer (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-texture-animate (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-texture-day-night (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-mode-animate (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-motion-blur-old "Unused" (function object sparticle-cpuinfo sprite-vec-data-3d object))
|
||||
(define-extern sparticle-set-conerot (function sparticle-launcher vector none))
|
||||
(define-extern sparticle-next-on-mode-1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float))
|
||||
(define-extern check-ground-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float))
|
||||
(define-extern check-drop-group-center (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none))
|
||||
(define-extern birth-func-y->userdata (function sparticle-system sparticle-cpuinfo matrix none)) ;;
|
||||
(define-extern birth-func-ocean-height (function sparticle-system sparticle-cpuinfo matrix none)) ;;
|
||||
(define-extern birth-func-camera-orient (function int sparticle-cpuinfo sparticle-launchinfo none))
|
||||
(define-extern *particle-quat* quaternion) ;;
|
||||
(define-extern birth-func-set-quat (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern *particle-vel* vector)
|
||||
(define-extern birth-func-set-vel (function object sparticle-cpuinfo sparticle-launchinfo none))
|
||||
(define-extern birth-func-texture-group (function int sparticle-cpuinfo sparticle-launchinfo none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; sparticle ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern sp-particle-copy! function) ;; (function sparticle-cpuinfo sparticle-cpuinfo none)
|
||||
(define-extern *sp-particle-system-2d* sparticle-system)
|
||||
(define-extern *sp-particle-system-3d* sparticle-system)
|
||||
;; (define-extern sp-get-block-size function) ;; (function sparticle-system int int)
|
||||
;; (define-extern sp-get-approx-alloc-size function) ;; (function sparticle-system int int)
|
||||
;; (define-extern sp-free-particle function) ;; (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)
|
||||
;; (define-extern sp-get-particle function) ;; (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)
|
||||
;; (define-extern sp-kill-particle function) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
;; (define-extern sp-orbiter function) ;; (function sparticle-system sparticle-cpuinfo vector none)
|
||||
;; (define-extern sp-process-block-2d function) ;; (function sparticle-system int int int int symbol none)
|
||||
;; (define-extern sp-process-block-3d function) ;; (function sparticle-system int int int int symbol none)
|
||||
;; (define-extern sp-copy-to-spr function) ;; (function int pointer int none)
|
||||
;; (define-extern sp-copy-from-spr function) ;; (function int pointer int none)
|
||||
;; (define-extern memcpy function) ;; function
|
||||
;; (define-extern sp-process-block function) ;; (function sparticle-system int sprite-array-2d int none)
|
||||
;; (define-extern sp-process-particle-system function) ;; (function sparticle-system int sprite-array-2d none)
|
||||
;; (define-extern *particles-flag* object) ;; symbol
|
||||
;; (define-extern forall-particles-with-key-runner function) ;; (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none)
|
||||
(define-extern sp-particle-copy! (function sparticle-cpuinfo sparticle-cpuinfo none)) ;;
|
||||
(define-extern *sp-particle-system-2d* sparticle-system) ;;
|
||||
(define-extern *sp-particle-system-3d* sparticle-system) ;; sparticle-system
|
||||
(define-extern sp-get-block-size (function sparticle-system int int)) ;;
|
||||
(define-extern sp-get-approx-alloc-size (function sparticle-system int int)) ;;
|
||||
(define-extern sp-free-particle (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)) ;;
|
||||
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) ;; TODO - manually fixed in jak 1? gross
|
||||
(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol)) ;;
|
||||
(define-extern sp-orbiter (function sparticle-system sparticle-cpuinfo vector none)) ;;
|
||||
(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
(define-extern sp-copy-to-spr (function int pointer int none)) ;; TODO - these are all actually uints, but this is needed to get the casts right...
|
||||
(define-extern sp-copy-from-spr (function int pointer int none)) ;; TODO - these are all actually uints, but this is needed to get the casts right...
|
||||
(define-extern memcpy function) ;; TODO - was done manually as well?
|
||||
(define-extern sp-process-block (function sparticle-system int sprite-array-2d int none)) ;;
|
||||
(define-extern sp-process-particle-system (function sparticle-system int sprite-array-2d none)) ;;
|
||||
(define-extern *particles-flag* symbol) ;;
|
||||
(define-extern forall-particles-with-key-runner (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none)) ;;
|
||||
(define-extern forall-particles-with-key (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none))
|
||||
;; (define-extern sparticle-kill-it function) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
;; (define-extern sparticle-kill-it-level0 function) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
;; (define-extern sparticle-kill-it-level1 function) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
;; (define-extern sparticle-kill-it-level2 function)
|
||||
;; (define-extern sparticle-kill-it-level3 function)
|
||||
;; (define-extern sparticle-kill-it-level4 function)
|
||||
;; (define-extern sparticle-kill-it-level5 function)
|
||||
;; (define-extern sparticle-60-to-50 function) ;; (function sparticle-system sparticle-cpuinfo pointer none)
|
||||
;; (define-extern sparticle-50-to-60 function) ;; (function sparticle-system sparticle-cpuinfo pointer none)
|
||||
;; (define-extern kill-all-particles-with-key function) ;; (function sparticle-launch-control none)
|
||||
;; (define-extern forall-particles-runner function) ;; (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system none)
|
||||
;; (define-extern forall-particles function) ;; (function function symbol symbol none)
|
||||
(define-extern sparticle-kill-it (function sparticle-system sparticle-cpuinfo none)) ;;
|
||||
(define-extern sparticle-kill-it-level0 (function sparticle-system sparticle-cpuinfo none)) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
(define-extern sparticle-kill-it-level1 (function sparticle-system sparticle-cpuinfo none)) ;; (function sparticle-system sparticle-cpuinfo none)
|
||||
(define-extern sparticle-kill-it-level2 (function sparticle-system sparticle-cpuinfo none))
|
||||
(define-extern sparticle-kill-it-level3 (function sparticle-system sparticle-cpuinfo none))
|
||||
(define-extern sparticle-kill-it-level4 (function sparticle-system sparticle-cpuinfo none))
|
||||
(define-extern sparticle-kill-it-level5 (function sparticle-system sparticle-cpuinfo none))
|
||||
(define-extern sparticle-60-to-50 (function sparticle-system sparticle-cpuinfo pointer none)) ;;
|
||||
(define-extern sparticle-50-to-60 (function sparticle-system sparticle-cpuinfo pointer none)) ;; (function sparticle-system sparticle-cpuinfo pointer none)
|
||||
(define-extern kill-all-particles-with-key (function sparticle-launch-control none)) ;;
|
||||
(define-extern forall-particles-runner (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system none)) ;;
|
||||
(define-extern forall-particles (function function symbol symbol none)) ;;
|
||||
(define-extern kill-all-particles-in-level (function level int))
|
||||
;; (define-extern all-particles-50-to-60 function) ;; (function none)
|
||||
;; (define-extern all-particles-60-to-50 function) ;; (function none)
|
||||
;; (define-extern remap-particle function)
|
||||
;; (define-extern remap-all-particles function)
|
||||
(define-extern all-particles-50-to-60 (function none)) ;;
|
||||
(define-extern all-particles-60-to-50 (function none)) ;; (function none)
|
||||
(define-extern remap-particle (function sparticle-system sparticle-cpuinfo pointer none))
|
||||
(define-extern remap-all-particles (function none))
|
||||
(define-extern process-particles (function none))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; entity-table ;;
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
"(method 224 bot)",
|
||||
"(method 77 rapid-gunner)",
|
||||
// until loop without nop:
|
||||
"(method 9 sparticle-launcher)",
|
||||
"cam-layout-entity-volume-info-create",
|
||||
"process-drawable-shock-skel-effect",
|
||||
"target-history-print",
|
||||
|
||||
@@ -110,10 +110,6 @@
|
||||
["L774", "(pointer uint64)", 1],
|
||||
["L775", "(pointer uint64)", 1]
|
||||
],
|
||||
"collide-cache": [
|
||||
["L171", "vector"]
|
||||
],
|
||||
"emerc-vu1": [
|
||||
["L1", "vu-function"]
|
||||
]
|
||||
"collide-cache": [["L171", "vector"]],
|
||||
"emerc-vu1": [["L1", "vu-function"]]
|
||||
}
|
||||
|
||||
@@ -302,7 +302,6 @@
|
||||
[32, "vector4w"]
|
||||
],
|
||||
"cam-debug-draw-tris": [[16, "vector4w"]],
|
||||
|
||||
"(code die gun)": [
|
||||
[16, "matrix"],
|
||||
[112, "vector"],
|
||||
@@ -340,12 +339,25 @@
|
||||
[16, "matrix"],
|
||||
[112, "event-message-block"]
|
||||
],
|
||||
|
||||
"(method 14 collide-cache)": [
|
||||
[16, "bounding-box"]
|
||||
|
||||
"(method 14 collide-cache)": [[16, "bounding-box"]],
|
||||
"sp-adjust-launch": [[16, "matrix"]],
|
||||
"sp-launch-particles-death": [[16, "matrix"]],
|
||||
"sp-relaunch-particle-3d": [[16, "quaternion"]],
|
||||
"execute-part-engine": [
|
||||
[16, "matrix"],
|
||||
[80, "vector"]
|
||||
],
|
||||
"sparticle-motion-blur-old": [
|
||||
[16, "vector"],
|
||||
[32, "vector4w"],
|
||||
[48, "vector4w"]
|
||||
],
|
||||
"sp-orbiter": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "matrix"]
|
||||
],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": [],
|
||||
"joint-mod-ik-callback": [
|
||||
[16, "matrix"],
|
||||
[80, "matrix"],
|
||||
@@ -402,5 +414,7 @@
|
||||
[256, "vector"]
|
||||
],
|
||||
"(method 13 gui-control)": [[16, ["array", "sound-id", 4]]],
|
||||
"ja-play-spooled-anim": [[96, "event-message-block"]]
|
||||
"ja-play-spooled-anim": [[96, "event-message-block"]],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": []
|
||||
}
|
||||
|
||||
@@ -654,11 +654,6 @@
|
||||
[[285, 289], "a1", "vector4w"],
|
||||
[[293, 298], "v1", "dma-packet"]
|
||||
],
|
||||
"(method 10 history)": [[[8, 10], "a1", "history-elt"]],
|
||||
"(method 10 history-iterator)": [[[20, 35], "a2", "history-elt"]],
|
||||
"command-get-time": [[119, "gp", "(pointer float)"]],
|
||||
"command-get-param": [[122, "gp", "(pointer float)"]],
|
||||
"command-get-entity": [[10, "gp", "process"]],
|
||||
"print-game-text": [
|
||||
[225, "v1", "float"],
|
||||
[241, "v1", "float"]
|
||||
@@ -1278,15 +1273,9 @@
|
||||
],
|
||||
"cam-collision-record-save": [[[8, 56], "v1", "cam-collision-record"]],
|
||||
"(trans cam-stick)": [[157, "a0", "vector"]],
|
||||
"(method 9 darkjak-info)": [
|
||||
[71, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(trans idle board)": [
|
||||
[4, "a0", "target"]
|
||||
],
|
||||
"(trans hidden board)": [
|
||||
[4, "a0", "target"]
|
||||
],
|
||||
"(method 9 darkjak-info)": [[71, "v0", "sound-rpc-set-param"]],
|
||||
"(trans idle board)": [[4, "a0", "target"]],
|
||||
"(trans hidden board)": [[4, "a0", "target"]],
|
||||
"(trans use board)": [
|
||||
[8, "a0", "target"],
|
||||
[22, "a1", "target"]
|
||||
@@ -1300,16 +1289,12 @@
|
||||
[62, "a0", "target"],
|
||||
[94, "v1", "target"]
|
||||
],
|
||||
"(code use board)": [
|
||||
[17, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(code use board)": [[17, "v1", "art-joint-anim"]],
|
||||
"(code idle board)": [
|
||||
[19, "v1", "art-joint-anim"],
|
||||
[37, "v1", "art-joint-anim"]
|
||||
],
|
||||
"gun-init": [
|
||||
[85, "a1", "target"]
|
||||
],
|
||||
"gun-init": [[85, "a1", "target"]],
|
||||
"gun-post": [
|
||||
[7, "a0", "target"],
|
||||
[12, "gp", "target"],
|
||||
@@ -1332,12 +1317,8 @@
|
||||
[148, "gp", "target"],
|
||||
[169, "a0", "target"]
|
||||
],
|
||||
"(trans hidden gun)": [
|
||||
[4, "a0", "target"]
|
||||
],
|
||||
"(code idle gun)": [
|
||||
[16, "v1", "art-joint-anim"]
|
||||
],
|
||||
"(trans hidden gun)": [[4, "a0", "target"]],
|
||||
"(code idle gun)": [[16, "v1", "art-joint-anim"]],
|
||||
"(trans idle gun)": [
|
||||
[2, "v1", "target"],
|
||||
[9, "a0", "target"],
|
||||
@@ -1433,8 +1414,30 @@
|
||||
[46, "a0", "(pointer gs-reg64)"],
|
||||
[[49, 61], "v1", "dma-packet"]
|
||||
],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": [],
|
||||
"sparticle-track-root-prim": [[3, "v1", "collide-shape"]],
|
||||
"(method 10 sparticle-launcher)": [[41, "gp", "(array float)"]],
|
||||
"birth-func-texture-group": [[3, "s5", "(pointer int32)"]],
|
||||
"(method 9 sparticle-launch-control)": [[22, "a2", "process-drawable"]],
|
||||
"execute-part-engine": [
|
||||
[11, "v1", "connection"],
|
||||
[137, "a3", "vector"]
|
||||
],
|
||||
"(method 2 sparticle-cpuinfo)": [[14, "f0", "float"]],
|
||||
"sp-kill-particle": [
|
||||
[7, "a1", "uint"],
|
||||
[7, "v1", "uint"]
|
||||
],
|
||||
"sp-orbiter": [[[78, 89], "v1", "sprite-vec-data-2d"]],
|
||||
"forall-particles-with-key-runner": [
|
||||
[32, "s3", "(inline-array sparticle-cpuinfo)"],
|
||||
[42, "s3", "(inline-array sparticle-cpuinfo)"]
|
||||
],
|
||||
"forall-particles-runner": [
|
||||
[[19, 28], "s4", "sparticle-cpuinfo"],
|
||||
[34, "s4", "pointer"],
|
||||
[35, "s3", "pointer"]
|
||||
],
|
||||
"sp-process-particle-system": [[14, "a1", "vector"]],
|
||||
"drawable-load": [[[25, 28], "s5", "drawable"]],
|
||||
"art-load": [[[13, 16], "s5", "art"]],
|
||||
"art-group-load-check": [[[43, 53], "s3", "art-group"]],
|
||||
@@ -1474,5 +1477,7 @@
|
||||
[44, "v1", "gui-connection"],
|
||||
[14, "v1", "gui-connection"]
|
||||
],
|
||||
"(method 10 gui-control)": [[[4, 32], "s3", "gui-connection"]]
|
||||
"(method 10 gui-control)": [[[4, 32], "s3", "gui-connection"]],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": []
|
||||
}
|
||||
|
||||
@@ -420,32 +420,31 @@ int DecompilerTypeSystem::get_format_arg_count(const std::string& str) const {
|
||||
return bad_it->second;
|
||||
}
|
||||
|
||||
static const std::vector<char> single_char_ignore_list = {'%', 'T'};
|
||||
static const std::vector<std::string> multi_char_ignore_list = {
|
||||
"0L", "1L", "3L", "1k", "1K", "2j", "0k", "0K", "30L", "1T", "2T"};
|
||||
static const std::vector<std::string> code_ignore_list = {
|
||||
"%", "T", "0L", "1L", "3L", "1k", "1K", "2j",
|
||||
"0k", "0K", "30L", "1T", "2T", "100h", "200h", "350h"};
|
||||
|
||||
int arg_count = 0;
|
||||
for (size_t i = 0; i < str.length(); i++) {
|
||||
if (str.at(i) == '~') {
|
||||
i++; // also eat the next character.
|
||||
|
||||
// Check for codes that take no args
|
||||
bool code_takes_no_arg = false;
|
||||
for (char c : single_char_ignore_list) {
|
||||
if (i < str.length() && str.at(i) == c) {
|
||||
code_takes_no_arg = true;
|
||||
break;
|
||||
for (auto& ignored_code : code_ignore_list) {
|
||||
int j = i;
|
||||
bool match = true;
|
||||
for (const char c : ignored_code) {
|
||||
if (j > str.length()) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
if (str.at(j) != c) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& code : multi_char_ignore_list) {
|
||||
if (i + 1 < str.length() && code.length() == 2 && (str.at(i) == code.at(0)) &&
|
||||
str.at(i + 1) == code.at(1)) {
|
||||
code_takes_no_arg = true;
|
||||
break;
|
||||
}
|
||||
if (i + 2 < str.length() && code.length() == 3 && (str.at(i) == code.at(0)) &&
|
||||
str.at(i + 1) == code.at(1) && str.at(i + 2) == code.at(2)) {
|
||||
if (match) {
|
||||
code_takes_no_arg = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
(define-extern camera-pos (function vector))
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern math-camera-matrix
|
||||
"Returns [[*math-camera*]]'s `inv-camera-rot`"
|
||||
(function matrix))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define-perm *camera-init-mat* matrix #f)
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
;; name in dgo: camera-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++cam-index-options
|
||||
(defenum cam-index-options
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(RADIAL)
|
||||
(SPHERICAL)
|
||||
)
|
||||
;; ---cam-index-options
|
||||
|
||||
;; +++slave-los-state
|
||||
(defenum slave-los-state
|
||||
:type uint32
|
||||
(none 0)
|
||||
@@ -19,21 +22,7 @@
|
||||
(ccw 2)
|
||||
(between 3)
|
||||
)
|
||||
|
||||
(defenum camera-slave-options
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(butt-cam)
|
||||
(same-side)
|
||||
(move-spherical)
|
||||
(allow-z-rot)
|
||||
(pitch-for-jump)
|
||||
(collide)
|
||||
(find-hidden-target)
|
||||
(drag)
|
||||
(line-of-sight)
|
||||
(no-rotate)
|
||||
(sticky-angle))
|
||||
;; ---slave-los-state
|
||||
|
||||
;; +++camera-blend-to-type
|
||||
(defenum camera-blend-to-type
|
||||
@@ -41,7 +30,7 @@
|
||||
(unknown-0 0)
|
||||
(unknown-1 1)
|
||||
(unknown-2 2))
|
||||
;; ---camera-h:camera-blend-to-type
|
||||
;; ---camera-blend-to-type
|
||||
|
||||
;; NOTE - for settings
|
||||
(declare-type camera-slave process)
|
||||
@@ -387,26 +376,28 @@
|
||||
:size-assert #xa94
|
||||
:flag-assert #xe0a200a94
|
||||
(:states
|
||||
cam-really-fixed
|
||||
cam-fixed
|
||||
cam-fixed-read-entity
|
||||
cam-pov
|
||||
cam-pov180
|
||||
cam-pov-track
|
||||
cam-standoff
|
||||
cam-standoff-read-entity
|
||||
cam-eye
|
||||
cam-spline
|
||||
cam-bike
|
||||
cam-circular
|
||||
cam-decel
|
||||
cam-endlessfall
|
||||
cam-circular
|
||||
cam-eye
|
||||
cam-fixed
|
||||
cam-fixed-read-entity
|
||||
cam-free-floating
|
||||
cam-lookat
|
||||
cam-string
|
||||
cam-stick
|
||||
cam-bike
|
||||
cam-robotboss ;; TODO - state docstrings "A holdout from jak 1?"
|
||||
cam-point-watch
|
||||
cam-free-floating))
|
||||
cam-pov
|
||||
cam-pov-track
|
||||
cam-pov180
|
||||
cam-really-fixed
|
||||
cam-robotboss
|
||||
cam-spline
|
||||
cam-standoff
|
||||
cam-standoff-read-entity
|
||||
cam-stick
|
||||
cam-string
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype camera-master (process)
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
;; NOTE - for cam-debug
|
||||
(define-extern transform-float-point (function vector vector4w vector4w))
|
||||
(define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol rgba symbol))
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern add-debug-sphere (function symbol bucket-id vector float rgba symbol))
|
||||
|
||||
|
||||
(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol))
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
;; name in dgo: drawable-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern sphere-in-view-frustum? (function sphere symbol))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable (basic)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-wave-info (structure)
|
||||
((frequency float :offset-assert 0)
|
||||
(amplitude float :offset-assert 4)
|
||||
@@ -34,6 +35,7 @@
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-vertex (structure)
|
||||
((pos vector :inline :offset-assert 0)
|
||||
(stq vector :inline :offset-assert 16)
|
||||
@@ -44,6 +46,7 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-spheres (structure)
|
||||
((spheres sphere 36 :inline :offset-assert 0)
|
||||
)
|
||||
@@ -52,6 +55,7 @@
|
||||
:flag-assert #x900000240
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-colors (structure)
|
||||
((colors rgba 2548 :offset-assert 0)
|
||||
)
|
||||
@@ -60,6 +64,7 @@
|
||||
:flag-assert #x9000027d0
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-colors-float (structure)
|
||||
((colors vector 2548 :inline :offset-assert 0)
|
||||
)
|
||||
@@ -68,6 +73,7 @@
|
||||
:flag-assert #x900009f40
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-mask (structure)
|
||||
((mask uint8 8 :offset-assert 0)
|
||||
(dword uint64 :offset 0)
|
||||
@@ -78,6 +84,7 @@
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-indices (basic)
|
||||
((data uint16 36 :offset-assert 4)
|
||||
)
|
||||
@@ -86,6 +93,7 @@
|
||||
:flag-assert #x90000004c
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-masks (basic)
|
||||
((data (inline-array ocean-mid-mask) :offset-assert 4)
|
||||
)
|
||||
@@ -94,6 +102,7 @@
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-trans-mask (structure)
|
||||
((mask uint8 4 :offset-assert 0)
|
||||
(word int32 :offset 0)
|
||||
@@ -103,6 +112,7 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-trans-index (structure)
|
||||
((parent int16 :offset-assert 0)
|
||||
(child int16 :offset-assert 2)
|
||||
@@ -113,6 +123,7 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-trans-indices (basic)
|
||||
((data ocean-trans-index 2304 :inline :offset-assert 4)
|
||||
)
|
||||
@@ -121,6 +132,7 @@
|
||||
:flag-assert #x900002404
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-index (structure)
|
||||
((data uint16 16 :offset-assert 0)
|
||||
)
|
||||
@@ -129,6 +141,7 @@
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-indices (basic)
|
||||
((data (inline-array ocean-near-index) :offset-assert 4)
|
||||
)
|
||||
@@ -137,6 +150,7 @@
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-colors (structure)
|
||||
((color0 vector :inline :offset-assert 0)
|
||||
(color1 vector :inline :offset-assert 16)
|
||||
@@ -148,6 +162,7 @@
|
||||
:flag-assert #x900000040
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-trans-strip (structure)
|
||||
((verts uint128 10 :offset-assert 0)
|
||||
)
|
||||
@@ -156,6 +171,7 @@
|
||||
:flag-assert #x9000000a0
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-trans-strip-array (structure)
|
||||
((data ocean-trans-strip 4 :inline :offset-assert 0)
|
||||
)
|
||||
@@ -164,6 +180,7 @@
|
||||
:flag-assert #x900000280
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-wave-data (structure)
|
||||
((data uint8 1024 :offset-assert 0)
|
||||
)
|
||||
@@ -172,6 +189,7 @@
|
||||
:flag-assert #x900000400
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-wave-frames (structure)
|
||||
((frame ocean-wave-data 64 :inline :offset-assert 0)
|
||||
)
|
||||
@@ -180,6 +198,7 @@
|
||||
:flag-assert #x900000000
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-texture-constants (structure)
|
||||
((giftag gs-gif-tag :inline :offset-assert 0)
|
||||
(buffers vector4w :inline :offset-assert 16)
|
||||
@@ -194,6 +213,7 @@
|
||||
:flag-assert #x900000070
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-vertex (structure)
|
||||
((stq vector :inline :offset-assert 0)
|
||||
(col vector :inline :offset-assert 16)
|
||||
@@ -204,6 +224,7 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-constants (structure)
|
||||
((hmge-scale vector :inline :offset-assert 0)
|
||||
(inv-hmge-scale vector :inline :offset-assert 16)
|
||||
@@ -232,6 +253,7 @@
|
||||
:flag-assert #x900000240
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-upload (structure)
|
||||
((rot matrix :inline :offset-assert 0)
|
||||
(matrix matrix :inline :offset-assert 64)
|
||||
@@ -243,6 +265,7 @@
|
||||
:flag-assert #x900000760
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-upload2 (structure)
|
||||
((rot matrix :inline :offset-assert 0)
|
||||
(matrix matrix :inline :offset-assert 64)
|
||||
@@ -262,6 +285,7 @@
|
||||
:flag-assert #x900000230
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-mid-work (structure)
|
||||
((env0 vector :inline :offset-assert 0)
|
||||
(env1 vector :inline :offset-assert 16)
|
||||
@@ -276,6 +300,7 @@
|
||||
:flag-assert #x900000160
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-constants (structure)
|
||||
((hmge-scale vector :inline :offset-assert 0)
|
||||
(inv-hmge-scale vector :inline :offset-assert 16)
|
||||
@@ -309,6 +334,7 @@
|
||||
:flag-assert #x900000250
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-upload (structure)
|
||||
((rot matrix :inline :offset-assert 0)
|
||||
(matrix matrix :inline :offset-assert 64)
|
||||
@@ -322,6 +348,7 @@
|
||||
:flag-assert #x900000100
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-vertex (structure)
|
||||
((stq vector :inline :offset-assert 0)
|
||||
(clr vector :inline :offset-assert 16)
|
||||
@@ -332,6 +359,7 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-near-work (structure)
|
||||
((verts-ptr vector :inline :offset-assert 0)
|
||||
(indices uint128 16 :offset-assert 16)
|
||||
@@ -341,6 +369,7 @@
|
||||
:flag-assert #x900000110
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-height-array (structure)
|
||||
((data float 1024 :offset-assert 0)
|
||||
)
|
||||
@@ -349,6 +378,7 @@
|
||||
:flag-assert #x900001000
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-vert-array (structure)
|
||||
((data vector 2048 :inline :offset-assert 0)
|
||||
)
|
||||
@@ -357,6 +387,7 @@
|
||||
:flag-assert #x900008000
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean-map (structure)
|
||||
((start-corner vector :inline :offset-assert 0)
|
||||
(far-color vector :inline :offset-assert 16)
|
||||
@@ -376,6 +407,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ocean (ocean-map)
|
||||
((off basic :offset-assert 56)
|
||||
(near-off basic :offset-assert 60)
|
||||
@@ -476,7 +508,7 @@
|
||||
:size-assert #x206c
|
||||
:flag-assert #x5c0000206c
|
||||
(:methods
|
||||
(ocean-method-11 () none 11)
|
||||
(ocean-method-11 (_type_ (inline-array vector) symbol) float 11)
|
||||
(ocean-method-12 () none 12)
|
||||
(ocean-method-13 () none 13)
|
||||
(ocean-method-14 () none 14)
|
||||
@@ -560,349 +592,255 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *ocean-map* (the-as ocean-map #f))
|
||||
|
||||
(define *ocean*
|
||||
(new 'static 'ocean
|
||||
:sprite-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
(define *ocean* (new 'static 'ocean
|
||||
:sprite-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x508b400000008001 #x53531)
|
||||
)
|
||||
:sprite-tmpl2 (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x3023400000008001 #x551)
|
||||
)
|
||||
:sprite-tmpl3 (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531)
|
||||
)
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
)
|
||||
:line-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x141 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x141 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x5008c00000008040 #x52521)
|
||||
)
|
||||
:sun-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x502b400000008001 #x52521)
|
||||
)
|
||||
:erase-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x3003400000008001 #x551)
|
||||
)
|
||||
:haze-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x45 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x45 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x4026400000008011 #x4141)
|
||||
)
|
||||
:cloud-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x25 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x25 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x602e400000008006 #x421421)
|
||||
)
|
||||
:clut-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x800000000008040 #x0)
|
||||
)
|
||||
:constant (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:haze-verts (new 'static 'inline-array vector4w 32
|
||||
(new 'static 'vector4w :x #x400 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x400 :y #x600 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4a0 :y #x590 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4c0 :y #x5e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x530 :y #x530 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x590 :y #x4a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5e0 :y #x4c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x3f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x600 :y #x3f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x590 :y #x350 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5e0 :y #x330 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x530 :y #x2c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4a0 :y #x260 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4c0 :y #x210 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3f0 :y #x240 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3f0 :y #x1f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x350 :y #x260 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x330 :y #x210 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2c0 :y #x2c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x260 :y #x350 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x210 :y #x330 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x240 :y #x400 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x1f0 :y #x400 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x260 :y #x4a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x210 :y #x4c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2c0 :y #x530 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x350 :y #x590 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x330 :y #x5e0 :z #xffffff)
|
||||
)
|
||||
:cloud-verts (new 'static 'inline-array vector4w 36
|
||||
(new 'static 'vector4w :x #x290 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x310 :y #x230 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x200 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x200 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4e0 :y #x230 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x230 :y #x310 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x300 :y #x300 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x2b0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x2b0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4f0 :y #x300 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x310 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x200 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2b0 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x380 :y #x380 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x470 :y #x380 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x540 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5f0 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x200 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2b0 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x380 :y #x470 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x470 :y #x470 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x540 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5f0 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x230 :y #x4e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x300 :y #x4f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x540 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x540 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4f0 :y #x4f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x4e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x310 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x5f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x5f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4e0 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x560 :z #xffffff)
|
||||
)
|
||||
:cloud-nrms (new 'static 'inline-array vector 36
|
||||
(new 'static 'vector :x -0.4999 :y 0.7071 :z -0.5)
|
||||
(new 'static 'vector :x -0.3209 :y 0.7071 :z -0.63)
|
||||
(new 'static 'vector :x -0.1105 :y 0.7071 :z -0.6984)
|
||||
(new 'static 'vector :x 0.1105 :y 0.7071 :z -0.6983)
|
||||
(new 'static 'vector :x 0.321 :y 0.7071 :z -0.63)
|
||||
(new 'static 'vector :x 0.5 :y 0.7071 :z -0.4999)
|
||||
(new 'static 'vector :x -0.63 :y 0.7071 :z -0.321)
|
||||
(new 'static 'vector :x -0.3921 :y 0.832 :z -0.3922)
|
||||
(new 'static 'vector :x -0.1434 :y 0.832 :z -0.5358)
|
||||
(new 'static 'vector :x 0.1435 :y 0.832 :z -0.5357)
|
||||
(new 'static 'vector :x 0.3922 :y 0.832 :z -0.3921)
|
||||
(new 'static 'vector :x 0.63 :y 0.7071 :z -0.3209)
|
||||
(new 'static 'vector :x -0.6983 :y 0.7071 :z -0.1106)
|
||||
(new 'static 'vector :x -0.5357 :y 0.832 :z -0.1435)
|
||||
(new 'static 'vector :x -0.334 :y 0.8814 :z -0.334)
|
||||
(new 'static 'vector :x 0.334 :y 0.8814 :z -0.334)
|
||||
(new 'static 'vector :x 0.5358 :y 0.832 :z -0.1434)
|
||||
(new 'static 'vector :x 0.6984 :y 0.7071 :z -0.1105)
|
||||
(new 'static 'vector :x -0.6984 :y 0.7071 :z 0.1105)
|
||||
(new 'static 'vector :x -0.5358 :y 0.832 :z 0.1435)
|
||||
(new 'static 'vector :x -0.334 :y 0.8814 :z 0.334)
|
||||
(new 'static 'vector :x 0.334 :y 0.8814 :z 0.334)
|
||||
(new 'static 'vector :x 0.5357 :y 0.832 :z 0.1435)
|
||||
(new 'static 'vector :x 0.6983 :y 0.7071 :z 0.1105)
|
||||
(new 'static 'vector :x -0.63 :y 0.7071 :z 0.321)
|
||||
(new 'static 'vector :x -0.3922 :y 0.832 :z 0.3921)
|
||||
(new 'static 'vector :x -0.1435 :y 0.832 :z 0.5357)
|
||||
(new 'static 'vector :x 0.1435 :y 0.832 :z 0.5358)
|
||||
(new 'static 'vector :x 0.3922 :y 0.832 :z 0.3922)
|
||||
(new 'static 'vector :x 0.63 :y 0.7071 :z 0.321)
|
||||
(new 'static 'vector :x -0.5 :y 0.7071 :z 0.4999)
|
||||
(new 'static 'vector :x -0.321 :y 0.7071 :z 0.63)
|
||||
(new 'static 'vector :x -0.1106 :y 0.7071 :z 0.6983)
|
||||
(new 'static 'vector :x 0.1105 :y 0.7071 :z 0.6984)
|
||||
(new 'static 'vector :x 0.321 :y 0.7071 :z 0.63)
|
||||
(new 'static 'vector :x 0.4999 :y 0.7071 :z 0.5)
|
||||
)
|
||||
:color80808080 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:color80808040 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w 64)
|
||||
:color80808000 (new 'static 'vector4w :x #x80 :y #x80 :z #x80)
|
||||
:st0000 (new 'static 'vector :z 1.0)
|
||||
:st0505 (new 'static 'vector :x 0.5 :y 0.5 :z 1.0)
|
||||
:st1010 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:uv44 (new 'static 'vector4w :x 64 :y 64)
|
||||
:uv88 (new 'static 'vector4w :x #x80 :y #x80)
|
||||
:uv1010 (new 'static 'vector4w :x #x100 :y #x100)
|
||||
:uv2020 (new 'static 'vector4w :x #x200 :y #x200)
|
||||
:uv4040 (new 'static 'vector4w :x #x400 :y #x400)
|
||||
:uv8080 (new 'static 'vector4w :x #x800 :y #x800)
|
||||
:xy00 (new 'static 'vector4w :z #xffffff)
|
||||
:xy88 (new 'static 'vector4w :x #x80 :y #x80 :z #xffffff)
|
||||
:xy1010 (new 'static 'vector4w :x #x100 :y #x100 :z #xffffff)
|
||||
:xy2020 (new 'static 'vector4w :x #x200 :y #x200 :z #xffffff)
|
||||
:xy4040 (new 'static 'vector4w :x #x400 :y #x400 :z #xffffff)
|
||||
:xy8080 (new 'static 'vector4w :x #x800 :y #x800 :z #xffffff)
|
||||
:cloud-alpha (new 'static 'array uint8 36
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
)
|
||||
:tex1 #xeed00080178
|
||||
:tex1-near #xeed0008016c
|
||||
:scales (new 'static 'vector :x -0.00012207031 :y 255.0 :z -0.00012207031 :w 128.0)
|
||||
:mask-hi (new 'static 'vector4w :x -65536 :y -65536 :z -65536 :w -65536)
|
||||
:mask-lo (new 'static 'vector4w :x #xffff :y #xffff :z #xffff :w #xffff)
|
||||
)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :fst #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id uv)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id uv)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:sprite-tmpl2 (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :abe #x1)
|
||||
:nreg #x3
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id rgbaq) :regs1 (gif-reg-id xyz2) :regs2 (gif-reg-id xyz2))
|
||||
)
|
||||
:sprite-tmpl3 (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id uv)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id uv)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64 :nloop #x5 :eop #x1 :nreg #x1)
|
||||
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))
|
||||
)
|
||||
:line-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x141 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x141 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x40
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :tme #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id st)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id st)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:sun-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id st)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id st)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:erase-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite))
|
||||
:nreg #x3
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id rgbaq) :regs1 (gif-reg-id xyz2) :regs2 (gif-reg-id xyz2))
|
||||
)
|
||||
:haze-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x45 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x45 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x11
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :abe #x1)
|
||||
:nreg #x4
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id xyzf2)
|
||||
:regs2 (gif-reg-id rgbaq)
|
||||
:regs3 (gif-reg-id xyzf2)
|
||||
)
|
||||
)
|
||||
:cloud-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x25 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x25 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x6
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1)
|
||||
:nreg #x6
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id st)
|
||||
:regs2 (gif-reg-id xyzf2)
|
||||
:regs3 (gif-reg-id rgbaq)
|
||||
:regs4 (gif-reg-id st)
|
||||
:regs5 (gif-reg-id xyzf2)
|
||||
)
|
||||
)
|
||||
:clut-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64 :nloop #x40 :eop #x1 :flg (gif-flag image))
|
||||
)
|
||||
:constant (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:haze-verts (new 'static 'inline-array vector4w 32
|
||||
(new 'static 'vector4w :x #x400 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x400 :y #x600 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4a0 :y #x590 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4c0 :y #x5e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x530 :y #x530 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x590 :y #x4a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5e0 :y #x4c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x3f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x600 :y #x3f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x590 :y #x350 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5e0 :y #x330 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x530 :y #x2c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4a0 :y #x260 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4c0 :y #x210 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3f0 :y #x240 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3f0 :y #x1f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x350 :y #x260 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x330 :y #x210 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2c0 :y #x2c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x260 :y #x350 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x210 :y #x330 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x240 :y #x400 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x1f0 :y #x400 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x260 :y #x4a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x210 :y #x4c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2c0 :y #x530 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x350 :y #x590 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x330 :y #x5e0 :z #xffffff)
|
||||
)
|
||||
:cloud-verts (new 'static 'inline-array vector4w 36
|
||||
(new 'static 'vector4w :x #x290 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x310 :y #x230 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x200 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x200 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4e0 :y #x230 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x290 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x230 :y #x310 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x300 :y #x300 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x2b0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x2b0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4f0 :y #x300 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x310 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x200 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2b0 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x380 :y #x380 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x470 :y #x380 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x540 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5f0 :y #x3a0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x200 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x2b0 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x380 :y #x470 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x470 :y #x470 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x540 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5f0 :y #x450 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x230 :y #x4e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x300 :y #x4f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x540 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x540 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4f0 :y #x4f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x5c0 :y #x4e0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x290 :y #x560 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x310 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x3a0 :y #x5f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x450 :y #x5f0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x4e0 :y #x5c0 :z #xffffff)
|
||||
(new 'static 'vector4w :x #x560 :y #x560 :z #xffffff)
|
||||
)
|
||||
:cloud-nrms (new 'static 'inline-array vector 36
|
||||
(new 'static 'vector :x -0.4999 :y 0.7071 :z -0.5)
|
||||
(new 'static 'vector :x -0.3209 :y 0.7071 :z -0.63)
|
||||
(new 'static 'vector :x -0.1105 :y 0.7071 :z -0.6984)
|
||||
(new 'static 'vector :x 0.1105 :y 0.7071 :z -0.6983)
|
||||
(new 'static 'vector :x 0.321 :y 0.7071 :z -0.63)
|
||||
(new 'static 'vector :x 0.5 :y 0.7071 :z -0.4999)
|
||||
(new 'static 'vector :x -0.63 :y 0.7071 :z -0.321)
|
||||
(new 'static 'vector :x -0.3921 :y 0.832 :z -0.3922)
|
||||
(new 'static 'vector :x -0.1434 :y 0.832 :z -0.5358)
|
||||
(new 'static 'vector :x 0.1435 :y 0.832 :z -0.5357)
|
||||
(new 'static 'vector :x 0.3922 :y 0.832 :z -0.3921)
|
||||
(new 'static 'vector :x 0.63 :y 0.7071 :z -0.3209)
|
||||
(new 'static 'vector :x -0.6983 :y 0.7071 :z -0.1106)
|
||||
(new 'static 'vector :x -0.5357 :y 0.832 :z -0.1435)
|
||||
(new 'static 'vector :x -0.334 :y 0.8814 :z -0.334)
|
||||
(new 'static 'vector :x 0.334 :y 0.8814 :z -0.334)
|
||||
(new 'static 'vector :x 0.5358 :y 0.832 :z -0.1434)
|
||||
(new 'static 'vector :x 0.6984 :y 0.7071 :z -0.1105)
|
||||
(new 'static 'vector :x -0.6984 :y 0.7071 :z 0.1105)
|
||||
(new 'static 'vector :x -0.5358 :y 0.832 :z 0.1435)
|
||||
(new 'static 'vector :x -0.334 :y 0.8814 :z 0.334)
|
||||
(new 'static 'vector :x 0.334 :y 0.8814 :z 0.334)
|
||||
(new 'static 'vector :x 0.5357 :y 0.832 :z 0.1435)
|
||||
(new 'static 'vector :x 0.6983 :y 0.7071 :z 0.1105)
|
||||
(new 'static 'vector :x -0.63 :y 0.7071 :z 0.321)
|
||||
(new 'static 'vector :x -0.3922 :y 0.832 :z 0.3921)
|
||||
(new 'static 'vector :x -0.1435 :y 0.832 :z 0.5357)
|
||||
(new 'static 'vector :x 0.1435 :y 0.832 :z 0.5358)
|
||||
(new 'static 'vector :x 0.3922 :y 0.832 :z 0.3922)
|
||||
(new 'static 'vector :x 0.63 :y 0.7071 :z 0.321)
|
||||
(new 'static 'vector :x -0.5 :y 0.7071 :z 0.4999)
|
||||
(new 'static 'vector :x -0.321 :y 0.7071 :z 0.63)
|
||||
(new 'static 'vector :x -0.1106 :y 0.7071 :z 0.6983)
|
||||
(new 'static 'vector :x 0.1105 :y 0.7071 :z 0.6984)
|
||||
(new 'static 'vector :x 0.321 :y 0.7071 :z 0.63)
|
||||
(new 'static 'vector :x 0.4999 :y 0.7071 :z 0.5)
|
||||
)
|
||||
:color80808080 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:color80808040 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w 64)
|
||||
:color80808000 (new 'static 'vector4w :x #x80 :y #x80 :z #x80)
|
||||
:st0000 (new 'static 'vector :z 1.0)
|
||||
:st0505 (new 'static 'vector :x 0.5 :y 0.5 :z 1.0)
|
||||
:st1010 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)
|
||||
:uv44 (new 'static 'vector4w :x 64 :y 64)
|
||||
:uv88 (new 'static 'vector4w :x #x80 :y #x80)
|
||||
:uv1010 (new 'static 'vector4w :x #x100 :y #x100)
|
||||
:uv2020 (new 'static 'vector4w :x #x200 :y #x200)
|
||||
:uv4040 (new 'static 'vector4w :x #x400 :y #x400)
|
||||
:uv8080 (new 'static 'vector4w :x #x800 :y #x800)
|
||||
:xy00 (new 'static 'vector4w :z #xffffff)
|
||||
:xy88 (new 'static 'vector4w :x #x80 :y #x80 :z #xffffff)
|
||||
:xy1010 (new 'static 'vector4w :x #x100 :y #x100 :z #xffffff)
|
||||
:xy2020 (new 'static 'vector4w :x #x200 :y #x200 :z #xffffff)
|
||||
:xy4040 (new 'static 'vector4w :x #x400 :y #x400 :z #xffffff)
|
||||
:xy8080 (new 'static 'vector4w :x #x800 :y #x800 :z #xffffff)
|
||||
:cloud-alpha (new 'static 'array uint8 36
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
#x80
|
||||
)
|
||||
:tex1 #xeed00080178
|
||||
:tex1-near #xeed0008016c
|
||||
:scales (new 'static 'vector :x -0.00012207031 :y 255.0 :z -0.00012207031 :w 128.0)
|
||||
:mask-hi (new 'static 'vector4w :x -65536 :y -65536 :z -65536 :w -65536)
|
||||
:mask-lo (new 'static 'vector4w :x #xffff :y #xffff :z #xffff :w #xffff)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
@@ -7,30 +7,34 @@
|
||||
|
||||
(declare-type sparticle-system basic)
|
||||
|
||||
;; +++sp-cpuinfo-flag
|
||||
(defenum sp-cpuinfo-flag
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(bit0 0)
|
||||
(bit1 1)
|
||||
(bit2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst
|
||||
(bit3 3)
|
||||
(bit4 4)
|
||||
(sp-cpuinfo-flag-0 0)
|
||||
(sp-cpuinfo-flag-1 1)
|
||||
(sp-cpuinfo-flag-2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst
|
||||
(sp-cpuinfo-flag-3 3)
|
||||
(sp-cpuinfo-flag-4 4)
|
||||
(sp-cpuinfo-flag-5 5)
|
||||
(ready-to-launch 6) ;; maybe just just death?
|
||||
(distort 7) ;; distort sprite
|
||||
(aux-list 8) ;; prevents relaunch, adds to aux
|
||||
(bit9 9)
|
||||
(sp-cpuinfo-flag-9 9)
|
||||
(level0 10)
|
||||
(level1 11)
|
||||
(bit12 12) ;; required to relaunch
|
||||
(bit13 13)
|
||||
(bit14 14)
|
||||
(sp-cpuinfo-flag-12 12) ;; required to relaunch
|
||||
(sp-cpuinfo-flag-13 13)
|
||||
(sp-cpuinfo-flag-14 14)
|
||||
(glow 15) ;; glow sprite
|
||||
(use-global-acc 16)
|
||||
(launch-along-z 17)
|
||||
(left-multiply-quat 18)
|
||||
(right-multiply-quat 19)
|
||||
(set-conerot 20)
|
||||
(sp-cpuinfo-flag-21 21)
|
||||
)
|
||||
;; ---sp-cpuinfo-flag
|
||||
|
||||
;; NOTE - for relocate
|
||||
(declare-type sparticle-system basic)
|
||||
@@ -38,6 +42,11 @@
|
||||
(declare-type sparticle-launch-control inline-array-class)
|
||||
(define-extern forall-particles-with-key (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none))
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo))
|
||||
(define-extern kill-all-particles-with-key (function sparticle-launch-control none))
|
||||
(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *sp-60-hz* #t)
|
||||
@@ -52,8 +61,8 @@
|
||||
(fade rgbaf :inline :offset-assert 48)
|
||||
(acc vector :inline :offset-assert 64)
|
||||
(rotvel3d quaternion :inline :offset-assert 80)
|
||||
(vel vector3s :inline :offset 16)
|
||||
(accel vector3s :inline :offset 64)
|
||||
(vel vector :inline :offset 16)
|
||||
(accel vector :inline :offset 64)
|
||||
(scalevelx float :offset 28)
|
||||
(scalevely float :offset 44)
|
||||
(friction float :offset-assert 96)
|
||||
@@ -73,6 +82,7 @@
|
||||
(clock-index uint8 :offset-assert 129)
|
||||
(user1-int16 uint16 :offset-assert 130)
|
||||
(key sparticle-launch-control :offset-assert 132)
|
||||
(key-alt sparticle-launch-state :offset 132)
|
||||
(binding sparticle-launch-state :offset-assert 136)
|
||||
(data uint32 1 :offset 12)
|
||||
(datab uint8 4 :offset 12)
|
||||
@@ -84,6 +94,7 @@
|
||||
:flag-assert #x90000008c
|
||||
)
|
||||
|
||||
|
||||
(deftype sparticle-launchinfo (structure)
|
||||
((launchrot vector :inline :offset-assert 0)
|
||||
(conerot vector :inline :offset-assert 16)
|
||||
@@ -104,6 +115,7 @@
|
||||
:flag-assert #x900000040
|
||||
)
|
||||
|
||||
|
||||
(deftype sparticle-system (basic)
|
||||
((blocks int32 2 :offset-assert 4)
|
||||
(length int32 2 :offset-assert 12)
|
||||
@@ -118,6 +130,14 @@
|
||||
:method-count-assert 9
|
||||
:size-assert #x34
|
||||
:flag-assert #x900000034
|
||||
(:methods
|
||||
(new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -119,14 +119,20 @@
|
||||
(bit2 2)
|
||||
)
|
||||
|
||||
;; +++sp-group-flag
|
||||
(defenum sp-group-flag
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(use-local-clock 0)
|
||||
(always-draw 1)
|
||||
(screen-space 2)
|
||||
(unknown-bit-01 3) ;; beach-part
|
||||
(unk-3 3) ;; beach-part
|
||||
(unk-4 4)
|
||||
(unk-5 5)
|
||||
(unk-6 6)
|
||||
(unk-7 7)
|
||||
)
|
||||
;; ---sp-group-flag
|
||||
|
||||
(declare-type sparticle-cpuinfo structure)
|
||||
|
||||
@@ -181,8 +187,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(sparticle-launcher-method-9 (_type_ int) uint 9)
|
||||
(sparticle-launcher-method-10 (_type_) none 10)
|
||||
(get-field-spec-by-id (_type_ sp-field-id) sp-field-init-spec 9)
|
||||
(sparticle-launcher-method-10 (_type_ string) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -246,7 +252,7 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xa00000040
|
||||
(:methods
|
||||
(sparticle-launch-group-method-9 () none 9)
|
||||
(create-launch-control (_type_ process) sparticle-launch-control 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -255,7 +261,7 @@
|
||||
|
||||
(deftype sparticle-launch-control (inline-array-class)
|
||||
((group sparticle-launch-group :offset-assert 16)
|
||||
(proc process :offset-assert 20)
|
||||
(proc process-drawable :offset-assert 20)
|
||||
(local-clock int32 :offset-assert 24)
|
||||
(fade float :offset-assert 28)
|
||||
(matrix int8 :offset-assert 32)
|
||||
@@ -271,13 +277,13 @@
|
||||
:size-assert #x70
|
||||
:flag-assert #x1000000070
|
||||
(:methods
|
||||
(sparticle-launch-control-method-9 () none 9)
|
||||
(sparticle-launch-control-method-10 () none 10)
|
||||
(sparticle-launch-control-method-11 () none 11)
|
||||
(sparticle-launch-control-method-12 () none 12)
|
||||
(sparticle-launch-control-method-13 () none 13)
|
||||
(sparticle-launch-control-method-14 () none 14)
|
||||
(sparticle-launch-control-method-15 () none 15)
|
||||
(initialize (_type_ sparticle-launch-group process) none 9)
|
||||
(sparticle-launch-control-method-10 (_type_ vector) symbol 10)
|
||||
(sparticle-launch-control-method-11 (_type_ vector) none 11)
|
||||
(sparticle-launch-control-method-12 (_type_ matrix) none 12)
|
||||
(sparticle-launch-control-method-13 (_type_ cspace) none 13)
|
||||
(kill-and-free-particles (_type_) none 14)
|
||||
(kill-particles (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,661 @@
|
||||
;; name in dgo: sparticle
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; og:ignore-form:sp-get-particle
|
||||
|
||||
(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod print sparticle-cpuinfo ((obj sparticle-cpuinfo))
|
||||
(format #t "<sparticle-cpuinfo>~%")
|
||||
(dotimes (s5-0 16)
|
||||
(format #t "~D:~F~%" s5-0 (the-as float (-> obj data s5-0)))
|
||||
)
|
||||
(format #t "TIMER:~D~%" (-> obj timer))
|
||||
(the-as sparticle-cpuinfo (format #t "FLAGS:~X~%" (-> obj flags)))
|
||||
)
|
||||
|
||||
(defun sp-particle-copy! ((arg0 sparticle-cpuinfo) (arg1 sparticle-cpuinfo))
|
||||
(let ((v1-1 (-> arg1 sprite x-y-z-sx quad)))
|
||||
(set! (-> arg0 sprite x-y-z-sx quad) v1-1)
|
||||
)
|
||||
(let ((v1-3 (-> arg1 sprite flag-rot-sy quad)))
|
||||
(set! (-> arg0 sprite flag-rot-sy quad) v1-3)
|
||||
)
|
||||
(let ((v1-5 (-> arg1 sprite r-g-b-a quad)))
|
||||
(set! (-> arg0 sprite r-g-b-a quad) v1-5)
|
||||
)
|
||||
(dotimes (v1-6 10)
|
||||
(set! (-> arg0 adgif prims v1-6) (-> arg1 adgif prims v1-6))
|
||||
)
|
||||
(set! (-> arg0 vel-sxvel quad) (-> arg1 vel-sxvel quad))
|
||||
(set! (-> arg0 rot-syvel quad) (-> arg1 rot-syvel quad))
|
||||
(set! (-> arg0 fade quad) (-> arg1 fade quad))
|
||||
(set! (-> arg0 acc quad) (-> arg1 acc quad))
|
||||
(set! (-> arg0 friction) (-> arg1 friction))
|
||||
(set! (-> arg0 timer) (-> arg1 timer))
|
||||
(set! (-> arg0 flags) (-> arg1 flags))
|
||||
(set! (-> arg0 user-float) (-> arg1 user-float))
|
||||
(set! (-> arg0 sp-func) (-> arg1 sp-func))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod new sparticle-system ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 int)
|
||||
(arg1 int)
|
||||
(arg2 symbol)
|
||||
(arg3 pointer)
|
||||
(arg4 (inline-array adgif-shader))
|
||||
)
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(let* ((v1-3 (/ (+ arg0 63) 64))
|
||||
(a0-2 (/ (+ arg1 63) 64))
|
||||
(a1-2 (* v1-3 64))
|
||||
(a2-2 (* a0-2 64))
|
||||
(s2-1 (+ v1-3 a0-2))
|
||||
(s5-1 (+ a1-2 a2-2))
|
||||
)
|
||||
(set! (-> gp-0 blocks 0) v1-3)
|
||||
(set! (-> gp-0 length 0) a1-2)
|
||||
(set! (-> gp-0 num-alloc 0) 0)
|
||||
(set! (-> gp-0 blocks 1) a0-2)
|
||||
(set! (-> gp-0 length 1) a2-2)
|
||||
(set! (-> gp-0 num-alloc 1) 0)
|
||||
(set! (-> gp-0 is-3d) (the-as basic arg2))
|
||||
(set! (-> gp-0 alloc-table) (the-as (pointer uint64) (malloc 'global (* s2-1 8))))
|
||||
(set! (-> gp-0 cpuinfo-table) (the-as (inline-array sparticle-cpuinfo) (malloc 'global (* 144 s5-1))))
|
||||
(set! (-> gp-0 vecdata-table) arg3)
|
||||
(set! (-> gp-0 adgifdata-table) arg4)
|
||||
(dotimes (v1-5 s2-1)
|
||||
(set! (-> gp-0 alloc-table v1-5) (the-as uint -1))
|
||||
)
|
||||
(dotimes (s4-1 s5-1)
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 valid) (the-as uint 0))
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 sprite)
|
||||
(the-as sprite-vec-data-2d (&+ (-> gp-0 vecdata-table) (* 48 s4-1)))
|
||||
)
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 adgif) (-> gp-0 adgifdata-table s4-1))
|
||||
(adgif-shader<-texture-simple! (-> gp-0 adgifdata-table s4-1) (the-as texture #f))
|
||||
(set! (-> gp-0 adgifdata-table s4-1 alpha) (new 'static 'gs-alpha :b #x2 :d #x1))
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
(kmemopen global "part-systems")
|
||||
|
||||
(define *sp-particle-system-2d*
|
||||
(new 'global 'sparticle-system 1920 128 #f (-> *sprite-array-2d* vec-data) (-> *sprite-array-2d* adgif-data))
|
||||
)
|
||||
|
||||
(define *sp-particle-system-3d*
|
||||
(new 'global 'sparticle-system 256 0 #t (-> *sprite-array-3d* vec-data) (-> *sprite-array-3d* adgif-data))
|
||||
)
|
||||
|
||||
(kmemclose)
|
||||
|
||||
(defun sp-get-block-size ((arg0 sparticle-system) (arg1 int))
|
||||
(let ((v0-0 0))
|
||||
(let ((v1-0 0)
|
||||
(a2-0 (-> arg0 blocks 0))
|
||||
)
|
||||
(when (= arg1 1)
|
||||
(set! v1-0 a2-0)
|
||||
(set! a2-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(dotimes (a1-3 a2-0)
|
||||
(if (!= (-> arg0 alloc-table (+ v1-0 a1-3)) -1)
|
||||
(set! v0-0 (+ a1-3 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defun sp-get-approx-alloc-size ((arg0 sparticle-system) (arg1 int))
|
||||
(let ((a3-0 arg1)
|
||||
(v1-0 0)
|
||||
)
|
||||
(let ((a1-1 0)
|
||||
(a2-0 (-> arg0 blocks 0))
|
||||
)
|
||||
(when (= a3-0 1)
|
||||
(set! a1-1 a2-0)
|
||||
(set! a2-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(dotimes (a3-3 a2-0)
|
||||
(if (!= (-> arg0 alloc-table (+ a1-1 a3-3)) -1)
|
||||
(set! v1-0 (+ a3-3 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(* v1-0 64)
|
||||
)
|
||||
)
|
||||
|
||||
(defun sp-free-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d))
|
||||
(if (and (-> arg2 binding) (nonzero? (-> arg2 binding)))
|
||||
(logclear! (-> arg2 binding flags) (sp-launch-state-flags launcher-active particles-active))
|
||||
)
|
||||
(let ((v1-6 (/ arg1 64))
|
||||
(t0-4 (logand arg1 63))
|
||||
)
|
||||
(logior! (-> arg0 alloc-table v1-6) (ash 1 t0-4))
|
||||
)
|
||||
(if (< arg1 (-> arg0 length 0))
|
||||
(+! (-> arg0 num-alloc 0) -1)
|
||||
(+! (-> arg0 num-alloc 1) -1)
|
||||
)
|
||||
(set! (-> arg2 valid) (the-as uint 0))
|
||||
(set! (-> arg3 r-g-b-a w) 0.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t2, t1]
|
||||
|
||||
(defun sp-kill-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(cond
|
||||
((>= (the-as int arg1) #x70000000)
|
||||
(set! (-> arg1 timer) 0)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((a2-1 (/ (the-as int (- (the-as uint arg1) (the-as uint (the-as uint (-> arg0 cpuinfo-table 0))))) 144)))
|
||||
(when (or (< a2-1 0) (>= a2-1 (+ (-> arg0 length 0) (-> arg0 length 1))))
|
||||
(format 0 "Tried to release particle ~D~%" a2-1)
|
||||
(return #f)
|
||||
)
|
||||
(sp-free-particle arg0 a2-1 arg1 (-> arg1 sprite))
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
(defun sp-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(let* ((f2-0 (-> arg1 omega))
|
||||
(f0-0 (-> arg1 radius))
|
||||
(f3-0 (-> arg1 vel-sxvel x))
|
||||
(f30-0 (-> arg1 vel-sxvel y))
|
||||
(f1-0 (-> arg1 vel-sxvel z))
|
||||
(f4-0 (-> *display* clock (-> arg1 clock-index) sparticle-data y))
|
||||
(f26-0 (+ f2-0 (* f3-0 f4-0)))
|
||||
)
|
||||
(set! (-> arg1 omega) f26-0)
|
||||
(let ((f28-0 (+ f0-0 (* f1-0 f4-0))))
|
||||
(set! (-> arg1 radius) f28-0)
|
||||
(let ((f24-0 (sin f26-0))
|
||||
(f26-1 (cos f26-0))
|
||||
(f22-0 (sin (* 0.5 f30-0)))
|
||||
(f0-5 (cos (* 0.5 f30-0)))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set-vector! a1-1 (* f22-0 f26-1) 0.0 (* f22-0 f24-0) f0-5)
|
||||
(quaternion*! (-> arg1 rotvel3d) (the-as quaternion a1-1) (-> arg1 rotvel3d))
|
||||
(quaternion-normalize! (-> arg1 rotvel3d))
|
||||
(set-vector! s4-0 (* f24-0 f28-0) 0.0 (* f26-1 f28-0) 1.0)
|
||||
(quaternion->matrix s3-0 (-> arg1 rotvel3d))
|
||||
(vector-matrix*! s4-0 s4-0 s3-0)
|
||||
)
|
||||
(let ((v1-8 (the-as sprite-vec-data-2d (-> arg1 user-float))))
|
||||
(set! (-> arg2 x) (+ (-> s4-0 x) (-> v1-8 x-y-z-sx x)))
|
||||
(set! (-> arg2 y) (+ (-> s4-0 y) (-> v1-8 x-y-z-sx y)))
|
||||
(set! (-> arg2 z) (+ (-> s4-0 z) (-> v1-8 x-y-z-sx z)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defun sp-copy-to-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sp-copy-from-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defun sp-process-block ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d) (arg3 int))
|
||||
(local-vars (sv-16 int) (sv-32 int) (sv-48 int) (sv-64 int))
|
||||
(let ((s3-0 208)
|
||||
(s2-0 (* 144 arg3))
|
||||
(s5-0 (* 48 arg3))
|
||||
)
|
||||
(set! sv-32 (* 80 arg3))
|
||||
(let ((s1-0 (+ s3-0 s2-0)))
|
||||
(set! sv-16 (+ s1-0 s5-0))
|
||||
(sp-copy-to-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0)
|
||||
(sp-copy-to-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0)
|
||||
(let ((t9-2 sp-copy-to-spr)
|
||||
(a1-7 (-> arg0 adgifdata-table arg1))
|
||||
)
|
||||
(t9-2 sv-16 (the-as pointer a1-7) sv-32)
|
||||
)
|
||||
(set! sv-48 (+ #x70000000 s3-0))
|
||||
(set! sv-64 (+ #x70000000 s1-0))
|
||||
(let ((t1-0 (paused?)))
|
||||
(cond
|
||||
((-> arg0 is-3d)
|
||||
(let ((t9-4 sp-process-block-3d)
|
||||
(a0-6 arg0)
|
||||
(a3-1 arg1)
|
||||
)
|
||||
(t9-4 a0-6 sv-48 sv-64 a3-1 arg3 t1-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sp-process-block-2d arg0 sv-48 sv-64 arg1 arg3 t1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(sp-copy-from-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0)
|
||||
(sp-copy-from-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sp-process-particle-system ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d))
|
||||
(countdown (v1-0 13)
|
||||
(let ((a0-4 (-> *display* clock v1-0 sparticle-data quad)))
|
||||
(set! (-> (the-as vector (+ #x70000000 (* v1-0 16))) quad) a0-4)
|
||||
)
|
||||
)
|
||||
(let* ((v1-3 208)
|
||||
(s1-0 (/ (- #x4000 v1-3) 272))
|
||||
(s2-0 0)
|
||||
(s3-0 (sp-get-approx-alloc-size arg0 arg1))
|
||||
)
|
||||
(if (= arg1 1)
|
||||
(set! s2-0 (* (-> arg0 blocks 0) 64))
|
||||
)
|
||||
(set! (-> arg2 num-valid arg1) s3-0)
|
||||
(flush-cache 0)
|
||||
(while (>= s3-0 s1-0)
|
||||
(sp-process-block arg0 s2-0 arg2 s1-0)
|
||||
(set! s3-0 (- s3-0 s1-0))
|
||||
(+! s2-0 s1-0)
|
||||
)
|
||||
(if (> s3-0 0)
|
||||
(sp-process-block arg0 s2-0 arg2 s3-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define-perm *particles-flag* symbol #t)
|
||||
|
||||
(defun forall-particles-with-key-runner ((arg0 sparticle-launch-control)
|
||||
(arg1 (function sparticle-system sparticle-cpuinfo none))
|
||||
(arg2 sparticle-system)
|
||||
)
|
||||
(local-vars (sv-16 int))
|
||||
(let ((s3-0 (the-as object (-> arg2 cpuinfo-table 0)))
|
||||
(s2-0 (&+ (-> arg2 vecdata-table) 0))
|
||||
(s1-0 (+ (-> arg2 blocks 0) (-> arg2 blocks 1)))
|
||||
)
|
||||
(dotimes (s0-0 s1-0)
|
||||
(cond
|
||||
((!= (-> arg2 alloc-table s0-0) -1)
|
||||
(set! sv-16 0)
|
||||
(while (< sv-16 64)
|
||||
(if (and (nonzero? (-> (the-as sparticle-cpuinfo s3-0) valid)) (= (-> (the-as sparticle-cpuinfo s3-0) key) arg0))
|
||||
(arg1 arg2 (the-as sparticle-cpuinfo s3-0))
|
||||
)
|
||||
(set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 1))
|
||||
(&+! s2-0 48)
|
||||
(set! sv-16 (+ sv-16 1))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 64))
|
||||
(&+! s2-0 3072)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun forall-particles-with-key ((arg0 sparticle-launch-control)
|
||||
(arg1 (function sparticle-system sparticle-cpuinfo none))
|
||||
(arg2 symbol)
|
||||
(arg3 symbol)
|
||||
)
|
||||
(if arg2
|
||||
(forall-particles-with-key-runner arg0 arg1 *sp-particle-system-2d*)
|
||||
)
|
||||
(if arg3
|
||||
(forall-particles-with-key-runner arg0 arg1 *sp-particle-system-3d*)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(set! (-> arg1 timer) 0)
|
||||
(set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0))
|
||||
(when (and (-> arg1 binding) (nonzero? (-> arg1 binding)))
|
||||
(logclear! (-> arg1 binding flags) (sp-launch-state-flags launcher-active particles-active))
|
||||
(set! (-> arg1 binding) #f)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (zero? (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)) (sp-cpuinfo-flag level0))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9 level0)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level4 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)) (sp-cpuinfo-flag level1))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-kill-it-level5 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9 level1)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-60-to-50 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let ((gp-0 (-> arg1 rotvel3d))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-angle<-quaternion! s5-0 gp-0)
|
||||
(set! (-> s5-0 w) (* 12516.455 (-> s5-0 w)))
|
||||
(quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun sparticle-50-to-60 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let ((gp-0 (-> arg1 rotvel3d))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-angle<-quaternion! s5-0 gp-0)
|
||||
(set! (-> s5-0 w) (* 8691.982 (-> s5-0 w)))
|
||||
(quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun kill-all-particles-with-key ((arg0 sparticle-launch-control))
|
||||
(forall-particles-with-key arg0 sparticle-kill-it #t #t)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun forall-particles-runner ((arg0 (function sparticle-system sparticle-cpuinfo pointer none)) (arg1 sparticle-system))
|
||||
(let ((s4-0 (the-as object (-> arg1 cpuinfo-table 0)))
|
||||
(s3-0 (&+ (-> arg1 vecdata-table) 0))
|
||||
(s2-0 (+ (-> arg1 blocks 0) (-> arg1 blocks 1)))
|
||||
)
|
||||
(dotimes (s1-0 s2-0)
|
||||
(cond
|
||||
((!= (-> arg1 alloc-table s1-0) -1)
|
||||
(dotimes (s0-0 64)
|
||||
(if (nonzero? (-> (the-as sparticle-cpuinfo s4-0) valid))
|
||||
(arg0 arg1 (the-as sparticle-cpuinfo s4-0) s3-0)
|
||||
)
|
||||
(set! s4-0 (+ (the-as uint s4-0) 144))
|
||||
(&+! s3-0 48)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s4-0 (&+ (the-as pointer s4-0) 9216))
|
||||
(&+! s3-0 3072)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun forall-particles ((arg0 function) (arg1 symbol) (arg2 symbol))
|
||||
(if arg1
|
||||
(forall-particles-runner
|
||||
(the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0)
|
||||
*sp-particle-system-2d*
|
||||
)
|
||||
)
|
||||
(if arg2
|
||||
(forall-particles-runner
|
||||
(the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0)
|
||||
*sp-particle-system-3d*
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun kill-all-particles-in-level ((arg0 level))
|
||||
(let ((t9-0 forall-particles)
|
||||
(v1-0 (-> arg0 index))
|
||||
)
|
||||
(t9-0
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
sparticle-kill-it-level0
|
||||
)
|
||||
((= v1-0 1)
|
||||
sparticle-kill-it-level1
|
||||
)
|
||||
((= v1-0 2)
|
||||
sparticle-kill-it-level2
|
||||
)
|
||||
((= v1-0 3)
|
||||
sparticle-kill-it-level3
|
||||
)
|
||||
((= v1-0 4)
|
||||
sparticle-kill-it-level4
|
||||
)
|
||||
(else
|
||||
sparticle-kill-it-level5
|
||||
)
|
||||
)
|
||||
#t
|
||||
#t
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defun all-particles-50-to-60 ()
|
||||
(forall-particles-runner sparticle-50-to-60 *sp-particle-system-3d*)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun all-particles-60-to-50 ()
|
||||
(forall-particles-runner sparticle-60-to-50 *sp-particle-system-3d*)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun remap-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let* ((gp-0 (-> arg1 adgif))
|
||||
(a0-1 (-> gp-0 texture-id))
|
||||
(v1-0 (lookup-texture-by-id-fast a0-1))
|
||||
)
|
||||
(when v1-0
|
||||
(set! (-> gp-0 tex0 tbp0) (-> v1-0 dest 0))
|
||||
(set! (-> gp-0 tex0 cbp) (-> v1-0 clutdest))
|
||||
(set! (-> gp-0 miptbp1 tbp1) (-> v1-0 dest 1))
|
||||
(set! (-> gp-0 miptbp1 tbp2) (-> v1-0 dest 2))
|
||||
(set! (-> gp-0 miptbp1 tbp3) (-> v1-0 dest 3))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun remap-all-particles ()
|
||||
(forall-particles remap-particle #t #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 gp, Count]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
(defun process-particles ()
|
||||
(local-vars (v1-53 int) (gp-0 int))
|
||||
(with-pp
|
||||
(when *particles-flag*
|
||||
0
|
||||
0
|
||||
(.mfc0 gp-0 Count)
|
||||
(set! *sp-launcher-lock* #t)
|
||||
(when *debug-segment*
|
||||
(let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-12 'particles)
|
||||
(s4-0 *profile-particles-color*)
|
||||
)
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let ((s3-0 (-> s5-0 data (-> s5-0 count))))
|
||||
(let ((s2-0 (-> s5-0 base-time)))
|
||||
(set! (-> s3-0 name) v1-12)
|
||||
(set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0))))
|
||||
)
|
||||
(set! (-> s3-0 depth) (the-as uint (-> s5-0 depth)))
|
||||
(set! (-> s3-0 color) s4-0)
|
||||
(set! (-> s5-0 segment (-> s5-0 depth)) s3-0)
|
||||
)
|
||||
(+! (-> s5-0 count) 1)
|
||||
(+! (-> s5-0 depth) 1)
|
||||
(set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(logand (the-as int (-> pp clock sparticle-data x)) 255)
|
||||
(cond
|
||||
(*sp-60-hz*
|
||||
(when (= (-> *setting-control* user-current video-mode) 'pal)
|
||||
(set! *sp-60-hz* #f)
|
||||
(all-particles-60-to-50)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (= (-> *setting-control* user-current video-mode) 'ntsc)
|
||||
(set! *sp-60-hz* #t)
|
||||
(all-particles-50-to-60)
|
||||
)
|
||||
)
|
||||
)
|
||||
(clear-sprite-aux-list)
|
||||
(sp-process-particle-system *sp-particle-system-2d* 0 *sprite-array-2d*)
|
||||
(sp-process-particle-system *sp-particle-system-2d* 1 *sprite-array-2d*)
|
||||
(sp-process-particle-system *sp-particle-system-3d* 0 (the-as sprite-array-2d *sprite-array-3d*))
|
||||
(when *debug-segment*
|
||||
(let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-47 (+ (-> s5-1 depth) -1))
|
||||
(s4-1 (-> s5-1 segment v1-47))
|
||||
(s3-1 (-> s5-1 base-time))
|
||||
)
|
||||
(when (>= v1-47 0)
|
||||
(set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1))))
|
||||
(+! (-> s5-1 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(set! *sp-launcher-lock* #f)
|
||||
(sp-clear-queue)
|
||||
(.mfc0 v1-53 Count)
|
||||
(- v1-53 gp-0)
|
||||
(when *display-sprite-info*
|
||||
(if (movie?)
|
||||
(format *stdcon* "~%~%~%")
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
"2d: ~4d~100h3d: ~4d~200hwarp/glow: ~3D~350hhud:~3D~%"
|
||||
(-> *sp-particle-system-2d* num-alloc 0)
|
||||
(-> *sp-particle-system-3d* num-alloc 0)
|
||||
(-> *sprite-aux-list* entry)
|
||||
(-> *sp-particle-system-2d* num-alloc 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
(declare-type fog-texture-work structure)
|
||||
(define-extern *fog-texture-work* fog-texture-work)
|
||||
|
||||
;; NOTE - for sparticle
|
||||
(declare-type adgif-shader structure)
|
||||
(declare-type texture basic)
|
||||
(declare-type texture-id uint32)
|
||||
(define-extern adgif-shader<-texture-simple! (function adgif-shader texture adgif-shader))
|
||||
(define-extern lookup-texture-by-id-fast (function texture-id texture))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype texture-id (uint32)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
(declare-type level-group basic)
|
||||
(declare-type entity-links-array inline-array-class)
|
||||
(declare-type game-text-info basic)
|
||||
(declare-type engine basic)
|
||||
|
||||
(define-extern *level* level-group)
|
||||
(define-extern *draw-index* int)
|
||||
@@ -205,12 +206,12 @@
|
||||
|
||||
(deftype level (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(load-name basic :offset-assert 8)
|
||||
(nickname basic :offset-assert 12)
|
||||
(load-name string :offset-assert 8)
|
||||
(nickname string :offset-assert 12)
|
||||
(index int32 :offset-assert 16)
|
||||
(status symbol :offset-assert 20)
|
||||
(borrow-level basic 2 :offset-assert 24)
|
||||
(borrow-from-level basic :offset-assert 32)
|
||||
(borrow-level level 2 :offset-assert 24)
|
||||
(borrow-from-level level :offset-assert 32)
|
||||
(heap kheap :inline :offset-assert 48)
|
||||
(borrow-heap kheap 2 :inline :offset-assert 64)
|
||||
(bsp bsp-header :offset-assert 96)
|
||||
@@ -256,24 +257,24 @@
|
||||
(texture-dirty-masks texture-mask 10 :inline :offset-assert 4576)
|
||||
(texture-mask texture-mask 18 :inline :offset-assert 4736)
|
||||
(sky-mask texture-mask :inline :offset-assert 5024)
|
||||
(tfrag-masks basic :offset-assert 5040)
|
||||
(tfrag-masks texture-masks-array :offset-assert 5040)
|
||||
(tfrag-dists pointer :offset-assert 5044)
|
||||
(shrub-masks basic :offset-assert 5048)
|
||||
(shrub-masks texture-masks-array :offset-assert 5048)
|
||||
(shrub-dists pointer :offset-assert 5052)
|
||||
(alpha-masks basic :offset-assert 5056)
|
||||
(alpha-masks texture-masks-array :offset-assert 5056)
|
||||
(alpha-dists pointer :offset-assert 5060)
|
||||
(water-masks basic :offset-assert 5064)
|
||||
(water-masks texture-masks-array :offset-assert 5064)
|
||||
(water-dists pointer :offset-assert 5068)
|
||||
(tfrag-last-calls int32 6 :offset-assert 5072)
|
||||
(texture-anim-array texture-anim-array 10 :offset-assert 5096)
|
||||
(light-hash basic :offset-assert 5136)
|
||||
(light-hash light-hash :offset-assert 5136)
|
||||
(draw-priority float :offset-assert 5140)
|
||||
(draw-index int32 :offset-assert 5144)
|
||||
(part-engine basic :offset-assert 5148)
|
||||
(part-engine engine :offset-assert 5148)
|
||||
(user-object basic 4 :offset-assert 5152)
|
||||
(loaded-text-info-count int32 :offset-assert 5168)
|
||||
(loaded-text-info game-text-info 8 :offset-assert 5172)
|
||||
(level-type basic :offset-assert 5204)
|
||||
(level-type type :offset-assert 5204)
|
||||
(load-order int64 :offset-assert 5208)
|
||||
(pad int8 12 :offset-assert 5216)
|
||||
)
|
||||
@@ -389,7 +390,7 @@
|
||||
:level0 (new 'static 'level
|
||||
:name #f
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -400,7 +401,7 @@
|
||||
:name #f
|
||||
:index 1
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -411,7 +412,7 @@
|
||||
:name #f
|
||||
:index 2
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -422,7 +423,7 @@
|
||||
:name #f
|
||||
:index 3
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -433,7 +434,7 @@
|
||||
:name #f
|
||||
:index 4
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -444,7 +445,7 @@
|
||||
:name #f
|
||||
:index 5
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -455,7 +456,7 @@
|
||||
:name 'default
|
||||
:index 6
|
||||
:status 'reserved
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:bsp #f
|
||||
:inside-boxes #f
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
;; TODO: document this stuff when doing loader.gc
|
||||
|
||||
(declare-type external-art-buffer basic)
|
||||
(define-extern external-art-buffer-init (function external-art-buffer int))
|
||||
(declare-type art basic)
|
||||
(declare-type art-group art)
|
||||
|
||||
@@ -87,6 +87,6 @@ def update_all_blocks(game_name, block_dict):
|
||||
else:
|
||||
final_lines.append(line)
|
||||
i = i + 1
|
||||
# Update the file contents
|
||||
with open(path, "w") as f:
|
||||
f.writelines(final_lines)
|
||||
# Update the file contents
|
||||
with open(path, "w") as f:
|
||||
f.writelines(final_lines)
|
||||
|
||||
@@ -15,26 +15,35 @@ parser.add_argument("--decompiler", help="The path to the decompiler", type=str)
|
||||
parser.add_argument("--decompiler_config", help="The decomp config", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get a list of changed files, as well as new files
|
||||
file_names = set()
|
||||
for item in repo.index.diff(None):
|
||||
path = item.b_rawpath.decode("utf-8")
|
||||
if args.game in path and "_REF" in path:
|
||||
file_name = os.path.basename(path).replace("_REF.gc", "")
|
||||
print("Decompiling - {}".format(file_name))
|
||||
# Decompile file
|
||||
subprocess.run(
|
||||
[
|
||||
args.decompiler,
|
||||
"./decompiler/config/{}".format(args.decompiler_config),
|
||||
"./iso_data",
|
||||
"./decompiler_out",
|
||||
"--config-override",
|
||||
'{{"allowed_objects": ["{}"]}}'.format(file_name),
|
||||
]
|
||||
)
|
||||
print("Updating - {}".format(file_name))
|
||||
# Update gsrc
|
||||
os.system(
|
||||
"python ./scripts/gsrc/update-from-decomp.py --game {} --file {}".format(
|
||||
args.game, file_name
|
||||
)
|
||||
file_names.add(os.path.basename(path).replace("_REF.gc", ""))
|
||||
|
||||
for item in repo.untracked_files:
|
||||
path = item
|
||||
if args.game in path and "_REF" in path:
|
||||
file_names.add(os.path.basename(path).replace("_REF.gc", ""))
|
||||
|
||||
for file_name in file_names:
|
||||
print("Decompiling - {}".format(file_name))
|
||||
# Decompile file
|
||||
subprocess.run(
|
||||
[
|
||||
args.decompiler,
|
||||
"./decompiler/config/{}".format(args.decompiler_config),
|
||||
"./iso_data",
|
||||
"./decompiler_out",
|
||||
"--config-override",
|
||||
'{{"allowed_objects": ["{}"]}}'.format(file_name),
|
||||
]
|
||||
)
|
||||
print("Updating - {}".format(file_name))
|
||||
# Update gsrc
|
||||
os.system(
|
||||
"python ./scripts/gsrc/update-from-decomp.py --game {} --file {}".format(
|
||||
args.game, file_name
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -994,7 +994,7 @@
|
||||
:size-assert #x206c
|
||||
:flag-assert #x5c0000206c
|
||||
(:methods
|
||||
(ocean-method-11 () none 11)
|
||||
(ocean-method-11 (_type_ (inline-array vector) symbol) float 11)
|
||||
(ocean-method-12 () none 12)
|
||||
(ocean-method-13 () none 13)
|
||||
(ocean-method-14 () none 14)
|
||||
|
||||
+6
-6
@@ -15,8 +15,8 @@
|
||||
(fade rgbaf :inline :offset-assert 48)
|
||||
(acc vector :inline :offset-assert 64)
|
||||
(rotvel3d quaternion :inline :offset-assert 80)
|
||||
(vel vector3s :inline :offset 16)
|
||||
(accel vector3s :inline :offset 64)
|
||||
(vel vector :inline :offset 16)
|
||||
(accel vector :inline :offset 64)
|
||||
(scalevelx float :offset 28)
|
||||
(scalevely float :offset 44)
|
||||
(friction float :offset-assert 96)
|
||||
@@ -36,6 +36,7 @@
|
||||
(clock-index uint8 :offset-assert 129)
|
||||
(user1-int16 uint16 :offset-assert 130)
|
||||
(key sparticle-launch-control :offset-assert 132)
|
||||
(key-alt sparticle-launch-state :offset 132)
|
||||
(binding sparticle-launch-state :offset-assert 136)
|
||||
(data uint32 1 :offset 12)
|
||||
(datab uint8 4 :offset 12)
|
||||
@@ -153,6 +154,9 @@
|
||||
:method-count-assert 9
|
||||
:size-assert #x34
|
||||
:flag-assert #x900000034
|
||||
(:methods
|
||||
(new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sparticle-system
|
||||
@@ -177,7 +181,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Generated
Vendored
+12
-11
@@ -95,12 +95,13 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(sparticle-launcher-method-9 (_type_ int) uint 9)
|
||||
(sparticle-launcher-method-10 (_type_) none 10)
|
||||
(get-field-spec-by-id (_type_ sp-field-id) sp-field-init-spec 9)
|
||||
(sparticle-launcher-method-10 (_type_ string) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sparticle-launcher
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect sparticle-launcher ((obj sparticle-launcher))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
@@ -220,7 +221,7 @@
|
||||
:size-assert #x40
|
||||
:flag-assert #xa00000040
|
||||
(:methods
|
||||
(sparticle-launch-group-method-9 () none 9)
|
||||
(create-launch-control (_type_ process) sparticle-launch-control 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -254,7 +255,7 @@
|
||||
;; definition of type sparticle-launch-control
|
||||
(deftype sparticle-launch-control (inline-array-class)
|
||||
((group sparticle-launch-group :offset-assert 16)
|
||||
(proc process :offset-assert 20)
|
||||
(proc process-drawable :offset-assert 20)
|
||||
(local-clock int32 :offset-assert 24)
|
||||
(fade float :offset-assert 28)
|
||||
(matrix int8 :offset-assert 32)
|
||||
@@ -270,13 +271,13 @@
|
||||
:size-assert #x70
|
||||
:flag-assert #x1000000070
|
||||
(:methods
|
||||
(sparticle-launch-control-method-9 () none 9)
|
||||
(sparticle-launch-control-method-10 () none 10)
|
||||
(sparticle-launch-control-method-11 () none 11)
|
||||
(sparticle-launch-control-method-12 () none 12)
|
||||
(sparticle-launch-control-method-13 () none 13)
|
||||
(sparticle-launch-control-method-14 () none 14)
|
||||
(sparticle-launch-control-method-15 () none 15)
|
||||
(initialize (_type_ sparticle-launch-group process) none 9)
|
||||
(sparticle-launch-control-method-10 (_type_ vector) symbol 10)
|
||||
(sparticle-launch-control-method-11 (_type_ vector) none 11)
|
||||
(sparticle-launch-control-method-12 (_type_ matrix) none 12)
|
||||
(sparticle-launch-control-method-13 (_type_ cspace) none 13)
|
||||
(kill-and-free-particles (_type_) none 14)
|
||||
(kill-particles (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Generated
Vendored
+3145
File diff suppressed because it is too large
Load Diff
+812
@@ -0,0 +1,812 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 2 of type sparticle-cpuinfo
|
||||
;; INFO: Return type mismatch object vs sparticle-cpuinfo.
|
||||
(defmethod print sparticle-cpuinfo ((obj sparticle-cpuinfo))
|
||||
(format #t "<sparticle-cpuinfo>~%")
|
||||
(dotimes (s5-0 16)
|
||||
(format #t "~D:~F~%" s5-0 (the-as float (-> obj data s5-0)))
|
||||
)
|
||||
(format #t "TIMER:~D~%" (-> obj timer))
|
||||
(the-as sparticle-cpuinfo (format #t "FLAGS:~X~%" (-> obj flags)))
|
||||
)
|
||||
|
||||
;; definition for function sp-particle-copy!
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) vs none.
|
||||
(defun sp-particle-copy! ((arg0 sparticle-cpuinfo) (arg1 sparticle-cpuinfo))
|
||||
(let ((v1-1 (-> arg1 sprite x-y-z-sx quad)))
|
||||
(set! (-> arg0 sprite x-y-z-sx quad) v1-1)
|
||||
)
|
||||
(let ((v1-3 (-> arg1 sprite flag-rot-sy quad)))
|
||||
(set! (-> arg0 sprite flag-rot-sy quad) v1-3)
|
||||
)
|
||||
(let ((v1-5 (-> arg1 sprite r-g-b-a quad)))
|
||||
(set! (-> arg0 sprite r-g-b-a quad) v1-5)
|
||||
)
|
||||
(dotimes (v1-6 10)
|
||||
(set! (-> arg0 adgif prims v1-6) (-> arg1 adgif prims v1-6))
|
||||
)
|
||||
(set! (-> arg0 vel-sxvel quad) (-> arg1 vel-sxvel quad))
|
||||
(set! (-> arg0 rot-syvel quad) (-> arg1 rot-syvel quad))
|
||||
(set! (-> arg0 fade quad) (-> arg1 fade quad))
|
||||
(set! (-> arg0 acc quad) (-> arg1 acc quad))
|
||||
(set! (-> arg0 friction) (-> arg1 friction))
|
||||
(set! (-> arg0 timer) (-> arg1 timer))
|
||||
(set! (-> arg0 flags) (-> arg1 flags))
|
||||
(set! (-> arg0 user-float) (-> arg1 user-float))
|
||||
(set! (-> arg0 sp-func) (-> arg1 sp-func))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 0 of type sparticle-system
|
||||
(defmethod new sparticle-system ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 int)
|
||||
(arg1 int)
|
||||
(arg2 symbol)
|
||||
(arg3 pointer)
|
||||
(arg4 (inline-array adgif-shader))
|
||||
)
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(let* ((v1-3 (/ (+ arg0 63) 64))
|
||||
(a0-2 (/ (+ arg1 63) 64))
|
||||
(a1-2 (* v1-3 64))
|
||||
(a2-2 (* a0-2 64))
|
||||
(s2-1 (+ v1-3 a0-2))
|
||||
(s5-1 (+ a1-2 a2-2))
|
||||
)
|
||||
(set! (-> gp-0 blocks 0) v1-3)
|
||||
(set! (-> gp-0 length 0) a1-2)
|
||||
(set! (-> gp-0 num-alloc 0) 0)
|
||||
(set! (-> gp-0 blocks 1) a0-2)
|
||||
(set! (-> gp-0 length 1) a2-2)
|
||||
(set! (-> gp-0 num-alloc 1) 0)
|
||||
(set! (-> gp-0 is-3d) (the-as basic arg2))
|
||||
(set! (-> gp-0 alloc-table) (the-as (pointer uint64) (malloc 'global (* s2-1 8))))
|
||||
(set! (-> gp-0 cpuinfo-table) (the-as (inline-array sparticle-cpuinfo) (malloc 'global (* 144 s5-1))))
|
||||
(set! (-> gp-0 vecdata-table) arg3)
|
||||
(set! (-> gp-0 adgifdata-table) arg4)
|
||||
(dotimes (v1-5 s2-1)
|
||||
(set! (-> gp-0 alloc-table v1-5) (the-as uint -1))
|
||||
)
|
||||
(dotimes (s4-1 s5-1)
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 valid) (the-as uint 0))
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 sprite)
|
||||
(the-as sprite-vec-data-2d (&+ (-> gp-0 vecdata-table) (* 48 s4-1)))
|
||||
)
|
||||
(set! (-> gp-0 cpuinfo-table s4-1 adgif) (-> gp-0 adgifdata-table s4-1))
|
||||
(adgif-shader<-texture-simple! (-> gp-0 adgifdata-table s4-1) (the-as texture #f))
|
||||
(set! (-> gp-0 adgifdata-table s4-1 alpha) (new 'static 'gs-alpha :b #x2 :d #x1))
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(kmemopen global "part-systems")
|
||||
|
||||
;; definition for symbol *sp-particle-system-2d*, type sparticle-system
|
||||
(define *sp-particle-system-2d*
|
||||
(new 'global 'sparticle-system 1920 128 #f (-> *sprite-array-2d* vec-data) (-> *sprite-array-2d* adgif-data))
|
||||
)
|
||||
|
||||
;; definition for symbol *sp-particle-system-3d*, type sparticle-system
|
||||
(define *sp-particle-system-3d*
|
||||
(new 'global 'sparticle-system 256 0 #t (-> *sprite-array-3d* vec-data) (-> *sprite-array-3d* adgif-data))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(kmemclose)
|
||||
|
||||
;; definition for function sp-get-block-size
|
||||
(defun sp-get-block-size ((arg0 sparticle-system) (arg1 int))
|
||||
(let ((v0-0 0))
|
||||
(let ((v1-0 0)
|
||||
(a2-0 (-> arg0 blocks 0))
|
||||
)
|
||||
(when (= arg1 1)
|
||||
(set! v1-0 a2-0)
|
||||
(set! a2-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(dotimes (a1-3 a2-0)
|
||||
(if (!= (-> arg0 alloc-table (+ v1-0 a1-3)) -1)
|
||||
(set! v0-0 (+ a1-3 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function sp-get-approx-alloc-size
|
||||
(defun sp-get-approx-alloc-size ((arg0 sparticle-system) (arg1 int))
|
||||
(let ((a3-0 arg1)
|
||||
(v1-0 0)
|
||||
)
|
||||
(let ((a1-1 0)
|
||||
(a2-0 (-> arg0 blocks 0))
|
||||
)
|
||||
(when (= a3-0 1)
|
||||
(set! a1-1 a2-0)
|
||||
(set! a2-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(dotimes (a3-3 a2-0)
|
||||
(if (!= (-> arg0 alloc-table (+ a1-1 a3-3)) -1)
|
||||
(set! v1-0 (+ a3-3 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(* v1-0 64)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function sp-free-particle
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-free-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d))
|
||||
(if (and (-> arg2 binding) (nonzero? (-> arg2 binding)))
|
||||
(logclear! (-> arg2 binding flags) (sp-launch-state-flags launcher-active particles-active))
|
||||
)
|
||||
(let ((v1-6 (/ arg1 64))
|
||||
(t0-4 (logand arg1 63))
|
||||
)
|
||||
(logior! (-> arg0 alloc-table v1-6) (ash 1 t0-4))
|
||||
)
|
||||
(if (< arg1 (-> arg0 length 0))
|
||||
(+! (-> arg0 num-alloc 0) -1)
|
||||
(+! (-> arg0 num-alloc 1) -1)
|
||||
)
|
||||
(set! (-> arg2 valid) (the-as uint 0))
|
||||
(set! (-> arg3 r-g-b-a w) 0.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sp-get-particle
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t2, t1]
|
||||
(defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state))
|
||||
(local-vars
|
||||
(a2-3 int)
|
||||
(a2-4 int)
|
||||
(a2-5 int)
|
||||
(a2-6 int)
|
||||
(a2-7 int)
|
||||
(a2-8 int)
|
||||
(t1-16 int)
|
||||
(t1-17 int)
|
||||
(t1-18 int)
|
||||
(t1-19 int)
|
||||
(t1-20 int)
|
||||
(t3-5 int)
|
||||
)
|
||||
(let ((v1-0 0)
|
||||
(t0-0 (-> arg0 blocks 0))
|
||||
(a3-0 0)
|
||||
)
|
||||
(when (= arg1 1)
|
||||
(set! v1-0 t0-0)
|
||||
(set! t0-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(when arg2
|
||||
(set! a3-0 (the-as int (-> arg2 randomize)))
|
||||
(+! (-> arg2 randomize) 1)
|
||||
(when (= (-> arg2 randomize) t0-0)
|
||||
(set! (-> arg2 randomize) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
(dotimes (a2-1 t0-0)
|
||||
(when (nonzero? (-> arg0 alloc-table (+ v1-0 a3-0)))
|
||||
(let ((a2-2 0)
|
||||
(t1-15 (-> arg0 alloc-table (+ v1-0 a3-0)))
|
||||
(t0-4 (* (+ v1-0 a3-0) 64))
|
||||
)
|
||||
0
|
||||
0
|
||||
(let ((t2-4 (shl t1-15 32))
|
||||
(t3-0 (+ a2-2 32))
|
||||
)
|
||||
(move-if-not-zero t1-16 t2-4 t2-4 t1-15)
|
||||
(.movz a2-3 t3-0 t2-4 a2-2)
|
||||
)
|
||||
(let ((t2-5 (shl t1-16 16))
|
||||
(t3-1 (+ a2-3 16))
|
||||
)
|
||||
(move-if-not-zero t1-17 t2-5 t2-5 t1-16)
|
||||
(.movz a2-4 t3-1 t2-5 a2-3)
|
||||
)
|
||||
(let ((t2-6 (* t1-17 256))
|
||||
(t3-2 (+ a2-4 8))
|
||||
)
|
||||
(move-if-not-zero t1-18 t2-6 t2-6 t1-17)
|
||||
(.movz a2-5 t3-2 t2-6 a2-4)
|
||||
)
|
||||
(let ((t2-7 (* t1-18 16))
|
||||
(t3-3 (+ a2-5 4))
|
||||
)
|
||||
(move-if-not-zero t1-19 t2-7 t2-7 t1-18)
|
||||
(.movz a2-6 t3-3 t2-7 a2-5)
|
||||
)
|
||||
(let ((t2-8 (* t1-19 4))
|
||||
(t3-4 (+ a2-6 2))
|
||||
)
|
||||
(move-if-not-zero t1-20 t2-8 t2-8 t1-19)
|
||||
(.movz a2-7 t3-4 t2-8 a2-6)
|
||||
(let ((t1-21 (* t1-20 2))
|
||||
(t2-9 (+ a2-7 1))
|
||||
)
|
||||
(move-if-not-zero t3-5 t1-21 t1-21 t3-4)
|
||||
(.movz a2-8 t2-9 t1-21 a2-7)
|
||||
)
|
||||
)
|
||||
(let ((t0-5 (+ t0-4 a2-8)))
|
||||
(logxor! (-> arg0 alloc-table (+ v1-0 a3-0)) (the-as uint (ash 1 a2-8)))
|
||||
(+! (-> arg0 num-alloc arg1) 1)
|
||||
(let ((v1-9 (-> arg0 cpuinfo-table t0-5)))
|
||||
(set! (-> v1-9 valid) (the-as uint 1))
|
||||
(return v1-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! a3-0 1)
|
||||
(if (= a3-0 t0-0)
|
||||
(set! a3-0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as sparticle-cpuinfo #f)
|
||||
)
|
||||
|
||||
;; definition for function sp-kill-particle
|
||||
(defun sp-kill-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(cond
|
||||
((>= (the-as int arg1) #x70000000)
|
||||
(set! (-> arg1 timer) 0)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((a2-1 (/ (the-as int (- (the-as uint arg1) (the-as uint (the-as uint (-> arg0 cpuinfo-table 0))))) 144)))
|
||||
(when (or (< a2-1 0) (>= a2-1 (+ (-> arg0 length 0) (-> arg0 length 1))))
|
||||
(format 0 "Tried to release particle ~D~%" a2-1)
|
||||
(return #f)
|
||||
)
|
||||
(sp-free-particle arg0 a2-1 arg1 (-> arg1 sprite))
|
||||
)
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
|
||||
;; definition for function sp-orbiter
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(let* ((f2-0 (-> arg1 omega))
|
||||
(f0-0 (-> arg1 radius))
|
||||
(f3-0 (-> arg1 vel-sxvel x))
|
||||
(f30-0 (-> arg1 vel-sxvel y))
|
||||
(f1-0 (-> arg1 vel-sxvel z))
|
||||
(f4-0 (-> *display* clock (-> arg1 clock-index) sparticle-data y))
|
||||
(f26-0 (+ f2-0 (* f3-0 f4-0)))
|
||||
)
|
||||
(set! (-> arg1 omega) f26-0)
|
||||
(let ((f28-0 (+ f0-0 (* f1-0 f4-0))))
|
||||
(set! (-> arg1 radius) f28-0)
|
||||
(let ((f24-0 (sin f26-0))
|
||||
(f26-1 (cos f26-0))
|
||||
(f22-0 (sin (* 0.5 f30-0)))
|
||||
(f0-5 (cos (* 0.5 f30-0)))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set-vector! a1-1 (* f22-0 f26-1) 0.0 (* f22-0 f24-0) f0-5)
|
||||
(quaternion*! (-> arg1 rotvel3d) (the-as quaternion a1-1) (-> arg1 rotvel3d))
|
||||
(quaternion-normalize! (-> arg1 rotvel3d))
|
||||
(set-vector! s4-0 (* f24-0 f28-0) 0.0 (* f26-1 f28-0) 1.0)
|
||||
(quaternion->matrix s3-0 (-> arg1 rotvel3d))
|
||||
(vector-matrix*! s4-0 s4-0 s3-0)
|
||||
)
|
||||
(let ((v1-8 (the-as sprite-vec-data-2d (-> arg1 user-float))))
|
||||
(set! (-> arg2 x) (+ (-> s4-0 x) (-> v1-8 x-y-z-sx x)))
|
||||
(set! (-> arg2 y) (+ (-> s4-0 y) (-> v1-8 x-y-z-sx y)))
|
||||
(set! (-> arg2 z) (+ (-> s4-0 z) (-> v1-8 x-y-z-sx z)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sp-process-block-2d
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function sp-process-block-3d
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function sp-copy-to-spr
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-copy-to-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sp-copy-from-spr
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-copy-from-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function memcpy
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function sp-process-block
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-process-block ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d) (arg3 int))
|
||||
(local-vars (sv-16 int) (sv-32 int) (sv-48 int) (sv-64 int))
|
||||
(let ((s3-0 208)
|
||||
(s2-0 (* 144 arg3))
|
||||
(s5-0 (* 48 arg3))
|
||||
)
|
||||
(set! sv-32 (* 80 arg3))
|
||||
(let ((s1-0 (+ s3-0 s2-0)))
|
||||
(set! sv-16 (+ s1-0 s5-0))
|
||||
(sp-copy-to-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0)
|
||||
(sp-copy-to-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0)
|
||||
(let ((t9-2 sp-copy-to-spr)
|
||||
(a1-7 (-> arg0 adgifdata-table arg1))
|
||||
)
|
||||
(t9-2 sv-16 (the-as pointer a1-7) sv-32)
|
||||
)
|
||||
(set! sv-48 (+ #x70000000 s3-0))
|
||||
(set! sv-64 (+ #x70000000 s1-0))
|
||||
(let ((t1-0 (paused?)))
|
||||
(cond
|
||||
((-> arg0 is-3d)
|
||||
(let ((t9-4 sp-process-block-3d)
|
||||
(a0-6 arg0)
|
||||
(a3-1 arg1)
|
||||
)
|
||||
(t9-4 a0-6 sv-48 sv-64 a3-1 arg3 t1-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sp-process-block-2d arg0 sv-48 sv-64 arg1 arg3 t1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(sp-copy-from-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0)
|
||||
(sp-copy-from-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sp-process-particle-system
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sp-process-particle-system ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d))
|
||||
(countdown (v1-0 13)
|
||||
(let ((a0-4 (-> *display* clock v1-0 sparticle-data quad)))
|
||||
(set! (-> (the-as vector (+ #x70000000 (* v1-0 16))) quad) a0-4)
|
||||
)
|
||||
)
|
||||
(let* ((v1-3 208)
|
||||
(s1-0 (/ (- #x4000 v1-3) 272))
|
||||
(s2-0 0)
|
||||
(s3-0 (sp-get-approx-alloc-size arg0 arg1))
|
||||
)
|
||||
(if (= arg1 1)
|
||||
(set! s2-0 (* (-> arg0 blocks 0) 64))
|
||||
)
|
||||
(set! (-> arg2 num-valid arg1) s3-0)
|
||||
(flush-cache 0)
|
||||
(while (>= s3-0 s1-0)
|
||||
(sp-process-block arg0 s2-0 arg2 s1-0)
|
||||
(set! s3-0 (- s3-0 s1-0))
|
||||
(+! s2-0 s1-0)
|
||||
)
|
||||
(if (> s3-0 0)
|
||||
(sp-process-block arg0 s2-0 arg2 s3-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (perm) for symbol *particles-flag*, type symbol
|
||||
(define-perm *particles-flag* symbol #t)
|
||||
|
||||
;; definition for function forall-particles-with-key-runner
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun forall-particles-with-key-runner ((arg0 sparticle-launch-control)
|
||||
(arg1 (function sparticle-system sparticle-cpuinfo none))
|
||||
(arg2 sparticle-system)
|
||||
)
|
||||
(local-vars (sv-16 int))
|
||||
(let ((s3-0 (the-as object (-> arg2 cpuinfo-table 0)))
|
||||
(s2-0 (&+ (-> arg2 vecdata-table) 0))
|
||||
(s1-0 (+ (-> arg2 blocks 0) (-> arg2 blocks 1)))
|
||||
)
|
||||
(dotimes (s0-0 s1-0)
|
||||
(cond
|
||||
((!= (-> arg2 alloc-table s0-0) -1)
|
||||
(set! sv-16 0)
|
||||
(while (< sv-16 64)
|
||||
(if (and (nonzero? (-> (the-as sparticle-cpuinfo s3-0) valid)) (= (-> (the-as sparticle-cpuinfo s3-0) key) arg0))
|
||||
(arg1 arg2 (the-as sparticle-cpuinfo s3-0))
|
||||
)
|
||||
(set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 1))
|
||||
(&+! s2-0 48)
|
||||
(set! sv-16 (+ sv-16 1))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 64))
|
||||
(&+! s2-0 3072)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function forall-particles-with-key
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun forall-particles-with-key ((arg0 sparticle-launch-control)
|
||||
(arg1 (function sparticle-system sparticle-cpuinfo none))
|
||||
(arg2 symbol)
|
||||
(arg3 symbol)
|
||||
)
|
||||
(if arg2
|
||||
(forall-particles-with-key-runner arg0 arg1 *sp-particle-system-2d*)
|
||||
)
|
||||
(if arg3
|
||||
(forall-particles-with-key-runner arg0 arg1 *sp-particle-system-3d*)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(set! (-> arg1 timer) 0)
|
||||
(set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0))
|
||||
(when (and (-> arg1 binding) (nonzero? (-> arg1 binding)))
|
||||
(logclear! (-> arg1 binding flags) (sp-launch-state-flags launcher-active particles-active))
|
||||
(set! (-> arg1 binding) #f)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level0
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (zero? (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level1
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level2
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)) (sp-cpuinfo-flag level0))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level3
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9 level0)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level4
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level4 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1)) (sp-cpuinfo-flag level1))
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-kill-it-level5
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-kill-it-level5 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (= (logand (-> arg1 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1))
|
||||
(sp-cpuinfo-flag sp-cpuinfo-flag-9 level1)
|
||||
)
|
||||
(sparticle-kill-it arg0 arg1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-60-to-50
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-60-to-50 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let ((gp-0 (-> arg1 rotvel3d))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-angle<-quaternion! s5-0 gp-0)
|
||||
(set! (-> s5-0 w) (* 12516.455 (-> s5-0 w)))
|
||||
(quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-50-to-60
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun sparticle-50-to-60 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let ((gp-0 (-> arg1 rotvel3d))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-angle<-quaternion! s5-0 gp-0)
|
||||
(set! (-> s5-0 w) (* 8691.982 (-> s5-0 w)))
|
||||
(quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function kill-all-particles-with-key
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun kill-all-particles-with-key ((arg0 sparticle-launch-control))
|
||||
(forall-particles-with-key arg0 sparticle-kill-it #t #t)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function forall-particles-runner
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun forall-particles-runner ((arg0 (function sparticle-system sparticle-cpuinfo pointer none)) (arg1 sparticle-system))
|
||||
(let ((s4-0 (the-as object (-> arg1 cpuinfo-table 0)))
|
||||
(s3-0 (&+ (-> arg1 vecdata-table) 0))
|
||||
(s2-0 (+ (-> arg1 blocks 0) (-> arg1 blocks 1)))
|
||||
)
|
||||
(dotimes (s1-0 s2-0)
|
||||
(cond
|
||||
((!= (-> arg1 alloc-table s1-0) -1)
|
||||
(dotimes (s0-0 64)
|
||||
(if (nonzero? (-> (the-as sparticle-cpuinfo s4-0) valid))
|
||||
(arg0 arg1 (the-as sparticle-cpuinfo s4-0) s3-0)
|
||||
)
|
||||
(set! s4-0 (+ (the-as uint s4-0) 144))
|
||||
(&+! s3-0 48)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s4-0 (&+ (the-as pointer s4-0) 9216))
|
||||
(&+! s3-0 3072)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function forall-particles
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun forall-particles ((arg0 function) (arg1 symbol) (arg2 symbol))
|
||||
(if arg1
|
||||
(forall-particles-runner
|
||||
(the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0)
|
||||
*sp-particle-system-2d*
|
||||
)
|
||||
)
|
||||
(if arg2
|
||||
(forall-particles-runner
|
||||
(the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0)
|
||||
*sp-particle-system-3d*
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function kill-all-particles-in-level
|
||||
(defun kill-all-particles-in-level ((arg0 level))
|
||||
(let ((t9-0 forall-particles)
|
||||
(v1-0 (-> arg0 index))
|
||||
)
|
||||
(t9-0
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
sparticle-kill-it-level0
|
||||
)
|
||||
((= v1-0 1)
|
||||
sparticle-kill-it-level1
|
||||
)
|
||||
((= v1-0 2)
|
||||
sparticle-kill-it-level2
|
||||
)
|
||||
((= v1-0 3)
|
||||
sparticle-kill-it-level3
|
||||
)
|
||||
((= v1-0 4)
|
||||
sparticle-kill-it-level4
|
||||
)
|
||||
(else
|
||||
sparticle-kill-it-level5
|
||||
)
|
||||
)
|
||||
#t
|
||||
#t
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for function all-particles-50-to-60
|
||||
(defun all-particles-50-to-60 ()
|
||||
(forall-particles-runner sparticle-50-to-60 *sp-particle-system-3d*)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function all-particles-60-to-50
|
||||
(defun all-particles-60-to-50 ()
|
||||
(forall-particles-runner sparticle-60-to-50 *sp-particle-system-3d*)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function remap-particle
|
||||
;; INFO: Return type mismatch gs-miptbp vs none.
|
||||
(defun remap-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer))
|
||||
(let* ((gp-0 (-> arg1 adgif))
|
||||
(a0-1 (-> gp-0 texture-id))
|
||||
(v1-0 (lookup-texture-by-id-fast a0-1))
|
||||
)
|
||||
(when v1-0
|
||||
(set! (-> gp-0 tex0 tbp0) (-> v1-0 dest 0))
|
||||
(set! (-> gp-0 tex0 cbp) (-> v1-0 clutdest))
|
||||
(set! (-> gp-0 miptbp1 tbp1) (-> v1-0 dest 1))
|
||||
(set! (-> gp-0 miptbp1 tbp2) (-> v1-0 dest 2))
|
||||
(set! (-> gp-0 miptbp1 tbp3) (-> v1-0 dest 3))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function remap-all-particles
|
||||
(defun remap-all-particles ()
|
||||
(forall-particles remap-particle #t #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-particles
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 gp, Count]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
(defun process-particles ()
|
||||
(local-vars (v1-53 int) (gp-0 int))
|
||||
(with-pp
|
||||
(when *particles-flag*
|
||||
0
|
||||
0
|
||||
(.mfc0 gp-0 Count)
|
||||
(set! *sp-launcher-lock* #t)
|
||||
(when *debug-segment*
|
||||
(let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0))
|
||||
(v1-12 'particles)
|
||||
(s4-0 *profile-particles-color*)
|
||||
)
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let ((s3-0 (-> s5-0 data (-> s5-0 count))))
|
||||
(let ((s2-0 (-> s5-0 base-time)))
|
||||
(set! (-> s3-0 name) v1-12)
|
||||
(set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0))))
|
||||
)
|
||||
(set! (-> s3-0 depth) (the-as uint (-> s5-0 depth)))
|
||||
(set! (-> s3-0 color) s4-0)
|
||||
(set! (-> s5-0 segment (-> s5-0 depth)) s3-0)
|
||||
)
|
||||
(+! (-> s5-0 count) 1)
|
||||
(+! (-> s5-0 depth) 1)
|
||||
(set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(logand (the-as int (-> pp clock sparticle-data x)) 255)
|
||||
(cond
|
||||
(*sp-60-hz*
|
||||
(when (= (-> *setting-control* user-current video-mode) 'pal)
|
||||
(set! *sp-60-hz* #f)
|
||||
(all-particles-60-to-50)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (= (-> *setting-control* user-current video-mode) 'ntsc)
|
||||
(set! *sp-60-hz* #t)
|
||||
(all-particles-50-to-60)
|
||||
)
|
||||
)
|
||||
)
|
||||
(clear-sprite-aux-list)
|
||||
(sp-process-particle-system *sp-particle-system-2d* 0 *sprite-array-2d*)
|
||||
(sp-process-particle-system *sp-particle-system-2d* 1 *sprite-array-2d*)
|
||||
(sp-process-particle-system *sp-particle-system-3d* 0 (the-as sprite-array-2d *sprite-array-3d*))
|
||||
(when *debug-segment*
|
||||
(let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
(let* ((v1-47 (+ (-> s5-1 depth) -1))
|
||||
(s4-1 (-> s5-1 segment v1-47))
|
||||
(s3-1 (-> s5-1 base-time))
|
||||
)
|
||||
(when (>= v1-47 0)
|
||||
(set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1))))
|
||||
(+! (-> s5-1 depth) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(set! *sp-launcher-lock* #f)
|
||||
(sp-clear-queue)
|
||||
(.mfc0 v1-53 Count)
|
||||
(- v1-53 gp-0)
|
||||
(when *display-sprite-info*
|
||||
(if (movie?)
|
||||
(format *stdcon* "~%~%~%")
|
||||
)
|
||||
(format
|
||||
*stdcon*
|
||||
"2d: ~4d~100h3d: ~4d~200hwarp/glow: ~3D~350hhud:~3D~%"
|
||||
(-> *sp-particle-system-2d* num-alloc 0)
|
||||
(-> *sp-particle-system-3d* num-alloc 0)
|
||||
(-> *sprite-aux-list* entry)
|
||||
(-> *sp-particle-system-2d* num-alloc 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
+18
-18
@@ -395,12 +395,12 @@
|
||||
;; definition of type level
|
||||
(deftype level (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(load-name basic :offset-assert 8)
|
||||
(nickname basic :offset-assert 12)
|
||||
(load-name string :offset-assert 8)
|
||||
(nickname string :offset-assert 12)
|
||||
(index int32 :offset-assert 16)
|
||||
(status symbol :offset-assert 20)
|
||||
(borrow-level basic 2 :offset-assert 24)
|
||||
(borrow-from-level basic :offset-assert 32)
|
||||
(borrow-level level 2 :offset-assert 24)
|
||||
(borrow-from-level level :offset-assert 32)
|
||||
(heap kheap :inline :offset-assert 48)
|
||||
(borrow-heap kheap 2 :inline :offset-assert 64)
|
||||
(bsp bsp-header :offset-assert 96)
|
||||
@@ -446,24 +446,24 @@
|
||||
(texture-dirty-masks texture-mask 10 :inline :offset-assert 4576)
|
||||
(texture-mask texture-mask 18 :inline :offset-assert 4736)
|
||||
(sky-mask texture-mask :inline :offset-assert 5024)
|
||||
(tfrag-masks basic :offset-assert 5040)
|
||||
(tfrag-masks texture-masks-array :offset-assert 5040)
|
||||
(tfrag-dists pointer :offset-assert 5044)
|
||||
(shrub-masks basic :offset-assert 5048)
|
||||
(shrub-masks texture-masks-array :offset-assert 5048)
|
||||
(shrub-dists pointer :offset-assert 5052)
|
||||
(alpha-masks basic :offset-assert 5056)
|
||||
(alpha-masks texture-masks-array :offset-assert 5056)
|
||||
(alpha-dists pointer :offset-assert 5060)
|
||||
(water-masks basic :offset-assert 5064)
|
||||
(water-masks texture-masks-array :offset-assert 5064)
|
||||
(water-dists pointer :offset-assert 5068)
|
||||
(tfrag-last-calls int32 6 :offset-assert 5072)
|
||||
(texture-anim-array texture-anim-array 10 :offset-assert 5096)
|
||||
(light-hash basic :offset-assert 5136)
|
||||
(light-hash light-hash :offset-assert 5136)
|
||||
(draw-priority float :offset-assert 5140)
|
||||
(draw-index int32 :offset-assert 5144)
|
||||
(part-engine basic :offset-assert 5148)
|
||||
(part-engine engine :offset-assert 5148)
|
||||
(user-object basic 4 :offset-assert 5152)
|
||||
(loaded-text-info-count int32 :offset-assert 5168)
|
||||
(loaded-text-info game-text-info 8 :offset-assert 5172)
|
||||
(level-type basic :offset-assert 5204)
|
||||
(level-type type :offset-assert 5204)
|
||||
(load-order int64 :offset-assert 5208)
|
||||
(pad int8 12 :offset-assert 5216)
|
||||
)
|
||||
@@ -776,7 +776,7 @@
|
||||
:level0 (new 'static 'level
|
||||
:name #f
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -787,7 +787,7 @@
|
||||
:name #f
|
||||
:index 1
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -798,7 +798,7 @@
|
||||
:name #f
|
||||
:index 2
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -809,7 +809,7 @@
|
||||
:name #f
|
||||
:index 3
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -820,7 +820,7 @@
|
||||
:name #f
|
||||
:index 4
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -831,7 +831,7 @@
|
||||
:name #f
|
||||
:index 5
|
||||
:status 'inactive
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:inside-boxes #f
|
||||
:force-inside? #f
|
||||
@@ -842,7 +842,7 @@
|
||||
:name 'default
|
||||
:index 6
|
||||
:status 'reserved
|
||||
:borrow-level (new 'static 'array basic 2 #f #f)
|
||||
:borrow-level (new 'static 'array level 2 #f #f)
|
||||
:borrow-from-level #f
|
||||
:bsp #f
|
||||
:inside-boxes #f
|
||||
|
||||
@@ -92,6 +92,20 @@
|
||||
"cam-los-collide", // vector-dot with stack
|
||||
// cam-update
|
||||
"update-visible", // assertion crash when filling out bsp-header
|
||||
// sparticle-launcher
|
||||
// - field loaded as signed and unsigned
|
||||
"sp-relaunch-particle-3d",
|
||||
// - annoying arbitrary data usage functions
|
||||
"execute-part-engine",
|
||||
"sparticle-respawn-heights",
|
||||
"sparticle-respawn-timer",
|
||||
"sparticle-mode-animate",
|
||||
"sparticle-mode-animate",
|
||||
"sparticle-texture-animate",
|
||||
"sparticle-texture-day-night",
|
||||
"sparticle-motion-blur", // clipping
|
||||
"birth-func-texture-group",
|
||||
"(method 10 sparticle-launcher)", // very strange handling of ambiguous type
|
||||
// placeholder
|
||||
|
||||
// gun-util
|
||||
|
||||
Reference in New Issue
Block a user