Decompile font, decomp, background, shrubbery (#3428)

This commit is contained in:
water111
2024-03-16 20:25:30 -04:00
committed by GitHub
parent 13def9a8b2
commit f7bfc8cab1
51 changed files with 13075 additions and 399 deletions
+173 -161
View File
@@ -29,6 +29,7 @@
(define-extern global kheap)
(define-extern kheap type)
(define-extern pointer type)
(define-extern string type)
(define-extern #t symbol)
(define-extern #f symbol)
@@ -3658,110 +3659,110 @@
(gmerc2-l9-tfrag 129)
(tex-l0-shrub 130)
(bucket131 131)
(bucket132 132)
(bucket133 133)
(bucket134 134)
(bucket135 135)
(shrub-l0-shrub 131)
(shrub-near-l0-shrub 132)
(billboard-l0-shrub 133)
(shrub-vanish-l0-shrub 134)
(shrub-near-trans-l0-shrub 135)
(merc-l0-shrub 136)
(emerc-l0-shrub 137)
(gmerc-l0-shrub 138)
(gmerc2-l0-shrub 139)
(tex-l1-shrub 140)
(bucket141 141)
(bucket142 142)
(bucket143 143)
(bucket144 144)
(bucket145 145)
(shrub-l1-shrub 141)
(shrub-near-l1-shrub 142)
(billboard-l1-shrub 143)
(shrub-vanish-l1-shrub 144)
(shrub-near-trans-l1-shrub 145)
(merc-l1-shrub 146)
(emerc-l1-shrub 147)
(gmerc-l1-shrub 148)
(gmerc2-l1-shrub 149)
(tex-l2-shrub 150)
(bucket151 151)
(bucket152 152)
(bucket153 153)
(bucket154 154)
(bucket155 155)
(shrub-l2-shrub 151)
(shrub-near-l2-shrub 152)
(billboard-l2-shrub 153)
(shrub-vanish-l2-shrub 154)
(shrub-near-trans-l2-shrub 155)
(merc-l2-shrub 156)
(emerc-l2-shrub 157)
(gmerc-l2-shrub 158)
(gmerc2-l2-shrub 159)
(tex-l3-shrub 160)
(bucket161 161)
(bucket162 162)
(bucket163 163)
(bucket164 164)
(bucket165 165)
(shrub-l3-shrub 161)
(shrub-near-l3-shrub 162)
(billboard-l3-shrub 163)
(shrub-vanish-l3-shrub 164)
(shrub-near-trans-l3-shrub 165)
(merc-l3-shrub 166)
(emerc-l3-shrub 167)
(gmerc-l3-shrub 168)
(gmerc2-l3-shrub 169)
(tex-l4-shrub 170)
(bucket171 171)
(bucket172 172)
(bucket173 173)
(bucket174 174)
(bucket175 175)
(shrub-l4-shrub 171)
(shrub-near-l4-shrub 172)
(billboard-l4-shrub 173)
(shrub-vanish-l4-shrub 174)
(shrub-near-trans-l4-shrub 175)
(merc-l4-shrub 176)
(emerc-l4-shrub 177)
(gmerc-l4-shrub 178)
(gmerc2-l4-shrub 179)
(tex-l5-shrub 180)
(bucket181 181)
(bucket182 182)
(bucket183 183)
(bucket184 184)
(bucket185 185)
(shrub-l5-shrub 181)
(shrub-near-l5-shrub 182)
(billboard-l5-shrub 183)
(shrub-vanish-l5-shrub 184)
(shrub-near-trans-l5-shrub 185)
(merc-l5-shrub 186)
(emerc-l5-shrub 187)
(gmerc-l5-shrub 188)
(gmerc2-l5-shrub 189)
(tex-l6-shrub 190)
(bucket191 191)
(bucket192 192)
(bucket193 193)
(bucket194 194)
(bucket195 195)
(shrub-l6-shrub 191)
(shrub-near-l6-shrub 192)
(billboard-l6-shrub 193)
(shrub-vanish-l6-shrub 194)
(shrub-near-trans-l6-shrub 195)
(merc-l6-shrub 196)
(emerc-l6-shrub 197)
(gmerc-l6-shrub 198)
(gmerc2-l6-shrub 199)
(tex-l7-shrub 200)
(bucket201 201)
(bucket202 202)
(bucket203 203)
(bucket204 204)
(bucket205 205)
(shrub-l7-shrub 201)
(shrub-near-l7-shrub 202)
(billboard-l7-shrub 203)
(shrub-vanish-l7-shrub 204)
(shrub-near-trans-l7-shrub 205)
(merc-l7-shrub 206)
(emerc-l7-shrub 207)
(gmerc-l7-shrub 208)
(gmerc2-l7-shrub 209)
(tex-l8-shrub 210)
(bucket211 211)
(bucket212 212)
(bucket213 213)
(bucket214 214)
(bucket215 215)
(shrub-l8-shrub 211)
(shrub-near-l8-shrub 212)
(billboard-l8-shrub 213)
(shrub-vanish-l8-shrub 214)
(shrub-near-trans-l8-shrub 215)
(merc-l8-shrub 216)
(emerc-l8-shrub 217)
(gmerc-l8-shrub 218)
(gmerc2-l8-shrub 219)
(tex-l9-shrub 220)
(bucket221 221)
(bucket222 222)
(bucket223 223)
(bucket224 224)
(bucket225 225)
(shrub-l9-shrub 221)
(shrub-near-l9-shrub 222)
(billboard-l9-shrub 223)
(shrub-vanish-l9-shrub 224)
(shrub-near-trans-l9-shrub 225)
(merc-l9-shrub 226)
(emerc-l9-shrub 227)
(gmerc-l9-shrub 228)
@@ -4208,45 +4209,45 @@
;; ---vu1-user-h:texture-enable-mask-u32
;; +++vu1-user-h:vu1-renderer-mask
;; TODO stolen from Jak 2
;; TODO stolen from Jak 2 (and it was all wrong...)
(defenum vu1-renderer-mask
:type uint64
:bitfield #t
(rn0)
(rn1)
(rn2)
(sky)
(ocean)
(ocean-wave)
(tfrag)
(tie)
(tie-envmap)
(tie-scissor)
(tie-envmap-scissor)
(tie-vanish)
(rn3)
(rn4)
(rn5)
(rn6)
(rn7)
(rn8)
(rn9)
(rn10)
(rn11)
(rn12)
(rn13)
(generic) ;; right
(merc) ;; right
(emerc) ;; right
(shrubbery)
(shrub-near)
(generic)
(merc)
(emerc)
(billboard)
(shrubbery-vanish)
(tfrag-trans)
(tie-scissor-trans)
(tie-trans)
(tie-envmap-trans)
(tie-envmap-scissor-trans)
(tfrag-water)
(tie-scissor-water)
(tie-water)
(tie-envmap-water)
(tie-envmap-scissor-water)
(sprite)
(shadow)
(shrub-vanish)
(rn21)
(rn22)
(rn23)
(rn24)
(rn25)
(rn26)
(rn27)
(rn28)
(rn29)
(rn30)
(rn31)
(rn32)
(rn33)
(depth-cue)
(rn34)
(rn35)
(rn36)
(rn37)
@@ -7479,7 +7480,7 @@
(lf7 7)
(lf8 8)
(lf9 9)
(lf10 10)
(use-camera-other 10)
(lf11 11)
(lf12 12)
(lf13 13)
@@ -7702,7 +7703,7 @@
(level-method-13 () none) ;; 13 ;; (bsp-name (_type_) symbol)
(compute-memory-usage! (_type_ symbol) memory-usage-block) ;; 14
(level-method-15 () none) ;; 15 ;; (inside-boxes-check (_type_ vector) symbol)
(update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) ;; 16
(update-vis! "Load/decompress precomputed visibility." (_type_ level-vis-info uint (pointer uint8)) symbol) ;; 16
(level-method-17 () none) ;; 17 ;; (load-continue (_type_) _type_)
(level-method-18 () none) ;; 18 ;; (load-begin (_type_) _type_)
(level-method-19 () none) ;; 19 ;; (login-begin (_type_) _type_)
@@ -8098,6 +8099,7 @@
(projection float :offset-assert 56)
(scale float :offset-assert 60)
(color font-color :offset-assert 64) ;; guessed by decompiler
(color-signed int32 :overlay-at color)
(flags font-flags :offset-assert 68) ;; guessed by decompiler
(mat matrix :offset-assert 72)
(start-line uint32 :offset-assert 76)
@@ -8177,7 +8179,7 @@
:size-assert #xbec
:flag-assert #xa00000bec
(:methods
(set-context! (_type_ object) none) ;; 9
(set-context! (_type_ font-context) none) ;; 9
)
)
@@ -10784,6 +10786,18 @@
:bitfield #f
:type uint32
(drawable-group 0)
(shrubbery 27)
(shrubbery-object 28)
(shrubbery-vertex 29)
(shrubbery-color 30)
(shrubbery-stq 31)
(shrubbery-pal 32)
(billboard 33)
(instance-shrubbery 34)
(entity 44)
(camera 45)
@@ -10792,6 +10806,8 @@
(bsp-node 61)
(bsp-leaf-vis-self 62)
(draw-node 64)
(pat 65)
@@ -14169,8 +14185,8 @@
)
(deftype generic-gif-tag (structure)
((data uint32 4 :offset-assert 0) ;; guessed by decompiler
(qword qword :inline :offset 0)
((data uint32 4 :offset-assert 0 :score -1) ;; guessed by decompiler
(qword qword :inline :offset 0 :score -1)
(fan-prim gif-tag-prim :offset 0) ;; guessed by decompiler
(str-prim gif-tag-prim :offset 4) ;; guessed by decompiler
(regs gif-tag-regs-32 :offset 8) ;; guessed by decompiler
@@ -17154,7 +17170,8 @@
(deftype prototype-bucket-shrub (prototype-bucket)
((next uint32 4 :offset-assert 64) ;; guessed by decompiler
(count uint16 4 :offset-assert 80) ;; guessed by decompiler
(mod-count uint16 4 :offset-assert 88) ;; guessed by decompiler
(count-quad uint128 :offset 80)
(mod-count uint16 4 :offset 88) ;; guessed by decompiler
(last dma-packet 4 :offset-assert 96) ;; guessed by decompiler
(next-clear uint128 :offset 64)
(count-clear uint64 :offset 80)
@@ -22995,7 +23012,7 @@
(nav)
(nav-dma-all)
(nav-dma-read)
(nav-dma-write)
(nav-dma-write) ;; 10
(nav-dma-work)
(nav-part1)
(nav-part2)
@@ -23005,7 +23022,7 @@
(nav-part6)
(nav-part7)
(nav-part8)
(nav-part9)
(nav-part9) ;; 20
(nav-part10)
(add-to-translation)
(update-current-poly)
@@ -23015,7 +23032,7 @@
(travel-around-spheres)
(avoid-spheres)
(check-vector-collision-with-nav-spheres)
(find-nearest-poly)
(find-nearest-poly) ;; 30
(find-containing-poly)
(generate-velocity)
(apply-rotation)
@@ -23025,7 +23042,7 @@
(misc)
(mercneric)
(tie-generic)
(background)
(background) ;; 40
(drawable)
(tfrag)
(tfrag-scissor)
@@ -23078,8 +23095,9 @@
"The bsp-header is really an entire level.
This probably started as a very simple structure, but now it is extremely complicated."
((info file-info :offset 4)
(all-visible-list (pointer uint16) :offset 32) ;; guessed by decompiler
(all-visible-list (pointer uint8) :offset 32) ;; guessed by decompiler
(visible-list-length int16 :offset 36)
(extra-vis-list-length int16 :offset-assert 38)
(drawable-trees drawable-tree-array :offset 40) ;; guessed by decompiler
(pat pointer :offset 44) ;; guessed by decompiler
(pat-length int32 :offset 48)
@@ -23115,9 +23133,9 @@
; (region-array region-array :offset-assert 192)
(collide-hash collide-hash :offset 196)
; ;; 200 is some array
; (wind-array uint32 :offset 200)
(wind-array uint32 :offset 200)
; ;; 204 is maybe that array's length
; (wind-array-length int32 :offset 204)
(wind-array-length int32 :offset 204)
; (city-level-info city-level-info :offset 208)
(vis-spheres vector-array :offset 216)
(vis-spheres-length uint32 :offset 248)
@@ -23142,7 +23160,7 @@
(bsp-scale vector :inline :offset 288)
(bsp-offset vector :inline :offset-assert 304)
(unk-drawable drawable :offset 320)
(hfrag-drawable drawable :offset 320)
(end uint8 :offset #x18f)
@@ -23547,7 +23565,7 @@
(vertex-tmpl dma-packet :inline :offset-assert 64)
(mscal-tmpl dma-packet :inline :offset-assert 80)
(init-tmpl dma-packet :inline :offset-assert 96)
(init-data qword 8 :offset-assert 112) ;; guessed by decompiler
(init-data qword 2 :inline :offset-assert 112) ;; guessed by decompiler
)
:method-count-assert 9
:size-assert #x90
@@ -29005,7 +29023,7 @@
(define-extern update-wind "Update the wind force for this frame.
This value will be used by level-update-wind to update tie/shrub wind values." (function wind-work (array uint8) none))
(define-extern wind-get-hashed-index "Unused function, likely a leftover from Jak 1's different wind system." (function vector wind-work int))
;; (define-extern level-update-wind function) ;; (function wind-work none)
(define-extern level-update-wind (function wind-work none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bsp ;;
@@ -29845,14 +29863,14 @@
;; generic-effect ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *target-lock* object) ;; object
;; (define-extern *generic-consts* object) ;; generic-consts
;; (define-extern generic-work-init function) ;; (function generic-bucket-state none)
;; (define-extern generic-upload-vu0 function) ;; (function none)
;; (define-extern upload-vu0-program function) ;; (function vu-function pointer none)
;; (define-extern generic-initialize-without-sync function) ;; (function matrix vu-lights none)
;; (define-extern generic-initialize function) ;; (function generic-bucket-state matrix vu-lights none)
;; (define-extern generic-wrapup function) ;; (function generic-bucket-state none)
(define-extern *target-lock* object)
(define-extern *generic-consts* generic-consts)
(define-extern generic-work-init "Initialize the scratchpad work for generic." (function generic-bucket-state none))
(define-extern generic-upload-vu0 "Upload generic VU0 program." (function none))
(define-extern upload-vu0-program "Upload vu-function to VU0." (function vu-function pointer none))
(define-extern generic-initialize-without-sync "Init generic, version for generic-merc, which relies on generic-merc init running after." (function matrix vu-lights none))
(define-extern generic-initialize "Normal init for generic - sets up scratchpad and VU0." (function generic-bucket-state matrix vu-lights none))
(define-extern generic-wrapup (function generic-bucket-state none))
;; (define-extern generic-dma-from-spr function)
;; (define-extern generic-light-proc function)
;; (define-extern generic-envmap-proc function)
@@ -29870,9 +29888,9 @@
;; (define-extern generic-copy-vtx-dclr-dtex function)
;; (define-extern generic-none function)
;; (define-extern generic-none-dma-wait function)
;; (define-extern *warp-data* object) ;; object
;; (define-extern generic-warp-source-proc function) ;; (function none)
;; (define-extern generic-warp-source function) ;; (function gsf-buffer none)
(define-extern *warp-data* object) ;; object
(define-extern generic-warp-source-proc (function none))
(define-extern generic-warp-source (function gsf-buffer none))
;; (define-extern generic-warp-dest-proc function)
;; (define-extern generic-warp-dest function)
;; (define-extern generic-warp-envmap-dest function)
@@ -30057,10 +30075,10 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern fx-copy-buf (function dma-buffer none))
;; (define-extern *warp-shader* object) ;; adgif-shader
;; (define-extern create-blanket function) ;; (function symbol)
;; (define-extern *warp* object) ;; symbol
;; (define-extern warp-test function) ;; (function object object int none)
(define-extern *warp-shader* adgif-shader)
(define-extern create-blanket (function symbol))
(define-extern *warp* symbol)
(define-extern warp-test (function object object int none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; texture-anim ;;
@@ -30145,8 +30163,8 @@
;; font-data ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *font12-table* object) ;; (inline-array vector)
;; (define-extern *font24-table* object) ;; (inline-array vector)
(define-extern *font12-table* (inline-array vector))
(define-extern *font24-table* (inline-array vector))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; font ;;
@@ -30157,17 +30175,16 @@
(b float :offset 32))
)
;; (define-extern draw-string-asm function) ;; (function string dma-buffer font-context draw-string-result)
(define-extern draw-string-asm (function string dma-buffer font-context draw-string-result))
(define-extern draw-string (function string dma-buffer font-context draw-string-result))
;; (define-extern get-string-length function) ;; (function string font-context draw-string-result)
(define-extern get-string-length (function string font-context draw-string-result))
(define-extern draw-string-xy (function string dma-buffer int int font-color font-flags draw-string-result))
;; (define-extern draw-string-adv function) ;; (function string dma-buffer font-context none)
(define-extern draw-string-adv (function string dma-buffer font-context none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; decomp ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype huf-dictionary-node (structure)
((zero uint16 :offset-assert 0)
(one uint16 :offset-assert 2)
@@ -30176,27 +30193,26 @@
:size-assert #x4
:flag-assert #x900000004
)
|#
;; (define-extern unpack-comp-rle function) ;; (function (pointer int8) (pointer int8) (pointer int8))
;; (define-extern unpack-comp-huf function) ;; (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none)
(define-extern unpack-comp-lzo (function (pointer uint8) (pointer uint8) none))
;; (define-extern pack-comp-rle function) ;; (function (pointer uint8) (pointer uint8) int int (pointer uint8))
(define-extern unpack-comp-rle "Decompress data compressed with run-length encoding." (function (pointer int8) (pointer int8) (pointer int8)))
(define-extern unpack-comp-huf "Decompress data compressed with huffman encoding." (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none))
(define-extern unpack-comp-lzo "Decompress data compressed with LZO encoding." (function (pointer uint8) (pointer uint8) none))
(define-extern pack-comp-rle "Compress data, used for map mask stuff." (function (pointer uint8) (pointer uint8) int int (pointer uint8)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; background ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *background-work* object) ;; background-work
;; (define-extern background-vu0-block object) ;; vu-function
;; (define-extern background-upload-vu0 function) ;; (function none)
;; (define-extern init-background function) ;; (function none)
;; (define-extern upload-vis-bits function) ;; (function level level bsp-header none)
;; (define-extern set-background-regs! function) ;; (function level none)
;; (define-extern set-tie-quard-planes! function) ;; (function level none)
;; (define-extern set-shrub-quard-planes! function) ;; (function level none)
;; (define-extern set-subdivide-settings! function)
;; (define-extern finish-background function) ;; (function none)
(define-extern *background-work* background-work)
(define-extern background-vu0-block vu-function)
(define-extern background-upload-vu0 "Upload VU0 functions for background. (believed unused?)" (function none))
(define-extern init-background "Reset lists of trees to draw for background rendering." (function none))
(define-extern upload-vis-bits "Upload vis data to the scratchpad." (function level level bsp-header none))
(define-extern set-background-regs! (function level none))
(define-extern set-tie-quard-planes! "Set up TIE work guard planes." (function level none))
(define-extern set-shrub-quard-planes! "Set shrub work guard planes." (function level none))
(define-extern set-subdivide-settings! "Set subdivide settings from the level." (function level none))
(define-extern finish-background "Run all renderers for background data added." (function none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; draw-node ;;
@@ -30220,17 +30236,14 @@
;; shrubbery ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype dma-test (structure)
((data qword 101 :offset-assert 0) ;; guessed by decompiler
((data qword 101 :inline :offset-assert 0) ;; guessed by decompiler
)
:method-count-assert 9
:size-assert #x650
:flag-assert #x900000650
)
|#
#|
(deftype dma-test-work (structure)
((upload dma-packet :inline :offset-assert 0)
(end dma-packet :inline :offset-assert 16)
@@ -30239,7 +30252,6 @@
:size-assert #x20
:flag-assert #x900000020
)
|#
#|
(deftype prototype-shrubbery (drawable-inline-array)
@@ -30253,25 +30265,25 @@
)
|#
;; (define-extern mem-usage-shrub-walk function) ;; (function draw-node int memory-usage-block int draw-node)
;; (define-extern highres-shrub-login function)
;; (define-extern shrub-vu1-block object) ;; vu-function
;; (define-extern shrub-num-tris function) ;; (function shrubbery uint)
(define-extern shrub-make-perspective-matrix (function matrix matrix matrix))
;; (define-extern shrub-init-view-data function) ;; (function shrub-view-data symbol)
;; (define-extern shrub-upload-view-data function) ;; (function dma-buffer symbol)
;; (define-extern shrub-time function) ;; (function int int int int int int)
;; (define-extern shrub-do-init-frame function) ;; (function dma-buffer symbol)
;; (define-extern shrub-init-frame function) ;; (function dma-buffer gs-test symbol)
;; (define-extern shrub-upload-model function) ;; (function shrubbery dma-buffer int symbol)
;; (define-extern draw-inline-array-instance-shrub function) ;; (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none)
;; (define-extern draw-prototype-inline-array-shrub function) ;; (function int (inline-array prototype-bucket-shrub) pointer)
;; (define-extern draw-drawable-tree-instance-shrub function) ;; (function drawable-tree-instance-shrub level none)
;; (define-extern *dma-test* object) ;; dma-test
;; (define-extern *dma-test-work* object) ;; dma-test-work
;; (define-extern init-dma-test function) ;; (function none)
;; (define-extern dma-test-func function) ;; (function none)
;; (define-extern move-test-func function) ;; (function none)
(define-extern mem-usage-shrub-walk "Walk the shrub tree and compute memory usagbe for draw nodes and shrub instances." (function draw-node int memory-usage-block int draw-node))
(define-extern highres-shrub-login "Set draw-node's distance to max, to force to always draw." (function draw-node none))
(define-extern shrub-vu1-block vu-function)
(define-extern shrub-num-tris "Get the number of triangles in this shrubbery." (function shrubbery uint))
(define-extern shrub-make-perspective-matrix "Create shrub drawing matrix." (function matrix matrix matrix))
(define-extern shrub-init-view-data "Initialize shrub drawing constants." (function shrub-view-data symbol))
(define-extern shrub-upload-view-data "Create DMA to set shrub vu1 constants." (function dma-buffer symbol))
(define-extern shrub-time "Unknown. Maybe rough cycle count for a shrub fragment?" (function int int int int int int))
(define-extern shrub-do-init-frame "Set up DMA to set up VU1 for shrub rendering." (function dma-buffer symbol))
(define-extern shrub-init-frame "Set up DMA to set up VU1 and GS for shrub rendering." (function dma-buffer gs-test symbol))
(define-extern shrub-upload-model "Set up DMA to upload a single shrub model." (function shrubbery dma-buffer int symbol))
(define-extern draw-inline-array-instance-shrub (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none))
(define-extern draw-prototype-inline-array-shrub (function int (inline-array prototype-bucket-shrub) pointer))
(define-extern draw-drawable-tree-instance-shrub "Draw a shrub tree!" (function drawable-tree-instance-shrub level none))
(define-extern *dma-test* dma-test)
(define-extern *dma-test-work* dma-test-work)
(define-extern init-dma-test (function none))
(define-extern dma-test-func (function none))
(define-extern move-test-func (function none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; shrub-work ;;
@@ -30339,9 +30351,9 @@
|#
;; (define-extern edge-debug-lines function) ;; (function (array vector-array) none)
;; (define-extern draw-drawable-tree-tfrag function) ;; (function drawable-tree-tfrag none)
;; (define-extern draw-drawable-tree-tfrag-trans function) ;; (function drawable-tree-tfrag none)
;; (define-extern draw-drawable-tree-tfrag-water function) ;; (function drawable-tree-tfrag none)
(define-extern draw-drawable-tree-tfrag (function drawable-tree-tfrag none))
(define-extern draw-drawable-tree-tfrag-trans (function drawable-tree-tfrag none))
(define-extern draw-drawable-tree-tfrag-water (function drawable-tree-tfrag none))
;; (define-extern tfrag-vu1-init-buf function) ;; (function bucket-id gs-test int uint symbol none)
;; (define-extern tfrag-scissor-vu1-init-buf function) ;; (function bucket-id gs-test int uint symbol none)
;; (define-extern *tfrag-init-table* object) ;; (inline-array tfrag-init-data)
@@ -30568,7 +30580,7 @@
;; (define-extern tie-near-init-consts function)
;; (define-extern tie-near-init-engine function) ;; (function dma-buffer gs-test int none)
;; (define-extern tie-near-end-buffer function) ;; (function dma-buffer none)
;; (define-extern tie-scissor-make-perspective-matrix function) ;; (function matrix matrix none)
(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none))
;; (define-extern tie-near-int-reg function)
;; (define-extern tie-near-float-reg function)
@@ -30628,7 +30640,7 @@
;; (define-extern draw-inline-array-instance-tie function) ;; (function pointer (inline-array instance-tie) int dma-buffer none)
;; (define-extern draw-inline-array-prototype-tie-asm function) ;; (function dma-buffer int prototype-array-tie none)
;; (define-extern instance-tie-patch-buckets function) ;; (function dma-buffer level object)
;; (define-extern draw-drawable-tree-instance-tie function) ;; (function drawable-tree-instance-tie level none)
(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none))
;; (define-extern tie-init-scissor-buf function) ;; (function bucket-id gs-alpha gs-test gs-test none)
;; (define-extern tie-init-buf function) ;; (function bucket-id gs-alpha gs-test gs-test none)
;; (define-extern tie-init-envmap-buf function) ;; (function bucket-id gs-alpha gs-test none)
@@ -31654,8 +31666,8 @@
;; (define-extern init-time-of-day function) ;; (function object :behavior time-of-day-proc)
;; (define-extern start-time-of-day function) ;; (function (pointer process))
;; (define-extern time-of-day-setup function) ;; (function symbol symbol)
;; (define-extern time-of-day-interp-colors function) ;; (function (pointer rgba) uint mood-context none)
;; (define-extern time-of-day-interp-colors-scratch function) ;; (function (pointer rgba) time-of-day-palette mood-context none)
(define-extern time-of-day-interp-colors (function (pointer rgba) uint mood-context none))
(define-extern time-of-day-interp-colors-scratch (function (pointer rgba) time-of-day-palette mood-context none))
;; (define-extern init-time-of-day-context function) ;; (function time-of-day-context symbol)
;; (define-extern set-filter-color! function) ;; (function float float float none)
;; (define-extern tod-madd! function) ;; (function vector vector vector float)
@@ -39942,7 +39954,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *generic-envmap-texture* object) ;; texture
;; (define-extern *default-envmap-shader* object) ;; adgif-shader
(define-extern *default-envmap-shader* adgif-shader)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; texture-finish ;;
+42 -3
View File
@@ -277,7 +277,45 @@
"add-debug-box-with-transform": [0, 3],
"add-debug-line-sphere": [0],
"bones-mtx-calc-execute": [19, 7],
"foreground-draw": [0, 1, 126]
"foreground-draw": [0, 1, 126],
"unpack-comp-rle": [1, 3, 5, 6],
"unpack-comp-huf": [2, 4, 5, 6, 7, 8, 9],
"unpack-comp-lzo": [
0,
1,
4,
5,
6,
7,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35, // branch fwd 39
39, // branch fwd no delay
43, // goto 18
45 // goto 6
],
"(method 16 level)": [0, 1, 5, 13, 14, 15],
"upload-vis-bits": [2, 6, 3, 0],
"set-background-regs!": [4, 3],
"draw-drawable-tree-instance-shrub": [5, 7, 9, 11]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -294,7 +332,7 @@
"moving-sphere-triangle-intersect",
"calc-animation-from-spr",
"draw-string-asm",
"draw-string",
// "draw-string",
"get-string-length",
"adgif-shader<-texture-with-update!",
"init-boundary-regs",
@@ -414,7 +452,8 @@
"generic-warp-envmap-dest",
"generic-no-light-proc",
"(method 21 cloth-system)",
"debug-line-clip?"
"debug-line-clip?",
"(method 9 font-work)"
],
"mips2c_jump_table_functions": {},
@@ -318,5 +318,17 @@
"foreground": [
["L215", "(pointer bucket-id-16)", 462],
["L214", "vector"]
],
"font-data": [
["L1", "(inline-array vector)", 250],
["L2", "(inline-array vector)", 250]
],
"shrubbery": [
["L155", "(pointer bucket-id)", 12],
["L152", "(pointer bucket-id)", 12],
["L151", "(pointer bucket-id)", 12],
["L150", "(pointer bucket-id)", 12],
["L153", "(pointer bucket-id)", 12]
]
}
+111 -1
View File
@@ -2495,5 +2495,115 @@
[[340, 364], "v1", "(pointer uint8)"],
[364, "v1", "(pointer uint8)"],
[[365, 372], "v1", "(pointer uint8)"]
]
],
"generic-work-init": [
[4, "a0", "generic-work"],
[[9, 19], "a0", "generic-work"],
[23, "a1", "generic-work"]
],
"generic-initialize-without-sync": [
[8, "a0", "generic-work"],
[21, "a0", "generic-work"]
],
"generic-initialize": [
[8, "a0", "generic-work"],
[21, "a0", "generic-work"]
],
"generic-wrapup": [
[1, "v1", "generic-work"],
[4, "v1", "generic-work"]
],
"generic-warp-source": [[2, "at", "generic-work"]],
"(method 9 font-work)": [
[16, "t0", "(pointer uint32)"],
[47, "a2", "(pointer uint32)"],
[49, "a2", "(pointer uint32)"],
[51, "a2", "(pointer uint32)"],
[53, "a2", "(pointer uint32)"]
],
"unpack-comp-rle": [[[10, 26], "a0", "(pointer int8)"]],
"unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]],
"(method 16 level)": [
[222, "v1", "(pointer uint128)"],
[223, "a1", "(pointer uint128)"],
[225, "a0", "(pointer uint128)"],
[[71, 168], "s1", "(pointer int8)"],
[72, "v1", "(pointer int8)"],
[[74, 169], "s0", "(pointer int8)"],
[[170, 193], "s1", "(pointer uint8)"],
[[171, 193], "s2", "(pointer uint8)"],
[227, "v1", "(pointer uint8)"]
],
"upload-vis-bits": [
[14, "a1", "(pointer uint128)"],
[[8, 35], "a2", "(pointer uint128)"]
],
"finish-background": [
[900, "t4", "(pointer int32)"],
[963, "t4", "(pointer int32)"],
[1026, "t4", "(pointer int32)"],
[1089, "t3", "(pointer int32)"]
],
"(method 16 drawable-inline-array-node)": [[[1, 7], "v1", "draw-node"]],
"(method 9 shrubbery)": [
[23, "a2", "(pointer int32)"],
[28, "a3", "(pointer int32)"]
],
"shrub-upload-view-data": [[[3, 17], "a0", "dma-packet"]],
"shrub-do-init-frame": [
[[12, 21], "a0", "dma-packet"],
[[26, 29], "a0", "dma-packet"],
[33, "v1", "(pointer vif-tag)"],
[[35, 41], "v1", "(pointer uint32)"],
[42, "v1", "(pointer vif-tag)"],
[[44, 51], "v1", "(pointer uint32)"],
[52, "v1", "(pointer vif-tag)"],
[54, "v1", "(pointer uint32)"]
],
"shrub-init-frame": [
[[8, 12], "a0", "dma-packet"],
[[18, 21], "a0", "gs-gif-tag"],
[24, "v1", "(pointer gs-test)"],
[26, "v1", "(pointer gs-reg64)"]
],
"shrub-upload-model": [
[[17, 26], "a3", "dma-packet"],
[[33, 41], "a0", "dma-packet"],
[[47, 55], "a0", "dma-packet"]
],
"draw-prototype-inline-array-shrub": [
[387, "a0", "prototype-shrubbery"],
[481, "v1", "prototype-shrubbery"],
[[637, 646], "a1", "prototype-bucket-shrub"],
[[301, 392], "s1", "prototype-bucket-shrub"],
[[470, 515], "s1", "prototype-bucket-shrub"],
[[470, 658], "gp", "prototype-bucket-shrub"],
[[13, 56], "v1", "prototype-bucket-shrub"]
// [[102, 114], "a0", "shrub-near-packet"],
// [[114, 117], "v1", "vector4w-3"],
// [118, "a1", "vector4w"],
// [123, "v1", "dma-packet"],
// [[124, 126], "v1", "vector4w"],
// [[334, 364], "s1", "prototype-bucket-shrub"],
// [416, "a0", "drawable-group"],
// [420, "s1", "prototype-bucket-shrub"],
// [525, "v1", "drawable-group"],
// [[518, 535], "s1", "prototype-bucket-shrub"],
// [558, "s1", "prototype-bucket-shrub"],
// [[677, 718], "gp", "prototype-bucket-shrub"],
// [[696, 706], "a1", "prototype-bucket-shrub"]
],
"(method 8 drawable-tree-instance-shrub)": [[51, "v1", "drawable-group"]],
"(method 13 drawable-tree-instance-shrub)": [
[[12, 151], "gp", "prototype-bucket-shrub"],
[19, "a1", "drawable-group"],
[45, "v1", "drawable-group"],
[67, "s3", "shrubbery"],
[93, "v1", "drawable-group"],
[115, "s3", "shrubbery"],
[161, "gp", "(inline-array prototype-bucket-shrub)"]
],
"draw-drawable-tree-instance-shrub": [[86, "a0", "drawable-group"]]
}
+2
View File
@@ -186,6 +186,8 @@ set(RUNTIME_SOURCE
mips2c/jak2_functions/vortex.cpp
mips2c/jak3_functions/collide_func.cpp
mips2c/jak3_functions/debug.cpp
mips2c/jak3_functions/font.cpp
mips2c/jak3_functions/generic_effect.cpp
mips2c/jak3_functions/lights.cpp
mips2c/jak3_functions/sky.cpp
mips2c/mips2c_table.cpp
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+33 -11
View File
@@ -258,16 +258,29 @@ namespace shadow_calc_dual_verts { extern void link(); }
namespace shadow_xform_verts { extern void link(); }
}
namespace jak3 {
namespace light_hash_get_bucket_index { extern void link(); }
namespace add_light_sphere_to_light_group { extern void link(); }
namespace light_hash_count_items { extern void link(); }
namespace light_hash_add_items { extern void link(); }
namespace debug_line_clip { extern void link(); }
namespace init_boundary_regs { extern void link(); }
namespace draw_boundary_polygon { extern void link(); }
namespace render_boundary_quad { extern void link(); }
namespace render_boundary_tri { extern void link(); }
namespace set_sky_vf27 { extern void link(); }
namespace light_hash_get_bucket_index { extern void link(); }
namespace add_light_sphere_to_light_group { extern void link(); }
namespace light_hash_count_items { extern void link(); }
namespace light_hash_add_items { extern void link(); }
namespace debug_line_clip { extern void link(); }
namespace init_boundary_regs { extern void link(); }
namespace draw_boundary_polygon { extern void link(); }
namespace render_boundary_quad { extern void link(); }
namespace render_boundary_tri { extern void link(); }
namespace set_sky_vf27 { extern void link(); }
namespace generic_light_proc { extern void link(); }
namespace generic_envmap_proc { extern void link(); }
namespace generic_prepare_dma_double { extern void link(); }
namespace generic_prepare_dma_single { extern void link(); }
namespace generic_warp_source_proc { extern void link(); }
namespace generic_warp_dest_proc { extern void link(); }
namespace generic_warp_dest { extern void link(); }
namespace generic_warp_envmap_dest { extern void link(); }
namespace generic_no_light_proc { extern void link(); }
namespace method_9_font_work { extern void link(); }
namespace draw_string_asm { extern void link(); }
namespace get_string_length { extern void link(); }
}
// clang-format on
@@ -443,7 +456,16 @@ PerGameVersion<std::unordered_map<std::string, std::vector<void (*)()>>> gMips2C
{"debug",
{jak3::debug_line_clip::link, jak3::init_boundary_regs::link,
jak3::draw_boundary_polygon::link, jak3::render_boundary_quad::link,
jak3::render_boundary_tri::link, jak3::set_sky_vf27::link}}}};
jak3::render_boundary_tri::link, jak3::set_sky_vf27::link}},
{"generic-effect",
{jak3::generic_light_proc::link, jak3::generic_envmap_proc::link,
jak3::generic_prepare_dma_double::link, jak3::generic_prepare_dma_single::link,
jak3::generic_warp_source_proc::link, jak3::generic_warp_dest_proc::link,
jak3::generic_warp_dest::link, jak3::generic_warp_envmap_dest::link,
jak3::generic_no_light_proc::link}},
{"font",
{jak3::method_9_font_work::link, jak3::draw_string_asm::link,
jak3::get_string_length::link}}}};
void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) {
const auto& it = m_executes.insert({name, {exec, Ptr<u8>()}});
+1 -1
View File
@@ -669,7 +669,7 @@
(defun-debug move-level-by-name ((arg0 symbol) (arg1 float) (arg2 float) (arg3 float))
(let ((v1-1 (level-get *level* arg0)))
(when v1-1
(logior! (-> v1-1 info level-flags) (level-flags lf10))
(logior! (-> v1-1 info level-flags) (level-flags use-camera-other))
(let ((v0-1 (-> *math-camera* trans-other)))
(set! (-> v0-1 x) (* 4096.0 arg1))
(set! (-> v0-1 y) (* 4096.0 arg2))
+507
View File
@@ -7,3 +7,510 @@
;; DECOMP BEGINS
(define *font12-table* (new 'static 'inline-array vector 250
(new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 22.5)
(new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 11.25)
(new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 9.0)
(new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 6.0)
(new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 9.0)
(new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 9.75)
(new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 18.5)
(new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 16.0)
)
)
(define *font24-table* (new 'static 'inline-array vector 250
(new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 17.5)
(new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 22.5)
(new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 24.0)
)
)
+37
View File
@@ -7,3 +7,40 @@
;; DECOMP BEGINS
(defmethod collect-regions ((this draw-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(dotimes (s2-0 arg1)
(if (spheres-overlap? arg0 (the-as sphere (-> this bsphere)))
(collect-regions (-> this child) arg0 (the-as int (-> this child-count)) arg2)
)
(&+! this 32)
)
0
(none)
)
(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int))
(set! (-> usage length) (max 65 (-> usage length)))
(set! (-> usage data 64 name) "draw-node")
(+! (-> usage data 64 count) (-> this length))
(let ((v1-6 (asize-of this)))
(+! (-> usage data 64 used) v1-6)
(+! (-> usage data 64 total) (logand -16 (+ v1-6 15)))
)
this
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of ((this drawable-inline-array-node))
(the-as int (+ (-> drawable-inline-array-node size) (* (+ (-> this length) -1) 32)))
)
(defmethod collect-regions ((this drawable-inline-array-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(collect-regions (the-as draw-node (-> this data)) arg0 (-> this length) arg2)
0
(none)
)
;; ERROR: function was not converted to expressions. Cannot decompile.
@@ -7,3 +7,466 @@
;; DECOMP BEGINS
(define *background-work* (new 'global 'background-work))
(define background-vu0-block (new 'static 'vu-function :length 59 :qlength 30))
(defun background-upload-vu0 ()
"Upload VU0 functions for background. (believed unused?)"
;; (upload-vu0-program background-vu0-block (&-> *background-work* wait-to-vu0))
0
(none)
)
(defun init-background ()
"Reset lists of trees to draw for background rendering."
(dotimes (v1-0 8)
(set! (-> *background-work* tfrag-trees v1-0) #f)
(set! (-> *background-work* tfrag-trans-trees v1-0) #f)
(set! (-> *background-work* tfrag-water-trees v1-0) #f)
)
(set! (-> *background-work* tfrag-tree-count) 0)
(set! (-> *background-work* tfrag-trans-tree-count) 0)
(set! (-> *background-work* tfrag-water-tree-count) 0)
(set! (-> *background-work* shrub-tree-count) 0)
(set! (-> *background-work* tie-tree-count) 0)
(set! (-> *background-work* wait-to-vu0) (the-as uint 0))
0
(none)
)
(defun upload-vis-bits ((arg0 level) (arg1 level) (arg2 bsp-header))
"Upload vis data to the scratchpad."
(let ((v1-2 (/ (+ (-> arg2 visible-list-length) 15) 16)))
(let ((a0-1 (-> arg0 vis-bits))
(a1-1 (the-as (pointer uinteger) (-> arg2 all-visible-list)))
;; (a2-2 (the-as (pointer uint128) (+ #x3800 #x70000000)))
(a2-2 (scratchpad-ptr uint128 :offset #x3800))
)
(b! (not *artist-flip-visible*) cfg-5 :delay (nop!))
(nop!)
(nop!)
(label cfg-2)
(let ((a3-2 (-> (the-as (pointer uint128) a0-1))))
(&+! a0-1 16)
(let ((t0-0 (-> (the-as (pointer uint128) a1-1) 0)))
(set! a1-1 (&-> (the-as (pointer uint8) a1-1) 16))
(nop!)
(nop!)
(let ((a3-3 (logxor a3-2 (the-as uint t0-0))))
(+! v1-2 -1)
(set! (-> a2-2 0) a3-3)
)
)
)
(set! a2-2 (&-> a2-2 1))
(b! (> v1-2 0) cfg-2 :delay (nop!))
0
(b! #t cfg-8 :delay (nop!))
(nop!)
(label cfg-5)
(nop!)
(nop!)
(label cfg-6)
(let ((a1-2 (-> (the-as (pointer uint128) a0-1))))
(&+! a0-1 16)
(nop!)
(+! v1-2 -1)
(set! (-> a2-2 0) a1-2)
)
(set! a2-2 (&-> a2-2 1))
)
(b! (> v1-2 0) cfg-6 :delay (nop!))
)
0
(label cfg-8)
(none)
)
;; ERROR: function was not converted to expressions. Cannot decompile.
(defun set-background-regs! ((arg0 level))
;; not needed.
(none)
)
;; WARN: Return type mismatch plane vs none.
(defun set-tie-quard-planes! ((arg0 level))
"Set up TIE work guard planes."
(cond
((logtest? (-> arg0 info level-flags) (level-flags use-camera-other))
(set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad))
(set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad))
(set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad))
(set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad))
)
(else
(set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad))
(set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad))
(set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad))
(set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad))
)
)
(none)
)
;; WARN: Return type mismatch plane vs none.
(defun set-shrub-quard-planes! ((arg0 level))
"Set shrub work guard planes."
(cond
((logtest? (-> arg0 info level-flags) (level-flags use-camera-other))
(set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad))
(set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad))
(set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad))
(set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad))
)
(else
(set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad))
(set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad))
(set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad))
(set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad))
)
)
(none)
)
(defun set-subdivide-settings! ((arg0 level))
"Set subdivide settings from the level."
(if *artist-use-menu-subdiv*
(update-subdivide-settings! *subdivide-settings* *math-camera* 11)
(update-subdivide-settings! *subdivide-settings* *math-camera* (-> arg0 index))
)
(none)
)
;; WARN: Function finish-background has a return type of none, but the expression builder found a return statement.
(defun finish-background ()
"Run all renderers for background data added."
(if (get-menu-mode *blit-displays-work*)
(return #f)
)
(when (not (paused?))
(flush-cache 0)
(dotimes (gp-0 (-> *level* length))
(let ((v1-8 (-> *level* level gp-0)))
(when (= (-> v1-8 status) 'active)
(-> v1-8 bsp wind-array)
(if (nonzero? (-> v1-8 bsp wind-array-length))
(level-update-wind *wind-work*)
)
)
)
)
)
(background-upload-vu0)
(dotimes (v1-14 (-> *level* length))
(let ((a0-12 (-> *level* level v1-14)))
(when (= (-> a0-12 status) 'active)
(let ((a0-13 (-> a0-12 bsp)))
(when (nonzero? (-> a0-13 tfrag-masks))
(dotimes (a1-7 (-> a0-13 tfrag-masks length))
(set! (-> a0-13 tfrag-closest a1-7) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 shrub-masks))
(dotimes (a1-12 (-> a0-13 shrub-masks length))
(set! (-> a0-13 shrub-closest a1-12) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 alpha-masks))
(dotimes (a1-17 (-> a0-13 alpha-masks length))
(set! (-> a0-13 alpha-closest a1-17) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 water-masks))
(dotimes (a1-22 (-> a0-13 water-masks length))
(set! (-> a0-13 water-closest a1-22) 4095996000.0)
)
)
)
)
)
)
(when (nonzero? (-> *background-work* shrub-tree-count))
(with-profiler 'shrubbery *profile-shrubbery-color*
(dotimes (gp-2 (-> *background-work* shrub-tree-count))
(set! *draw-index* (-> *background-work* shrub-levels gp-2 draw-index))
(flush-cache 0)
(let ((s5-1 (-> *background-work* shrub-trees gp-2))
(s4-1 (-> *background-work* shrub-levels gp-2))
)
(if (nonzero? (-> s5-1 colors-added))
(time-of-day-interp-colors
(-> *instance-shrub-work* colors)
(the-as uint (-> s5-1 colors-added))
(-> s4-1 mood-context)
)
)
(set-background-regs! s4-1)
(set-shrub-quard-planes! s4-1)
(draw-drawable-tree-instance-shrub s5-1 s4-1)
)
)
)
)
(let ((gp-4 (the-as level #f)))
(when (or (nonzero? (-> *background-work* tfrag-tree-count))
(nonzero? (-> *background-work* tfrag-trans-tree-count))
(nonzero? (-> *background-work* tfrag-water-tree-count))
)
(let ((s5-5 (max
(max (-> *background-work* tfrag-tree-count) (-> *background-work* tfrag-trans-tree-count))
(-> *background-work* tfrag-water-tree-count)
)
)
(s4-3 (the-as time-of-day-palette #f))
)
(with-profiler 'tfrag *profile-tfrag-color*
(dotimes (s3-2 s5-5)
(let ((s2-1 (-> *background-work* tfrag-trees s3-2)))
(when s2-1
(let ((s1-1 (-> *background-work* tfrag-levels s3-2)))
(let ((a2-23 (-> s1-1 bsp))
(s0-1 (-> s2-1 time-of-day-pal))
)
(upload-vis-bits s1-1 gp-4 a2-23)
(set-subdivide-settings! s1-1)
(when (not (or (zero? s0-1) (= s4-3 s0-1)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-1 (-> s1-1 mood-context))
(set! s4-3 s0-1)
)
)
(set! *draw-index* (-> s1-1 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-1)
)
(draw-drawable-tree-tfrag s2-1)
(set! (-> *level* draw-level *draw-index* closest-object 0) (-> *tfrag-work* min-dist z))
)
)
(let ((s2-2 (-> *background-work* tfrag-trans-trees s3-2)))
(when s2-2
(let ((s1-2 (-> *background-work* tfrag-trans-levels s3-2)))
(let ((a2-25 (-> s1-2 bsp))
(s0-2 (-> s2-2 time-of-day-pal))
)
(upload-vis-bits s1-2 gp-4 a2-25)
(set-subdivide-settings! s1-2)
(when (not (or (zero? s0-2) (= s4-3 s0-2)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-2 (-> s1-2 mood-context))
(set! s4-3 s0-2)
)
)
(set! *draw-index* (-> s1-2 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-2)
)
(draw-drawable-tree-tfrag-trans s2-2)
(set! (-> *level* draw-level *draw-index* closest-object 3) (-> *tfrag-work* min-dist z))
)
)
(let ((s2-3 (-> *background-work* tfrag-water-trees s3-2)))
(when s2-3
(let ((s1-3 (-> *background-work* tfrag-water-levels s3-2)))
(let ((a2-27 (-> s1-3 bsp))
(s0-3 (-> s2-3 time-of-day-pal))
)
(upload-vis-bits s1-3 gp-4 a2-27)
(set-subdivide-settings! s1-3)
(when (not (or (zero? s0-3) (= s4-3 s0-3)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-3 (-> s1-3 mood-context))
(set! s4-3 s0-3)
)
)
(set! *draw-index* (-> s1-3 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-3)
)
(draw-drawable-tree-tfrag-water s2-3)
(set! (-> *level* draw-level *draw-index* closest-object 4) (-> *tfrag-work* min-dist z))
)
)
)
)
)
)
(when (nonzero? (-> *background-work* tie-tree-count))
(set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad))
(with-profiler 'tie *profile-tie-color*
(dotimes (s5-8 (-> *background-work* tie-tree-count))
(let ((s4-6 (-> *background-work* tie-levels s5-8)))
(let ((a2-29 (-> s4-6 bsp)))
(when (!= s4-6 gp-4)
(set! (-> *instance-tie-work* min-dist x) 4095996000.0)
(upload-vis-bits s4-6 gp-4 a2-29)
(set-subdivide-settings! s4-6)
(set! gp-4 s4-6)
)
)
(set! *draw-index* (-> s4-6 draw-index))
(set! (-> *prototype-tie-work* mood) (-> s4-6 mood-context))
(set-background-regs! s4-6)
(set-tie-quard-planes! s4-6)
(tie-scissor-make-perspective-matrix
(-> *instance-tie-work* tie-scissor-perspective-matrix)
(if (logtest? (-> s4-6 info level-flags) (level-flags use-camera-other))
(-> *math-camera* camera-temp-other)
(-> *math-camera* camera-temp)
)
)
(draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-8) s4-6)
)
(set! (-> *background-work* tie-generic s5-8) (the-as basic (-> *prototype-tie-work* generic-next)))
(set! (-> *background-work* tie-generic-trans s5-8)
(the-as basic (-> *prototype-tie-work* generic-trans-next))
)
)
)
)
)
(let ((a0-116 (-> *display* frames (-> *display* on-screen) global-buf)))
(when (< (-> a0-116 real-buffer-end) (the-as int (-> a0-116 base)))
(break!)
0
)
)
(dotimes (gp-6 (-> *level* draw-level-count))
(let ((s5-10 (-> *level* draw-level gp-6)))
(when (and s5-10 (= (-> s5-10 status) 'active))
(when (and (nonzero? (-> s5-10 bsp hfrag-drawable)) (= (-> s5-10 display?) 'display))
(with-profiler 'hfrag *profile-hfrag-color*
(set! *draw-index* (-> s5-10 draw-index))
(let ((s4-9 (-> *display* frames (-> *display* on-screen) global-buf base)))
(draw (-> s5-10 bsp hfrag-drawable))
(let ((v1-293 *dma-mem-usage*))
(when (nonzero? v1-293)
(set! (-> v1-293 length) (max 44 (-> v1-293 length)))
(set! (-> v1-293 data 43 name) "hfragment")
(+! (-> v1-293 data 43 count) 1)
(+! (-> v1-293 data 43 used)
(&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-9))
)
(set! (-> v1-293 data 43 total) (-> v1-293 data 43 used))
)
)
)
)
)
)
)
)
(let ((a0-139 (-> *display* frames (-> *display* on-screen) global-buf)))
(when (< (-> a0-139 real-buffer-end) (the-as int (-> a0-139 base)))
(break!)
0
)
)
(dotimes (v1-323 (-> *level* length))
(let ((a1-55 (-> *level* level v1-323)))
(when (= (-> a1-55 status) 'active)
(let ((a0-145 (-> a1-55 bsp)))
(when (nonzero? (-> a0-145 tfrag-masks))
(let ((a2-43 (-> a1-55 texture-mask)))
(dotimes (a3-5 (-> a0-145 tfrag-masks length))
(let ((f0-12 (* (-> a0-145 tfrag-closest a3-5) (-> *math-camera* fov-correction-factor))))
(when (!= f0-12 4095996000.0)
(let ((t0-8 (-> a0-145 tfrag-masks data a3-5)))
(dotimes (t1-2 3)
(when (or (= t1-2 2) (>= f0-12 (-> t0-8 data t1-2 dist)))
(dotimes (t2-5 3)
(logior!
(-> (&-> a2-43 0 mask data t2-5) 0)
(-> (the-as (pointer int32) (+ (* t2-5 4) (the-as int t0-8) (* t1-2 16))) 0)
)
)
(goto cfg-176)
)
)
)
)
)
(label cfg-176)
)
)
)
(when (nonzero? (-> a0-145 shrub-masks))
(let ((a2-48 (-> a1-55 texture-mask 2)))
(dotimes (a3-6 (-> a0-145 shrub-masks length))
(let ((f0-14 (* (-> a0-145 shrub-closest a3-6) (-> *math-camera* fov-correction-factor))))
(when (!= f0-14 4095996000.0)
(let ((t0-24 (-> a0-145 shrub-masks data a3-6)))
(dotimes (t1-5 3)
(when (or (= t1-5 2) (>= f0-14 (-> t0-24 data t1-5 dist)))
(dotimes (t2-11 3)
(logior!
(-> a2-48 mask data t2-11)
(-> (the-as (pointer int32) (+ (* t2-11 4) (the-as int t0-24) (* t1-5 16))) 0)
)
)
(goto cfg-196)
)
)
)
)
)
(label cfg-196)
)
)
)
(when (nonzero? (-> a0-145 alpha-masks))
(let ((a2-53 (-> a1-55 texture-mask 3)))
(dotimes (a3-7 (-> a0-145 alpha-masks length))
(let ((f0-16 (* (-> a0-145 alpha-closest a3-7) (-> *math-camera* fov-correction-factor))))
(when (!= f0-16 4095996000.0)
(let ((t0-40 (-> a0-145 alpha-masks data a3-7)))
(dotimes (t1-8 3)
(when (or (= t1-8 2) (>= f0-16 (-> t0-40 data t1-8 dist)))
(dotimes (t2-17 3)
(logior!
(-> a2-53 mask data t2-17)
(-> (the-as (pointer int32) (+ (* t2-17 4) (the-as int t0-40) (* t1-8 16))) 0)
)
)
(goto cfg-216)
)
)
)
)
)
(label cfg-216)
)
)
)
(when (nonzero? (-> a0-145 water-masks))
(let ((a1-56 (-> a1-55 texture-mask 4)))
(dotimes (a2-58 (-> a0-145 water-masks length))
(let ((f0-18 (* (-> a0-145 water-closest a2-58) (-> *math-camera* fov-correction-factor))))
(when (!= f0-18 4095996000.0)
(let ((a3-16 (-> a0-145 water-masks data a2-58)))
(dotimes (t0-50 3)
(when (or (= t0-50 2) (>= f0-18 (-> a3-16 data t0-50 dist)))
(dotimes (t1-14 3)
(logior!
(-> a1-56 mask data t1-14)
(-> (the-as (pointer int32) (+ (* t1-14 4) (the-as int a3-16) (* t0-50 16))) 0)
)
)
(goto cfg-236)
)
)
)
)
)
(label cfg-236)
)
)
)
)
)
)
)
0
(none)
)
@@ -57,11 +57,12 @@
(deftype prototype-bucket-shrub (prototype-bucket)
((next uint32 4)
(count uint16 4)
(mod-count uint16 4)
(count-quad uint128 :overlay-at (-> count 0))
(mod-count uint16 4 :offset 88)
(last dma-packet 4)
(next-clear uint128 :overlay-at (-> next 0))
(count-clear uint64 :overlay-at (-> count 0))
(last-clear uint128 :overlay-at (-> last 0))
(next-clear uint128 :overlay-at (-> next 0))
(count-clear uint64 :overlay-at (-> count 0))
(last-clear uint128 :overlay-at (-> last 0))
)
)
@@ -6,7 +6,11 @@
;; dgos: GAME
(declare-type tfrag-work structure)
(declare-type drawable-tree-tfrag structure)
(define-extern *tfrag-work* tfrag-work)
(define-extern draw-drawable-tree-tfrag (function drawable-tree-tfrag none))
(define-extern draw-drawable-tree-tfrag-trans (function drawable-tree-tfrag none))
(define-extern draw-drawable-tree-tfrag-water (function drawable-tree-tfrag none))
;; DECOMP BEGINS
@@ -6,7 +6,12 @@
;; dgos: GAME
(declare-type prototype-tie-work structure)
(declare-type instance-tie-work structure)
(declare-type drawable-tree-instance-tie structure)
(define-extern *prototype-tie-work* prototype-tie-work)
(define-extern *instance-tie-work* instance-tie-work)
(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none))
(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none))
;; DECOMP BEGINS
@@ -5,6 +5,10 @@
;; name in dgo: wind-h
;; dgos: GAME
(declare-type wind-work structure)
(define-extern level-update-wind (function wind-work none))
;; DECOMP BEGINS
(deftype wind-vector (structure)
+16 -16
View File
@@ -78,7 +78,9 @@
(b float :offset 32))
)
(declare-type font-context structure)
(define-extern draw-string-xy (function string dma-buffer int int font-color font-flags draw-string-result))
(define-extern draw-string (function string dma-buffer font-context draw-string-result))
;; DECOMP BEGINS
@@ -105,18 +107,19 @@
)
(deftype font-context (basic)
((origin vector :inline)
(strip-gif vector :inline)
(width float)
(height float)
(projection float)
(scale float)
(color font-color)
(flags font-flags)
(mat matrix)
(start-line uint32)
(alpha float)
(max-x float)
((origin vector :inline)
(strip-gif vector :inline)
(width float)
(height float)
(projection float)
(scale float)
(color font-color)
(color-signed int32 :overlay-at color)
(flags font-flags)
(mat matrix)
(start-line uint32)
(alpha float)
(max-x float)
)
(:methods
(new (symbol type matrix int int float font-color font-flags) _type_)
@@ -301,7 +304,7 @@
(reg-save uint32 5)
)
(:methods
(set-context! (_type_ object) none)
(set-context! (_type_ font-context) none)
)
)
@@ -728,6 +731,3 @@
(set! (-> *font-work* color-table arg0 color 3) arg4)
0
)
(define-extern draw-string (function string dma-buffer font-context draw-string-result))
+52
View File
@@ -5,5 +5,57 @@
;; name in dgo: font
;; dgos: GAME
(deftype draw-string-result (uint64)
((length float :offset 0)
(b float :offset 32))
)
;; DECOMP BEGINS
(defmethod-mips2c "(method 9 font-work)" 9 font-work)
(def-mips2c draw-string-asm (function string dma-buffer font-context draw-string-result))
;; WARN: Return type mismatch uint vs draw-string-result.
;; ERROR: Failed load: (set! a2-4 (l.wu (+ a2-3 2224))) at op 19
(defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context))
(local-vars (v0-2 uint))
(let ((v1-1 (the int (* 128.0 (-> arg2 alpha)))))
(-> arg2 origin quad)
(dotimes (a0-2 45)
(dotimes (a1-1 4)
(set! (-> *font-work* color-table a0-2 color a1-1 a) v1-1)
)
)
(set! (-> *font-work* color-shadow w) v1-1)
)
(if (< (the-as uint (dma-buffer-free arg1)) (the-as uint (* (length arg0) 32)))
(set! v0-2 (the-as uint (-> arg2 origin quad)))
(set! v0-2 (the-as uint (draw-string-asm arg0 arg1 arg2)))
)
(dotimes (v1-7 45)
(dotimes (a0-9 4)
(set! (-> *font-work* color-table v1-7 color a0-9 a) #x80)
)
)
(set! (-> *font-work* color-shadow w) 128)
(the-as draw-string-result v0-2)
)
(def-mips2c get-string-length (function string font-context draw-string-result))
(defun draw-string-xy ((arg0 string) (arg1 dma-buffer) (arg2 int) (arg3 int) (arg4 font-color) (arg5 font-flags))
(let ((s4-0 (new 'stack 'font-context *font-default-matrix* arg2 arg3 0.0 arg4 arg5)))
(set-context! *font-work* s4-0)
(draw-string arg0 arg1 s4-0)
)
)
;; WARN: Return type mismatch float vs none.
(defun draw-string-adv ((arg0 string) (arg1 dma-buffer) (arg2 font-context))
(set-context! *font-work* arg2)
(let ((v1-2 (draw-string arg0 arg1 arg2)))
(+! (-> arg2 origin x) (-> v1-2 length))
)
(none)
)
@@ -5,5 +5,256 @@
;; name in dgo: generic-effect
;; dgos: GAME
(define-extern *default-envmap-shader* adgif-shader)
;; DECOMP BEGINS
(define *target-lock* (the-as object 0))
(define *generic-consts*
(new 'static 'generic-consts
:dma-header (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
)
:vif-header (new 'static 'array uint32 4 #x1000404 #x1000404 #x1000404 #x6c000000)
:dma-ref-vtxs (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
:dma-cnt-call (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id cnt)))
:matrix (new 'static 'matrix
:rvec (new 'static 'vector :x 1.0)
:uvec (new 'static 'vector :y 1.0)
:fvec (new 'static 'vector :z 1.0)
:trans (new 'static 'vector :w 1.0)
)
:base-strgif (new 'static 'generic-gif-tag
:fan-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
:nreg #x3
)
:str-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
:nreg #x3
)
:regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
:alpha-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1))
:alpha-translucent (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1) :x #x44)
:ztest-normal (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5026b)
:ztest-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5000a)
:adcmd-offsets (new 'static 'array uint8 16 #x0 #x20 #x20 #x20 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30)
:stcycle-tag #x1000103
:unpack-vtx-tag #x68000000
:unpack-clr-tag #x6e004000
:unpack-tex-tag #x65000000
:mscal-tag #x14000006
:reset-cycle-tag #x1000404
:dma-tag-cnt #x10000000
:envmap (new 'static 'generic-envmap-consts
:consts (new 'static 'vector :x 1.0 :z 0.5 :w 0.5)
:strgif (new 'static 'generic-gif-tag
:fan-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1)
:nreg #x3
)
:str-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1)
:nreg #x3
)
:regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
:colors (new 'static 'vector4w :x -2139062144 :y -2139062144 :z -2139062144 :w -2139062144)
)
:light-consts (new 'static 'vector :x 255.0 :y 8388608.0)
)
)
(defun generic-work-init ((arg0 generic-bucket-state))
"Initialize the scratchpad work for generic."
(quad-copy!
(the-as pointer (-> (scratchpad-object generic-work) fx-buf work))
(the-as pointer *generic-consts*)
27
)
(set! (-> (scratchpad-object generic-work) saves gifbuf-adr) (-> arg0 gifbuf-adr))
(set! (-> (scratchpad-object generic-work) saves inbuf-adr) (-> arg0 inbuf-adr))
(set! (-> (scratchpad-object generic-work) saves cur-outbuf)
(the-as uint (-> (scratchpad-object generic-work) fx-buf))
)
(let* ((v1-6 *default-envmap-shader*)
(a0-9 (-> (scratchpad-object generic-work) fx-buf work consts envmap shader))
(a1-2 (-> v1-6 quad 0 quad))
(a2-1 (-> v1-6 quad 1 quad))
(a3-0 (-> v1-6 quad 2 quad))
(t0-0 (-> v1-6 quad 3 quad))
(v0-1 (-> v1-6 quad 4 quad))
)
(set! (-> a0-9 quad 0 quad) a1-2)
(set! (-> a0-9 quad 1 quad) a2-1)
(set! (-> a0-9 quad 2 quad) a3-0)
(set! (-> a0-9 quad 3 quad) t0-0)
(set! (-> a0-9 quad 4 quad) v0-1)
)
(none)
)
(defun generic-upload-vu0 ()
"Upload generic VU0 program."
(none)
)
(defun upload-vu0-program ((a0-0 vu-function) (a1-0 pointer))
"Upload vu-function to VU0."
(none)
)
(defun generic-initialize-without-sync ((arg0 matrix) (arg1 vu-lights))
"Init generic, version for generic-merc, which relies on generic-merc init running after."
;; (upload-vu0-program generic-vu0-block (the-as pointer #x70000054))
(let ((a2-0 (-> (scratchpad-object generic-work) fx-buf work consts matrix))
(v1-1 (-> arg0 rvec quad))
(a0-3 (-> arg0 uvec quad))
(a1-2 (-> arg0 fvec quad))
(a3-0 (-> arg0 trans quad))
)
(set! (-> a2-0 rvec quad) v1-1)
(set! (-> a2-0 uvec quad) a0-3)
(set! (-> a2-0 fvec quad) a1-2)
(set! (-> a2-0 trans quad) a3-0)
)
(if arg1
(quad-copy! (the-as pointer (-> (scratchpad-object generic-work) fx-buf work lights)) (the-as pointer arg1) 7)
)
0
(none)
)
;; definition for function generic-initialize
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun generic-initialize ((arg0 generic-bucket-state) (arg1 matrix) (arg2 vu-lights))
"Normal init for generic - sets up scratchpad and VU0."
(generic-work-init arg0)
(generic-upload-vu0)
(let ((a2-1 (-> (scratchpad-object generic-work) fx-buf work consts matrix))
(v1-1 (-> arg1 rvec quad))
(a0-2 (-> arg1 uvec quad))
(a1-1 (-> arg1 fvec quad))
(a3-0 (-> arg1 trans quad))
)
(set! (-> a2-1 rvec quad) v1-1)
(set! (-> a2-1 uvec quad) a0-2)
(set! (-> a2-1 fvec quad) a1-1)
(set! (-> a2-1 trans quad) a3-0)
)
(if arg2
(quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg2) 7)
)
0
(none)
)
;; definition for function generic-wrapup
;; WARN: Return type mismatch uint vs none.
(defun generic-wrapup ((arg0 generic-bucket-state))
(set! (-> arg0 gifbuf-adr) (-> (scratchpad-object generic-work) saves gifbuf-adr))
(set! (-> arg0 inbuf-adr) (-> (scratchpad-object generic-work) saves inbuf-adr))
(none)
)
;; definition for function generic-dma-from-spr
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-light-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-light-proc function)
;; definition for function generic-envmap-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-envmap-proc function)
;; definition for function generic-prepare-dma-double
;; INFO: function output is handled by mips2c
(def-mips2c generic-prepare-dma-double function)
;; definition for function generic-prepare-dma-single
;; INFO: function output is handled by mips2c
(def-mips2c generic-prepare-dma-single function)
;; definition for function generic-envmap-dproc
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-interp-dproc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-no-light-proc
;; INFO: function output is handled by mips2c
;; (def-mips2c generic-no-light-proc function) don't need
;; definition for function generic-no-light-dproc-only
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-no-light-dproc
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-no-light+envmap
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-no-light
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-envmap-only-proc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-light
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-copy-vtx-dclr-dtex
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-none
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-none-dma-wait
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for symbol *warp-data*, type object
(define *warp-data* (the-as object (malloc 'global 1024)))
;; definition for function generic-warp-source-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-source-proc (function none))
;; definition for function generic-warp-source
;; ERROR: Unsupported inline assembly instruction kind - [lui at, 28672]
(defun generic-warp-source ((arg0 gsf-buffer))
(set! (-> (scratchpad-object generic-work) saves gsf-buf) arg0)
(generic-warp-source-proc)
(none)
)
;; definition for function generic-warp-dest-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-dest-proc function)
;; definition for function generic-warp-dest
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-dest function)
;; definition for function generic-warp-envmap-dest
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-envmap-dest function)
;; definition for function generic-debug-light-proc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition (debug) for function generic-post-debug
;; ERROR: function has no type analysis. Cannot decompile.
@@ -46,10 +46,16 @@
)
(defun generic-setup-shrub-constants ((arg0 generic-shrub-constants) (arg1 int) (arg2 int) (arg3 int))
(set! (-> arg0 shrub-giftag qword vector4w x) (logior #x30004000 (shr (shl arg3 53) 38)))
(set! (-> arg0 shrub-giftag qword vector4w y) (logior #x30004000 (shr (shl arg2 53) 38)))
(set! (-> arg0 shrub-giftag qword vector4w z) 1042)
(set! (-> arg0 shrub-giftag qword vector4w w) 0)
(set! (-> arg0 shrub-giftag fan-prim)
(new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg3))
)
(set! (-> arg0 shrub-giftag str-prim)
(new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg2))
)
(set! (-> arg0 shrub-giftag regs)
(new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
(set! (-> arg0 shrub-giftag num-strips) (the-as uint 0))
(set! (-> arg0 shrub-adnop dword 0) (the-as uint arg1))
(set! (-> arg0 shrub-adnop dword 1) (the-as uint 71))
(none)
+81 -11
View File
@@ -16,15 +16,15 @@ At any point in time, there are 3 frames in progress:
this frame also needs a DMA buffer, which is being filled up.
|#
(defconstant DEFAULT_ALL_RENDERERS
(vu1-renderer-mask
sky ocean ocean-wave tfrag tie tie-envmap tie-scissor tie-envmap-scissor
tie-vanish generic merc emerc shrubbery shrub-near billboard shrubbery-vanish
tfrag-trans tie-scissor-trans tie-trans tie-envmap-trans tie-envmap-scissor-trans
tfrag-water tie-scissor-water tie-water tie-envmap-water tie-envmap-scissor-water
sprite shadow rn31 rn32 rn33 depth-cue rn36
)
)
; (defconstant DEFAULT_ALL_RENDERERS
; (vu1-renderer-mask
; sky ocean ocean-wave tfrag tie tie-envmap tie-scissor tie-envmap-scissor
; tie-vanish generic merc emerc shrubbery shrub-near billboard shrubbery-vanish
; tfrag-trans tie-scissor-trans tie-trans tie-envmap-trans tie-envmap-scissor-trans
; tfrag-water tie-scissor-water tie-water tie-envmap-water tie-envmap-scissor-water
; sprite shadow rn31 rn32 rn33 depth-cue rn36
; )
; )
;; DECOMP BEGINS
@@ -113,8 +113,78 @@ At any point in time, there are 3 frames in progress:
(set! (-> gp-0 frames 1) (new 'global 'display-frame))
(set! (-> gp-0 pmode) (the-as uint 165))
(set! (-> gp-0 run-half-speed) #f)
(set! (-> gp-0 vu1-enable-user-menu) DEFAULT_ALL_RENDERERS)
(set! (-> gp-0 vu1-enable-user) DEFAULT_ALL_RENDERERS)
(set! (-> gp-0 vu1-enable-user-menu) (vu1-renderer-mask
rn3
rn4
rn5
rn6
rn7
rn8
rn9
rn10
rn11
rn12
rn13
generic
merc
emerc
shrubbery
shrub-near
billboard
shrub-vanish
rn21
rn22
rn23
rn24
rn25
rn26
rn27
rn28
rn29
rn30
rn31
rn32
rn33
rn34
rn36
)
)
(set! (-> gp-0 vu1-enable-user) (vu1-renderer-mask
rn3
rn4
rn5
rn6
rn7
rn8
rn9
rn10
rn11
rn12
rn13
generic
merc
emerc
shrubbery
shrub-near
billboard
shrub-vanish
rn21
rn22
rn23
rn24
rn25
rn26
rn27
rn28
rn29
rn30
rn31
rn32
rn33
rn34
rn36
)
)
gp-0
)
)
@@ -25,6 +25,9 @@
;; ---time-of-day-palette-id
(declare-type sparticle-launch-control inline-array-class)
(declare-type time-of-day-palette structure)
(define-extern time-of-day-interp-colors (function (pointer rgba) uint mood-context none))
(define-extern time-of-day-interp-colors-scratch (function (pointer rgba) time-of-day-palette mood-context none))
;; DECOMP BEGINS
@@ -9,3 +9,313 @@
;; DECOMP BEGINS
(define *instance-shrub-work*
(new 'static 'instance-shrub-work
:matrix-tmpl (new 'static 'inline-array qword 20
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3))
)
:count-tmpl (new 'static 'inline-array vector4w 20
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 10)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 1)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 2)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 3)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 4)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 5)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 6)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 7)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 8)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 9)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 10)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 1)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 2)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 3)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 4)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 5)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 6)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 7)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 8)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 9)
)
:mscalf-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
)
:mscalf-ret-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ret))
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
)
:adgif-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next))
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
)
:billboard-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next))
:vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x303e400000008004 #x412)
)
:shrub-near-packets (new 'static 'inline-array shrub-near-packet 6
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x117))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x22e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x0))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x117))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x22e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x0))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
)
:dma-ref (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
:dma-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end)))
:wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
:constants (new 'static 'vector :x 128.0 :y 1.0)
:color-constant (new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000)
:start-bank (new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)
)
)
(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103)
(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103)
@@ -6,6 +6,10 @@
;; dgos: GAME
(define-extern shrub-make-perspective-matrix (function matrix matrix matrix))
(declare-type instance-shrub-work structure)
(declare-type drawable-tree-instance-shrub structure)
(define-extern *instance-shrub-work* instance-shrub-work)
(define-extern draw-drawable-tree-instance-shrub (function drawable-tree-instance-shrub level none))
;; DECOMP BEGINS
@@ -161,7 +165,7 @@ This requires storing the data for all shrubs prototype twice!"
(vertex-tmpl dma-packet :inline)
(mscal-tmpl dma-packet :inline)
(init-tmpl dma-packet :inline)
(init-data qword 8)
(init-data qword 2 :inline)
)
)
File diff suppressed because it is too large Load Diff
+77 -77
View File
@@ -168,110 +168,110 @@
(gmerc2-l9-tfrag 129)
(tex-l0-shrub 130)
(bucket131 131)
(bucket132 132)
(bucket133 133)
(bucket134 134)
(bucket135 135)
(shrub-l0-shrub 131)
(shrub-near-l0-shrub 132)
(billboard-l0-shrub 133)
(shrub-vanish-l0-shrub 134)
(shrub-near-trans-l0-shrub 135)
(merc-l0-shrub 136)
(emerc-l0-shrub 137)
(gmerc-l0-shrub 138)
(gmerc2-l0-shrub 139)
(tex-l1-shrub 140)
(bucket141 141)
(bucket142 142)
(bucket143 143)
(bucket144 144)
(bucket145 145)
(shrub-l1-shrub 141)
(shrub-near-l1-shrub 142)
(billboard-l1-shrub 143)
(shrub-vanish-l1-shrub 144)
(shrub-near-trans-l1-shrub 145)
(merc-l1-shrub 146)
(emerc-l1-shrub 147)
(gmerc-l1-shrub 148)
(gmerc2-l1-shrub 149)
(tex-l2-shrub 150)
(bucket151 151)
(bucket152 152)
(bucket153 153)
(bucket154 154)
(bucket155 155)
(shrub-l2-shrub 151)
(shrub-near-l2-shrub 152)
(billboard-l2-shrub 153)
(shrub-vanish-l2-shrub 154)
(shrub-near-trans-l2-shrub 155)
(merc-l2-shrub 156)
(emerc-l2-shrub 157)
(gmerc-l2-shrub 158)
(gmerc2-l2-shrub 159)
(tex-l3-shrub 160)
(bucket161 161)
(bucket162 162)
(bucket163 163)
(bucket164 164)
(bucket165 165)
(shrub-l3-shrub 161)
(shrub-near-l3-shrub 162)
(billboard-l3-shrub 163)
(shrub-vanish-l3-shrub 164)
(shrub-near-trans-l3-shrub 165)
(merc-l3-shrub 166)
(emerc-l3-shrub 167)
(gmerc-l3-shrub 168)
(gmerc2-l3-shrub 169)
(tex-l4-shrub 170)
(bucket171 171)
(bucket172 172)
(bucket173 173)
(bucket174 174)
(bucket175 175)
(shrub-l4-shrub 171)
(shrub-near-l4-shrub 172)
(billboard-l4-shrub 173)
(shrub-vanish-l4-shrub 174)
(shrub-near-trans-l4-shrub 175)
(merc-l4-shrub 176)
(emerc-l4-shrub 177)
(gmerc-l4-shrub 178)
(gmerc2-l4-shrub 179)
(tex-l5-shrub 180)
(bucket181 181)
(bucket182 182)
(bucket183 183)
(bucket184 184)
(bucket185 185)
(shrub-l5-shrub 181)
(shrub-near-l5-shrub 182)
(billboard-l5-shrub 183)
(shrub-vanish-l5-shrub 184)
(shrub-near-trans-l5-shrub 185)
(merc-l5-shrub 186)
(emerc-l5-shrub 187)
(gmerc-l5-shrub 188)
(gmerc2-l5-shrub 189)
(tex-l6-shrub 190)
(bucket191 191)
(bucket192 192)
(bucket193 193)
(bucket194 194)
(bucket195 195)
(shrub-l6-shrub 191)
(shrub-near-l6-shrub 192)
(billboard-l6-shrub 193)
(shrub-vanish-l6-shrub 194)
(shrub-near-trans-l6-shrub 195)
(merc-l6-shrub 196)
(emerc-l6-shrub 197)
(gmerc-l6-shrub 198)
(gmerc2-l6-shrub 199)
(tex-l7-shrub 200)
(bucket201 201)
(bucket202 202)
(bucket203 203)
(bucket204 204)
(bucket205 205)
(shrub-l7-shrub 201)
(shrub-near-l7-shrub 202)
(billboard-l7-shrub 203)
(shrub-vanish-l7-shrub 204)
(shrub-near-trans-l7-shrub 205)
(merc-l7-shrub 206)
(emerc-l7-shrub 207)
(gmerc-l7-shrub 208)
(gmerc2-l7-shrub 209)
(tex-l8-shrub 210)
(bucket211 211)
(bucket212 212)
(bucket213 213)
(bucket214 214)
(bucket215 215)
(shrub-l8-shrub 211)
(shrub-near-l8-shrub 212)
(billboard-l8-shrub 213)
(shrub-vanish-l8-shrub 214)
(shrub-near-trans-l8-shrub 215)
(merc-l8-shrub 216)
(emerc-l8-shrub 217)
(gmerc-l8-shrub 218)
(gmerc2-l8-shrub 219)
(tex-l9-shrub 220)
(bucket221 221)
(bucket222 222)
(bucket223 223)
(bucket224 224)
(bucket225 225)
(shrub-l9-shrub 221)
(shrub-near-l9-shrub 222)
(billboard-l9-shrub 223)
(shrub-vanish-l9-shrub 224)
(shrub-near-trans-l9-shrub 225)
(merc-l9-shrub 226)
(emerc-l9-shrub 227)
(gmerc-l9-shrub 228)
@@ -693,45 +693,45 @@
)
;; +++vu1-renderer-mask
;; TODO stolen from Jak 2
;; TODO stolen from Jak 2 (and it was all wrong...)
(defenum vu1-renderer-mask
:type uint64
:bitfield #t
(rn0)
(rn1)
(rn2)
(sky)
(ocean)
(ocean-wave)
(tfrag)
(tie)
(tie-envmap)
(tie-scissor)
(tie-envmap-scissor)
(tie-vanish)
(rn3)
(rn4)
(rn5)
(rn6)
(rn7)
(rn8)
(rn9)
(rn10)
(rn11)
(rn12)
(rn13)
(generic) ;; right
(merc) ;; right
(emerc) ;; right
(shrubbery)
(shrub-near)
(generic)
(merc)
(emerc)
(billboard)
(shrubbery-vanish)
(tfrag-trans)
(tie-scissor-trans)
(tie-trans)
(tie-envmap-trans)
(tie-envmap-scissor-trans)
(tfrag-water)
(tie-scissor-water)
(tie-water)
(tie-envmap-water)
(tie-envmap-scissor-water)
(sprite)
(shadow)
(shrub-vanish)
(rn21)
(rn22)
(rn23)
(rn24)
(rn25)
(rn26)
(rn27)
(rn28)
(rn29)
(rn30)
(rn31)
(rn32)
(rn33)
(depth-cue)
(rn34)
(rn35)
(rn36)
(rn37)
+5 -2
View File
@@ -40,8 +40,9 @@ This is used for precomputed visibility, based on the camera position. This is n
"The bsp-header is really an entire level.
This probably started as a very simple structure, but now it is extremely complicated."
((info file-info :overlay-at id)
(all-visible-list (pointer uint16) :offset 32)
(all-visible-list (pointer uint8) :offset 32)
(visible-list-length int16 :offset 36)
(extra-vis-list-length int16)
(drawable-trees drawable-tree-array :offset 40)
(pat pointer :offset 44)
(pat-length int32 :offset 48)
@@ -62,6 +63,8 @@ This probably started as a very simple structure, but now it is extremely compli
(actor-birth-order (pointer uint32) :offset 172)
(region-trees (array drawable-tree-region-prim) :offset 188)
(collide-hash collide-hash :offset 196)
(wind-array uint32 :offset 200)
(wind-array-length int32 :offset 204)
(vis-spheres vector-array :offset 216)
(vis-spheres-length uint32 :offset 248)
(tfrag-masks texture-masks-array :offset 256)
@@ -78,7 +81,7 @@ This probably started as a very simple structure, but now it is extremely compli
(water-mask-count uint32 :overlay-at water-closest)
(bsp-scale vector :inline :offset 288)
(bsp-offset vector :inline)
(unk-drawable drawable :offset 320)
(hfrag-drawable drawable :offset 320)
(end uint8 :offset 399)
)
(:methods
+6 -6
View File
@@ -105,8 +105,8 @@
(+! (-> usage data 65 used) v1-92)
(+! (-> usage data 65 total) (logand -16 (+ v1-92 15)))
)
(if (nonzero? (-> this unk-drawable))
(mem-usage (-> this unk-drawable) usage flags)
(if (nonzero? (-> this hfrag-drawable))
(mem-usage (-> this hfrag-drawable) usage flags)
)
(when (nonzero? (-> this region-trees))
(let* ((s3-0 (-> this region-trees length))
@@ -150,8 +150,8 @@
)
)
)
(if (nonzero? (-> this unk-drawable))
(login (-> this unk-drawable))
(if (nonzero? (-> this hfrag-drawable))
(login (-> this hfrag-drawable))
)
this
)
@@ -339,8 +339,8 @@
(if (nonzero? (-> this drawable-trees))
(collect-stats (-> this drawable-trees))
)
(if (nonzero? (-> this unk-drawable))
(collect-stats (-> this unk-drawable))
(if (nonzero? (-> this hfrag-drawable))
(collect-stats (-> this hfrag-drawable))
)
0
(none)
+1 -1
View File
@@ -159,7 +159,7 @@
(lf7 7)
(lf8 8)
(lf9 9)
(lf10 10)
(use-camera-other 10)
(lf11 11)
(lf12 12)
(lf13 13)
+2 -2
View File
@@ -17725,7 +17725,7 @@
:index #x110
:task-level #x9
:master-level 'factorya
:level-flags (level-flags lf10 lf12 lf13)
:level-flags (level-flags use-camera-other lf12 lf13)
:packages '()
:run-packages '("common")
:memory-mode (level-memory-mode borrow)
@@ -17754,7 +17754,7 @@
:index #x111
:task-level #x9
:master-level 'factorya
:level-flags (level-flags lf10 lf12 lf13)
:level-flags (level-flags use-camera-other lf12 lf13)
:packages '()
:run-packages '("common")
:memory-mode (level-memory-mode borrow)
+497
View File
@@ -7,3 +7,500 @@
;; DECOMP BEGINS
(defun unpack-comp-rle ((arg0 (pointer int8)) (arg1 (pointer int8)))
"Decompress data compressed with run-length encoding."
(local-vars (v1-2 int) (v1-3 uint))
(nop!)
(loop
(loop
(set! v1-2 (-> arg1 0))
(set! arg1 (&-> arg1 1))
(b! (<= v1-2 0) cfg-5 :delay (nop!))
(let ((a2-0 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(label cfg-3)
(nop!)
(nop!)
(nop!)
(nop!)
(set! (-> arg0 0) a2-0)
)
(set! arg0 (&-> arg0 1))
(b! (> v1-2 0) cfg-3 :delay (set! v1-2 (+ v1-2 -1)))
)
(label cfg-5)
(b! (zero? v1-2) cfg-8 :delay (set! v1-3 (the-as uint (- v1-2))))
(label cfg-6)
(let ((a2-1 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(nop!)
(nop!)
(set! (-> arg0 0) a2-1)
)
(+! v1-3 -1)
(b! (> (the-as int v1-3) 0) cfg-6 :delay (set! arg0 (&-> arg0 1)))
)
(label cfg-8)
arg1
)
(deftype huf-dictionary-node (structure)
((zero uint16)
(one uint16)
)
)
(defun unpack-comp-huf ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 uint) (arg3 huf-dictionary-node))
"Decompress data compressed with huffman encoding."
(local-vars (t1-1 uint) (t3-2 (pointer uint16)))
(nop!)
(let ((t1-0 (-> arg3 zero))
(a2-1 (+ arg2 -1028))
(t2-0 (-> arg3 one))
)
(nop!)
(label cfg-1)
(let ((v1-4 128))
(nop!)
(let ((t0-0 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(label cfg-2)
(let ((t3-0 (logand t0-0 v1-4)))
(shift-arith-right-32 v1-4 v1-4 1)
(b! (zero? t3-0) cfg-4 :delay (set! t1-1 t1-0))
)
)
(nop!)
(set! t1-1 t2-0)
(label cfg-4)
(let ((t2-1 (+ t1-1 -256)))
(let ((t3-1 (* t1-1 4)))
(b! (< (the-as int t2-1) 0) cfg-8 :delay (set! t3-2 (the-as (pointer uint16) (+ t3-1 a2-1))))
)
(b! (zero? t2-1) cfg-10 :delay (set! t1-0 (-> t3-2 0)))
)
(b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> t3-2 1)))
(b! #t cfg-1 :delay (nop!))
(label cfg-8)
(set! (-> arg0 0) t1-1)
(set! arg0 (&-> arg0 1))
(nop!)
(set! t1-0 (-> arg3 zero))
(b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> arg3 one)))
)
)
(b! #t cfg-1 :delay (nop!))
(label cfg-10)
(nop!)
(nop!)
0
(none)
)
(defun unpack-comp-lzo ((arg0 (pointer uint8)) (arg1 (pointer uint8)))
"Decompress data compressed with LZO encoding."
0
(let ((v1-1 arg0))
(b! (>= (the-as uint 17) (-> arg1 0)) cfg-5 :delay #f)
(let ((a2-4 (the-as int (+ (-> arg1 0) -17))))
(set! arg1 (&-> arg1 1))
(b! (< a2-4 4) cfg-41)
(until (<= a2-4 0)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(+! a2-4 -1)
)
(b! #t cfg-15 :delay (nop!))
(label cfg-5)
(b! #t cfg-45 :delay (nop!))
(label cfg-6)
(let ((a2-6 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(b! (>= (the-as int a2-6) 16) cfg-18)
(b! (nonzero? a2-6) cfg-12 :delay (empty-form))
(while (zero? (-> arg1 0))
(+! a2-6 255)
(set! arg1 (&-> arg1 1))
)
(set! a2-6 (+ (-> arg1 0) 15 a2-6))
(set! arg1 (&-> arg1 1))
(label cfg-12)
(set! (-> arg0 0) (-> arg1 0))
(set! (-> arg0 1) (-> arg1 1))
(set! (-> arg0 2) (-> arg1 2))
(set! arg0 (&-> arg0 3))
(set! arg1 (&-> arg1 3))
(until (<= (the-as int a2-6) 0)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(+! a2-6 -1)
)
(label cfg-15)
(set! a2-6 (-> arg1 0))
(set! arg1 (&-> arg1 1))
(b! (>= (the-as int a2-6) 16) cfg-18)
(let ((a2-10 (the-as (pointer uint8) (&- (&- (&-> arg0 -2049) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4))))))
(set! arg1 (&-> arg1 1))
(set! (-> arg0 0) (-> a2-10 0))
(set! (-> arg0 1) (-> a2-10 1))
(set! (-> arg0 2) (-> a2-10 2))
(set! arg0 (&-> arg0 3))
(&-> a2-10 2)
)
(b! #t cfg-39 :delay (nop!))
(b! #t cfg-43 :delay (nop!))
(label cfg-18)
(b! (< (the-as int a2-6) 64) cfg-20)
(let ((a3-23
(the-as (pointer uint8) (&- (&- (&-> arg0 -1) (the-as uint (logand (/ (the-as int a2-6) 4) 7))) (the-as uint (* (-> arg1 0) 8))))
)
)
(set! arg1 (&-> arg1 1))
(let ((a2-13 (+ (/ (the-as int a2-6) 32) -1)))
(b! #t cfg-36 :delay (nop!))
(label cfg-20)
(b! (< (the-as int a2-6) 32) cfg-27)
(set! a2-13 (the-as int (logand a2-6 31)))
(b! (nonzero? a2-13) cfg-26 :delay (empty-form))
(b! #t cfg-24 :delay (nop!))
(label cfg-23)
(+! a2-13 255)
(set! arg1 (&-> arg1 1))
(label cfg-24)
(b! (zero? (-> arg1 0)) cfg-23 :delay (nop!))
(set! a2-13 (the-as int (+ (-> arg1 0) 31 a2-13)))
(set! arg1 (&-> arg1 1))
(label cfg-26)
(set! a3-23 (the-as (pointer uint8) (&- (&-> arg0 -1) (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64))))))
(set! arg1 (&-> arg1 2))
(b! #t cfg-36 :delay (nop!))
(label cfg-27)
(b! (< (the-as int a2-6) 16) cfg-35)
(let ((a3-32 (the-as (pointer uint8) (&- arg0 (the-as uint (shl (logand a2-6 8) 11))))))
(set! a2-13 (the-as int (logand a2-6 7)))
(b! (nonzero? a2-13) cfg-33 :delay (empty-form))
(b! #t cfg-31 :delay (nop!))
(label cfg-30)
(+! a2-13 255)
(set! arg1 (&-> arg1 1))
(label cfg-31)
(b! (zero? (-> arg1 0)) cfg-30 :delay (nop!))
(set! a2-13 (the-as int (+ (-> arg1 0) 7 a2-13)))
(set! arg1 (&-> arg1 1))
(label cfg-33)
(let ((a3-33 (&- a3-32 (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64))))))
(set! arg1 (&-> arg1 2))
(b! (= a3-33 arg0) cfg-47 :delay (nop!))
(set! a3-23 (&-> (the-as (pointer uint8) a3-33) -16384))
)
)
(b! #t cfg-36 :delay (nop!))
(label cfg-35)
(let ((a2-16 (the-as (pointer uint8) (&- (&- (&-> arg0 -1) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4))))))
(set! arg1 (&-> arg1 1))
(set! (-> arg0 0) (-> a2-16 0))
(set! (-> arg0 1) (-> a2-16 1))
(set! arg0 (&-> arg0 2))
(&-> a2-16 1)
)
(b! #t cfg-39 :delay (nop!))
(label cfg-36)
(set! (-> arg0 0) (-> a3-23 0))
(set! (-> arg0 1) (-> a3-23 1))
(set! arg0 (&-> arg0 2))
(let ((a3-39 (&-> a3-23 2)))
(until (<= (the-as int a2-13) 0)
(set! (-> arg0 0) (-> a3-39 0))
(set! arg0 (&-> arg0 1))
(set! a3-39 (&-> a3-39 1))
(+! a2-13 -1)
)
)
)
)
(label cfg-39)
(set! a2-4 (the-as int (logand (-> arg1 -2) 3)))
(b! (zero? (the-as uint a2-4)) cfg-45 :delay (nop!))
(until (<= a2-4 0)
(label cfg-41)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(set! a2-4 (the-as int (+ (the-as uint a2-4) -1)))
)
(set! a2-6 (-> arg1 0))
)
)
(set! arg1 (&-> arg1 1))
(label cfg-43)
(b! #t cfg-18 :delay (nop!))
(label cfg-45)
(b! #t cfg-6 :delay (nop!))
(label cfg-47)
(&- arg0 (the-as uint v1-1))
)
(none)
)
(defmethod update-vis! ((this level) (arg0 level-vis-info) (arg1 uint) (arg2 (pointer uint8)))
"Load/decompress precomputed visibility."
(local-vars (t0-3 uint128) (sv-16 int) (sv-32 (pointer int8)))
(let* ((a0-1 (-> arg0 from-bsp current-leaf-idx))
(v1-1 (-> arg0 current-vis-string))
(s3-0 (-> arg0 vis-string a0-1))
)
0
(+ #x70000000 0)
(+ 2048 #x70000000)
(b! (!= v1-1 s3-0) cfg-8 :delay (empty-form))
(b! (not (logtest? (vis-info-flag loading) (-> arg0 flags))) cfg-6 :delay (empty-form))
(if (check-busy *ramdisk-rpc*)
(return #f)
)
(logclear! (-> arg0 flags) (vis-info-flag loading))
(let ((s3-1 (the-as (pointer integer) (-> this vis-buffer))))
(b! #t cfg-16 :delay (nop!))
(label cfg-6)
(return #t)
(label cfg-8)
(when (logtest? (vis-info-flag loading) (-> arg0 flags))
(if (check-busy *ramdisk-rpc*)
(return #f)
)
(logclear! (-> arg0 flags) (vis-info-flag loading))
)
(set! (-> arg0 current-vis-string) s3-0)
(b! (logtest? (vis-info-flag in-iop) (-> arg0 flags)) cfg-15 :delay (empty-form))
(set! s3-1 (&+ arg2 s3-0))
(b! #t cfg-16 :delay (nop!))
(label cfg-15)
(format 0 "ERROR: ramdisk vis for level ~A, this is not supported~%" (-> this name))
(let ((v0-1 #f))
(b! #t cfg-49 :delay (nop!))
(label cfg-16)
(let ((s2-0 (the-as int (logand (vis-info-flag
dummy0
dummy1
dummy2
dummy3
dummy4
dummy5
dummy6
dummy7
dummy8
dummy9
dummy10
dummy11
dummy12
dummy13
dummy14
dummy15
dummy16
dummy17
dummy18
dummy19
dummy20
dummy21
dummy22
dummy23
dummy24
dummy25
dummy26
dummy27
dummy28
)
(-> arg0 flags)
)
)
)
(s1-0 (&-> (the-as (pointer int8) #x70000000) 0))
(s0-0 (the-as (pointer int8) (+ 2048 #x70000000)))
(s4-1 (-> this bsp visible-list-length))
)
(when (zero? (the-as vis-info-flag s2-0))
(let ((v1-30 (/ (+ s4-1 15) 16)))
(dotimes (a0-19 v1-30)
(set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-19 16)))) (the int128 0))
)
)
(mem-copy! s1-0 (the-as (pointer uint8) s3-1) s4-1)
)
(while (nonzero? s2-0)
(let ((v1-33 (logand s2-0 7)))
(cond
((= v1-33 1)
(let ((v1-35 (/ (+ s4-1 15) 16)))
(dotimes (a0-23 v1-35)
(set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-23 16)))) (the int128 0))
)
)
(set! sv-16 (-> this bsp extra-vis-list-length))
(set! sv-32 (&+ s1-0 (- s4-1 sv-16)))
(let ((v1-45 (unpack-vis (-> this bsp drawable-trees) s1-0 (the-as (pointer int8) s3-1))))
(dotimes (a0-25 sv-16)
(let ((a1-9 (-> v1-45 0)))
(set! v1-45 (&-> v1-45 1))
(set! (-> sv-32 0) a1-9)
)
(set! sv-32 (&-> sv-32 1))
)
)
#f
)
((= v1-33 2)
(unpack-comp-rle s1-0 (the-as (pointer int8) s3-1))
)
((= v1-33 3)
(unpack-comp-huf
(the-as (pointer uint8) s1-0)
(the-as (pointer uint8) s3-1)
(-> arg0 dictionary)
(the-as huf-dictionary-node (+ (-> arg0 dictionary) (-> arg0 dictionary-length) -4))
)
)
((= v1-33 4)
(unpack-comp-lzo (the-as (pointer uint8) s1-0) (the-as (pointer uint8) s3-1))
)
)
)
(set! s3-1 s1-0)
(set! s1-0 s0-0)
(set! s0-0 (the-as (pointer int8) s3-1))
(shift-arith-right-32 s2-0 s2-0 3)
)
(let ((s2-1 (the-as (pointer uint8) s3-1))
(s1-1 (-> this bsp all-visible-list))
(v1-51 #f)
)
(dotimes (s0-1 s4-1)
(when (!= (logand (-> s2-1 0) (-> s1-1 0)) (-> s2-1 0))
(format #t "ERROR: illegal vis bits set [byte ~X] ~X -> ~X~%" s0-1 (-> s2-1 0) (-> s1-1 0))
(set! v1-51 #t)
)
(set! s2-1 (&-> s2-1 1))
(set! s1-1 (&-> s1-1 1))
)
(when v1-51
(format #t "src = #x~x dest = #x~x ~s ~s~%" s3-1 (-> arg0 vis-bits) (-> arg0 level) (-> arg0 from-level))
(format #t "leaf-index = ~d~%" (-> arg0 from-bsp current-leaf-idx))
0
)
)
(let ((v1-55 s3-1)
(a0-42 (the-as object (-> arg0 vis-bits)))
(a1-22 (the-as (pointer uinteger) (-> this bsp all-visible-list)))
(a2-11 (/ (+ s4-1 15) 16))
)
(dotimes (a3-6 a2-11)
(let ((t0-2 (-> (the-as (pointer uint128) v1-55) 0))
(t1-1 (-> (the-as (pointer uint128) a1-22) 0))
)
(.pand t0-3 t0-2 t1-1)
)
(set! (-> (the-as (pointer uint128) a0-42) 0) t0-3)
(set! a0-42 (+ (the-as uint a0-42) 16))
(set! v1-55 (&-> (the-as (pointer uint8) v1-55) 16))
(set! a1-22 (&-> (the-as (pointer uint8) a1-22) 16))
)
)
)
(set! v0-1 #t)
(label cfg-49)
v0-1
)
)
)
)
;; WARN: Return type mismatch int vs (pointer uint8).
(defun pack-comp-rle ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 int) (arg3 int))
"Compress data, used for map mask stuff."
(let ((s4-0 0))
0
(while (and (> arg2 0) (< (+ s4-0 131) arg3))
(cond
((= (-> arg1 0) (-> arg1 1))
(let ((v1-2 (-> arg1 0)))
(set! arg1 (&-> arg1 2))
(let ((a0-2 2))
(+! arg2 -2)
(while (> arg2 0)
(cond
((= v1-2 (-> arg1 0))
(+! a0-2 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(if (>= a0-2 128)
(goto cfg-12)
)
)
(else
(goto cfg-12)
)
)
)
(label cfg-12)
(set! (-> arg0 0) (the-as uint (+ a0-2 -1)))
)
(set! (-> arg0 1) v1-2)
)
(set! arg0 (&-> arg0 2))
(+! s4-0 2)
)
(else
(let ((a0-4 arg1)
(v1-4 1)
)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(while (< 1 arg2)
(when (and (= (-> arg1 0) (-> arg1 1)) (< 2 arg2))
(if (= (-> arg1 0) (-> arg1 2))
(goto cfg-26)
)
)
(+! v1-4 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(if (>= v1-4 127)
(goto cfg-26)
)
)
(label cfg-26)
(when (= arg2 1)
(+! v1-4 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
)
(set! (-> arg0 0) (the-as uint (- v1-4)))
(let ((a1-21 (&-> arg0 1))
(a2-4 (+ s4-0 1))
)
(dotimes (t0-0 v1-4)
(set! (-> a1-21 t0-0) (-> a0-4 t0-0))
)
(set! arg0 (&+ a1-21 v1-4))
(set! s4-0 (+ a2-4 v1-4))
)
)
)
)
)
(if (< arg3 (+ s4-0 131))
(format 0 "(GOMI) Warning: May have run out of bigmap bit mask compression memory~%")
)
(when (= arg2 1)
(set! (-> arg0 0) (the-as uint -1))
(set! (-> arg0 1) (-> arg1 0))
(set! arg0 (&-> arg0 2))
(+! s4-0 2)
(&-> arg1 1)
)
(set! (-> arg0 0) (the-as uint 0))
(&-> arg0 1)
(the-as (pointer uint8) (+ s4-0 1))
)
)
+26
View File
@@ -1555,3 +1555,29 @@
)
)
)
(defmacro defmethod-mips2c (name method-id method-type)
"Define a mips2c method."
`(method-set! ,method-type ,method-id (__pc-get-mips2c ,name))
)
(defconstant GIF_REGS_ALL_AD
(new 'static 'gif-tag-regs
:regs0 (gif-reg-id a+d)
:regs1 (gif-reg-id a+d)
:regs2 (gif-reg-id a+d)
:regs3 (gif-reg-id a+d)
:regs4 (gif-reg-id a+d)
:regs5 (gif-reg-id a+d)
:regs6 (gif-reg-id a+d)
:regs7 (gif-reg-id a+d)
:regs8 (gif-reg-id a+d)
:regs9 (gif-reg-id a+d)
:regs10 (gif-reg-id a+d)
:regs11 (gif-reg-id a+d)
:regs12 (gif-reg-id a+d)
:regs13 (gif-reg-id a+d)
:regs14 (gif-reg-id a+d)
:regs15 (gif-reg-id a+d)
)
)
+1 -5
View File
@@ -683,7 +683,7 @@
(defun-debug move-level-by-name ((arg0 symbol) (arg1 float) (arg2 float) (arg3 float))
(let ((v1-1 (level-get *level* arg0)))
(when v1-1
(logior! (-> v1-1 info level-flags) (level-flags lf10))
(logior! (-> v1-1 info level-flags) (level-flags use-camera-other))
(let ((v0-1 (-> *math-camera* trans-other)))
(set! (-> v0-1 x) (* 4096.0 arg1))
(set! (-> v0-1 y) (* 4096.0 arg2))
@@ -714,7 +714,3 @@
)
0
)
+516
View File
@@ -0,0 +1,516 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *font12-table*, type (inline-array vector)
(define *font12-table* (new 'static 'inline-array vector 250
(new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 22.5)
(new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 11.25)
(new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 7.5)
(new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 15.75)
(new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 9.0)
(new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 6.0)
(new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 17.25)
(new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 9.0)
(new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 9.75)
(new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 18.5)
(new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 14.25)
(new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 12.75)
(new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 16.5)
(new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 10.5)
(new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 13.5)
(new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 16.0)
)
)
;; definition for symbol *font24-table*, type (inline-array vector)
(define *font24-table* (new 'static 'inline-array vector 250
(new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 19.5)
(new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 17.5)
(new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 22.5)
(new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 11.0)
(new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 26.0)
(new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 10.0)
(new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 23.0)
(new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 27.0)
(new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 19.0)
(new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 25.0)
(new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 12.0)
(new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 18.0)
(new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 22.0)
(new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 14.0)
(new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 15.0)
(new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 20.0)
(new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 13.0)
(new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 21.0)
(new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0)
(new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 17.0)
(new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 24.0)
(new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 24.0)
)
)
+64
View File
@@ -0,0 +1,64 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 16 of type draw-node
;; WARN: Return type mismatch int vs none.
(defmethod collect-regions ((this draw-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(dotimes (s2-0 arg1)
(if (spheres-overlap? arg0 (the-as sphere (-> this bsphere)))
(collect-regions (-> this child) arg0 (the-as int (-> this child-count)) arg2)
)
(&+! this 32)
)
0
(none)
)
;; definition for method 3 of type drawable-inline-array-node
(defmethod inspect ((this drawable-inline-array-node))
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tlength: ~D~%" (-> this length))
(format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data))
(dotimes (s5-0 (-> this length))
(format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0))
)
this
)
;; definition for method 8 of type drawable-inline-array-node
(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int))
(set! (-> usage length) (max 65 (-> usage length)))
(set! (-> usage data 64 name) "draw-node")
(+! (-> usage data 64 count) (-> this length))
(let ((v1-6 (asize-of this)))
(+! (-> usage data 64 used) v1-6)
(+! (-> usage data 64 total) (logand -16 (+ v1-6 15)))
)
this
)
;; definition for method 5 of type drawable-inline-array-node
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of ((this drawable-inline-array-node))
(the-as int (+ (-> drawable-inline-array-node size) (* (+ (-> this length) -1) 32)))
)
;; definition for method 16 of type drawable-inline-array-node
;; WARN: Return type mismatch int vs none.
(defmethod collect-regions ((this drawable-inline-array-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(collect-regions (the-as draw-node (-> this data)) arg0 (-> this length) arg2)
0
(none)
)
;; definition for function draw-node-cull
;; ERROR: function was not converted to expressions. Cannot decompile.
;; failed to figure out what this is:
0
+623
View File
@@ -0,0 +1,623 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *background-work*, type background-work
(define *background-work* (new 'global 'background-work))
;; definition for symbol background-vu0-block, type vu-function
(define background-vu0-block (new 'static 'vu-function :length 59 :qlength 30))
;; definition for function background-upload-vu0
;; WARN: Return type mismatch int vs none.
(defun background-upload-vu0 ()
"Upload VU0 functions for background. (believed unused?)"
(upload-vu0-program background-vu0-block (&-> *background-work* wait-to-vu0))
0
(none)
)
;; definition for function init-background
;; WARN: Return type mismatch int vs none.
(defun init-background ()
"Reset lists of trees to draw for background rendering."
(dotimes (v1-0 8)
(set! (-> *background-work* tfrag-trees v1-0) #f)
(set! (-> *background-work* tfrag-trans-trees v1-0) #f)
(set! (-> *background-work* tfrag-water-trees v1-0) #f)
)
(set! (-> *background-work* tfrag-tree-count) 0)
(set! (-> *background-work* tfrag-trans-tree-count) 0)
(set! (-> *background-work* tfrag-water-tree-count) 0)
(set! (-> *background-work* shrub-tree-count) 0)
(set! (-> *background-work* tie-tree-count) 0)
(set! (-> *background-work* wait-to-vu0) (the-as uint 0))
0
(none)
)
;; definition for function upload-vis-bits
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun upload-vis-bits ((arg0 level) (arg1 level) (arg2 bsp-header))
"Upload vis data to the scratchpad."
(let ((v1-2 (/ (+ (-> arg2 visible-list-length) 15) 16)))
(let ((a0-1 (-> arg0 vis-bits))
(a1-1 (the-as (pointer uinteger) (-> arg2 all-visible-list)))
(a2-2 (the-as (pointer uint128) (+ #x3800 #x70000000)))
)
(b! (not *artist-flip-visible*) cfg-5 :delay (nop!))
(nop!)
(nop!)
(label cfg-2)
(let ((a3-2 (-> (the-as (pointer uint128) a0-1))))
(&+! a0-1 16)
(let ((t0-0 (-> (the-as (pointer uint128) a1-1) 0)))
(set! a1-1 (&-> (the-as (pointer uint8) a1-1) 16))
(nop!)
(nop!)
(let ((a3-3 (logxor a3-2 (the-as uint t0-0))))
(+! v1-2 -1)
(set! (-> a2-2 0) a3-3)
)
)
)
(set! a2-2 (&-> a2-2 1))
(b! (> v1-2 0) cfg-2 :delay (nop!))
0
(b! #t cfg-8 :delay (nop!))
(nop!)
(label cfg-5)
(nop!)
(nop!)
(label cfg-6)
(let ((a1-2 (-> (the-as (pointer uint128) a0-1))))
(&+! a0-1 16)
(nop!)
(+! v1-2 -1)
(set! (-> a2-2 0) a1-2)
)
(set! a2-2 (&-> a2-2 1))
)
(b! (> v1-2 0) cfg-6 :delay (nop!))
)
0
(label cfg-8)
(none)
)
;; definition for function set-background-regs!
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function set-tie-quard-planes!
;; INFO: Used lq/sq
;; WARN: Return type mismatch plane vs none.
(defun set-tie-quard-planes! ((arg0 level))
"Set up TIE work guard planes."
(cond
((logtest? (-> arg0 info level-flags) (level-flags use-camera-other))
(set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad))
(set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad))
(set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad))
(set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad))
)
(else
(set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad))
(set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad))
(set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad))
(set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad))
)
)
(none)
)
;; definition for function set-shrub-quard-planes!
;; INFO: Used lq/sq
;; WARN: Return type mismatch plane vs none.
(defun set-shrub-quard-planes! ((arg0 level))
"Set shrub work guard planes."
(cond
((logtest? (-> arg0 info level-flags) (level-flags use-camera-other))
(set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad))
(set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad))
(set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad))
(set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad))
)
(else
(set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad))
(set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad))
(set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad))
(set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad))
)
)
(none)
)
;; definition for function set-subdivide-settings!
(defun set-subdivide-settings! ((arg0 level))
"Set subdivide settings from the level."
(if *artist-use-menu-subdiv*
(update-subdivide-settings! *subdivide-settings* *math-camera* 11)
(update-subdivide-settings! *subdivide-settings* *math-camera* (-> arg0 index))
)
(none)
)
;; definition for function finish-background
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
;; WARN: Function finish-background has a return type of none, but the expression builder found a return statement.
(defun finish-background ()
"Run all renderers for background data added."
(if (get-menu-mode *blit-displays-work*)
(return #f)
)
(when (not (paused?))
(flush-cache 0)
(dotimes (gp-0 (-> *level* length))
(let ((v1-8 (-> *level* level gp-0)))
(when (= (-> v1-8 status) 'active)
(-> v1-8 bsp wind-array)
(if (nonzero? (-> v1-8 bsp wind-array-length))
(level-update-wind *wind-work*)
)
)
)
)
)
(background-upload-vu0)
(dotimes (v1-14 (-> *level* length))
(let ((a0-12 (-> *level* level v1-14)))
(when (= (-> a0-12 status) 'active)
(let ((a0-13 (-> a0-12 bsp)))
(when (nonzero? (-> a0-13 tfrag-masks))
(dotimes (a1-7 (-> a0-13 tfrag-masks length))
(set! (-> a0-13 tfrag-closest a1-7) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 shrub-masks))
(dotimes (a1-12 (-> a0-13 shrub-masks length))
(set! (-> a0-13 shrub-closest a1-12) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 alpha-masks))
(dotimes (a1-17 (-> a0-13 alpha-masks length))
(set! (-> a0-13 alpha-closest a1-17) 4095996000.0)
)
)
(when (nonzero? (-> a0-13 water-masks))
(dotimes (a1-22 (-> a0-13 water-masks length))
(set! (-> a0-13 water-closest a1-22) 4095996000.0)
)
)
)
)
)
)
(when (nonzero? (-> *background-work* shrub-tree-count))
(when *debug-segment*
(let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))
(v1-27 'shrubbery)
(s5-0 *profile-shrubbery-color*)
)
(when (and *dproc* *debug-segment*)
(let ((s4-0 (-> gp-1 data (-> gp-1 count))))
(let ((s3-0 (-> gp-1 base-time)))
(set! (-> s4-0 name) v1-27)
(set! (-> s4-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0))))
)
(set! (-> s4-0 depth) (the-as uint (-> gp-1 depth)))
(set! (-> s4-0 color) s5-0)
(set! (-> gp-1 segment (-> gp-1 depth)) s4-0)
)
(set! (-> gp-1 count) (min 1023 (+ (-> gp-1 count) 1)))
(+! (-> gp-1 depth) 1)
(set! (-> gp-1 max-depth) (max (-> gp-1 max-depth) (-> gp-1 depth)))
)
)
0
)
(dotimes (gp-2 (-> *background-work* shrub-tree-count))
(set! *draw-index* (-> *background-work* shrub-levels gp-2 draw-index))
(flush-cache 0)
(let ((s5-1 (-> *background-work* shrub-trees gp-2))
(s4-1 (-> *background-work* shrub-levels gp-2))
)
(if (nonzero? (-> s5-1 colors-added))
(time-of-day-interp-colors
(-> *instance-shrub-work* colors)
(the-as uint (-> s5-1 colors-added))
(-> s4-1 mood-context)
)
)
(set-background-regs! s4-1)
(set-shrub-quard-planes! s4-1)
(draw-drawable-tree-instance-shrub s5-1 s4-1)
)
)
(when *debug-segment*
(let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
(when (and *dproc* *debug-segment*)
(let* ((v1-68 (+ (-> gp-3 depth) -1))
(s5-2 (-> gp-3 segment v1-68))
(s4-2 (-> gp-3 base-time))
)
(when (>= v1-68 0)
(set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2))))
(+! (-> gp-3 depth) -1)
)
)
)
)
0
)
)
(let ((gp-4 (the-as level #f)))
(when (or (nonzero? (-> *background-work* tfrag-tree-count))
(nonzero? (-> *background-work* tfrag-trans-tree-count))
(nonzero? (-> *background-work* tfrag-water-tree-count))
)
(let ((s5-5 (max
(max (-> *background-work* tfrag-tree-count) (-> *background-work* tfrag-trans-tree-count))
(-> *background-work* tfrag-water-tree-count)
)
)
(s4-3 (the-as time-of-day-palette #f))
)
(when *debug-segment*
(let ((s3-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))
(v1-94 'tfrag)
(s2-0 *profile-tfrag-color*)
)
(when (and *dproc* *debug-segment*)
(let ((s1-0 (-> s3-1 data (-> s3-1 count))))
(let ((s0-0 (-> s3-1 base-time)))
(set! (-> s1-0 name) v1-94)
(set! (-> s1-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s0-0))))
)
(set! (-> s1-0 depth) (the-as uint (-> s3-1 depth)))
(set! (-> s1-0 color) s2-0)
(set! (-> s3-1 segment (-> s3-1 depth)) s1-0)
)
(set! (-> s3-1 count) (min 1023 (+ (-> s3-1 count) 1)))
(+! (-> s3-1 depth) 1)
(set! (-> s3-1 max-depth) (max (-> s3-1 max-depth) (-> s3-1 depth)))
)
)
0
)
(dotimes (s3-2 s5-5)
(let ((s2-1 (-> *background-work* tfrag-trees s3-2)))
(when s2-1
(let ((s1-1 (-> *background-work* tfrag-levels s3-2)))
(let ((a2-23 (-> s1-1 bsp))
(s0-1 (-> s2-1 time-of-day-pal))
)
(upload-vis-bits s1-1 gp-4 a2-23)
(set-subdivide-settings! s1-1)
(when (not (or (zero? s0-1) (= s4-3 s0-1)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-1 (-> s1-1 mood-context))
(set! s4-3 s0-1)
)
)
(set! *draw-index* (-> s1-1 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-1)
)
(draw-drawable-tree-tfrag s2-1)
(set! (-> *level* draw-level *draw-index* closest-object 0) (-> *tfrag-work* min-dist z))
)
)
(let ((s2-2 (-> *background-work* tfrag-trans-trees s3-2)))
(when s2-2
(let ((s1-2 (-> *background-work* tfrag-trans-levels s3-2)))
(let ((a2-25 (-> s1-2 bsp))
(s0-2 (-> s2-2 time-of-day-pal))
)
(upload-vis-bits s1-2 gp-4 a2-25)
(set-subdivide-settings! s1-2)
(when (not (or (zero? s0-2) (= s4-3 s0-2)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-2 (-> s1-2 mood-context))
(set! s4-3 s0-2)
)
)
(set! *draw-index* (-> s1-2 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-2)
)
(draw-drawable-tree-tfrag-trans s2-2)
(set! (-> *level* draw-level *draw-index* closest-object 3) (-> *tfrag-work* min-dist z))
)
)
(let ((s2-3 (-> *background-work* tfrag-water-trees s3-2)))
(when s2-3
(let ((s1-3 (-> *background-work* tfrag-water-levels s3-2)))
(let ((a2-27 (-> s1-3 bsp))
(s0-3 (-> s2-3 time-of-day-pal))
)
(upload-vis-bits s1-3 gp-4 a2-27)
(set-subdivide-settings! s1-3)
(when (not (or (zero? s0-3) (= s4-3 s0-3)))
(flush-cache 0)
(time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-3 (-> s1-3 mood-context))
(set! s4-3 s0-3)
)
)
(set! *draw-index* (-> s1-3 draw-index))
(set! (-> *tfrag-work* min-dist z) 4095996000.0)
(set-background-regs! s1-3)
)
(draw-drawable-tree-tfrag-water s2-3)
(set! (-> *level* draw-level *draw-index* closest-object 4) (-> *tfrag-work* min-dist z))
)
)
)
)
(when *debug-segment*
(let ((s5-6 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
(when (and *dproc* *debug-segment*)
(let* ((v1-174 (+ (-> s5-6 depth) -1))
(s4-4 (-> s5-6 segment v1-174))
(s3-3 (-> s5-6 base-time))
)
(when (>= v1-174 0)
(set! (-> s4-4 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-3))))
(+! (-> s5-6 depth) -1)
)
)
)
)
0
)
)
(when (nonzero? (-> *background-work* tie-tree-count))
(set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad))
(when *debug-segment*
(let ((s5-7 (-> *display* frames (-> *display* on-screen) profile-array data 0))
(v1-192 'tie)
(s4-5 *profile-tie-color*)
)
(when (and *dproc* *debug-segment*)
(let ((s3-4 (-> s5-7 data (-> s5-7 count))))
(let ((s2-4 (-> s5-7 base-time)))
(set! (-> s3-4 name) v1-192)
(set! (-> s3-4 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-4))))
)
(set! (-> s3-4 depth) (the-as uint (-> s5-7 depth)))
(set! (-> s3-4 color) s4-5)
(set! (-> s5-7 segment (-> s5-7 depth)) s3-4)
)
(set! (-> s5-7 count) (min 1023 (+ (-> s5-7 count) 1)))
(+! (-> s5-7 depth) 1)
(set! (-> s5-7 max-depth) (max (-> s5-7 max-depth) (-> s5-7 depth)))
)
)
0
)
(dotimes (s5-8 (-> *background-work* tie-tree-count))
(let ((s4-6 (-> *background-work* tie-levels s5-8)))
(let ((a2-29 (-> s4-6 bsp)))
(when (!= s4-6 gp-4)
(set! (-> *instance-tie-work* min-dist x) 4095996000.0)
(upload-vis-bits s4-6 gp-4 a2-29)
(set-subdivide-settings! s4-6)
(set! gp-4 s4-6)
)
)
(set! *draw-index* (-> s4-6 draw-index))
(set! (-> *prototype-tie-work* mood) (-> s4-6 mood-context))
(set-background-regs! s4-6)
(set-tie-quard-planes! s4-6)
(tie-scissor-make-perspective-matrix
(-> *instance-tie-work* tie-scissor-perspective-matrix)
(if (logtest? (-> s4-6 info level-flags) (level-flags use-camera-other))
(-> *math-camera* camera-temp-other)
(-> *math-camera* camera-temp)
)
)
(draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-8) s4-6)
)
(set! (-> *background-work* tie-generic s5-8) (the-as basic (-> *prototype-tie-work* generic-next)))
(set! (-> *background-work* tie-generic-trans s5-8)
(the-as basic (-> *prototype-tie-work* generic-trans-next))
)
)
(when *debug-segment*
(let ((gp-5 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
(when (and *dproc* *debug-segment*)
(let* ((v1-240 (+ (-> gp-5 depth) -1))
(s5-9 (-> gp-5 segment v1-240))
(s4-7 (-> gp-5 base-time))
)
(when (>= v1-240 0)
(set! (-> s5-9 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-7))))
(+! (-> gp-5 depth) -1)
)
)
)
)
0
)
)
)
(let ((a0-116 (-> *display* frames (-> *display* on-screen) global-buf)))
(when (< (-> a0-116 real-buffer-end) (the-as int (-> a0-116 base)))
(break!)
0
)
)
(dotimes (gp-6 (-> *level* draw-level-count))
(let ((s5-10 (-> *level* draw-level gp-6)))
(when (and s5-10 (= (-> s5-10 status) 'active))
(when (and (nonzero? (-> s5-10 bsp hfrag-drawable)) (= (-> s5-10 display?) 'display))
(when *debug-segment*
(let ((s4-8 (-> *display* frames (-> *display* on-screen) profile-array data 0))
(v1-271 'hfrag)
(s3-5 *profile-hfrag-color*)
)
(when (and *dproc* *debug-segment*)
(let ((s2-5 (-> s4-8 data (-> s4-8 count))))
(let ((s1-4 (-> s4-8 base-time)))
(set! (-> s2-5 name) v1-271)
(set! (-> s2-5 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-4))))
)
(set! (-> s2-5 depth) (the-as uint (-> s4-8 depth)))
(set! (-> s2-5 color) s3-5)
(set! (-> s4-8 segment (-> s4-8 depth)) s2-5)
)
(set! (-> s4-8 count) (min 1023 (+ (-> s4-8 count) 1)))
(+! (-> s4-8 depth) 1)
(set! (-> s4-8 max-depth) (max (-> s4-8 max-depth) (-> s4-8 depth)))
)
)
0
)
(set! *draw-index* (-> s5-10 draw-index))
(let ((s4-9 (-> *display* frames (-> *display* on-screen) global-buf base)))
(draw (-> s5-10 bsp hfrag-drawable))
(let ((v1-293 *dma-mem-usage*))
(when (nonzero? v1-293)
(set! (-> v1-293 length) (max 44 (-> v1-293 length)))
(set! (-> v1-293 data 43 name) "hfragment")
(+! (-> v1-293 data 43 count) 1)
(+! (-> v1-293 data 43 used)
(&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-9))
)
(set! (-> v1-293 data 43 total) (-> v1-293 data 43 used))
)
)
)
(when *debug-segment*
(let ((s5-11 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
(when (and *dproc* *debug-segment*)
(let* ((v1-305 (+ (-> s5-11 depth) -1))
(s4-10 (-> s5-11 segment v1-305))
(s3-6 (-> s5-11 base-time))
)
(when (>= v1-305 0)
(set! (-> s4-10 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-6))))
(+! (-> s5-11 depth) -1)
)
)
)
)
0
)
)
)
)
)
(let ((a0-139 (-> *display* frames (-> *display* on-screen) global-buf)))
(when (< (-> a0-139 real-buffer-end) (the-as int (-> a0-139 base)))
(break!)
0
)
)
(dotimes (v1-323 (-> *level* length))
(let ((a1-55 (-> *level* level v1-323)))
(when (= (-> a1-55 status) 'active)
(let ((a0-145 (-> a1-55 bsp)))
(when (nonzero? (-> a0-145 tfrag-masks))
(let ((a2-43 (-> a1-55 texture-mask)))
(dotimes (a3-5 (-> a0-145 tfrag-masks length))
(let ((f0-12 (* (-> a0-145 tfrag-closest a3-5) (-> *math-camera* fov-correction-factor))))
(when (!= f0-12 4095996000.0)
(let ((t0-8 (-> a0-145 tfrag-masks data a3-5)))
(dotimes (t1-2 3)
(when (or (= t1-2 2) (>= f0-12 (-> t0-8 data t1-2 dist)))
(dotimes (t2-5 3)
(logior!
(-> (&-> a2-43 0 mask data t2-5) 0)
(-> (the-as (pointer int32) (+ (* t2-5 4) (the-as int t0-8) (* t1-2 16))) 0)
)
)
(goto cfg-176)
)
)
)
)
)
(label cfg-176)
)
)
)
(when (nonzero? (-> a0-145 shrub-masks))
(let ((a2-48 (-> a1-55 texture-mask 2)))
(dotimes (a3-6 (-> a0-145 shrub-masks length))
(let ((f0-14 (* (-> a0-145 shrub-closest a3-6) (-> *math-camera* fov-correction-factor))))
(when (!= f0-14 4095996000.0)
(let ((t0-24 (-> a0-145 shrub-masks data a3-6)))
(dotimes (t1-5 3)
(when (or (= t1-5 2) (>= f0-14 (-> t0-24 data t1-5 dist)))
(dotimes (t2-11 3)
(logior!
(-> a2-48 mask data t2-11)
(-> (the-as (pointer int32) (+ (* t2-11 4) (the-as int t0-24) (* t1-5 16))) 0)
)
)
(goto cfg-196)
)
)
)
)
)
(label cfg-196)
)
)
)
(when (nonzero? (-> a0-145 alpha-masks))
(let ((a2-53 (-> a1-55 texture-mask 3)))
(dotimes (a3-7 (-> a0-145 alpha-masks length))
(let ((f0-16 (* (-> a0-145 alpha-closest a3-7) (-> *math-camera* fov-correction-factor))))
(when (!= f0-16 4095996000.0)
(let ((t0-40 (-> a0-145 alpha-masks data a3-7)))
(dotimes (t1-8 3)
(when (or (= t1-8 2) (>= f0-16 (-> t0-40 data t1-8 dist)))
(dotimes (t2-17 3)
(logior!
(-> a2-53 mask data t2-17)
(-> (the-as (pointer int32) (+ (* t2-17 4) (the-as int t0-40) (* t1-8 16))) 0)
)
)
(goto cfg-216)
)
)
)
)
)
(label cfg-216)
)
)
)
(when (nonzero? (-> a0-145 water-masks))
(let ((a1-56 (-> a1-55 texture-mask 4)))
(dotimes (a2-58 (-> a0-145 water-masks length))
(let ((f0-18 (* (-> a0-145 water-closest a2-58) (-> *math-camera* fov-correction-factor))))
(when (!= f0-18 4095996000.0)
(let ((a3-16 (-> a0-145 water-masks data a2-58)))
(dotimes (t0-50 3)
(when (or (= t0-50 2) (>= f0-18 (-> a3-16 data t0-50 dist)))
(dotimes (t1-14 3)
(logior!
(-> a1-56 mask data t1-14)
(-> (the-as (pointer int32) (+ (* t1-14 4) (the-as int a3-16) (* t0-50 16))) 0)
)
)
(goto cfg-236)
)
)
)
)
)
(label cfg-236)
)
)
)
)
)
)
)
0
(none)
)
+5 -8
View File
@@ -53,11 +53,12 @@
(deftype prototype-bucket-shrub (prototype-bucket)
((next uint32 4)
(count uint16 4)
(mod-count uint16 4)
(count-quad uint128 :overlay-at (-> count 0))
(mod-count uint16 4 :offset 88)
(last dma-packet 4)
(next-clear uint128 :overlay-at (-> next 0))
(count-clear uint64 :overlay-at (-> count 0))
(last-clear uint128 :overlay-at (-> last 0))
(next-clear uint128 :overlay-at (-> next 0))
(count-clear uint64 :overlay-at (-> count 0))
(last-clear uint128 :overlay-at (-> last 0))
)
)
@@ -408,7 +409,3 @@
;; failed to figure out what this is:
0
+14 -13
View File
@@ -52,18 +52,19 @@
;; definition of type font-context
(deftype font-context (basic)
((origin vector :inline)
(strip-gif vector :inline)
(width float)
(height float)
(projection float)
(scale float)
(color font-color)
(flags font-flags)
(mat matrix)
(start-line uint32)
(alpha float)
(max-x float)
((origin vector :inline)
(strip-gif vector :inline)
(width float)
(height float)
(projection float)
(scale float)
(color font-color)
(color-signed int32 :overlay-at color)
(flags font-flags)
(mat matrix)
(start-line uint32)
(alpha float)
(max-x float)
)
(:methods
(new (symbol type matrix int int float font-color font-flags) _type_)
@@ -284,7 +285,7 @@
(reg-save uint32 5)
)
(:methods
(set-context! (_type_ object) none)
(set-context! (_type_ font-context) none)
)
)
+80
View File
@@ -0,0 +1,80 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type font-work
;; INFO: function output is handled by mips2c
(defmethod-mips2c "(method 9 font-work)" 9 font-work)
;; definition for function draw-string-asm
;; INFO: function output is handled by mips2c
(def-mips2c draw-string-asm (function string dma-buffer font-context draw-string-result))
;; definition for function draw-string
;; INFO: Used lq/sq
;; WARN: Return type mismatch uint vs draw-string-result.
;; ERROR: Failed load: (set! a2-4 (l.wu (+ a2-3 2224))) at op 19
(defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context))
(local-vars (v0-2 uint))
(let ((v1-1 (the int (* 128.0 (-> arg2 alpha)))))
(-> arg2 origin quad)
(dotimes (a0-2 45)
(dotimes (a1-1 4)
(let ((a2-6
(logior (logand (l.wu (+ (+ (* a1-1 4) (* a0-2 16)) (the-as int *font-work*) 2224)) (the-as uint #xffffffff00ffffff))
(shr (shl v1-1 56) 32)
)
)
(a3-7 (+ (+ (* a1-1 4) (* a0-2 16)) (the-as int *font-work*)))
)
(s.w! (+ a3-7 2224) a2-6)
)
)
)
(set! (-> *font-work* color-shadow w) v1-1)
)
(if (< (the-as uint (dma-buffer-free arg1)) (the-as uint (* (length arg0) 32)))
(set! v0-2 (the-as uint (-> arg2 origin quad)))
(set! v0-2 (the-as uint (draw-string-asm arg0 arg1 arg2)))
)
(dotimes (v1-7 45)
(dotimes (a0-9 4)
(let ((a1-10
(logior (logand (l.wu (+ (+ (* a0-9 4) (* v1-7 16)) (the-as int *font-work*) 2224)) (the-as uint #xffffffff00ffffff))
(shl #x8000 16)
)
)
(a2-15 (+ (+ (* a0-9 4) (* v1-7 16)) (the-as int *font-work*)))
)
(s.w! (+ a2-15 2224) a1-10)
)
)
)
(set! (-> *font-work* color-shadow w) 128)
(the-as draw-string-result v0-2)
)
;; definition for function get-string-length
;; INFO: function output is handled by mips2c
(def-mips2c get-string-length (function string font-context draw-string-result))
;; definition for function draw-string-xy
(defun draw-string-xy ((arg0 string) (arg1 dma-buffer) (arg2 int) (arg3 int) (arg4 font-color) (arg5 font-flags))
(let ((s4-0 (new 'stack 'font-context *font-default-matrix* arg2 arg3 0.0 arg4 arg5)))
(set-context! *font-work* s4-0)
(draw-string arg0 arg1 s4-0)
)
)
;; definition for function draw-string-adv
;; WARN: Return type mismatch float vs none.
(defun draw-string-adv ((arg0 string) (arg1 dma-buffer) (arg2 font-context))
(set-context! *font-work* arg2)
(let ((v1-2 (draw-string arg0 arg1 arg2)))
(+! (-> arg2 origin x) (-> v1-2 length))
)
(none)
)
+394
View File
@@ -0,0 +1,394 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *target-lock*, type object
(define *target-lock* (the-as object 0))
;; definition for symbol *generic-consts*, type generic-consts
(define *generic-consts*
(new 'static 'generic-consts
:dma-header (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
)
:vif-header (new 'static 'array uint32 4 #x1000404 #x1000404 #x1000404 #x6c000000)
:dma-ref-vtxs (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
:dma-cnt-call (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id cnt)))
:matrix (new 'static 'matrix
:rvec (new 'static 'vector :x 1.0)
:uvec (new 'static 'vector :y 1.0)
:fvec (new 'static 'vector :z 1.0)
:trans (new 'static 'vector :w 1.0)
)
:base-strgif (new 'static 'generic-gif-tag
:fan-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
:nreg #x3
)
:str-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1)
:nreg #x3
)
:regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
:alpha-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1))
:alpha-translucent (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1) :x #x44)
:ztest-normal (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5026b)
:ztest-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5000a)
:adcmd-offsets (new 'static 'array uint8 16 #x0 #x20 #x20 #x20 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30)
:stcycle-tag #x1000103
:unpack-vtx-tag #x68000000
:unpack-clr-tag #x6e004000
:unpack-tex-tag #x65000000
:mscal-tag #x14000006
:reset-cycle-tag #x1000404
:dma-tag-cnt #x10000000
:envmap (new 'static 'generic-envmap-consts
:consts (new 'static 'vector :x 1.0 :z 0.5 :w 0.5)
:strgif (new 'static 'generic-gif-tag
:fan-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1)
:nreg #x3
)
:str-prim (new 'static 'gif-tag-prim
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1)
:nreg #x3
)
:regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
:colors (new 'static 'vector4w :x -2139062144 :y -2139062144 :z -2139062144 :w -2139062144)
)
:light-consts (new 'static 'vector :x 255.0 :y 8388608.0)
)
)
;; definition for function generic-work-init
;; INFO: Used lq/sq
;; WARN: Return type mismatch uint128 vs none.
(defun generic-work-init ((arg0 generic-bucket-state))
"Initialize the scratchpad work for generic."
(quad-copy!
(the-as pointer (-> (the-as generic-work #x70000000) fx-buf work))
(the-as pointer *generic-consts*)
27
)
(set! (-> (the-as generic-work #x70000000) saves gifbuf-adr) (-> arg0 gifbuf-adr))
(set! (-> (the-as generic-work #x70000000) saves inbuf-adr) (-> arg0 inbuf-adr))
(set! (-> (the-as generic-work #x70000000) saves cur-outbuf)
(the-as uint (-> (the-as generic-work #x70000000) fx-buf))
)
(let* ((v1-6 *default-envmap-shader*)
(a0-9 (-> (the-as generic-work #x70000000) fx-buf work consts envmap shader))
(a1-2 (-> v1-6 quad 0 quad))
(a2-1 (-> v1-6 quad 1 quad))
(a3-0 (-> v1-6 quad 2 quad))
(t0-0 (-> v1-6 quad 3 quad))
(v0-1 (-> v1-6 quad 4 quad))
)
(set! (-> a0-9 quad 0 quad) a1-2)
(set! (-> a0-9 quad 1 quad) a2-1)
(set! (-> a0-9 quad 2 quad) a3-0)
(set! (-> a0-9 quad 3 quad) t0-0)
(set! (-> a0-9 quad 4 quad) v0-1)
)
(none)
)
;; definition for function generic-upload-vu0
;; WARN: Return type mismatch int vs none.
;; ERROR: Failed store: (s.d! (+ a0-5 8) 0) at op 17
(defun generic-upload-vu0 ()
"Upload generic VU0 program."
(let ((gp-0 *vu0-dma-list*))
(let ((v1-0 gp-0))
(set! (-> v1-0 base) (-> v1-0 data))
(set! (-> v1-0 end) (the-as pointer (+ (+ (-> v1-0 allocated-length) 28) (the-as int v1-0))))
)
(dma-buffer-add-vu-function gp-0 generic-vu0-block 0)
(let* ((v1-1 gp-0)
(a0-5 (-> v1-1 base))
)
(set! (-> (the-as (pointer int64) a0-5)) #x70000000)
(s.d! (+ a0-5 8) 0)
(set! (-> v1-1 base) (&+ a0-5 16))
)
(.sync.l)
(dma-buffer-send-chain (the-as dma-bank-source #x10008000) gp-0)
)
0
(none)
)
;; definition for function upload-vu0-program
;; ERROR: failed type prop at 2: Could not figure out load: (set! a3 (l.wu (+ a0 8)))
;; ERROR: Unsupported inline assembly instruction kind - [pmaxw t5, t4, r0]
;; ERROR: Unsupported inline assembly instruction kind - [sll t6, t4, 17]
;; ERROR: Unsupported inline assembly instruction kind - [sll t5, t4, 1]
;; ERROR: Unsupported inline assembly instruction kind - [sll t4, t4, 4]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin t0, 0]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin t0, 1]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 0]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 1]
(defun upload-vu0-program ((a0-0 vu-function) (a1-0 pointer))
"Upload vu-function to VU0."
(local-vars
(v0-0 none)
(v1-0 dma-buffer)
(v1-1 none)
(a0-1 none)
(a0-2 none)
(a0-3 none)
(a0-4 none)
(a1-1 none)
(a2-0 int)
(a2-1 none)
(a2-2 none)
(a3-0 none)
(a3-1 none)
(a3-2 none)
(a3-3 none)
(t0-0 none)
(t0-1 none)
(t0-2 none)
(t0-3 none)
(t0-4 none)
(t1-0 none)
(t1-1 none)
(t1-2 none)
(t2-0 none)
(t3-0 none)
(t4-0 uint128)
(t4-1 none)
(t4-2 none)
(t5-0 uint128)
(t5-1 none)
(t5-2 none)
(t6-0 none)
(t6-1 none)
)
(set! v1-0 *vu0-dma-list*)
(set! a2-0 #x30000000)
(set! a3-0 (the-as none (l.wu (+ a0-0 8))))
(set! t0-0 (the-as none #x10000000))
(set! t1-0 (the-as none (l.wu (+ a0-0 4))))
(set! v1-1 (the-as none (-> v1-0 data)))
(set! t2-0 (the-as none (+ a0-0 16)))
(set! a0-1 (the-as none v1-1))
(set! t3-0 (the-as none #x4a000000))
(label cfg-1)
(set! t4-0 (the-as uint128 (+ a3-0 -127)))
(s.w! a0-1 a2-0)
(.pmaxw t5-0 t4-0 r0)
(s.w! (+ a0-1 4) t2-0)
(set! t4-1 (the-as none (- a3-0 t5-0)))
(s.w! (+ a0-1 8) t0-0)
(set! a3-0 (the-as none t5-0))
(s.b! a0-1 t4-1)
(.sll t6-0 t4-1 17)
(.sll t5-1 t4-1 1)
(set! t6-1 (the-as none (+ t6-0 t1-0)))
(set! t1-0 (the-as none (+ t1-0 t5-1)))
(set! t5-2 (the-as none (+ t6-1 t3-0)))
(.sll t4-2 t4-1 4)
(s.w! (+ a0-1 12) t5-2)
(set! t2-0 (the-as none (+ t2-0 t4-2)))
((b! (nonzero? a3-0) L101 (set! a0-1 (+ a0-1 16))) (set! a0-1 (the-as none (+ a0-1 16))))
(set! a2-1 (the-as none #x70000000))
(set! a3-1 (the-as none #x10000000))
(s.d! a0-1 a2-1)
(set! a2-2 (the-as none (logior a3-1 #x8000)))
(s.d! (+ a0-1 8) 0)
(set! a3-2 (the-as none (l.w a2-2)))
(set! t0-1 (the-as none v1-1))
(.sync.l)
(.cache dxwbin t0-1 0)
(.sync.l)
(.cache dxwbin t0-1 1)
(.sync.l)
(set! t0-2 (the-as none 0))
(.sync.l)
(.cache dxwbin a0-1 0)
(.sync.l)
(.cache dxwbin a0-1 1)
(.sync.l)
(set! a0-2 (the-as none 0))
(set! a0-3 (the-as none (logand a3-2 256)))
((b! (zero? a0-3) L103 (set! a0-4 325)) (set! a0-4 (the-as none 325)))
(set! a3-3 (the-as none a2-2))
(nop!)
(label cfg-4)
(set! t0-3 (the-as none (l.w a1-0)))
(nop!)
(set! t1-1 (the-as none (l.w a3-3)))
(nop!)
(set! t1-2 (the-as none (logand t1-1 256)))
(set! t0-4 (the-as none (+ t0-3 1)))
((b! (nonzero? t1-2) L102 (s.w! a1-0 t0-4)) (s.w! a1-0 t0-4))
(set! a1-1 (the-as none 0))
(label cfg-6)
(.sync.l)
(s.w! (+ a2-2 32) 0)
(s.w! (+ a2-2 48) v1-1)
(.sync.l)
(s.w! a2-2 a0-4)
(.sync.l)
(set! v0-0 (the-as none 0))
(ret-none)
)
;; definition for function generic-initialize-without-sync
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun generic-initialize-without-sync ((arg0 matrix) (arg1 vu-lights))
"Init generic, version for generic-merc, which relies on generic-merc init running after."
(upload-vu0-program generic-vu0-block (the-as pointer #x70000054))
(let ((a2-0 (-> (the-as generic-work #x70000000) fx-buf work consts matrix))
(v1-1 (-> arg0 rvec quad))
(a0-3 (-> arg0 uvec quad))
(a1-2 (-> arg0 fvec quad))
(a3-0 (-> arg0 trans quad))
)
(set! (-> a2-0 rvec quad) v1-1)
(set! (-> a2-0 uvec quad) a0-3)
(set! (-> a2-0 fvec quad) a1-2)
(set! (-> a2-0 trans quad) a3-0)
)
(if arg1
(quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg1) 7)
)
0
(none)
)
;; definition for function generic-initialize
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun generic-initialize ((arg0 generic-bucket-state) (arg1 matrix) (arg2 vu-lights))
"Normal init for generic - sets up scratchpad and VU0."
(generic-work-init arg0)
(generic-upload-vu0)
(let ((a2-1 (-> (the-as generic-work #x70000000) fx-buf work consts matrix))
(v1-1 (-> arg1 rvec quad))
(a0-2 (-> arg1 uvec quad))
(a1-1 (-> arg1 fvec quad))
(a3-0 (-> arg1 trans quad))
)
(set! (-> a2-1 rvec quad) v1-1)
(set! (-> a2-1 uvec quad) a0-2)
(set! (-> a2-1 fvec quad) a1-1)
(set! (-> a2-1 trans quad) a3-0)
)
(if arg2
(quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg2) 7)
)
0
(none)
)
;; definition for function generic-wrapup
;; WARN: Return type mismatch uint vs none.
(defun generic-wrapup ((arg0 generic-bucket-state))
(set! (-> arg0 gifbuf-adr) (-> (the-as generic-work #x70000000) saves gifbuf-adr))
(set! (-> arg0 inbuf-adr) (-> (the-as generic-work #x70000000) saves inbuf-adr))
(none)
)
;; definition for function generic-dma-from-spr
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-light-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-light-proc function)
;; definition for function generic-envmap-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-envmap-proc function)
;; definition for function generic-prepare-dma-double
;; INFO: function output is handled by mips2c
(def-mips2c generic-prepare-dma-double function)
;; definition for function generic-prepare-dma-single
;; INFO: function output is handled by mips2c
(def-mips2c generic-prepare-dma-single function)
;; definition for function generic-envmap-dproc
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-interp-dproc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-no-light-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-no-light-proc function)
;; definition for function generic-no-light-dproc-only
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-no-light-dproc
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-no-light+envmap
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-no-light
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-envmap-only-proc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-light
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function generic-copy-vtx-dclr-dtex
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-none
;; ERROR: function has no type analysis. Cannot decompile.
;; definition for function generic-none-dma-wait
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for symbol *warp-data*, type object
(define *warp-data* (the-as object (malloc 'global 1024)))
;; definition for function generic-warp-source-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-source-proc (function none))
;; definition for function generic-warp-source
;; ERROR: Unsupported inline assembly instruction kind - [lui at, 28672]
(defun generic-warp-source ((arg0 gsf-buffer))
(local-vars (at-0 object))
(.lui at-0 28672)
(set! (-> (the-as generic-work at-0) saves gsf-buf) arg0)
(generic-warp-source-proc)
(none)
)
;; definition for function generic-warp-dest-proc
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-dest-proc function)
;; definition for function generic-warp-dest
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-dest function)
;; definition for function generic-warp-envmap-dest
;; INFO: function output is handled by mips2c
(def-mips2c generic-warp-envmap-dest function)
;; definition for function generic-debug-light-proc
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition (debug) for function generic-post-debug
;; ERROR: function has no type analysis. Cannot decompile.
+2 -6
View File
@@ -372,8 +372,8 @@ the same position/normal."
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-gif-tag)
(format #t "~1Tdata[4] @ #x~X~%" (-> this data))
(format #t "~1Tqword: #<qword @ #x~X>~%" (-> this data))
(format #t "~1Tdata[4] @ #x~X~%" (&-> this fan-prim))
(format #t "~1Tqword: #<qword @ #x~X>~%" (&-> this fan-prim))
(format #t "~1Tfan-prim: ~D~%" (-> this fan-prim))
(format #t "~1Tstr-prim: ~D~%" (-> this str-prim))
(format #t "~1Tregs: ~D~%" (-> this regs))
@@ -495,7 +495,3 @@ the same position/normal."
;; failed to figure out what this is:
(kmemclose)
+10 -4
View File
@@ -44,10 +44,16 @@
;; definition for function generic-setup-shrub-constants
;; WARN: Return type mismatch int vs none.
(defun generic-setup-shrub-constants ((arg0 generic-shrub-constants) (arg1 int) (arg2 int) (arg3 int))
(set! (-> arg0 shrub-giftag qword vector4w x) (logior #x30004000 (shr (shl arg3 53) 38)))
(set! (-> arg0 shrub-giftag qword vector4w y) (logior #x30004000 (shr (shl arg2 53) 38)))
(set! (-> arg0 shrub-giftag qword vector4w z) 1042)
(set! (-> arg0 shrub-giftag qword vector4w w) 0)
(set! (-> arg0 shrub-giftag fan-prim)
(new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg3))
)
(set! (-> arg0 shrub-giftag str-prim)
(new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg2))
)
(set! (-> arg0 shrub-giftag regs)
(new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
)
(set! (-> arg0 shrub-giftag num-strips) (the-as uint 0))
(set! (-> arg0 shrub-adnop dword 0) (the-as uint arg1))
(set! (-> arg0 shrub-adnop dword 1) (the-as uint 71))
(none)
+50 -50
View File
@@ -157,74 +157,74 @@
(set! (-> gp-0 pmode) (the-as uint 165))
(set! (-> gp-0 run-half-speed) #f)
(set! (-> gp-0 vu1-enable-user-menu) (vu1-renderer-mask
sky
ocean
ocean-wave
tfrag
tie
tie-envmap
tie-scissor
tie-envmap-scissor
tie-vanish
shrubbery
shrub-near
rn3
rn4
rn5
rn6
rn7
rn8
rn9
rn10
rn11
rn12
rn13
generic
merc
emerc
shrubbery
shrub-near
billboard
shrubbery-vanish
tfrag-trans
tie-scissor-trans
tie-trans
tie-envmap-trans
tie-envmap-scissor-trans
tfrag-water
tie-scissor-water
tie-water
tie-envmap-water
tie-envmap-scissor-water
sprite
shadow
shrub-vanish
rn21
rn22
rn23
rn24
rn25
rn26
rn27
rn28
rn29
rn30
rn31
rn32
rn33
depth-cue
rn34
rn36
)
)
(set! (-> gp-0 vu1-enable-user) (vu1-renderer-mask
sky
ocean
ocean-wave
tfrag
tie
tie-envmap
tie-scissor
tie-envmap-scissor
tie-vanish
shrubbery
shrub-near
rn3
rn4
rn5
rn6
rn7
rn8
rn9
rn10
rn11
rn12
rn13
generic
merc
emerc
shrubbery
shrub-near
billboard
shrubbery-vanish
tfrag-trans
tie-scissor-trans
tie-trans
tie-envmap-trans
tie-envmap-scissor-trans
tfrag-water
tie-scissor-water
tie-water
tie-envmap-water
tie-envmap-scissor-water
sprite
shadow
shrub-vanish
rn21
rn22
rn23
rn24
rn25
rn26
rn27
rn28
rn29
rn30
rn31
rn32
rn33
depth-cue
rn34
rn36
)
)
+323
View File
@@ -0,0 +1,323 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *instance-shrub-work*, type instance-shrub-work
(define *instance-shrub-work*
(new 'static 'instance-shrub-work
:matrix-tmpl (new 'static 'inline-array qword 20
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199))
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3))
)
:count-tmpl (new 'static 'inline-array vector4w 20
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 10)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 1)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 2)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 3)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 4)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 5)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 6)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 7)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 8)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 9)
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 10)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 1)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 2)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 3)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 4)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 5)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 6)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 7)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 8)
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 9)
)
:mscalf-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
)
:mscalf-ret-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ret))
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
)
:adgif-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next))
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
)
:billboard-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next))
:vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x303e400000008004 #x412)
)
:shrub-near-packets (new 'static 'inline-array shrub-near-packet 6
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x117))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x22e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x0))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x117))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x22e))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
(new 'static 'shrub-near-packet
:matrix-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
)
:header-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
)
:stq-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
)
:color-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
)
:vertex-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
)
:mscal-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
)
:init-tmpl (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
:vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32))
)
:init-data (new 'static 'inline-array qword 2
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x0))
(new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c))
)
)
)
:dma-ref (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
:dma-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end)))
:wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
:constants (new 'static 'vector :x 128.0 :y 1.0)
:color-constant (new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000)
:start-bank (new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)
)
)
;; failed to figure out what this is:
(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103)
;; failed to figure out what this is:
(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103)
;; failed to figure out what this is:
0
+1 -1
View File
@@ -278,7 +278,7 @@ This requires storing the data for all shrubs prototype twice!"
(vertex-tmpl dma-packet :inline)
(mscal-tmpl dma-packet :inline)
(init-tmpl dma-packet :inline)
(init-data qword 8)
(init-data qword 2 :inline)
)
)
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -37,8 +37,9 @@ This is used for precomputed visibility, based on the camera position. This is n
"The bsp-header is really an entire level.
This probably started as a very simple structure, but now it is extremely complicated."
((info file-info :overlay-at id)
(all-visible-list (pointer uint16) :offset 32)
(all-visible-list (pointer uint8) :offset 32)
(visible-list-length int16 :offset 36)
(extra-vis-list-length int16)
(drawable-trees drawable-tree-array :offset 40)
(pat pointer :offset 44)
(pat-length int32 :offset 48)
@@ -59,6 +60,8 @@ This probably started as a very simple structure, but now it is extremely compli
(actor-birth-order (pointer uint32) :offset 172)
(region-trees (array drawable-tree-region-prim) :offset 188)
(collide-hash collide-hash :offset 196)
(wind-array uint32 :offset 200)
(wind-array-length int32 :offset 204)
(vis-spheres vector-array :offset 216)
(vis-spheres-length uint32 :offset 248)
(tfrag-masks texture-masks-array :offset 256)
@@ -75,7 +78,7 @@ This probably started as a very simple structure, but now it is extremely compli
(water-mask-count uint32 :overlay-at water-closest)
(bsp-scale vector :inline :offset 288)
(bsp-offset vector :inline)
(unk-drawable drawable :offset 320)
(hfrag-drawable drawable :offset 320)
(end uint8 :offset 399)
)
(:methods
+6 -6
View File
@@ -101,8 +101,8 @@
(+! (-> usage data 65 used) v1-92)
(+! (-> usage data 65 total) (logand -16 (+ v1-92 15)))
)
(if (nonzero? (-> this unk-drawable))
(mem-usage (-> this unk-drawable) usage flags)
(if (nonzero? (-> this hfrag-drawable))
(mem-usage (-> this hfrag-drawable) usage flags)
)
(when (nonzero? (-> this region-trees))
(let* ((s3-0 (-> this region-trees length))
@@ -147,8 +147,8 @@
)
)
)
(if (nonzero? (-> this unk-drawable))
(login (-> this unk-drawable))
(if (nonzero? (-> this hfrag-drawable))
(login (-> this hfrag-drawable))
)
this
)
@@ -349,8 +349,8 @@
(if (nonzero? (-> this drawable-trees))
(collect-stats (-> this drawable-trees))
)
(if (nonzero? (-> this unk-drawable))
(collect-stats (-> this unk-drawable))
(if (nonzero? (-> this hfrag-drawable))
(collect-stats (-> this hfrag-drawable))
)
0
(none)
+2 -2
View File
@@ -17993,7 +17993,7 @@
:index #x110
:task-level #x9
:master-level 'factorya
:level-flags (level-flags lf10 lf12 lf13)
:level-flags (level-flags use-camera-other lf12 lf13)
:packages '()
:run-packages '("common")
:memory-mode (level-memory-mode borrow)
@@ -18023,7 +18023,7 @@
:index #x111
:task-level #x9
:master-level 'factorya
:level-flags (level-flags lf10 lf12 lf13)
:level-flags (level-flags use-camera-other lf12 lf13)
:packages '()
:run-packages '("common")
:memory-mode (level-memory-mode borrow)
+525
View File
@@ -0,0 +1,525 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function unpack-comp-rle
(defun unpack-comp-rle ((arg0 (pointer int8)) (arg1 (pointer int8)))
"Decompress data compressed with run-length encoding."
(local-vars (v1-2 int) (v1-3 uint))
(nop!)
(loop
(loop
(set! v1-2 (-> arg1 0))
(set! arg1 (&-> arg1 1))
(b! (<= v1-2 0) cfg-5 :delay (nop!))
(let ((a2-0 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(label cfg-3)
(nop!)
(nop!)
(nop!)
(nop!)
(set! (-> arg0 0) a2-0)
)
(set! arg0 (&-> arg0 1))
(b! (> v1-2 0) cfg-3 :delay (set! v1-2 (+ v1-2 -1)))
)
(label cfg-5)
(b! (zero? v1-2) cfg-8 :delay (set! v1-3 (the-as uint (- v1-2))))
(label cfg-6)
(let ((a2-1 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(nop!)
(nop!)
(set! (-> arg0 0) a2-1)
)
(+! v1-3 -1)
(b! (> (the-as int v1-3) 0) cfg-6 :delay (set! arg0 (&-> arg0 1)))
)
(label cfg-8)
arg1
)
;; definition of type huf-dictionary-node
(deftype huf-dictionary-node (structure)
((zero uint16)
(one uint16)
)
)
;; definition for method 3 of type huf-dictionary-node
(defmethod inspect ((this huf-dictionary-node))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'huf-dictionary-node)
(format #t "~1Tzero: ~D~%" (-> this zero))
(format #t "~1Tone: ~D~%" (-> this one))
(label cfg-4)
this
)
;; definition for function unpack-comp-huf
;; WARN: Return type mismatch int vs none.
(defun unpack-comp-huf ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 uint) (arg3 huf-dictionary-node))
"Decompress data compressed with huffman encoding."
(local-vars (t1-1 uint) (t3-2 (pointer uint16)))
(nop!)
(let ((t1-0 (-> arg3 zero))
(a2-1 (+ arg2 -1028))
(t2-0 (-> arg3 one))
)
(nop!)
(label cfg-1)
(let ((v1-4 128))
(nop!)
(let ((t0-0 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(label cfg-2)
(let ((t3-0 (logand t0-0 v1-4)))
(shift-arith-right-32 v1-4 v1-4 1)
(b! (zero? t3-0) cfg-4 :delay (set! t1-1 t1-0))
)
)
(nop!)
(set! t1-1 t2-0)
(label cfg-4)
(let ((t2-1 (+ t1-1 -256)))
(let ((t3-1 (* t1-1 4)))
(b! (< (the-as int t2-1) 0) cfg-8 :delay (set! t3-2 (the-as (pointer uint16) (+ t3-1 a2-1))))
)
(b! (zero? t2-1) cfg-10 :delay (set! t1-0 (-> t3-2 0)))
)
(b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> t3-2 1)))
(b! #t cfg-1 :delay (nop!))
(label cfg-8)
(set! (-> arg0 0) t1-1)
(set! arg0 (&-> arg0 1))
(nop!)
(set! t1-0 (-> arg3 zero))
(b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> arg3 one)))
)
)
(b! #t cfg-1 :delay (nop!))
(label cfg-10)
(nop!)
(nop!)
0
(none)
)
;; definition for function unpack-comp-lzo
;; WARN: Return type mismatch int vs none.
(defun unpack-comp-lzo ((arg0 (pointer uint8)) (arg1 (pointer uint8)))
"Decompress data compressed with LZO encoding."
0
(let ((v1-1 arg0))
(b! (>= (the-as uint 17) (-> arg1 0)) cfg-5 :delay #f)
(let ((a2-4 (the-as int (+ (-> arg1 0) -17))))
(set! arg1 (&-> arg1 1))
(b! (< a2-4 4) cfg-41)
(until (<= a2-4 0)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(+! a2-4 -1)
)
(b! #t cfg-15 :delay (nop!))
(label cfg-5)
(b! #t cfg-45 :delay (nop!))
(label cfg-6)
(let ((a2-6 (-> arg1 0)))
(set! arg1 (&-> arg1 1))
(b! (>= (the-as int a2-6) 16) cfg-18)
(b! (nonzero? a2-6) cfg-12 :delay (empty-form))
(while (zero? (-> arg1 0))
(+! a2-6 255)
(set! arg1 (&-> arg1 1))
)
(set! a2-6 (+ (-> arg1 0) 15 a2-6))
(set! arg1 (&-> arg1 1))
(label cfg-12)
(set! (-> arg0 0) (-> arg1 0))
(set! (-> arg0 1) (-> arg1 1))
(set! (-> arg0 2) (-> arg1 2))
(set! arg0 (&-> arg0 3))
(set! arg1 (&-> arg1 3))
(until (<= (the-as int a2-6) 0)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(+! a2-6 -1)
)
(label cfg-15)
(set! a2-6 (-> arg1 0))
(set! arg1 (&-> arg1 1))
(b! (>= (the-as int a2-6) 16) cfg-18)
(let ((a2-10 (&- (&- (&-> arg0 -2049) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4)))))
(set! arg1 (&-> arg1 1))
(set! (-> arg0 0) (-> a2-10 0))
(set! (-> arg0 1) (-> a2-10 1))
(set! (-> arg0 2) (-> a2-10 2))
(set! arg0 (&-> arg0 3))
(&-> a2-10 2)
)
(b! #t cfg-39 :delay (nop!))
(b! #t cfg-43 :delay (nop!))
(label cfg-18)
(b! (< (the-as int a2-6) 64) cfg-20)
(let ((a3-23
(&- (&- (&-> arg0 -1) (the-as uint (logand (/ (the-as int a2-6) 4) 7))) (the-as uint (* (-> arg1 0) 8)))
)
)
(set! arg1 (&-> arg1 1))
(let ((a2-13 (+ (/ (the-as int a2-6) 32) -1)))
(b! #t cfg-36 :delay (nop!))
(label cfg-20)
(b! (< (the-as int a2-6) 32) cfg-27)
(set! a2-13 (logand a2-6 31))
(b! (nonzero? a2-13) cfg-26 :delay (empty-form))
(b! #t cfg-24 :delay (nop!))
(label cfg-23)
(+! a2-13 255)
(set! arg1 (&-> arg1 1))
(label cfg-24)
(b! (zero? (-> arg1 0)) cfg-23 :delay (nop!))
(set! a2-13 (+ (-> arg1 0) 31 a2-13))
(set! arg1 (&-> arg1 1))
(label cfg-26)
(set! a3-23 (&- (&-> arg0 -1) (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64)))))
(set! arg1 (&-> arg1 2))
(b! #t cfg-36 :delay (nop!))
(label cfg-27)
(b! (< (the-as int a2-6) 16) cfg-35)
(let ((a3-32 (&- arg0 (the-as uint (shl (logand a2-6 8) 11)))))
(set! a2-13 (logand a2-6 7))
(b! (nonzero? a2-13) cfg-33 :delay (empty-form))
(b! #t cfg-31 :delay (nop!))
(label cfg-30)
(+! a2-13 255)
(set! arg1 (&-> arg1 1))
(label cfg-31)
(b! (zero? (-> arg1 0)) cfg-30 :delay (nop!))
(set! a2-13 (+ (-> arg1 0) 7 a2-13))
(set! arg1 (&-> arg1 1))
(label cfg-33)
(let ((a3-33 (&- a3-32 (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64))))))
(set! arg1 (&-> arg1 2))
(b! (= a3-33 arg0) cfg-47 :delay (nop!))
(set! a3-23 (&-> a3-33 -16384))
)
)
(b! #t cfg-36 :delay (nop!))
(label cfg-35)
(let ((a2-16 (&- (&- (&-> arg0 -1) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4)))))
(set! arg1 (&-> arg1 1))
(set! (-> arg0 0) (-> a2-16 0))
(set! (-> arg0 1) (-> a2-16 1))
(set! arg0 (&-> arg0 2))
(&-> a2-16 1)
)
(b! #t cfg-39 :delay (nop!))
(label cfg-36)
(set! (-> arg0 0) (-> a3-23 0))
(set! (-> arg0 1) (-> a3-23 1))
(set! arg0 (&-> arg0 2))
(let ((a3-39 (&-> a3-23 2)))
(until (<= (the-as int a2-13) 0)
(set! (-> arg0 0) (-> a3-39 0))
(set! arg0 (&-> arg0 1))
(set! a3-39 (&-> a3-39 1))
(+! a2-13 -1)
)
)
)
)
(label cfg-39)
(set! a2-4 (the-as int (logand (-> arg1 -2) 3)))
(b! (zero? (the-as uint a2-4)) cfg-45 :delay (nop!))
(until (<= a2-4 0)
(label cfg-41)
(set! (-> arg0 0) (-> arg1 0))
(set! arg0 (&-> arg0 1))
(set! arg1 (&-> arg1 1))
(set! a2-4 (the-as int (+ (the-as uint a2-4) -1)))
)
(set! a2-6 (-> arg1 0))
)
)
(set! arg1 (&-> arg1 1))
(label cfg-43)
(b! #t cfg-18 :delay (nop!))
(label cfg-45)
(b! #t cfg-6 :delay (nop!))
(label cfg-47)
(&- arg0 (the-as uint v1-1))
)
(none)
)
;; definition for method 16 of type level
;; INFO: Used lq/sq
(defmethod update-vis! ((this level) (arg0 level-vis-info) (arg1 uint) (arg2 (pointer uint8)))
"Load/decompress precomputed visibility."
(local-vars (t0-3 uint128) (sv-16 int) (sv-32 (pointer int8)))
(let* ((a0-1 (-> arg0 from-bsp current-leaf-idx))
(v1-1 (-> arg0 current-vis-string))
(s3-0 (-> arg0 vis-string a0-1))
)
0
(+ #x70000000 0)
(+ 2048 #x70000000)
(b! (!= v1-1 s3-0) cfg-8 :delay (empty-form))
(b! (not (logtest? (vis-info-flag loading) (-> arg0 flags))) cfg-6 :delay (empty-form))
(if (check-busy *ramdisk-rpc*)
(return #f)
)
(logclear! (-> arg0 flags) (vis-info-flag loading))
(let ((s3-1 (the-as (pointer integer) (-> this vis-buffer))))
(b! #t cfg-16 :delay (nop!))
(label cfg-6)
(return #t)
(label cfg-8)
(when (logtest? (vis-info-flag loading) (-> arg0 flags))
(if (check-busy *ramdisk-rpc*)
(return #f)
)
(logclear! (-> arg0 flags) (vis-info-flag loading))
)
(set! (-> arg0 current-vis-string) s3-0)
(b! (logtest? (vis-info-flag in-iop) (-> arg0 flags)) cfg-15 :delay (empty-form))
(set! s3-1 (&+ arg2 s3-0))
(b! #t cfg-16 :delay (nop!))
(label cfg-15)
(format 0 "ERROR: ramdisk vis for level ~A, this is not supported~%" (-> this name))
(let ((v0-1 #f))
(b! #t cfg-49 :delay (nop!))
(label cfg-16)
(let ((s2-0 (the-as int (logand (vis-info-flag
dummy0
dummy1
dummy2
dummy3
dummy4
dummy5
dummy6
dummy7
dummy8
dummy9
dummy10
dummy11
dummy12
dummy13
dummy14
dummy15
dummy16
dummy17
dummy18
dummy19
dummy20
dummy21
dummy22
dummy23
dummy24
dummy25
dummy26
dummy27
dummy28
)
(-> arg0 flags)
)
)
)
(s1-0 (&-> (the-as (pointer int8) #x70000000) 0))
(s0-0 (the-as (pointer int8) (+ 2048 #x70000000)))
(s4-1 (-> this bsp visible-list-length))
)
(when (zero? (the-as vis-info-flag s2-0))
(let ((v1-30 (/ (+ s4-1 15) 16)))
(dotimes (a0-19 v1-30)
(set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-19 16)))) 0)
)
)
(mem-copy! s1-0 (the-as (pointer uint8) s3-1) s4-1)
)
(while (nonzero? s2-0)
(let ((v1-33 (logand s2-0 7)))
(cond
((= v1-33 1)
(let ((v1-35 (/ (+ s4-1 15) 16)))
(dotimes (a0-23 v1-35)
(set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-23 16)))) 0)
)
)
(set! sv-16 (-> this bsp extra-vis-list-length))
(set! sv-32 (&+ s1-0 (- s4-1 sv-16)))
(let ((v1-45 (unpack-vis (-> this bsp drawable-trees) s1-0 (the-as (pointer int8) s3-1))))
(dotimes (a0-25 sv-16)
(let ((a1-9 (-> v1-45 0)))
(set! v1-45 (&-> v1-45 1))
(set! (-> sv-32 0) a1-9)
)
(set! sv-32 (&-> sv-32 1))
)
)
#f
)
((= v1-33 2)
(unpack-comp-rle s1-0 (the-as (pointer int8) s3-1))
)
((= v1-33 3)
(unpack-comp-huf
(the-as (pointer uint8) s1-0)
(the-as (pointer uint8) s3-1)
(-> arg0 dictionary)
(the-as huf-dictionary-node (+ (-> arg0 dictionary) (-> arg0 dictionary-length) -4))
)
)
((= v1-33 4)
(unpack-comp-lzo (the-as (pointer uint8) s1-0) (the-as (pointer uint8) s3-1))
)
)
)
(set! s3-1 s1-0)
(set! s1-0 s0-0)
(set! s0-0 (the-as (pointer int8) s3-1))
(shift-arith-right-32 s2-0 s2-0 3)
)
(let ((s2-1 (the-as (pointer uint8) s3-1))
(s1-1 (-> this bsp all-visible-list))
(v1-51 #f)
)
(dotimes (s0-1 s4-1)
(when (!= (logand (-> s2-1 0) (-> s1-1 0)) (-> s2-1 0))
(format #t "ERROR: illegal vis bits set [byte ~X] ~X -> ~X~%" s0-1 (-> s2-1 0) (-> s1-1 0))
(set! v1-51 #t)
)
(set! s2-1 (&-> s2-1 1))
(set! s1-1 (&-> s1-1 1))
)
(when v1-51
(format #t "src = #x~x dest = #x~x ~s ~s~%" s3-1 (-> arg0 vis-bits) (-> arg0 level) (-> arg0 from-level))
(format #t "leaf-index = ~d~%" (-> arg0 from-bsp current-leaf-idx))
0
)
)
(let ((v1-55 s3-1)
(a0-42 (the-as object (-> arg0 vis-bits)))
(a1-22 (the-as (pointer uinteger) (-> this bsp all-visible-list)))
(a2-11 (/ (+ s4-1 15) 16))
)
(dotimes (a3-6 a2-11)
(let ((t0-2 (-> (the-as (pointer uint128) v1-55) 0))
(t1-1 (-> (the-as (pointer uint128) a1-22) 0))
)
(.pand t0-3 t0-2 t1-1)
)
(set! (-> (the-as (pointer uint128) a0-42) 0) t0-3)
(set! a0-42 (+ (the-as uint a0-42) 16))
(set! v1-55 (&-> (the-as (pointer uint8) v1-55) 16))
(set! a1-22 (&-> (the-as (pointer uint8) a1-22) 16))
)
)
)
(set! v0-1 #t)
(label cfg-49)
v0-1
)
)
)
)
;; definition for function pack-comp-rle
;; WARN: Return type mismatch int vs (pointer uint8).
(defun pack-comp-rle ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 int) (arg3 int))
"Compress data, used for map mask stuff."
(let ((s4-0 0))
0
(while (and (> arg2 0) (< (+ s4-0 131) arg3))
(cond
((= (-> arg1 0) (-> arg1 1))
(let ((v1-2 (-> arg1 0)))
(set! arg1 (&-> arg1 2))
(let ((a0-2 2))
(+! arg2 -2)
(while (> arg2 0)
(cond
((= v1-2 (-> arg1 0))
(+! a0-2 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(if (>= a0-2 128)
(goto cfg-12)
)
)
(else
(goto cfg-12)
)
)
)
(label cfg-12)
(set! (-> arg0 0) (the-as uint (+ a0-2 -1)))
)
(set! (-> arg0 1) v1-2)
)
(set! arg0 (&-> arg0 2))
(+! s4-0 2)
)
(else
(let ((a0-4 arg1)
(v1-4 1)
)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(while (< 1 arg2)
(when (and (= (-> arg1 0) (-> arg1 1)) (< 2 arg2))
(if (= (-> arg1 0) (-> arg1 2))
(goto cfg-26)
)
)
(+! v1-4 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
(if (>= v1-4 127)
(goto cfg-26)
)
)
(label cfg-26)
(when (= arg2 1)
(+! v1-4 1)
(set! arg1 (&-> arg1 1))
(+! arg2 -1)
)
(set! (-> arg0 0) (the-as uint (- v1-4)))
(let ((a1-21 (&-> arg0 1))
(a2-4 (+ s4-0 1))
)
(dotimes (t0-0 v1-4)
(set! (-> a1-21 t0-0) (-> a0-4 t0-0))
)
(set! arg0 (&+ a1-21 v1-4))
(set! s4-0 (+ a2-4 v1-4))
)
)
)
)
)
(if (< arg3 (+ s4-0 131))
(format 0 "(GOMI) Warning: May have run out of bigmap bit mask compression memory~%")
)
(when (= arg2 1)
(set! (-> arg0 0) (the-as uint -1))
(set! (-> arg0 1) (-> arg1 0))
(set! arg0 (&-> arg0 2))
(+! s4-0 2)
(&-> arg1 1)
)
(set! (-> arg0 0) (the-as uint 0))
(&-> arg0 1)
(the-as (pointer uint8) (+ s4-0 1))
)
)
+14 -1
View File
@@ -96,7 +96,20 @@
"v-slrp2!",
"slave-set-rotation!",
// bones
"bones-mtx-calc-execute"
"bones-mtx-calc-execute",
// generic
"upload-vu0-program",
"generic-upload-vu0",
"generic-warp-source",
// font
"draw-string",
// decomp
"(method 16 level)",
"unpack-comp-lzo",
// shrubbery
"init-dma-test",
"draw-prototype-inline-array-shrub",
"draw-inline-array-instance-shrub"
],
"skip_compile_states": {}