[jak3] More headers! (#3351)

Decomp aligner-h, joint-h, prim-h, debug-h, game-h, penetrate-h,
bones-h, foreground-h, scene-h, script-h.

Also, has a little bit of the joint-mod-h file, but it's not finished
yet.
This commit is contained in:
water111
2024-01-31 19:05:12 -05:00
committed by GitHub
parent ea93d32acc
commit 1cccfbbf78
32 changed files with 4619 additions and 530 deletions
File diff suppressed because it is too large Load Diff
@@ -303,5 +303,12 @@
[8, "v1", "pointer"],
[[9, 11], "v1", "touching-prims-entry"],
[[1, 20], "a1", "touching-prims-entry"]
]
],
"(method 0 prim-strip)": [[[101, 121], "a0", "vector"]],
"(method 0 script-context)": [[[8, 17], "v0", "script-context"]],
"joint-mod-spinner-callback": [[[2, 63], "gp", "joint-mod-spinner"]],
"joint-mod-rotate-local-callback": [
[[2, 16], "v1", "joint-mod-rotate-local"]
],
"joint-mod-rotate-world-callback": [[[0, 24], "s3", "joint-mod-rotate-world"]]
}
@@ -728,5 +728,8 @@
"a1-0": "current",
"a2-0": "next"
}
},
"(method 0 prim-strip)": {
"args": ["allocation", "type-to-make", "num-vertices", "tex-id", "tex-name"]
}
}
+44
View File
@@ -5,5 +5,49 @@
;; name in dgo: aligner-h
;; dgos: GAME
(defenum align-flags
:bitfield #t
:type uint32
(disabled) ;; keep object velocity
(af01)
(af02)
(af03)
(af04)
(af05)
)
;; DECOMP BEGINS
(deftype align-control (basic)
((flags align-flags)
(process process-drawable)
(frame-group art-joint-anim)
(frame-num float)
(matrix matrix 2 :inline)
(transform transform 2 :inline)
(delta transformq :inline)
(last-speed meters)
(align transformq :inline :overlay-at (-> transform 0 trans data 0))
)
(:methods
(new (symbol type process) _type_)
(align-control-method-9 () none)
(align-control-method-10 () none)
(align-control-method-11 () none)
(align-control-method-12 () none)
(align-control-method-13 () none)
)
)
;; WARN: Return type mismatch object vs align-control.
(defmethod new align-control ((allocation symbol) (type-to-make type) (arg0 process))
(let ((v0-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size))))))
(when (zero? (the-as align-control v0-0))
(go process-drawable-art-error "memory")
(return (the-as align-control 0))
)
(set! (-> (the-as align-control v0-0) process) (the-as process-drawable arg0))
(the-as align-control v0-0)
)
)
+142
View File
@@ -5,5 +5,147 @@
;; name in dgo: joint-h
;; dgos: GAME
(declare-type joint-control basic)
(defenum joint-control-command
:type uint64
(push 1)
(blend 2)
(push1 19)
(stack 36)
(float 42)
(stack1 52)
)
(defenum joint-control-status
:type uint16
:bitfield #t
(sync-math 0) ;; 1
(spooling 1) ;; 2
(spooling-not-last-block 2) ;; 4
(blend-shape 3) ;; 8
(math-when-off-screen 4) ;; 16
(valid-spooled-frame 5) ;; 32
(blend-shape-valid 6) ;; 64
(eye-anim-valid 7) ;; 128
(eye-anim 8) ;; 256
(force-math 9)
(no-joint-callbacks 10)
)
(declare-type effect-control basic)
;; DECOMP BEGINS
(deftype joint-control-channel (structure)
((parent joint-control)
(frame-group art-joint-anim)
(frame-num float)
(dist meters)
(num-func (function joint-control-channel float float float float))
(param float 3)
(frame-interp float 2)
(inspector-amount uint8)
(command joint-control-command)
(group-sub-index int8)
(group-size int8)
(eval-time uint32)
)
)
(deftype top-anim-joint-control (basic)
((process (pointer process-drawable))
(interp-select uint64 2)
(base-anim basic)
(base-anim-speed float)
(base-anim-blend float)
(interp float)
(frame-group art-joint-anim)
(frame-group-push art-joint-anim)
(frame-num float)
(frame-targ art-joint-anim)
(frame-speed float)
(frame-blend float)
(frame-cur-blend float)
(frame-start float)
(frame-post-blend float)
(frame-post-end float)
(frame-push-time time-frame)
(frame-post-put-away basic)
(update-time time-frame)
)
(:methods
(new (symbol type) _type_)
(top-anim-joint-control-method-9 () none)
(top-anim-joint-control-method-10 () none)
(top-anim-joint-control-method-11 () none)
(top-anim-joint-control-method-12 () none)
)
)
(deftype joint-control (basic)
((status joint-control-status)
(allocated-length uint8)
(active-channels uint8)
(root-channel (inline-array joint-control-channel) :offset 16)
(blend-index uint8)
(active-frame-interp uint8)
(float-channels uint8)
(generate-frame-function (function joint-anim-frame int joint-control int))
(prebind-function (function joint-anim-frame int joint-control int))
(postbind-function (function draw-control cspace-array joint-control none))
(effect effect-control)
(interp-select int64 2)
(top-anim top-anim-joint-control)
(override (array float))
(channel joint-control-channel :dynamic)
)
(:methods
(new (symbol type) _type_)
(joint-control-method-9 () none)
(joint-control-method-10 () none)
(joint-control-method-11 () none)
(joint-control-method-12 () none)
)
)
(deftype matrix-stack (structure)
((top matrix)
(data matrix 24 :inline)
)
)
(deftype channel-upload-info (structure)
((fixed joint-anim-compressed-fixed)
(fixed-qwc int32)
(frame joint-anim-compressed-frame)
(frame-qwc int32)
(amount float)
(interp float)
)
:pack-me
)
(deftype joint-work (structure)
((temp-mtx matrix :inline)
(joint-stack matrix-stack :inline)
(fix-jmp-table (function none) 16)
(frm-jmp-table (function none) 16)
(pair-jmp-table (function none) 16)
(uploads channel-upload-info 24 :inline)
(num-uploads int32)
(mtx-acc matrix 2 :inline)
(tq-acc transformq 100 :inline)
(jacp-hdr joint-anim-compressed-hdr :inline)
(fixed-data joint-anim-compressed-fixed :inline)
(frame-data joint-anim-compressed-frame 2 :inline)
(flatten-array float 576 :overlay-at mtx-acc)
(flattened vector 24 :inline :overlay-at mtx-acc)
)
)
+1 -1
View File
@@ -68,7 +68,7 @@ The callback function is used to take the joint transforms out of the joint anim
(deftype cspace-array (inline-array-class)
((data cspace :dynamic)
((data cspace :inline :dynamic)
)
)
@@ -258,6 +258,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(nav-flags uint8)
(total-prims uint8)
(num-riders uint8)
(pat-ignore-mask pat-surface)
(event-self symbol :offset 152)
(event-other symbol)
(root-prim collide-shape-prim)
@@ -398,7 +399,53 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(the-as int (-> this num-children))
)
;; ERROR: function was not converted to expressions. Cannot decompile.
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> s5-0 actor-hash-index) -1)
(set! (-> s5-0 process) arg0)
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
(set! (-> s5-0 nav-flags) (the-as uint 1))
(set! (-> s5-0 event-self) #f)
(set! (-> s5-0 event-other) #f)
(set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f))
(set! (-> s5-0 root-prim) #f)
(set! (-> s5-0 penetrate-using) (penetrate))
(set! (-> s5-0 penetrated-by) (penetrate))
(set! (-> s5-0 event-priority) (the-as uint 0))
(set! (-> s5-0 rider-max-momentum) 409600.0)
(case (-> arg0 type symbol)
(('camera)
(set! (-> s5-0 pat-ignore-mask) (new 'static 'pat-surface :nocamera #x1 :probe #x1 :noendlessfall #x1))
)
(('target)
(set! (-> s5-0 pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1))
)
(else
(set! (-> s5-0 pat-ignore-mask)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
)
)
(set! (-> s5-0 trans w) 1.0)
(quaternion-identity! (the-as quaternion (-> s5-0 rot)))
(vector-identity! (-> s5-0 scale))
(cond
((= arg1 (collide-list-enum hit-by-player))
(add-connection *collide-hit-by-player-list* arg0 #f s5-0 #f #f)
)
((= arg1 (collide-list-enum usually-hit-by-player))
(add-connection *collide-hit-by-others-list* arg0 #f s5-0 #f #f)
)
((= arg1 (collide-list-enum hit-by-others))
(add-connection *collide-player-list* arg0 #f s5-0 #f #f)
)
(else
(format 0 "Unsupported collide-list-enum in collide-shape constructor!~%")
)
)
s5-0
)
)
;; WARN: Return type mismatch collide-shape vs collide-shape-moving.
(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
+147
View File
@@ -5,5 +5,152 @@
;; name in dgo: prim-h
;; dgos: GAME
(defenum prim-flags
:type uint32
:bitfield #t
(pf0 0) ;; set by default
(pf1 1) ;; set by default
(pf2 2)
(pf3 3)
(pf4 4)
(no-texture-name 5) ;; only has the ID.
)
(define-extern process-drawable-art-error (state string process-drawable))
(define-extern *prim-engine* engine)
;; DECOMP BEGINS
(deftype prim-vertex (structure)
"Vertex for the prim renderer. These vertices are generated by
some special effect code, then sent to the prim renderer to be drawn."
((stq vector :inline)
(nokick uint32 :overlay-at (-> stq data 2))
(col rgba :overlay-at (-> stq data 3))
(pos vector :inline)
)
)
(deftype prim-base (basic)
"Base class for prim-strip."
()
(:methods
(prim-base-method-9 () none)
)
)
(deftype prim-strip (prim-base)
"A collection of vertices, all with the same texture and draw settings.
These are owned by the thing submitting to prim, not the prim renderer itself."
((flags prim-flags)
(tex-name basic)
(num-verts uint16)
(allocated-num-verts uint16)
(tex-id texture-id)
(adnops gs-adcmd 2 :inline)
(data0 uint64 :overlay-at (-> adnops 0 word 0))
(reg0 uint64 :overlay-at (-> adnops 0 word 2))
(data1 uint64 :offset 48)
(reg1 uint64 :offset 56)
(clamp gs-clamp)
(alpha gs-alpha)
(bucket bucket-id)
(sink uint32)
(level basic)
(texture-index uint32)
(data prim-vertex :inline :dynamic)
)
(:methods
(new (symbol type int texture-id string) _type_)
(prim-strip-method-10 () none)
)
)
(defmethod new prim-strip ((allocation symbol) (type-to-make type) (num-vertices int) (tex-id texture-id) (tex-name string))
"Allocate a new prim-strip and room for vertices. The texture can be specified by name or ID."
(with-pp
(let ((s5-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* num-vertices 32))))))
(if (zero? s5-0)
(go process-drawable-art-error "prim-strip")
)
(add-connection *prim-engine* pp #f pp s5-0 #f)
(set! (-> s5-0 flags) (prim-flags pf0 pf1))
(set! (-> s5-0 num-verts) (the-as uint num-vertices))
(set! (-> s5-0 allocated-num-verts) (the-as uint num-vertices))
(set! (-> s5-0 data0) (the-as uint 0))
(set! (-> s5-0 adnops 0 cmds) (gs-reg64 hack))
(set! (-> s5-0 data1) (the-as uint 0))
(set! (-> s5-0 adnops 1 cmds) (gs-reg64 hack))
(set! (-> s5-0 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
(set! (-> s5-0 alpha) (new 'static 'gs-alpha :b #x1 :d #x1))
(cond
(tex-name
(set! (-> s5-0 tex-id) (lookup-texture-id-by-name tex-name (the-as string #f)))
(set! (-> s5-0 tex-name) tex-name)
(logclear! (-> s5-0 flags) (prim-flags no-texture-name))
)
(else
(set! (-> s5-0 tex-id) tex-id)
(set! (-> s5-0 tex-name) #f)
(logior! (-> s5-0 flags) (prim-flags no-texture-name))
)
)
(set! (-> s5-0 bucket) (bucket-id bucket566))
(set! (-> s5-0 sink) (the-as uint 64))
(set! (-> s5-0 level) (-> *level* level-default))
(set! (-> s5-0 texture-index) (the-as uint 4))
(let ((f0-1 (/ 1.0 (the float (/ (+ num-vertices -1) 2)))))
(dotimes (v1-24 num-vertices)
(let ((a0-7 (-> s5-0 data v1-24)))
(set! (-> a0-7 stq x) (* (the float (/ v1-24 2)) f0-1))
(set! (-> a0-7 stq y) (the float (logand v1-24 1)))
(set! (-> a0-7 stq z) 0.0)
(set! (-> a0-7 col) (the-as rgba 0.0))
)
(set! (-> s5-0 data v1-24 col) (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
(set-vector!
(the-as vector (+ (the-as uint (the-as vector (-> s5-0 data 0 pos))) (* v1-24 32)))
(* 4096.0 (the float (/ v1-24 2)))
(* 4096.0 (the float (logand v1-24 1)))
0.0
1.0
)
)
)
s5-0
)
)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of ((this prim-strip))
(the-as int (+ (-> this type size) (* (-> this allocated-num-verts) 32)))
)
(deftype prim-sink (structure)
((vertex-count uint8)
(control-count uint8)
)
:allow-misaligned
)
(deftype prim-work (structure)
((vertex-tmpl dma-packet 3 :inline)
(control-tmpl dma-packet 2 :inline)
(giftag generic-gif-tag :inline)
(call-scissor dma-packet :inline)
(call-noclip dma-packet :inline)
(shader adgif-shader :inline)
(mask vector4w :inline)
(in-verts int32)
(num-verts int32)
(vert-ptr prim-vertex)
(sinks prim-sink 68 :inline)
)
(:methods
(prim-work-method-9 () none)
)
)
+69
View File
@@ -7,3 +7,72 @@
;; DECOMP BEGINS
(deftype pos-history (structure)
((points (inline-array vector))
(num-points int32)
(h-first int32)
(h-last int32)
)
)
(deftype debug-vertex (structure)
((trans vector4w :inline)
(normal vector3h :inline)
(st vector2h :inline)
(color uint32)
)
)
(deftype debug-vertex-stats (basic)
((length int32)
(pos-count int32)
(vertex debug-vertex 600 :inline)
)
)
(define *color-black* (new 'static 'rgba :a #x80))
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
+373
View File
@@ -5,5 +5,378 @@
;; name in dgo: game-h
;; dgos: GAME
(declare-type nav-control basic)
(declare-type path-control basic)
(declare-type vol-control basic)
(declare-type fact-info basic)
(declare-type actor-link-info basic)
(declare-type water-control basic)
(declare-type carry-info basic)
(declare-type rigid-body-control basic)
(defenum state-flags
:bitfield #t
:type uint32
(sf0 0)
(sf1 1)
(sf2 2)
(sf3 3)
(sf4 4)
(sf5 5)
(sf6 6)
(sf7 7)
(sf8 8)
(sf9 9)
(sf10 10)
(sf11 11)
(sf12 12)
(sf13 13)
(sf14 14)
(sf15 15)
(sf16 16)
(sf17 17)
(sf18 18)
(sf19 19)
(sf20 20)
(sf21 21)
(sf22 22)
(sf23 23)
(sf24 24)
(sf25 25)
(sf26 26)
(sf27 27)
(sf28 28)
(sf29 29)
(sf30 30)
(sf31 31)
)
(defenum attack-mask
:bitfield #t
:type uint32
(trans 0) ;; 1
(vector 1) ;; 2
(intersection 2) ;; 4
(attacker 3) ;; 8
(attack-time 4) ;; 16
(invinc-time 5) ;; 32
(mode 6) ;; 64
(shove-back 7) ;; 128
(shove-up 8) ;; 256
(speed 9) ;; 512
(dist 10) ;; 1024
(control 11) ;; 2048
(angle 12) ;; 4096
(rotate-to 13) ;; 8192
(prev-state 14) ;; 16384
(id 15) ;; 32768
(count 16) ;; hi 1
(penetrate-using 17) ;; hi 2
(attacker-velocity 18);; hi 4
(damage 19) ;; hi 8
(shield-damage 20) ;; hi16
(vehicle-damage-factor 21) ;; hi 32
(vehicle-impulse-factor 22) ;; hi 64
(knock 23)
(test 24)
)
;; DECOMP BEGINS
(deftype process-drawable (process)
"This is the main base class for in-game objects.
This handles drawing, collision, animation, navigation, particles, sounds, physics, etc.
The actual child classes will add most of the functionality, and this just serves as a common
container for references to the `-control` objects for this object."
((root trsqv)
(node-list cspace-array)
(draw draw-control)
(skel joint-control)
(nav nav-control)
(align align-control)
(path path-control)
(vol vol-control)
(fact fact-info)
(link actor-link-info)
(part sparticle-launch-control)
(water water-control)
(sound ambient-sound)
(carry carry-info)
(rbody rigid-body-control)
(state-flags state-flags)
(state-time time-frame)
)
(:methods
(process-drawable-method-14 () none)
(process-drawable-method-15 () none)
(process-drawable-method-16 () none)
(process-drawable-method-17 () none)
(process-drawable-method-18 () none)
(process-drawable-method-19 () none)
)
(:states
(process-drawable-art-error string)
process-drawable-idle
)
)
(deftype process-drawable-reserved (process-drawable)
"A process drawable with a lot of unused method slots.
GOAL cannot increase the number of methods at runtime, so, for interactive development, it is useful
to have a type with a large number of slots which can be turned into real methods without needed to reboot the PS2."
()
(:methods
(process-drawable-reserved-method-20 () none)
(process-drawable-reserved-method-21 () none)
(process-drawable-reserved-method-22 () none)
(process-drawable-reserved-method-23 () none)
(process-drawable-reserved-method-24 () none)
(process-drawable-reserved-method-25 () none)
(process-drawable-reserved-method-26 () none)
(process-drawable-reserved-method-27 () none)
(process-drawable-reserved-method-28 () none)
(process-drawable-reserved-method-29 () none)
(process-drawable-reserved-method-30 () none)
(process-drawable-reserved-method-31 () none)
(process-drawable-reserved-method-32 () none)
(process-drawable-reserved-method-33 () none)
(process-drawable-reserved-method-34 () none)
(process-drawable-reserved-method-35 () none)
(process-drawable-reserved-method-36 () none)
(process-drawable-reserved-method-37 () none)
(process-drawable-reserved-method-38 () none)
(process-drawable-reserved-method-39 () none)
(process-drawable-reserved-method-40 () none)
(process-drawable-reserved-method-41 () none)
(process-drawable-reserved-method-42 () none)
(process-drawable-reserved-method-43 () none)
(process-drawable-reserved-method-44 () none)
(process-drawable-reserved-method-45 () none)
(process-drawable-reserved-method-46 () none)
(process-drawable-reserved-method-47 () none)
(process-drawable-reserved-method-48 () none)
(process-drawable-reserved-method-49 () none)
(process-drawable-reserved-method-50 () none)
(process-drawable-reserved-method-51 () none)
(process-drawable-reserved-method-52 () none)
(process-drawable-reserved-method-53 () none)
(process-drawable-reserved-method-54 () none)
(process-drawable-reserved-method-55 () none)
(process-drawable-reserved-method-56 () none)
(process-drawable-reserved-method-57 () none)
(process-drawable-reserved-method-58 () none)
(process-drawable-reserved-method-59 () none)
(process-drawable-reserved-method-60 () none)
(process-drawable-reserved-method-61 () none)
(process-drawable-reserved-method-62 () none)
(process-drawable-reserved-method-63 () none)
(process-drawable-reserved-method-64 () none)
(process-drawable-reserved-method-65 () none)
(process-drawable-reserved-method-66 () none)
(process-drawable-reserved-method-67 () none)
(process-drawable-reserved-method-68 () none)
(process-drawable-reserved-method-69 () none)
(process-drawable-reserved-method-70 () none)
(process-drawable-reserved-method-71 () none)
(process-drawable-reserved-method-72 () none)
(process-drawable-reserved-method-73 () none)
(process-drawable-reserved-method-74 () none)
(process-drawable-reserved-method-75 () none)
(process-drawable-reserved-method-76 () none)
(process-drawable-reserved-method-77 () none)
(process-drawable-reserved-method-78 () none)
(process-drawable-reserved-method-79 () none)
(process-drawable-reserved-method-80 () none)
(process-drawable-reserved-method-81 () none)
(process-drawable-reserved-method-82 () none)
(process-drawable-reserved-method-83 () none)
(process-drawable-reserved-method-84 () none)
(process-drawable-reserved-method-85 () none)
(process-drawable-reserved-method-86 () none)
(process-drawable-reserved-method-87 () none)
(process-drawable-reserved-method-88 () none)
(process-drawable-reserved-method-89 () none)
(process-drawable-reserved-method-90 () none)
(process-drawable-reserved-method-91 () none)
(process-drawable-reserved-method-92 () none)
(process-drawable-reserved-method-93 () none)
(process-drawable-reserved-method-94 () none)
(process-drawable-reserved-method-95 () none)
(process-drawable-reserved-method-96 () none)
(process-drawable-reserved-method-97 () none)
(process-drawable-reserved-method-98 () none)
(process-drawable-reserved-method-99 () none)
(process-drawable-reserved-method-100 () none)
(process-drawable-reserved-method-101 () none)
(process-drawable-reserved-method-102 () none)
(process-drawable-reserved-method-103 () none)
(process-drawable-reserved-method-104 () none)
(process-drawable-reserved-method-105 () none)
(process-drawable-reserved-method-106 () none)
(process-drawable-reserved-method-107 () none)
(process-drawable-reserved-method-108 () none)
(process-drawable-reserved-method-109 () none)
(process-drawable-reserved-method-110 () none)
(process-drawable-reserved-method-111 () none)
(process-drawable-reserved-method-112 () none)
(process-drawable-reserved-method-113 () none)
(process-drawable-reserved-method-114 () none)
(process-drawable-reserved-method-115 () none)
(process-drawable-reserved-method-116 () none)
(process-drawable-reserved-method-117 () none)
(process-drawable-reserved-method-118 () none)
(process-drawable-reserved-method-119 () none)
(process-drawable-reserved-method-120 () none)
(process-drawable-reserved-method-121 () none)
(process-drawable-reserved-method-122 () none)
(process-drawable-reserved-method-123 () none)
(process-drawable-reserved-method-124 () none)
(process-drawable-reserved-method-125 () none)
(process-drawable-reserved-method-126 () none)
(process-drawable-reserved-method-127 () none)
(process-drawable-reserved-method-128 () none)
(process-drawable-reserved-method-129 () none)
(process-drawable-reserved-method-130 () none)
(process-drawable-reserved-method-131 () none)
(process-drawable-reserved-method-132 () none)
(process-drawable-reserved-method-133 () none)
(process-drawable-reserved-method-134 () none)
(process-drawable-reserved-method-135 () none)
(process-drawable-reserved-method-136 () none)
(process-drawable-reserved-method-137 () none)
(process-drawable-reserved-method-138 () none)
(process-drawable-reserved-method-139 () none)
(process-drawable-reserved-method-140 () none)
(process-drawable-reserved-method-141 () none)
(process-drawable-reserved-method-142 () none)
(process-drawable-reserved-method-143 () none)
(process-drawable-reserved-method-144 () none)
(process-drawable-reserved-method-145 () none)
(process-drawable-reserved-method-146 () none)
(process-drawable-reserved-method-147 () none)
(process-drawable-reserved-method-148 () none)
(process-drawable-reserved-method-149 () none)
(process-drawable-reserved-method-150 () none)
(process-drawable-reserved-method-151 () none)
(process-drawable-reserved-method-152 () none)
(process-drawable-reserved-method-153 () none)
(process-drawable-reserved-method-154 () none)
(process-drawable-reserved-method-155 () none)
(process-drawable-reserved-method-156 () none)
(process-drawable-reserved-method-157 () none)
(process-drawable-reserved-method-158 () none)
(process-drawable-reserved-method-159 () none)
(process-drawable-reserved-method-160 () none)
(process-drawable-reserved-method-161 () none)
(process-drawable-reserved-method-162 () none)
(process-drawable-reserved-method-163 () none)
(process-drawable-reserved-method-164 () none)
(process-drawable-reserved-method-165 () none)
(process-drawable-reserved-method-166 () none)
(process-drawable-reserved-method-167 () none)
(process-drawable-reserved-method-168 () none)
(process-drawable-reserved-method-169 () none)
(process-drawable-reserved-method-170 () none)
(process-drawable-reserved-method-171 () none)
(process-drawable-reserved-method-172 () none)
(process-drawable-reserved-method-173 () none)
(process-drawable-reserved-method-174 () none)
(process-drawable-reserved-method-175 () none)
(process-drawable-reserved-method-176 () none)
(process-drawable-reserved-method-177 () none)
(process-drawable-reserved-method-178 () none)
(process-drawable-reserved-method-179 () none)
(process-drawable-reserved-method-180 () none)
(process-drawable-reserved-method-181 () none)
(process-drawable-reserved-method-182 () none)
(process-drawable-reserved-method-183 () none)
(process-drawable-reserved-method-184 () none)
(process-drawable-reserved-method-185 () none)
(process-drawable-reserved-method-186 () none)
(process-drawable-reserved-method-187 () none)
(process-drawable-reserved-method-188 () none)
(process-drawable-reserved-method-189 () none)
(process-drawable-reserved-method-190 () none)
(process-drawable-reserved-method-191 () none)
(process-drawable-reserved-method-192 () none)
(process-drawable-reserved-method-193 () none)
(process-drawable-reserved-method-194 () none)
(process-drawable-reserved-method-195 () none)
(process-drawable-reserved-method-196 () none)
(process-drawable-reserved-method-197 () none)
(process-drawable-reserved-method-198 () none)
(process-drawable-reserved-method-199 () none)
(process-drawable-reserved-method-200 () none)
(process-drawable-reserved-method-201 () none)
(process-drawable-reserved-method-202 () none)
(process-drawable-reserved-method-203 () none)
(process-drawable-reserved-method-204 () none)
(process-drawable-reserved-method-205 () none)
(process-drawable-reserved-method-206 () none)
(process-drawable-reserved-method-207 () none)
(process-drawable-reserved-method-208 () none)
(process-drawable-reserved-method-209 () none)
(process-drawable-reserved-method-210 () none)
(process-drawable-reserved-method-211 () none)
(process-drawable-reserved-method-212 () none)
(process-drawable-reserved-method-213 () none)
(process-drawable-reserved-method-214 () none)
(process-drawable-reserved-method-215 () none)
(process-drawable-reserved-method-216 () none)
(process-drawable-reserved-method-217 () none)
)
)
(deftype attack-dir-info (structure)
((dir vector :inline)
(xz-dir vector :inline)
(attacker-velocity vector :inline)
(pos vector :inline)
)
)
(deftype attack-info (structure)
((trans vector :inline)
(vector vector :inline)
(attacker-velocity vector :inline)
(intersection vector :inline)
(attacker handle)
(attack-time time-frame)
(invinc-time time-frame)
(mask attack-mask)
(mode symbol)
(shove-back meters)
(shove-up meters)
(speed meters)
(dist meters)
(control float)
(angle symbol)
(rotate-to degrees)
(prev-state state)
(id uint32)
(count uint32)
(penetrate-using penetrate)
(damage float)
(shield-damage float)
(vehicle-damage-factor float)
(vehicle-impulse-factor float)
(knock knocked-type)
(test symbol)
)
(:methods
(attack-info-method-9 () none)
(attack-info-method-10 () none)
(attack-info-method-11 () none)
)
)
(deftype ground-tween-info (structure)
((chan uint8 3)
(blend float 3)
(group uint32 5)
)
)
+278 -30
View File
@@ -5,10 +5,26 @@
;; name in dgo: penetrate-h
;; dgos: GAME
;; +++penetrate
;; +++game-h:knocked-type
(defenum knocked-type
:type uint8
(knocked-type-0 0)
(knocked-type-1 1)
(knocked-type-2 2)
(knocked-type-3 3)
(knocked-type-4 4) ;; what the heck is this! (its on gator, and cant trigger it for the life of me)
(knocked-type-5 5)
(knocked-type-6 6)
(knocked-type-7 7)
(knocked-type-8 8)
(knocked-type-9 9)
(knocked-type-10 10)
)
;; ---game-h:knocked-type
(defenum penetrate
:type uint64
:bitfield #t
:type uint64
(touch 0)
(generic-attack 1)
(lunge 2)
@@ -47,35 +63,267 @@
(jak-dark-nuke 35)
(jak-dark-blackhole 36)
(emp-blast 37)
(penetrate-38 38)
(penetrate-39 39)
(penetrate-40 40)
(penetrate-41 41)
(penetrate-42 42)
(penetrate-43 43)
(penetrate-44 44)
(penetrate-45 45)
(penetrate-46 46)
(penetrate-47 47)
(penetrate-48 48)
(penetrate-49 49)
(penetrate-50 50)
(penetrate-51 51)
(penetrate-52 52)
(penetrate-53 53)
(penetrate-54 54)
(penetrate-55 55)
(penetrate-56 56)
(penetrate-57 57)
(penetrate-58 58)
(penetrate-59 59)
(penetrate-60 60)
(penetrate-61 61)
(penetrate-62 62)
(penetrate-63 63)
)
;; ---penetrate
;; DECOMP BEGINS
;; WARN: Return type mismatch object vs string.
(defun-debug penetrate->string ((arg0 penetrate))
(if (= (logand (penetrate jak-red-shockwave) arg0) (shl 4 32))
(format #t "jak-red-shockwave ")
)
(if (= (logand arg0 (penetrate mech-bonk)) (penetrate mech-bonk))
(format #t "mech-bonk ")
)
(if (= (logand (penetrate eco-blue) arg0) (shl #x8000 16))
(format #t "eco-blue ")
)
(if (= (logand (penetrate explode) arg0) (penetrate explode))
(format #t "explode ")
)
(if (= (logand arg0 (penetrate bonk)) (penetrate bonk))
(format #t "bonk ")
)
(if (= (logand (penetrate eco-red) arg0) (penetrate eco-red))
(format #t "eco-red ")
)
(if (= (logand arg0 (penetrate roll)) (penetrate roll))
(format #t "roll ")
)
(if (= (logand arg0 (penetrate mech)) (penetrate mech))
(format #t "mech ")
)
(if (= (logand arg0 (penetrate flut-attack)) (penetrate flut-attack))
(format #t "flut-attack ")
)
(if (= (logand arg0 (penetrate mech-punch)) (penetrate mech-punch))
(format #t "mech-punch ")
)
(if (= (logand (penetrate jak-dark-shot) arg0) (penetrate jak-dark-shot))
(format #t "jak-dark-shot ")
)
(if (= (logand (penetrate dark-smack) arg0) (penetrate dark-smack))
(format #t "dark-smack ")
)
(if (= (logand arg0 (penetrate flop)) (penetrate flop))
(format #t "flop ")
)
(if (= (logand arg0 (penetrate spin)) (penetrate spin))
(format #t "spin ")
)
(if (= (logand (penetrate dark-bomb) arg0) (penetrate dark-bomb))
(format #t "dark-bomb ")
)
(if (= (logand arg0 (penetrate vehicle)) (penetrate vehicle))
(format #t "vehicle ")
)
(if (= (logand arg0 (penetrate generic-attack)) (penetrate generic-attack))
(format #t "generic-attack ")
)
(if (= (logand arg0 (penetrate touch)) (penetrate touch))
(format #t "touch ")
)
(if (= (logand (penetrate eco-green) arg0) (shl 1 32))
(format #t "eco-green ")
)
(if (= (logand (penetrate jak-red-shot) arg0) (penetrate jak-red-shot))
(format #t "jak-red-shot ")
)
(if (= (logand arg0 (penetrate lunge)) (penetrate lunge))
(format #t "lunge ")
)
(if (= (logand arg0 (penetrate punch)) (penetrate punch))
(format #t "punch ")
)
(if (= (logand arg0 (penetrate tube)) (penetrate tube))
(format #t "tube ")
)
(if (= (logand (penetrate jak-dark-nuke) arg0) (shl 8 32))
(format #t "jak-dark-nuke ")
)
(if (= (logand (penetrate enemy-yellow-shot) arg0) (penetrate enemy-yellow-shot))
(format #t "enemy-yellow-shot ")
)
(if (= (logand (penetrate knocked) arg0) (shl 2 32))
(format #t "knocked ")
)
(if (= (logand (penetrate emp-blast) arg0) (shl 32 32))
(format #t "emp-blast ")
)
(if (= (logand arg0 (penetrate uppercut)) (penetrate uppercut))
(format #t "uppercut ")
)
(if (= (logand (penetrate dark-punch) arg0) (penetrate dark-punch))
(format #t "dark-punch ")
)
(if (= (logand (penetrate shield) arg0) (penetrate shield))
(format #t "shield ")
)
(if (= (logand (penetrate jak-yellow-shot) arg0) (penetrate jak-yellow-shot))
(format #t "jak-yellow-shot ")
)
(if (= (logand arg0 (penetrate board)) (penetrate board))
(format #t "board ")
)
(if (= (logand (penetrate flut) arg0) (penetrate flut))
(format #t "flut ")
)
(if (= (logand (penetrate eco-yellow) arg0) (penetrate eco-yellow))
(format #t "eco-yellow ")
)
(if (= (logand (penetrate dark-skin) arg0) (penetrate dark-skin))
(format #t "dark-skin ")
)
(if (= (logand (penetrate jak-dark-blackhole) arg0) (shl 16 32))
(format #t "jak-dark-blackhole ")
)
(if (= (logand (penetrate enemy-dark-shot) arg0) (penetrate enemy-dark-shot))
(format #t "enemy-dark-shot ")
)
(the-as string (if (= (logand (penetrate jak-blue-shot) arg0) (penetrate jak-blue-shot))
(format #t "jak-blue-shot ")
)
)
)
(defun penetrate-using->damage ((arg0 penetrate))
(cond
((logtest? (penetrate dark-bomb dark-smack flut) arg0)
15.0
)
((logtest? arg0 (penetrate mech-punch mech-bonk))
5.0
)
((logtest? (penetrate) arg0)
4.0
)
((logtest? (penetrate punch spin jak-dark-shot enemy-dark-shot) arg0)
3.0
)
((logtest? (penetrate
flop
uppercut
tube
flut-attack
dark-punch
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
enemy-yellow-shot
eco-yellow
)
arg0
)
2.0
)
((logtest? arg0 (penetrate generic-attack roll bonk board))
1.0
)
(else
0.0
)
)
)
;; WARN: Return type mismatch uint vs penetrate.
(defun penetrated-by-all&hit-points->penetrated-by ((arg0 penetrate) (arg1 int))
(let ((a0-1 arg1))
(the-as penetrate (logior (logclear arg0 (penetrate
generic-attack
flop
punch
spin
roll
uppercut
bonk
tube
flut-attack
board
mech-punch
mech-bonk
dark-skin
dark-punch
dark-bomb
dark-smack
flut
shield
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
jak-dark-shot
enemy-yellow-shot
enemy-dark-shot
eco-yellow
knocked
)
)
(cond
((or (zero? a0-1) (= a0-1 1))
(the-as int (the-as uint #x23fffdbfa))
)
((= a0-1 2)
#x3fdecab8
)
((= a0-1 3)
#x141cc030
)
((= a0-1 4)
#x1cc000
)
((= a0-1 5)
#x1cc000
)
((or (= a0-1 6)
(= a0-1 7)
(= a0-1 8)
(= a0-1 9)
(= a0-1 10)
(= a0-1 11)
(= a0-1 12)
(= a0-1 13)
(= a0-1 14)
(= a0-1 15)
)
#x1c0000
)
(else
0
)
)
)
)
)
)
;; WARN: Return type mismatch int vs knocked-type.
(defun pu->knocked-type ((arg0 penetrate))
(the-as knocked-type (cond
((logtest? arg0 (penetrate vehicle))
7
)
((logtest? (penetrate jak-blue-shot) arg0)
6
)
((logtest? (penetrate jak-yellow-shot enemy-yellow-shot) arg0)
4
)
((logtest? (penetrate jak-red-shot) arg0)
5
)
((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0)
2
)
((logtest? (penetrate dark-bomb dark-smack) arg0)
3
)
((logtest? arg0 (penetrate mech-punch))
1
)
(else
0
)
)
)
)
@@ -5,5 +5,102 @@
;; name in dgo: bones-h
;; dgos: GAME
(defenum bone-calc-flags
:type uint16
:bitfield #t
(write-ripple-data 0)
(no-cam-rot 1)
(bncfl02 2)
(bncfl03 3)
(bncfl04 4)
(bncfl05 5)
(bncfl06 6)
(bncfl07 7)
(bncfl08 8)
(bncfl09 9)
(bncfl10 10)
(bncfl11 11)
(bncfl12 12)
(bncfl13 13)
(bncfl14 14)
(bncfl15 15)
)
;; DECOMP BEGINS
(deftype bone-buffer (structure)
((joint matrix 16 :inline)
(bone bone 16 :inline)
(output pris-mtx 16 :inline)
)
)
(deftype bone-layout (structure)
((data uint16 8)
(joint (inline-array matrix) 2 :overlay-at (-> data 0))
(bone (inline-array bone) 2 :overlay-at (-> data 4))
(output (inline-array pris-mtx) 2 :offset 16)
(unused uint32 2 :offset 24)
)
)
(deftype bone-regs (structure)
((dma-buf dma-buffer)
(wait-count uint32)
(in-count uint32)
(sp-size uint32)
(sp-bufnum uint32)
(joint-ptr (inline-array joint))
(bone-ptr (inline-array bone))
(num-bones uint32)
(mtxs (inline-array pris-mtx))
)
)
(deftype bone-work (structure)
((layout bone-layout :inline)
(regs bone-regs :inline)
)
)
(deftype bone-debug (structure)
((time-ctr uint32)
(timing uint32 360)
)
)
(deftype bone-memory (structure)
((work bone-work :inline)
(buffer bone-buffer 2 :inline)
)
)
(deftype bone-calculation (structure)
((flags bone-calc-flags)
(num-bones uint16)
(matrix-area (inline-array pris-mtx))
(joints (inline-array joint))
(bones (inline-array bone))
(ripple-scale float)
(ripple-y-scale float)
(ripple-normal-scale float)
(ripple-area (inline-array vector))
(next bone-calculation)
(dummy-1 uint32)
(dummy-2 uint32)
(dummy-3 uint32)
)
)
(deftype bone-calculation-list (structure)
((first bone-calculation)
(next bone-calculation)
)
)
@@ -5,5 +5,154 @@
;; name in dgo: foreground-h
;; dgos: GAME
(declare-type merc-effect structure)
;; DECOMP BEGINS
(deftype mercneric-chain (structure)
"A DMA chain for drawing with mercneric, and metadata needed to append.
This chain is assumed to run with a specific tpage from a specific level available."
((first uint32)
(next uint32)
(state generic-bucket-state :inline)
(vu1-bucket bucket-id)
)
:pack-me
)
(deftype merc-chain (structure)
"A DMA chain for drawing with merc.
This chain is assumed to run with a specific tpage from a specific level available."
((first dma-packet)
(patch dma-packet)
(vu1-bucket bucket-id)
)
:pack-me
)
(deftype foreground-bucket (structure)
"A foreground bucket is merc, emerc, and mercneric chain for a given texture mode."
((merc merc-chain :inline)
(emerc merc-chain :inline)
(mercneric mercneric-chain :inline)
)
)
(deftype foreground-level-buckets (structure)
"Collection of buckets for a single level.
Each bucket has a different texture. The order is:
tfrag, pris, shrub, alpha, water, pris, pris2"
((data foreground-bucket 7 :inline)
)
)
(deftype foreground-bucket-grid (structure)
"Array of buckets for each level, plus the single warp chain shared between everybody."
((level-buckets foreground-level-buckets 11 :inline)
(warp-chain mercneric-chain :inline)
)
)
(deftype foreground-regs (structure)
"Frequently accessed foreground values. These are in scratchpad for fast access
during foreground processing."
((dist float)
(merc-used uint32)
(emerc-used uint32)
(mercneric-used uint32)
(use-isometric uint32)
(base-start dma-packet)
(joint-ptr (inline-array joint))
(bone-ptr (inline-array bone))
(num-bones uint32)
(mtxs (inline-array pris-mtx))
(dma-buf dma-buffer)
(default-texture-index uint32)
(mercneric-chain mercneric-chain)
(level-buckets foreground-level-buckets)
)
)
(deftype foreground-work (structure)
"Memory map for scratchpad during foreground processing.
This is not used by the renderers, bone matrix, or joint code - just the code
that assigns stuff to buckets and prepares DMA for merc (or requests for generic merc)."
((regs foreground-regs :inline)
(draw-index-map uint8 11 :offset 64)
(grid foreground-bucket-grid :inline)
(bounds sphere :inline)
(lights vu-lights :inline)
(distance vector :inline)
(next-tmpl dma-packet :inline)
)
)
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 0]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 1]
(defun invalidate-cache-line ((arg0 pointer))
;; og:preserve-this
; (.sync.l)
; (.cache dxwbin arg0 0)
; (.sync.l)
; (.cache dxwbin arg0 1)
; (.sync.l)
0
)
(deftype texscroll-globals (structure)
"List of all merc-effects that need texscroll applied."
((requests int32)
(effects merc-effect 32)
)
)
(deftype merc-effect-bucket-info (structure)
"Scratch info computed per-merc-effect by the foreground code, then later read by merc
DMA generation. This is only for the currently-processing merc model's effects."
((color-fade rgba)
(merc-path uint8)
(ignore-alpha uint8)
(disable-draw uint8)
(disable-envmap uint8)
)
:pack-me
)
(deftype merc-bucket-info (structure)
"Scratch info for the current merc-ctrl. Written by the foreground code, read by merc DMA generation."
((light vu-lights :inline)
(needs-clip int32)
(need-mercprime-if-merc int32)
(must-use-mercneric-for-clip int32)
(effect merc-effect-bucket-info 64 :inline)
)
)
(deftype foreground-globals (structure)
"The foreground renderer state: all DMA chains, settings for the current merc-ctrl, texscroll list."
((foreground-grid foreground-bucket-grid :inline)
(merc-bucket-info merc-bucket-info :inline)
(texscroll texscroll-globals :inline)
)
)
(deftype shadow-dma-packet (structure)
"DMA tag for submitting shadow data."
((tag generic-merc-tag :inline)
(settings shadow-settings :inline)
(geo-ref dma-packet :inline)
(mtx-ref dma-packet :inline)
(end-tag dma-packet :inline)
)
)
+1 -1
View File
@@ -591,7 +591,7 @@
(bucket563 563)
(bucket564 564)
(bucket565 565)
(bucket566 566)
(bucket566 566) ;; default for prim
(bucket567 567)
(bucket568 568)
(bucket569 569)
+110
View File
@@ -5,5 +5,115 @@
;; name in dgo: scene-h
;; dgos: GAME
(defenum scene-flags
:bitfield #t
:type uint32
)
;; DECOMP BEGINS
(deftype scene-actor (basic)
((name string)
(level symbol)
(art-group string)
(prefix string)
(draw-frames pair)
(scissor-frames pair)
(shadow-frames basic)
(cloth-reset-frames basic)
(cloth-commands basic)
(camera int16)
(light-index uint8)
(shadow-mask uint8)
(shadow-values uint32)
(flags uint32)
(command-list basic)
(shadow-flags int32)
(shadow-volume-joint basic)
(draw-seg uint64)
(no-draw-seg uint64)
(last-frame float)
(process uint64)
)
(:methods
(scene-actor-method-9 () none)
)
)
(deftype scene (art-group)
((scene-flags scene-flags)
(mask-to-clear process-mask)
(entity string)
(art-group string)
(anim string)
(parts int32)
(command-list pair)
(cut-list pair)
(wait-max-time time-frame)
(wait-air-time time-frame)
(wait-ground-time time-frame)
(actor (array scene-actor))
(load-point continue-point)
(end-point continue-point)
(borrow pair)
(sfx-volume float)
(ambient-volume float)
(music-volume float)
(music-delay float)
(scene-task uint16)
(on-running basic)
(on-complete basic)
)
(:methods
(scene-method-16 () none)
(scene-method-17 () none)
)
)
(deftype scene-player (process-drawable)
((scene-list (array scene))
(scene scene)
(scene-index int32)
(anim spool-anim)
(next-anim spool-anim)
(camera handle)
(main-entity entity-actor)
(wait symbol)
(old-target-pos transformq :inline)
(pre-cut-frame basic)
(preload-continue string)
(preload-sound basic)
(dma-max uint32)
(gui-id sound-id)
(aborted? symbol)
(scene-start-time time-frame)
(targ-speed float)
(cur-speed float)
(speed-change-time time-frame)
(speed-press-time time-frame)
(speed-change-speed float)
(subtitle-change-time time-frame)
(user-sound sound-id 4)
(last-frame float)
(end-point basic)
(blackout-end basic)
(new-trans-hook basic)
(cur-trans-hook basic)
(user-data uint64)
)
(:methods
(scene-player-method-20 () none)
(scene-player-method-21 () none)
(scene-player-method-22 () none)
(scene-player-method-23 () none)
(scene-player-method-24 () none)
(scene-player-method-25 () none)
)
)
(define *scene-player* (the-as (pointer scene-player) #f))
(define *debug-menu-scene-play* (the-as object #f))
+54
View File
@@ -5,5 +5,59 @@
;; name in dgo: script-h
;; dgos: GAME
(declare-type script-context structure)
(declare-type load-state structure)
(define-extern *load-state* load-state)
;; DECOMP BEGINS
(deftype script-form (structure)
((name symbol)
(spec pair)
(func (function script-context object))
)
(:methods
(script-form-method-9 () none)
)
)
(deftype script-context (structure)
((load-state load-state)
(key object)
(process process)
(trans vector)
(side-effect? symbol)
(got-error? symbol)
(expr pair)
(param-count int32)
(param object 16)
(param-type object 16)
)
(:methods
(new (symbol type object process vector) _type_)
(script-context-method-9 () none)
(script-context-method-10 () none)
(script-context-method-11 () none)
)
)
;; WARN: Return type mismatch structure vs script-context.
(defmethod new script-context ((allocation symbol) (type-to-make type) (arg0 object) (arg1 process) (arg2 vector))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((v0-0 (t9-0 allocation v1-1)))
(set! (-> (the-as script-context v0-0) key) arg0)
(set! (-> (the-as script-context v0-0) process) arg1)
(set! (-> (the-as script-context v0-0) load-state) *load-state*)
(set! (-> (the-as script-context v0-0) side-effect?) #t)
(set! (-> (the-as script-context v0-0) got-error?) #f)
(set! (-> (the-as script-context v0-0) trans) arg2)
(the-as script-context v0-0)
)
)
)
+1 -1
View File
@@ -777,4 +777,4 @@
(defmacro go-virtual (state-name &key (proc self) &rest args)
"Change the current process to the virtual state of the given process."
`(go (method-of-object ,proc ,state-name) ,@args)
)
)
+61
View File
@@ -0,0 +1,61 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type align-control
(deftype align-control (basic)
((flags align-flags)
(process process-drawable)
(frame-group art-joint-anim)
(frame-num float)
(matrix matrix 2 :inline)
(transform transform 2 :inline)
(delta transformq :inline)
(last-speed meters)
(align transformq :inline :overlay-at (-> transform 0 trans data 0))
)
(:methods
(new (symbol type process) _type_)
(align-control-method-9 () none)
(align-control-method-10 () none)
(align-control-method-11 () none)
(align-control-method-12 () none)
(align-control-method-13 () none)
)
)
;; definition for method 3 of type align-control
(defmethod inspect ((this align-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X~%" (-> this flags))
(format #t "~1Tprocess: ~A~%" (-> this process))
(format #t "~1Tframe-group: ~A~%" (-> this frame-group))
(format #t "~1Tframe-num: ~f~%" (-> this frame-num))
(format #t "~1Tmatrix[2] @ #x~X~%" (-> this matrix))
(format #t "~1Ttransform[2] @ #x~X~%" (-> this transform))
(format #t "~1Tdelta: #<transformq @ #x~X>~%" (-> this delta))
(format #t "~1Tlast-speed: (meters ~m)~%" (-> this last-speed))
(format #t "~1Talign: #<transformq @ #x~X>~%" (-> this transform))
(label cfg-4)
this
)
;; definition for method 0 of type align-control
;; WARN: Return type mismatch object vs align-control.
(defmethod new align-control ((allocation symbol) (type-to-make type) (arg0 process))
(let ((v0-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size))))))
(when (zero? (the-as align-control v0-0))
(go process-drawable-art-error "memory")
(return (the-as align-control 0))
)
(set! (-> (the-as align-control v0-0) process) (the-as process-drawable arg0))
(the-as align-control v0-0)
)
)
+336
View File
@@ -0,0 +1,336 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type joint-control-channel
(deftype joint-control-channel (structure)
((parent joint-control)
(frame-group art-joint-anim)
(frame-num float)
(dist meters)
(num-func (function joint-control-channel float float float float))
(param float 3)
(frame-interp float 2)
(inspector-amount uint8)
(command joint-control-command)
(group-sub-index int8)
(group-size int8)
(eval-time uint32)
)
)
;; definition for method 3 of type joint-control-channel
(defmethod inspect ((this joint-control-channel))
(when (not this)
(set! this this)
(goto cfg-23)
)
(format #t "[~8x] ~A~%" this 'joint-control-channel)
(format #t "~1Tparent: ~A~%" (-> this parent))
(format #t "~1Tframe-group: ~A~%" (-> this frame-group))
(format #t "~1Tframe-num: ~f~%" (-> this frame-num))
(format #t "~1Tdist: (meters ~m)~%" (-> this dist))
(format #t "~1Tnum-func: ~A~%" (-> this num-func))
(format #t "~1Tparam[3] @ #x~X~%" (-> this param))
(dotimes (s5-0 3)
(format #t "~T [~D]~1Tparam: ~`float`P~%" s5-0 (-> this param s5-0))
)
(format #t "~1Tframe-interp[2] @ #x~X~%" (-> this frame-interp))
(dotimes (s5-1 2)
(format #t "~T [~D]~1Tframe-interp: ~`float`P~%" s5-1 (-> this frame-interp s5-1))
)
(format #t "~1Tinspector-amount: ~D~%" (-> this inspector-amount))
(let ((t9-11 format)
(a0-12 #t)
(a1-11 "~1Tcommand: #x~X : ~S~%")
(a2-11 (-> this command))
(v1-10 (-> this command))
)
(t9-11 a0-12 a1-11 a2-11 (cond
((= v1-10 (joint-control-command stack1))
"stack1"
)
((= v1-10 (joint-control-command push))
"push"
)
((= v1-10 (joint-control-command blend))
"blend"
)
((= v1-10 (joint-control-command push1))
"push1"
)
((= v1-10 (joint-control-command float))
"float"
)
((= v1-10 (joint-control-command stack))
"stack"
)
(else
"*unknown*"
)
)
)
)
(format #t "~1Tgroup-sub-index: ~D~%" (-> this group-sub-index))
(format #t "~1Tgroup-size: ~D~%" (-> this group-size))
(format #t "~1Teval-time: ~D~%" (-> this eval-time))
(label cfg-23)
this
)
;; definition of type top-anim-joint-control
(deftype top-anim-joint-control (basic)
((process (pointer process-drawable))
(interp-select uint64 2)
(base-anim basic)
(base-anim-speed float)
(base-anim-blend float)
(interp float)
(frame-group art-joint-anim)
(frame-group-push art-joint-anim)
(frame-num float)
(frame-targ art-joint-anim)
(frame-speed float)
(frame-blend float)
(frame-cur-blend float)
(frame-start float)
(frame-post-blend float)
(frame-post-end float)
(frame-push-time time-frame)
(frame-post-put-away basic)
(update-time time-frame)
)
(:methods
(new (symbol type) _type_)
(top-anim-joint-control-method-9 () none)
(top-anim-joint-control-method-10 () none)
(top-anim-joint-control-method-11 () none)
(top-anim-joint-control-method-12 () none)
)
)
;; definition for method 3 of type top-anim-joint-control
(defmethod inspect ((this top-anim-joint-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tprocess: #x~X~%" (-> this process))
(format #t "~1Tinterp-select[2] @ #x~X~%" (-> this interp-select))
(format #t "~1Tbase-anim: ~A~%" (-> this base-anim))
(format #t "~1Tbase-anim-speed: ~f~%" (-> this base-anim-speed))
(format #t "~1Tbase-anim-blend: ~f~%" (-> this base-anim-blend))
(format #t "~1Tinterp: ~f~%" (-> this interp))
(format #t "~1Tframe-group: ~A~%" (-> this frame-group))
(format #t "~1Tframe-group-push: ~A~%" (-> this frame-group-push))
(format #t "~1Tframe-num: ~f~%" (-> this frame-num))
(format #t "~1Tframe-targ: ~A~%" (-> this frame-targ))
(format #t "~1Tframe-speed: ~f~%" (-> this frame-speed))
(format #t "~1Tframe-blend: ~f~%" (-> this frame-blend))
(format #t "~1Tframe-cur-blend: ~f~%" (-> this frame-cur-blend))
(format #t "~1Tframe-start: ~f~%" (-> this frame-start))
(format #t "~1Tframe-post-blend: ~f~%" (-> this frame-post-blend))
(format #t "~1Tframe-post-end: ~f~%" (-> this frame-post-end))
(format #t "~1Tframe-push-time: ~D~%" (-> this frame-push-time))
(format #t "~1Tframe-post-put-away: ~A~%" (-> this frame-post-put-away))
(format #t "~1Tupdate-time: ~D~%" (-> this update-time))
(label cfg-4)
this
)
;; definition of type joint-control
(deftype joint-control (basic)
((status joint-control-status)
(allocated-length uint8)
(active-channels uint8)
(root-channel (inline-array joint-control-channel) :offset 16)
(blend-index uint8)
(active-frame-interp uint8)
(float-channels uint8)
(generate-frame-function (function joint-anim-frame int joint-control int))
(prebind-function (function joint-anim-frame int joint-control int))
(postbind-function (function draw-control cspace-array joint-control none))
(effect effect-control)
(interp-select int64 2)
(top-anim top-anim-joint-control)
(override (array float))
(channel joint-control-channel :dynamic)
)
(:methods
(new (symbol type) _type_)
(joint-control-method-9 () none)
(joint-control-method-10 () none)
(joint-control-method-11 () none)
(joint-control-method-12 () none)
)
)
;; definition for method 3 of type joint-control
(defmethod inspect ((this joint-control))
(when (not this)
(set! this this)
(goto cfg-32)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tstatus: #x~X : (joint-control-status " (-> this status))
(let ((s5-0 (-> this status)))
(if (= (logand s5-0 (joint-control-status blend-shape)) (joint-control-status blend-shape))
(format #t "blend-shape ")
)
(if (= (logand s5-0 (joint-control-status valid-spooled-frame)) (joint-control-status valid-spooled-frame))
(format #t "valid-spooled-frame ")
)
(if (= (logand s5-0 (joint-control-status no-joint-callbacks)) (joint-control-status no-joint-callbacks))
(format #t "no-joint-callbacks ")
)
(if (= (logand s5-0 (joint-control-status spooling-not-last-block))
(joint-control-status spooling-not-last-block)
)
(format #t "spooling-not-last-block ")
)
(if (= (logand s5-0 (joint-control-status eye-anim)) (joint-control-status eye-anim))
(format #t "eye-anim ")
)
(if (= (logand s5-0 (joint-control-status math-when-off-screen)) (joint-control-status math-when-off-screen))
(format #t "math-when-off-screen ")
)
(if (= (logand s5-0 (joint-control-status sync-math)) (joint-control-status sync-math))
(format #t "sync-math ")
)
(if (= (logand s5-0 (joint-control-status eye-anim-valid)) (joint-control-status eye-anim-valid))
(format #t "eye-anim-valid ")
)
(if (= (logand s5-0 (joint-control-status blend-shape-valid)) (joint-control-status blend-shape-valid))
(format #t "blend-shape-valid ")
)
(if (= (logand s5-0 (joint-control-status force-math)) (joint-control-status force-math))
(format #t "force-math ")
)
(if (= (logand s5-0 (joint-control-status spooling)) (joint-control-status spooling))
(format #t "spooling ")
)
)
(format #t ")~%")
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tactive-channels: ~D~%" (-> this active-channels))
(format #t "~1Troot-channel: #x~X~%" (-> this root-channel))
(format #t "~1Tblend-index: ~D~%" (-> this blend-index))
(format #t "~1Tactive-frame-interp: ~D~%" (-> this active-frame-interp))
(format #t "~1Tfloat-channels: ~D~%" (-> this float-channels))
(format #t "~1Tgenerate-frame-function: ~A~%" (-> this generate-frame-function))
(format #t "~1Tprebind-function: ~A~%" (-> this prebind-function))
(format #t "~1Tpostbind-function: ~A~%" (-> this postbind-function))
(format #t "~1Teffect: ~A~%" (-> this effect))
(format #t "~1Tinterp-select[2] @ #x~X~%" (-> this interp-select))
(dotimes (s5-1 2)
(format #t "~T [~D]~1Tinterp-select: ~D~%" s5-1 (-> this interp-select s5-1))
)
(format #t "~1Ttop-anim: ~A~%" (-> this top-anim))
(format #t "~1Toverride: ~A~%" (-> this override))
(format #t "~1Tchannel[0] @ #x~X~%" (-> this channel))
(dotimes (s5-2 (the-as int (-> this active-channels)))
(format #t "~T [~D]~1Tchannel: ~`joint-control-channel`P~%" s5-2 (+ (+ (* s5-2 64) 60) (the-as int this)))
)
(label cfg-32)
this
)
;; definition of type matrix-stack
(deftype matrix-stack (structure)
((top matrix)
(data matrix 24 :inline)
)
)
;; definition for method 3 of type matrix-stack
(defmethod inspect ((this matrix-stack))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'matrix-stack)
(format #t "~1Ttop: #<matrix @ #x~X>~%" (-> this top))
(format #t "~1Tdata[24] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type channel-upload-info
(deftype channel-upload-info (structure)
((fixed joint-anim-compressed-fixed)
(fixed-qwc int32)
(frame joint-anim-compressed-frame)
(frame-qwc int32)
(amount float)
(interp float)
)
:pack-me
)
;; definition for method 3 of type channel-upload-info
(defmethod inspect ((this channel-upload-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'channel-upload-info)
(format #t "~1Tfixed: #<joint-anim-compressed-fixed @ #x~X>~%" (-> this fixed))
(format #t "~1Tfixed-qwc: ~D~%" (-> this fixed-qwc))
(format #t "~1Tframe: #<joint-anim-compressed-frame @ #x~X>~%" (-> this frame))
(format #t "~1Tframe-qwc: ~D~%" (-> this frame-qwc))
(format #t "~1Tamount: ~f~%" (-> this amount))
(format #t "~1Tinterp: ~f~%" (-> this interp))
(label cfg-4)
this
)
;; definition of type joint-work
(deftype joint-work (structure)
((temp-mtx matrix :inline)
(joint-stack matrix-stack :inline)
(fix-jmp-table (function none) 16)
(frm-jmp-table (function none) 16)
(pair-jmp-table (function none) 16)
(uploads channel-upload-info 24 :inline)
(num-uploads int32)
(mtx-acc matrix 2 :inline)
(tq-acc transformq 100 :inline)
(jacp-hdr joint-anim-compressed-hdr :inline)
(fixed-data joint-anim-compressed-fixed :inline)
(frame-data joint-anim-compressed-frame 2 :inline)
(flatten-array float 576 :overlay-at mtx-acc)
(flattened vector 24 :inline :overlay-at mtx-acc)
)
)
;; definition for method 3 of type joint-work
(defmethod inspect ((this joint-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-work)
(format #t "~1Ttemp-mtx: #<matrix @ #x~X>~%" (-> this temp-mtx))
(format #t "~1Tjoint-stack: #<matrix-stack @ #x~X>~%" (-> this joint-stack))
(format #t "~1Tfix-jmp-table[16] @ #x~X~%" (-> this fix-jmp-table))
(format #t "~1Tfrm-jmp-table[16] @ #x~X~%" (-> this frm-jmp-table))
(format #t "~1Tpair-jmp-table[16] @ #x~X~%" (-> this pair-jmp-table))
(format #t "~1Tuploads[24] @ #x~X~%" (-> this uploads))
(format #t "~1Tnum-uploads: ~D~%" (-> this num-uploads))
(format #t "~1Tmtx-acc[2] @ #x~X~%" (-> this mtx-acc))
(format #t "~1Ttq-acc[100] @ #x~X~%" (-> this tq-acc))
(format #t "~1Tjacp-hdr: #<joint-anim-compressed-hdr @ #x~X>~%" (-> this jacp-hdr))
(format #t "~1Tfixed-data: #<joint-anim-compressed-fixed @ #x~X>~%" (-> this fixed-data))
(format #t "~1Tframe-data[2] @ #x~X~%" (-> this frame-data))
(format #t "~1Tflatten-array[576] @ #x~X~%" (-> this mtx-acc))
(format #t "~1Tflattened[24] @ #x~X~%" (-> this mtx-acc))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+1 -5
View File
@@ -142,7 +142,7 @@ The callback function is used to take the joint transforms out of the joint anim
;; definition of type cspace-array
(deftype cspace-array (inline-array-class)
((data cspace :dynamic)
((data cspace :inline :dynamic)
)
)
@@ -179,7 +179,3 @@ The callback function is used to take the joint transforms out of the joint anim
;; failed to figure out what this is:
0
+48 -5
View File
@@ -1388,6 +1388,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(nav-flags uint8)
(total-prims uint8)
(num-riders uint8)
(pat-ignore-mask pat-surface)
(event-self symbol :offset 152)
(event-other symbol)
(root-prim collide-shape-prim)
@@ -1638,7 +1639,53 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
)
;; definition for method 0 of type collide-shape
;; ERROR: function was not converted to expressions. Cannot decompile.
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> s5-0 actor-hash-index) -1)
(set! (-> s5-0 process) arg0)
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
(set! (-> s5-0 nav-flags) (the-as uint 1))
(set! (-> s5-0 event-self) #f)
(set! (-> s5-0 event-other) #f)
(set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f))
(set! (-> s5-0 root-prim) #f)
(set! (-> s5-0 penetrate-using) (penetrate))
(set! (-> s5-0 penetrated-by) (penetrate))
(set! (-> s5-0 event-priority) (the-as uint 0))
(set! (-> s5-0 rider-max-momentum) 409600.0)
(case (-> arg0 type symbol)
(('camera)
(set! (-> s5-0 pat-ignore-mask) (new 'static 'pat-surface :nocamera #x1 :probe #x1 :noendlessfall #x1))
)
(('target)
(set! (-> s5-0 pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1))
)
(else
(set! (-> s5-0 pat-ignore-mask)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
)
)
(set! (-> s5-0 trans w) 1.0)
(quaternion-identity! (the-as quaternion (-> s5-0 rot)))
(vector-identity! (-> s5-0 scale))
(cond
((= arg1 (collide-list-enum hit-by-player))
(add-connection *collide-hit-by-player-list* arg0 #f s5-0 #f #f)
)
((= arg1 (collide-list-enum usually-hit-by-player))
(add-connection *collide-hit-by-others-list* arg0 #f s5-0 #f #f)
)
((= arg1 (collide-list-enum hit-by-others))
(add-connection *collide-player-list* arg0 #f s5-0 #f #f)
)
(else
(format 0 "Unsupported collide-list-enum in collide-shape constructor!~%")
)
)
s5-0
)
)
;; definition for method 0 of type collide-shape-moving
;; INFO: Used lq/sq
@@ -1685,7 +1732,3 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
;; failed to figure out what this is:
0
+236
View File
@@ -0,0 +1,236 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type prim-vertex
(deftype prim-vertex (structure)
"Vertex for the prim renderer. These vertices are generated by
some special effect code, then sent to the prim renderer to be drawn."
((stq vector :inline)
(nokick uint32 :overlay-at (-> stq data 2))
(col rgba :overlay-at (-> stq data 3))
(pos vector :inline)
)
)
;; definition for method 3 of type prim-vertex
(defmethod inspect ((this prim-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-vertex)
(format #t "~1Tstq: #<vector @ #x~X>~%" (-> this stq))
(format #t "~1Tnokick: ~D~%" (-> this stq z))
(format #t "~1Tcol: ~D~%" (-> this col))
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
(label cfg-4)
this
)
;; definition of type prim-base
(deftype prim-base (basic)
"Base class for prim-strip."
()
(:methods
(prim-base-method-9 () none)
)
)
;; definition for method 3 of type prim-base
(defmethod inspect ((this prim-base))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(label cfg-4)
this
)
;; definition of type prim-strip
(deftype prim-strip (prim-base)
"A collection of vertices, all with the same texture and draw settings.
These are owned by the thing submitting to prim, not the prim renderer itself."
((flags prim-flags)
(tex-name basic)
(num-verts uint16)
(allocated-num-verts uint16)
(tex-id texture-id)
(adnops gs-adcmd 2 :inline)
(data0 uint64 :overlay-at (-> adnops 0 word 0))
(reg0 uint64 :overlay-at (-> adnops 0 word 2))
(data1 uint64 :offset 48)
(reg1 uint64 :offset 56)
(clamp gs-clamp)
(alpha gs-alpha)
(bucket bucket-id)
(sink uint32)
(level basic)
(texture-index uint32)
(data prim-vertex :inline :dynamic)
)
(:methods
(new (symbol type int texture-id string) _type_)
(prim-strip-method-10 () none)
)
)
;; definition for method 3 of type prim-strip
(defmethod inspect ((this prim-strip))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Ttex-name: ~A~%" (-> this tex-name))
(format #t "~1Tnum-verts: ~D~%" (-> this num-verts))
(format #t "~1Tallocated-num-verts: ~D~%" (-> this allocated-num-verts))
(format #t "~1Ttex-id: ~D~%" (-> this tex-id))
(format #t "~1Tadnops[2] @ #x~X~%" (-> this adnops))
(format #t "~1Tdata0: ~D~%" (-> this data0))
(format #t "~1Treg0: ~D~%" (-> this adnops 0 cmds))
(format #t "~1Tdata1: ~D~%" (-> this data1))
(format #t "~1Treg1: ~D~%" (-> this adnops 1 cmds))
(format #t "~1Tclamp: ~D~%" (-> this clamp))
(format #t "~1Talpha: ~D~%" (-> this alpha))
(format #t "~1Tbucket: ~D~%" (-> this bucket))
(format #t "~1Tsink: ~D~%" (-> this sink))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Ttexture-index: ~D~%" (-> this texture-index))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition for method 0 of type prim-strip
(defmethod new prim-strip ((allocation symbol) (type-to-make type) (num-vertices int) (tex-id texture-id) (tex-name string))
"Allocate a new prim-strip and room for vertices. The texture can be specified by name or ID."
(with-pp
(let ((s5-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* num-vertices 32))))))
(if (zero? s5-0)
(go process-drawable-art-error "prim-strip")
)
(add-connection *prim-engine* pp #f pp s5-0 #f)
(set! (-> s5-0 flags) (prim-flags pf0 pf1))
(set! (-> s5-0 num-verts) (the-as uint num-vertices))
(set! (-> s5-0 allocated-num-verts) (the-as uint num-vertices))
(set! (-> s5-0 data0) (the-as uint 0))
(set! (-> s5-0 adnops 0 cmds) (gs-reg64 hack))
(set! (-> s5-0 data1) (the-as uint 0))
(set! (-> s5-0 adnops 1 cmds) (gs-reg64 hack))
(set! (-> s5-0 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
(set! (-> s5-0 alpha) (new 'static 'gs-alpha :b #x1 :d #x1))
(cond
(tex-name
(set! (-> s5-0 tex-id) (lookup-texture-id-by-name tex-name (the-as string #f)))
(set! (-> s5-0 tex-name) tex-name)
(logclear! (-> s5-0 flags) (prim-flags no-texture-name))
)
(else
(set! (-> s5-0 tex-id) tex-id)
(set! (-> s5-0 tex-name) #f)
(logior! (-> s5-0 flags) (prim-flags no-texture-name))
)
)
(set! (-> s5-0 bucket) (bucket-id bucket566))
(set! (-> s5-0 sink) (the-as uint 64))
(set! (-> s5-0 level) (-> *level* level-default))
(set! (-> s5-0 texture-index) (the-as uint 4))
(let ((f0-1 (/ 1.0 (the float (/ (+ num-vertices -1) 2)))))
(dotimes (v1-24 num-vertices)
(let ((a0-7 (-> s5-0 data v1-24)))
(set! (-> a0-7 stq x) (* (the float (/ v1-24 2)) f0-1))
(set! (-> a0-7 stq y) (the float (logand v1-24 1)))
(set! (-> a0-7 stq z) 0.0)
(set! (-> a0-7 col) (the-as rgba 0.0))
)
(set! (-> s5-0 data v1-24 col) (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
(set-vector!
(the-as vector (+ (the-as uint (the-as vector (-> s5-0 data 0 pos))) (* v1-24 32)))
(* 4096.0 (the float (/ v1-24 2)))
(* 4096.0 (the float (logand v1-24 1)))
0.0
1.0
)
)
)
s5-0
)
)
)
;; definition for method 5 of type prim-strip
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of ((this prim-strip))
(the-as int (+ (-> this type size) (* (-> this allocated-num-verts) 32)))
)
;; definition of type prim-sink
(deftype prim-sink (structure)
((vertex-count uint8)
(control-count uint8)
)
:allow-misaligned
)
;; definition for method 3 of type prim-sink
(defmethod inspect ((this prim-sink))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-sink)
(format #t "~1Tvertex-count: ~D~%" (-> this vertex-count))
(format #t "~1Tcontrol-count: ~D~%" (-> this control-count))
(label cfg-4)
this
)
;; definition of type prim-work
(deftype prim-work (structure)
((vertex-tmpl dma-packet 3 :inline)
(control-tmpl dma-packet 2 :inline)
(giftag generic-gif-tag :inline)
(call-scissor dma-packet :inline)
(call-noclip dma-packet :inline)
(shader adgif-shader :inline)
(mask vector4w :inline)
(in-verts int32)
(num-verts int32)
(vert-ptr prim-vertex)
(sinks prim-sink 68 :inline)
)
(:methods
(prim-work-method-9 () none)
)
)
;; definition for method 3 of type prim-work
(defmethod inspect ((this prim-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-work)
(format #t "~1Tvertex-tmpl[3] @ #x~X~%" (-> this vertex-tmpl))
(format #t "~1Tcontrol-tmpl[2] @ #x~X~%" (-> this control-tmpl))
(format #t "~1Tgiftag: #<generic-gif-tag @ #x~X>~%" (-> this giftag))
(format #t "~1Tcall-scissor: #<dma-packet @ #x~X>~%" (-> this call-scissor))
(format #t "~1Tcall-noclip: #<dma-packet @ #x~X>~%" (-> this call-noclip))
(format #t "~1Tshader: #<adgif-shader @ #x~X>~%" (-> this shader))
(format #t "~1Tmask: #<vector4w @ #x~X>~%" (-> this mask))
(format #t "~1Tin-verts: ~D~%" (-> this in-verts))
(format #t "~1Tnum-verts: ~D~%" (-> this num-verts))
(format #t "~1Tvert-ptr: #<prim-vertex @ #x~X>~%" (-> this vert-ptr))
(format #t "~1Tsinks[68] @ #x~X~%" (-> this sinks))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+145
View File
@@ -0,0 +1,145 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type pos-history
(deftype pos-history (structure)
((points (inline-array vector))
(num-points int32)
(h-first int32)
(h-last int32)
)
)
;; definition for method 3 of type pos-history
(defmethod inspect ((this pos-history))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'pos-history)
(format #t "~1Tpoints: #x~X~%" (-> this points))
(format #t "~1Tnum-points: ~D~%" (-> this num-points))
(format #t "~1Th-first: ~D~%" (-> this h-first))
(format #t "~1Th-last: ~D~%" (-> this h-last))
(label cfg-4)
this
)
;; definition of type debug-vertex
(deftype debug-vertex (structure)
((trans vector4w :inline)
(normal vector3h :inline)
(st vector2h :inline)
(color uint32)
)
)
;; definition for method 3 of type debug-vertex
(defmethod inspect ((this debug-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'debug-vertex)
(format #t "~1Ttrans: ~`vector4w`P~%" (-> this trans))
(format #t "~1Tnormal: ~`vector3h`P~%" (-> this normal))
(format #t "~1Tst: ~`vector2h`P~%" (-> this st))
(format #t "~1Tcolor: #x~X~%" (-> this color))
(label cfg-4)
this
)
;; definition of type debug-vertex-stats
(deftype debug-vertex-stats (basic)
((length int32)
(pos-count int32)
(vertex debug-vertex 600 :inline)
)
)
;; definition for method 3 of type debug-vertex-stats
(defmethod inspect ((this debug-vertex-stats))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tpos-count: ~D~%" (-> this pos-count))
(format #t "~1Tvertex[600] @ #x~X~%" (-> this vertex))
(label cfg-4)
this
)
;; definition for symbol *color-black*, type rgba
(define *color-black* (new 'static 'rgba :a #x80))
;; definition for symbol *color-white*, type rgba
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
;; definition for symbol *color-gray*, type rgba
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-red*, type rgba
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
;; definition for symbol *color-green*, type rgba
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
;; definition for symbol *color-blue*, type rgba
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
;; definition for symbol *color-cyan*, type rgba
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
;; definition for symbol *color-magenta*, type rgba
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
;; definition for symbol *color-yellow*, type rgba
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
;; definition for symbol *color-light-red*, type rgba
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-light-green*, type rgba
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
;; definition for symbol *color-light-blue*, type rgba
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
;; definition for symbol *color-light-cyan*, type rgba
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
;; definition for symbol *color-light-magenta*, type rgba
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
;; definition for symbol *color-light-yellow*, type rgba
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
;; definition for symbol *color-dark-red*, type rgba
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
;; definition for symbol *color-dark-green*, type rgba
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
;; definition for symbol *color-dark-blue*, type rgba
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
;; definition for symbol *color-dark-cyan*, type rgba
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-dark-magenta*, type rgba
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
;; definition for symbol *color-dark-yellow*, type rgba
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
;; definition for symbol *color-orange*, type rgba
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
;; failed to figure out what this is:
0
+495
View File
@@ -0,0 +1,495 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type process-drawable
(deftype process-drawable (process)
"This is the main base class for in-game objects.
This handles drawing, collision, animation, navigation, particles, sounds, physics, etc.
The actual child classes will add most of the functionality, and this just serves as a common
container for references to the `-control` objects for this object."
((root trsqv)
(node-list cspace-array)
(draw draw-control)
(skel joint-control)
(nav nav-control)
(align align-control)
(path path-control)
(vol vol-control)
(fact fact-info)
(link actor-link-info)
(part sparticle-launch-control)
(water water-control)
(sound ambient-sound)
(carry carry-info)
(rbody rigid-body-control)
(state-flags state-flags)
(state-time time-frame)
)
(:methods
(process-drawable-method-14 () none)
(process-drawable-method-15 () none)
(process-drawable-method-16 () none)
(process-drawable-method-17 () none)
(process-drawable-method-18 () none)
(process-drawable-method-19 () none)
)
(:states
(process-drawable-art-error string)
process-drawable-idle
)
)
;; definition for method 3 of type process-drawable
(defmethod inspect ((this process-drawable))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process inspect)))
(t9-0 this)
)
(format #t "~2Troot: ~A~%" (-> this root))
(format #t "~2Tnode-list: ~A~%" (-> this node-list))
(format #t "~2Tdraw: ~A~%" (-> this draw))
(format #t "~2Tskel: ~A~%" (-> this skel))
(format #t "~2Tnav: ~A~%" (-> this nav))
(format #t "~2Talign: ~A~%" (-> this align))
(format #t "~2Tpath: ~A~%" (-> this path))
(format #t "~2Tvol: ~A~%" (-> this vol))
(format #t "~2Tfact: ~A~%" (-> this fact))
(format #t "~2Tlink: ~A~%" (-> this link))
(format #t "~2Tpart: ~A~%" (-> this part))
(format #t "~2Twater: ~A~%" (-> this water))
(format #t "~2Tsound: ~A~%" (-> this sound))
(format #t "~2Tcarry: ~A~%" (-> this carry))
(format #t "~2Trbody: ~A~%" (-> this rbody))
(format #t "~2Tstate-flags: ~D~%" (-> this state-flags))
(format #t "~2Tstate-time: ~D~%" (-> this state-time))
(label cfg-4)
this
)
;; definition of type process-drawable-reserved
(deftype process-drawable-reserved (process-drawable)
"A process drawable with a lot of unused method slots.
GOAL cannot increase the number of methods at runtime, so, for interactive development, it is useful
to have a type with a large number of slots which can be turned into real methods without needed to reboot the PS2."
()
(:methods
(process-drawable-reserved-method-20 () none)
(process-drawable-reserved-method-21 () none)
(process-drawable-reserved-method-22 () none)
(process-drawable-reserved-method-23 () none)
(process-drawable-reserved-method-24 () none)
(process-drawable-reserved-method-25 () none)
(process-drawable-reserved-method-26 () none)
(process-drawable-reserved-method-27 () none)
(process-drawable-reserved-method-28 () none)
(process-drawable-reserved-method-29 () none)
(process-drawable-reserved-method-30 () none)
(process-drawable-reserved-method-31 () none)
(process-drawable-reserved-method-32 () none)
(process-drawable-reserved-method-33 () none)
(process-drawable-reserved-method-34 () none)
(process-drawable-reserved-method-35 () none)
(process-drawable-reserved-method-36 () none)
(process-drawable-reserved-method-37 () none)
(process-drawable-reserved-method-38 () none)
(process-drawable-reserved-method-39 () none)
(process-drawable-reserved-method-40 () none)
(process-drawable-reserved-method-41 () none)
(process-drawable-reserved-method-42 () none)
(process-drawable-reserved-method-43 () none)
(process-drawable-reserved-method-44 () none)
(process-drawable-reserved-method-45 () none)
(process-drawable-reserved-method-46 () none)
(process-drawable-reserved-method-47 () none)
(process-drawable-reserved-method-48 () none)
(process-drawable-reserved-method-49 () none)
(process-drawable-reserved-method-50 () none)
(process-drawable-reserved-method-51 () none)
(process-drawable-reserved-method-52 () none)
(process-drawable-reserved-method-53 () none)
(process-drawable-reserved-method-54 () none)
(process-drawable-reserved-method-55 () none)
(process-drawable-reserved-method-56 () none)
(process-drawable-reserved-method-57 () none)
(process-drawable-reserved-method-58 () none)
(process-drawable-reserved-method-59 () none)
(process-drawable-reserved-method-60 () none)
(process-drawable-reserved-method-61 () none)
(process-drawable-reserved-method-62 () none)
(process-drawable-reserved-method-63 () none)
(process-drawable-reserved-method-64 () none)
(process-drawable-reserved-method-65 () none)
(process-drawable-reserved-method-66 () none)
(process-drawable-reserved-method-67 () none)
(process-drawable-reserved-method-68 () none)
(process-drawable-reserved-method-69 () none)
(process-drawable-reserved-method-70 () none)
(process-drawable-reserved-method-71 () none)
(process-drawable-reserved-method-72 () none)
(process-drawable-reserved-method-73 () none)
(process-drawable-reserved-method-74 () none)
(process-drawable-reserved-method-75 () none)
(process-drawable-reserved-method-76 () none)
(process-drawable-reserved-method-77 () none)
(process-drawable-reserved-method-78 () none)
(process-drawable-reserved-method-79 () none)
(process-drawable-reserved-method-80 () none)
(process-drawable-reserved-method-81 () none)
(process-drawable-reserved-method-82 () none)
(process-drawable-reserved-method-83 () none)
(process-drawable-reserved-method-84 () none)
(process-drawable-reserved-method-85 () none)
(process-drawable-reserved-method-86 () none)
(process-drawable-reserved-method-87 () none)
(process-drawable-reserved-method-88 () none)
(process-drawable-reserved-method-89 () none)
(process-drawable-reserved-method-90 () none)
(process-drawable-reserved-method-91 () none)
(process-drawable-reserved-method-92 () none)
(process-drawable-reserved-method-93 () none)
(process-drawable-reserved-method-94 () none)
(process-drawable-reserved-method-95 () none)
(process-drawable-reserved-method-96 () none)
(process-drawable-reserved-method-97 () none)
(process-drawable-reserved-method-98 () none)
(process-drawable-reserved-method-99 () none)
(process-drawable-reserved-method-100 () none)
(process-drawable-reserved-method-101 () none)
(process-drawable-reserved-method-102 () none)
(process-drawable-reserved-method-103 () none)
(process-drawable-reserved-method-104 () none)
(process-drawable-reserved-method-105 () none)
(process-drawable-reserved-method-106 () none)
(process-drawable-reserved-method-107 () none)
(process-drawable-reserved-method-108 () none)
(process-drawable-reserved-method-109 () none)
(process-drawable-reserved-method-110 () none)
(process-drawable-reserved-method-111 () none)
(process-drawable-reserved-method-112 () none)
(process-drawable-reserved-method-113 () none)
(process-drawable-reserved-method-114 () none)
(process-drawable-reserved-method-115 () none)
(process-drawable-reserved-method-116 () none)
(process-drawable-reserved-method-117 () none)
(process-drawable-reserved-method-118 () none)
(process-drawable-reserved-method-119 () none)
(process-drawable-reserved-method-120 () none)
(process-drawable-reserved-method-121 () none)
(process-drawable-reserved-method-122 () none)
(process-drawable-reserved-method-123 () none)
(process-drawable-reserved-method-124 () none)
(process-drawable-reserved-method-125 () none)
(process-drawable-reserved-method-126 () none)
(process-drawable-reserved-method-127 () none)
(process-drawable-reserved-method-128 () none)
(process-drawable-reserved-method-129 () none)
(process-drawable-reserved-method-130 () none)
(process-drawable-reserved-method-131 () none)
(process-drawable-reserved-method-132 () none)
(process-drawable-reserved-method-133 () none)
(process-drawable-reserved-method-134 () none)
(process-drawable-reserved-method-135 () none)
(process-drawable-reserved-method-136 () none)
(process-drawable-reserved-method-137 () none)
(process-drawable-reserved-method-138 () none)
(process-drawable-reserved-method-139 () none)
(process-drawable-reserved-method-140 () none)
(process-drawable-reserved-method-141 () none)
(process-drawable-reserved-method-142 () none)
(process-drawable-reserved-method-143 () none)
(process-drawable-reserved-method-144 () none)
(process-drawable-reserved-method-145 () none)
(process-drawable-reserved-method-146 () none)
(process-drawable-reserved-method-147 () none)
(process-drawable-reserved-method-148 () none)
(process-drawable-reserved-method-149 () none)
(process-drawable-reserved-method-150 () none)
(process-drawable-reserved-method-151 () none)
(process-drawable-reserved-method-152 () none)
(process-drawable-reserved-method-153 () none)
(process-drawable-reserved-method-154 () none)
(process-drawable-reserved-method-155 () none)
(process-drawable-reserved-method-156 () none)
(process-drawable-reserved-method-157 () none)
(process-drawable-reserved-method-158 () none)
(process-drawable-reserved-method-159 () none)
(process-drawable-reserved-method-160 () none)
(process-drawable-reserved-method-161 () none)
(process-drawable-reserved-method-162 () none)
(process-drawable-reserved-method-163 () none)
(process-drawable-reserved-method-164 () none)
(process-drawable-reserved-method-165 () none)
(process-drawable-reserved-method-166 () none)
(process-drawable-reserved-method-167 () none)
(process-drawable-reserved-method-168 () none)
(process-drawable-reserved-method-169 () none)
(process-drawable-reserved-method-170 () none)
(process-drawable-reserved-method-171 () none)
(process-drawable-reserved-method-172 () none)
(process-drawable-reserved-method-173 () none)
(process-drawable-reserved-method-174 () none)
(process-drawable-reserved-method-175 () none)
(process-drawable-reserved-method-176 () none)
(process-drawable-reserved-method-177 () none)
(process-drawable-reserved-method-178 () none)
(process-drawable-reserved-method-179 () none)
(process-drawable-reserved-method-180 () none)
(process-drawable-reserved-method-181 () none)
(process-drawable-reserved-method-182 () none)
(process-drawable-reserved-method-183 () none)
(process-drawable-reserved-method-184 () none)
(process-drawable-reserved-method-185 () none)
(process-drawable-reserved-method-186 () none)
(process-drawable-reserved-method-187 () none)
(process-drawable-reserved-method-188 () none)
(process-drawable-reserved-method-189 () none)
(process-drawable-reserved-method-190 () none)
(process-drawable-reserved-method-191 () none)
(process-drawable-reserved-method-192 () none)
(process-drawable-reserved-method-193 () none)
(process-drawable-reserved-method-194 () none)
(process-drawable-reserved-method-195 () none)
(process-drawable-reserved-method-196 () none)
(process-drawable-reserved-method-197 () none)
(process-drawable-reserved-method-198 () none)
(process-drawable-reserved-method-199 () none)
(process-drawable-reserved-method-200 () none)
(process-drawable-reserved-method-201 () none)
(process-drawable-reserved-method-202 () none)
(process-drawable-reserved-method-203 () none)
(process-drawable-reserved-method-204 () none)
(process-drawable-reserved-method-205 () none)
(process-drawable-reserved-method-206 () none)
(process-drawable-reserved-method-207 () none)
(process-drawable-reserved-method-208 () none)
(process-drawable-reserved-method-209 () none)
(process-drawable-reserved-method-210 () none)
(process-drawable-reserved-method-211 () none)
(process-drawable-reserved-method-212 () none)
(process-drawable-reserved-method-213 () none)
(process-drawable-reserved-method-214 () none)
(process-drawable-reserved-method-215 () none)
(process-drawable-reserved-method-216 () none)
(process-drawable-reserved-method-217 () none)
)
)
;; definition for method 3 of type process-drawable-reserved
(defmethod inspect ((this process-drawable-reserved))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition of type attack-dir-info
(deftype attack-dir-info (structure)
((dir vector :inline)
(xz-dir vector :inline)
(attacker-velocity vector :inline)
(pos vector :inline)
)
)
;; definition for method 3 of type attack-dir-info
(defmethod inspect ((this attack-dir-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'attack-dir-info)
(format #t "~1Tdir: #<vector @ #x~X>~%" (-> this dir))
(format #t "~1Txz-dir: #<vector @ #x~X>~%" (-> this xz-dir))
(format #t "~1Tattacker-velocity: #<vector @ #x~X>~%" (-> this attacker-velocity))
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
(label cfg-4)
this
)
;; definition of type attack-info
(deftype attack-info (structure)
((trans vector :inline)
(vector vector :inline)
(attacker-velocity vector :inline)
(intersection vector :inline)
(attacker handle)
(attack-time time-frame)
(invinc-time time-frame)
(mask attack-mask)
(mode symbol)
(shove-back meters)
(shove-up meters)
(speed meters)
(dist meters)
(control float)
(angle symbol)
(rotate-to degrees)
(prev-state state)
(id uint32)
(count uint32)
(penetrate-using penetrate)
(damage float)
(shield-damage float)
(vehicle-damage-factor float)
(vehicle-impulse-factor float)
(knock knocked-type)
(test symbol)
)
(:methods
(attack-info-method-9 () none)
(attack-info-method-10 () none)
(attack-info-method-11 () none)
)
)
;; definition for method 3 of type attack-info
(defmethod inspect ((this attack-info))
(when (not this)
(set! this this)
(goto cfg-54)
)
(format #t "[~8x] ~A~%" this 'attack-info)
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(format #t "~1Tvector: ~`vector`P~%" (-> this vector))
(format #t "~1Tattacker-velocity: ~`vector`P~%" (-> this attacker-velocity))
(format #t "~1Tintersection: ~`vector`P~%" (-> this intersection))
(format #t "~1Tattacker: ~`handle`P~%" (-> this attacker))
(format #t "~1Tattack-time: ~D~%" (-> this attack-time))
(format #t "~1Tinvinc-time: ~D~%" (-> this invinc-time))
(format #t "~1Tmask: #x~X : (attack-info-mask " (-> this mask))
(let ((s5-0 (-> this mask)))
(if (= (logand s5-0 (attack-mask vector)) (attack-mask vector))
(format #t "vector ")
)
(if (= (logand s5-0 (attack-mask angle)) (attack-mask angle))
(format #t "angle ")
)
(if (= (logand (attack-mask test) s5-0) (attack-mask test))
(format #t "test ")
)
(if (= (logand s5-0 (attack-mask invinc-time)) (attack-mask invinc-time))
(format #t "invinc-time ")
)
(if (= (logand s5-0 (attack-mask attacker)) (attack-mask attacker))
(format #t "attacker ")
)
(if (= (logand s5-0 (attack-mask dist)) (attack-mask dist))
(format #t "dist ")
)
(if (= (logand s5-0 (attack-mask intersection)) (attack-mask intersection))
(format #t "intersection ")
)
(if (= (logand s5-0 (attack-mask shove-back)) (attack-mask shove-back))
(format #t "shove-back ")
)
(if (= (logand s5-0 (attack-mask shove-up)) (attack-mask shove-up))
(format #t "shove-up ")
)
(if (= (logand s5-0 (attack-mask mode)) (attack-mask mode))
(format #t "mode ")
)
(if (= (logand (attack-mask count) s5-0) (attack-mask count))
(format #t "count ")
)
(if (= (logand s5-0 (attack-mask rotate-to)) (attack-mask rotate-to))
(format #t "rotate-to ")
)
(if (= (logand s5-0 (attack-mask speed)) (attack-mask speed))
(format #t "speed ")
)
(if (= (logand s5-0 (attack-mask attack-time)) (attack-mask attack-time))
(format #t "attack-time ")
)
(if (= (logand (attack-mask vehicle-damage-factor) s5-0) (attack-mask vehicle-damage-factor))
(format #t "vehicle-damage-factor ")
)
(if (= (logand (attack-mask damage) s5-0) (attack-mask damage))
(format #t "damage ")
)
(if (= (logand s5-0 (attack-mask control)) (attack-mask control))
(format #t "control ")
)
(if (= (logand s5-0 (attack-mask trans)) (attack-mask trans))
(format #t "trans ")
)
(if (= (logand (attack-mask penetrate-using) s5-0) (attack-mask penetrate-using))
(format #t "penetrate-using ")
)
(if (= (logand (attack-mask vehicle-impulse-factor) s5-0) (attack-mask vehicle-impulse-factor))
(format #t "vehicle-impulse-factor ")
)
(if (= (logand (attack-mask attacker-velocity) s5-0) (attack-mask attacker-velocity))
(format #t "attacker-velocity ")
)
(if (= (logand s5-0 (attack-mask id)) (attack-mask id))
(format #t "id ")
)
(if (= (logand s5-0 (attack-mask prev-state)) (attack-mask prev-state))
(format #t "prev-state ")
)
(if (= (logand (attack-mask knock) s5-0) (attack-mask knock))
(format #t "knock ")
)
(if (= (logand (attack-mask shield-damage) s5-0) (attack-mask shield-damage))
(format #t "shield-damage ")
)
)
(format #t ")~%")
(format #t "~1Tmode: ~A~%" (-> this mode))
(format #t "~1Tshove-back: (meters ~m)~%" (-> this shove-back))
(format #t "~1Tshove-up: (meters ~m)~%" (-> this shove-up))
(format #t "~1Tspeed: (meters ~m)~%" (-> this speed))
(format #t "~1Tdist: (meters ~m)~%" (-> this dist))
(format #t "~1Tcontrol: ~f~%" (-> this control))
(format #t "~1Tangle: ~A~%" (-> this angle))
(format #t "~1Trotate-to: (deg ~r)~%" (-> this rotate-to))
(format #t "~1Tprev-state: ~A~%" (-> this prev-state))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tcount: ~D~%" (-> this count))
(format #t "~1Tpenetrate-using: ~D~%" (-> this penetrate-using))
(format #t "~1Tdamage: ~f~%" (-> this damage))
(format #t "~1Tshield-damage: ~f~%" (-> this shield-damage))
(format #t "~1Tvehicle-damage-factor: ~f~%" (-> this vehicle-damage-factor))
(format #t "~1Tvehicle-impulse-factor: ~f~%" (-> this vehicle-impulse-factor))
(format #t "~1Tknock: ~D~%" (-> this knock))
(format #t "~1Ttest: ~A~%" (-> this test))
(label cfg-54)
this
)
;; definition of type ground-tween-info
(deftype ground-tween-info (structure)
((chan uint8 3)
(blend float 3)
(group uint32 5)
)
)
;; definition for method 3 of type ground-tween-info
(defmethod inspect ((this ground-tween-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'ground-tween-info)
(format #t "~1Tchan[3] @ #x~X~%" (-> this chan))
(format #t "~1Tblend[3] @ #x~X~%" (-> this blend))
(format #t "~1Tgroup[5] @ #x~X~%" (-> this group))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+271
View File
@@ -0,0 +1,271 @@
;;-*-Lisp-*-
(in-package goal)
;; definition (debug) for function penetrate->string
;; WARN: Return type mismatch object vs string.
(defun-debug penetrate->string ((arg0 penetrate))
(if (= (logand (penetrate jak-red-shockwave) arg0) (shl 4 32))
(format #t "jak-red-shockwave ")
)
(if (= (logand arg0 (penetrate mech-bonk)) (penetrate mech-bonk))
(format #t "mech-bonk ")
)
(if (= (logand (penetrate eco-blue) arg0) (shl #x8000 16))
(format #t "eco-blue ")
)
(if (= (logand (penetrate explode) arg0) (penetrate explode))
(format #t "explode ")
)
(if (= (logand arg0 (penetrate bonk)) (penetrate bonk))
(format #t "bonk ")
)
(if (= (logand (penetrate eco-red) arg0) (penetrate eco-red))
(format #t "eco-red ")
)
(if (= (logand arg0 (penetrate roll)) (penetrate roll))
(format #t "roll ")
)
(if (= (logand arg0 (penetrate mech)) (penetrate mech))
(format #t "mech ")
)
(if (= (logand arg0 (penetrate flut-attack)) (penetrate flut-attack))
(format #t "flut-attack ")
)
(if (= (logand arg0 (penetrate mech-punch)) (penetrate mech-punch))
(format #t "mech-punch ")
)
(if (= (logand (penetrate jak-dark-shot) arg0) (penetrate jak-dark-shot))
(format #t "jak-dark-shot ")
)
(if (= (logand (penetrate dark-smack) arg0) (penetrate dark-smack))
(format #t "dark-smack ")
)
(if (= (logand arg0 (penetrate flop)) (penetrate flop))
(format #t "flop ")
)
(if (= (logand arg0 (penetrate spin)) (penetrate spin))
(format #t "spin ")
)
(if (= (logand (penetrate dark-bomb) arg0) (penetrate dark-bomb))
(format #t "dark-bomb ")
)
(if (= (logand arg0 (penetrate vehicle)) (penetrate vehicle))
(format #t "vehicle ")
)
(if (= (logand arg0 (penetrate generic-attack)) (penetrate generic-attack))
(format #t "generic-attack ")
)
(if (= (logand arg0 (penetrate touch)) (penetrate touch))
(format #t "touch ")
)
(if (= (logand (penetrate eco-green) arg0) (shl 1 32))
(format #t "eco-green ")
)
(if (= (logand (penetrate jak-red-shot) arg0) (penetrate jak-red-shot))
(format #t "jak-red-shot ")
)
(if (= (logand arg0 (penetrate lunge)) (penetrate lunge))
(format #t "lunge ")
)
(if (= (logand arg0 (penetrate punch)) (penetrate punch))
(format #t "punch ")
)
(if (= (logand arg0 (penetrate tube)) (penetrate tube))
(format #t "tube ")
)
(if (= (logand (penetrate jak-dark-nuke) arg0) (shl 8 32))
(format #t "jak-dark-nuke ")
)
(if (= (logand (penetrate enemy-yellow-shot) arg0) (penetrate enemy-yellow-shot))
(format #t "enemy-yellow-shot ")
)
(if (= (logand (penetrate knocked) arg0) (shl 2 32))
(format #t "knocked ")
)
(if (= (logand (penetrate emp-blast) arg0) (shl 32 32))
(format #t "emp-blast ")
)
(if (= (logand arg0 (penetrate uppercut)) (penetrate uppercut))
(format #t "uppercut ")
)
(if (= (logand (penetrate dark-punch) arg0) (penetrate dark-punch))
(format #t "dark-punch ")
)
(if (= (logand (penetrate shield) arg0) (penetrate shield))
(format #t "shield ")
)
(if (= (logand (penetrate jak-yellow-shot) arg0) (penetrate jak-yellow-shot))
(format #t "jak-yellow-shot ")
)
(if (= (logand arg0 (penetrate board)) (penetrate board))
(format #t "board ")
)
(if (= (logand (penetrate flut) arg0) (penetrate flut))
(format #t "flut ")
)
(if (= (logand (penetrate eco-yellow) arg0) (penetrate eco-yellow))
(format #t "eco-yellow ")
)
(if (= (logand (penetrate dark-skin) arg0) (penetrate dark-skin))
(format #t "dark-skin ")
)
(if (= (logand (penetrate jak-dark-blackhole) arg0) (shl 16 32))
(format #t "jak-dark-blackhole ")
)
(if (= (logand (penetrate enemy-dark-shot) arg0) (penetrate enemy-dark-shot))
(format #t "enemy-dark-shot ")
)
(the-as string (if (= (logand (penetrate jak-blue-shot) arg0) (penetrate jak-blue-shot))
(format #t "jak-blue-shot ")
)
)
)
;; definition for function penetrate-using->damage
(defun penetrate-using->damage ((arg0 penetrate))
(cond
((logtest? (penetrate dark-bomb dark-smack flut) arg0)
15.0
)
((logtest? arg0 (penetrate mech-punch mech-bonk))
5.0
)
((logtest? (penetrate) arg0)
4.0
)
((logtest? (penetrate punch spin jak-dark-shot enemy-dark-shot) arg0)
3.0
)
((logtest? (penetrate
flop
uppercut
tube
flut-attack
dark-punch
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
enemy-yellow-shot
eco-yellow
)
arg0
)
2.0
)
((logtest? arg0 (penetrate generic-attack roll bonk board))
1.0
)
(else
0.0
)
)
)
;; definition for function penetrated-by-all&hit-points->penetrated-by
;; WARN: Return type mismatch uint vs penetrate.
(defun penetrated-by-all&hit-points->penetrated-by ((arg0 penetrate) (arg1 int))
(let ((a0-1 arg1))
(the-as penetrate (logior (logclear arg0 (penetrate
generic-attack
flop
punch
spin
roll
uppercut
bonk
tube
flut-attack
board
mech-punch
mech-bonk
dark-skin
dark-punch
dark-bomb
dark-smack
flut
shield
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
jak-dark-shot
enemy-yellow-shot
enemy-dark-shot
eco-yellow
knocked
)
)
(cond
((or (zero? a0-1) (= a0-1 1))
(the-as int (the-as uint #x23fffdbfa))
)
((= a0-1 2)
#x3fdecab8
)
((= a0-1 3)
#x141cc030
)
((= a0-1 4)
#x1cc000
)
((= a0-1 5)
#x1cc000
)
((or (= a0-1 6)
(= a0-1 7)
(= a0-1 8)
(= a0-1 9)
(= a0-1 10)
(= a0-1 11)
(= a0-1 12)
(= a0-1 13)
(= a0-1 14)
(= a0-1 15)
)
#x1c0000
)
(else
0
)
)
)
)
)
)
;; definition for function pu->knocked-type
;; WARN: Return type mismatch int vs knocked-type.
(defun pu->knocked-type ((arg0 penetrate))
(the-as knocked-type (cond
((logtest? arg0 (penetrate vehicle))
7
)
((logtest? (penetrate jak-blue-shot) arg0)
6
)
((logtest? (penetrate jak-yellow-shot enemy-yellow-shot) arg0)
4
)
((logtest? (penetrate jak-red-shot) arg0)
5
)
((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0)
2
)
((logtest? (penetrate dark-bomb dark-smack) arg0)
3
)
((logtest? arg0 (penetrate mech-punch))
1
)
(else
0
)
)
)
)
+213
View File
@@ -0,0 +1,213 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type bone-buffer
(deftype bone-buffer (structure)
((joint matrix 16 :inline)
(bone bone 16 :inline)
(output pris-mtx 16 :inline)
)
)
;; definition for method 3 of type bone-buffer
(defmethod inspect ((this bone-buffer))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-buffer)
(format #t "~1Tjoint[16] @ #x~X~%" (-> this joint))
(format #t "~1Tbone[16] @ #x~X~%" (-> this bone))
(format #t "~1Toutput[16] @ #x~X~%" (-> this output))
(label cfg-4)
this
)
;; definition of type bone-layout
(deftype bone-layout (structure)
((data uint16 8)
(joint (inline-array matrix) 2 :overlay-at (-> data 0))
(bone (inline-array bone) 2 :overlay-at (-> data 4))
(output (inline-array pris-mtx) 2 :offset 16)
(unused uint32 2 :offset 24)
)
)
;; definition for method 3 of type bone-layout
(defmethod inspect ((this bone-layout))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-layout)
(format #t "~1Tdata[8] @ #x~X~%" (-> this data))
(format #t "~1Tjoint[2] @ #x~X~%" (-> this data))
(format #t "~1Tbone[2] @ #x~X~%" (-> this bone))
(format #t "~1Toutput[2] @ #x~X~%" (-> this output))
(format #t "~1Tunused[2] @ #x~X~%" (-> this unused))
(label cfg-4)
this
)
;; definition of type bone-regs
(deftype bone-regs (structure)
((dma-buf dma-buffer)
(wait-count uint32)
(in-count uint32)
(sp-size uint32)
(sp-bufnum uint32)
(joint-ptr (inline-array joint))
(bone-ptr (inline-array bone))
(num-bones uint32)
(mtxs (inline-array pris-mtx))
)
)
;; definition for method 3 of type bone-regs
(defmethod inspect ((this bone-regs))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-regs)
(format #t "~1Tdma-buf: ~A~%" (-> this dma-buf))
(format #t "~1Twait-count: ~D~%" (-> this wait-count))
(format #t "~1Tin-count: ~D~%" (-> this in-count))
(format #t "~1Tsp-size: ~D~%" (-> this sp-size))
(format #t "~1Tsp-bufnum: ~D~%" (-> this sp-bufnum))
(format #t "~1Tjoint-ptr: #x~X~%" (-> this joint-ptr))
(format #t "~1Tbone-ptr: #x~X~%" (-> this bone-ptr))
(format #t "~1Tnum-bones: ~D~%" (-> this num-bones))
(format #t "~1Tmtxs: #x~X~%" (-> this mtxs))
(label cfg-4)
this
)
;; definition of type bone-work
(deftype bone-work (structure)
((layout bone-layout :inline)
(regs bone-regs :inline)
)
)
;; definition for method 3 of type bone-work
(defmethod inspect ((this bone-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-work)
(format #t "~1Tlayout: #<bone-layout @ #x~X>~%" (-> this layout))
(format #t "~1Tregs: #<bone-regs @ #x~X>~%" (-> this regs))
(label cfg-4)
this
)
;; definition of type bone-debug
(deftype bone-debug (structure)
((time-ctr uint32)
(timing uint32 360)
)
)
;; definition for method 3 of type bone-debug
(defmethod inspect ((this bone-debug))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-debug)
(format #t "~1Ttime-ctr: ~D~%" (-> this time-ctr))
(format #t "~1Ttiming[360] @ #x~X~%" (-> this timing))
(label cfg-4)
this
)
;; definition of type bone-memory
(deftype bone-memory (structure)
((work bone-work :inline)
(buffer bone-buffer 2 :inline)
)
)
;; definition for method 3 of type bone-memory
(defmethod inspect ((this bone-memory))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-memory)
(format #t "~1Twork: #<bone-work @ #x~X>~%" (-> this work))
(format #t "~1Tbuffer[2] @ #x~X~%" (-> this buffer))
(label cfg-4)
this
)
;; definition of type bone-calculation
(deftype bone-calculation (structure)
((flags bone-calc-flags)
(num-bones uint16)
(matrix-area (inline-array pris-mtx))
(joints (inline-array joint))
(bones (inline-array bone))
(ripple-scale float)
(ripple-y-scale float)
(ripple-normal-scale float)
(ripple-area (inline-array vector))
(next bone-calculation)
(dummy-1 uint32)
(dummy-2 uint32)
(dummy-3 uint32)
)
)
;; definition for method 3 of type bone-calculation
(defmethod inspect ((this bone-calculation))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-calculation)
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tnum-bones: ~D~%" (-> this num-bones))
(format #t "~1Tmatrix-area: #x~X~%" (-> this matrix-area))
(format #t "~1Tjoints: #x~X~%" (-> this joints))
(format #t "~1Tbones: #x~X~%" (-> this bones))
(format #t "~1Tripple-scale: ~f~%" (-> this ripple-scale))
(format #t "~1Tripple-y-scale: ~f~%" (-> this ripple-y-scale))
(format #t "~1Tripple-normal-scale: ~f~%" (-> this ripple-normal-scale))
(format #t "~1Tripple-area: #x~X~%" (-> this ripple-area))
(format #t "~1Tnext: #<bone-calculation @ #x~X>~%" (-> this next))
(format #t "~1Tdummy-1: ~D~%" (-> this dummy-1))
(format #t "~1Tdummy-2: ~D~%" (-> this dummy-2))
(format #t "~1Tdummy-3: ~D~%" (-> this dummy-3))
(label cfg-4)
this
)
;; definition of type bone-calculation-list
(deftype bone-calculation-list (structure)
((first bone-calculation)
(next bone-calculation)
)
)
;; definition for method 3 of type bone-calculation-list
(defmethod inspect ((this bone-calculation-list))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-calculation-list)
(format #t "~1Tfirst: #<bone-calculation @ #x~X>~%" (-> this first))
(format #t "~1Tnext: #<bone-calculation @ #x~X>~%" (-> this next))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
@@ -0,0 +1,344 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type mercneric-chain
(deftype mercneric-chain (structure)
"A DMA chain for drawing with mercneric, and metadata needed to append.
This chain is assumed to run with a specific tpage from a specific level available."
((first uint32)
(next uint32)
(state generic-bucket-state :inline)
(vu1-bucket bucket-id)
)
:pack-me
)
;; definition for method 3 of type mercneric-chain
(defmethod inspect ((this mercneric-chain))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'mercneric-chain)
(format #t "~1Tfirst: #x~X~%" (-> this first))
(format #t "~1Tnext: #x~X~%" (-> this next))
(format #t "~1Tstate: #<generic-bucket-state @ #x~X>~%" (-> this state))
(format #t "~1Tvu1-bucket: ~D~%" (-> this vu1-bucket))
(label cfg-4)
this
)
;; definition of type merc-chain
(deftype merc-chain (structure)
"A DMA chain for drawing with merc.
This chain is assumed to run with a specific tpage from a specific level available."
((first dma-packet)
(patch dma-packet)
(vu1-bucket bucket-id)
)
:pack-me
)
;; definition for method 3 of type merc-chain
(defmethod inspect ((this merc-chain))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'merc-chain)
(format #t "~1Tfirst: #<dma-packet @ #x~X>~%" (-> this first))
(format #t "~1Tpatch: #<dma-packet @ #x~X>~%" (-> this patch))
(format #t "~1Tvu1-bucket: ~D~%" (-> this vu1-bucket))
(label cfg-4)
this
)
;; definition of type foreground-bucket
(deftype foreground-bucket (structure)
"A foreground bucket is merc, emerc, and mercneric chain for a given texture mode."
((merc merc-chain :inline)
(emerc merc-chain :inline)
(mercneric mercneric-chain :inline)
)
)
;; definition for method 3 of type foreground-bucket
(defmethod inspect ((this foreground-bucket))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-bucket)
(format #t "~1Tmerc: #<merc-chain @ #x~X>~%" (-> this merc))
(format #t "~1Temerc: #<merc-chain @ #x~X>~%" (-> this emerc))
(format #t "~1Tmercneric: #<mercneric-chain @ #x~X>~%" (-> this mercneric))
(label cfg-4)
this
)
;; definition of type foreground-level-buckets
(deftype foreground-level-buckets (structure)
"Collection of buckets for a single level.
Each bucket has a different texture. The order is:
tfrag, pris, shrub, alpha, water, pris, pris2"
((data foreground-bucket 7 :inline)
)
)
;; definition for method 3 of type foreground-level-buckets
(defmethod inspect ((this foreground-level-buckets))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-level-buckets)
(format #t "~1Tdata[7] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type foreground-bucket-grid
(deftype foreground-bucket-grid (structure)
"Array of buckets for each level, plus the single warp chain shared between everybody."
((level-buckets foreground-level-buckets 11 :inline)
(warp-chain mercneric-chain :inline)
)
)
;; definition for method 3 of type foreground-bucket-grid
(defmethod inspect ((this foreground-bucket-grid))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-bucket-grid)
(format #t "~1Tlevel-buckets[11] @ #x~X~%" (-> this level-buckets))
(format #t "~1Twarp-chain: #<mercneric-chain @ #x~X>~%" (-> this warp-chain))
(label cfg-4)
this
)
;; definition of type foreground-regs
(deftype foreground-regs (structure)
"Frequently accessed foreground values. These are in scratchpad for fast access
during foreground processing."
((dist float)
(merc-used uint32)
(emerc-used uint32)
(mercneric-used uint32)
(use-isometric uint32)
(base-start dma-packet)
(joint-ptr (inline-array joint))
(bone-ptr (inline-array bone))
(num-bones uint32)
(mtxs (inline-array pris-mtx))
(dma-buf dma-buffer)
(default-texture-index uint32)
(mercneric-chain mercneric-chain)
(level-buckets foreground-level-buckets)
)
)
;; definition for method 3 of type foreground-regs
(defmethod inspect ((this foreground-regs))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-regs)
(format #t "~1Tdist: ~f~%" (-> this dist))
(format #t "~1Tmerc-used: ~D~%" (-> this merc-used))
(format #t "~1Temerc-used: ~D~%" (-> this emerc-used))
(format #t "~1Tmercneric-used: ~D~%" (-> this mercneric-used))
(format #t "~1Tuse-isometric: ~D~%" (-> this use-isometric))
(format #t "~1Tbase-start: #<dma-packet @ #x~X>~%" (-> this base-start))
(format #t "~1Tjoint-ptr: #x~X~%" (-> this joint-ptr))
(format #t "~1Tbone-ptr: #x~X~%" (-> this bone-ptr))
(format #t "~1Tnum-bones: ~D~%" (-> this num-bones))
(format #t "~1Tmtxs: #x~X~%" (-> this mtxs))
(format #t "~1Tdma-buf: ~A~%" (-> this dma-buf))
(format #t "~1Tdefault-texture-index: ~D~%" (-> this default-texture-index))
(format #t "~1Tmercneric-chain: #<mercneric-chain @ #x~X>~%" (-> this mercneric-chain))
(format #t "~1Tlevel-buckets: #<foreground-level-buckets @ #x~X>~%" (-> this level-buckets))
(label cfg-4)
this
)
;; definition of type foreground-work
(deftype foreground-work (structure)
"Memory map for scratchpad during foreground processing.
This is not used by the renderers, bone matrix, or joint code - just the code
that assigns stuff to buckets and prepares DMA for merc (or requests for generic merc)."
((regs foreground-regs :inline)
(draw-index-map uint8 11 :offset 64)
(grid foreground-bucket-grid :inline)
(bounds sphere :inline)
(lights vu-lights :inline)
(distance vector :inline)
(next-tmpl dma-packet :inline)
)
)
;; definition for method 3 of type foreground-work
(defmethod inspect ((this foreground-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-work)
(format #t "~1Tregs: #<foreground-regs @ #x~X>~%" (-> this regs))
(format #t "~1Tdraw-index-map[11] @ #x~X~%" (-> this draw-index-map))
(format #t "~1Tgrid: #<foreground-bucket-grid @ #x~X>~%" (-> this grid))
(format #t "~1Tbounds: #<sphere @ #x~X>~%" (-> this bounds))
(format #t "~1Tlights: #<vu-lights @ #x~X>~%" (-> this lights))
(format #t "~1Tdistance: #<vector @ #x~X>~%" (-> this distance))
(format #t "~1Tnext-tmpl: #<dma-packet @ #x~X>~%" (-> this next-tmpl))
(label cfg-4)
this
)
;; definition for function invalidate-cache-line
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 0]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 1]
(defun invalidate-cache-line ((arg0 pointer))
(.sync.l)
(.cache dxwbin arg0 0)
(.sync.l)
(.cache dxwbin arg0 1)
(.sync.l)
0
)
;; definition of type texscroll-globals
(deftype texscroll-globals (structure)
"List of all merc-effects that need texscroll applied."
((requests int32)
(effects merc-effect 32)
)
)
;; definition for method 3 of type texscroll-globals
(defmethod inspect ((this texscroll-globals))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'texscroll-globals)
(format #t "~1Trequests: ~D~%" (-> this requests))
(format #t "~1Teffects[32] @ #x~X~%" (-> this effects))
(label cfg-4)
this
)
;; definition of type merc-effect-bucket-info
(deftype merc-effect-bucket-info (structure)
"Scratch info computed per-merc-effect by the foreground code, then later read by merc
DMA generation. This is only for the currently-processing merc model's effects."
((color-fade rgba)
(merc-path uint8)
(ignore-alpha uint8)
(disable-draw uint8)
(disable-envmap uint8)
)
:pack-me
)
;; definition for method 3 of type merc-effect-bucket-info
(defmethod inspect ((this merc-effect-bucket-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'merc-effect-bucket-info)
(format #t "~1Tcolor-fade: ~D~%" (-> this color-fade))
(format #t "~1Tmerc-path: ~D~%" (-> this merc-path))
(format #t "~1Tignore-alpha: ~D~%" (-> this ignore-alpha))
(format #t "~1Tdisable-draw: ~D~%" (-> this disable-draw))
(format #t "~1Tdisable-envmap: ~D~%" (-> this disable-envmap))
(label cfg-4)
this
)
;; definition of type merc-bucket-info
(deftype merc-bucket-info (structure)
"Scratch info for the current merc-ctrl. Written by the foreground code, read by merc DMA generation."
((light vu-lights :inline)
(needs-clip int32)
(need-mercprime-if-merc int32)
(must-use-mercneric-for-clip int32)
(effect merc-effect-bucket-info 64 :inline)
)
)
;; definition for method 3 of type merc-bucket-info
(defmethod inspect ((this merc-bucket-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'merc-bucket-info)
(format #t "~1Tlight: #<vu-lights @ #x~X>~%" (-> this light))
(format #t "~1Tneeds-clip: ~D~%" (-> this needs-clip))
(format #t "~1Tneed-mercprime-if-merc: ~D~%" (-> this need-mercprime-if-merc))
(format #t "~1Tmust-use-mercneric-for-clip: ~D~%" (-> this must-use-mercneric-for-clip))
(format #t "~1Teffect[64] @ #x~X~%" (-> this effect))
(label cfg-4)
this
)
;; definition of type foreground-globals
(deftype foreground-globals (structure)
"The foreground renderer state: all DMA chains, settings for the current merc-ctrl, texscroll list."
((foreground-grid foreground-bucket-grid :inline)
(merc-bucket-info merc-bucket-info :inline)
(texscroll texscroll-globals :inline)
)
)
;; definition for method 3 of type foreground-globals
(defmethod inspect ((this foreground-globals))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'foreground-globals)
(format #t "~1Tforeground-grid: #<foreground-bucket-grid @ #x~X>~%" (-> this foreground-grid))
(format #t "~1Tmerc-bucket-info: #<merc-bucket-info @ #x~X>~%" (-> this merc-bucket-info))
(format #t "~1Ttexscroll: #<texscroll-globals @ #x~X>~%" (-> this texscroll))
(label cfg-4)
this
)
;; definition of type shadow-dma-packet
(deftype shadow-dma-packet (structure)
"DMA tag for submitting shadow data."
((tag generic-merc-tag :inline)
(settings shadow-settings :inline)
(geo-ref dma-packet :inline)
(mtx-ref dma-packet :inline)
(end-tag dma-packet :inline)
)
)
;; definition for method 3 of type shadow-dma-packet
(defmethod inspect ((this shadow-dma-packet))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'shadow-dma-packet)
(format #t "~1Ttag: #<generic-merc-tag @ #x~X>~%" (-> this tag))
(format #t "~1Tsettings: #<shadow-settings @ #x~X>~%" (-> this settings))
(format #t "~1Tgeo-ref: #<dma-packet @ #x~X>~%" (-> this geo-ref))
(format #t "~1Tmtx-ref: #<dma-packet @ #x~X>~%" (-> this mtx-ref))
(format #t "~1Tend-tag: #<dma-packet @ #x~X>~%" (-> this end-tag))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+3 -1
View File
@@ -2,6 +2,7 @@
(in-package goal)
;; definition for method 3 of type matrix
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect ((this matrix))
(format #t "[~8x] matrix~%" this)
(format #t "~T[~F] [~F] [~F] [~F]~%" (-> this rvec x) (-> this rvec y) (-> this rvec z) (-> this rvec w))
@@ -12,6 +13,7 @@
)
;; definition for method 3 of type matrix3
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect ((this matrix3))
(format #t "[~8x] matrix3~%" this)
(format #t "~T[~F] [~F] [~F]~%" (-> this vector 0 x) (-> this vector 0 y) (-> this vector 0 z))
@@ -1842,7 +1844,7 @@
(vector-normalize! (-> s4-0 fvec) 1.0)
(vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec))
(vector-cross! (-> s4-0 uvec) (-> s4-0 fvec) (-> s4-0 rvec))
(matrix->quaternion (the-as quaternion (-> arg0 rot)) s4-0)
(matrix->quaternion (-> arg0 quat) s4-0)
)
(set-vector!
(-> arg0 scale)
+2 -2
View File
@@ -15,9 +15,9 @@
)
(format #t "[~8x] ~A~%" this 'transformq)
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(format #t "~1Trot: ~`vector`P~%" (-> this rot))
(format #t "~1Trot: ~`vector`P~%" (-> this quat))
(format #t "~1Tscale: ~`vector`P~%" (-> this scale))
(format #t "~1Tquat: #<quaternion @ #x~X>~%" (-> this rot))
(format #t "~1Tquat: #<quaternion @ #x~X>~%" (-> this quat))
(label cfg-4)
this
)
+229
View File
@@ -0,0 +1,229 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type scene-actor
(deftype scene-actor (basic)
((name string)
(level symbol)
(art-group string)
(prefix string)
(draw-frames pair)
(scissor-frames pair)
(shadow-frames basic)
(cloth-reset-frames basic)
(cloth-commands basic)
(camera int16)
(light-index uint8)
(shadow-mask uint8)
(shadow-values uint32)
(flags uint32)
(command-list basic)
(shadow-flags int32)
(shadow-volume-joint basic)
(draw-seg uint64)
(no-draw-seg uint64)
(last-frame float)
(process uint64)
)
(:methods
(scene-actor-method-9 () none)
)
)
;; definition for method 3 of type scene-actor
(defmethod inspect ((this scene-actor))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Tart-group: ~A~%" (-> this art-group))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tdraw-frames: ~A~%" (-> this draw-frames))
(format #t "~1Tscissor-frames: ~A~%" (-> this scissor-frames))
(format #t "~1Tshadow-frames: ~A~%" (-> this shadow-frames))
(format #t "~1Tcloth-reset-frames: ~A~%" (-> this cloth-reset-frames))
(format #t "~1Tcloth-commands: ~A~%" (-> this cloth-commands))
(format #t "~1Tcamera: ~D~%" (-> this camera))
(format #t "~1Tlight-index: ~D~%" (-> this light-index))
(format #t "~1Tshadow-mask: ~D~%" (-> this shadow-mask))
(format #t "~1Tshadow-values: ~D~%" (-> this shadow-values))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tcommand-list: ~A~%" (-> this command-list))
(format #t "~1Tshadow-flags: ~D~%" (-> this shadow-flags))
(format #t "~1Tshadow-volume-joint: ~A~%" (-> this shadow-volume-joint))
(format #t "~1Tdraw-seg: ~D~%" (-> this draw-seg))
(format #t "~1Tno-draw-seg: ~D~%" (-> this no-draw-seg))
(format #t "~1Tlast-frame: ~f~%" (-> this last-frame))
(format #t "~1Tprocess: ~D~%" (-> this process))
(label cfg-4)
this
)
;; definition of type scene
(deftype scene (art-group)
((scene-flags scene-flags)
(mask-to-clear process-mask)
(entity string)
(art-group string)
(anim string)
(parts int32)
(command-list pair)
(cut-list pair)
(wait-max-time time-frame)
(wait-air-time time-frame)
(wait-ground-time time-frame)
(actor (array scene-actor))
(load-point continue-point)
(end-point continue-point)
(borrow pair)
(sfx-volume float)
(ambient-volume float)
(music-volume float)
(music-delay float)
(scene-task uint16)
(on-running basic)
(on-complete basic)
)
(:methods
(scene-method-16 () none)
(scene-method-17 () none)
)
)
;; definition for method 3 of type scene
(defmethod inspect ((this scene))
(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 "~1Textra: ~A~%" (-> this extra))
(format #t "~1Tinfo: ~A~%" (-> this info))
(format #t "~1Tdata[0] @ #x~X~%" (&-> this scene-flags))
(format #t "~1Tscene-flags: ~D~%" (-> this scene-flags))
(format #t "~1Tmask-to-clear: ~D~%" (-> this mask-to-clear))
(format #t "~1Tentity: ~A~%" (-> this entity))
(format #t "~1Tart-group: ~A~%" (-> this art-group))
(format #t "~1Tanim: ~A~%" (-> this anim))
(format #t "~1Tparts: ~D~%" (-> this parts))
(format #t "~1Tcommand-list: ~A~%" (-> this command-list))
(format #t "~1Tcut-list: ~A~%" (-> this cut-list))
(format #t "~1Twait-max-time: ~D~%" (-> this wait-max-time))
(format #t "~1Twait-air-time: ~D~%" (-> this wait-air-time))
(format #t "~1Twait-ground-time: ~D~%" (-> this wait-ground-time))
(format #t "~1Tactor: ~A~%" (-> this actor))
(format #t "~1Tload-point: ~A~%" (-> this load-point))
(format #t "~1Tend-point: ~A~%" (-> this end-point))
(format #t "~1Tborrow: ~A~%" (-> this borrow))
(format #t "~1Tsfx-volume: ~f~%" (-> this sfx-volume))
(format #t "~1Tambient-volume: ~f~%" (-> this ambient-volume))
(format #t "~1Tmusic-volume: ~f~%" (-> this music-volume))
(format #t "~1Tmusic-delay: ~f~%" (-> this music-delay))
(format #t "~1Tscene-task: ~D~%" (-> this scene-task))
(format #t "~1Ton-running: ~A~%" (-> this on-running))
(format #t "~1Ton-complete: ~A~%" (-> this on-complete))
(label cfg-4)
this
)
;; definition of type scene-player
(deftype scene-player (process-drawable)
((scene-list (array scene))
(scene scene)
(scene-index int32)
(anim spool-anim)
(next-anim spool-anim)
(camera handle)
(main-entity entity-actor)
(wait symbol)
(old-target-pos transformq :inline)
(pre-cut-frame basic)
(preload-continue string)
(preload-sound basic)
(dma-max uint32)
(gui-id sound-id)
(aborted? symbol)
(scene-start-time time-frame)
(targ-speed float)
(cur-speed float)
(speed-change-time time-frame)
(speed-press-time time-frame)
(speed-change-speed float)
(subtitle-change-time time-frame)
(user-sound sound-id 4)
(last-frame float)
(end-point basic)
(blackout-end basic)
(new-trans-hook basic)
(cur-trans-hook basic)
(user-data uint64)
)
(:methods
(scene-player-method-20 () none)
(scene-player-method-21 () none)
(scene-player-method-22 () none)
(scene-player-method-23 () none)
(scene-player-method-24 () none)
(scene-player-method-25 () none)
)
)
;; definition for method 3 of type scene-player
(defmethod inspect ((this scene-player))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tscene-list: ~A~%" (-> this scene-list))
(format #t "~2Tscene: ~A~%" (-> this scene))
(format #t "~2Tscene-index: ~D~%" (-> this scene-index))
(format #t "~2Tanim: ~A~%" (-> this anim))
(format #t "~2Tnext-anim: ~A~%" (-> this next-anim))
(format #t "~2Tcamera: ~D~%" (-> this camera))
(format #t "~2Tmain-entity: ~A~%" (-> this main-entity))
(format #t "~2Twait: ~A~%" (-> this wait))
(format #t "~2Told-target-pos: #<transformq @ #x~X>~%" (-> this old-target-pos))
(format #t "~2Tpre-cut-frame: ~A~%" (-> this pre-cut-frame))
(format #t "~2Tpreload-continue: ~A~%" (-> this preload-continue))
(format #t "~2Tpreload-sound: ~A~%" (-> this preload-sound))
(format #t "~2Tdma-max: ~D~%" (-> this dma-max))
(format #t "~2Tgui-id: ~D~%" (-> this gui-id))
(format #t "~2Taborted?: ~A~%" (-> this aborted?))
(format #t "~2Tscene-start-time: ~D~%" (-> this scene-start-time))
(format #t "~2Ttarg-speed: ~f~%" (-> this targ-speed))
(format #t "~2Tcur-speed: ~f~%" (-> this cur-speed))
(format #t "~2Tspeed-change-time: ~D~%" (-> this speed-change-time))
(format #t "~2Tspeed-press-time: ~D~%" (-> this speed-press-time))
(format #t "~2Tspeed-change-speed: ~f~%" (-> this speed-change-speed))
(format #t "~2Tsubtitle-change-time: ~D~%" (-> this subtitle-change-time))
(format #t "~2Tuser-sound[4] @ #x~X~%" (-> this user-sound))
(format #t "~2Tlast-frame: ~f~%" (-> this last-frame))
(format #t "~2Tend-point: ~A~%" (-> this end-point))
(format #t "~2Tblackout-end: ~A~%" (-> this blackout-end))
(format #t "~2Tnew-trans-hook: ~A~%" (-> this new-trans-hook))
(format #t "~2Tcur-trans-hook: ~A~%" (-> this cur-trans-hook))
(format #t "~2Tuser-data: ~A~%" (-> this user-data))
(label cfg-4)
this
)
;; definition for symbol *scene-player*, type (pointer scene-player)
(define *scene-player* (the-as (pointer scene-player) #f))
;; definition for symbol *debug-menu-scene-play*, type object
(define *debug-menu-scene-play* (the-as object #f))
;; failed to figure out what this is:
0
+101
View File
@@ -0,0 +1,101 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type script-form
(deftype script-form (structure)
((name symbol)
(spec pair)
(func (function script-context object))
)
(:methods
(script-form-method-9 () none)
)
)
;; definition for method 3 of type script-form
(defmethod inspect ((this script-form))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'script-form)
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tspec: ~A~%" (-> this spec))
(format #t "~1Tfunc: ~A~%" (-> this func))
(label cfg-4)
this
)
;; definition of type script-context
(deftype script-context (structure)
((load-state load-state)
(key object)
(process process)
(trans vector)
(side-effect? symbol)
(got-error? symbol)
(expr pair)
(param-count int32)
(param object 16)
(param-type object 16)
)
(:methods
(new (symbol type object process vector) _type_)
(script-context-method-9 () none)
(script-context-method-10 () none)
(script-context-method-11 () none)
)
)
;; definition for method 3 of type script-context
(defmethod inspect ((this script-context))
(when (not this)
(set! this this)
(goto cfg-10)
)
(format #t "[~8x] ~A~%" this 'script-context)
(format #t "~1Tload-state: ~A~%" (-> this load-state))
(format #t "~1Tkey: ~A~%" (-> this key))
(format #t "~1Tprocess: ~A~%" (-> this process))
(format #t "~1Ttrans: #<vector @ #x~X>~%" (-> this trans))
(format #t "~1Tside-effect?: ~A~%" (-> this side-effect?))
(format #t "~1Tgot-error?: ~A~%" (-> this got-error?))
(format #t "~1Texpr: ~A~%" (-> this expr))
(format #t "~1Tparam-count: ~D~%" (-> this param-count))
(format #t "~1Tparam[16] @ #x~X~%" (-> this param))
(dotimes (s5-0 (-> this param-count))
(format #t "~T [~D]~1Tparam: ~`object`P~%" s5-0 (-> this param s5-0))
)
(format #t "~1Tparam-type[16] @ #x~X~%" (-> this param-type))
(dotimes (s5-1 (-> this param-count))
(format #t "~T [~D]~1Tparam-type: ~`object`P~%" s5-1 (-> this param-type s5-1))
)
(label cfg-10)
this
)
;; definition for method 0 of type script-context
;; WARN: Return type mismatch structure vs script-context.
(defmethod new script-context ((allocation symbol) (type-to-make type) (arg0 object) (arg1 process) (arg2 vector))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((v0-0 (t9-0 allocation v1-1)))
(set! (-> (the-as script-context v0-0) key) arg0)
(set! (-> (the-as script-context v0-0) process) arg1)
(set! (-> (the-as script-context v0-0) load-state) *load-state*)
(set! (-> (the-as script-context v0-0) side-effect?) #t)
(set! (-> (the-as script-context v0-0) got-error?) #f)
(set! (-> (the-as script-context v0-0) trans) arg2)
(the-as script-context v0-0)
)
)
)
;; failed to figure out what this is:
0
+3 -1
View File
@@ -56,7 +56,9 @@
"(method 3 sky-vertex)",
// texture
"(method 9 texture-page-dir)", "set-dirty-mask!",
"(method 3 generic-tie-interp-point)"
"(method 3 generic-tie-interp-point)",
// cache stuff
"invalidate-cache-line"
],
"skip_compile_states": {}