diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index 80596eca2e..233f95cd00 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -6684,17 +6684,15 @@ ;; lights-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vu-lights (structure) - ((direction vector 3 :offset-assert 0) ;; guessed by decompiler - (color vector 3 :offset-assert 48) ;; guessed by decompiler + ((direction vector 3 :inline :offset-assert 0) ;; guessed by decompiler + (color vector 3 :inline :offset-assert 48) ;; guessed by decompiler (ambient vector :inline :offset-assert 96) ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 ) -|# (deftype light (structure) ((direction vector :inline :offset-assert 0) @@ -7545,17 +7543,17 @@ (deftype gs-store-image-packet (structure) ((vifcode vif-tag 4 :offset-assert 0) ;; guessed by decompiler - (giftag uint128 :offset-assert 16) ;; gif-tag - (bitbltbuf uint64 :offset-assert 32) ;; gs-bitbltbuf - (bitbltbuf-addr uint64 :offset-assert 40) ;; gs-reg64 - (trxpos uint64 :offset-assert 48) ;; gs-trxpos - (trxpos-addr uint64 :offset-assert 56) ;; gs-reg64 - (trxreg uint64 :offset-assert 64) ;; gs-trxreg - (trxreg-addr uint64 :offset-assert 72) ;; gs-reg64 + (giftag gif-tag :offset-assert 16) ;; gif-tag + (bitbltbuf gs-bitbltbuf :offset-assert 32) ;; gs-bitbltbuf + (bitbltbuf-addr gs-reg64 :offset-assert 40) ;; gs-reg64 + (trxpos gs-trxpos :offset-assert 48) ;; gs-trxpos + (trxpos-addr gs-reg64 :offset-assert 56) ;; gs-reg64 + (trxreg gs-trxreg :offset-assert 64) ;; gs-trxreg + (trxreg-addr gs-reg64 :offset-assert 72) ;; gs-reg64 (finish uint64 :offset-assert 80) ;; int64 - (finish-addr uint64 :offset-assert 88) ;; gs-reg64 - (trxdir uint64 :offset-assert 96) ;; gs-trxdir - (trxdir-addr uint64 :offset-assert 104) ;; gs-reg64 + (finish-addr gs-reg64 :offset-assert 88) ;; gs-reg64 + (trxdir gs-trxdir :offset-assert 96) ;; gs-trxdir + (trxdir-addr gs-reg64 :offset-assert 104) ;; gs-reg64 ) :method-count-assert 9 :size-assert #x70 @@ -9297,7 +9295,22 @@ ;; trail-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(defenum trail-node-flag + :type uint8 + :bitfield #t + (tnf0 0) ;; unused?? + (tnf1 1) + ) + +(defenum conn-flag + :type uint8 + :bitfield #t + (cf0 0) + (cf1 1) + (cf2 2) + (cf3 3) + ) + (deftype trail-node (structure) ((next-id int16 :offset-assert 0) (prev-id int16 :offset-assert 2) @@ -9308,7 +9321,7 @@ (first-conn uint16 :offset-assert 12) (cost-from-start uint16 :offset-assert 14) (cost-to-goal uint16 :offset-assert 16) - (flags uint8 :offset-assert 18) ;; trail-node-flag + (flags trail-node-flag :offset-assert 18) (conn-count uint8 :offset-assert 19) ) :method-count-assert 12 @@ -9320,9 +9333,7 @@ (trail-node-method-11 () none) ;; 11 ;; (get-position (_type_ vector) vector) ) ) -|# -#| (deftype trail-visgroup (structure) ((first-node uint16 :offset-assert 0) (node-count uint8 :offset-assert 2) @@ -9332,25 +9343,21 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype trail-blocker (structure) ((plane plane :inline :offset-assert 0) (center vector :inline :offset-assert 16) - (radius-squared float :offset-assert 28) + (radius-squared float :offset-assert 28 :overlay-at (-> center w)) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype trail-conn (structure) ((head-id uint16 :offset-assert 0) (tail-id uint16 :offset-assert 2) - (flags uint8 :offset-assert 4) ;; conn-flag + (flags conn-flag :offset-assert 4) (visgroup-id uint8 :offset-assert 5) (cost uint16 :offset-assert 6) ) @@ -9361,9 +9368,7 @@ (trail-conn-method-9 () none) ;; 9 ;; (debug-draw (_type_ trail-graph int) none) ) ) -|# -#| (deftype trail-conn-hash-cell (structure) ((first-conn uint16 :offset-assert 0) (conn-count uint8 :offset-assert 2) @@ -9374,9 +9379,7 @@ :size-assert #x6 :flag-assert #x900000006 ) -|# -#| (deftype trail-conn-search (structure) ((best-conn-id int32 :offset-assert 0) (best-dist float :offset-assert 4) @@ -9385,18 +9388,16 @@ (debug-cells-searched int32 :offset-assert 16) (debug-conns-searched int32 :offset-assert 20) (bounds bounding-box4w :inline :offset-assert 32) - (cell-quads qword 2 :offset-assert 64) ;; guessed by decompiler - (conn-quads qword 7 :offset-assert 96) ;; guessed by decompiler - (cell-bits vector16ub 2 :offset-assert 64) ;; guessed by decompiler - (conn-bits UNKNOWN 2 :offset-assert 96) + (cell-quads qword 2 :inline :offset-assert 64) ;; guessed by decompiler + (conn-quads qword 7 :inline :offset-assert 96) ;; guessed by decompiler + (cell-bits vector16ub 2 :inline :offset-assert 64 :overlay-at cell-quads) ;; guessed by decompiler + (conn-bits vector16ub 2 :inline :offset-assert 96 :overlay-at conn-quads) ) :method-count-assert 9 :size-assert #xd0 :flag-assert #x9000000d0 ) -|# -#| (deftype trail-conn-hash (basic) ((cell-width meters :offset-assert 4) (origin vector :inline :offset-assert 16) @@ -9407,9 +9408,7 @@ :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype trail-cached-search-info (structure) ((goal-conn-id int16 :offset-assert 0) (orig-goal-pos vector :inline :offset-assert 16) @@ -9419,9 +9418,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype trail-cached-start-pov (structure) ((last-updated uint64 :offset-assert 0) (pov-can-see-start uint64 :offset-assert 8) @@ -9432,9 +9429,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype trail-graph (basic) ((mode uint8 :offset-assert 4) (search-id uint32 :offset-assert 8) @@ -9463,10 +9458,10 @@ (orig-goal-pos vector :inline :offset-assert 160) (conn-start-pos vector :inline :offset-assert 176) (conn-goal-pos vector :inline :offset-assert 192) - (open-quads qword 6 :offset-assert 208) ;; guessed by decompiler - (closed-quads qword 6 :offset-assert 304) ;; guessed by decompiler - (open-bits UNKNOWN 2 :offset-assert 208) - (closed-bits UNKNOWN 2 :offset-assert 304) + (open-quads qword 6 :inline :offset-assert 208) ;; guessed by decompiler + (closed-quads qword 6 :inline :offset-assert 304) ;; guessed by decompiler + (open-bits vector16ub 2 :inline :offset-assert 208 :overlay-at open-quads) + (closed-bits vector16ub 2 :inline :offset-assert 304 :overlay-at closed-quads) ) :method-count-assert 34 :size-assert #x190 @@ -9499,15 +9494,221 @@ (trail-graph-method-33 () none) ;; 33 ) ) -|# -;; (define-extern *trail-graph* object) ;; trail-graph +(define-extern *trail-graph* trail-graph) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; minimap-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(defenum minimap-flag + :type uint32 + :bitfield #t + (active 0) + (fade-in 1) + (fade-out 2) + (clamp 3) + (trail 4) + (task-graph 5) + (flash 6) + (minimap 7) + (background 8) + (task 9) + (enemy 10) + (frustum 11) + (racer 12) + (bigmap 13) + (bigmap-only 14) + (goal 15) + (local-only 16) + (transport 17) + (ctywide 18) + (wasall 19) + (waswide 20) + (desert 21) + ) + +(defenum minimap-class + :type uint16 + (none 0) + (onintent 1) + (vinroom 2) + (sewer-kg 3) + (sewer-genb 4) + (sewer-slumb 5) + (hiphog 6) + (gungame 7) + (gun-yellow 8) + (desert-nest-entrance 9) + (guard 10) + (parking-spot 11) + (goal 12) + (goal-no-trail 13) + (goal-no-trail-bigmap 14) + (cty-sniper-vicinity 15) + (forest 16) + (wascity-gungame 17) + (city-transport 18) + (wascity-leaper-race 19) + (wascity-pre-game 20) + (desert-transport 21) + (waspal 22) + (stadium 23) + (wasteland-arena 24) + (guard-frustum 25) + (wasdoors 26) + (gun-dark 27) + (spargus-city 28) + (racer 29) + (racer-target 30) + (racer-errol 31) + (monk-temple 32) + (bbush-desd 33) + (bbush-desc 34) + (bbush-desa 35) + (bbush-desg 36) + (bbush-desh 37) + (bbush-desc-2 38) + (bbush-dese 39) + (bbush-desb 40) + (bbush-desa-2 41) + (bbush-desc-3 42) + (bbush-desg-2 43) + (bbush-desd-2 44) + (bbush-desg-3 45) + (bbush-dese-2 46) + (bbush-dese-3 47) + (bbush-desd-3 48) + (bbush-desb-2 49) + (bbush-wasa-1 50) + (bbush-wasa-2 51) + (bbush-wasa-3 52) + (bbush-wasa-4 53) + (bbush-wasb-2 54) + (bbush-wasb-1 55) + (bbush-wasb-4 56) + (bbush-wasb-3 57) + (bbush-desg-4 58) + (bbush-wasb-5 59) + (bbush-wasb-6 60) + (bbush-desa-3 61) + (bbush-wasa-5 62) + (bbush-desd-4 63) + (bbush-desd-5 64) + (bbush-sluma-1 65) + (bbush-genb-1 66) + (bbush-slumb-1 67) + (bbush-slumb-3 68) + (bbush-desc-4 69) + (bbush-inda-1 70) + (bbush-dese-4 71) + (bbush-desc-5 72) + (bbush-desb-3 73) + (bbush-wasa-6 74) + (bbush-wasb-7 75) + (bbush-indb-1 76) + (bbush-desf 77) + (bbush-port-1 78) + (bbush-genb-2 79) + (bbush-genb-3 80) + (bbush-genb-4 81) + (bbush-slumb-4 82) + (bbush-slumc-1 83) + (bbush-dese-5 84) + (bbush-post-game 85) + (bbush-slumc-2 86) + (bbush-sluma-2 87) + (bbush-sluma-3 88) + (bbush-indb-2 89) + (bbush-indb-3 90) + (bbush-inda-2 91) + (bbush-inda-3 92) + (bbush-inda-4 93) + (bbush-inda-5 94) + (bbush-port-4 95) + (bbush-port-5 96) + (bbush-port-6 97) + (bbush-port-7 98) + (bbush-port-8 99) + (bbush-desb-4 100) + (atoll-valve 101) + (atoll-ashelin 102) + (mountain-lens 103) + (mountain-shard 104) + (mountain-gear 105) + (ruins-hut 106) + (forest-samos 107) + (metalhead 108) + (kleever-arena 109) + (seem-wascitya 110) + (seem-wascityb 111) + (kleever-wasdoors 112) + (damus-wasdoors 113) + (damus-waspal 114) + (damus-arena 115) + (kleever-wascityb 116) + (red-clamped-dot 117) + (tiny-red-dot 118) + (desert-temple 119) + (desert-oasis 120) + (desert-corral 121) + (sig-wasdoors 122) + (freehq 123) + (green-clamped-dot 124) + (nest-cocoon 125) + (nest-bridge 126) + (factory 127) + (big-orange-flashing-clamped-dot 128) + (big-red-flashing-clamped-dot 129) + (big-green-flashing-clamped-dot 130) + (big-purple-flashing-clamped-dot 131) + (medium-purple-dot 132) + (parked-vehicle 133) + (samos-genb 134) + (projectile 135) + (desertb-race 136) + (big-red-flashing-trail-dot 137) + (big-green-flashing-trail-dot 138) + (robot-frustum 139) + (desert-marauder-village 140) + (gray-clamped-dot 141) + (volcano-monk 142) + (volcano-collapsing-rock 143) + (volcano-stone-lid 144) + (volcano-dark-maker-idol 145) + (medium-green-dot 146) + (big-red-flashing-dot 147) + (factory-clamped-target 148) + (factory-clamped-tower 149) + (desglide-ring-dot 150) + (desglide-thermal-dot 151) + (mine-elevator 152) + (mine-armor 153) + (mine-sign-up 154) + (mine-sign-down 155) + (mine-door 156) + (ruins-elec-gate 157) + (ruins-goal 158) + (dp-bipedal 159) + (neo-wasp 160) + (dark-maker 161) + (templea-door 162) + (templeb-watchers 163) + (templeb-regen 164) + (templeb-warpgate 165) + (templex-darkmaker 166) + (temple-tests-door 167) + (templeb-freeze 168) + (temple-elev 169) + (factoryc-vehicle 170) + (templeb-defend 171) + (templeb-seem 172) + (temple-defend-door-1 173) + (temple-defend-door-2 174) + (temple-defend-door-3 175) + (palace-ruins 176) + ) + (deftype minimap-table-entry (structure) ((corner vector :inline :offset-assert 0) (level-name basic :offset-assert 16) @@ -9522,15 +9723,13 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype minimap-class-node (structure) ((default-position vector :inline :offset-assert 0) (flags minimap-flag :offset-assert 16) (name basic :offset-assert 20) (icon-xy vector2ub :inline :offset-assert 24) - (class uint16 :offset-assert 26) ;; minimap-class + (class minimap-class :offset-assert 26) ;; minimap-class (scale float :offset-assert 28) (color rgba :offset-assert 32) ;; guessed by decompiler ) @@ -9541,16 +9740,14 @@ (minimap-class-node-method-9 () none) ;; 9 ) ) -|# -#| (deftype connection-minimap (connection-pers) - ((next connection-minimap :offset-assert 0) ;; connection-pers - (handle uint64 :offset-assert 8) ;; handle - (position vector :offset-assert 16) ;; object - (alpha float :offset-assert 20) - (flags minimap-flag :offset-assert 24) - (class minimap-class-node :offset-assert 28) + ((next connection-minimap :offset-assert 0 :override) ;; connection-pers + (handle handle :offset-assert 8 :overlay-at update-time) ;; + (position vector :offset-assert 16 :overlay-at (-> param 0)) ;; object + (alpha float :offset-assert 20 :overlay-at (-> param 1)) + (flags minimap-flag :offset-assert 24 :overlay-at (-> param 2)) + (class minimap-class-node :offset-assert 28 :overlay-at (-> param 3)) (node uint16 :offset-assert 32) (edge-ry int16 :offset-assert 34) ;; float (last-world-pos vector :inline :offset-assert 48) @@ -9561,20 +9758,16 @@ :flag-assert #x900000050 ;; field key uses ~A with a signed load. ) -|# -#| (deftype engine-minimap (engine-pers) - ((alive-list connection-minimap :offset-assert 24) - (dead-list connection-minimap :offset-assert 28) + ((alive-list connection-minimap :offset-assert 24 :override) + (dead-list connection-minimap :offset-assert 28 :override) ) :method-count-assert 15 :size-assert #x20 :flag-assert #xf00000020 ) -|# -#| (deftype minimap-trail (structure) ((used-by connection-minimap :offset-assert 0) (search-id uint32 :offset-assert 4) @@ -9593,24 +9786,20 @@ (minimap-trail-method-10 () none) ;; 10 ;; (reset (_type_) none) ) ) -|# -#| (deftype minimap-draw-work (structure) ((buf dma-buffer :offset-assert 0) ;; guessed by decompiler (justify-right symbol :offset-assert 4) ;; guessed by decompiler (global-flags uint32 :offset-assert 8) (draw-pos vector4w :inline :offset-assert 16) (mat matrix :inline :offset-assert 32) - (corner vector 4 :offset-assert 96) ;; guessed by decompiler + (corner vector 4 :inline :offset-assert 96) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #xa0 :flag-assert #x9000000a0 ) -|# -#| (deftype minimap (structure) ((draw-tmpl dma-gif-packet :inline :offset-assert 0) (draw2-tmpl dma-gif-packet :inline :offset-assert 32) @@ -9631,13 +9820,13 @@ (pos-scale float :offset-assert 276) (min-inv-scale float :offset-assert 280) (max-inv-scale float :offset-assert 284) - (inv-scale float :offset-assert 212) + (inv-scale float :offset-assert 212 :overlay-at (-> offset y)) (map-inv-scale float :offset-assert 288) (icon-inv-scale float :offset-assert 292) - (fade float :offset-assert 220) + (fade float :offset-assert 220 :overlay-at (-> offset w)) (engine engine-minimap :offset-assert 296) ;; guessed by decompiler (engine-key uint32 :offset-assert 300) - (trail minimap-trail 6 :offset-assert 304) ;; guessed by decompiler + (trail minimap-trail 6 :inline :offset-assert 304) ;; guessed by decompiler (race-tex texture :offset-assert 1552) ;; guessed by decompiler (race-scale float :offset-assert 1556) (race-level level :offset-assert 1560) ;; guessed by decompiler @@ -9671,14 +9860,12 @@ (minimap-method-27 () none) ;; 27 ;; (set-race-corner (_type_ float float) none) ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bigmap-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bigmap-image (structure) ((clut-offset uint32 :offset-assert 0) (image-offset uint32 :offset-assert 4) @@ -9690,30 +9877,24 @@ :size-assert #x11 :flag-assert #x900000011 ) -|# -#| (deftype bigmap-info (vector) - ((scale float :offset-assert 8) - (inv-scale float :offset-assert 12) + ((scale float :offset-assert 8 :overlay-at z) + (inv-scale float :offset-assert 12 :overlay-at w) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype bigmap-info-array (structure) - ((data bigmap-info 24 :offset-assert 0) ;; guessed by decompiler + ((data bigmap-info 24 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x180 :flag-assert #x900000180 ) -|# -#| (deftype bigmap (basic) ((drawing-flag symbol :offset-assert 4) ;; guessed by decompiler (loading-flag symbol :offset-assert 8) ;; guessed by decompiler @@ -9733,12 +9914,12 @@ (draw-tmpl dma-gif-packet :inline :offset-assert 96) (adgif-tmpl dma-gif-packet :inline :offset-assert 128) (offset vector :inline :offset-assert 160) - (size float :offset-assert 168) - (scale float :offset-assert 172) + (size float :offset-assert 168 :overlay-at (-> offset z)) + (scale float :offset-assert 172 :overlay-at (-> offset w)) (scroll vector :inline :offset-assert 176) (pos vector4w :inline :offset-assert 192) (color vector4w :inline :offset-assert 208) - (corner vector 4 :offset-assert 224) ;; guessed by decompiler + (corner vector 4 :inline :offset-assert 224) ;; guessed by decompiler (auto-save-icon-flag symbol :offset-assert 288) ;; guessed by decompiler (global-flags uint32 :offset-assert 292) ) @@ -9763,7 +9944,6 @@ (bigmap-method-22 () none) ;; 22 ;; (texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none) ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -10066,14 +10246,13 @@ ;; capture ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern gs-set-default-store-image function) ;; (function gs-store-image-packet int int gs-psm int int int int int) -;; (define-extern store-image function) ;; (function screen-shot-work int) +(define-extern gs-set-default-store-image "Set up a gs-store-image-packet for copying VRAM data to RAM." (function gs-store-image-packet int int gs-psm int int int int int)) +(define-extern store-image "Take a screenshot!" (function screen-shot-work none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; memory-usage-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype memory-usage-info (structure) ((name string :offset-assert 0) ;; guessed by decompiler (count int32 :offset-assert 4) @@ -10084,34 +10263,30 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype memory-usage-block (basic) ((work-bsp basic :offset-assert 4) (length int32 :offset-assert 8) - (data memory-usage-info 113 :offset-assert 16) ;; guessed by decompiler + (data memory-usage-info 113 :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 12 :size-assert #x720 :flag-assert #xc00000720 (:methods - (memory-usage-block-method-9 () none) ;; 9 ;; (reset! (_type_) _type_) - (memory-usage-block-method-10 () none) ;; 10 ;; (calculate-total (_type_) int) - (memory-usage-block-method-11 () none) ;; 11 ;; (print-mem-usage (_type_ level object) _type_) + (reset! (_type_) _type_) ;; 9 + (calculate-total (_type_) int) ;; 10 + (print-mem-usage (_type_ level object) _type_) ;; 11 ) ) -|# -;; (define-extern *mem-usage* object) ;; memory-usage-block -;; (define-extern *dma-mem-usage* object) ;; memory-usage-block -;; (define-extern *temp-mem-usage* object) ;; memory-usage-block +(define-extern *mem-usage* memory-usage-block) +(define-extern *dma-mem-usage* memory-usage-block) +(define-extern *temp-mem-usage* memory-usage-block) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; blit-displays-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype blit-displays-work (structure) ((adgif-tmpl dma-gif-packet :inline :offset-assert 0) (sprite-tmpl dma-gif-packet :inline :offset-assert 32) @@ -10122,7 +10297,7 @@ (scan-tmpl dma-gif-packet :inline :offset-assert 192) (color vector4w :inline :offset-assert 224) (line-color uint64 :offset-assert 240) - (scan-colors vector4w 15 :offset-assert 256) ;; guessed by decompiler + (scan-colors vector4w 15 :inline :offset-assert 256) ;; guessed by decompiler (zoom-blur-pos vector :inline :offset-assert 496) (zoom-blur-count int32 :offset-assert 512) (zoom-blur-texels int32 :offset-assert 516) @@ -10131,7 +10306,7 @@ (zoom-blur-2d basic :offset-assert 528) (menu-mode symbol :offset-assert 532) ;; guessed by decompiler (screen-copied symbol :offset-assert 536) ;; guessed by decompiler - (vu1-enable-user-menu uint64 :offset-assert 544) ;; vu1-renderer-mask + (vu1-enable-user-menu vu1-renderer-mask :offset-assert 544) (texture-enable-user-menu uint32 :offset-assert 552) (count-down uint32 :offset-assert 556) (horizontal-flip-flag symbol :offset-assert 560) ;; guessed by decompiler @@ -10158,22 +10333,20 @@ (blit-displays-work-method-18 () none) ;; 18 (blit-displays-work-method-19 () none) ;; 19 (blit-displays-work-method-20 () none) ;; 20 - (blit-displays-work-method-21 () none) ;; 21 - (blit-displays-work-method-22 () none) ;; 22 - (blit-displays-work-method-23 () none) ;; 23 - (blit-displays-work-method-24 () none) ;; 24 - (blit-displays-work-method-25 () none) ;; 25 - (blit-displays-work-method-26 () none) ;; 26 + (get-menu-mode (_type_) symbol) ;; 21 + (get-screen-copied (_type_) symbol) ;; 22 + (get-horizontal-flip-flag (_type_) symbol) ;; 23 + (set-menu-mode (_type_ symbol) symbol) ;; 24 + (set-screen-copied (_type_ symbol) symbol) ;; 25 + (set-horizontal-flip-flag (_type_ symbol) symbol) ;; 26 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sky-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sky-color-hour (structure) ((snapshot1 int32 :offset-assert 0) (snapshot2 int32 :offset-assert 4) @@ -10184,51 +10357,43 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype sky-color-day (structure) - ((hour sky-color-hour 24 :offset-assert 0) ;; guessed by decompiler + ((hour sky-color-hour 24 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x180 :flag-assert #x900000180 ) -|# -#| (deftype sky-sun-data (structure) ((data uint128 4 :offset-assert 0) ;; guessed by decompiler - (pos vector :inline :offset-assert 0) - (r-sun float :offset-assert 16) - (r-halo float :offset-assert 20) - (r-aurora float :offset-assert 24) - (c-sun-start rgba :offset-assert 32) ;; guessed by decompiler - (c-sun-end rgba :offset-assert 48) ;; guessed by decompiler - (c-halo-start rgba :offset-assert 36) ;; guessed by decompiler - (c-halo-end rgba :offset-assert 52) ;; guessed by decompiler - (c-aurora-start rgba :offset-assert 40) ;; guessed by decompiler - (c-aurora-end rgba :offset-assert 56) ;; guessed by decompiler + (pos vector :inline :offset-assert 0 :overlay-at data) + (r-sun float :offset-assert 16 :overlay-at (-> pos 1 x)) + (r-halo float :offset-assert 20 :overlay-at (-> pos 1 y)) + (r-aurora float :offset-assert 24 :overlay-at (-> pos 1 z)) + (c-sun-start rgba :offset-assert 32 :overlay-at (-> pos 2 x)) ;; guessed by decompiler + (c-sun-end rgba :offset-assert 48 :overlay-at (-> pos 3 x)) ;; guessed by decompiler + (c-halo-start rgba :offset-assert 36 :overlay-at (-> pos 2 y)) ;; guessed by decompiler + (c-halo-end rgba :offset-assert 52 :overlay-at (-> pos 3 y)) ;; guessed by decompiler + (c-aurora-start rgba :offset-assert 40 :overlay-at (-> pos 2 z)) ;; guessed by decompiler + (c-aurora-end rgba :offset-assert 56 :overlay-at (-> pos 3 z)) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype sky-moon-data (structure) ((data uint128 2 :offset-assert 0) ;; guessed by decompiler - (pos vector :inline :offset-assert 0) - (scale vector :inline :offset-assert 16) + (pos vector :inline :offset-assert 0 :overlay-at (-> data 0)) + (scale vector :inline :offset-assert 16 :overlay-at (-> data 1)) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype sky-orbit (structure) ((high-noon float :offset-assert 0) (tilt float :offset-assert 4) @@ -10237,38 +10402,33 @@ (min-halo float :offset-assert 16) (max-halo float :offset-assert 20) ) + :allow-misaligned :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype sky-upload-data (structure) ((data uint128 16 :offset-assert 0) ;; guessed by decompiler - (sun sky-sun-data 2 :offset-assert 0) ;; guessed by decompiler - (moon sky-moon-data :inline :offset-assert 128) - (day-star sky-moon-data :inline :offset-assert 192) + (sun sky-sun-data 2 :inline :offset-assert 0 :overlay-at data) ;; guessed by decompiler + (moon sky-moon-data :inline :offset-assert 128 :overlay-at (-> data 8)) + (day-star sky-moon-data :inline :offset-assert 192 :overlay-at (-> data 12)) ) :method-count-assert 9 :size-assert #x100 :flag-assert #x900000100 ) -|# -#| (deftype sky-vertex (structure) - ((UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + ((pos vector :inline :offset-assert 0) + (stq vector :inline :offset-assert 16) + (col vector :inline :offset-assert 32) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype cloud-vertex (structure) ((pos vector :inline :offset-assert 0) (stq vector :inline :offset-assert 16) @@ -10282,19 +10442,15 @@ :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype cloud-vert-array (structure) - ((data cloud-vertex 100 :offset-assert 0) ;; guessed by decompiler + ((data cloud-vertex 100 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x2bc0 :flag-assert #x900002bc0 ) -|# -#| (deftype haze-vertex (structure) ((pos vector :inline :offset-assert 0) (nrm vector :inline :offset-assert 16) @@ -10304,19 +10460,15 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype haze-vert-array (structure) - ((data haze-vertex 36 :offset-assert 0) ;; guessed by decompiler + ((data haze-vertex 36 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x6c0 :flag-assert #x9000006c0 ) -|# -#| (deftype cloud-lights (structure) ((sun0-normal vector :inline :offset-assert 0) (sun1-normal vector :inline :offset-assert 16) @@ -10335,9 +10487,7 @@ :size-assert #x9c :flag-assert #x90000009c ) -|# -#| (deftype haze-lights (structure) ((sun0-normal vector :inline :offset-assert 0) (sun1-normal vector :inline :offset-assert 16) @@ -10354,9 +10504,7 @@ :size-assert #x7c :flag-assert #x90000007c ) -|# -#| (deftype sky-work (structure) ((adgif-tmpl dma-gif-packet :inline :offset-assert 0) (draw-tmpl dma-gif-packet :inline :offset-assert 32) @@ -10365,20 +10513,20 @@ (blend-tmpl dma-gif-packet :inline :offset-assert 128) (sprite-tmpl dma-gif-packet :inline :offset-assert 160) (sprite-tmpl2 dma-gif-packet :inline :offset-assert 192) - (sun-coords vector 2 :offset-assert 224) ;; guessed by decompiler - (green-coords vector 2 :offset-assert 256) ;; guessed by decompiler - (moon0-coords vector 2 :offset-assert 288) ;; guessed by decompiler - (moon1-coords vector 2 :offset-assert 320) ;; guessed by decompiler - (moon2-coords vector 2 :offset-assert 352) ;; guessed by decompiler - (day-star-coords UNKNOWN 2 :offset-assert 384) - (star-coords vector 2 :offset-assert 416) ;; guessed by decompiler - (sun-colors vector4w 2 :offset-assert 448) ;; guessed by decompiler - (green-colors vector4w 2 :offset-assert 480) ;; guessed by decompiler - (moon-colors vector4w 3 :offset-assert 512) ;; guessed by decompiler - (day-star-colors UNKNOWN 3 :offset-assert 560) - (star-colors vector4w 16 :offset-assert 608) ;; guessed by decompiler - (st-coords vector 2 :offset-assert 864) ;; guessed by decompiler - (random vector4w 8 :offset-assert 896) ;; guessed by decompiler + (sun-coords vector 2 :inline :offset-assert 224) ;; guessed by decompiler + (green-coords vector 2 :inline :offset-assert 256) ;; guessed by decompiler + (moon0-coords vector 2 :inline :offset-assert 288) ;; guessed by decompiler + (moon1-coords vector 2 :inline :offset-assert 320) ;; guessed by decompiler + (moon2-coords vector 2 :inline :offset-assert 352) ;; guessed by decompiler + (day-star-coords vector 2 :inline :offset-assert 384) + (star-coords vector 2 :inline :offset-assert 416) ;; guessed by decompiler + (sun-colors vector4w 2 :inline :offset-assert 448) ;; guessed by decompiler + (green-colors vector4w 2 :inline :offset-assert 480) ;; guessed by decompiler + (moon-colors vector4w 3 :inline :offset-assert 512) ;; guessed by decompiler + (day-star-colors vector4w 3 :inline :offset-assert 560) + (star-colors vector4w 16 :inline :offset-assert 608) ;; guessed by decompiler + (st-coords vector 2 :inline :offset-assert 864) ;; guessed by decompiler + (random vector4w 8 :inline :offset-assert 896) ;; guessed by decompiler (giftag-base dma-gif :inline :offset-assert 1024) (giftag-haze dma-gif :inline :offset-assert 1040) (giftag-roof dma-gif :inline :offset-assert 1056) @@ -10388,7 +10536,7 @@ (time float :offset-assert 1136) (off-s uint16 :offset-assert 1140) (off-t uint16 :offset-assert 1142) - (orbit sky-orbit 3 :offset-assert 1144) ;; guessed by decompiler + (orbit sky-orbit 3 :inline :offset-assert 1144) ;; guessed by decompiler (upload-data sky-upload-data :inline :offset-assert 1248) (ambi-color vector :inline :offset-assert 1504) ;; vector4w :inline (ambi-color-lower vector :inline :offset-assert 1520) ;; vector4w :inline @@ -10405,7 +10553,7 @@ (buf dma-buffer :offset-assert 2044) ;; guessed by decompiler (draw-vortex basic :offset-assert 2048) (day-star-scale float :offset-assert 2052) - (stars vector 512 :offset-assert 2064) ;; guessed by decompiler + (stars vector 512 :inline :offset-assert 2064) ;; guessed by decompiler (disable-day-star basic :offset-assert 10256) ) :method-count-assert 39 @@ -10444,7 +10592,6 @@ (sky-work-method-38 () none) ;; 38 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -10626,9 +10773,8 @@ ;:flag-assert #x900010000 ) -#| (deftype ocean-texture-constants (structure) - ((giftag qword :inline :offset-assert 0) ;; gs-gif-tag :inline + ((giftag gs-gif-tag :inline :offset-assert 0) ;; :inline (buffers vector4w :inline :offset-assert 16) (dests vector4w :inline :offset-assert 32) (start vector :inline :offset-assert 48) @@ -10640,7 +10786,6 @@ :size-assert #x70 :flag-assert #x900000070 ) -|# (deftype ocean-mid-vertex (structure) ((stq vector :inline :offset-assert 0) @@ -10652,7 +10797,6 @@ :flag-assert #x900000030 ) -#| (deftype ocean-mid-constants (structure) ((hmge-scale vector :inline :offset-assert 0) (inv-hmge-scale vector :inline :offset-assert 16) @@ -10660,17 +10804,17 @@ (fog vector :inline :offset-assert 48) (constants vector :inline :offset-assert 64) (constants2 vector :inline :offset-assert 80) - (drw-fan qword :inline :offset-assert 96) ;; gs-gif-tag :inline - (env-fan qword :inline :offset-assert 112) ;; gs-gif-tag :inline - (drw-adgif qword :inline :offset-assert 128) ;; gs-gif-tag :inline + (drw-fan gs-gif-tag :inline :offset-assert 96) ;; gs-gif-tag :inline + (env-fan gs-gif-tag :inline :offset-assert 112) ;; gs-gif-tag :inline + (drw-adgif gs-gif-tag :inline :offset-assert 128) ;; gs-gif-tag :inline (drw-texture adgif-shader :inline :offset-assert 144) - (drw-strip-0 qword :inline :offset-assert 224) ;; gs-gif-tag :inline - (drw-strip-1 qword :inline :offset-assert 240) ;; gs-gif-tag :inline - (env-adgif qword :inline :offset-assert 256) ;; gs-gif-tag :inline + (drw-strip-0 gs-gif-tag :inline :offset-assert 224) ;; gs-gif-tag :inline + (drw-strip-1 gs-gif-tag :inline :offset-assert 240) ;; gs-gif-tag :inline + (env-adgif gs-gif-tag :inline :offset-assert 256) ;; gs-gif-tag :inline (env-texture adgif-shader :inline :offset-assert 272) - (env-strip qword :inline :offset-assert 352) ;; gs-gif-tag :inline + (env-strip gs-gif-tag :inline :offset-assert 352) ;; gs-gif-tag :inline (env-color vector :inline :offset-assert 368) - (index-table vector4w 8 :offset-assert 384) ;; guessed by decompiler + (index-table vector4w 8 :inline :offset-assert 384) ;; guessed by decompiler (pos0 vector :inline :offset-assert 512) (pos1 vector :inline :offset-assert 528) (pos2 vector :inline :offset-assert 544) @@ -10680,7 +10824,6 @@ :size-assert #x240 :flag-assert #x900000240 ) -|# (deftype ocean-mid-upload (structure) ((rot matrix :inline :offset-assert 0) @@ -10712,7 +10855,6 @@ :flag-assert #x900000230 ) -#| (deftype ocean-mid-work (structure) ((env0 vector :inline :offset-assert 0) (env1 vector :inline :offset-assert 16) @@ -10726,9 +10868,7 @@ :size-assert #x160 :flag-assert #x900000160 ) -|# -#| (deftype ocean-near-constants (structure) ((hmge-scale vector :inline :offset-assert 0) (inv-hmge-scale vector :inline :offset-assert 16) @@ -10739,31 +10879,29 @@ (constants3 vector :inline :offset-assert 96) (constants4 vector :inline :offset-assert 112) (constants5 vector :inline :offset-assert 128) - (drw-fan qword :inline :offset-assert 144) ;; gs-gif-tag :inline - (drw2-fan qword :inline :offset-assert 160) ;; gs-gif-tag :inline - (env-fan qword :inline :offset-assert 176) ;; gs-gif-tag :inline - (drw-adgif qword :inline :offset-assert 192) ;; gs-gif-tag :inline + (drw-fan gs-gif-tag :inline :offset-assert 144) ;; gs-gif-tag :inline + (drw2-fan gs-gif-tag :inline :offset-assert 160) ;; gs-gif-tag :inline + (env-fan gs-gif-tag :inline :offset-assert 176) ;; gs-gif-tag :inline + (drw-adgif gs-gif-tag :inline :offset-assert 192) ;; gs-gif-tag :inline (drw-texture adgif-shader :inline :offset-assert 208) - (drw-strip qword :inline :offset-assert 288) ;; gs-gif-tag :inline - (env-adgif qword :inline :offset-assert 304) ;; gs-gif-tag :inline + (drw-strip gs-gif-tag :inline :offset-assert 288) ;; gs-gif-tag :inline + (env-adgif gs-gif-tag :inline :offset-assert 304) ;; gs-gif-tag :inline (env-texture adgif-shader :inline :offset-assert 320) - (env-strip qword :inline :offset-assert 400) ;; gs-gif-tag :inline + (env-strip gs-gif-tag :inline :offset-assert 400) ;; gs-gif-tag :inline (env-color vector :inline :offset-assert 416) - (drw2-adgif qword :inline :offset-assert 432) ;; gs-gif-tag :inline + (drw2-adgif gs-gif-tag :inline :offset-assert 432) ;; gs-gif-tag :inline (drw2-tex0 qword :inline :offset-assert 448) (drw2-frame qword :inline :offset-assert 464) - (drw2-strip qword :inline :offset-assert 480) ;; gs-gif-tag :inline - (drw3-adgif qword :inline :offset-assert 496) ;; gs-gif-tag :inline - (drw3-frame qword :inline :offset-assert 512) ;; gs-adcmd :inline - (index-table vector4w 4 :offset-assert 528) ;; guessed by decompiler + (drw2-strip gs-gif-tag :inline :offset-assert 480) ;; gs-gif-tag :inline + (drw3-adgif gs-gif-tag :inline :offset-assert 496) ;; gs-gif-tag :inline + (drw3-frame gs-adcmd :inline :offset-assert 512) ;; gs-adcmd :inline + (index-table vector4w 4 :inline :offset-assert 528) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x250 :flag-assert #x900000250 ) -|# -#| (deftype ocean-near-upload (structure) ((rot matrix :inline :offset-assert 0) (matrix matrix :inline :offset-assert 64) @@ -10776,7 +10914,6 @@ :size-assert #x100 :flag-assert #x900000100 ) -|# (deftype ocean-near-vertex (structure) ((stq vector :inline :offset-assert 0) @@ -10831,7 +10968,6 @@ ) ) -#| (deftype ocean (ocean-map) ((off symbol :offset-assert 52) ;; guessed by decompiler (near-off symbol :offset-assert 56) ;; guessed by decompiler @@ -10847,9 +10983,9 @@ (map-min vector :inline :offset-assert 112) (map-max vector :inline :offset-assert 128) (interp vector :inline :offset-assert 144) - (corner-array ocean-corner 25 :offset-assert 160) ;; guessed by decompiler + (corner-array ocean-corner 25 :inline :offset-assert 160) ;; guessed by decompiler (corner-count int32 :offset-assert 2160) - (temp-vecs vector 4 :offset-assert 2176) ;; guessed by decompiler + (temp-vecs vector 4 :inline :offset-assert 2176) ;; guessed by decompiler (mid-mask-ptrs pointer 36 :offset-assert 2240) ;; guessed by decompiler (mid-camera-masks uint64 36 :offset-assert 2384) ;; guessed by decompiler (trans-mask-ptrs pointer 64 :offset-assert 2672) ;; guessed by decompiler @@ -10869,13 +11005,13 @@ (haze-lights haze-lights :inline :offset-assert 3536) (constant vector :inline :offset-assert 3664) (sky-color vector :inline :offset-assert 3680) - (haze-verts vector4w 32 :offset-assert 3696) ;; guessed by decompiler - (cloud-verts vector4w 36 :offset-assert 4208) ;; guessed by decompiler - (cloud-nrms vector 36 :offset-assert 4784) ;; guessed by decompiler - (cloud-col0 vector 36 :offset-assert 5360) ;; guessed by decompiler - (cloud-col1 vector 36 :offset-assert 5936) ;; guessed by decompiler - (cloud-st0 vector 36 :offset-assert 6512) ;; guessed by decompiler - (cloud-st1 vector 36 :offset-assert 7088) ;; guessed by decompiler + (haze-verts vector4w 32 :inline :offset-assert 3696) ;; guessed by decompiler + (cloud-verts vector4w 36 :inline :offset-assert 4208) ;; guessed by decompiler + (cloud-nrms vector 36 :inline :offset-assert 4784) ;; guessed by decompiler + (cloud-col0 vector 36 :inline :offset-assert 5360) ;; guessed by decompiler + (cloud-col1 vector 36 :inline :offset-assert 5936) ;; guessed by decompiler + (cloud-st0 vector 36 :inline :offset-assert 6512) ;; guessed by decompiler + (cloud-st1 vector 36 :inline :offset-assert 7088) ;; guessed by decompiler (color80808080 vector4w :inline :offset-assert 7664) (color80808040 vector4w :inline :offset-assert 7680) (color80808000 vector4w :inline :offset-assert 7696) @@ -10909,8 +11045,8 @@ (temp-maxx uint8 :offset-assert 8045) (temp-minz uint8 :offset-assert 8046) (temp-maxz uint8 :offset-assert 8047) - (tex1 uint64 :offset-assert 8048) ;; gs-tex1 - (tex1-near uint64 :offset-assert 8056) ;; gs-tex1 + (tex1 gs-tex1 :offset-assert 8048) ;; gs-tex1 + (tex1-near gs-tex1 :offset-assert 8056) ;; gs-tex1 (corner00 float :offset-assert 8064) (corner01 float :offset-assert 8068) (corner10 float :offset-assert 8072) @@ -10919,7 +11055,7 @@ (frame-speed float :offset-assert 8084) (frame-num2 float :offset-assert 8088) (frame-speed2 float :offset-assert 8092) - (cloud-interp float :offset-assert 3676) + (cloud-interp float :offset 3676) (scales vector :inline :offset-assert 8096) (mask-hi vector4w :inline :offset-assert 8112) (mask-lo vector4w :inline :offset-assert 8128) @@ -11016,10 +11152,9 @@ (ocean-method-91 () none) ;; 91 ;; (do-tex-scroll! (_type_) none) ) ) -|# -;; (define-extern *ocean-map* object) ;; ocean-map -;; (define-extern *ocean* object) ;; ocean +(define-extern *ocean-map* ocean-map) +(define-extern *ocean* ocean) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; texture ;; diff --git a/decompiler/config/jak3/ntsc_v1/label_types.jsonc b/decompiler/config/jak3/ntsc_v1/label_types.jsonc index ee881658da..6a229c1aa4 100644 --- a/decompiler/config/jak3/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/label_types.jsonc @@ -39,5 +39,6 @@ ["L3", "(inline-array profile-spec)", 14], ["L2", "(pointer uint64)", 584] ], - "texture-anim-h": [["L1", "(pointer uint8)", 256]] + "texture-anim-h": [["L1", "(pointer uint8)", 256]], + "capture": [["L4", "gs-store-image-packet"]] } diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index b9d69d14ca..3203e4507b 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -231,5 +231,10 @@ [334, "v1", "(pointer uint64)"], [141, "v1", "int"], [25, "v1", "dma-tag"] + ], + "(method 3 connection-minimap)": [ + [97, "f0", "float"] + ] + } diff --git a/decompiler/config/jak3/ntsc_v1/var_names.jsonc b/decompiler/config/jak3/ntsc_v1/var_names.jsonc index 7339fcdd8a..27497c9cc6 100644 --- a/decompiler/config/jak3/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak3/ntsc_v1/var_names.jsonc @@ -519,5 +519,22 @@ "stream", "expected-size" ] + }, + "gs-set-default-store-image": { + "args": [ + "packet", + "source-vram", + "width", + "tex-fmt", + "ssax", + "ssay", + "rrw", + "rrh" + ] + }, + "store-image": { + "args": [ + "work" + ] } } diff --git a/goal_src/jak3/engine/debug/memory-usage-h.gc b/goal_src/jak3/engine/debug/memory-usage-h.gc index 8a1d611cd6..d1580a4ad4 100644 --- a/goal_src/jak3/engine/debug/memory-usage-h.gc +++ b/goal_src/jak3/engine/debug/memory-usage-h.gc @@ -7,3 +7,33 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype memory-usage-info (structure) + ((name string) + (count int32) + (used int32) + (total int32) + ) + ) + + +(deftype memory-usage-block (basic) + ((work-bsp basic) + (length int32) + (data memory-usage-info 113 :inline) + ) + (:methods + (reset! (_type_) _type_) + (calculate-total (_type_) int) + (print-mem-usage (_type_ level object) _type_) + ) + ) + + +(define *mem-usage* (new 'debug 'memory-usage-block)) + +(define *dma-mem-usage* (new 'debug 'memory-usage-block)) + +(define *temp-mem-usage* (the-as memory-usage-block #f)) diff --git a/goal_src/jak3/engine/gfx/blit-displays-h.gc b/goal_src/jak3/engine/gfx/blit-displays-h.gc index 542595ad2b..b5a79e1ca6 100644 --- a/goal_src/jak3/engine/gfx/blit-displays-h.gc +++ b/goal_src/jak3/engine/gfx/blit-displays-h.gc @@ -7,3 +7,82 @@ ;; DECOMP BEGINS +(deftype blit-displays-work (structure) + ((adgif-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (contrast-tmpl dma-gif-packet :inline) + (sprite-slow-tmpl dma-gif-packet :inline) + (draw-slow-time-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (scan-tmpl dma-gif-packet :inline) + (color vector4w :inline) + (line-color uint64) + (scan-colors vector4w 15 :inline) + (zoom-blur-pos vector :inline) + (zoom-blur-count int32) + (zoom-blur-texels int32) + (zoom-blur-alpha-target float) + (zoom-blur-alpha-current float) + (zoom-blur-2d basic) + (menu-mode symbol) + (screen-copied symbol) + (vu1-enable-user-menu vu1-renderer-mask) + (texture-enable-user-menu uint32) + (count-down uint32) + (horizontal-flip-flag symbol) + (scan-alpha float) + (scanline uint32) + (progress-interp float) + (progress-interp-dest float) + (progress-interp-speed float) + (slow-time float) + ) + (:methods + (blit-displays-work-method-9 () none) + (blit-displays-work-method-10 () none) + (blit-displays-work-method-11 () none) + (blit-displays-work-method-12 () none) + (blit-displays-work-method-13 () none) + (blit-displays-work-method-14 () none) + (blit-displays-work-method-15 () none) + (blit-displays-work-method-16 () none) + (blit-displays-work-method-17 () none) + (blit-displays-work-method-18 () none) + (blit-displays-work-method-19 () none) + (blit-displays-work-method-20 () none) + (get-menu-mode (_type_) symbol) + (get-screen-copied (_type_) symbol) + (get-horizontal-flip-flag (_type_) symbol) + (set-menu-mode (_type_ symbol) symbol) + (set-screen-copied (_type_ symbol) symbol) + (set-horizontal-flip-flag (_type_ symbol) symbol) + ) + ) + + +(defmethod get-menu-mode ((this blit-displays-work)) + (-> this menu-mode) + ) + +(defmethod get-screen-copied ((this blit-displays-work)) + (-> this screen-copied) + ) + +(defmethod get-horizontal-flip-flag ((this blit-displays-work)) + (-> this horizontal-flip-flag) + ) + +(defmethod set-menu-mode ((this blit-displays-work) (arg0 symbol)) + (set! (-> this menu-mode) arg0) + arg0 + ) + +(defmethod set-screen-copied ((this blit-displays-work) (arg0 symbol)) + (set! (-> this screen-copied) arg0) + arg0 + ) + +(defmethod set-horizontal-flip-flag ((this blit-displays-work) (arg0 symbol)) + (set! (-> this horizontal-flip-flag) arg0) + arg0 + ) diff --git a/goal_src/jak3/engine/gfx/foreground/lights-h.gc b/goal_src/jak3/engine/gfx/foreground/lights-h.gc index f7acfbebac..d504279067 100644 --- a/goal_src/jak3/engine/gfx/foreground/lights-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/lights-h.gc @@ -25,6 +25,11 @@ (ambi light :inline) ) ) - +(deftype vu-lights (structure) + ((direction vector 3 :inline) + (color vector 3 :inline) + (ambient vector :inline) + ) + ) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-h.gc b/goal_src/jak3/engine/gfx/ocean/ocean-h.gc index 223020c01b..a4ced77ed3 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-h.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-h.gc @@ -7,125 +7,738 @@ ;; DECOMP BEGINS -(deftype ocean-spheres (structure) - ((spheres sphere 36 :inline :offset-assert 0) ;; guessed by decompiler +(deftype ocean-corner (structure) + ((bsphere sphere :inline) + (start-corner vector :inline) + (y-scales vector :inline) + (alphas vector :inline) + (colors uint32 4) ) - :method-count-assert 9 - :size-assert #x240 - :flag-assert #x900000240 ) + +(deftype ocean-wave-info (structure) + ((frequency float) + (amplitude float) + (wave-speed float) + (angle float) + (kx float) + (ky float) + (w float) + (flags int32) + ) + ) + + +(deftype ocean-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + ) + ) + + +(deftype ocean-spheres (structure) + ((spheres sphere 36 :inline) + ) + ) + + (deftype ocean-colors (structure) - ((colors rgba 2548 :offset-assert 0) ;; guessed by decompiler + ((colors rgba 2548) ) - :method-count-assert 9 - :size-assert #x27d0 - :flag-assert #x9000027d0 ) + (deftype ocean-colors-float (structure) - ((colors vector 2548 :inline :offset-assert 0) ;; guessed by decompiler + ((colors vector 2548 :inline) ) - :method-count-assert 9 - :size-assert #x9f40 - :flag-assert #x900009f40 ) + (deftype ocean-mid-mask (structure) - ((mask uint8 8 :offset-assert 0) ;; guessed by decompiler - (dword uint64 :offset 0) + ((mask uint8 8) + (dword uint64 :overlay-at (-> mask 0)) ) :pack-me - :method-count-assert 9 - :size-assert #x8 - :flag-assert #x900000008 ) + (deftype ocean-mid-indices (basic) - ((data uint16 36 :offset-assert 4) ;; guessed by decompiler + ((data uint16 36) ) - :method-count-assert 9 - :size-assert #x4c - :flag-assert #x90000004c ) + (deftype ocean-mid-masks (basic) - ((data (inline-array ocean-mid-mask) :offset-assert 4) ;; guessed by decompiler + ((data (inline-array ocean-mid-mask)) ) - :method-count-assert 9 - :size-assert #x8 - :flag-assert #x900000008 ) + (deftype ocean-trans-mask (structure) - ((mask uint8 4 :offset-assert 0) ;; guessed by decompiler - (word int32 :offset 0) + ((mask uint8 4) + (word int32 :overlay-at (-> mask 0)) ) :pack-me - :method-count-assert 9 - :size-assert #x4 - :flag-assert #x900000004 ) + (deftype ocean-trans-index (structure) - ((parent int16 :offset-assert 0) - (child int16 :offset-assert 2) + ((parent int16) + (child int16) ) :pack-me - :method-count-assert 9 - :size-assert #x4 - :flag-assert #x900000004 ) + (deftype ocean-trans-indices (basic) - ((data ocean-trans-index 2304 :inline :offset-assert 4) + ((data ocean-trans-index 2304 :inline) ) - :method-count-assert 9 - :size-assert #x2404 - :flag-assert #x900002404 ) + (deftype ocean-near-index (structure) - ((data uint16 16 :offset-assert 0) ;; guessed by decompiler + ((data uint16 16) ) - :method-count-assert 9 - :size-assert #x20 - :flag-assert #x900000020 ) + (deftype ocean-near-indices (basic) - ((data (inline-array ocean-near-index) :offset-assert 4) ;; guessed by decompiler + ((data (inline-array ocean-near-index)) ) - :method-count-assert 9 - :size-assert #x8 - :flag-assert #x900000008 ) + (deftype ocean-near-colors (structure) - ((color0 vector :inline :offset-assert 0) - (color1 vector :inline :offset-assert 16) - (color2 vector :inline :offset-assert 32) - (color3 vector :inline :offset-assert 48) + ((color0 vector :inline) + (color1 vector :inline) + (color2 vector :inline) + (color3 vector :inline) ) - :method-count-assert 9 - :size-assert #x40 - :flag-assert #x900000040 ) -(deftype ocean-map (structure) - ((start-corner vector :inline :offset-assert 0) - (far-color vector :inline :offset-assert 16) - (ocean-colors ocean-colors :offset-assert 32) - (ocean-mid-indices ocean-mid-indices :offset-assert 36) ;; guessed by decompiler - (ocean-trans-indices ocean-trans-indices :offset-assert 40) ;; guessed by decompiler - (ocean-near-indices ocean-near-indices :offset-assert 44) ;; guessed by decompiler - (ocean-mid-masks ocean-mid-masks :offset-assert 48) ;; guessed by decompiler + +(deftype ocean-trans-strip (structure) + ((verts uint128 10) + ) + ) + + +(deftype ocean-trans-strip-array (structure) + ((data ocean-trans-strip 4 :inline) + ) + ) + + +(deftype ocean-wave-data (structure) + ((data uint8 1024) + ) + ) + + +(deftype ocean-wave-frames (structure) + ((frame ocean-wave-data 64 :inline) + ) + ) + + +(deftype ocean-texture-constants (structure) + ((giftag gs-gif-tag :inline) + (buffers vector4w :inline) + (dests vector4w :inline) + (start vector :inline) + (offsets vector :inline) + (constants vector :inline) + (cam-nrm vector :inline) + ) + ) + + +(deftype ocean-mid-vertex (structure) + ((stq vector :inline) + (col vector :inline) + (pos vector :inline) + ) + ) + + +(deftype ocean-mid-constants (structure) + ((hmge-scale vector :inline) + (inv-hmge-scale vector :inline) + (hvdf-offset vector :inline) + (fog vector :inline) + (constants vector :inline) + (constants2 vector :inline) + (drw-fan gs-gif-tag :inline) + (env-fan gs-gif-tag :inline) + (drw-adgif gs-gif-tag :inline) + (drw-texture adgif-shader :inline) + (drw-strip-0 gs-gif-tag :inline) + (drw-strip-1 gs-gif-tag :inline) + (env-adgif gs-gif-tag :inline) + (env-texture adgif-shader :inline) + (env-strip gs-gif-tag :inline) + (env-color vector :inline) + (index-table vector4w 8 :inline) + (pos0 vector :inline) + (pos1 vector :inline) + (pos2 vector :inline) + (pos3 vector :inline) + ) + ) + + +(deftype ocean-mid-upload (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (colors uint128 108) + (masks uint128 2) + ) + ) + + +(deftype ocean-mid-upload2 (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (count vector4w :inline) + (tex0 vector :inline) + (tex1 vector :inline) + (tex2 vector :inline) + (tex3 vector :inline) + (clr0 vector :inline) + (clr1 vector :inline) + (clr2 vector :inline) + (clr3 vector :inline) + (verts uint128 18) + ) + ) + + +(deftype ocean-mid-work (structure) + ((env0 vector :inline) + (env1 vector :inline) + (env2 vector :inline) + (hmg0 vector :inline) + (hmg1 vector :inline) + (hmg2 vector :inline) + (indices uint128 16) + ) + ) + + +(deftype ocean-near-constants (structure) + ((hmge-scale vector :inline) + (inv-hmge-scale vector :inline) + (hvdf-offset vector :inline) + (fog vector :inline) + (constants vector :inline) + (constants2 vector :inline) + (constants3 vector :inline) + (constants4 vector :inline) + (constants5 vector :inline) + (drw-fan gs-gif-tag :inline) + (drw2-fan gs-gif-tag :inline) + (env-fan gs-gif-tag :inline) + (drw-adgif gs-gif-tag :inline) + (drw-texture adgif-shader :inline) + (drw-strip gs-gif-tag :inline) + (env-adgif gs-gif-tag :inline) + (env-texture adgif-shader :inline) + (env-strip gs-gif-tag :inline) + (env-color vector :inline) + (drw2-adgif gs-gif-tag :inline) + (drw2-tex0 qword :inline) + (drw2-frame qword :inline) + (drw2-strip gs-gif-tag :inline) + (drw3-adgif gs-gif-tag :inline) + (drw3-frame gs-adcmd :inline) + (index-table vector4w 4 :inline) + ) + ) + + +(deftype ocean-near-upload (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (masks uint128 2) + (start-height vector4w :inline) + (start-st vector :inline) + (near-colors ocean-near-colors :inline) + ) + ) + + +(deftype ocean-near-vertex (structure) + ((stq vector :inline) + (clr vector :inline) + (pos vector :inline) + ) + ) + + +(deftype ocean-near-work (structure) + ((verts-ptr vector :inline) + (indices uint128 16) + ) + ) + + +(deftype ocean-height-array (structure) + ((data float 1024) + ) + ) + + +(deftype ocean-vert-array (structure) + ((data vector 2048 :inline) + ) + ) + + +(deftype ocean-map (structure) + ((start-corner vector :inline) + (far-color vector :inline) + (ocean-colors ocean-colors) + (ocean-mid-indices ocean-mid-indices) + (ocean-trans-indices ocean-trans-indices) + (ocean-near-indices ocean-near-indices) + (ocean-mid-masks ocean-mid-masks) ) - :method-count-assert 11 - :size-assert #x34 - :flag-assert #xb00000034 (:methods - (set-height! (_type_ float) none) ;; 9 - (get-base-height (_type_) float) ;; 10 + (set-height! (_type_ float) none) + (get-base-height (_type_) float) ) ) + + +(deftype ocean (ocean-map) + ((off symbol) + (near-off symbol) + (mid-off symbol) + (far-on symbol) + (all-on basic) + (ocean-facing uint32) + (heights ocean-height-array) + (heights2 ocean-height-array) + (verts ocean-vert-array) + (ocean-near-translucent? symbol) + (deltas vector :inline) + (map-min vector :inline) + (map-max vector :inline) + (interp vector :inline) + (corner-array ocean-corner 25 :inline) + (corner-count int32) + (temp-vecs vector 4 :inline) + (mid-mask-ptrs pointer 36) + (mid-camera-masks uint64 36) + (trans-mask-ptrs pointer 64) + (trans-camera-masks ocean-trans-mask 16) + (trans-temp-masks uint32 16) + (sprite-tmpl dma-gif-packet :inline) + (sprite-tmpl2 dma-gif-packet :inline) + (sprite-tmpl3 dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (sun-tmpl dma-gif-packet :inline) + (erase-tmpl dma-gif-packet :inline) + (haze-tmpl dma-gif-packet :inline) + (cloud-tmpl dma-gif-packet :inline) + (clut-tmpl dma-gif-packet :inline) + (cloud-lights cloud-lights :inline) + (haze-lights haze-lights :inline) + (constant vector :inline) + (sky-color vector :inline) + (haze-verts vector4w 32 :inline) + (cloud-verts vector4w 36 :inline) + (cloud-nrms vector 36 :inline) + (cloud-col0 vector 36 :inline) + (cloud-col1 vector 36 :inline) + (cloud-st0 vector 36 :inline) + (cloud-st1 vector 36 :inline) + (color80808080 vector4w :inline) + (color80808040 vector4w :inline) + (color80808000 vector4w :inline) + (st0000 vector :inline) + (st0505 vector :inline) + (st1010 vector :inline) + (uv00 vector4w :inline) + (uv44 vector4w :inline) + (uv88 vector4w :inline) + (uv1010 vector4w :inline) + (uv2020 vector4w :inline) + (uv4040 vector4w :inline) + (uv8080 vector4w :inline) + (xy00 vector4w :inline) + (xy88 vector4w :inline) + (xy1010 vector4w :inline) + (xy2020 vector4w :inline) + (xy4040 vector4w :inline) + (xy8080 vector4w :inline) + (cloud-alpha uint8 36) + (near-mask-indices uint16 16) + (mid-minx uint8) + (mid-maxx uint8) + (mid-minz uint8) + (mid-maxz uint8) + (near-minx uint8) + (near-maxx uint8) + (near-minz uint8) + (near-maxz uint8) + (temp-minx uint8) + (temp-maxx uint8) + (temp-minz uint8) + (temp-maxz uint8) + (tex1 gs-tex1) + (tex1-near gs-tex1) + (corner00 float) + (corner01 float) + (corner10 float) + (corner11 float) + (frame-num float) + (frame-speed float) + (frame-num2 float) + (frame-speed2 float) + (cloud-interp float :overlay-at (-> constant data 3)) + (scales vector :inline) + (mask-hi vector4w :inline) + (mask-lo vector4w :inline) + (lights vu-lights :inline) + (uv-scroll-0 vector4w :inline) + (uv-scroll-1 vector4w :inline) + (st-scroll vector2 :inline) + (wait-to-vu0 uint32) + ) + (:methods + (ocean-method-11 () none) + (ocean-method-12 () none) + (ocean-method-13 () none) + (ocean-method-14 () none) + (ocean-method-15 () none) + (ocean-method-16 () none) + (ocean-method-17 () none) + (ocean-method-18 () none) + (ocean-method-19 () none) + (ocean-method-20 () none) + (ocean-method-21 () none) + (ocean-method-22 () none) + (ocean-method-23 () none) + (ocean-method-24 () none) + (ocean-method-25 () none) + (ocean-method-26 () none) + (ocean-method-27 () none) + (ocean-method-28 () none) + (ocean-method-29 () none) + (ocean-method-30 () none) + (ocean-method-31 () none) + (ocean-method-32 () none) + (ocean-method-33 () none) + (ocean-method-34 () none) + (ocean-method-35 () none) + (ocean-method-36 () none) + (ocean-method-37 () none) + (ocean-method-38 () none) + (ocean-method-39 () none) + (ocean-method-40 () none) + (ocean-method-41 () none) + (ocean-method-42 () none) + (ocean-method-43 () none) + (ocean-method-44 () none) + (ocean-method-45 () none) + (ocean-method-46 () none) + (ocean-method-47 () none) + (ocean-method-48 () none) + (ocean-method-49 () none) + (ocean-method-50 () none) + (ocean-method-51 () none) + (ocean-method-52 () none) + (ocean-method-53 () none) + (ocean-method-54 () none) + (ocean-method-55 () none) + (ocean-method-56 () none) + (ocean-method-57 () none) + (ocean-method-58 () none) + (ocean-method-59 () none) + (ocean-method-60 () none) + (ocean-method-61 () none) + (ocean-method-62 () none) + (ocean-method-63 () none) + (ocean-method-64 () none) + (ocean-method-65 () none) + (ocean-method-66 () none) + (ocean-method-67 () none) + (ocean-method-68 () none) + (ocean-method-69 () none) + (ocean-method-70 () none) + (ocean-method-71 () none) + (ocean-method-72 () none) + (ocean-method-73 () none) + (ocean-method-74 () none) + (ocean-method-75 () none) + (ocean-method-76 () none) + (ocean-method-77 () none) + (ocean-method-78 () none) + (ocean-method-79 () none) + (ocean-method-80 () none) + (ocean-method-81 () none) + (ocean-method-82 () none) + (ocean-method-83 () none) + (ocean-method-84 () none) + (ocean-method-85 () none) + (ocean-method-86 () none) + (ocean-method-87 () none) + (ocean-method-88 () none) + (ocean-method-89 () none) + (ocean-method-90 () none) + (ocean-method-91 () none) + ) + ) + + +(define *ocean-map* (the-as ocean-map #f)) + +(define *ocean* (new 'static 'ocean + :sprite-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x508b400000008001 #x53531) + ) + :sprite-tmpl2 (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x3023400000008001 #x551) + ) + :sprite-tmpl3 (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :adgif-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :line-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x141 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x141 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x5008c00000008040 #x52521) + ) + :sun-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :erase-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x3003400000008001 #x551) + ) + :haze-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x45 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x45 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x4026400000008011 #x4141) + ) + :cloud-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x25 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x25 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x602e400000008006 #x421421) + ) + :clut-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x800000000008040 #x0) + ) + :constant (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :haze-verts (new 'static 'inline-array vector4w 32 + (new 'static 'vector4w :x #x400 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x400 :y #x600 :z #xffffff) + (new 'static 'vector4w :x #x4a0 :y #x590 :z #xffffff) + (new 'static 'vector4w :x #x4c0 :y #x5e0 :z #xffffff) + (new 'static 'vector4w :x #x530 :y #x530 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x590 :y #x4a0 :z #xffffff) + (new 'static 'vector4w :x #x5e0 :y #x4c0 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x3f0 :z #xffffff) + (new 'static 'vector4w :x #x600 :y #x3f0 :z #xffffff) + (new 'static 'vector4w :x #x590 :y #x350 :z #xffffff) + (new 'static 'vector4w :x #x5e0 :y #x330 :z #xffffff) + (new 'static 'vector4w :x #x530 :y #x2c0 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x4a0 :y #x260 :z #xffffff) + (new 'static 'vector4w :x #x4c0 :y #x210 :z #xffffff) + (new 'static 'vector4w :x #x3f0 :y #x240 :z #xffffff) + (new 'static 'vector4w :x #x3f0 :y #x1f0 :z #xffffff) + (new 'static 'vector4w :x #x350 :y #x260 :z #xffffff) + (new 'static 'vector4w :x #x330 :y #x210 :z #xffffff) + (new 'static 'vector4w :x #x2c0 :y #x2c0 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x260 :y #x350 :z #xffffff) + (new 'static 'vector4w :x #x210 :y #x330 :z #xffffff) + (new 'static 'vector4w :x #x240 :y #x400 :z #xffffff) + (new 'static 'vector4w :x #x1f0 :y #x400 :z #xffffff) + (new 'static 'vector4w :x #x260 :y #x4a0 :z #xffffff) + (new 'static 'vector4w :x #x210 :y #x4c0 :z #xffffff) + (new 'static 'vector4w :x #x2c0 :y #x530 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x350 :y #x590 :z #xffffff) + (new 'static 'vector4w :x #x330 :y #x5e0 :z #xffffff) + ) + :cloud-verts (new 'static 'inline-array vector4w 36 + (new 'static 'vector4w :x #x290 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x310 :y #x230 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x200 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x200 :z #xffffff) + (new 'static 'vector4w :x #x4e0 :y #x230 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x230 :y #x310 :z #xffffff) + (new 'static 'vector4w :x #x300 :y #x300 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x2b0 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x2b0 :z #xffffff) + (new 'static 'vector4w :x #x4f0 :y #x300 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x310 :z #xffffff) + (new 'static 'vector4w :x #x200 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x2b0 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x380 :y #x380 :z #xffffff) + (new 'static 'vector4w :x #x470 :y #x380 :z #xffffff) + (new 'static 'vector4w :x #x540 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x5f0 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x200 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x2b0 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x380 :y #x470 :z #xffffff) + (new 'static 'vector4w :x #x470 :y #x470 :z #xffffff) + (new 'static 'vector4w :x #x540 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x5f0 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x230 :y #x4e0 :z #xffffff) + (new 'static 'vector4w :x #x300 :y #x4f0 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x540 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x540 :z #xffffff) + (new 'static 'vector4w :x #x4f0 :y #x4f0 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x4e0 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x310 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x5f0 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x5f0 :z #xffffff) + (new 'static 'vector4w :x #x4e0 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x560 :z #xffffff) + ) + :cloud-nrms (new 'static 'inline-array vector 36 + (new 'static 'vector :x -0.4999 :y 0.7071 :z -0.5) + (new 'static 'vector :x -0.3209 :y 0.7071 :z -0.63) + (new 'static 'vector :x -0.1105 :y 0.7071 :z -0.6984) + (new 'static 'vector :x 0.1105 :y 0.7071 :z -0.6983) + (new 'static 'vector :x 0.321 :y 0.7071 :z -0.63) + (new 'static 'vector :x 0.5 :y 0.7071 :z -0.4999) + (new 'static 'vector :x -0.63 :y 0.7071 :z -0.321) + (new 'static 'vector :x -0.3921 :y 0.832 :z -0.3922) + (new 'static 'vector :x -0.1434 :y 0.832 :z -0.5358) + (new 'static 'vector :x 0.1435 :y 0.832 :z -0.5357) + (new 'static 'vector :x 0.3922 :y 0.832 :z -0.3921) + (new 'static 'vector :x 0.63 :y 0.7071 :z -0.3209) + (new 'static 'vector :x -0.6983 :y 0.7071 :z -0.1106) + (new 'static 'vector :x -0.5357 :y 0.832 :z -0.1435) + (new 'static 'vector :x -0.334 :y 0.8814 :z -0.334) + (new 'static 'vector :x 0.334 :y 0.8814 :z -0.334) + (new 'static 'vector :x 0.5358 :y 0.832 :z -0.1434) + (new 'static 'vector :x 0.6984 :y 0.7071 :z -0.1105) + (new 'static 'vector :x -0.6984 :y 0.7071 :z 0.1105) + (new 'static 'vector :x -0.5358 :y 0.832 :z 0.1435) + (new 'static 'vector :x -0.334 :y 0.8814 :z 0.334) + (new 'static 'vector :x 0.334 :y 0.8814 :z 0.334) + (new 'static 'vector :x 0.5357 :y 0.832 :z 0.1435) + (new 'static 'vector :x 0.6983 :y 0.7071 :z 0.1105) + (new 'static 'vector :x -0.63 :y 0.7071 :z 0.321) + (new 'static 'vector :x -0.3922 :y 0.832 :z 0.3921) + (new 'static 'vector :x -0.1435 :y 0.832 :z 0.5357) + (new 'static 'vector :x 0.1435 :y 0.832 :z 0.5358) + (new 'static 'vector :x 0.3922 :y 0.832 :z 0.3922) + (new 'static 'vector :x 0.63 :y 0.7071 :z 0.321) + (new 'static 'vector :x -0.5 :y 0.7071 :z 0.4999) + (new 'static 'vector :x -0.321 :y 0.7071 :z 0.63) + (new 'static 'vector :x -0.1106 :y 0.7071 :z 0.6983) + (new 'static 'vector :x 0.1105 :y 0.7071 :z 0.6984) + (new 'static 'vector :x 0.321 :y 0.7071 :z 0.63) + (new 'static 'vector :x 0.4999 :y 0.7071 :z 0.5) + ) + :color80808080 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + :color80808040 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w 64) + :color80808000 (new 'static 'vector4w :x #x80 :y #x80 :z #x80) + :st0000 (new 'static 'vector :z 1.0) + :st0505 (new 'static 'vector :x 0.5 :y 0.5 :z 1.0) + :st1010 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :uv44 (new 'static 'vector4w :x 64 :y 64) + :uv88 (new 'static 'vector4w :x #x80 :y #x80) + :uv1010 (new 'static 'vector4w :x #x100 :y #x100) + :uv2020 (new 'static 'vector4w :x #x200 :y #x200) + :uv4040 (new 'static 'vector4w :x #x400 :y #x400) + :uv8080 (new 'static 'vector4w :x #x800 :y #x800) + :xy00 (new 'static 'vector4w :z #xffffff) + :xy88 (new 'static 'vector4w :x #x80 :y #x80 :z #xffffff) + :xy1010 (new 'static 'vector4w :x #x100 :y #x100 :z #xffffff) + :xy2020 (new 'static 'vector4w :x #x200 :y #x200 :z #xffffff) + :xy4040 (new 'static 'vector4w :x #x400 :y #x400 :z #xffffff) + :xy8080 (new 'static 'vector4w :x #x800 :y #x800 :z #xffffff) + :cloud-alpha (new 'static 'array uint8 36 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + ) + :tex1 (new 'static 'gs-tex1 :mxl #x6 :mmag #x1 :mmin #x5 :l #x1 :k #xeed) + :tex1-near (new 'static 'gs-tex1 :mxl #x3 :mmag #x1 :mmin #x5 :l #x1 :k #xeed) + :scales (new 'static 'vector :x -0.00012207031 :y 255.0 :z -0.00012207031 :w 128.0) + :mask-hi (new 'static 'vector4w :x -65536 :y -65536 :z -65536 :w -65536) + :mask-lo (new 'static 'vector4w :x #xffff :y #xffff :z #xffff :w #xffff) + ) + ) diff --git a/goal_src/jak3/engine/gfx/sky/sky-h.gc b/goal_src/jak3/engine/gfx/sky/sky-h.gc index ce213a40c8..c03cf717b6 100644 --- a/goal_src/jak3/engine/gfx/sky/sky-h.gc +++ b/goal_src/jak3/engine/gfx/sky/sky-h.gc @@ -7,3 +7,220 @@ ;; DECOMP BEGINS +(deftype sky-color-hour (structure) + ((snapshot1 int32) + (snapshot2 int32) + (morph-start float) + (morph-end float) + ) + ) + + +(deftype sky-color-day (structure) + ((hour sky-color-hour 24 :inline) + ) + ) + + +(deftype sky-sun-data (structure) + ((data uint128 4) + (pos vector :inline :overlay-at (-> data 0)) + (r-sun float :overlay-at (-> data 1)) + (r-halo float :offset 20) + (r-aurora float :offset 24) + (c-sun-start rgba :overlay-at (-> data 2)) + (c-sun-end rgba :overlay-at (-> data 3)) + (c-halo-start rgba :offset 36) + (c-halo-end rgba :offset 52) + (c-aurora-start rgba :offset 40) + (c-aurora-end rgba :offset 56) + ) + ) + + +(deftype sky-moon-data (structure) + ((data uint128 2) + (pos vector :inline :overlay-at (-> data 0)) + (scale vector :inline :overlay-at (-> data 1)) + ) + ) + + +(deftype sky-orbit (structure) + ((high-noon float) + (tilt float) + (rise float) + (dist float) + (min-halo float) + (max-halo float) + ) + :allow-misaligned + ) + + +(deftype sky-upload-data (structure) + ((data uint128 16) + (sun sky-sun-data 2 :inline :overlay-at (-> data 0)) + (moon sky-moon-data :inline :overlay-at (-> data 8)) + (day-star sky-moon-data :inline :overlay-at (-> data 12)) + ) + ) + + +(deftype sky-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + ) + ) + + + +(deftype cloud-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + (nrm vector :inline) + (stq2 vector :inline) + (col2 vector :inline) + (nrm2 vector :inline) + ) + ) + + +(deftype cloud-vert-array (structure) + ((data cloud-vertex 100 :inline) + ) + ) + + +(deftype haze-vertex (structure) + ((pos vector :inline) + (nrm vector :inline) + (col vector :inline) + ) + ) + + +(deftype haze-vert-array (structure) + ((data haze-vertex 36 :inline) + ) + ) + + +(deftype cloud-lights (structure) + ((sun0-normal vector :inline) + (sun1-normal vector :inline) + (moon-normal vector :inline) + (ambi-color vector :inline) + (ambi-color-lower vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-color-lower vector :inline) + (sun0-scale float) + (sun1-scale float) + (moon-scale float) + ) + ) + + +(deftype haze-lights (structure) + ((sun0-normal vector :inline) + (sun1-normal vector :inline) + (moon-normal vector :inline) + (ambi-color vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-scale float) + (sun1-scale float) + (moon-scale float) + ) + ) + + +(deftype sky-work (structure) + ((adgif-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (draw-tmpl2 dma-gif-packet :inline) + (fog-tmpl dma-gif-packet :inline) + (blend-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (sprite-tmpl2 dma-gif-packet :inline) + (sun-coords vector 2 :inline) + (green-coords vector 2 :inline) + (moon0-coords vector 2 :inline) + (moon1-coords vector 2 :inline) + (moon2-coords vector 2 :inline) + (day-star-coords vector 2 :inline) + (star-coords vector 2 :inline) + (sun-colors vector4w 2 :inline) + (green-colors vector4w 2 :inline) + (moon-colors vector4w 3 :inline) + (day-star-colors vector4w 3 :inline) + (star-colors vector4w 16 :inline) + (st-coords vector 2 :inline) + (random vector4w 8 :inline) + (giftag-base dma-gif :inline) + (giftag-haze dma-gif :inline) + (giftag-roof dma-gif :inline) + (giftag-ocean dma-gif :inline) + (fog vector :inline) + (sky float 8) + (time float) + (off-s uint16) + (off-t uint16) + (orbit sky-orbit 3 :inline) + (upload-data sky-upload-data :inline) + (ambi-color vector :inline) + (ambi-color-lower vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-color-lower vector :inline) + (cam-mat matrix :inline) + (star-mat matrix :inline) + (vec0 vector4w :inline) + (vec1 vector4w :inline) + (cloud-lights cloud-lights :inline) + (haze-lights haze-lights :inline) + (buf dma-buffer) + (draw-vortex basic) + (day-star-scale float) + (stars vector 512 :inline) + (disable-day-star basic) + ) + (:methods + (sky-work-method-9 () none) + (sky-work-method-10 () none) + (sky-work-method-11 () none) + (sky-work-method-12 () none) + (sky-work-method-13 () none) + (sky-work-method-14 () none) + (sky-work-method-15 () none) + (sky-work-method-16 () none) + (sky-work-method-17 () none) + (sky-work-method-18 () none) + (sky-work-method-19 () none) + (sky-work-method-20 () none) + (sky-work-method-21 () none) + (sky-work-method-22 () none) + (sky-work-method-23 () none) + (sky-work-method-24 () none) + (sky-work-method-25 () none) + (sky-work-method-26 () none) + (sky-work-method-27 () none) + (sky-work-method-28 () none) + (sky-work-method-29 () none) + (sky-work-method-30 () none) + (sky-work-method-31 () none) + (sky-work-method-32 () none) + (sky-work-method-33 () none) + (sky-work-method-34 () none) + (sky-work-method-35 () none) + (sky-work-method-36 () none) + (sky-work-method-37 () none) + (sky-work-method-38 () none) + ) + ) diff --git a/goal_src/jak3/engine/ui/bigmap-h.gc b/goal_src/jak3/engine/ui/bigmap-h.gc index 9e0c4512bf..d5ae745574 100644 --- a/goal_src/jak3/engine/ui/bigmap-h.gc +++ b/goal_src/jak3/engine/ui/bigmap-h.gc @@ -7,3 +7,72 @@ ;; DECOMP BEGINS +(deftype bigmap-image (structure) + ((clut-offset uint32) + (image-offset uint32) + (width uint32) + (height uint32) + (data uint8 1) + ) + ) + + +(deftype bigmap-info (vector) + ((scale float :overlay-at (-> data 2)) + (inv-scale float :overlay-at (-> data 3)) + ) + ) + + +(deftype bigmap-info-array (structure) + ((data bigmap-info 24 :inline) + ) + ) + + +(deftype bigmap (basic) + ((drawing-flag symbol) + (loading-flag symbol) + (bigmap-index uint32) + (bigmap-image external-art-buffer) + (tpage external-art-buffer) + (tpage2 basic) + (progress-minimap texture-page) + (progress-minimap2 basic) + (load-index uint32) + (x0 int32) + (y0 int32) + (x1 int32) + (y1 int32) + (goal-time float) + (sprite-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (offset vector :inline) + (size float :overlay-at (-> offset data 2)) + (scale float :overlay-at (-> offset data 3)) + (scroll vector :inline) + (pos vector4w :inline) + (color vector4w :inline) + (corner vector 4 :inline) + (auto-save-icon-flag symbol) + (global-flags uint32) + ) + (:methods + (new (symbol type) _type_) + (bigmap-method-9 () none) + (bigmap-method-10 () none) + (bigmap-method-11 () none) + (bigmap-method-12 () none) + (bigmap-method-13 () none) + (bigmap-method-14 () none) + (bigmap-method-15 () none) + (bigmap-method-16 () none) + (bigmap-method-17 () none) + (bigmap-method-18 () none) + (bigmap-method-19 () none) + (bigmap-method-20 () none) + (bigmap-method-21 () none) + (bigmap-method-22 () none) + ) + ) diff --git a/goal_src/jak3/engine/ui/minimap-h.gc b/goal_src/jak3/engine/ui/minimap-h.gc index f342a7469f..5c4744f59f 100644 --- a/goal_src/jak3/engine/ui/minimap-h.gc +++ b/goal_src/jak3/engine/ui/minimap-h.gc @@ -5,5 +5,348 @@ ;; name in dgo: minimap-h ;; dgos: GAME +(defenum minimap-flag + :type uint32 + :bitfield #t + (active 0) + (fade-in 1) + (fade-out 2) + (clamp 3) + (trail 4) + (task-graph 5) + (flash 6) + (minimap 7) + (background 8) + (task 9) + (enemy 10) + (frustum 11) + (racer 12) + (bigmap 13) + (bigmap-only 14) + (goal 15) + (local-only 16) + (transport 17) + (ctywide 18) + (wasall 19) + (waswide 20) + (desert 21) + ) + +(defenum minimap-class + :type uint16 + (none 0) + (onintent 1) + (vinroom 2) + (sewer-kg 3) + (sewer-genb 4) + (sewer-slumb 5) + (hiphog 6) + (gungame 7) + (gun-yellow 8) + (desert-nest-entrance 9) + (guard 10) + (parking-spot 11) + (goal 12) + (goal-no-trail 13) + (goal-no-trail-bigmap 14) + (cty-sniper-vicinity 15) + (forest 16) + (wascity-gungame 17) + (city-transport 18) + (wascity-leaper-race 19) + (wascity-pre-game 20) + (desert-transport 21) + (waspal 22) + (stadium 23) + (wasteland-arena 24) + (guard-frustum 25) + (wasdoors 26) + (gun-dark 27) + (spargus-city 28) + (racer 29) + (racer-target 30) + (racer-errol 31) + (monk-temple 32) + (bbush-desd 33) + (bbush-desc 34) + (bbush-desa 35) + (bbush-desg 36) + (bbush-desh 37) + (bbush-desc-2 38) + (bbush-dese 39) + (bbush-desb 40) + (bbush-desa-2 41) + (bbush-desc-3 42) + (bbush-desg-2 43) + (bbush-desd-2 44) + (bbush-desg-3 45) + (bbush-dese-2 46) + (bbush-dese-3 47) + (bbush-desd-3 48) + (bbush-desb-2 49) + (bbush-wasa-1 50) + (bbush-wasa-2 51) + (bbush-wasa-3 52) + (bbush-wasa-4 53) + (bbush-wasb-2 54) + (bbush-wasb-1 55) + (bbush-wasb-4 56) + (bbush-wasb-3 57) + (bbush-desg-4 58) + (bbush-wasb-5 59) + (bbush-wasb-6 60) + (bbush-desa-3 61) + (bbush-wasa-5 62) + (bbush-desd-4 63) + (bbush-desd-5 64) + (bbush-sluma-1 65) + (bbush-genb-1 66) + (bbush-slumb-1 67) + (bbush-slumb-3 68) + (bbush-desc-4 69) + (bbush-inda-1 70) + (bbush-dese-4 71) + (bbush-desc-5 72) + (bbush-desb-3 73) + (bbush-wasa-6 74) + (bbush-wasb-7 75) + (bbush-indb-1 76) + (bbush-desf 77) + (bbush-port-1 78) + (bbush-genb-2 79) + (bbush-genb-3 80) + (bbush-genb-4 81) + (bbush-slumb-4 82) + (bbush-slumc-1 83) + (bbush-dese-5 84) + (bbush-post-game 85) + (bbush-slumc-2 86) + (bbush-sluma-2 87) + (bbush-sluma-3 88) + (bbush-indb-2 89) + (bbush-indb-3 90) + (bbush-inda-2 91) + (bbush-inda-3 92) + (bbush-inda-4 93) + (bbush-inda-5 94) + (bbush-port-4 95) + (bbush-port-5 96) + (bbush-port-6 97) + (bbush-port-7 98) + (bbush-port-8 99) + (bbush-desb-4 100) + (atoll-valve 101) + (atoll-ashelin 102) + (mountain-lens 103) + (mountain-shard 104) + (mountain-gear 105) + (ruins-hut 106) + (forest-samos 107) + (metalhead 108) + (kleever-arena 109) + (seem-wascitya 110) + (seem-wascityb 111) + (kleever-wasdoors 112) + (damus-wasdoors 113) + (damus-waspal 114) + (damus-arena 115) + (kleever-wascityb 116) + (red-clamped-dot 117) + (tiny-red-dot 118) + (desert-temple 119) + (desert-oasis 120) + (desert-corral 121) + (sig-wasdoors 122) + (freehq 123) + (green-clamped-dot 124) + (nest-cocoon 125) + (nest-bridge 126) + (factory 127) + (big-orange-flashing-clamped-dot 128) + (big-red-flashing-clamped-dot 129) + (big-green-flashing-clamped-dot 130) + (big-purple-flashing-clamped-dot 131) + (medium-purple-dot 132) + (parked-vehicle 133) + (samos-genb 134) + (projectile 135) + (desertb-race 136) + (big-red-flashing-trail-dot 137) + (big-green-flashing-trail-dot 138) + (robot-frustum 139) + (desert-marauder-village 140) + (gray-clamped-dot 141) + (volcano-monk 142) + (volcano-collapsing-rock 143) + (volcano-stone-lid 144) + (volcano-dark-maker-idol 145) + (medium-green-dot 146) + (big-red-flashing-dot 147) + (factory-clamped-target 148) + (factory-clamped-tower 149) + (desglide-ring-dot 150) + (desglide-thermal-dot 151) + (mine-elevator 152) + (mine-armor 153) + (mine-sign-up 154) + (mine-sign-down 155) + (mine-door 156) + (ruins-elec-gate 157) + (ruins-goal 158) + (dp-bipedal 159) + (neo-wasp 160) + (dark-maker 161) + (templea-door 162) + (templeb-watchers 163) + (templeb-regen 164) + (templeb-warpgate 165) + (templex-darkmaker 166) + (temple-tests-door 167) + (templeb-freeze 168) + (temple-elev 169) + (factoryc-vehicle 170) + (templeb-defend 171) + (templeb-seem 172) + (temple-defend-door-1 173) + (temple-defend-door-2 174) + (temple-defend-door-3 175) + (palace-ruins 176) + ) + ;; DECOMP BEGINS +(deftype minimap-table-entry (structure) + ((corner vector :inline) + (level-name basic) + (tex-name basic) + (meters-per-texel float) + (pos-scale float) + (min-inv-scale float) + (max-inv-scale float) + (switch-immediate basic) + ) + ) + + +(deftype minimap-class-node (structure) + ((default-position vector :inline) + (flags minimap-flag) + (name basic) + (icon-xy vector2ub :inline) + (class minimap-class) + (scale float) + (color rgba) + ) + (:methods + (minimap-class-node-method-9 () none) + ) + ) + + +(deftype connection-minimap (connection-pers) + ((next connection-minimap :override) + (handle handle :overlay-at update-time) + (position vector :overlay-at (-> param 0)) + (alpha float :overlay-at (-> param 1)) + (flags minimap-flag :overlay-at (-> param 2)) + (class minimap-class-node :overlay-at (-> param 3)) + (node uint16) + (edge-ry int16) + (last-world-pos vector :inline) + (last-relative-pos vector :inline) + ) + ) + + +(deftype engine-minimap (engine-pers) + ((alive-list connection-minimap :override) + (dead-list connection-minimap :override) + ) + ) + + +(deftype minimap-trail (structure) + ((used-by connection-minimap) + (search-id uint32) + (node-count int16) + (goal-node-id int32) + (node-path-dist float) + (last-updated uint64) + (cached-info trail-cached-search-info :inline) + (node-id uint16 64) + ) + (:methods + (minimap-trail-method-9 () none) + (minimap-trail-method-10 () none) + ) + ) + + +(deftype minimap-draw-work (structure) + ((buf dma-buffer) + (justify-right symbol) + (global-flags uint32) + (draw-pos vector4w :inline) + (mat matrix :inline) + (corner vector 4 :inline) + ) + ) + + +(deftype minimap (structure) + ((draw-tmpl dma-gif-packet :inline) + (draw2-tmpl dma-gif-packet :inline) + (draw3-tmpl dma-gif-packet :inline) + (draw4-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (color vector4w :inline) + (offset vector :inline) + (minimap-corner vector :inline) + (last-name string) + (last-tex basic) + (target-inv-scale float) + (map-bits uint64) + (level level) + (ctywide level) + (meters-per-texel float) + (pos-scale float) + (min-inv-scale float) + (max-inv-scale float) + (inv-scale float :overlay-at (-> offset data 1)) + (map-inv-scale float) + (icon-inv-scale float) + (fade float :overlay-at (-> offset data 3)) + (engine engine-minimap) + (engine-key uint32) + (trail minimap-trail 6 :inline) + (race-tex texture) + (race-scale float) + (race-level level) + (sprite2-tmpl dma-gif-packet :inline) + (race-corner vector :inline) + (goal-time float) + (frustum-alpha float) + ) + (:methods + (minimap-method-9 () none) + (minimap-method-10 () none) + (minimap-method-11 () none) + (minimap-method-12 () none) + (minimap-method-13 () none) + (minimap-method-14 () none) + (minimap-method-15 () none) + (minimap-method-16 () none) + (minimap-method-17 () none) + (minimap-method-18 () none) + (minimap-method-19 () none) + (minimap-method-20 () none) + (minimap-method-21 () none) + (minimap-method-22 () none) + (minimap-method-23 () none) + (minimap-method-24 () none) + (minimap-method-25 () none) + (minimap-method-26 () none) + (minimap-method-27 () none) + ) + ) diff --git a/goal_src/jak3/engine/util/capture-h.gc b/goal_src/jak3/engine/util/capture-h.gc index 5baeeb635e..aa206048bc 100644 --- a/goal_src/jak3/engine/util/capture-h.gc +++ b/goal_src/jak3/engine/util/capture-h.gc @@ -12,17 +12,17 @@ (deftype gs-store-image-packet (structure) ((vifcode vif-tag 4) - (giftag uint128) - (bitbltbuf uint64) - (bitbltbuf-addr uint64) - (trxpos uint64) - (trxpos-addr uint64) - (trxreg uint64) - (trxreg-addr uint64) + (giftag gif-tag) + (bitbltbuf gs-bitbltbuf) + (bitbltbuf-addr gs-reg64) + (trxpos gs-trxpos) + (trxpos-addr gs-reg64) + (trxreg gs-trxreg) + (trxreg-addr gs-reg64) (finish uint64) - (finish-addr uint64) - (trxdir uint64) - (trxdir-addr uint64) + (finish-addr gs-reg64) + (trxdir gs-trxdir) + (trxdir-addr gs-reg64) ) ) diff --git a/goal_src/jak3/engine/util/capture.gc b/goal_src/jak3/engine/util/capture.gc index 61d2e417eb..c7487d3ec1 100644 --- a/goal_src/jak3/engine/util/capture.gc +++ b/goal_src/jak3/engine/util/capture.gc @@ -7,3 +7,65 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defun gs-set-default-store-image ((packet gs-store-image-packet) + (source-vram int) + (width int) + (tex-fmt gs-psm) + (ssax int) + (ssay int) + (rrw int) + (rrh int) + ) + "Set up a gs-store-image-packet for copying VRAM data to RAM." + (set! (-> packet vifcode 0) (new 'static 'vif-tag)) + (set! (-> packet vifcode 1) (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd mskpath3))) + (set! (-> packet vifcode 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> packet vifcode 3) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> packet giftag) (new 'static 'gif-tag :nloop #x5 :eop #x1 :nreg #x1 :regs0 (gif-reg-id a+d))) + (set! (-> packet bitbltbuf) + (new 'static 'gs-bitbltbuf :sbp source-vram :sbw width :spsm (the-as int tex-fmt)) + ) + (set! (-> packet bitbltbuf-addr) (gs-reg64 bitbltbuf)) + (set! (-> packet trxpos) (new 'static 'gs-trxpos :ssax ssax :ssay ssay)) + (set! (-> packet trxpos-addr) (gs-reg64 trxpos)) + (set! (-> packet trxreg) (new 'static 'gs-trxreg :rrw rrw :rrh rrh)) + (set! (-> packet trxreg-addr) (gs-reg64 trxreg)) + (set! (-> packet finish) (the-as uint 0)) + (set! (-> packet finish-addr) (gs-reg64 finish)) + (set! (-> packet trxdir) (new 'static 'gs-trxdir :xdir #x1)) + (set! (-> packet trxdir-addr) (gs-reg64 trxdir)) + (.sync.l) + 7 + ) + +(defun store-image ((work screen-shot-work)) + "Take a screenshot!" + (let ((gp-0 512) + (s5-0 416) + ) + (let ((a3-0 (-> work count)) + (a2-0 (-> work name)) + ) + (set! (-> *image-name* data 0) (the-as uint 0)) + (format *image-name* "final/rawshots/~s-~d.raw" a2-0 a3-0) + ) + (format 0 "writing ~s~%" *image-name*) + (let ((s4-0 (new 'stack 'file-stream *image-name* 'write))) + (let ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf data))) + (let ((s2-0 (new 'static 'gs-store-image-packet))) + (gs-set-default-store-image s2-0 #x3300 (/ gp-0 64) (gs-psm ct32) 0 0 gp-0 s5-0) + (flush-cache 0) + (gs-store-image s2-0 s3-0) + ) + (sync-path 0 0) + (file-stream-write s4-0 s3-0 (the-as uint (* (* s5-0 gp-0) 4))) + ) + (file-stream-close s4-0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/city/common/trail-h.gc b/goal_src/jak3/levels/city/common/trail-h.gc index d5bf3024e0..ab083fe78f 100644 --- a/goal_src/jak3/levels/city/common/trail-h.gc +++ b/goal_src/jak3/levels/city/common/trail-h.gc @@ -5,5 +5,186 @@ ;; name in dgo: trail-h ;; dgos: GAME +(defenum trail-node-flag + :type uint8 + :bitfield #t + (tnf0 0) ;; unused?? + (tnf1 1) + ) + +(defenum conn-flag + :type uint8 + :bitfield #t + (cf0 0) + (cf1 1) + (cf2 2) + (cf3 3) + ) + ;; DECOMP BEGINS +(deftype trail-node (structure) + ((next-id int16) + (prev-id int16) + (parent-id int16) + (x int16) + (y int16) + (z int16) + (first-conn uint16) + (cost-from-start uint16) + (cost-to-goal uint16) + (flags trail-node-flag) + (conn-count uint8) + ) + (:methods + (trail-node-method-9 () none) + (trail-node-method-10 () none) + (trail-node-method-11 () none) + ) + ) + + +(deftype trail-visgroup (structure) + ((first-node uint16) + (node-count uint8) + (pad uint8) + ) + ) + + +(deftype trail-blocker (structure) + ((plane plane :inline) + (center vector :inline) + (radius-squared float :overlay-at (-> center data 3)) + ) + ) + + +(deftype trail-conn (structure) + ((head-id uint16) + (tail-id uint16) + (flags conn-flag) + (visgroup-id uint8) + (cost uint16) + ) + (:methods + (trail-conn-method-9 () none) + ) + ) + + +(deftype trail-conn-hash-cell (structure) + ((first-conn uint16) + (conn-count uint8) + (pov-count uint8) + (first-pov uint16) + ) + ) + + +(deftype trail-conn-search (structure) + ((best-conn-id int32) + (best-dist float) + (src-pos vector) + (conn-pos vector) + (debug-cells-searched int32) + (debug-conns-searched int32) + (bounds bounding-box4w :inline) + (cell-quads qword 2 :inline) + (conn-quads qword 7 :inline) + (cell-bits vector16ub 2 :inline :overlay-at cell-quads) + (conn-bits vector16ub 2 :inline :overlay-at conn-quads) + ) + ) + + +(deftype trail-conn-hash (basic) + ((cell-width meters) + (origin vector :inline) + (cell (inline-array trail-conn-hash-cell)) + (conn-ids (pointer uint16)) + ) + ) + + +(deftype trail-cached-search-info (structure) + ((goal-conn-id int16) + (orig-goal-pos vector :inline) + (conn-goal-pos vector :inline) + ) + ) + + +(deftype trail-cached-start-pov (structure) + ((last-updated uint64) + (pov-can-see-start uint64) + (next-node-id int32) + (start-pos vector :inline) + ) + ) + + +(deftype trail-graph (basic) + ((mode uint8) + (search-id uint32) + (open-head-id int16) + (goal-conn-id int16) + (goal-node-id int16) + (over-under-thresh float) + (over-under-above-too-low float) + (over-under-below-too-high float) + (pov-node-count uint16) + (node-count uint16) + (conn-count uint16) + (blocker-count uint16) + (conn-mask uint8) + (node (inline-array trail-node)) + (conn (inline-array trail-conn)) + (blocker uint32) + (conn-ids (pointer uint16)) + (visgroup (inline-array trail-conn-hash-cell)) + (visnode-ids (pointer uint16)) + (conn-hash trail-conn-hash) + (cell-pov-bit-arrays uint32) + (pov-can-see-goal uint64) + (cached-start-pov trail-cached-start-pov :inline) + (orig-start-pos vector :inline) + (orig-goal-pos vector :inline) + (conn-start-pos vector :inline) + (conn-goal-pos vector :inline) + (open-quads qword 6 :inline) + (closed-quads qword 6 :inline) + (open-bits vector16ub 2 :inline :overlay-at open-quads) + (closed-bits vector16ub 2 :inline :overlay-at closed-quads) + ) + (:methods + (trail-graph-method-9 () none) + (trail-graph-method-10 () none) + (trail-graph-method-11 () none) + (trail-graph-method-12 () none) + (trail-graph-method-13 () none) + (trail-graph-method-14 () none) + (trail-graph-method-15 () none) + (trail-graph-method-16 () none) + (trail-graph-method-17 () none) + (trail-graph-method-18 () none) + (trail-graph-method-19 () none) + (trail-graph-method-20 () none) + (trail-graph-method-21 () none) + (trail-graph-method-22 () none) + (trail-graph-method-23 () none) + (trail-graph-method-24 () none) + (trail-graph-method-25 () none) + (trail-graph-method-26 () none) + (trail-graph-method-27 () none) + (trail-graph-method-28 () none) + (trail-graph-method-29 () none) + (trail-graph-method-30 () none) + (trail-graph-method-31 () none) + (trail-graph-method-32 () none) + (trail-graph-method-33 () none) + ) + ) + + +(define *trail-graph* (the-as trail-graph #f)) diff --git a/test/decompiler/reference/jak3/engine/debug/memory-usage-h_REF.gc b/test/decompiler/reference/jak3/engine/debug/memory-usage-h_REF.gc new file mode 100644 index 0000000000..90efe8552d --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/memory-usage-h_REF.gc @@ -0,0 +1,72 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition of type memory-usage-info +(deftype memory-usage-info (structure) + ((name string) + (count int32) + (used int32) + (total int32) + ) + ) + +;; definition for method 3 of type memory-usage-info +(defmethod inspect ((this memory-usage-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'memory-usage-info) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tused: ~D~%" (-> this used)) + (format #t "~1Ttotal: ~D~%" (-> this total)) + (label cfg-4) + this + ) + +;; definition of type memory-usage-block +(deftype memory-usage-block (basic) + ((work-bsp basic) + (length int32) + (data memory-usage-info 113 :inline) + ) + (:methods + (reset! (_type_) _type_) + (calculate-total (_type_) int) + (print-mem-usage (_type_ level object) _type_) + ) + ) + +;; definition for method 3 of type memory-usage-block +(defmethod inspect ((this memory-usage-block)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Twork-bsp: ~A~%" (-> this work-bsp)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tdata[113] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for symbol *mem-usage*, type memory-usage-block +(define *mem-usage* (new 'debug 'memory-usage-block)) + +;; definition for symbol *dma-mem-usage*, type memory-usage-block +(define *dma-mem-usage* (new 'debug 'memory-usage-block)) + +;; definition for symbol *temp-mem-usage*, type memory-usage-block +(define *temp-mem-usage* (the-as memory-usage-block #f)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc new file mode 100644 index 0000000000..485c837979 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc @@ -0,0 +1,134 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type blit-displays-work +(deftype blit-displays-work (structure) + ((adgif-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (contrast-tmpl dma-gif-packet :inline) + (sprite-slow-tmpl dma-gif-packet :inline) + (draw-slow-time-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (scan-tmpl dma-gif-packet :inline) + (color vector4w :inline) + (line-color uint64) + (scan-colors vector4w 15 :inline) + (zoom-blur-pos vector :inline) + (zoom-blur-count int32) + (zoom-blur-texels int32) + (zoom-blur-alpha-target float) + (zoom-blur-alpha-current float) + (zoom-blur-2d basic) + (menu-mode symbol) + (screen-copied symbol) + (vu1-enable-user-menu vu1-renderer-mask) + (texture-enable-user-menu uint32) + (count-down uint32) + (horizontal-flip-flag symbol) + (scan-alpha float) + (scanline uint32) + (progress-interp float) + (progress-interp-dest float) + (progress-interp-speed float) + (slow-time float) + ) + (:methods + (blit-displays-work-method-9 () none) + (blit-displays-work-method-10 () none) + (blit-displays-work-method-11 () none) + (blit-displays-work-method-12 () none) + (blit-displays-work-method-13 () none) + (blit-displays-work-method-14 () none) + (blit-displays-work-method-15 () none) + (blit-displays-work-method-16 () none) + (blit-displays-work-method-17 () none) + (blit-displays-work-method-18 () none) + (blit-displays-work-method-19 () none) + (blit-displays-work-method-20 () none) + (get-menu-mode (_type_) symbol) + (get-screen-copied (_type_) symbol) + (get-horizontal-flip-flag (_type_) symbol) + (set-menu-mode (_type_ symbol) symbol) + (set-screen-copied (_type_ symbol) symbol) + (set-horizontal-flip-flag (_type_ symbol) symbol) + ) + ) + +;; definition for method 3 of type blit-displays-work +(defmethod inspect ((this blit-displays-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blit-displays-work) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tcontrast-tmpl: #~%" (-> this contrast-tmpl)) + (format #t "~1Tsprite-slow-tmpl: #~%" (-> this sprite-slow-tmpl)) + (format #t "~1Tdraw-slow-time-tmpl: #~%" (-> this draw-slow-time-tmpl)) + (format #t "~1Tline-tmpl: #~%" (-> this line-tmpl)) + (format #t "~1Tscan-tmpl: #~%" (-> this scan-tmpl)) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Tline-color: ~D~%" (-> this line-color)) + (format #t "~1Tscan-colors[15] @ #x~X~%" (-> this scan-colors)) + (format #t "~1Tzoom-blur-pos: #~%" (-> this zoom-blur-pos)) + (format #t "~1Tzoom-blur-count: ~D~%" (-> this zoom-blur-count)) + (format #t "~1Tzoom-blur-texels: ~D~%" (-> this zoom-blur-texels)) + (format #t "~1Tzoom-blur-alpha-target: ~f~%" (-> this zoom-blur-alpha-target)) + (format #t "~1Tzoom-blur-alpha-current: ~f~%" (-> this zoom-blur-alpha-current)) + (format #t "~1Tzoom-blur-2d: ~A~%" (-> this zoom-blur-2d)) + (format #t "~1Tmenu-mode: ~A~%" (-> this menu-mode)) + (format #t "~1Tscreen-copied: ~A~%" (-> this screen-copied)) + (format #t "~1Tvu1-enable-user-menu: ~D~%" (-> this vu1-enable-user-menu)) + (format #t "~1Ttexture-enable-user-menu: ~D~%" (-> this texture-enable-user-menu)) + (format #t "~1Tcount-down: ~D~%" (-> this count-down)) + (format #t "~1Thorizontal-flip-flag: ~A~%" (-> this horizontal-flip-flag)) + (format #t "~1Tscan-alpha: ~f~%" (-> this scan-alpha)) + (format #t "~1Tscanline: ~D~%" (-> this scanline)) + (format #t "~1Tprogress-interp: ~f~%" (-> this progress-interp)) + (format #t "~1Tprogress-interp-dest: ~f~%" (-> this progress-interp-dest)) + (format #t "~1Tprogress-interp-speed: ~f~%" (-> this progress-interp-speed)) + (format #t "~1Tslow-time: ~f~%" (-> this slow-time)) + (label cfg-4) + this + ) + +;; definition for method 21 of type blit-displays-work +(defmethod get-menu-mode ((this blit-displays-work)) + (-> this menu-mode) + ) + +;; definition for method 22 of type blit-displays-work +(defmethod get-screen-copied ((this blit-displays-work)) + (-> this screen-copied) + ) + +;; definition for method 23 of type blit-displays-work +(defmethod get-horizontal-flip-flag ((this blit-displays-work)) + (-> this horizontal-flip-flag) + ) + +;; definition for method 24 of type blit-displays-work +(defmethod set-menu-mode ((this blit-displays-work) (arg0 symbol)) + (set! (-> this menu-mode) arg0) + arg0 + ) + +;; definition for method 25 of type blit-displays-work +(defmethod set-screen-copied ((this blit-displays-work) (arg0 symbol)) + (set! (-> this screen-copied) arg0) + arg0 + ) + +;; definition for method 26 of type blit-displays-work +(defmethod set-horizontal-flip-flag ((this blit-displays-work) (arg0 symbol)) + (set! (-> this horizontal-flip-flag) arg0) + arg0 + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc new file mode 100644 index 0000000000..5619a240ab --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc @@ -0,0 +1,1350 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ocean-corner +(deftype ocean-corner (structure) + ((bsphere sphere :inline) + (start-corner vector :inline) + (y-scales vector :inline) + (alphas vector :inline) + (colors uint32 4) + ) + ) + +;; definition for method 3 of type ocean-corner +(defmethod inspect ((this ocean-corner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-corner) + (format #t "~1Tbsphere: #~%" (-> this bsphere)) + (format #t "~1Tstart-corner: #~%" (-> this start-corner)) + (format #t "~1Ty-scales: #~%" (-> this y-scales)) + (format #t "~1Talphas: #~%" (-> this alphas)) + (format #t "~1Tcolors[4] @ #x~X~%" (-> this colors)) + (label cfg-4) + this + ) + +;; definition of type ocean-wave-info +(deftype ocean-wave-info (structure) + ((frequency float) + (amplitude float) + (wave-speed float) + (angle float) + (kx float) + (ky float) + (w float) + (flags int32) + ) + ) + +;; definition for method 3 of type ocean-wave-info +(defmethod inspect ((this ocean-wave-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-wave-info) + (format #t "~1Tfrequency: ~f~%" (-> this frequency)) + (format #t "~1Tamplitude: ~f~%" (-> this amplitude)) + (format #t "~1Twave-speed: ~f~%" (-> this wave-speed)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (format #t "~1Tkx: ~f~%" (-> this kx)) + (format #t "~1Tky: ~f~%" (-> this ky)) + (format #t "~1Tw: ~f~%" (-> this w)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type ocean-vertex +(deftype ocean-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + ) + ) + +;; definition for method 3 of type ocean-vertex +(defmethod inspect ((this ocean-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-vertex) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tstq: #~%" (-> this stq)) + (format #t "~1Tcol: #~%" (-> this col)) + (label cfg-4) + this + ) + +;; definition of type ocean-spheres +(deftype ocean-spheres (structure) + ((spheres sphere 36 :inline) + ) + ) + +;; definition for method 3 of type ocean-spheres +(defmethod inspect ((this ocean-spheres)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-spheres) + (format #t "~1Tspheres[36] @ #x~X~%" (-> this spheres)) + (label cfg-4) + this + ) + +;; definition of type ocean-colors +(deftype ocean-colors (structure) + ((colors rgba 2548) + ) + ) + +;; definition for method 3 of type ocean-colors +(defmethod inspect ((this ocean-colors)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-colors) + (format #t "~1Tcolors[2548] @ #x~X~%" (-> this colors)) + (label cfg-4) + this + ) + +;; definition of type ocean-colors-float +(deftype ocean-colors-float (structure) + ((colors vector 2548 :inline) + ) + ) + +;; definition for method 3 of type ocean-colors-float +(defmethod inspect ((this ocean-colors-float)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-colors-float) + (format #t "~1Tcolors[2548] @ #x~X~%" (-> this colors)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-mask +(deftype ocean-mid-mask (structure) + ((mask uint8 8) + (dword uint64 :overlay-at (-> mask 0)) + ) + :pack-me + ) + +;; definition for method 3 of type ocean-mid-mask +(defmethod inspect ((this ocean-mid-mask)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-mask) + (format #t "~1Tmask[8] @ #x~X~%" (-> this mask)) + (format #t "~1Tdword: #x~X~%" (-> this dword)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-indices +(deftype ocean-mid-indices (basic) + ((data uint16 36) + ) + ) + +;; definition for method 3 of type ocean-mid-indices +(defmethod inspect ((this ocean-mid-indices)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdata[36] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-masks +(deftype ocean-mid-masks (basic) + ((data (inline-array ocean-mid-mask)) + ) + ) + +;; definition for method 3 of type ocean-mid-masks +(defmethod inspect ((this ocean-mid-masks)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdata: #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-trans-mask +(deftype ocean-trans-mask (structure) + ((mask uint8 4) + (word int32 :overlay-at (-> mask 0)) + ) + :pack-me + ) + +;; definition for method 3 of type ocean-trans-mask +(defmethod inspect ((this ocean-trans-mask)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-trans-mask) + (format #t "~1Tmask[4] @ #x~X~%" (-> this mask)) + (format #t "~1Tword: #x~X~%" (-> this word)) + (label cfg-4) + this + ) + +;; definition of type ocean-trans-index +(deftype ocean-trans-index (structure) + ((parent int16) + (child int16) + ) + :pack-me + ) + +;; definition for method 3 of type ocean-trans-index +(defmethod inspect ((this ocean-trans-index)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-trans-index) + (format #t "~1Tparent: ~D~%" (-> this parent)) + (format #t "~1Tchild: ~D~%" (-> this child)) + (label cfg-4) + this + ) + +;; definition of type ocean-trans-indices +(deftype ocean-trans-indices (basic) + ((data ocean-trans-index 2304 :inline) + ) + ) + +;; definition for method 3 of type ocean-trans-indices +(defmethod inspect ((this ocean-trans-indices)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdata[2304] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-index +(deftype ocean-near-index (structure) + ((data uint16 16) + ) + ) + +;; definition for method 3 of type ocean-near-index +(defmethod inspect ((this ocean-near-index)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-index) + (format #t "~1Tdata[16] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-indices +(deftype ocean-near-indices (basic) + ((data (inline-array ocean-near-index)) + ) + ) + +;; definition for method 3 of type ocean-near-indices +(defmethod inspect ((this ocean-near-indices)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdata: #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-colors +(deftype ocean-near-colors (structure) + ((color0 vector :inline) + (color1 vector :inline) + (color2 vector :inline) + (color3 vector :inline) + ) + ) + +;; definition for method 3 of type ocean-near-colors +(defmethod inspect ((this ocean-near-colors)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-colors) + (format #t "~1Tcolor0: #~%" (-> this color0)) + (format #t "~1Tcolor1: #~%" (-> this color1)) + (format #t "~1Tcolor2: #~%" (-> this color2)) + (format #t "~1Tcolor3: #~%" (-> this color3)) + (label cfg-4) + this + ) + +;; definition of type ocean-trans-strip +(deftype ocean-trans-strip (structure) + ((verts uint128 10) + ) + ) + +;; definition for method 3 of type ocean-trans-strip +(defmethod inspect ((this ocean-trans-strip)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-trans-strip) + (format #t "~1Tverts[10] @ #x~X~%" (-> this verts)) + (label cfg-4) + this + ) + +;; definition of type ocean-trans-strip-array +(deftype ocean-trans-strip-array (structure) + ((data ocean-trans-strip 4 :inline) + ) + ) + +;; definition for method 3 of type ocean-trans-strip-array +(defmethod inspect ((this ocean-trans-strip-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-trans-strip-array) + (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-wave-data +(deftype ocean-wave-data (structure) + ((data uint8 1024) + ) + ) + +;; definition for method 3 of type ocean-wave-data +(defmethod inspect ((this ocean-wave-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-wave-data) + (format #t "~1Tdata[1024] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-wave-frames +(deftype ocean-wave-frames (structure) + ((frame ocean-wave-data 64 :inline) + ) + ) + +;; definition for method 3 of type ocean-wave-frames +(defmethod inspect ((this ocean-wave-frames)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-wave-frames) + (format #t "~1Tframe[64] @ #x~X~%" (-> this frame)) + (label cfg-4) + this + ) + +;; definition of type ocean-texture-constants +(deftype ocean-texture-constants (structure) + ((giftag gs-gif-tag :inline) + (buffers vector4w :inline) + (dests vector4w :inline) + (start vector :inline) + (offsets vector :inline) + (constants vector :inline) + (cam-nrm vector :inline) + ) + ) + +;; definition for method 3 of type ocean-texture-constants +(defmethod inspect ((this ocean-texture-constants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-texture-constants) + (format #t "~1Tgiftag: #~%" (-> this giftag)) + (format #t "~1Tbuffers: #~%" (-> this buffers)) + (format #t "~1Tdests: #~%" (-> this dests)) + (format #t "~1Tstart: #~%" (-> this start)) + (format #t "~1Toffsets: #~%" (-> this offsets)) + (format #t "~1Tconstants: #~%" (-> this constants)) + (format #t "~1Tcam-nrm: #~%" (-> this cam-nrm)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-vertex +(deftype ocean-mid-vertex (structure) + ((stq vector :inline) + (col vector :inline) + (pos vector :inline) + ) + ) + +;; definition for method 3 of type ocean-mid-vertex +(defmethod inspect ((this ocean-mid-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-vertex) + (format #t "~1Tstq: #~%" (-> this stq)) + (format #t "~1Tcol: #~%" (-> this col)) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-constants +(deftype ocean-mid-constants (structure) + ((hmge-scale vector :inline) + (inv-hmge-scale vector :inline) + (hvdf-offset vector :inline) + (fog vector :inline) + (constants vector :inline) + (constants2 vector :inline) + (drw-fan gs-gif-tag :inline) + (env-fan gs-gif-tag :inline) + (drw-adgif gs-gif-tag :inline) + (drw-texture adgif-shader :inline) + (drw-strip-0 gs-gif-tag :inline) + (drw-strip-1 gs-gif-tag :inline) + (env-adgif gs-gif-tag :inline) + (env-texture adgif-shader :inline) + (env-strip gs-gif-tag :inline) + (env-color vector :inline) + (index-table vector4w 8 :inline) + (pos0 vector :inline) + (pos1 vector :inline) + (pos2 vector :inline) + (pos3 vector :inline) + ) + ) + +;; definition for method 3 of type ocean-mid-constants +(defmethod inspect ((this ocean-mid-constants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-constants) + (format #t "~1Thmge-scale: #~%" (-> this hmge-scale)) + (format #t "~1Tinv-hmge-scale: #~%" (-> this inv-hmge-scale)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Tfog: #~%" (-> this fog)) + (format #t "~1Tconstants: #~%" (-> this constants)) + (format #t "~1Tconstants2: #~%" (-> this constants2)) + (format #t "~1Tdrw-fan: #~%" (-> this drw-fan)) + (format #t "~1Tenv-fan: #~%" (-> this env-fan)) + (format #t "~1Tdrw-adgif: #~%" (-> this drw-adgif)) + (format #t "~1Tdrw-texture: #~%" (-> this drw-texture)) + (format #t "~1Tdrw-strip-0: #~%" (-> this drw-strip-0)) + (format #t "~1Tdrw-strip-1: #~%" (-> this drw-strip-1)) + (format #t "~1Tenv-adgif: #~%" (-> this env-adgif)) + (format #t "~1Tenv-texture: #~%" (-> this env-texture)) + (format #t "~1Tenv-strip: #~%" (-> this env-strip)) + (format #t "~1Tenv-color: #~%" (-> this env-color)) + (format #t "~1Tindex-table[8] @ #x~X~%" (-> this index-table)) + (format #t "~1Tpos0: #~%" (-> this pos0)) + (format #t "~1Tpos1: #~%" (-> this pos1)) + (format #t "~1Tpos2: #~%" (-> this pos2)) + (format #t "~1Tpos3: #~%" (-> this pos3)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-upload +(deftype ocean-mid-upload (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (colors uint128 108) + (masks uint128 2) + ) + ) + +;; definition for method 3 of type ocean-mid-upload +(defmethod inspect ((this ocean-mid-upload)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-upload) + (format #t "~1Trot: #~%" (-> this rot)) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tcolors[108] @ #x~X~%" (-> this colors)) + (format #t "~1Tmasks[2] @ #x~X~%" (-> this masks)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-upload2 +(deftype ocean-mid-upload2 (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (count vector4w :inline) + (tex0 vector :inline) + (tex1 vector :inline) + (tex2 vector :inline) + (tex3 vector :inline) + (clr0 vector :inline) + (clr1 vector :inline) + (clr2 vector :inline) + (clr3 vector :inline) + (verts uint128 18) + ) + ) + +;; definition for method 3 of type ocean-mid-upload2 +(defmethod inspect ((this ocean-mid-upload2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-upload2) + (format #t "~1Trot: #~%" (-> this rot)) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tcount: #~%" (-> this count)) + (format #t "~1Ttex0: #~%" (-> this tex0)) + (format #t "~1Ttex1: #~%" (-> this tex1)) + (format #t "~1Ttex2: #~%" (-> this tex2)) + (format #t "~1Ttex3: #~%" (-> this tex3)) + (format #t "~1Tclr0: #~%" (-> this clr0)) + (format #t "~1Tclr1: #~%" (-> this clr1)) + (format #t "~1Tclr2: #~%" (-> this clr2)) + (format #t "~1Tclr3: #~%" (-> this clr3)) + (format #t "~1Tverts[18] @ #x~X~%" (-> this verts)) + (label cfg-4) + this + ) + +;; definition of type ocean-mid-work +(deftype ocean-mid-work (structure) + ((env0 vector :inline) + (env1 vector :inline) + (env2 vector :inline) + (hmg0 vector :inline) + (hmg1 vector :inline) + (hmg2 vector :inline) + (indices uint128 16) + ) + ) + +;; definition for method 3 of type ocean-mid-work +(defmethod inspect ((this ocean-mid-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-mid-work) + (format #t "~1Tenv0: #~%" (-> this env0)) + (format #t "~1Tenv1: #~%" (-> this env1)) + (format #t "~1Tenv2: #~%" (-> this env2)) + (format #t "~1Thmg0: #~%" (-> this hmg0)) + (format #t "~1Thmg1: #~%" (-> this hmg1)) + (format #t "~1Thmg2: #~%" (-> this hmg2)) + (format #t "~1Tindices[16] @ #x~X~%" (-> this indices)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-constants +(deftype ocean-near-constants (structure) + ((hmge-scale vector :inline) + (inv-hmge-scale vector :inline) + (hvdf-offset vector :inline) + (fog vector :inline) + (constants vector :inline) + (constants2 vector :inline) + (constants3 vector :inline) + (constants4 vector :inline) + (constants5 vector :inline) + (drw-fan gs-gif-tag :inline) + (drw2-fan gs-gif-tag :inline) + (env-fan gs-gif-tag :inline) + (drw-adgif gs-gif-tag :inline) + (drw-texture adgif-shader :inline) + (drw-strip gs-gif-tag :inline) + (env-adgif gs-gif-tag :inline) + (env-texture adgif-shader :inline) + (env-strip gs-gif-tag :inline) + (env-color vector :inline) + (drw2-adgif gs-gif-tag :inline) + (drw2-tex0 qword :inline) + (drw2-frame qword :inline) + (drw2-strip gs-gif-tag :inline) + (drw3-adgif gs-gif-tag :inline) + (drw3-frame gs-adcmd :inline) + (index-table vector4w 4 :inline) + ) + ) + +;; definition for method 3 of type ocean-near-constants +(defmethod inspect ((this ocean-near-constants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-constants) + (format #t "~1Thmge-scale: #~%" (-> this hmge-scale)) + (format #t "~1Tinv-hmge-scale: #~%" (-> this inv-hmge-scale)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Tfog: #~%" (-> this fog)) + (format #t "~1Tconstants: #~%" (-> this constants)) + (format #t "~1Tconstants2: #~%" (-> this constants2)) + (format #t "~1Tconstants3: #~%" (-> this constants3)) + (format #t "~1Tconstants4: #~%" (-> this constants4)) + (format #t "~1Tconstants5: #~%" (-> this constants5)) + (format #t "~1Tdrw-fan: #~%" (-> this drw-fan)) + (format #t "~1Tdrw2-fan: #~%" (-> this drw2-fan)) + (format #t "~1Tenv-fan: #~%" (-> this env-fan)) + (format #t "~1Tdrw-adgif: #~%" (-> this drw-adgif)) + (format #t "~1Tdrw-texture: #~%" (-> this drw-texture)) + (format #t "~1Tdrw-strip: #~%" (-> this drw-strip)) + (format #t "~1Tenv-adgif: #~%" (-> this env-adgif)) + (format #t "~1Tenv-texture: #~%" (-> this env-texture)) + (format #t "~1Tenv-strip: #~%" (-> this env-strip)) + (format #t "~1Tenv-color: #~%" (-> this env-color)) + (format #t "~1Tdrw2-adgif: #~%" (-> this drw2-adgif)) + (format #t "~1Tdrw2-tex0: #~%" (-> this drw2-tex0)) + (format #t "~1Tdrw2-frame: #~%" (-> this drw2-frame)) + (format #t "~1Tdrw2-strip: #~%" (-> this drw2-strip)) + (format #t "~1Tdrw3-adgif: #~%" (-> this drw3-adgif)) + (format #t "~1Tdrw3-frame: #~%" (-> this drw3-frame)) + (format #t "~1Tindex-table[4] @ #x~X~%" (-> this index-table)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-upload +(deftype ocean-near-upload (structure) + ((rot matrix :inline) + (matrix matrix :inline) + (masks uint128 2) + (start-height vector4w :inline) + (start-st vector :inline) + (near-colors ocean-near-colors :inline) + ) + ) + +;; definition for method 3 of type ocean-near-upload +(defmethod inspect ((this ocean-near-upload)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-upload) + (format #t "~1Trot: #~%" (-> this rot)) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tmasks[2] @ #x~X~%" (-> this masks)) + (format #t "~1Tstart-height: #~%" (-> this start-height)) + (format #t "~1Tstart-st: #~%" (-> this start-st)) + (format #t "~1Tnear-colors: #~%" (-> this near-colors)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-vertex +(deftype ocean-near-vertex (structure) + ((stq vector :inline) + (clr vector :inline) + (pos vector :inline) + ) + ) + +;; definition for method 3 of type ocean-near-vertex +(defmethod inspect ((this ocean-near-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-vertex) + (format #t "~1Tstq: #~%" (-> this stq)) + (format #t "~1Tclr: #~%" (-> this clr)) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type ocean-near-work +(deftype ocean-near-work (structure) + ((verts-ptr vector :inline) + (indices uint128 16) + ) + ) + +;; definition for method 3 of type ocean-near-work +(defmethod inspect ((this ocean-near-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-near-work) + (format #t "~1Tverts-ptr: #~%" (-> this verts-ptr)) + (format #t "~1Tindices[16] @ #x~X~%" (-> this indices)) + (label cfg-4) + this + ) + +;; definition of type ocean-height-array +(deftype ocean-height-array (structure) + ((data float 1024) + ) + ) + +;; definition for method 3 of type ocean-height-array +(defmethod inspect ((this ocean-height-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-height-array) + (format #t "~1Tdata[1024] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-vert-array +(deftype ocean-vert-array (structure) + ((data vector 2048 :inline) + ) + ) + +;; definition for method 3 of type ocean-vert-array +(defmethod inspect ((this ocean-vert-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-vert-array) + (format #t "~1Tdata[2048] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type ocean-map +(deftype ocean-map (structure) + ((start-corner vector :inline) + (far-color vector :inline) + (ocean-colors ocean-colors) + (ocean-mid-indices ocean-mid-indices) + (ocean-trans-indices ocean-trans-indices) + (ocean-near-indices ocean-near-indices) + (ocean-mid-masks ocean-mid-masks) + ) + (:methods + (set-height! (_type_ float) none) + (get-base-height (_type_) float) + ) + ) + +;; definition for method 3 of type ocean-map +(defmethod inspect ((this ocean-map)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean-map) + (format #t "~1Tstart-corner: #~%" (-> this start-corner)) + (format #t "~1Tfar-color: #~%" (-> this far-color)) + (format #t "~1Tocean-colors: #~%" (-> this ocean-colors)) + (format #t "~1Tocean-mid-indices: ~A~%" (-> this ocean-mid-indices)) + (format #t "~1Tocean-trans-indices: ~A~%" (-> this ocean-trans-indices)) + (format #t "~1Tocean-near-indices: ~A~%" (-> this ocean-near-indices)) + (format #t "~1Tocean-mid-masks: ~A~%" (-> this ocean-mid-masks)) + (label cfg-4) + this + ) + +;; definition of type ocean +(deftype ocean (ocean-map) + ((off symbol) + (near-off symbol) + (mid-off symbol) + (far-on symbol) + (all-on basic) + (ocean-facing uint32) + (heights ocean-height-array) + (heights2 ocean-height-array) + (verts ocean-vert-array) + (ocean-near-translucent? symbol) + (deltas vector :inline) + (map-min vector :inline) + (map-max vector :inline) + (interp vector :inline) + (corner-array ocean-corner 25 :inline) + (corner-count int32) + (temp-vecs vector 4 :inline) + (mid-mask-ptrs pointer 36) + (mid-camera-masks uint64 36) + (trans-mask-ptrs pointer 64) + (trans-camera-masks ocean-trans-mask 16) + (trans-temp-masks uint32 16) + (sprite-tmpl dma-gif-packet :inline) + (sprite-tmpl2 dma-gif-packet :inline) + (sprite-tmpl3 dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (sun-tmpl dma-gif-packet :inline) + (erase-tmpl dma-gif-packet :inline) + (haze-tmpl dma-gif-packet :inline) + (cloud-tmpl dma-gif-packet :inline) + (clut-tmpl dma-gif-packet :inline) + (cloud-lights cloud-lights :inline) + (haze-lights haze-lights :inline) + (constant vector :inline) + (sky-color vector :inline) + (haze-verts vector4w 32 :inline) + (cloud-verts vector4w 36 :inline) + (cloud-nrms vector 36 :inline) + (cloud-col0 vector 36 :inline) + (cloud-col1 vector 36 :inline) + (cloud-st0 vector 36 :inline) + (cloud-st1 vector 36 :inline) + (color80808080 vector4w :inline) + (color80808040 vector4w :inline) + (color80808000 vector4w :inline) + (st0000 vector :inline) + (st0505 vector :inline) + (st1010 vector :inline) + (uv00 vector4w :inline) + (uv44 vector4w :inline) + (uv88 vector4w :inline) + (uv1010 vector4w :inline) + (uv2020 vector4w :inline) + (uv4040 vector4w :inline) + (uv8080 vector4w :inline) + (xy00 vector4w :inline) + (xy88 vector4w :inline) + (xy1010 vector4w :inline) + (xy2020 vector4w :inline) + (xy4040 vector4w :inline) + (xy8080 vector4w :inline) + (cloud-alpha uint8 36) + (near-mask-indices uint16 16) + (mid-minx uint8) + (mid-maxx uint8) + (mid-minz uint8) + (mid-maxz uint8) + (near-minx uint8) + (near-maxx uint8) + (near-minz uint8) + (near-maxz uint8) + (temp-minx uint8) + (temp-maxx uint8) + (temp-minz uint8) + (temp-maxz uint8) + (tex1 gs-tex1) + (tex1-near gs-tex1) + (corner00 float) + (corner01 float) + (corner10 float) + (corner11 float) + (frame-num float) + (frame-speed float) + (frame-num2 float) + (frame-speed2 float) + (cloud-interp float :overlay-at (-> constant data 3)) + (scales vector :inline) + (mask-hi vector4w :inline) + (mask-lo vector4w :inline) + (lights vu-lights :inline) + (uv-scroll-0 vector4w :inline) + (uv-scroll-1 vector4w :inline) + (st-scroll vector2 :inline) + (wait-to-vu0 uint32) + ) + (:methods + (ocean-method-11 () none) + (ocean-method-12 () none) + (ocean-method-13 () none) + (ocean-method-14 () none) + (ocean-method-15 () none) + (ocean-method-16 () none) + (ocean-method-17 () none) + (ocean-method-18 () none) + (ocean-method-19 () none) + (ocean-method-20 () none) + (ocean-method-21 () none) + (ocean-method-22 () none) + (ocean-method-23 () none) + (ocean-method-24 () none) + (ocean-method-25 () none) + (ocean-method-26 () none) + (ocean-method-27 () none) + (ocean-method-28 () none) + (ocean-method-29 () none) + (ocean-method-30 () none) + (ocean-method-31 () none) + (ocean-method-32 () none) + (ocean-method-33 () none) + (ocean-method-34 () none) + (ocean-method-35 () none) + (ocean-method-36 () none) + (ocean-method-37 () none) + (ocean-method-38 () none) + (ocean-method-39 () none) + (ocean-method-40 () none) + (ocean-method-41 () none) + (ocean-method-42 () none) + (ocean-method-43 () none) + (ocean-method-44 () none) + (ocean-method-45 () none) + (ocean-method-46 () none) + (ocean-method-47 () none) + (ocean-method-48 () none) + (ocean-method-49 () none) + (ocean-method-50 () none) + (ocean-method-51 () none) + (ocean-method-52 () none) + (ocean-method-53 () none) + (ocean-method-54 () none) + (ocean-method-55 () none) + (ocean-method-56 () none) + (ocean-method-57 () none) + (ocean-method-58 () none) + (ocean-method-59 () none) + (ocean-method-60 () none) + (ocean-method-61 () none) + (ocean-method-62 () none) + (ocean-method-63 () none) + (ocean-method-64 () none) + (ocean-method-65 () none) + (ocean-method-66 () none) + (ocean-method-67 () none) + (ocean-method-68 () none) + (ocean-method-69 () none) + (ocean-method-70 () none) + (ocean-method-71 () none) + (ocean-method-72 () none) + (ocean-method-73 () none) + (ocean-method-74 () none) + (ocean-method-75 () none) + (ocean-method-76 () none) + (ocean-method-77 () none) + (ocean-method-78 () none) + (ocean-method-79 () none) + (ocean-method-80 () none) + (ocean-method-81 () none) + (ocean-method-82 () none) + (ocean-method-83 () none) + (ocean-method-84 () none) + (ocean-method-85 () none) + (ocean-method-86 () none) + (ocean-method-87 () none) + (ocean-method-88 () none) + (ocean-method-89 () none) + (ocean-method-90 () none) + (ocean-method-91 () none) + ) + ) + +;; definition for method 3 of type ocean +(defmethod inspect ((this ocean)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ocean) + (format #t "~1Tstart-corner: #~%" (-> this start-corner)) + (format #t "~1Tfar-color: #~%" (-> this far-color)) + (format #t "~1Tocean-colors: #~%" (-> this ocean-colors)) + (format #t "~1Tocean-mid-indices: ~A~%" (-> this ocean-mid-indices)) + (format #t "~1Tocean-trans-indices: ~A~%" (-> this ocean-trans-indices)) + (format #t "~1Tocean-near-indices: ~A~%" (-> this ocean-near-indices)) + (format #t "~1Tocean-mid-masks: ~A~%" (-> this ocean-mid-masks)) + (format #t "~1Toff: ~A~%" (-> this off)) + (format #t "~1Tnear-off: ~A~%" (-> this near-off)) + (format #t "~1Tmid-off: ~A~%" (-> this mid-off)) + (format #t "~1Tfar-on: ~A~%" (-> this far-on)) + (format #t "~1Tall-on: ~A~%" (-> this all-on)) + (format #t "~1Tocean-facing: ~D~%" (-> this ocean-facing)) + (format #t "~1Theights: #~%" (-> this heights)) + (format #t "~1Theights2: #~%" (-> this heights2)) + (format #t "~1Tverts: #~%" (-> this verts)) + (format #t "~1Tocean-near-translucent?: ~A~%" (-> this ocean-near-translucent?)) + (format #t "~1Tdeltas: #~%" (-> this deltas)) + (format #t "~1Tmap-min: #~%" (-> this map-min)) + (format #t "~1Tmap-max: #~%" (-> this map-max)) + (format #t "~1Tinterp: #~%" (-> this interp)) + (format #t "~1Tcorner-array[25] @ #x~X~%" (-> this corner-array)) + (format #t "~1Tcorner-count: ~D~%" (-> this corner-count)) + (format #t "~1Ttemp-vecs[4] @ #x~X~%" (-> this temp-vecs)) + (format #t "~1Tmid-mask-ptrs[36] @ #x~X~%" (-> this mid-mask-ptrs)) + (format #t "~1Tmid-camera-masks[36] @ #x~X~%" (-> this mid-camera-masks)) + (format #t "~1Ttrans-mask-ptrs[64] @ #x~X~%" (-> this trans-mask-ptrs)) + (format #t "~1Ttrans-camera-masks[16] @ #x~X~%" (-> this trans-camera-masks)) + (format #t "~1Ttrans-temp-masks[16] @ #x~X~%" (-> this trans-temp-masks)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tsprite-tmpl2: #~%" (-> this sprite-tmpl2)) + (format #t "~1Tsprite-tmpl3: #~%" (-> this sprite-tmpl3)) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tline-tmpl: #~%" (-> this line-tmpl)) + (format #t "~1Tsun-tmpl: #~%" (-> this sun-tmpl)) + (format #t "~1Terase-tmpl: #~%" (-> this erase-tmpl)) + (format #t "~1Thaze-tmpl: #~%" (-> this haze-tmpl)) + (format #t "~1Tcloud-tmpl: #~%" (-> this cloud-tmpl)) + (format #t "~1Tclut-tmpl: #~%" (-> this clut-tmpl)) + (format #t "~1Tcloud-lights: #~%" (-> this cloud-lights)) + (format #t "~1Thaze-lights: #~%" (-> this haze-lights)) + (format #t "~1Tconstant: #~%" (-> this constant)) + (format #t "~1Tsky-color: #~%" (-> this sky-color)) + (format #t "~1Thaze-verts[32] @ #x~X~%" (-> this haze-verts)) + (format #t "~1Tcloud-verts[36] @ #x~X~%" (-> this cloud-verts)) + (format #t "~1Tcloud-nrms[36] @ #x~X~%" (-> this cloud-nrms)) + (format #t "~1Tcloud-col0[36] @ #x~X~%" (-> this cloud-col0)) + (format #t "~1Tcloud-col1[36] @ #x~X~%" (-> this cloud-col1)) + (format #t "~1Tcloud-st0[36] @ #x~X~%" (-> this cloud-st0)) + (format #t "~1Tcloud-st1[36] @ #x~X~%" (-> this cloud-st1)) + (format #t "~1Tcolor80808080: #~%" (-> this color80808080)) + (format #t "~1Tcolor80808040: #~%" (-> this color80808040)) + (format #t "~1Tcolor80808000: #~%" (-> this color80808000)) + (format #t "~1Tst0000: #~%" (-> this st0000)) + (format #t "~1Tst0505: #~%" (-> this st0505)) + (format #t "~1Tst1010: #~%" (-> this st1010)) + (format #t "~1Tuv00: #~%" (-> this uv00)) + (format #t "~1Tuv44: #~%" (-> this uv44)) + (format #t "~1Tuv88: #~%" (-> this uv88)) + (format #t "~1Tuv1010: #~%" (-> this uv1010)) + (format #t "~1Tuv2020: #~%" (-> this uv2020)) + (format #t "~1Tuv4040: #~%" (-> this uv4040)) + (format #t "~1Tuv8080: #~%" (-> this uv8080)) + (format #t "~1Txy00: #~%" (-> this xy00)) + (format #t "~1Txy88: #~%" (-> this xy88)) + (format #t "~1Txy1010: #~%" (-> this xy1010)) + (format #t "~1Txy2020: #~%" (-> this xy2020)) + (format #t "~1Txy4040: #~%" (-> this xy4040)) + (format #t "~1Txy8080: #~%" (-> this xy8080)) + (format #t "~1Tcloud-alpha[36] @ #x~X~%" (-> this cloud-alpha)) + (format #t "~1Tnear-mask-indices[16] @ #x~X~%" (-> this near-mask-indices)) + (format #t "~1Tmid-minx: ~D~%" (-> this mid-minx)) + (format #t "~1Tmid-maxx: ~D~%" (-> this mid-maxx)) + (format #t "~1Tmid-minz: ~D~%" (-> this mid-minz)) + (format #t "~1Tmid-maxz: ~D~%" (-> this mid-maxz)) + (format #t "~1Tnear-minx: ~D~%" (-> this near-minx)) + (format #t "~1Tnear-maxx: ~D~%" (-> this near-maxx)) + (format #t "~1Tnear-minz: ~D~%" (-> this near-minz)) + (format #t "~1Tnear-maxz: ~D~%" (-> this near-maxz)) + (format #t "~1Ttemp-minx: ~D~%" (-> this temp-minx)) + (format #t "~1Ttemp-maxx: ~D~%" (-> this temp-maxx)) + (format #t "~1Ttemp-minz: ~D~%" (-> this temp-minz)) + (format #t "~1Ttemp-maxz: ~D~%" (-> this temp-maxz)) + (format #t "~1Ttex1: ~D~%" (-> this tex1)) + (format #t "~1Ttex1-near: ~D~%" (-> this tex1-near)) + (format #t "~1Tcorner00: ~f~%" (-> this corner00)) + (format #t "~1Tcorner01: ~f~%" (-> this corner01)) + (format #t "~1Tcorner10: ~f~%" (-> this corner10)) + (format #t "~1Tcorner11: ~f~%" (-> this corner11)) + (format #t "~1Tframe-num: ~f~%" (-> this frame-num)) + (format #t "~1Tframe-speed: ~f~%" (-> this frame-speed)) + (format #t "~1Tframe-num2: ~f~%" (-> this frame-num2)) + (format #t "~1Tframe-speed2: ~f~%" (-> this frame-speed2)) + (format #t "~1Tcloud-interp: ~f~%" (-> this constant w)) + (format #t "~1Tscales: #~%" (-> this scales)) + (format #t "~1Tmask-hi: #~%" (-> this mask-hi)) + (format #t "~1Tmask-lo: #~%" (-> this mask-lo)) + (format #t "~1Tlights: #~%" (-> this lights)) + (format #t "~1Tuv-scroll-0: #~%" (-> this uv-scroll-0)) + (format #t "~1Tuv-scroll-1: #~%" (-> this uv-scroll-1)) + (format #t "~1Tst-scroll: #~%" (-> this st-scroll)) + (format #t "~1Twait-to-vu0: ~D~%" (-> this wait-to-vu0)) + (label cfg-4) + this + ) + +;; definition for symbol *ocean-map*, type ocean-map +(define *ocean-map* (the-as ocean-map #f)) + +;; definition for symbol *ocean*, type ocean +(define *ocean* (new 'static 'ocean + :sprite-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x508b400000008001 #x53531) + ) + :sprite-tmpl2 (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x3023400000008001 #x551) + ) + :sprite-tmpl3 (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :adgif-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :line-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x141 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x141 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x5008c00000008040 #x52521) + ) + :sun-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :erase-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x3003400000008001 #x551) + ) + :haze-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x45 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x45 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x4026400000008011 #x4141) + ) + :cloud-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x25 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x25 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x602e400000008006 #x421421) + ) + :clut-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x800000000008040 #x0) + ) + :constant (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :haze-verts (new 'static 'inline-array vector4w 32 + (new 'static 'vector4w :x #x400 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x400 :y #x600 :z #xffffff) + (new 'static 'vector4w :x #x4a0 :y #x590 :z #xffffff) + (new 'static 'vector4w :x #x4c0 :y #x5e0 :z #xffffff) + (new 'static 'vector4w :x #x530 :y #x530 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x590 :y #x4a0 :z #xffffff) + (new 'static 'vector4w :x #x5e0 :y #x4c0 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x3f0 :z #xffffff) + (new 'static 'vector4w :x #x600 :y #x3f0 :z #xffffff) + (new 'static 'vector4w :x #x590 :y #x350 :z #xffffff) + (new 'static 'vector4w :x #x5e0 :y #x330 :z #xffffff) + (new 'static 'vector4w :x #x530 :y #x2c0 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x4a0 :y #x260 :z #xffffff) + (new 'static 'vector4w :x #x4c0 :y #x210 :z #xffffff) + (new 'static 'vector4w :x #x3f0 :y #x240 :z #xffffff) + (new 'static 'vector4w :x #x3f0 :y #x1f0 :z #xffffff) + (new 'static 'vector4w :x #x350 :y #x260 :z #xffffff) + (new 'static 'vector4w :x #x330 :y #x210 :z #xffffff) + (new 'static 'vector4w :x #x2c0 :y #x2c0 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x260 :y #x350 :z #xffffff) + (new 'static 'vector4w :x #x210 :y #x330 :z #xffffff) + (new 'static 'vector4w :x #x240 :y #x400 :z #xffffff) + (new 'static 'vector4w :x #x1f0 :y #x400 :z #xffffff) + (new 'static 'vector4w :x #x260 :y #x4a0 :z #xffffff) + (new 'static 'vector4w :x #x210 :y #x4c0 :z #xffffff) + (new 'static 'vector4w :x #x2c0 :y #x530 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x350 :y #x590 :z #xffffff) + (new 'static 'vector4w :x #x330 :y #x5e0 :z #xffffff) + ) + :cloud-verts (new 'static 'inline-array vector4w 36 + (new 'static 'vector4w :x #x290 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x310 :y #x230 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x200 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x200 :z #xffffff) + (new 'static 'vector4w :x #x4e0 :y #x230 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x290 :z #xffffff) + (new 'static 'vector4w :x #x230 :y #x310 :z #xffffff) + (new 'static 'vector4w :x #x300 :y #x300 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x2b0 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x2b0 :z #xffffff) + (new 'static 'vector4w :x #x4f0 :y #x300 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x310 :z #xffffff) + (new 'static 'vector4w :x #x200 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x2b0 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x380 :y #x380 :z #xffffff) + (new 'static 'vector4w :x #x470 :y #x380 :z #xffffff) + (new 'static 'vector4w :x #x540 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x5f0 :y #x3a0 :z #xffffff) + (new 'static 'vector4w :x #x200 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x2b0 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x380 :y #x470 :z #xffffff) + (new 'static 'vector4w :x #x470 :y #x470 :z #xffffff) + (new 'static 'vector4w :x #x540 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x5f0 :y #x450 :z #xffffff) + (new 'static 'vector4w :x #x230 :y #x4e0 :z #xffffff) + (new 'static 'vector4w :x #x300 :y #x4f0 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x540 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x540 :z #xffffff) + (new 'static 'vector4w :x #x4f0 :y #x4f0 :z #xffffff) + (new 'static 'vector4w :x #x5c0 :y #x4e0 :z #xffffff) + (new 'static 'vector4w :x #x290 :y #x560 :z #xffffff) + (new 'static 'vector4w :x #x310 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x3a0 :y #x5f0 :z #xffffff) + (new 'static 'vector4w :x #x450 :y #x5f0 :z #xffffff) + (new 'static 'vector4w :x #x4e0 :y #x5c0 :z #xffffff) + (new 'static 'vector4w :x #x560 :y #x560 :z #xffffff) + ) + :cloud-nrms (new 'static 'inline-array vector 36 + (new 'static 'vector :x -0.4999 :y 0.7071 :z -0.5) + (new 'static 'vector :x -0.3209 :y 0.7071 :z -0.63) + (new 'static 'vector :x -0.1105 :y 0.7071 :z -0.6984) + (new 'static 'vector :x 0.1105 :y 0.7071 :z -0.6983) + (new 'static 'vector :x 0.321 :y 0.7071 :z -0.63) + (new 'static 'vector :x 0.5 :y 0.7071 :z -0.4999) + (new 'static 'vector :x -0.63 :y 0.7071 :z -0.321) + (new 'static 'vector :x -0.3921 :y 0.832 :z -0.3922) + (new 'static 'vector :x -0.1434 :y 0.832 :z -0.5358) + (new 'static 'vector :x 0.1435 :y 0.832 :z -0.5357) + (new 'static 'vector :x 0.3922 :y 0.832 :z -0.3921) + (new 'static 'vector :x 0.63 :y 0.7071 :z -0.3209) + (new 'static 'vector :x -0.6983 :y 0.7071 :z -0.1106) + (new 'static 'vector :x -0.5357 :y 0.832 :z -0.1435) + (new 'static 'vector :x -0.334 :y 0.8814 :z -0.334) + (new 'static 'vector :x 0.334 :y 0.8814 :z -0.334) + (new 'static 'vector :x 0.5358 :y 0.832 :z -0.1434) + (new 'static 'vector :x 0.6984 :y 0.7071 :z -0.1105) + (new 'static 'vector :x -0.6984 :y 0.7071 :z 0.1105) + (new 'static 'vector :x -0.5358 :y 0.832 :z 0.1435) + (new 'static 'vector :x -0.334 :y 0.8814 :z 0.334) + (new 'static 'vector :x 0.334 :y 0.8814 :z 0.334) + (new 'static 'vector :x 0.5357 :y 0.832 :z 0.1435) + (new 'static 'vector :x 0.6983 :y 0.7071 :z 0.1105) + (new 'static 'vector :x -0.63 :y 0.7071 :z 0.321) + (new 'static 'vector :x -0.3922 :y 0.832 :z 0.3921) + (new 'static 'vector :x -0.1435 :y 0.832 :z 0.5357) + (new 'static 'vector :x 0.1435 :y 0.832 :z 0.5358) + (new 'static 'vector :x 0.3922 :y 0.832 :z 0.3922) + (new 'static 'vector :x 0.63 :y 0.7071 :z 0.321) + (new 'static 'vector :x -0.5 :y 0.7071 :z 0.4999) + (new 'static 'vector :x -0.321 :y 0.7071 :z 0.63) + (new 'static 'vector :x -0.1106 :y 0.7071 :z 0.6983) + (new 'static 'vector :x 0.1105 :y 0.7071 :z 0.6984) + (new 'static 'vector :x 0.321 :y 0.7071 :z 0.63) + (new 'static 'vector :x 0.4999 :y 0.7071 :z 0.5) + ) + :color80808080 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + :color80808040 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w 64) + :color80808000 (new 'static 'vector4w :x #x80 :y #x80 :z #x80) + :st0000 (new 'static 'vector :z 1.0) + :st0505 (new 'static 'vector :x 0.5 :y 0.5 :z 1.0) + :st1010 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :uv44 (new 'static 'vector4w :x 64 :y 64) + :uv88 (new 'static 'vector4w :x #x80 :y #x80) + :uv1010 (new 'static 'vector4w :x #x100 :y #x100) + :uv2020 (new 'static 'vector4w :x #x200 :y #x200) + :uv4040 (new 'static 'vector4w :x #x400 :y #x400) + :uv8080 (new 'static 'vector4w :x #x800 :y #x800) + :xy00 (new 'static 'vector4w :z #xffffff) + :xy88 (new 'static 'vector4w :x #x80 :y #x80 :z #xffffff) + :xy1010 (new 'static 'vector4w :x #x100 :y #x100 :z #xffffff) + :xy2020 (new 'static 'vector4w :x #x200 :y #x200 :z #xffffff) + :xy4040 (new 'static 'vector4w :x #x400 :y #x400 :z #xffffff) + :xy8080 (new 'static 'vector4w :x #x800 :y #x800 :z #xffffff) + :cloud-alpha (new 'static 'array uint8 36 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + #x80 + ) + :tex1 (new 'static 'gs-tex1 :mxl #x6 :mmag #x1 :mmin #x5 :l #x1 :k #xeed) + :tex1-near (new 'static 'gs-tex1 :mxl #x3 :mmag #x1 :mmin #x5 :l #x1 :k #xeed) + :scales (new 'static 'vector :x -0.00012207031 :y 255.0 :z -0.00012207031 :w 128.0) + :mask-hi (new 'static 'vector4w :x -65536 :y -65536 :z -65536 :w -65536) + :mask-lo (new 'static 'vector4w :x #xffff :y #xffff :z #xffff :w #xffff) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc new file mode 100644 index 0000000000..6f733b365c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc @@ -0,0 +1,507 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sky-color-hour +(deftype sky-color-hour (structure) + ((snapshot1 int32) + (snapshot2 int32) + (morph-start float) + (morph-end float) + ) + ) + +;; definition for method 3 of type sky-color-hour +(defmethod inspect ((this sky-color-hour)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-color-hour) + (format #t "~1Tsnapshot1: ~D~%" (-> this snapshot1)) + (format #t "~1Tsnapshot2: ~D~%" (-> this snapshot2)) + (format #t "~1Tmorph-start: ~f~%" (-> this morph-start)) + (format #t "~1Tmorph-end: ~f~%" (-> this morph-end)) + (label cfg-4) + this + ) + +;; definition of type sky-color-day +(deftype sky-color-day (structure) + ((hour sky-color-hour 24 :inline) + ) + ) + +;; definition for method 3 of type sky-color-day +(defmethod inspect ((this sky-color-day)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-color-day) + (format #t "~1Thour[24] @ #x~X~%" (-> this hour)) + (label cfg-4) + this + ) + +;; definition of type sky-sun-data +(deftype sky-sun-data (structure) + ((data uint128 4) + (pos vector :inline :overlay-at (-> data 0)) + (r-sun float :overlay-at (-> data 1)) + (r-halo float :offset 20) + (r-aurora float :offset 24) + (c-sun-start rgba :overlay-at (-> data 2)) + (c-sun-end rgba :overlay-at (-> data 3)) + (c-halo-start rgba :offset 36) + (c-halo-end rgba :offset 52) + (c-aurora-start rgba :offset 40) + (c-aurora-end rgba :offset 56) + ) + ) + +;; definition for method 3 of type sky-sun-data +(defmethod inspect ((this sky-sun-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-sun-data) + (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) + (format #t "~1Tpos: #~%" (-> this data)) + (format #t "~1Tr-sun: ~f~%" (-> this r-sun)) + (format #t "~1Tr-halo: ~f~%" (-> this r-halo)) + (format #t "~1Tr-aurora: ~f~%" (-> this r-aurora)) + (format #t "~1Tc-sun-start: ~D~%" (-> this c-sun-start)) + (format #t "~1Tc-sun-end: ~D~%" (-> this c-sun-end)) + (format #t "~1Tc-halo-start: ~D~%" (-> this c-halo-start)) + (format #t "~1Tc-halo-end: ~D~%" (-> this c-halo-end)) + (format #t "~1Tc-aurora-start: ~D~%" (-> this c-aurora-start)) + (format #t "~1Tc-aurora-end: ~D~%" (-> this c-aurora-end)) + (label cfg-4) + this + ) + +;; definition of type sky-moon-data +(deftype sky-moon-data (structure) + ((data uint128 2) + (pos vector :inline :overlay-at (-> data 0)) + (scale vector :inline :overlay-at (-> data 1)) + ) + ) + +;; definition for method 3 of type sky-moon-data +(defmethod inspect ((this sky-moon-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-moon-data) + (format #t "~1Tdata[2] @ #x~X~%" (-> this data)) + (format #t "~1Tpos: #~%" (-> this data)) + (format #t "~1Tscale: #~%" (-> this scale)) + (label cfg-4) + this + ) + +;; definition of type sky-orbit +(deftype sky-orbit (structure) + ((high-noon float) + (tilt float) + (rise float) + (dist float) + (min-halo float) + (max-halo float) + ) + :allow-misaligned + ) + +;; definition for method 3 of type sky-orbit +(defmethod inspect ((this sky-orbit)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-orbit) + (format #t "~1Thigh-noon: ~f~%" (-> this high-noon)) + (format #t "~1Ttilt: ~f~%" (-> this tilt)) + (format #t "~1Trise: ~f~%" (-> this rise)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (format #t "~1Tmin-halo: ~f~%" (-> this min-halo)) + (format #t "~1Tmax-halo: ~f~%" (-> this max-halo)) + (label cfg-4) + this + ) + +;; definition of type sky-upload-data +(deftype sky-upload-data (structure) + ((data uint128 16) + (sun sky-sun-data 2 :inline :overlay-at (-> data 0)) + (moon sky-moon-data :inline :overlay-at (-> data 8)) + (day-star sky-moon-data :inline :overlay-at (-> data 12)) + ) + ) + +;; definition for method 3 of type sky-upload-data +(defmethod inspect ((this sky-upload-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-upload-data) + (format #t "~1Tdata[16] @ #x~X~%" (-> this data)) + (format #t "~1Tsun[2] @ #x~X~%" (-> this data)) + (format #t "~1Tmoon: #~%" (-> this moon)) + (format #t "~1Tday-star: #~%" (-> this day-star)) + (label cfg-4) + this + ) + +;; definition of type sky-vertex +(deftype sky-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + ) + ) + +;; definition for method 3 of type sky-vertex +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this sky-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-vertex) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tstq: #~%" (-> this stq)) + (format #t "~1Tcol: #~%" (-> this col)) + (label cfg-4) + this + ) + +;; definition for method 3 of type sky-vertex +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this sky-vertex)) + (format #t "sky-vertex [~X]:~%" this) + (format #t "~TPos: [~F ~F ~F ~F]~%" (-> this pos x) (-> this pos y) (-> this pos z) (-> this pos w)) + (format #t "~TSTQ: [~F ~F ~F ~F]~%" (-> this stq x) (-> this stq y) (-> this stq z) (-> this stq w)) + (format #t "~TCol: [~F ~F ~F ~F]~%" (-> this col x) (-> this col y) (-> this col z) (-> this col w)) + this + ) + +;; definition of type cloud-vertex +(deftype cloud-vertex (structure) + ((pos vector :inline) + (stq vector :inline) + (col vector :inline) + (nrm vector :inline) + (stq2 vector :inline) + (col2 vector :inline) + (nrm2 vector :inline) + ) + ) + +;; definition for method 3 of type cloud-vertex +(defmethod inspect ((this cloud-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'cloud-vertex) + (format #t "~1Tpos: ~`vector`P~%" (-> this pos)) + (format #t "~1Tstq: ~`vector`P~%" (-> this stq)) + (format #t "~1Tcol: ~`vector`P~%" (-> this col)) + (format #t "~1Tnrm: ~`vector`P~%" (-> this nrm)) + (format #t "~1Tstq2: ~`vector`P~%" (-> this stq2)) + (format #t "~1Tcol2: ~`vector`P~%" (-> this col2)) + (format #t "~1Tnrm2: ~`vector`P~%" (-> this nrm2)) + (label cfg-4) + this + ) + +;; definition of type cloud-vert-array +(deftype cloud-vert-array (structure) + ((data cloud-vertex 100 :inline) + ) + ) + +;; definition for method 3 of type cloud-vert-array +(defmethod inspect ((this cloud-vert-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'cloud-vert-array) + (format #t "~1Tdata[100] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type haze-vertex +(deftype haze-vertex (structure) + ((pos vector :inline) + (nrm vector :inline) + (col vector :inline) + ) + ) + +;; definition for method 3 of type haze-vertex +(defmethod inspect ((this haze-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'haze-vertex) + (format #t "~1Tpos: ~`vector`P~%" (-> this pos)) + (format #t "~1Tnrm: ~`vector`P~%" (-> this nrm)) + (format #t "~1Tcol: ~`vector`P~%" (-> this col)) + (label cfg-4) + this + ) + +;; definition of type haze-vert-array +(deftype haze-vert-array (structure) + ((data haze-vertex 36 :inline) + ) + ) + +;; definition for method 3 of type haze-vert-array +(defmethod inspect ((this haze-vert-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'haze-vert-array) + (format #t "~1Tdata[36] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type cloud-lights +(deftype cloud-lights (structure) + ((sun0-normal vector :inline) + (sun1-normal vector :inline) + (moon-normal vector :inline) + (ambi-color vector :inline) + (ambi-color-lower vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-color-lower vector :inline) + (sun0-scale float) + (sun1-scale float) + (moon-scale float) + ) + ) + +;; definition for method 3 of type cloud-lights +(defmethod inspect ((this cloud-lights)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'cloud-lights) + (format #t "~1Tsun0-normal: #~%" (-> this sun0-normal)) + (format #t "~1Tsun1-normal: #~%" (-> this sun1-normal)) + (format #t "~1Tmoon-normal: #~%" (-> this moon-normal)) + (format #t "~1Tambi-color: #~%" (-> this ambi-color)) + (format #t "~1Tambi-color-lower: #~%" (-> this ambi-color-lower)) + (format #t "~1Tsun0-color: #~%" (-> this sun0-color)) + (format #t "~1Tsun1-color: #~%" (-> this sun1-color)) + (format #t "~1Tmoon-color: #~%" (-> this moon-color)) + (format #t "~1Tsun0-color-lower: #~%" (-> this sun0-color-lower)) + (format #t "~1Tsun0-scale: ~f~%" (-> this sun0-scale)) + (format #t "~1Tsun1-scale: ~f~%" (-> this sun1-scale)) + (format #t "~1Tmoon-scale: ~f~%" (-> this moon-scale)) + (label cfg-4) + this + ) + +;; definition of type haze-lights +(deftype haze-lights (structure) + ((sun0-normal vector :inline) + (sun1-normal vector :inline) + (moon-normal vector :inline) + (ambi-color vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-scale float) + (sun1-scale float) + (moon-scale float) + ) + ) + +;; definition for method 3 of type haze-lights +(defmethod inspect ((this haze-lights)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'haze-lights) + (format #t "~1Tsun0-normal: #~%" (-> this sun0-normal)) + (format #t "~1Tsun1-normal: #~%" (-> this sun1-normal)) + (format #t "~1Tmoon-normal: #~%" (-> this moon-normal)) + (format #t "~1Tambi-color: #~%" (-> this ambi-color)) + (format #t "~1Tsun0-color: #~%" (-> this sun0-color)) + (format #t "~1Tsun1-color: #~%" (-> this sun1-color)) + (format #t "~1Tmoon-color: #~%" (-> this moon-color)) + (format #t "~1Tsun0-scale: ~f~%" (-> this sun0-scale)) + (format #t "~1Tsun1-scale: ~f~%" (-> this sun1-scale)) + (format #t "~1Tmoon-scale: ~f~%" (-> this moon-scale)) + (label cfg-4) + this + ) + +;; definition of type sky-work +(deftype sky-work (structure) + ((adgif-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (draw-tmpl2 dma-gif-packet :inline) + (fog-tmpl dma-gif-packet :inline) + (blend-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (sprite-tmpl2 dma-gif-packet :inline) + (sun-coords vector 2 :inline) + (green-coords vector 2 :inline) + (moon0-coords vector 2 :inline) + (moon1-coords vector 2 :inline) + (moon2-coords vector 2 :inline) + (day-star-coords vector 2 :inline) + (star-coords vector 2 :inline) + (sun-colors vector4w 2 :inline) + (green-colors vector4w 2 :inline) + (moon-colors vector4w 3 :inline) + (day-star-colors vector4w 3 :inline) + (star-colors vector4w 16 :inline) + (st-coords vector 2 :inline) + (random vector4w 8 :inline) + (giftag-base dma-gif :inline) + (giftag-haze dma-gif :inline) + (giftag-roof dma-gif :inline) + (giftag-ocean dma-gif :inline) + (fog vector :inline) + (sky float 8) + (time float) + (off-s uint16) + (off-t uint16) + (orbit sky-orbit 3 :inline) + (upload-data sky-upload-data :inline) + (ambi-color vector :inline) + (ambi-color-lower vector :inline) + (sun0-color vector :inline) + (sun1-color vector :inline) + (moon-color vector :inline) + (sun0-color-lower vector :inline) + (cam-mat matrix :inline) + (star-mat matrix :inline) + (vec0 vector4w :inline) + (vec1 vector4w :inline) + (cloud-lights cloud-lights :inline) + (haze-lights haze-lights :inline) + (buf dma-buffer) + (draw-vortex basic) + (day-star-scale float) + (stars vector 512 :inline) + (disable-day-star basic) + ) + (:methods + (sky-work-method-9 () none) + (sky-work-method-10 () none) + (sky-work-method-11 () none) + (sky-work-method-12 () none) + (sky-work-method-13 () none) + (sky-work-method-14 () none) + (sky-work-method-15 () none) + (sky-work-method-16 () none) + (sky-work-method-17 () none) + (sky-work-method-18 () none) + (sky-work-method-19 () none) + (sky-work-method-20 () none) + (sky-work-method-21 () none) + (sky-work-method-22 () none) + (sky-work-method-23 () none) + (sky-work-method-24 () none) + (sky-work-method-25 () none) + (sky-work-method-26 () none) + (sky-work-method-27 () none) + (sky-work-method-28 () none) + (sky-work-method-29 () none) + (sky-work-method-30 () none) + (sky-work-method-31 () none) + (sky-work-method-32 () none) + (sky-work-method-33 () none) + (sky-work-method-34 () none) + (sky-work-method-35 () none) + (sky-work-method-36 () none) + (sky-work-method-37 () none) + (sky-work-method-38 () none) + ) + ) + +;; definition for method 3 of type sky-work +(defmethod inspect ((this sky-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sky-work) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tdraw-tmpl: #~%" (-> this draw-tmpl)) + (format #t "~1Tdraw-tmpl2: #~%" (-> this draw-tmpl2)) + (format #t "~1Tfog-tmpl: #~%" (-> this fog-tmpl)) + (format #t "~1Tblend-tmpl: #~%" (-> this blend-tmpl)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tsprite-tmpl2: #~%" (-> this sprite-tmpl2)) + (format #t "~1Tsun-coords[2] @ #x~X~%" (-> this sun-coords)) + (format #t "~1Tgreen-coords[2] @ #x~X~%" (-> this green-coords)) + (format #t "~1Tmoon0-coords[2] @ #x~X~%" (-> this moon0-coords)) + (format #t "~1Tmoon1-coords[2] @ #x~X~%" (-> this moon1-coords)) + (format #t "~1Tmoon2-coords[2] @ #x~X~%" (-> this moon2-coords)) + (format #t "~1Tday-star-coords[2] @ #x~X~%" (-> this day-star-coords)) + (format #t "~1Tstar-coords[2] @ #x~X~%" (-> this star-coords)) + (format #t "~1Tsun-colors[2] @ #x~X~%" (-> this sun-colors)) + (format #t "~1Tgreen-colors[2] @ #x~X~%" (-> this green-colors)) + (format #t "~1Tmoon-colors[3] @ #x~X~%" (-> this moon-colors)) + (format #t "~1Tday-star-colors[3] @ #x~X~%" (-> this day-star-colors)) + (format #t "~1Tstar-colors[16] @ #x~X~%" (-> this star-colors)) + (format #t "~1Tst-coords[2] @ #x~X~%" (-> this st-coords)) + (format #t "~1Trandom[8] @ #x~X~%" (-> this random)) + (format #t "~1Tgiftag-base: #~%" (-> this giftag-base)) + (format #t "~1Tgiftag-haze: #~%" (-> this giftag-haze)) + (format #t "~1Tgiftag-roof: #~%" (-> this giftag-roof)) + (format #t "~1Tgiftag-ocean: #~%" (-> this giftag-ocean)) + (format #t "~1Tfog: #~%" (-> this fog)) + (format #t "~1Tsky[8] @ #x~X~%" (-> this sky)) + (format #t "~1Ttime: ~f~%" (-> this time)) + (format #t "~1Toff-s: ~D~%" (-> this off-s)) + (format #t "~1Toff-t: ~D~%" (-> this off-t)) + (format #t "~1Torbit[3] @ #x~X~%" (-> this orbit)) + (format #t "~1Tupload-data: #~%" (-> this upload-data)) + (format #t "~1Tambi-color: #~%" (-> this ambi-color)) + (format #t "~1Tambi-color-lower: #~%" (-> this ambi-color-lower)) + (format #t "~1Tsun0-color: #~%" (-> this sun0-color)) + (format #t "~1Tsun1-color: #~%" (-> this sun1-color)) + (format #t "~1Tmoon-color: #~%" (-> this moon-color)) + (format #t "~1Tsun0-color-lower: #~%" (-> this sun0-color-lower)) + (format #t "~1Tcam-mat: #~%" (-> this cam-mat)) + (format #t "~1Tstar-mat: #~%" (-> this star-mat)) + (format #t "~1Tvec0: #~%" (-> this vec0)) + (format #t "~1Tvec1: #~%" (-> this vec1)) + (format #t "~1Tcloud-lights: #~%" (-> this cloud-lights)) + (format #t "~1Thaze-lights: #~%" (-> this haze-lights)) + (format #t "~1Tbuf: ~A~%" (-> this buf)) + (format #t "~1Tdraw-vortex: ~A~%" (-> this draw-vortex)) + (format #t "~1Tday-star-scale: ~f~%" (-> this day-star-scale)) + (format #t "~1Tstars[512] @ #x~X~%" (-> this stars)) + (format #t "~1Tdisable-day-star: ~A~%" (-> this disable-day-star)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc new file mode 100644 index 0000000000..4785405b78 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc @@ -0,0 +1,165 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type bigmap-image +(deftype bigmap-image (structure) + ((clut-offset uint32) + (image-offset uint32) + (width uint32) + (height uint32) + (data uint8 1) + ) + ) + +;; definition for method 3 of type bigmap-image +(defmethod inspect ((this bigmap-image)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bigmap-image) + (format #t "~1Tclut-offset: ~D~%" (-> this clut-offset)) + (format #t "~1Timage-offset: ~D~%" (-> this image-offset)) + (format #t "~1Twidth: ~D~%" (-> this width)) + (format #t "~1Theight: ~D~%" (-> this height)) + (format #t "~1Tdata[1] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type bigmap-info +(deftype bigmap-info (vector) + ((scale float :overlay-at (-> data 2)) + (inv-scale float :overlay-at (-> data 3)) + ) + ) + +;; definition for method 3 of type bigmap-info +;; INFO: Used lq/sq +(defmethod inspect ((this bigmap-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bigmap-info) + (format #t "~1Tdata[4] @ #x~X~%" (&-> this x)) + (format #t "~1Tx: ~f~%" (-> this x)) + (format #t "~1Ty: ~f~%" (-> this y)) + (format #t "~1Tz: ~f~%" (-> this z)) + (format #t "~1Tw: ~f~%" (-> this w)) + (format #t "~1Tquad: ~D~%" (-> this quad)) + (format #t "~1Tscale: ~f~%" (-> this z)) + (format #t "~1Tinv-scale: ~f~%" (-> this w)) + (label cfg-4) + this + ) + +;; definition of type bigmap-info-array +(deftype bigmap-info-array (structure) + ((data bigmap-info 24 :inline) + ) + ) + +;; definition for method 3 of type bigmap-info-array +(defmethod inspect ((this bigmap-info-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bigmap-info-array) + (format #t "~1Tdata[24] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type bigmap +(deftype bigmap (basic) + ((drawing-flag symbol) + (loading-flag symbol) + (bigmap-index uint32) + (bigmap-image external-art-buffer) + (tpage external-art-buffer) + (tpage2 basic) + (progress-minimap texture-page) + (progress-minimap2 basic) + (load-index uint32) + (x0 int32) + (y0 int32) + (x1 int32) + (y1 int32) + (goal-time float) + (sprite-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (offset vector :inline) + (size float :overlay-at (-> offset data 2)) + (scale float :overlay-at (-> offset data 3)) + (scroll vector :inline) + (pos vector4w :inline) + (color vector4w :inline) + (corner vector 4 :inline) + (auto-save-icon-flag symbol) + (global-flags uint32) + ) + (:methods + (new (symbol type) _type_) + (bigmap-method-9 () none) + (bigmap-method-10 () none) + (bigmap-method-11 () none) + (bigmap-method-12 () none) + (bigmap-method-13 () none) + (bigmap-method-14 () none) + (bigmap-method-15 () none) + (bigmap-method-16 () none) + (bigmap-method-17 () none) + (bigmap-method-18 () none) + (bigmap-method-19 () none) + (bigmap-method-20 () none) + (bigmap-method-21 () none) + (bigmap-method-22 () none) + ) + ) + +;; definition for method 3 of type bigmap +(defmethod inspect ((this bigmap)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdrawing-flag: ~A~%" (-> this drawing-flag)) + (format #t "~1Tloading-flag: ~A~%" (-> this loading-flag)) + (format #t "~1Tbigmap-index: ~D~%" (-> this bigmap-index)) + (format #t "~1Tbigmap-image: ~A~%" (-> this bigmap-image)) + (format #t "~1Ttpage: ~A~%" (-> this tpage)) + (format #t "~1Ttpage2: ~A~%" (-> this tpage2)) + (format #t "~1Tprogress-minimap: ~A~%" (-> this progress-minimap)) + (format #t "~1Tprogress-minimap2: ~A~%" (-> this progress-minimap2)) + (format #t "~1Tload-index: ~D~%" (-> this load-index)) + (format #t "~1Tx0: ~D~%" (-> this x0)) + (format #t "~1Ty0: ~D~%" (-> this y0)) + (format #t "~1Tx1: ~D~%" (-> this x1)) + (format #t "~1Ty1: ~D~%" (-> this y1)) + (format #t "~1Tgoal-time: ~f~%" (-> this goal-time)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tdraw-tmpl: #~%" (-> this draw-tmpl)) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Toffset: #~%" (-> this offset)) + (format #t "~1Tsize: ~f~%" (-> this offset z)) + (format #t "~1Tscale: ~f~%" (-> this offset w)) + (format #t "~1Tscroll: #~%" (-> this scroll)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Tcorner[4] @ #x~X~%" (-> this corner)) + (format #t "~1Tauto-save-icon-flag: ~A~%" (-> this auto-save-icon-flag)) + (format #t "~1Tglobal-flags: ~D~%" (-> this global-flags)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc new file mode 100644 index 0000000000..e8c45e6d46 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc @@ -0,0 +1,1004 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type minimap-table-entry +(deftype minimap-table-entry (structure) + ((corner vector :inline) + (level-name basic) + (tex-name basic) + (meters-per-texel float) + (pos-scale float) + (min-inv-scale float) + (max-inv-scale float) + (switch-immediate basic) + ) + ) + +;; definition for method 3 of type minimap-table-entry +(defmethod inspect ((this minimap-table-entry)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap-table-entry) + (format #t "~1Tcorner: #~%" (-> this corner)) + (format #t "~1Tlevel-name: ~A~%" (-> this level-name)) + (format #t "~1Ttex-name: ~A~%" (-> this tex-name)) + (format #t "~1Tmeters-per-texel: ~f~%" (-> this meters-per-texel)) + (format #t "~1Tpos-scale: ~f~%" (-> this pos-scale)) + (format #t "~1Tmin-inv-scale: ~f~%" (-> this min-inv-scale)) + (format #t "~1Tmax-inv-scale: ~f~%" (-> this max-inv-scale)) + (format #t "~1Tswitch-immediate: ~A~%" (-> this switch-immediate)) + (label cfg-4) + this + ) + +;; definition of type minimap-class-node +(deftype minimap-class-node (structure) + ((default-position vector :inline) + (flags minimap-flag) + (name basic) + (icon-xy vector2ub :inline) + (class minimap-class) + (scale float) + (color rgba) + ) + (:methods + (minimap-class-node-method-9 () none) + ) + ) + +;; definition for method 3 of type minimap-class-node +(defmethod inspect ((this minimap-class-node)) + (when (not this) + (set! this this) + (goto cfg-403) + ) + (format #t "[~8x] ~A~%" this 'minimap-class-node) + (format #t "~1Tdefault-position: ~`vector`P~%" (-> this default-position)) + (format #t "~1Tflags: #x~X : (minimap-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (minimap-flag active)) (minimap-flag active)) + (format #t "active ") + ) + (if (= (logand s5-0 (minimap-flag bigmap)) (minimap-flag bigmap)) + (format #t "bigmap ") + ) + (if (= (logand (minimap-flag waswide) s5-0) (minimap-flag waswide)) + (format #t "waswide ") + ) + (if (= (logand s5-0 (minimap-flag fade-in)) (minimap-flag fade-in)) + (format #t "fade-in ") + ) + (if (= (logand s5-0 (minimap-flag racer)) (minimap-flag racer)) + (format #t "racer ") + ) + (if (= (logand (minimap-flag ctywide) s5-0) (minimap-flag ctywide)) + (format #t "ctywide ") + ) + (if (= (logand s5-0 (minimap-flag task)) (minimap-flag task)) + (format #t "task ") + ) + (if (= (logand s5-0 (minimap-flag bigmap-only)) (minimap-flag bigmap-only)) + (format #t "bigmap-only ") + ) + (if (= (logand s5-0 (minimap-flag enemy)) (minimap-flag enemy)) + (format #t "enemy ") + ) + (if (= (logand (minimap-flag wasall) s5-0) (minimap-flag wasall)) + (format #t "wasall ") + ) + (if (= (logand s5-0 (minimap-flag clamp)) (minimap-flag clamp)) + (format #t "clamp ") + ) + (if (= (logand s5-0 (minimap-flag minimap)) (minimap-flag minimap)) + (format #t "minimap ") + ) + (if (= (logand s5-0 (minimap-flag flash)) (minimap-flag flash)) + (format #t "flash ") + ) + (if (= (logand s5-0 (minimap-flag task-graph)) (minimap-flag task-graph)) + (format #t "task-graph ") + ) + (if (= (logand (minimap-flag transport) s5-0) (minimap-flag transport)) + (format #t "transport ") + ) + (if (= (logand s5-0 (minimap-flag trail)) (minimap-flag trail)) + (format #t "trail ") + ) + (if (= (logand s5-0 (minimap-flag frustum)) (minimap-flag frustum)) + (format #t "frustum ") + ) + (if (= (logand s5-0 (minimap-flag background)) (minimap-flag background)) + (format #t "background ") + ) + (if (= (logand s5-0 (minimap-flag goal)) (minimap-flag goal)) + (format #t "goal ") + ) + (if (= (logand s5-0 (minimap-flag fade-out)) (minimap-flag fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (minimap-flag desert) s5-0) (minimap-flag desert)) + (format #t "desert ") + ) + (if (= (logand (minimap-flag local-only) s5-0) (minimap-flag local-only)) + (format #t "local-only ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Ticon-xy: #~%" (-> this icon-xy)) + (let ((t9-28 format) + (a0-57 #t) + (a1-28 "~1Tclass: #x~X : ~S~%") + (a2-5 (-> this class)) + (v1-68 (-> this class)) + ) + (t9-28 a0-57 a1-28 a2-5 (cond + ((= v1-68 (minimap-class factory-clamped-tower)) + "factory-clamped-tower" + ) + ((= v1-68 (minimap-class none)) + "none" + ) + ((= v1-68 (minimap-class tiny-red-dot)) + "tiny-red-dot" + ) + ((= v1-68 (minimap-class goal-no-trail)) + "goal-no-trail" + ) + ((= v1-68 (minimap-class bbush-desa-3)) + "bbush-desa-3" + ) + ((= v1-68 (minimap-class ruins-hut)) + "ruins-hut" + ) + ((= v1-68 (minimap-class bbush-port-8)) + "bbush-port-8" + ) + ((= v1-68 (minimap-class onintent)) + "onintent" + ) + ((= v1-68 (minimap-class big-red-flashing-clamped-dot)) + "big-red-flashing-clamped-dot" + ) + ((= v1-68 (minimap-class green-clamped-dot)) + "green-clamped-dot" + ) + ((= v1-68 (minimap-class projectile)) + "projectile" + ) + ((= v1-68 (minimap-class bbush-desa-2)) + "bbush-desa-2" + ) + ((= v1-68 (minimap-class cty-sniper-vicinity)) + "cty-sniper-vicinity" + ) + ((= v1-68 (minimap-class palace-ruins)) + "palace-ruins" + ) + ((= v1-68 (minimap-class mine-armor)) + "mine-armor" + ) + ((= v1-68 (minimap-class racer-target)) + "racer-target" + ) + ((= v1-68 (minimap-class bbush-slumc-2)) + "bbush-slumc-2" + ) + ((= v1-68 (minimap-class bbush-desc-2)) + "bbush-desc-2" + ) + ((= v1-68 (minimap-class bbush-inda-5)) + "bbush-inda-5" + ) + ((= v1-68 (minimap-class seem-wascitya)) + "seem-wascitya" + ) + ((= v1-68 (minimap-class bbush-dese-2)) + "bbush-dese-2" + ) + ((= v1-68 (minimap-class nest-bridge)) + "nest-bridge" + ) + ((= v1-68 (minimap-class bbush-inda-2)) + "bbush-inda-2" + ) + ((= v1-68 (minimap-class bbush-wasb-3)) + "bbush-wasb-3" + ) + ((= v1-68 (minimap-class gun-dark)) + "gun-dark" + ) + ((= v1-68 (minimap-class sewer-slumb)) + "sewer-slumb" + ) + ((= v1-68 (minimap-class bbush-desg-2)) + "bbush-desg-2" + ) + ((= v1-68 (minimap-class parking-spot)) + "parking-spot" + ) + ((= v1-68 (minimap-class bbush-inda-1)) + "bbush-inda-1" + ) + ((= v1-68 (minimap-class spargus-city)) + "spargus-city" + ) + ((= v1-68 (minimap-class gray-clamped-dot)) + "gray-clamped-dot" + ) + ((= v1-68 (minimap-class volcano-stone-lid)) + "volcano-stone-lid" + ) + ((= v1-68 (minimap-class bbush-port-7)) + "bbush-port-7" + ) + ((= v1-68 (minimap-class ruins-goal)) + "ruins-goal" + ) + ((= v1-68 (minimap-class mine-sign-down)) + "mine-sign-down" + ) + ((= v1-68 (minimap-class guard)) + "guard" + ) + ((= v1-68 (minimap-class bbush-desc)) + "bbush-desc" + ) + ((= v1-68 (minimap-class desertb-race)) + "desertb-race" + ) + ((= v1-68 (minimap-class factory-clamped-target)) + "factory-clamped-target" + ) + ((= v1-68 (minimap-class desert-oasis)) + "desert-oasis" + ) + ((= v1-68 (minimap-class bbush-dese-5)) + "bbush-dese-5" + ) + ((= v1-68 (minimap-class bbush-dese)) + "bbush-dese" + ) + ((= v1-68 (minimap-class bbush-sluma-2)) + "bbush-sluma-2" + ) + ((= v1-68 (minimap-class kleever-arena)) + "kleever-arena" + ) + ((= v1-68 (minimap-class bbush-desc-5)) + "bbush-desc-5" + ) + ((= v1-68 (minimap-class bbush-slumb-1)) + "bbush-slumb-1" + ) + ((= v1-68 (minimap-class bbush-desg)) + "bbush-desg" + ) + ((= v1-68 (minimap-class bbush-wasa-3)) + "bbush-wasa-3" + ) + ((= v1-68 (minimap-class bbush-slumb-3)) + "bbush-slumb-3" + ) + ((= v1-68 (minimap-class bbush-port-6)) + "bbush-port-6" + ) + ((= v1-68 (minimap-class temple-defend-door-1)) + "temple-defend-door-1" + ) + ((= v1-68 (minimap-class bbush-desc-4)) + "bbush-desc-4" + ) + ((= v1-68 (minimap-class templea-door)) + "templea-door" + ) + ((= v1-68 (minimap-class templeb-watchers)) + "templeb-watchers" + ) + ((= v1-68 (minimap-class mine-elevator)) + "mine-elevator" + ) + ((= v1-68 (minimap-class damus-wasdoors)) + "damus-wasdoors" + ) + ((= v1-68 (minimap-class bbush-inda-4)) + "bbush-inda-4" + ) + ((= v1-68 (minimap-class bbush-wasa-6)) + "bbush-wasa-6" + ) + ((= v1-68 (minimap-class big-green-flashing-clamped-dot)) + "big-green-flashing-clamped-dot" + ) + ((= v1-68 (minimap-class bbush-dese-4)) + "bbush-dese-4" + ) + ((= v1-68 (minimap-class bbush-genb-2)) + "bbush-genb-2" + ) + ((= v1-68 (minimap-class mountain-gear)) + "mountain-gear" + ) + ((= v1-68 (minimap-class big-green-flashing-trail-dot)) + "big-green-flashing-trail-dot" + ) + ((= v1-68 (minimap-class bbush-desg-4)) + "bbush-desg-4" + ) + ((= v1-68 (minimap-class bbush-desa)) + "bbush-desa" + ) + ((= v1-68 (minimap-class bbush-wasa-2)) + "bbush-wasa-2" + ) + ((= v1-68 (minimap-class bbush-desg-3)) + "bbush-desg-3" + ) + ((= v1-68 (minimap-class temple-tests-door)) + "temple-tests-door" + ) + ((= v1-68 (minimap-class medium-green-dot)) + "medium-green-dot" + ) + ((= v1-68 (minimap-class volcano-monk)) + "volcano-monk" + ) + ((= v1-68 (minimap-class robot-frustum)) + "robot-frustum" + ) + ((= v1-68 (minimap-class bbush-port-5)) + "bbush-port-5" + ) + ((= v1-68 (minimap-class templeb-seem)) + "templeb-seem" + ) + ((= v1-68 (minimap-class damus-arena)) + "damus-arena" + ) + ((= v1-68 (minimap-class nest-cocoon)) + "nest-cocoon" + ) + ((= v1-68 (minimap-class bbush-wasa-5)) + "bbush-wasa-5" + ) + ((= v1-68 (minimap-class bbush-genb-1)) + "bbush-genb-1" + ) + ((= v1-68 (minimap-class bbush-dese-3)) + "bbush-dese-3" + ) + ((= v1-68 (minimap-class red-clamped-dot)) + "red-clamped-dot" + ) + ((= v1-68 (minimap-class bbush-slumb-4)) + "bbush-slumb-4" + ) + ((= v1-68 (minimap-class factory)) + "factory" + ) + ((= v1-68 (minimap-class bbush-port-1)) + "bbush-port-1" + ) + ((= v1-68 (minimap-class volcano-collapsing-rock)) + "volcano-collapsing-rock" + ) + ((= v1-68 (minimap-class bbush-desc-3)) + "bbush-desc-3" + ) + ((= v1-68 (minimap-class bbush-genb-4)) + "bbush-genb-4" + ) + ((= v1-68 (minimap-class wascity-gungame)) + "wascity-gungame" + ) + ((= v1-68 (minimap-class wasteland-arena)) + "wasteland-arena" + ) + ((= v1-68 (minimap-class bbush-wasa-1)) + "bbush-wasa-1" + ) + ((= v1-68 (minimap-class bbush-port-4)) + "bbush-port-4" + ) + ((= v1-68 (minimap-class guard-frustum)) + "guard-frustum" + ) + ((= v1-68 (minimap-class monk-temple)) + "monk-temple" + ) + ((= v1-68 (minimap-class big-red-flashing-trail-dot)) + "big-red-flashing-trail-dot" + ) + ((= v1-68 (minimap-class gun-yellow)) + "gun-yellow" + ) + ((= v1-68 (minimap-class city-transport)) + "city-transport" + ) + ((= v1-68 (minimap-class atoll-ashelin)) + "atoll-ashelin" + ) + ((= v1-68 (minimap-class mine-door)) + "mine-door" + ) + ((= v1-68 (minimap-class metalhead)) + "metalhead" + ) + ((= v1-68 (minimap-class bbush-indb-2)) + "bbush-indb-2" + ) + ((= v1-68 (minimap-class wascity-pre-game)) + "wascity-pre-game" + ) + ((= v1-68 (minimap-class sig-wasdoors)) + "sig-wasdoors" + ) + ((= v1-68 (minimap-class goal)) + "goal" + ) + ((= v1-68 (minimap-class stadium)) + "stadium" + ) + ((= v1-68 (minimap-class bbush-genb-3)) + "bbush-genb-3" + ) + ((= v1-68 (minimap-class bbush-desb-2)) + "bbush-desb-2" + ) + ((= v1-68 (minimap-class seem-wascityb)) + "seem-wascityb" + ) + ((= v1-68 (minimap-class dp-bipedal)) + "dp-bipedal" + ) + ((= v1-68 (minimap-class bbush-wasa-4)) + "bbush-wasa-4" + ) + ((= v1-68 (minimap-class desert-corral)) + "desert-corral" + ) + ((= v1-68 (minimap-class medium-purple-dot)) + "medium-purple-dot" + ) + ((= v1-68 (minimap-class bbush-desd-2)) + "bbush-desd-2" + ) + ((= v1-68 (minimap-class templeb-regen)) + "templeb-regen" + ) + ((= v1-68 (minimap-class gungame)) + "gungame" + ) + ((= v1-68 (minimap-class goal-no-trail-bigmap)) + "goal-no-trail-bigmap" + ) + ((= v1-68 (minimap-class big-orange-flashing-clamped-dot)) + "big-orange-flashing-clamped-dot" + ) + ((= v1-68 (minimap-class desert-transport)) + "desert-transport" + ) + ((= v1-68 (minimap-class bbush-slumc-1)) + "bbush-slumc-1" + ) + ((= v1-68 (minimap-class bbush-indb-1)) + "bbush-indb-1" + ) + ((= v1-68 (minimap-class factoryc-vehicle)) + "factoryc-vehicle" + ) + ((= v1-68 (minimap-class bbush-desd-5)) + "bbush-desd-5" + ) + ((= v1-68 (minimap-class templeb-defend)) + "templeb-defend" + ) + ((= v1-68 (minimap-class bbush-desd)) + "bbush-desd" + ) + ((= v1-68 (minimap-class freehq)) + "freehq" + ) + ((= v1-68 (minimap-class bbush-wasb-7)) + "bbush-wasb-7" + ) + ((= v1-68 (minimap-class temple-defend-door-3)) + "temple-defend-door-3" + ) + ((= v1-68 (minimap-class templeb-warpgate)) + "templeb-warpgate" + ) + ((= v1-68 (minimap-class samos-genb)) + "samos-genb" + ) + ((= v1-68 (minimap-class bbush-desf)) + "bbush-desf" + ) + ((= v1-68 (minimap-class forest-samos)) + "forest-samos" + ) + ((= v1-68 (minimap-class bbush-desb-4)) + "bbush-desb-4" + ) + ((= v1-68 (minimap-class bbush-desh)) + "bbush-desh" + ) + ((= v1-68 (minimap-class mine-sign-up)) + "mine-sign-up" + ) + ((= v1-68 (minimap-class desert-temple)) + "desert-temple" + ) + ((= v1-68 (minimap-class bbush-desd-4)) + "bbush-desd-4" + ) + ((= v1-68 (minimap-class sewer-kg)) + "sewer-kg" + ) + ((= v1-68 (minimap-class hiphog)) + "hiphog" + ) + ((= v1-68 (minimap-class atoll-valve)) + "atoll-valve" + ) + ((= v1-68 (minimap-class bbush-sluma-1)) + "bbush-sluma-1" + ) + ((= v1-68 (minimap-class racer-errol)) + "racer-errol" + ) + ((= v1-68 (minimap-class bbush-wasb-6)) + "bbush-wasb-6" + ) + ((= v1-68 (minimap-class forest)) + "forest" + ) + ((= v1-68 (minimap-class bbush-sluma-3)) + "bbush-sluma-3" + ) + ((= v1-68 (minimap-class bbush-desb)) + "bbush-desb" + ) + ((= v1-68 (minimap-class bbush-indb-3)) + "bbush-indb-3" + ) + ((= v1-68 (minimap-class bbush-wasb-2)) + "bbush-wasb-2" + ) + ((= v1-68 (minimap-class racer)) + "racer" + ) + ((= v1-68 (minimap-class desert-nest-entrance)) + "desert-nest-entrance" + ) + ((= v1-68 (minimap-class big-purple-flashing-clamped-dot)) + "big-purple-flashing-clamped-dot" + ) + ((= v1-68 (minimap-class damus-waspal)) + "damus-waspal" + ) + ((= v1-68 (minimap-class big-red-flashing-dot)) + "big-red-flashing-dot" + ) + ((= v1-68 (minimap-class mountain-shard)) + "mountain-shard" + ) + ((= v1-68 (minimap-class parked-vehicle)) + "parked-vehicle" + ) + ((= v1-68 (minimap-class temple-defend-door-2)) + "temple-defend-door-2" + ) + ((= v1-68 (minimap-class kleever-wasdoors)) + "kleever-wasdoors" + ) + ((= v1-68 (minimap-class waspal)) + "waspal" + ) + ((= v1-68 (minimap-class bbush-desd-3)) + "bbush-desd-3" + ) + ((= v1-68 (minimap-class templeb-freeze)) + "templeb-freeze" + ) + ((= v1-68 (minimap-class desert-marauder-village)) + "desert-marauder-village" + ) + ((= v1-68 (minimap-class bbush-wasb-5)) + "bbush-wasb-5" + ) + ((= v1-68 (minimap-class bbush-desb-3)) + "bbush-desb-3" + ) + ((= v1-68 (minimap-class temple-elev)) + "temple-elev" + ) + ((= v1-68 (minimap-class bbush-inda-3)) + "bbush-inda-3" + ) + ((= v1-68 (minimap-class wasdoors)) + "wasdoors" + ) + ((= v1-68 (minimap-class ruins-elec-gate)) + "ruins-elec-gate" + ) + ((= v1-68 (minimap-class kleever-wascityb)) + "kleever-wascityb" + ) + ((= v1-68 (minimap-class mountain-lens)) + "mountain-lens" + ) + ((= v1-68 (minimap-class templex-darkmaker)) + "templex-darkmaker" + ) + ((= v1-68 (minimap-class desglide-thermal-dot)) + "desglide-thermal-dot" + ) + ((= v1-68 (minimap-class bbush-wasb-1)) + "bbush-wasb-1" + ) + ((= v1-68 (minimap-class vinroom)) + "vinroom" + ) + ((= v1-68 (minimap-class bbush-post-game)) + "bbush-post-game" + ) + ((= v1-68 (minimap-class wascity-leaper-race)) + "wascity-leaper-race" + ) + ((= v1-68 (minimap-class sewer-genb)) + "sewer-genb" + ) + ((= v1-68 (minimap-class dark-maker)) + "dark-maker" + ) + ((= v1-68 (minimap-class neo-wasp)) + "neo-wasp" + ) + ((= v1-68 (minimap-class volcano-dark-maker-idol)) + "volcano-dark-maker-idol" + ) + ((= v1-68 (minimap-class desglide-ring-dot)) + "desglide-ring-dot" + ) + ((= v1-68 (minimap-class bbush-wasb-4)) + "bbush-wasb-4" + ) + (else + "*unknown*" + ) + ) + ) + ) + (format #t "~1Tscale: ~f~%" (-> this scale)) + (format #t "~1Tcolor: #x~X~%" (-> this color)) + (label cfg-403) + this + ) + +;; definition of type connection-minimap +(deftype connection-minimap (connection-pers) + ((next connection-minimap :override) + (handle handle :overlay-at update-time) + (position vector :overlay-at (-> param 0)) + (alpha float :overlay-at (-> param 1)) + (flags minimap-flag :overlay-at (-> param 2)) + (class minimap-class-node :overlay-at (-> param 3)) + (node uint16) + (edge-ry int16) + (last-world-pos vector :inline) + (last-relative-pos vector :inline) + ) + ) + +;; definition for method 3 of type connection-minimap +;; INFO: Used lq/sq +(defmethod inspect ((this connection-minimap)) + (when (not this) + (set! this this) + (goto cfg-60) + ) + (format #t "[~8x] ~A~%" this 'connection-minimap) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tkey: ~A~%" (-> this key)) + (format #t "~1Tupdate-time: ~D~%" (-> this update-time)) + (format #t "~1Tparam[4] @ #x~X~%" (-> this param)) + (dotimes (s5-0 4) + (format #t "~T [~D]~1Tparam: ~A~%" s5-0 (-> this param s5-0)) + ) + (format #t "~1Tparam-int32[4] @ #x~X~%" (-> this param)) + (dotimes (s5-1 4) + (format #t "~T [~D]~1Tparam-int32: ~D~%" s5-1 (-> this param s5-1)) + ) + (format #t "~1Tparam-int64[2] @ #x~X~%" (-> this param)) + (dotimes (s5-2 2) + (format #t "~T [~D]~1Tparam-int64: ~D~%" s5-2 (-> this param-int64 s5-2)) + ) + (format #t "~1Tparam-float[4] @ #x~X~%" (-> this param)) + (dotimes (s5-3 4) + (format #t "~T [~D]~1Tparam-float: ~f~%" s5-3 (the-as float (-> this param s5-3))) + ) + (format #t "~1Tparam-quat: #x~X~%" (-> this param-quat)) + (format #t "~1Thandle: ~D~%" (-> this update-time)) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Talpha: ~f~%" (-> this alpha)) + (format #t "~1Tflags: #x~X : (minimap-flag " (-> this flags)) + (let ((s5-4 (-> this flags))) + (if (= (logand s5-4 (minimap-flag active)) (minimap-flag active)) + (format #t "active ") + ) + (if (= (logand s5-4 (minimap-flag bigmap)) (minimap-flag bigmap)) + (format #t "bigmap ") + ) + (if (= (logand (minimap-flag waswide) s5-4) (minimap-flag waswide)) + (format #t "waswide ") + ) + (if (= (logand s5-4 (minimap-flag fade-in)) (minimap-flag fade-in)) + (format #t "fade-in ") + ) + (if (= (logand s5-4 (minimap-flag racer)) (minimap-flag racer)) + (format #t "racer ") + ) + (if (= (logand (minimap-flag ctywide) s5-4) (minimap-flag ctywide)) + (format #t "ctywide ") + ) + (if (= (logand s5-4 (minimap-flag task)) (minimap-flag task)) + (format #t "task ") + ) + (if (= (logand s5-4 (minimap-flag bigmap-only)) (minimap-flag bigmap-only)) + (format #t "bigmap-only ") + ) + (if (= (logand s5-4 (minimap-flag enemy)) (minimap-flag enemy)) + (format #t "enemy ") + ) + (if (= (logand (minimap-flag wasall) s5-4) (minimap-flag wasall)) + (format #t "wasall ") + ) + (if (= (logand s5-4 (minimap-flag clamp)) (minimap-flag clamp)) + (format #t "clamp ") + ) + (if (= (logand s5-4 (minimap-flag minimap)) (minimap-flag minimap)) + (format #t "minimap ") + ) + (if (= (logand s5-4 (minimap-flag flash)) (minimap-flag flash)) + (format #t "flash ") + ) + (if (= (logand s5-4 (minimap-flag task-graph)) (minimap-flag task-graph)) + (format #t "task-graph ") + ) + (if (= (logand (minimap-flag transport) s5-4) (minimap-flag transport)) + (format #t "transport ") + ) + (if (= (logand s5-4 (minimap-flag trail)) (minimap-flag trail)) + (format #t "trail ") + ) + (if (= (logand s5-4 (minimap-flag frustum)) (minimap-flag frustum)) + (format #t "frustum ") + ) + (if (= (logand s5-4 (minimap-flag background)) (minimap-flag background)) + (format #t "background ") + ) + (if (= (logand s5-4 (minimap-flag goal)) (minimap-flag goal)) + (format #t "goal ") + ) + (if (= (logand s5-4 (minimap-flag fade-out)) (minimap-flag fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (minimap-flag desert) s5-4) (minimap-flag desert)) + (format #t "desert ") + ) + (if (= (logand (minimap-flag local-only) s5-4) (minimap-flag local-only)) + (format #t "local-only ") + ) + ) + (format #t ")~%") + (format #t "~1Tclass: #~%" (-> this class)) + (format #t "~1Tnode: ~D~%" (-> this node)) + (format #t "~1Tedge-ry: ~D~%" (-> this edge-ry)) + (format #t "~1Tlast-world-pos: ~`vector`P~%" (-> this last-world-pos)) + (format #t "~1Tlast-relative-pos: ~`vector`P~%" (-> this last-relative-pos)) + (label cfg-60) + this + ) + +;; definition of type engine-minimap +(deftype engine-minimap (engine-pers) + ((alive-list connection-minimap :override) + (dead-list connection-minimap :override) + ) + ) + +;; definition for method 3 of type engine-minimap +(defmethod inspect ((this engine-minimap)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Telement-type: ~A~%" (-> this element-type)) + (format #t "~1Texecute-time: ~D~%" (-> this execute-time)) + (format #t "~1Talive-list: #~%" (-> this alive-list)) + (format #t "~1Tdead-list: #~%" (-> this dead-list)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type minimap-trail +(deftype minimap-trail (structure) + ((used-by connection-minimap) + (search-id uint32) + (node-count int16) + (goal-node-id int32) + (node-path-dist float) + (last-updated uint64) + (cached-info trail-cached-search-info :inline) + (node-id uint16 64) + ) + (:methods + (minimap-trail-method-9 () none) + (minimap-trail-method-10 () none) + ) + ) + +;; definition for method 3 of type minimap-trail +(defmethod inspect ((this minimap-trail)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap-trail) + (format #t "~1Tused-by: ~`connection-minimap`P~%" (-> this used-by)) + (format #t "~1Tsearch-id: ~D~%" (-> this search-id)) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tgoal-node-id: ~D~%" (-> this goal-node-id)) + (format #t "~1Tnode-path-dist: ~f~%" (-> this node-path-dist)) + (format #t "~1Tlast-updated: ~D~%" (-> this last-updated)) + (format #t "~1Tcached-info: #~%" (-> this cached-info)) + (format #t "~1Tnode-id[64] @ #x~X~%" (-> this node-id)) + (label cfg-4) + this + ) + +;; definition of type minimap-draw-work +(deftype minimap-draw-work (structure) + ((buf dma-buffer) + (justify-right symbol) + (global-flags uint32) + (draw-pos vector4w :inline) + (mat matrix :inline) + (corner vector 4 :inline) + ) + ) + +;; definition for method 3 of type minimap-draw-work +(defmethod inspect ((this minimap-draw-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap-draw-work) + (format #t "~1Tbuf: ~A~%" (-> this buf)) + (format #t "~1Tjustify-right: ~A~%" (-> this justify-right)) + (format #t "~1Tglobal-flags: ~D~%" (-> this global-flags)) + (format #t "~1Tdraw-pos: #~%" (-> this draw-pos)) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Tcorner[4] @ #x~X~%" (-> this corner)) + (label cfg-4) + this + ) + +;; definition of type minimap +(deftype minimap (structure) + ((draw-tmpl dma-gif-packet :inline) + (draw2-tmpl dma-gif-packet :inline) + (draw3-tmpl dma-gif-packet :inline) + (draw4-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (adgif-tmpl dma-gif-packet :inline) + (color vector4w :inline) + (offset vector :inline) + (minimap-corner vector :inline) + (last-name string) + (last-tex basic) + (target-inv-scale float) + (map-bits uint64) + (level level) + (ctywide level) + (meters-per-texel float) + (pos-scale float) + (min-inv-scale float) + (max-inv-scale float) + (inv-scale float :overlay-at (-> offset data 1)) + (map-inv-scale float) + (icon-inv-scale float) + (fade float :overlay-at (-> offset data 3)) + (engine engine-minimap) + (engine-key uint32) + (trail minimap-trail 6 :inline) + (race-tex texture) + (race-scale float) + (race-level level) + (sprite2-tmpl dma-gif-packet :inline) + (race-corner vector :inline) + (goal-time float) + (frustum-alpha float) + ) + (:methods + (minimap-method-9 () none) + (minimap-method-10 () none) + (minimap-method-11 () none) + (minimap-method-12 () none) + (minimap-method-13 () none) + (minimap-method-14 () none) + (minimap-method-15 () none) + (minimap-method-16 () none) + (minimap-method-17 () none) + (minimap-method-18 () none) + (minimap-method-19 () none) + (minimap-method-20 () none) + (minimap-method-21 () none) + (minimap-method-22 () none) + (minimap-method-23 () none) + (minimap-method-24 () none) + (minimap-method-25 () none) + (minimap-method-26 () none) + (minimap-method-27 () none) + ) + ) + +;; definition for method 3 of type minimap +(defmethod inspect ((this minimap)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap) + (format #t "~1Tdraw-tmpl: #~%" (-> this draw-tmpl)) + (format #t "~1Tdraw2-tmpl: #~%" (-> this draw2-tmpl)) + (format #t "~1Tdraw3-tmpl: #~%" (-> this draw3-tmpl)) + (format #t "~1Tdraw4-tmpl: #~%" (-> this draw4-tmpl)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Toffset: #~%" (-> this offset)) + (format #t "~1Tminimap-corner: #~%" (-> this minimap-corner)) + (format #t "~1Tlast-name: ~A~%" (-> this last-name)) + (format #t "~1Tlast-tex: ~A~%" (-> this last-tex)) + (format #t "~1Ttarget-inv-scale: ~f~%" (-> this target-inv-scale)) + (format #t "~1Tmap-bits: ~D~%" (-> this map-bits)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tctywide: ~A~%" (-> this ctywide)) + (format #t "~1Tmeters-per-texel: ~f~%" (-> this meters-per-texel)) + (format #t "~1Tpos-scale: ~f~%" (-> this pos-scale)) + (format #t "~1Tmin-inv-scale: ~f~%" (-> this min-inv-scale)) + (format #t "~1Tmax-inv-scale: ~f~%" (-> this max-inv-scale)) + (format #t "~1Tinv-scale: ~f~%" (-> this offset y)) + (format #t "~1Tmap-inv-scale: ~f~%" (-> this map-inv-scale)) + (format #t "~1Ticon-inv-scale: ~f~%" (-> this icon-inv-scale)) + (format #t "~1Tfade: ~f~%" (-> this offset w)) + (format #t "~1Tengine: ~A~%" (-> this engine)) + (format #t "~1Tengine-key: ~D~%" (-> this engine-key)) + (format #t "~1Ttrail[6] @ #x~X~%" (-> this trail)) + (format #t "~1Trace-tex: ~A~%" (-> this race-tex)) + (format #t "~1Trace-scale: ~f~%" (-> this race-scale)) + (format #t "~1Trace-level: ~A~%" (-> this race-level)) + (format #t "~1Tsprite2-tmpl: #~%" (-> this sprite2-tmpl)) + (format #t "~1Trace-corner: #~%" (-> this race-corner)) + (format #t "~1Tgoal-time: ~f~%" (-> this goal-time)) + (format #t "~1Tfrustum-alpha: ~f~%" (-> this frustum-alpha)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/util/capture-h_REF.gc b/test/decompiler/reference/jak3/engine/util/capture-h_REF.gc index ea9da098b0..5f52e23f88 100644 --- a/test/decompiler/reference/jak3/engine/util/capture-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/util/capture-h_REF.gc @@ -7,17 +7,17 @@ ;; definition of type gs-store-image-packet (deftype gs-store-image-packet (structure) ((vifcode vif-tag 4) - (giftag uint128) - (bitbltbuf uint64) - (bitbltbuf-addr uint64) - (trxpos uint64) - (trxpos-addr uint64) - (trxreg uint64) - (trxreg-addr uint64) + (giftag gif-tag) + (bitbltbuf gs-bitbltbuf) + (bitbltbuf-addr gs-reg64) + (trxpos gs-trxpos) + (trxpos-addr gs-reg64) + (trxreg gs-trxreg) + (trxreg-addr gs-reg64) (finish uint64) - (finish-addr uint64) - (trxdir uint64) - (trxdir-addr uint64) + (finish-addr gs-reg64) + (trxdir gs-trxdir) + (trxdir-addr gs-reg64) ) ) @@ -91,7 +91,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/util/capture_REF.gc b/test/decompiler/reference/jak3/engine/util/capture_REF.gc new file mode 100644 index 0000000000..f2868bfb53 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/util/capture_REF.gc @@ -0,0 +1,73 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition for function gs-set-default-store-image +;; INFO: Used lq/sq +(defun gs-set-default-store-image ((packet gs-store-image-packet) + (source-vram int) + (width int) + (tex-fmt gs-psm) + (ssax int) + (ssay int) + (rrw int) + (rrh int) + ) + "Set up a gs-store-image-packet for copying VRAM data to RAM." + (set! (-> packet vifcode 0) (new 'static 'vif-tag)) + (set! (-> packet vifcode 1) (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd mskpath3))) + (set! (-> packet vifcode 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> packet vifcode 3) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> packet giftag) (new 'static 'gif-tag :nloop #x5 :eop #x1 :nreg #x1 :regs0 (gif-reg-id a+d))) + (set! (-> packet bitbltbuf) + (new 'static 'gs-bitbltbuf :sbp source-vram :sbw width :spsm (the-as int tex-fmt)) + ) + (set! (-> packet bitbltbuf-addr) (gs-reg64 bitbltbuf)) + (set! (-> packet trxpos) (new 'static 'gs-trxpos :ssax ssax :ssay ssay)) + (set! (-> packet trxpos-addr) (gs-reg64 trxpos)) + (set! (-> packet trxreg) (new 'static 'gs-trxreg :rrw rrw :rrh rrh)) + (set! (-> packet trxreg-addr) (gs-reg64 trxreg)) + (set! (-> packet finish) (the-as uint 0)) + (set! (-> packet finish-addr) (gs-reg64 finish)) + (set! (-> packet trxdir) (new 'static 'gs-trxdir :xdir #x1)) + (set! (-> packet trxdir-addr) (gs-reg64 trxdir)) + (.sync.l) + 7 + ) + +;; definition for function store-image +;; WARN: Return type mismatch int vs none. +(defun store-image ((work screen-shot-work)) + "Take a screenshot!" + (let ((gp-0 512) + (s5-0 416) + ) + (let ((a3-0 (-> work count)) + (a2-0 (-> work name)) + ) + (set! (-> *image-name* data 0) (the-as uint 0)) + (format *image-name* "final/rawshots/~s-~d.raw" a2-0 a3-0) + ) + (format 0 "writing ~s~%" *image-name*) + (let ((s4-0 (new 'stack 'file-stream *image-name* 'write))) + (let ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf data))) + (let ((s2-0 (new 'static 'gs-store-image-packet))) + (gs-set-default-store-image s2-0 #x3300 (/ gp-0 64) (gs-psm ct32) 0 0 gp-0 s5-0) + (flush-cache 0) + (gs-store-image s2-0 s3-0) + ) + (sync-path 0 0) + (file-stream-write s4-0 s3-0 (the-as uint (* (* s5-0 gp-0) 4))) + ) + (file-stream-close s4-0) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc new file mode 100644 index 0000000000..50e87edd14 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc @@ -0,0 +1,362 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type trail-node +(deftype trail-node (structure) + ((next-id int16) + (prev-id int16) + (parent-id int16) + (x int16) + (y int16) + (z int16) + (first-conn uint16) + (cost-from-start uint16) + (cost-to-goal uint16) + (flags trail-node-flag) + (conn-count uint8) + ) + (:methods + (trail-node-method-9 () none) + (trail-node-method-10 () none) + (trail-node-method-11 () none) + ) + ) + +;; definition for method 3 of type trail-node +(defmethod inspect ((this trail-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-node) + (format #t "~1Tnext-id: ~D~%" (-> this next-id)) + (format #t "~1Tprev-id: ~D~%" (-> this prev-id)) + (format #t "~1Tparent-id: ~D~%" (-> this parent-id)) + (format #t "~1Tx: ~D~%" (-> this x)) + (format #t "~1Ty: ~D~%" (-> this y)) + (format #t "~1Tz: ~D~%" (-> this z)) + (format #t "~1Tfirst-conn: ~D~%" (-> this first-conn)) + (format #t "~1Tcost-from-start: ~D~%" (-> this cost-from-start)) + (format #t "~1Tcost-to-goal: ~D~%" (-> this cost-to-goal)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tconn-count: ~D~%" (-> this conn-count)) + (label cfg-4) + this + ) + +;; definition of type trail-visgroup +(deftype trail-visgroup (structure) + ((first-node uint16) + (node-count uint8) + (pad uint8) + ) + ) + +;; definition for method 3 of type trail-visgroup +(defmethod inspect ((this trail-visgroup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-visgroup) + (format #t "~1Tfirst-node: ~D~%" (-> this first-node)) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tpad: ~D~%" (-> this pad)) + (label cfg-4) + this + ) + +;; definition of type trail-blocker +(deftype trail-blocker (structure) + ((plane plane :inline) + (center vector :inline) + (radius-squared float :overlay-at (-> center data 3)) + ) + ) + +;; definition for method 3 of type trail-blocker +(defmethod inspect ((this trail-blocker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-blocker) + (format #t "~1Tplane: #~%" (-> this plane)) + (format #t "~1Tcenter: #~%" (-> this center)) + (format #t "~1Tradius-squared: ~f~%" (-> this center w)) + (label cfg-4) + this + ) + +;; definition of type trail-conn +(deftype trail-conn (structure) + ((head-id uint16) + (tail-id uint16) + (flags conn-flag) + (visgroup-id uint8) + (cost uint16) + ) + (:methods + (trail-conn-method-9 () none) + ) + ) + +;; definition for method 3 of type trail-conn +(defmethod inspect ((this trail-conn)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-conn) + (format #t "~1Thead-id: ~D~%" (-> this head-id)) + (format #t "~1Ttail-id: ~D~%" (-> this tail-id)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tvisgroup-id: ~D~%" (-> this visgroup-id)) + (format #t "~1Tcost: ~D~%" (-> this cost)) + (label cfg-4) + this + ) + +;; definition of type trail-conn-hash-cell +(deftype trail-conn-hash-cell (structure) + ((first-conn uint16) + (conn-count uint8) + (pov-count uint8) + (first-pov uint16) + ) + ) + +;; definition for method 3 of type trail-conn-hash-cell +(defmethod inspect ((this trail-conn-hash-cell)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-conn-hash-cell) + (format #t "~1Tfirst-conn: ~D~%" (-> this first-conn)) + (format #t "~1Tconn-count: ~D~%" (-> this conn-count)) + (format #t "~1Tpov-count: ~D~%" (-> this pov-count)) + (format #t "~1Tfirst-pov: ~D~%" (-> this first-pov)) + (label cfg-4) + this + ) + +;; definition of type trail-conn-search +(deftype trail-conn-search (structure) + ((best-conn-id int32) + (best-dist float) + (src-pos vector) + (conn-pos vector) + (debug-cells-searched int32) + (debug-conns-searched int32) + (bounds bounding-box4w :inline) + (cell-quads qword 2 :inline) + (conn-quads qword 7 :inline) + (cell-bits vector16ub 2 :inline :overlay-at cell-quads) + (conn-bits vector16ub 2 :inline :overlay-at conn-quads) + ) + ) + +;; definition for method 3 of type trail-conn-search +(defmethod inspect ((this trail-conn-search)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-conn-search) + (format #t "~1Tbest-conn-id: ~D~%" (-> this best-conn-id)) + (format #t "~1Tbest-dist: ~f~%" (-> this best-dist)) + (format #t "~1Tsrc-pos: #~%" (-> this src-pos)) + (format #t "~1Tconn-pos: #~%" (-> this conn-pos)) + (format #t "~1Tdebug-cells-searched: ~D~%" (-> this debug-cells-searched)) + (format #t "~1Tdebug-conns-searched: ~D~%" (-> this debug-conns-searched)) + (format #t "~1Tbounds: #~%" (-> this bounds)) + (format #t "~1Tcell-quads[2] @ #x~X~%" (-> this cell-quads)) + (format #t "~1Tconn-quads[7] @ #x~X~%" (-> this conn-quads)) + (format #t "~1Tcell-bits[2] @ #x~X~%" (-> this cell-quads)) + (format #t "~1Tconn-bits[2] @ #x~X~%" (-> this conn-quads)) + (label cfg-4) + this + ) + +;; definition of type trail-conn-hash +(deftype trail-conn-hash (basic) + ((cell-width meters) + (origin vector :inline) + (cell (inline-array trail-conn-hash-cell)) + (conn-ids (pointer uint16)) + ) + ) + +;; definition for method 3 of type trail-conn-hash +(defmethod inspect ((this trail-conn-hash)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcell-width: (meters ~m)~%" (-> this cell-width)) + (format #t "~1Torigin: #~%" (-> this origin)) + (format #t "~1Tcell: #x~X~%" (-> this cell)) + (format #t "~1Tconn-ids: #x~X~%" (-> this conn-ids)) + (label cfg-4) + this + ) + +;; definition of type trail-cached-search-info +(deftype trail-cached-search-info (structure) + ((goal-conn-id int16) + (orig-goal-pos vector :inline) + (conn-goal-pos vector :inline) + ) + ) + +;; definition for method 3 of type trail-cached-search-info +(defmethod inspect ((this trail-cached-search-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-cached-search-info) + (format #t "~1Tgoal-conn-id: ~D~%" (-> this goal-conn-id)) + (format #t "~1Torig-goal-pos: #~%" (-> this orig-goal-pos)) + (format #t "~1Tconn-goal-pos: #~%" (-> this conn-goal-pos)) + (label cfg-4) + this + ) + +;; definition of type trail-cached-start-pov +(deftype trail-cached-start-pov (structure) + ((last-updated uint64) + (pov-can-see-start uint64) + (next-node-id int32) + (start-pos vector :inline) + ) + ) + +;; definition for method 3 of type trail-cached-start-pov +(defmethod inspect ((this trail-cached-start-pov)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-cached-start-pov) + (format #t "~1Tlast-updated: ~D~%" (-> this last-updated)) + (format #t "~1Tpov-can-see-start: ~D~%" (-> this pov-can-see-start)) + (format #t "~1Tnext-node-id: ~D~%" (-> this next-node-id)) + (format #t "~1Tstart-pos: #~%" (-> this start-pos)) + (label cfg-4) + this + ) + +;; definition of type trail-graph +(deftype trail-graph (basic) + ((mode uint8) + (search-id uint32) + (open-head-id int16) + (goal-conn-id int16) + (goal-node-id int16) + (over-under-thresh float) + (over-under-above-too-low float) + (over-under-below-too-high float) + (pov-node-count uint16) + (node-count uint16) + (conn-count uint16) + (blocker-count uint16) + (conn-mask uint8) + (node (inline-array trail-node)) + (conn (inline-array trail-conn)) + (blocker uint32) + (conn-ids (pointer uint16)) + (visgroup (inline-array trail-conn-hash-cell)) + (visnode-ids (pointer uint16)) + (conn-hash trail-conn-hash) + (cell-pov-bit-arrays uint32) + (pov-can-see-goal uint64) + (cached-start-pov trail-cached-start-pov :inline) + (orig-start-pos vector :inline) + (orig-goal-pos vector :inline) + (conn-start-pos vector :inline) + (conn-goal-pos vector :inline) + (open-quads qword 6 :inline) + (closed-quads qword 6 :inline) + (open-bits vector16ub 2 :inline :overlay-at open-quads) + (closed-bits vector16ub 2 :inline :overlay-at closed-quads) + ) + (:methods + (trail-graph-method-9 () none) + (trail-graph-method-10 () none) + (trail-graph-method-11 () none) + (trail-graph-method-12 () none) + (trail-graph-method-13 () none) + (trail-graph-method-14 () none) + (trail-graph-method-15 () none) + (trail-graph-method-16 () none) + (trail-graph-method-17 () none) + (trail-graph-method-18 () none) + (trail-graph-method-19 () none) + (trail-graph-method-20 () none) + (trail-graph-method-21 () none) + (trail-graph-method-22 () none) + (trail-graph-method-23 () none) + (trail-graph-method-24 () none) + (trail-graph-method-25 () none) + (trail-graph-method-26 () none) + (trail-graph-method-27 () none) + (trail-graph-method-28 () none) + (trail-graph-method-29 () none) + (trail-graph-method-30 () none) + (trail-graph-method-31 () none) + (trail-graph-method-32 () none) + (trail-graph-method-33 () none) + ) + ) + +;; definition for method 3 of type trail-graph +(defmethod inspect ((this trail-graph)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tsearch-id: ~D~%" (-> this search-id)) + (format #t "~1Topen-head-id: ~D~%" (-> this open-head-id)) + (format #t "~1Tgoal-conn-id: ~D~%" (-> this goal-conn-id)) + (format #t "~1Tgoal-node-id: ~D~%" (-> this goal-node-id)) + (format #t "~1Tover-under-thresh: ~f~%" (-> this over-under-thresh)) + (format #t "~1Tover-under-above-too-low: ~f~%" (-> this over-under-above-too-low)) + (format #t "~1Tover-under-below-too-high: ~f~%" (-> this over-under-below-too-high)) + (format #t "~1Tpov-node-count: ~D~%" (-> this pov-node-count)) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tconn-count: ~D~%" (-> this conn-count)) + (format #t "~1Tblocker-count: ~D~%" (-> this blocker-count)) + (format #t "~1Tconn-mask: ~D~%" (-> this conn-mask)) + (format #t "~1Tnode: #x~X~%" (-> this node)) + (format #t "~1Tconn: #x~X~%" (-> this conn)) + (format #t "~1Tblocker: #x~X~%" (-> this blocker)) + (format #t "~1Tconn-ids: #x~X~%" (-> this conn-ids)) + (format #t "~1Tvisgroup: #x~X~%" (-> this visgroup)) + (format #t "~1Tvisnode-ids: #x~X~%" (-> this visnode-ids)) + (format #t "~1Tconn-hash: ~A~%" (-> this conn-hash)) + (format #t "~1Tcell-pov-bit-arrays: #x~X~%" (-> this cell-pov-bit-arrays)) + (format #t "~1Tpov-can-see-goal: ~D~%" (-> this pov-can-see-goal)) + (format #t "~1Tcached-start-pov: #~%" (-> this cached-start-pov)) + (format #t "~1Torig-start-pos: #~%" (-> this orig-start-pos)) + (format #t "~1Torig-goal-pos: #~%" (-> this orig-goal-pos)) + (format #t "~1Tconn-start-pos: #~%" (-> this conn-start-pos)) + (format #t "~1Tconn-goal-pos: #~%" (-> this conn-goal-pos)) + (format #t "~1Topen-quads[6] @ #x~X~%" (-> this open-quads)) + (format #t "~1Tclosed-quads[6] @ #x~X~%" (-> this closed-quads)) + (format #t "~1Topen-bits[2] @ #x~X~%" (-> this open-quads)) + (format #t "~1Tclosed-bits[2] @ #x~X~%" (-> this closed-quads)) + (label cfg-4) + this + ) + +;; definition for symbol *trail-graph*, type trail-graph +(define *trail-graph* (the-as trail-graph #f)) + + + + diff --git a/test/offline/config/jak3/config.jsonc b/test/offline/config/jak3/config.jsonc index e59b3ee506..eea29af491 100644 --- a/test/offline/config/jak3/config.jsonc +++ b/test/offline/config/jak3/config.jsonc @@ -51,7 +51,9 @@ "transform-point-qword!", "transform-point-vector-scale!", // dma - "dma-buffer-add-vu-function" + "dma-buffer-add-vu-function", + // sky (multiple definition) + "(method 3 sky-vertex)" ], "skip_compile_states": {}