mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
[decomp] clean up first 50 files (#1422)
This commit is contained in:
parent
4a298fbe7b
commit
4c28794d23
|
@ -478,9 +478,9 @@
|
|||
:type int32
|
||||
:bitfield #f
|
||||
|
||||
(bucket-0 0) ;; ?
|
||||
(bucket-1 1) ;; ?
|
||||
(bucket-2 2) ;; ?
|
||||
;; 0
|
||||
;; 1
|
||||
;; 2
|
||||
(sky-draw 3) ;; actual sky and cloud framebuffer draws
|
||||
(ocean-mid-and-far 4) ;; actual ocean framebuffer draws for mid/transition/far
|
||||
|
||||
|
@ -490,7 +490,7 @@
|
|||
(tie-near-0 8) ;; tie near draw, level 0
|
||||
(tie-0 9) ;; tie draw, level 0
|
||||
(merc-tfrag-tex0 10) ;; merc, with tfrag textures, level 0
|
||||
(gmerc-tfrag-tex 11) ;; generic merc, with tfrag textures, level 0
|
||||
(generic-tfrag-tex0 11) ;; generic merc, with tfrag textures, level 0
|
||||
|
||||
(tfrag-tex1 12) ;; tfrag texture upload, level 1
|
||||
(tfrag-1 13) ;; tfrag draw, level 1
|
||||
|
@ -498,14 +498,22 @@
|
|||
(tie-near-1 15) ;; tie near draw, level 1
|
||||
(tie-1 16) ;; tie draw, level 1
|
||||
(merc-tfrag-tex1 17) ;; merc, with tfrag textures, level 1
|
||||
(gmerc-tfrag-tex1 18) ;; generic merc, with tfrag textures, level 1
|
||||
(generic-tfrag-tex1 18) ;; generic merc, with tfrag textures, level 1
|
||||
|
||||
(shrub-tex0 19)
|
||||
(shrub0 20)
|
||||
;; 21 (likely shrub near)
|
||||
(shrub-billboard0 22)
|
||||
(shrub-trans0 23)
|
||||
(shrub-generic0 24)
|
||||
|
||||
(shrub-tex1 25)
|
||||
(shrub1 26)
|
||||
;; 27 (likely shrub near)
|
||||
(shrub-billboard1 28)
|
||||
(shrub-trans1 29)
|
||||
(shrub-generic1 30)
|
||||
|
||||
(generic-foreground 30) ;; ?
|
||||
(alpha-tex0 31)
|
||||
(tfrag-trans-0 32) ;; also sky blend
|
||||
(tfrag-trans-near-0 33)
|
||||
|
@ -522,43 +530,37 @@
|
|||
(tfrag-ice-1 43)
|
||||
(tfrag-ice-near-1 44)
|
||||
|
||||
(bucket-45 45)
|
||||
(bucket-46 46)
|
||||
(merc-alpha-tex 45)
|
||||
(generic-alpha-tex 46)
|
||||
|
||||
(shadow 47)
|
||||
|
||||
(pris-tex0 48)
|
||||
(bucket-49 49)
|
||||
(bucket-50 50)
|
||||
;; merc0 49
|
||||
;; generic0 50
|
||||
(merc-pris0 49)
|
||||
(generic-pris0 50)
|
||||
|
||||
(pris-tex1 51)
|
||||
(bucket-52 52)
|
||||
(bucket-53 53)
|
||||
(merc-eyes 54) ;; eye::update-eyes
|
||||
;; merc1 52
|
||||
;; generic1 53
|
||||
(merc-pris1 52)
|
||||
(generic-pris1 53)
|
||||
|
||||
(eyes 54)
|
||||
|
||||
(merc-pris-common 55)
|
||||
(generic-pris-common 56)
|
||||
|
||||
(bucket-55 55)
|
||||
(bucket-56 56)
|
||||
(water-tex0 57)
|
||||
(bucket-58 58)
|
||||
(bucket-59 59)
|
||||
;; merc0 58 (+ default)
|
||||
;; generic0 59 (+ default)
|
||||
(merc-water0 58)
|
||||
(generic-water0 59)
|
||||
|
||||
(water-tex1 60)
|
||||
(bucket-61 61)
|
||||
(bucket-62 62)
|
||||
(bucket-63 63) ; ocean
|
||||
;; merc1 61
|
||||
;; generic1 62
|
||||
(merc-water1 61)
|
||||
(generic-water1 62)
|
||||
|
||||
(ocean-near 63) ; ocean
|
||||
(depth-cue 64)
|
||||
(pre-sprite-textures 65) ;; common
|
||||
(common-page-tex 65)
|
||||
(sprite 66)
|
||||
;; debug spheres? 67
|
||||
(debug 67)
|
||||
;; debug text 68
|
||||
(debug-no-zbuf 68)
|
||||
|
||||
;; extra buckets for pc port
|
||||
|
@ -2657,7 +2659,7 @@
|
|||
(global-y-angle-to-point (_type_ vector) float 23)
|
||||
(relative-y-angle-to-point (_type_ vector) float 24)
|
||||
(roll-relative-to-gravity (_type_) float 25)
|
||||
(TODO-RENAME-26 (_type_ int vector float) trsqv 26)
|
||||
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
|
||||
(get-quaternion (_type_) quaternion 27)
|
||||
)
|
||||
)
|
||||
|
@ -2969,7 +2971,7 @@
|
|||
(deftype sound-id (uint32)
|
||||
()
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(unused-9 () none 9)
|
||||
)
|
||||
:flag-assert #xa00000004
|
||||
)
|
||||
|
@ -4974,13 +4976,13 @@
|
|||
(declare-type art-group basic)
|
||||
;; custom fields
|
||||
(deftype load-dir (basic)
|
||||
((unknown basic :offset-assert 4)
|
||||
((lev level :offset-assert 4)
|
||||
(string-array (array string) :offset-assert 8) ;; these are the names
|
||||
(data-array (array basic) :score -50 :offset-assert 12) ;; this is the file data.
|
||||
)
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
;; these methods dont exist for this type
|
||||
(load-to-heap-by-name (_type_ string symbol kheap int) art-group 9)
|
||||
(set-loaded-art (_type_ art-group) art-group 10)
|
||||
|
@ -4993,7 +4995,7 @@
|
|||
)
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -5131,9 +5133,9 @@
|
|||
(add-tex-to-dma! (_type_ level int) none 14) ;; very mysterious arg types.
|
||||
(allocate-vram-words! (_type_ int) int 15)
|
||||
(allocate-segment! (_type_ texture-pool-segment int) texture-pool-segment 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(unused-17 () none 17)
|
||||
(unused-18 () none 18)
|
||||
(unused-19 () none 19)
|
||||
(unload! (_type_ texture-page) int 20)
|
||||
(upload-one-common! (_type_ level) symbol 21)
|
||||
(lookup-boot-common-id (_type_ int) int 22)
|
||||
|
@ -5192,7 +5194,7 @@
|
|||
(relocate (_type_ kheap (pointer uint8)) none :replace 7)
|
||||
(remove-from-heap (_type_ kheap) _type_ 9)
|
||||
(get-leftover-block-count (_type_ int int) int 10)
|
||||
(dummy-11 () none 11)
|
||||
(unused-11 () none 11)
|
||||
(relocate-dests! (_type_ int int) none 12)
|
||||
(add-to-dma-buffer (_type_ dma-buffer int) int 13)
|
||||
(upload-now! (_type_ int) none 14)
|
||||
|
@ -5401,7 +5403,11 @@
|
|||
(texture-page texture-page 9 :offset-assert 60)
|
||||
(loaded-texture-page texture-page 16 :offset-assert 96)
|
||||
(loaded-texture-page-count int32 :offset-assert 160)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset-assert 176) ;; inline basic
|
||||
(tfrag-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 176)
|
||||
(pris-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 208)
|
||||
(water-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 240)
|
||||
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset 176) ;; inline basic
|
||||
(foreground-draw-engine engine 3 :offset-assert 272)
|
||||
(entity entity-links-array :offset-assert 284)
|
||||
(ambient entity-ambient-data-array :offset-assert 288)
|
||||
|
@ -5446,7 +5452,7 @@
|
|||
(load-begin (_type_) _type_ 18)
|
||||
(login-begin (_type_) _type_ 19)
|
||||
(vis-load (_type_) uint 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(unused-21 (_type_) none 21)
|
||||
(birth (_type_) _type_ 22)
|
||||
(level-status-set! (_type_ symbol) _type_ 23)
|
||||
(load-required-packages (_type_) _type_ 24)
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
(-> obj process root)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 trsqv ((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(defmethod set-and-limit-velocity trsqv ((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(let ((gp-0 (-> obj transv)))
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> gp-0 x) (-> arg1 x))
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
;; name in dgo: math-camera-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
|
||||
;; The math-camera is a global that contains camera projection and culling matrices.
|
||||
;; Note that it doesn't take into account the position/rotation of the game camera, but
|
||||
;; just computes the projection matrix/culling stuff and the camera stuff will have to
|
||||
;; rotate and translate it as needed.
|
||||
;; The "math-camera" is responsible for computing the projection matrix used in the renderer
|
||||
;; from the position of the in-game camera. It also computes some other common camera info.
|
||||
;; See cam-update.gc for how the game camera updates the math-camera.
|
||||
|
||||
;; It also contains some GIF stuff, but these seem to be wrong/unused.
|
||||
;; Some of the code here may be extremely old and unused, but this does compute the camera projection
|
||||
|
|
|
@ -5,8 +5,34 @@
|
|||
;; name in dgo: math-camera
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; The fog-corrector stores a fog-end fog-start value that is somehow
|
||||
;; corrected for the field of view.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; math camera basics
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; the math camera computes the perspective matrix, hvdf offset, and hmge scale.
|
||||
|
||||
;; multiplying a point by the perspective matrix, doing the persepctive divide, then adding hvdf offset gives you:
|
||||
;; H : horizontal position (in GS coordinates)
|
||||
;; V : vertical position (in GS coordinates)
|
||||
;; D : depth (as a 24-bit integer for the z buffer)
|
||||
;; F : fog
|
||||
|
||||
;; Multiplying by hmge then checking the clipping flags can be used to see if a point is outside the view frustum.
|
||||
|
||||
;; The "camera-temp" matrix is the perspective matrix multplied by the camera tranformation and is used
|
||||
;; renderers that want a single matrix.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
;; fog correction
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; The math-camera matrices are used to compute fogging values, which are a per-vertex uint8 that
|
||||
;; tells the GS how "foggy" the color should be. This should be proportional to how far away the vertex
|
||||
;; is. There is a scaling factor applied so the fog intensity isn't affected by the field of view angle.
|
||||
|
||||
;; The fog-corrector stores a fog-end fog-start value that is corrected for the field of view.
|
||||
;; the actual correction factor is computed in cam-update.gc
|
||||
(deftype fog-corrector (structure)
|
||||
((fog-end float :offset-assert 0)
|
||||
(fog-start float :offset-assert 4)
|
||||
|
@ -23,8 +49,6 @@
|
|||
(none)
|
||||
)
|
||||
|
||||
;; create the single global fog corrector
|
||||
;; it appears to be unused.
|
||||
(define *math-camera-fog-correction* (new 'global 'fog-corrector))
|
||||
|
||||
(define-extern sprite-distorter-generate-tables (function none))
|
||||
|
@ -327,7 +351,9 @@
|
|||
)
|
||||
|
||||
(defun move-target-from-pad ((trans transform) (pad-idx int))
|
||||
"Unused function to adjust trans based on inputs from the pad."
|
||||
"Unused function to adjust trans based on inputs from the pad.
|
||||
This function must be extremely old because it takes a non-quaternion transform,
|
||||
and all target stuff uses quaternions."
|
||||
|
||||
;; local-trans is the translation in the camera frame.
|
||||
(let ((local-trans (new-stack-vector0)))
|
||||
|
|
|
@ -769,7 +769,7 @@
|
|||
(set! (-> self draw art-group) (-> v1-1 obj-art-group))
|
||||
(set! (-> self draw cur-lod) -1)
|
||||
(set! (-> self draw jgeo) a0-15)
|
||||
(set! (-> self draw sink-group) (-> *level* level-default foreground-sink-group 1))
|
||||
(set! (-> self draw sink-group) (-> *level* level-default pris-tex-foreground-sink-group))
|
||||
(set! (-> self draw lod-set lod 0 geo) a1-4)
|
||||
)
|
||||
(set! (-> self draw lod-set lod 0 dist) 4095996000.0)
|
||||
|
|
|
@ -206,16 +206,19 @@
|
|||
|
||||
|
||||
;; DMA data is divided into buckets.
|
||||
;; At the end of a frame, the buckets are all connected together and sent.
|
||||
;; the buckets are organized by renderer.
|
||||
;; At the end of a frame, the buckets are all connected together in order and sent.
|
||||
;; The order of these buckets should match the C++ buckets.h file, and determines the
|
||||
;; order that textures are uploaded and things are drawn.
|
||||
|
||||
;; there is typically a texture upload bucket followed by renderer-specific draw buckets.
|
||||
(defconstant BUCKET_COUNT (#if PC_PORT 70 69))
|
||||
(defenum bucket-id
|
||||
:type int32
|
||||
:bitfield #f
|
||||
|
||||
(bucket-0 0) ;; ?
|
||||
(bucket-1 1) ;; ?
|
||||
(bucket-2 2) ;; ?
|
||||
;; 0
|
||||
;; 1
|
||||
;; 2
|
||||
(sky-draw 3) ;; actual sky and cloud framebuffer draws
|
||||
(ocean-mid-and-far 4) ;; actual ocean framebuffer draws for mid/transition/far
|
||||
|
||||
|
@ -225,7 +228,7 @@
|
|||
(tie-near-0 8) ;; tie near draw, level 0
|
||||
(tie-0 9) ;; tie draw, level 0
|
||||
(merc-tfrag-tex0 10) ;; merc, with tfrag textures, level 0
|
||||
(gmerc-tfrag-tex 11) ;; generic merc, with tfrag textures, level 0
|
||||
(generic-tfrag-tex0 11) ;; generic merc, with tfrag textures, level 0
|
||||
|
||||
(tfrag-tex1 12) ;; tfrag texture upload, level 1
|
||||
(tfrag-1 13) ;; tfrag draw, level 1
|
||||
|
@ -233,16 +236,22 @@
|
|||
(tie-near-1 15) ;; tie near draw, level 1
|
||||
(tie-1 16) ;; tie draw, level 1
|
||||
(merc-tfrag-tex1 17) ;; merc, with tfrag textures, level 1
|
||||
(gmerc-tfrag-tex1 18) ;; generic merc, with tfrag textures, level 1
|
||||
(generic-tfrag-tex1 18) ;; generic merc, with tfrag textures, level 1
|
||||
|
||||
(shrub-tex0 19)
|
||||
(shrub0 20)
|
||||
|
||||
;; 21 (likely shrub near)
|
||||
(shrub-billboard0 22)
|
||||
(shrub-trans0 23)
|
||||
(shrub-generic0 24) ;; note: all shrub seems to go in shrub-generic1
|
||||
|
||||
(shrub-tex1 25)
|
||||
(shrub1 26)
|
||||
;; 27 (likely shrub near)
|
||||
(shrub-billboard1 28)
|
||||
(shrub-trans1 29)
|
||||
(shrub-generic1 30)
|
||||
|
||||
|
||||
(generic-foreground 30) ;; ?
|
||||
(alpha-tex0 31)
|
||||
(tfrag-trans-0 32) ;; also sky blend
|
||||
(tfrag-trans-near-0 33)
|
||||
|
@ -259,45 +268,37 @@
|
|||
(tfrag-ice-1 43)
|
||||
(tfrag-ice-near-1 44)
|
||||
|
||||
|
||||
(bucket-45 45) ;; merc
|
||||
(bucket-46 46)
|
||||
(merc-alpha-tex 45)
|
||||
(generic-alpha-tex 46)
|
||||
|
||||
(shadow 47)
|
||||
|
||||
(pris-tex0 48)
|
||||
(bucket-49 49) ;; merc
|
||||
(bucket-50 50)
|
||||
;; merc0 49
|
||||
;; generic0 50
|
||||
(merc-pris0 49)
|
||||
(generic-pris0 50)
|
||||
|
||||
(pris-tex1 51)
|
||||
(bucket-52 52) ;; merc
|
||||
(bucket-53 53)
|
||||
(merc-eyes 54) ;; eye::update-eyes
|
||||
;; merc1 52
|
||||
;; generic1 53
|
||||
(merc-pris1 52)
|
||||
(generic-pris1 53)
|
||||
|
||||
(eyes 54)
|
||||
|
||||
(merc-pris-common 55)
|
||||
(generic-pris-common 56)
|
||||
|
||||
(bucket-55 55) ;; merc
|
||||
(bucket-56 56)
|
||||
(water-tex0 57)
|
||||
(bucket-58 58) ;; merc
|
||||
(bucket-59 59)
|
||||
;; merc0 58 (+ default)
|
||||
;; generic0 59 (+ default)
|
||||
(merc-water0 58)
|
||||
(generic-water0 59)
|
||||
|
||||
(water-tex1 60)
|
||||
(bucket-61 61) ;; merc
|
||||
(bucket-62 62)
|
||||
(bucket-63 63) ; ocean
|
||||
;; merc1 61
|
||||
;; generic1 62
|
||||
(merc-water1 61)
|
||||
(generic-water1 62)
|
||||
|
||||
(ocean-near 63) ; ocean
|
||||
(depth-cue 64)
|
||||
(pre-sprite-textures 65) ;; common
|
||||
(common-page-tex 65)
|
||||
(sprite 66)
|
||||
;; debug spheres? 67
|
||||
(debug 67)
|
||||
;; debug text 68
|
||||
(debug-no-zbuf 68)
|
||||
|
||||
;; extra buckets for pc port
|
||||
|
|
|
@ -511,7 +511,8 @@
|
|||
;; TIE Generic
|
||||
(dotimes (gp-2 (-> *background-work* tie-tree-count))
|
||||
(when (nonzero? (-> *background-work* tie-generic gp-2))
|
||||
(let* ((s5-4 (-> *background-work* tie-levels gp-2 foreground-sink-group 0 generic-sink))
|
||||
;; send to the generic foreground with tfrag textures bucket for this level
|
||||
(let* ((s5-4 (-> *background-work* tie-levels gp-2 tfrag-tex-foreground-sink-group generic-sink))
|
||||
(s3-1 (-> *display* frames (-> *display* on-screen) frame global-buf))
|
||||
(s4-3 (-> s3-1 base))
|
||||
)
|
||||
|
|
|
@ -837,7 +837,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
gp-2
|
||||
(the-as (pointer dma-tag) a3-5)
|
||||
)
|
||||
|
@ -919,7 +919,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
s4-1
|
||||
(the-as (pointer dma-tag) a3-7)
|
||||
)
|
||||
|
@ -1105,7 +1105,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
gp-6
|
||||
(the-as (pointer dma-tag) a3-10)
|
||||
)
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
(define *generic-foreground-sinks*
|
||||
(new 'static 'boxed-array :type generic-dma-foreground-sink :length 0 :allocated-length 9))
|
||||
|
||||
(set! (-> *generic-foreground-sinks* 0) (-> *level* level0 foreground-sink-group 0 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 1) (-> *level* level0 foreground-sink-group 1 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 2) (-> *level* level1 foreground-sink-group 0 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 3) (-> *level* level1 foreground-sink-group 1 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 4) (-> *level* level-default foreground-sink-group 0 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 5) (-> *level* level-default foreground-sink-group 1 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 6) (new 'static 'generic-dma-foreground-sink :bucket (bucket-id generic-foreground)))
|
||||
(set! (-> *generic-foreground-sinks* 7) (-> *level* level0 foreground-sink-group 2 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 8) (-> *level* level1 foreground-sink-group 2 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 0) (-> *level* level0 tfrag-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 1) (-> *level* level0 pris-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 2) (-> *level* level1 tfrag-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 3) (-> *level* level1 pris-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 4) (-> *level* level-default tfrag-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 5) (-> *level* level-default pris-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 6) (new 'static 'generic-dma-foreground-sink :bucket (bucket-id shrub-generic1)))
|
||||
(set! (-> *generic-foreground-sinks* 7) (-> *level* level0 water-tex-foreground-sink-group generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 8) (-> *level* level1 water-tex-foreground-sink-group generic-sink))
|
||||
|
||||
(defun generic-dma-foreground-sink-init ((arg0 generic-dma-foreground-sink))
|
||||
(set! (-> arg0 state gifbuf-adr) (the-as uint 837))
|
||||
|
|
|
@ -604,7 +604,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-49)
|
||||
(bucket-id merc-pris0)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -626,7 +626,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-52)
|
||||
(bucket-id merc-pris1)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -637,7 +637,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-45)
|
||||
(bucket-id merc-alpha-tex)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -648,7 +648,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-55)
|
||||
(bucket-id merc-pris-common)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -659,7 +659,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-58)
|
||||
(bucket-id merc-water0)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -671,7 +671,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-61)
|
||||
(bucket-id merc-water1)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
|
|
@ -683,7 +683,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id bucket-63)
|
||||
(bucket-id ocean-near)
|
||||
gp-2
|
||||
(the-as (pointer dma-tag) a3-1)
|
||||
)
|
||||
|
|
|
@ -99,9 +99,9 @@
|
|||
(add-tex-to-dma! (_type_ level int) none 14)
|
||||
(allocate-vram-words! (_type_ int) int 15)
|
||||
(allocate-segment! (_type_ texture-pool-segment int) texture-pool-segment 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(unused-17 () none 17)
|
||||
(unused-18 () none 18)
|
||||
(unused-19 () none 19)
|
||||
(unload! (_type_ texture-page) int 20)
|
||||
(upload-one-common! (_type_ level) symbol 21)
|
||||
(lookup-boot-common-id (_type_ int) int 22)
|
||||
|
@ -182,7 +182,7 @@
|
|||
(relocate (_type_ kheap (pointer uint8)) none :replace 7)
|
||||
(remove-from-heap (_type_ kheap) _type_ 9)
|
||||
(get-leftover-block-count (_type_ int int) int 10)
|
||||
(dummy-11 () none 11)
|
||||
(unused-11 () none 11)
|
||||
(relocate-dests! (_type_ int int) none 12)
|
||||
(add-to-dma-buffer (_type_ dma-buffer int) int 13)
|
||||
(upload-now! (_type_ int) none 14)
|
||||
|
|
|
@ -1604,7 +1604,7 @@
|
|||
(and (nonzero? a2-0) (logtest? (-> obj common-page-mask) (ash 1 v1-0))) ;; in the mask.
|
||||
)
|
||||
;; upload it!
|
||||
(upload-vram-pages obj (-> obj segment-common) a2-0 -2 (bucket-id pre-sprite-textures))
|
||||
(upload-vram-pages obj (-> obj segment-common) a2-0 -2 (bucket-id common-page-tex))
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -112,13 +112,13 @@
|
|||
(priority int32 :offset-assert 64) ;; either 100 or 200
|
||||
(load-commands pair :offset-assert 68) ;; ??
|
||||
(alt-load-commands pair :offset-assert 72) ;; ??
|
||||
(bsp-mask uint64 :offset-assert 80) ;; ??
|
||||
(bsp-mask uint64 :offset-assert 80) ;; ?? unused
|
||||
(bsphere sphere :offset-assert 88) ;; boundings sphere of level?
|
||||
(buzzer int32 :offset-assert 92) ;; which task is the scout fly?
|
||||
(bottom-height meters :offset-assert 96)
|
||||
(run-packages pair :offset-assert 100) ;; possibly unused?
|
||||
(prev-level basic :offset-assert 104)
|
||||
(next-level basic :offset-assert 108)
|
||||
(prev-level basic :offset-assert 104) ;; unused
|
||||
(next-level basic :offset-assert 108) ;; unused
|
||||
(wait-for-load symbol :offset-assert 112)
|
||||
)
|
||||
:method-count-assert 9
|
||||
|
@ -140,6 +140,7 @@
|
|||
)
|
||||
|
||||
;; The actual "level". This manages loading and running a game level.
|
||||
;; These are allocated by the engine and aren't in static level data.
|
||||
(deftype level (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(load-name symbol :offset-assert 8)
|
||||
|
@ -150,41 +151,56 @@
|
|||
(heap kheap :inline :offset-assert 32) ;; level's ~10 MB heap
|
||||
(bsp bsp-header :offset-assert 48) ;; the main level object in the DGO
|
||||
(art-group load-dir-art-group :offset-assert 52) ;; the art (foreground models/anims) for the level
|
||||
(info level-load-info :offset-assert 56)
|
||||
(texture-page texture-page 9 :offset-assert 60)
|
||||
(loaded-texture-page texture-page 16 :offset-assert 96)
|
||||
(info level-load-info :offset-assert 56) ;; the load-info for this level,
|
||||
(texture-page texture-page 9 :offset-assert 60) ;; logged-in texture pages (tfrag, pris, shrub, alpha, water)
|
||||
(loaded-texture-page texture-page 16 :offset-assert 96) ;; texture pages that are loaded (and will need unloading)
|
||||
(loaded-texture-page-count int32 :offset-assert 160)
|
||||
; (foreground-sink-group-0 dma-foreground-sink-group :inline :offset-assert 176)
|
||||
; (foreground-sink-group-1 dma-foreground-sink-group :inline :offset-assert 208)
|
||||
; (foreground-sink-group-2 dma-foreground-sink-group :inline :offset-assert 240)
|
||||
; (array-pad uint8 12)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset-assert 176) ;; inline basic
|
||||
|
||||
;; dma "sinks" for foreground level things to render to (plus water and generic tie)
|
||||
(tfrag-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 176)
|
||||
(pris-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 208)
|
||||
(water-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 240)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset 176) ;; overlay of previous 3.
|
||||
|
||||
;; engines for each of the three sinks
|
||||
(foreground-draw-engine engine 3 :offset-assert 272)
|
||||
|
||||
;; linked entities/ambients
|
||||
(entity entity-links-array :offset-assert 284)
|
||||
(ambient entity-ambient-data-array :offset-assert 288)
|
||||
|
||||
;; closest objects, used for texture upload decisions. indexed by tpage (only first 5 used)
|
||||
(closest-object float 9 :offset-assert 292)
|
||||
|
||||
;; texture upload size, bytes. indexed by tpage (only first 5 used)
|
||||
(upload-size int32 9 :offset-assert 328)
|
||||
(level-distance meters :offset-assert 364)
|
||||
(inside-sphere? symbol :offset-assert 368)
|
||||
(inside-boxes? symbol :offset-assert 372)
|
||||
(display? symbol :offset-assert 376)
|
||||
(meta-inside? symbol :offset-assert 380)
|
||||
(mood mood-context :offset-assert 384)
|
||||
(mood-func (function mood-context float int none) :offset-assert 388)
|
||||
(vis-bits pointer :offset-assert 392)
|
||||
(all-visible? symbol :offset-assert 396)
|
||||
(force-all-visible? symbol :offset-assert 400)
|
||||
(linking basic :offset-assert 404)
|
||||
|
||||
;; info about jak/camera position, relative to the level
|
||||
(level-distance meters :offset-assert 364) ;; camera distance from level bsphere origin
|
||||
(inside-sphere? symbol :offset-assert 368) ;; camera inside bsphere?
|
||||
(inside-boxes? symbol :offset-assert 372) ;; inside the level box list?
|
||||
(display? symbol :offset-assert 376) ;; level being displayed?
|
||||
(meta-inside? symbol :offset-assert 380) ;; inside, but stays true until you go inside another level.
|
||||
|
||||
;; mood
|
||||
(mood mood-context :offset-assert 384) ;; current state
|
||||
(mood-func (function mood-context float int none) :offset-assert 388) ;; function to call to update mood
|
||||
|
||||
;; vis
|
||||
(vis-bits pointer :offset-assert 392) ;; visibility string buffer
|
||||
(all-visible? symbol :offset-assert 396) ;; set if visibility system has no info
|
||||
(force-all-visible? symbol :offset-assert 400) ;; set to disable visibiltiy system and display all
|
||||
(linking basic :offset-assert 404) ;; is linking in progress?
|
||||
(vis-info level-vis-info 8 :offset-assert 408) ;; note: #f when doesn't exist.
|
||||
(vis-self-index int32 :offset-assert 440)
|
||||
(vis-adj-index int32 :offset-assert 444)
|
||||
(vis-buffer uint8 2048 :offset-assert 448)
|
||||
(mem-usage-block memory-usage-block :offset-assert 2496)
|
||||
(mem-usage int32 :offset-assert 2500)
|
||||
(code-memory-start pointer :offset-assert 2504)
|
||||
(code-memory-end pointer :offset-assert 2508)
|
||||
(texture-mask uint32 9 :offset-assert 2512)
|
||||
(force-inside? symbol :offset-assert 2548)
|
||||
(vis-self-index int32 :offset-assert 440) ;; vis-info index for this level
|
||||
(vis-adj-index int32 :offset-assert 444) ;; vis-info index for the other level
|
||||
(vis-buffer uint8 2048 :offset-assert 448) ;; buffer for vis decompression
|
||||
(mem-usage-block memory-usage-block :offset-assert 2496) ;; level data memory usage stats
|
||||
(mem-usage int32 :offset-assert 2500) ;; total use
|
||||
(code-memory-start pointer :offset-assert 2504) ;; address of start of code
|
||||
(code-memory-end pointer :offset-assert 2508) ;; address of end of code
|
||||
(texture-mask uint32 9 :offset-assert 2512) ;; mask of textures we need, per tpage.
|
||||
(force-inside? symbol :offset-assert 2548) ;; fake being inside?
|
||||
(pad uint8 56)
|
||||
)
|
||||
:method-count-assert 29
|
||||
|
@ -203,7 +219,7 @@
|
|||
(load-begin (_type_) _type_ 18)
|
||||
(login-begin (_type_) _type_ 19)
|
||||
(vis-load (_type_) uint 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(unused-21 (_type_) none 21)
|
||||
(birth (_type_) _type_ 22)
|
||||
(level-status-set! (_type_ symbol) _type_ 23)
|
||||
(load-required-packages (_type_) _type_ 24)
|
||||
|
@ -217,7 +233,7 @@
|
|||
|
||||
;; Main *level* object.
|
||||
;; There are actually three levels. level0 and level1 correspond to the actual buffered levels
|
||||
;; The level-default seems to be a fake level that can possibly be used by renderers that
|
||||
;; The level-default is to be a fake level that can possibly be used by renderers that
|
||||
;; don't belong to any level, for example to render Jak.
|
||||
(deftype level-group (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
|
@ -270,6 +286,7 @@
|
|||
(defun-extern level-update-after-load level login-state level)
|
||||
|
||||
;; Initialize the level structure. This assigns DMA buckets to each level.
|
||||
;; there are 3 foreground sinks per texture bucket: merc, generic, and an unused one.
|
||||
;; TODO: figure out exactly which buckets are used for what.
|
||||
(define-extern *level* level-group)
|
||||
(if (zero? *level*)
|
||||
|
@ -287,40 +304,39 @@
|
|||
(new 'static 'level
|
||||
:name #f
|
||||
:status 'inactive
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket 10)
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
;; merc + tfrag texture
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-tfrag-tex0))
|
||||
;; generic + tfrag texture
|
||||
(new 'static 'generic-dma-foreground-sink :bucket (bucket-id generic-tfrag-tex0) :foreground-output-bucket 1)
|
||||
)
|
||||
)
|
||||
:pris-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-pris0) :foreground-texture-page 1)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 11 :foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 49
|
||||
:bucket (bucket-id generic-pris0)
|
||||
:foreground-texture-page 1
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 50 :foreground-texture-page 1
|
||||
:foreground-output-bucket 1)
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 58
|
||||
:foreground-texture-page 2
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 59
|
||||
:foreground-texture-page 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:water-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-water0) :foreground-texture-page 2)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id generic-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
:inside-boxes? #f
|
||||
|
@ -331,53 +347,48 @@
|
|||
:name #f
|
||||
:index 1
|
||||
:status 'inactive
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 17
|
||||
:foreground-texture-level 1
|
||||
)
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-tfrag-tex1) :foreground-texture-level 1)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 18
|
||||
:bucket (bucket-id generic-tfrag-tex1)
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
:pris-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 52
|
||||
:bucket (bucket-id merc-pris1)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 1
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 53
|
||||
:bucket (bucket-id generic-pris1)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
:water-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 61
|
||||
:bucket (bucket-id merc-water1)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 1
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 62
|
||||
:bucket (bucket-id generic-water1)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
:inside-boxes? #f
|
||||
:force-inside? #f
|
||||
|
@ -387,51 +398,49 @@
|
|||
:name 'default
|
||||
:index 2
|
||||
:status 'reserved
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
;; the tfrag texture sink group for the common level uses alpha
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 45
|
||||
:foreground-texture-level 2
|
||||
)
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-alpha-tex) :foreground-texture-level 2)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 46
|
||||
:bucket (bucket-id generic-alpha-tex)
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
:pris-tex-foreground-sink-group
|
||||
;; pris uses the separate pris common area
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 55
|
||||
:bucket (bucket-id merc-pris-common)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 2
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 56
|
||||
:bucket (bucket-id generic-pris-common)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink (new 'static 'array dma-foreground-sink 3
|
||||
:water-tex-foreground-sink-group
|
||||
;; water just goes to level 0's buckets
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket 58
|
||||
:bucket (bucket-id merc-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 2
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket 59
|
||||
:bucket (bucket-id generic-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
|
@ -442,5 +451,8 @@
|
|||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(define-extern *level-load-list* pair)
|
||||
(define-extern lookup-level-info (function symbol level-load-info))
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
|
||||
;; A load-dir is a collection of references to loaded art.
|
||||
;; This type didn't have an inspect method, so these field names are made up.
|
||||
;; This type didn't have a nomral inspect method, so these field names are made up.
|
||||
(declare-type art-group basic)
|
||||
(deftype load-dir (basic)
|
||||
((unknown basic :offset-assert 4)
|
||||
((lev level :offset-assert 4)
|
||||
(string-array (array string) :offset-assert 8) ;; these are the names
|
||||
(data-array (array basic) :offset-assert 12) ;; this is the file data.
|
||||
)
|
||||
|
@ -27,7 +27,7 @@
|
|||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
(load-to-heap-by-name (_type_ string symbol kheap int) art-group 9)
|
||||
(set-loaded-art (_type_ art-group) art-group 10)
|
||||
)
|
||||
|
@ -41,15 +41,15 @@
|
|||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new load-dir ((allocation symbol) (type-to-make type) (length int) (unk basic))
|
||||
(defmethod new load-dir ((allocation symbol) (type-to-make type) (length int) (lev level))
|
||||
"Allocate a new load-dir with room for length entries"
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> obj unknown) unk)
|
||||
(set! (-> obj lev) lev)
|
||||
;; create the name array
|
||||
(set! (-> obj string-array)
|
||||
(the-as (array string)
|
||||
|
@ -67,10 +67,10 @@
|
|||
)
|
||||
)
|
||||
|
||||
(defmethod new load-dir-art-group ((allocation symbol) (type-to-make type) (length int) (unk basic))
|
||||
(defmethod new load-dir-art-group ((allocation symbol) (type-to-make type) (length int) (lev level))
|
||||
"Allocate a new load-dir with room for length art-groups"
|
||||
;; call parent ctor.
|
||||
(let ((obj ((method-of-type load-dir new) allocation type-to-make length unk)))
|
||||
(let ((obj ((method-of-type load-dir new) allocation type-to-make length lev)))
|
||||
;; override the content type
|
||||
(set! (-> obj data-array content-type) art-group)
|
||||
;; and cast to child.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(defmethod inspect load-dir ((obj load-dir))
|
||||
"Print all the stuff in a load-dir"
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlevel: ~A~%" (-> obj unknown))
|
||||
(format #t "~Tlevel: ~A~%" (-> obj lev))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj string-array allocated-length))
|
||||
(format #t "~Tlength: ~D~%" (-> obj string-array length))
|
||||
(dotimes (i (-> obj string-array length))
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
;; Like transform, but it's a basic.
|
||||
;; some in-game objects have trs as their parent type to represent their location in the game world.
|
||||
(deftype trs (basic)
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
(global-y-angle-to-point (_type_ vector) float 23)
|
||||
(relative-y-angle-to-point (_type_ vector) float 24)
|
||||
(roll-relative-to-gravity (_type_) float 25)
|
||||
(TODO-RENAME-26 (_type_ int vector float) trsqv 26)
|
||||
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
|
||||
|
||||
;; note: child classes can override this method to use a different quaternion
|
||||
;; to represent the "current" orientation for the above methods.
|
||||
|
@ -75,7 +75,7 @@
|
|||
)
|
||||
|
||||
(defmethod global-y-angle-to-point trsqv ((obj trsqv) (arg0 vector))
|
||||
"Get the angle in the xy plane from the position of this trsqv to the point arg0."
|
||||
"Get the angle in the xz plane from the position of this trsqv to the point arg0."
|
||||
(vector-y-angle (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj trans)))
|
||||
)
|
||||
|
||||
|
|
|
@ -147,7 +147,8 @@
|
|||
|
||||
;; In the original game, init-for-transform stashed a bunch of stuff in registers, to be used by other functions.
|
||||
;; In OpenGOAL, this seems risky so we're going to back up this manually.
|
||||
;; This does mean this file now has code, but it's not a big deal:
|
||||
;; This does mean this file now has code, but it's not a big deal.
|
||||
;; This seems like it is very old GOAL code and is really only used for debug and a few weird leftovers.
|
||||
(deftype transform-regs (structure)
|
||||
;; Eventually we might want to actually name some of these fields to be more comprehensible?
|
||||
(;; vf0 not included!
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(deftype sound-id (uint32)
|
||||
()
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(unused-9 () none 9) ;; unused
|
||||
)
|
||||
:flag-assert #xa00000004
|
||||
)
|
||||
|
@ -162,6 +162,7 @@
|
|||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; playback parameters sent to the IOP.
|
||||
(deftype sound-play-parms (structure)
|
||||
((mask sound-mask :offset-assert 0)
|
||||
(pitch-mod int16 :offset-assert 2)
|
||||
|
@ -430,6 +431,7 @@
|
|||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
;; GOAL-side sound specification.
|
||||
(deftype sound-spec (basic)
|
||||
((mask sound-mask :offset-assert 4)
|
||||
(num float :offset-assert 8)
|
||||
|
|
2
test/decompiler/reference/engine/anim/aligner_REF.gc
generated
vendored
2
test/decompiler/reference/engine/anim/aligner_REF.gc
generated
vendored
|
@ -146,7 +146,7 @@
|
|||
)
|
||||
|
||||
;; definition for method 26 of type trsqv
|
||||
(defmethod TODO-RENAME-26 trsqv ((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(defmethod set-and-limit-velocity trsqv ((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(let ((gp-0 (-> obj transv)))
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> gp-0 x) (-> arg1 x))
|
||||
|
|
2
test/decompiler/reference/engine/debug/anim-tester_REF.gc
generated
vendored
2
test/decompiler/reference/engine/debug/anim-tester_REF.gc
generated
vendored
|
@ -1005,7 +1005,7 @@
|
|||
(set! (-> self draw art-group) (-> v1-1 obj-art-group))
|
||||
(set! (-> self draw cur-lod) -1)
|
||||
(set! (-> self draw jgeo) a0-15)
|
||||
(set! (-> self draw sink-group) (-> *level* level-default foreground-sink-group 1))
|
||||
(set! (-> self draw sink-group) (-> *level* level-default pris-tex-foreground-sink-group))
|
||||
(set! (-> self draw lod-set lod 0 geo) a1-4)
|
||||
)
|
||||
(set! (-> self draw lod-set lod 0 dist) 4095996000.0)
|
||||
|
|
2
test/decompiler/reference/engine/gfx/background_REF.gc
generated
vendored
2
test/decompiler/reference/engine/gfx/background_REF.gc
generated
vendored
|
@ -365,7 +365,7 @@
|
|||
)
|
||||
(dotimes (gp-2 (-> *background-work* tie-tree-count))
|
||||
(when (nonzero? (-> *background-work* tie-generic gp-2))
|
||||
(let* ((s5-4 (-> *background-work* tie-levels gp-2 foreground-sink-group 0 generic-sink))
|
||||
(let* ((s5-4 (-> *background-work* tie-levels gp-2 tfrag-tex-foreground-sink-group generic-sink))
|
||||
(s3-1 (-> *display* frames (-> *display* on-screen) frame global-buf))
|
||||
(s4-3 (-> s3-1 base))
|
||||
)
|
||||
|
|
6
test/decompiler/reference/engine/gfx/eye_REF.gc
generated
vendored
6
test/decompiler/reference/engine/gfx/eye_REF.gc
generated
vendored
|
@ -812,7 +812,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
gp-2
|
||||
(the-as (pointer dma-tag) a3-5)
|
||||
)
|
||||
|
@ -886,7 +886,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
s4-1
|
||||
(the-as (pointer dma-tag) a3-7)
|
||||
)
|
||||
|
@ -1072,7 +1072,7 @@
|
|||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
||||
(bucket-id merc-eyes)
|
||||
(bucket-id eyes)
|
||||
gp-6
|
||||
(the-as (pointer dma-tag) a3-10)
|
||||
)
|
||||
|
|
32
test/decompiler/reference/engine/gfx/generic/generic_REF.gc
generated
vendored
32
test/decompiler/reference/engine/gfx/generic/generic_REF.gc
generated
vendored
|
@ -9,33 +9,37 @@
|
|||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 0) (-> *level* level0 foreground-sink-group 0 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 0) (-> *level* level0 tfrag-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 1) (-> *level* level0 foreground-sink-group 1 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 1) (-> *level* level0 pris-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 2) (-> *level* level1 foreground-sink-group 0 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 2) (-> *level* level1 tfrag-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 3) (-> *level* level1 foreground-sink-group 1 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 3) (-> *level* level1 pris-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 4) (-> *level* level-default foreground-sink-group 0 generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 5) (-> *level* level-default foreground-sink-group 1 generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 6)
|
||||
(new 'static 'generic-dma-foreground-sink :bucket (bucket-id generic-foreground))
|
||||
(set! (-> *generic-foreground-sinks* 4)
|
||||
(-> *level* level-default tfrag-tex-foreground-sink-group generic-sink)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 7) (-> *level* level0 foreground-sink-group 2 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 5)
|
||||
(-> *level* level-default pris-tex-foreground-sink-group generic-sink)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 8) (-> *level* level1 foreground-sink-group 2 generic-sink))
|
||||
(set! (-> *generic-foreground-sinks* 6)
|
||||
(new 'static 'generic-dma-foreground-sink :bucket (bucket-id shrub-generic1))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 7) (-> *level* level0 water-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *generic-foreground-sinks* 8) (-> *level* level1 water-tex-foreground-sink-group generic-sink))
|
||||
|
||||
;; definition for function generic-dma-foreground-sink-init
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
|
|
12
test/decompiler/reference/engine/gfx/merc/merc_REF.gc
generated
vendored
12
test/decompiler/reference/engine/gfx/merc/merc_REF.gc
generated
vendored
|
@ -504,7 +504,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-49)
|
||||
(bucket-id merc-pris0)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -526,7 +526,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-52)
|
||||
(bucket-id merc-pris1)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -537,7 +537,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-45)
|
||||
(bucket-id merc-alpha-tex)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -548,7 +548,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-55)
|
||||
(bucket-id merc-pris-common)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -559,7 +559,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-58)
|
||||
(bucket-id merc-water0)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
@ -571,7 +571,7 @@
|
|||
0
|
||||
)
|
||||
(merc-vu1-init-buffer
|
||||
(bucket-id bucket-61)
|
||||
(bucket-id merc-water1)
|
||||
(new 'static 'gs-test
|
||||
:ate #x1
|
||||
:atst (gs-atest greater-equal)
|
||||
|
|
8
test/decompiler/reference/engine/gfx/texture-h_REF.gc
generated
vendored
8
test/decompiler/reference/engine/gfx/texture-h_REF.gc
generated
vendored
|
@ -70,9 +70,9 @@
|
|||
(add-tex-to-dma! (_type_ level int) none 14)
|
||||
(allocate-vram-words! (_type_ int) int 15)
|
||||
(allocate-segment! (_type_ texture-pool-segment int) texture-pool-segment 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(unused-17 () none 17)
|
||||
(unused-18 () none 18)
|
||||
(unused-19 () none 19)
|
||||
(unload! (_type_ texture-page) int 20)
|
||||
(upload-one-common! (_type_ level) symbol 21)
|
||||
(lookup-boot-common-id (_type_ int) int 22)
|
||||
|
@ -187,7 +187,7 @@
|
|||
(relocate (_type_ kheap (pointer uint8)) none :replace 7)
|
||||
(remove-from-heap (_type_ kheap) _type_ 9)
|
||||
(get-leftover-block-count (_type_ int int) int 10)
|
||||
(dummy-11 () none 11)
|
||||
(unused-11 () none 11)
|
||||
(relocate-dests! (_type_ int int) none 12)
|
||||
(add-to-dma-buffer (_type_ dma-buffer int) int 13)
|
||||
(upload-now! (_type_ int) none 14)
|
||||
|
|
2
test/decompiler/reference/engine/gfx/texture_REF.gc
generated
vendored
2
test/decompiler/reference/engine/gfx/texture_REF.gc
generated
vendored
|
@ -1603,7 +1603,7 @@
|
|||
(dotimes (v1-0 32)
|
||||
(let ((a2-0 (-> obj common-page v1-0)))
|
||||
(when (and (nonzero? a2-0) (logtest? (-> obj common-page-mask) (ash 1 v1-0)))
|
||||
(upload-vram-pages obj (-> obj segment-common) a2-0 -2 (bucket-id pre-sprite-textures))
|
||||
(upload-vram-pages obj (-> obj segment-common) a2-0 -2 (bucket-id common-page-tex))
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
|
|
59
test/decompiler/reference/engine/level/level-h_REF.gc
generated
vendored
59
test/decompiler/reference/engine/level/level-h_REF.gc
generated
vendored
|
@ -152,7 +152,10 @@
|
|||
(texture-page texture-page 9 :offset-assert 60)
|
||||
(loaded-texture-page texture-page 16 :offset-assert 96)
|
||||
(loaded-texture-page-count int32 :offset-assert 160)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset-assert 176)
|
||||
(tfrag-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 176)
|
||||
(pris-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 208)
|
||||
(water-tex-foreground-sink-group dma-foreground-sink-group :inline :offset-assert 240)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset 176)
|
||||
(foreground-draw-engine engine 3 :offset-assert 272)
|
||||
(entity entity-links-array :offset-assert 284)
|
||||
(ambient entity-ambient-data-array :offset-assert 288)
|
||||
|
@ -197,7 +200,7 @@
|
|||
(load-begin (_type_) _type_ 18)
|
||||
(login-begin (_type_) _type_ 19)
|
||||
(vis-load (_type_) uint 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(unused-21 (_type_) none 21)
|
||||
(birth (_type_) _type_ 22)
|
||||
(level-status-set! (_type_ symbol) _type_ 23)
|
||||
(load-required-packages (_type_) _type_ 24)
|
||||
|
@ -224,7 +227,7 @@
|
|||
(format #t "~Ttexture-page[9] @ #x~X~%" (-> obj texture-page))
|
||||
(format #t "~Tloaded-texture-page[16] @ #x~X~%" (-> obj loaded-texture-page))
|
||||
(format #t "~Tloaded-texture-page-count: ~D~%" (-> obj loaded-texture-page-count))
|
||||
(format #t "~Tforeground-sink-group[3] @ #x~X~%" (-> obj foreground-sink-group))
|
||||
(format #t "~Tforeground-sink-group[3] @ #x~X~%" (-> obj tfrag-tex-foreground-sink-group))
|
||||
(format #t "~Tforeground-draw-engine[3] @ #x~X~%" (-> obj foreground-draw-engine))
|
||||
(format #t "~Tentity: ~A~%" (-> obj entity))
|
||||
(format #t "~Tambient: ~A~%" (-> obj ambient))
|
||||
|
@ -334,38 +337,38 @@
|
|||
(new 'static 'level
|
||||
:name #f
|
||||
:status 'inactive
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-tfrag-tex0))
|
||||
(new 'static 'generic-dma-foreground-sink :bucket (bucket-id gmerc-tfrag-tex) :foreground-output-bucket 1)
|
||||
(new 'static 'generic-dma-foreground-sink :bucket (bucket-id generic-tfrag-tex0) :foreground-output-bucket 1)
|
||||
)
|
||||
)
|
||||
:pris-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id bucket-49) :foreground-texture-page 1)
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-pris0) :foreground-texture-page 1)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-50)
|
||||
:bucket (bucket-id generic-pris0)
|
||||
:foreground-texture-page 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:water-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id bucket-58) :foreground-texture-page 2)
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-water0) :foreground-texture-page 2)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-59)
|
||||
:bucket (bucket-id generic-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
:inside-boxes? #f
|
||||
:force-inside? #f
|
||||
|
@ -375,48 +378,48 @@
|
|||
:name #f
|
||||
:index 1
|
||||
:status 'inactive
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-tfrag-tex1) :foreground-texture-level 1)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id gmerc-tfrag-tex1)
|
||||
:bucket (bucket-id generic-tfrag-tex1)
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:pris-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket (bucket-id bucket-52)
|
||||
:bucket (bucket-id merc-pris1)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 1
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-53)
|
||||
:bucket (bucket-id generic-pris1)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:water-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket (bucket-id bucket-61)
|
||||
:bucket (bucket-id merc-water1)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 1
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-62)
|
||||
:bucket (bucket-id generic-water1)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 1
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
:inside-boxes? #f
|
||||
:force-inside? #f
|
||||
|
@ -426,48 +429,48 @@
|
|||
:name 'default
|
||||
:index 2
|
||||
:status 'reserved
|
||||
:foreground-sink-group
|
||||
(new 'static 'inline-array dma-foreground-sink-group 3
|
||||
:tfrag-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group
|
||||
:sink
|
||||
(new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id bucket-45) :foreground-texture-level 2)
|
||||
(new 'static 'dma-foreground-sink :bucket (bucket-id merc-alpha-tex) :foreground-texture-level 2)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-46)
|
||||
:bucket (bucket-id generic-alpha-tex)
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:pris-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket (bucket-id bucket-55)
|
||||
:bucket (bucket-id merc-pris-common)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 2
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-56)
|
||||
:bucket (bucket-id generic-pris-common)
|
||||
:foreground-texture-page 1
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
:water-tex-foreground-sink-group
|
||||
(new 'static 'dma-foreground-sink-group :sink (new 'static 'array dma-foreground-sink 3
|
||||
(new 'static 'dma-foreground-sink
|
||||
:bucket (bucket-id bucket-58)
|
||||
:bucket (bucket-id merc-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 2
|
||||
)
|
||||
(new 'static 'generic-dma-foreground-sink
|
||||
:bucket (bucket-id bucket-59)
|
||||
:bucket (bucket-id generic-water0)
|
||||
:foreground-texture-page 2
|
||||
:foreground-texture-level 2
|
||||
:foreground-output-bucket 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:inside-sphere? #f
|
||||
:inside-boxes? #f
|
||||
:force-inside? #f
|
||||
|
|
12
test/decompiler/reference/engine/load/loader-h_REF.gc
generated
vendored
12
test/decompiler/reference/engine/load/loader-h_REF.gc
generated
vendored
|
@ -3,7 +3,7 @@
|
|||
|
||||
;; definition of type load-dir
|
||||
(deftype load-dir (basic)
|
||||
((unknown basic :offset-assert 4)
|
||||
((lev level :offset-assert 4)
|
||||
(string-array (array string) :offset-assert 8)
|
||||
(data-array (array basic) :offset-assert 12)
|
||||
)
|
||||
|
@ -11,7 +11,7 @@
|
|||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
(load-to-heap-by-name (_type_ string symbol kheap int) art-group 9)
|
||||
(set-loaded-art (_type_ art-group) art-group 10)
|
||||
)
|
||||
|
@ -25,14 +25,14 @@
|
|||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(new (symbol type int level) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 0 of type load-dir
|
||||
(defmethod new load-dir ((allocation symbol) (type-to-make type) (length int) (unk basic))
|
||||
(defmethod new load-dir ((allocation symbol) (type-to-make type) (length int) (unk level))
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> obj unknown) unk)
|
||||
(set! (-> obj lev) unk)
|
||||
(set! (-> obj string-array)
|
||||
(the-as (array string) ((method-of-type array new) allocation array string length))
|
||||
)
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
;; definition for method 0 of type load-dir-art-group
|
||||
;; INFO: Return type mismatch load-dir vs load-dir-art-group.
|
||||
(defmethod new load-dir-art-group ((allocation symbol) (type-to-make type) (length int) (unk basic))
|
||||
(defmethod new load-dir-art-group ((allocation symbol) (type-to-make type) (length int) (unk level))
|
||||
(let ((obj ((method-of-type load-dir new) allocation type-to-make length unk)))
|
||||
(set! (-> obj data-array content-type) art-group)
|
||||
(the-as load-dir-art-group obj)
|
||||
|
|
2
test/decompiler/reference/engine/load/loader_REF.gc
generated
vendored
2
test/decompiler/reference/engine/load/loader_REF.gc
generated
vendored
|
@ -6,7 +6,7 @@
|
|||
(defmethod inspect load-dir ((obj load-dir))
|
||||
(local-vars (sv-16 basic))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlevel: ~A~%" (-> obj unknown))
|
||||
(format #t "~Tlevel: ~A~%" (-> obj lev))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj string-array allocated-length))
|
||||
(format #t "~Tlength: ~D~%" (-> obj string-array length))
|
||||
(dotimes (s5-0 (-> obj string-array length))
|
||||
|
|
2
test/decompiler/reference/engine/math/transformq-h_REF.gc
generated
vendored
2
test/decompiler/reference/engine/math/transformq-h_REF.gc
generated
vendored
|
@ -71,7 +71,7 @@
|
|||
(global-y-angle-to-point (_type_ vector) float 23)
|
||||
(relative-y-angle-to-point (_type_ vector) float 24)
|
||||
(roll-relative-to-gravity (_type_) float 25)
|
||||
(TODO-RENAME-26 (_type_ int vector float) trsqv 26)
|
||||
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
|
||||
(get-quaternion (_type_) quaternion 27)
|
||||
)
|
||||
)
|
||||
|
|
2
test/decompiler/reference/engine/sound/gsound-h_REF.gc
generated
vendored
2
test/decompiler/reference/engine/sound/gsound-h_REF.gc
generated
vendored
|
@ -8,7 +8,7 @@
|
|||
:size-assert #x4
|
||||
:flag-assert #xa00000004
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(unused-9 () none 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue