mirror of
https://github.com/open-goal/jak-project
synced 2026-08-13 12:19:35 -04:00
[Decompile] connect, text-h, settings-h, capture, memory-usage-h (#410)
* decompile stuff * temp * temp2 * fix * temp * preparing for merge * working * fix stupid format * fix codacy
This commit is contained in:
@@ -406,4 +406,23 @@
|
||||
(defenum gs-reg64
|
||||
:type uint64
|
||||
:copy-entries gs-reg
|
||||
)
|
||||
)
|
||||
|
||||
;; connect
|
||||
(declare-type engine basic)
|
||||
|
||||
(defmacro make-u128 (upper lower)
|
||||
`(rlet ((result :class i128)
|
||||
(upper-xmm :class i128)
|
||||
(lower-xmm :class i128))
|
||||
(.mov upper-xmm ,upper)
|
||||
(.mov lower-xmm ,lower)
|
||||
(.pcpyld result upper-xmm lower-xmm)
|
||||
result
|
||||
)
|
||||
)
|
||||
|
||||
;; texture
|
||||
|
||||
(declare-type texture-page basic)
|
||||
(declare-type level basic)
|
||||
@@ -0,0 +1,187 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; this file is debug only
|
||||
(when *debug-segment*
|
||||
;; definition of type gs-store-image-packet
|
||||
(deftype gs-store-image-packet (structure)
|
||||
((vifcode vif-tag 4 :offset-assert 0)
|
||||
(giftag gif-tag :offset-assert 16)
|
||||
(bitbltbuf gs-bitbltbuf :offset-assert 32)
|
||||
(bitbltbuf-addr gs-reg64 :offset-assert 40)
|
||||
(trxpos gs-trxpos :offset-assert 48)
|
||||
(trxpos-addr gs-reg64 :offset-assert 56)
|
||||
(trxreg gs-trxreg :offset-assert 64)
|
||||
(trxreg-addr gs-reg64 :offset-assert 72)
|
||||
(finish int64 :offset-assert 80)
|
||||
(finish-addr gs-reg64 :offset-assert 88)
|
||||
(trxdir gs-trxdir :offset-assert 96)
|
||||
(trxdir-addr gs-reg64 :offset-assert 104)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x70
|
||||
:flag-assert #x900000070
|
||||
)
|
||||
|
||||
;; definition for method 3 of type gs-store-image-packet
|
||||
;; Used lq/sq
|
||||
(defmethod inspect gs-store-image-packet ((obj gs-store-image-packet))
|
||||
(format #t "[~8x] ~A~%" obj 'gs-store-image-packet)
|
||||
(format #t "~Tvifcode[4] @ #x~X~%" (-> obj vifcode))
|
||||
(format #t "~Tgiftag: ~D~%" (-> obj giftag))
|
||||
(format #t "~Tbitbltbuf: ~D~%" (-> obj bitbltbuf))
|
||||
(format #t "~Tbitbltbuf-addr: ~D~%" (-> obj bitbltbuf-addr))
|
||||
(format #t "~Ttrxpos: ~D~%" (-> obj trxpos))
|
||||
(format #t "~Ttrxpos-addr: ~D~%" (-> obj trxpos-addr))
|
||||
(format #t "~Ttrxreg: ~D~%" (-> obj trxreg))
|
||||
(format #t "~Ttrxreg-addr: ~D~%" (-> obj trxreg-addr))
|
||||
(format #t "~Tfinish: ~D~%" (-> obj finish))
|
||||
(format #t "~Tfinish-addr: ~D~%" (-> obj finish-addr))
|
||||
(format #t "~Ttrxdir: ~D~%" (-> obj trxdir))
|
||||
(format #t "~Ttrxdir-addr: ~D~%" (-> obj trxdir-addr))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function gs-set-default-store-image
|
||||
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
|
||||
;; Used lq/sq
|
||||
(defun
|
||||
gs-set-default-store-image
|
||||
((packet gs-store-image-packet)
|
||||
(src-fbp int)
|
||||
(src-w int)
|
||||
(src-psm int)
|
||||
(ssax int)
|
||||
(ssay int)
|
||||
(rrw int)
|
||||
(rrh int)
|
||||
)
|
||||
(set! (-> packet vifcode 0) (new 'static 'vif-tag))
|
||||
(set!
|
||||
(-> packet vifcode 1)
|
||||
(new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd mskpath3))
|
||||
)
|
||||
(set!
|
||||
(-> packet vifcode 2)
|
||||
(new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)
|
||||
)
|
||||
(set!
|
||||
(-> packet vifcode 3)
|
||||
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
(set!
|
||||
(-> packet giftag)
|
||||
(the-as
|
||||
gif-tag
|
||||
(make-u128
|
||||
(new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))
|
||||
(new 'static 'gif-tag64 :nloop #x5 :eop #x1 :nreg #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> packet bitbltbuf)
|
||||
(new 'static 'gs-bitbltbuf :sbp src-fbp :sbw src-w :spsm src-psm)
|
||||
)
|
||||
(set! (-> packet bitbltbuf-addr) (gs-reg64 bitbltbuf))
|
||||
(set! (-> packet trxpos) (new 'static 'gs-trxpos :ssax ssax :ssay ssay))
|
||||
(set! (-> packet trxpos-addr) (gs-reg64 trxpos))
|
||||
(set! (-> packet trxreg) (new 'static 'gs-trxreg :rrw rrw :rrh rrh))
|
||||
(set! (-> packet trxreg-addr) (gs-reg64 trxreg))
|
||||
(set! (-> packet finish) 0)
|
||||
(set! (-> packet finish-addr) (gs-reg64 finish))
|
||||
(set! (-> packet trxdir) (new 'static 'gs-trxdir :xdir #x1))
|
||||
(set! (-> packet trxdir-addr) (gs-reg64 trxdir))
|
||||
(.sync.l)
|
||||
7
|
||||
)
|
||||
|
||||
;; definition for function store-image
|
||||
;; Used lq/sq
|
||||
(defun store-image ((oddeven int))
|
||||
(local-vars (ptr-1 (pointer uint8)) (y-idx int) (y-idx-2 int))
|
||||
(let ((width 512)
|
||||
(height (-> *video-parms* screen-sy))
|
||||
(file (new 'debug 'file-stream "image.raw" 'write))
|
||||
)
|
||||
(let ((buff0 (new 'debug 'boxed-array uint128 (sar (* width height) 2))))
|
||||
(let ((buff1 (new 'debug 'boxed-array uint128 (sar (* width height) 2))))
|
||||
(let ((packet (new 'static 'gs-store-image-packet)))
|
||||
(gs-set-default-store-image
|
||||
packet
|
||||
#x2800
|
||||
(sar width 6)
|
||||
0
|
||||
0
|
||||
0
|
||||
width
|
||||
height
|
||||
)
|
||||
(flush-cache 0)
|
||||
(gs-store-image packet (-> buff0 data))
|
||||
(sync-path 0 0)
|
||||
(gs-set-default-store-image
|
||||
packet
|
||||
#x3000
|
||||
(sar width 6)
|
||||
0
|
||||
0
|
||||
0
|
||||
width
|
||||
height
|
||||
)
|
||||
(flush-cache 0)
|
||||
(gs-store-image packet (-> buff1 data))
|
||||
)
|
||||
(sync-path 0 0)
|
||||
(let ((ptr-0 (-> buff0 data)))
|
||||
(set! ptr-1 (-> buff1 data))
|
||||
(cond
|
||||
((zero? oddeven)
|
||||
(set! y-idx 0)
|
||||
(while (< y-idx height)
|
||||
(file-stream-write
|
||||
file
|
||||
(&+ ptr-0 (* y-idx (shl width 2)))
|
||||
(the-as uint (shl width 2))
|
||||
)
|
||||
(file-stream-write
|
||||
file
|
||||
(&+ ptr-1 (* y-idx (shl width 2)))
|
||||
(the-as uint (shl width 2))
|
||||
)
|
||||
(set! y-idx (+ y-idx 1))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! y-idx-2 0)
|
||||
(while (< y-idx-2 height)
|
||||
(file-stream-write
|
||||
file
|
||||
(&+ ptr-1 (* y-idx-2 (shl width 2)))
|
||||
(the-as uint (shl width 2))
|
||||
)
|
||||
(file-stream-write
|
||||
file
|
||||
(&+ ptr-0 (* y-idx-2 (shl width 2)))
|
||||
(the-as uint (shl width 2))
|
||||
)
|
||||
(set! y-idx-2 (+ y-idx-2 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "oddeven = ~d~%" oddeven)
|
||||
(delete buff1)
|
||||
)
|
||||
(delete buff0)
|
||||
)
|
||||
(file-stream-close file)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,548 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type connectable
|
||||
(deftype connectable (structure)
|
||||
((next0 connectable :offset-assert 0)
|
||||
(prev0 connectable :offset-assert 4)
|
||||
(next1 connectable :offset-assert 8)
|
||||
(prev1 connectable :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type connectable
|
||||
(defmethod inspect connectable ((obj connectable))
|
||||
(format #t "[~8x] ~A~%" obj 'connectable)
|
||||
(format #t "~Tnext0: ~`connectable`P~%" (-> obj next0))
|
||||
(format #t "~Tprev0: ~`connectable`P~%" (-> obj prev0))
|
||||
(format #t "~Tnext1: ~`connectable`P~%" (-> obj next1))
|
||||
(format #t "~Tprev1: ~`connectable`P~%" (-> obj prev1))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type connection
|
||||
(deftype connection (connectable)
|
||||
((param0 (function object object object object object) :offset-assert 16)
|
||||
(param1 basic :offset-assert 20)
|
||||
(param2 basic :offset-assert 24)
|
||||
(param3 basic :offset-assert 28)
|
||||
(quad uint128 2 :offset 0)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x20
|
||||
:flag-assert #xe00000020
|
||||
(:methods
|
||||
(get-engine (connection) engine 9)
|
||||
(get-process (connection) process 10)
|
||||
(belongs-to-engine? (connection engine) symbol 11)
|
||||
(belongs-to-process? (connection process) symbol 12)
|
||||
(move-to-dead (connection) connection 13)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type connection
|
||||
(defmethod inspect connection ((obj connection))
|
||||
(format #t "[~8x] ~A~%" obj 'connection)
|
||||
(format #t "~Tnext0: ~`connectable`P~%" (-> obj next0))
|
||||
(format #t "~Tprev0: ~`connectable`P~%" (-> obj prev0))
|
||||
(format #t "~Tnext1: ~`connectable`P~%" (-> obj next1))
|
||||
(format #t "~Tprev1: ~`connectable`P~%" (-> obj prev1))
|
||||
(format #t "~Tparam0: ~A~%" (-> obj param0))
|
||||
(format #t "~Tparam1: ~A~%" (-> obj param1))
|
||||
(format #t "~Tparam2: ~A~%" (-> obj param2))
|
||||
(format #t "~Tparam3: ~A~%" (-> obj param3))
|
||||
(format #t "~Tquad[2] @ #x~X~%" (&-> obj next0))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type engine
|
||||
(deftype engine (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(length int16 :offset-assert 8)
|
||||
(allocated-length int16 :offset-assert 10)
|
||||
(engine-time uint64 :offset-assert 16)
|
||||
(alive-list connectable :inline :offset-assert 32)
|
||||
(alive-list-end connectable :inline :offset-assert 48)
|
||||
(dead-list connectable :inline :offset-assert 64)
|
||||
(dead-list-end connectable :inline :offset-assert 80)
|
||||
(data connection 1 :inline :offset-assert 96)
|
||||
)
|
||||
:method-count-assert 24
|
||||
:size-assert #x80
|
||||
:flag-assert #x1800000080
|
||||
(:methods
|
||||
(new (symbol type basic int) _type_ 0)
|
||||
(inspect-all-connections (engine) engine 9)
|
||||
(apply-to-connections (engine (function connectable none)) int 10)
|
||||
(apply-to-connections-reverse (engine (function connectable none)) int 11)
|
||||
(execute-connections (engine object) int 12)
|
||||
(execute-connections-and-move-to-dead (engine object) int 13)
|
||||
(execute-connections-if-needed (engine object) int 14)
|
||||
(add-connection (engine process (function object object object object object) object object object) connection 15)
|
||||
(remove-from-process (engine process) int 16)
|
||||
(remove-matching (engine (function connection engine symbol)) int 17)
|
||||
(remove-all (engine) int 18)
|
||||
(remove-by-param1 (engine object) int 19)
|
||||
(remove-by-param2 (engine int) int 20)
|
||||
(get-first-connectable (engine) connectable 21)
|
||||
(get-last-connectable (engine) connectable 22)
|
||||
(unknown-1 (engine (pointer uint32)) uint 23)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type connection
|
||||
(defmethod belongs-to-process? connection ((obj connection) (arg0 process))
|
||||
(= arg0 ((method-of-type connection get-process) obj))
|
||||
)
|
||||
|
||||
;; definition for method 2 of type connection
|
||||
(defmethod print connection ((obj connection))
|
||||
(format
|
||||
#t
|
||||
"#<connection (~A ~A ~A ~A) @ #x~X>"
|
||||
(-> obj param0)
|
||||
(-> obj param1)
|
||||
(-> obj param2)
|
||||
(-> obj param3)
|
||||
obj
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 9 of type connection
|
||||
;; INFO: Return type mismatch pointer vs engine.
|
||||
(defmethod get-engine connection ((obj connection))
|
||||
(while (-> (the-as connectable obj) prev0)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(set! obj (the-as connection (-> (the-as connectable obj) prev0)))
|
||||
)
|
||||
(the-as engine (&+ (the-as pointer obj) -28))
|
||||
)
|
||||
|
||||
;; definition for method 10 of type connection
|
||||
;; INFO: Return type mismatch pointer vs process.
|
||||
(defmethod get-process connection ((obj connection))
|
||||
(while (-> (the-as connectable obj) prev1)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(set! obj (the-as connection (-> (the-as connectable obj) prev1)))
|
||||
)
|
||||
(the-as process (&+ (the-as pointer obj) -92))
|
||||
)
|
||||
|
||||
;; definition for method 11 of type connection
|
||||
(defmethod belongs-to-engine? connection ((obj connection) (arg0 engine))
|
||||
(and
|
||||
(< (the-as int arg0) (the-as int obj))
|
||||
(< (the-as int obj) (the-as int (-> arg0 data (-> arg0 allocated-length))))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 21 of type engine
|
||||
(defmethod get-first-connectable engine ((obj engine))
|
||||
(-> obj alive-list next0)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type engine
|
||||
(defmethod get-last-connectable engine ((obj engine))
|
||||
(-> obj alive-list-end)
|
||||
)
|
||||
|
||||
;; definition for method 23 of type engine
|
||||
(defmethod unknown-1 engine ((obj engine) (arg0 (pointer uint32)))
|
||||
(-> arg0 0)
|
||||
)
|
||||
|
||||
;; definition for method 0 of type engine
|
||||
(defmethod
|
||||
new
|
||||
engine
|
||||
((allocation symbol) (type-to-make type) (name basic) (length int))
|
||||
(let
|
||||
((obj
|
||||
(object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(the-as
|
||||
int
|
||||
(+ (-> type-to-make size) (the-as uint (shl (+ length -1) 5)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as engine obj) allocated-length) length)
|
||||
(set! (-> (the-as engine obj) length) 0)
|
||||
(set! (-> (the-as engine obj) name) name)
|
||||
(set!
|
||||
(-> (the-as engine obj) alive-list next0)
|
||||
(-> (the-as engine obj) alive-list-end)
|
||||
)
|
||||
(set! (-> (the-as engine obj) alive-list prev0) #f)
|
||||
(set! (-> (the-as engine obj) alive-list next1) #f)
|
||||
(set! (-> (the-as engine obj) alive-list prev1) #f)
|
||||
(set! (-> (the-as engine obj) alive-list-end next0) #f)
|
||||
(set!
|
||||
(-> (the-as engine obj) alive-list-end prev0)
|
||||
(-> (the-as engine obj) alive-list)
|
||||
)
|
||||
(set! (-> (the-as engine obj) alive-list-end next1) #f)
|
||||
(set! (-> (the-as engine obj) alive-list-end prev1) #f)
|
||||
(set!
|
||||
(-> (the-as engine obj) dead-list next0)
|
||||
(the-as connectable (-> (the-as engine obj) data))
|
||||
)
|
||||
(set! (-> (the-as engine obj) dead-list prev0) #f)
|
||||
(set! (-> (the-as engine obj) dead-list next1) #f)
|
||||
(set! (-> (the-as engine obj) dead-list prev1) #f)
|
||||
(set! (-> (the-as engine obj) dead-list-end next0) #f)
|
||||
(set!
|
||||
(-> (the-as engine obj) dead-list-end prev0)
|
||||
(-> (the-as engine obj) data (+ length -1))
|
||||
)
|
||||
(set! (-> (the-as engine obj) dead-list-end next1) #f)
|
||||
(set! (-> (the-as engine obj) dead-list-end prev1) #f)
|
||||
(set!
|
||||
(-> (the-as engine obj) data 0 prev0)
|
||||
(-> (the-as engine obj) dead-list)
|
||||
)
|
||||
(set!
|
||||
(-> (the-as engine obj) data 0 next0)
|
||||
(the-as connectable (&+ (the-as pointer obj) 124))
|
||||
)
|
||||
(let ((idx-to-link 1)
|
||||
(end-idx (+ length -2))
|
||||
)
|
||||
(while (>= end-idx idx-to-link)
|
||||
(set!
|
||||
(-> (the-as engine obj) data idx-to-link prev0)
|
||||
(-> (the-as engine obj) data (+ idx-to-link -1))
|
||||
)
|
||||
(set!
|
||||
(-> (the-as engine obj) data idx-to-link next0)
|
||||
(-> (the-as engine obj) data (+ idx-to-link 1))
|
||||
)
|
||||
(+! idx-to-link 1)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> (the-as engine obj) data (+ length -1) prev0)
|
||||
(-> (the-as engine obj) data (+ length -2))
|
||||
)
|
||||
(set!
|
||||
(-> (the-as engine obj) data (+ length -1) next0)
|
||||
(-> (the-as engine obj) dead-list-end)
|
||||
)
|
||||
(the-as engine obj)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 2 of type engine
|
||||
(defmethod print engine ((obj engine))
|
||||
(format #t "#<~A ~A @ #x~X>" (-> obj type) (-> obj name) obj)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 3 of type engine
|
||||
(defmethod inspect engine ((obj engine))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tname: ~A~%" (-> obj name))
|
||||
(format #t "~Tengine-time: ~D~%" (-> obj engine-time))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Talive-list:~%")
|
||||
(let ((s5-0 *print-column*))
|
||||
(set! *print-column* (+ *print-column* (the-as uint 64)))
|
||||
((method-of-type connectable inspect) (-> obj alive-list))
|
||||
(set! *print-column* s5-0)
|
||||
)
|
||||
(format #t "~Talive-list-end:~%")
|
||||
(let ((s5-1 *print-column*))
|
||||
(set! *print-column* (+ *print-column* (the-as uint 64)))
|
||||
((method-of-type connectable inspect) (-> obj alive-list-end))
|
||||
(set! *print-column* s5-1)
|
||||
)
|
||||
(format #t "~Tdead-list:~%")
|
||||
(let ((s5-2 *print-column*))
|
||||
(set! *print-column* (+ *print-column* (the-as uint 64)))
|
||||
((method-of-type connectable inspect) (-> obj dead-list))
|
||||
(set! *print-column* s5-2)
|
||||
)
|
||||
(format #t "~Tdead-list-end:~%")
|
||||
(let ((s5-3 *print-column*))
|
||||
(set! *print-column* (+ *print-column* (the-as uint 64)))
|
||||
((method-of-type connectable inspect) (-> obj dead-list-end))
|
||||
(set! *print-column* s5-3)
|
||||
)
|
||||
(format #t "~Tdata[~D]: @ #x~X~%" (-> obj allocated-length) (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 4 of type engine
|
||||
(defmethod length engine ((obj engine))
|
||||
(-> obj length)
|
||||
)
|
||||
|
||||
;; definition for method 5 of type engine
|
||||
;; INFO: Return type mismatch uint vs int.
|
||||
(defmethod asize-of engine ((obj engine))
|
||||
(the-as
|
||||
int
|
||||
(+ (-> engine size) (the-as uint (shl (+ (-> obj allocated-length) -1) 5)))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type engine
|
||||
(defmethod
|
||||
apply-to-connections
|
||||
engine
|
||||
((obj engine) (f (function connectable none)))
|
||||
(let* ((current (-> obj alive-list next0))
|
||||
(next (-> current next0))
|
||||
)
|
||||
(while (!= current (-> obj alive-list-end))
|
||||
(f current)
|
||||
(set! current next)
|
||||
(set! next (-> next next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 11 of type engine
|
||||
(defmethod
|
||||
apply-to-connections-reverse
|
||||
engine
|
||||
((obj engine) (f (function connectable none)))
|
||||
(let ((iter (-> obj alive-list-end prev0)))
|
||||
(while (!= iter (-> obj alive-list))
|
||||
(f iter)
|
||||
(set! iter (-> iter prev0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 12 of type engine
|
||||
(defmethod execute-connections engine ((obj engine) (arg0 object))
|
||||
(set! (-> obj engine-time) (-> *display* real-frame-counter))
|
||||
(let ((ct (the-as connection (-> obj alive-list-end prev0))))
|
||||
(while (!= ct (-> obj alive-list))
|
||||
((-> ct param0) (-> ct param1) (-> ct param2) (-> ct param3) arg0)
|
||||
(set! ct (the-as connection (-> ct prev0)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 13 of type engine
|
||||
(defmethod
|
||||
execute-connections-and-move-to-dead
|
||||
engine
|
||||
((obj engine) (arg0 object))
|
||||
(set! (-> obj engine-time) (-> *display* real-frame-counter))
|
||||
(let ((ct (the-as connection (-> obj alive-list-end prev0))))
|
||||
(while (!= ct (-> obj alive-list))
|
||||
(let
|
||||
((result
|
||||
((-> ct param0) (-> ct param1) (-> ct param2) (-> ct param3) arg0)
|
||||
)
|
||||
)
|
||||
(set! ct (the-as connection (-> ct prev0)))
|
||||
(if (= result 'dead)
|
||||
((method-of-type connection move-to-dead)
|
||||
(the-as connection (-> ct next0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 14 of type engine
|
||||
(defmethod execute-connections-if-needed engine ((obj engine) (arg0 object))
|
||||
(if (!= (-> *display* real-frame-counter) (-> obj engine-time))
|
||||
(execute-connections obj arg0)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for function connection-process-apply
|
||||
(defun connection-process-apply ((proc process) (func (function object none)))
|
||||
(when proc
|
||||
(let ((iter (-> proc connection-list next1)))
|
||||
(while iter
|
||||
(func iter)
|
||||
(set! iter (-> iter next1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type engine
|
||||
(defmethod inspect-all-connections engine ((obj engine))
|
||||
(apply-to-connections
|
||||
obj
|
||||
(the-as (function connectable none) (-> connection methods-by-name inspect))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 15 of type engine
|
||||
(defmethod
|
||||
add-connection
|
||||
engine
|
||||
((obj engine)
|
||||
(proc process)
|
||||
(func (function object object object object object))
|
||||
(p1 object)
|
||||
(p2 object)
|
||||
(p3 object)
|
||||
)
|
||||
(let ((con (the-as connection (-> obj dead-list next0))))
|
||||
(when (not (or (not proc) (= con (-> obj dead-list-end))))
|
||||
(set! (-> con param0) func)
|
||||
(set! (-> con param1) (the-as basic p1))
|
||||
(set! (-> con param2) (the-as basic p2))
|
||||
(set! (-> con param3) (the-as basic p3))
|
||||
(set! (-> obj dead-list next0) (-> con next0))
|
||||
(set! (-> con next0 prev0) (-> obj dead-list))
|
||||
(set! (-> con next0) (-> obj alive-list next0))
|
||||
(set! (-> con next0 prev0) con)
|
||||
(set! (-> con prev0) (-> obj alive-list))
|
||||
(set! (-> obj alive-list next0) con)
|
||||
(set! (-> con next1) (-> proc connection-list next1))
|
||||
(if (-> con next1)
|
||||
(set! (-> con next1 prev1) con)
|
||||
)
|
||||
(set! (-> con prev1) (-> proc connection-list))
|
||||
(set! (-> proc connection-list next1) con)
|
||||
(set! (-> obj length) (+ (-> obj length) 1))
|
||||
con
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type connection
|
||||
(defmethod move-to-dead connection ((obj connection))
|
||||
(let ((v1-1 ((method-of-type connection get-engine) obj)))
|
||||
(set! (-> obj prev0 next0) (-> obj next0))
|
||||
(set! (-> obj next0 prev0) (-> obj prev0))
|
||||
(set! (-> obj prev1 next1) (-> obj next1))
|
||||
(if (-> obj next1)
|
||||
(set! (-> obj next1 prev1) (-> obj prev1))
|
||||
)
|
||||
(set! (-> obj next0) (-> v1-1 dead-list next0))
|
||||
(set! (-> obj next0 prev0) obj)
|
||||
(set! (-> obj prev0) (-> v1-1 dead-list))
|
||||
(set! (-> v1-1 dead-list next0) obj)
|
||||
(set! (-> v1-1 length) (+ (-> v1-1 length) -1))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function process-disconnect
|
||||
(defun process-disconnect ((arg0 process))
|
||||
(when arg0
|
||||
(let ((gp-0 (-> arg0 connection-list next1)))
|
||||
(while gp-0
|
||||
((method-of-type connection move-to-dead) (the-as connection gp-0))
|
||||
(set! gp-0 (-> gp-0 next1))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 16 of type engine
|
||||
(defmethod remove-from-process engine ((obj engine) (arg0 process))
|
||||
(when arg0
|
||||
(let ((s5-0 (-> arg0 connection-list next1)))
|
||||
(while s5-0
|
||||
(if
|
||||
((method-of-type connection belongs-to-engine?)
|
||||
(the-as connection s5-0)
|
||||
obj
|
||||
)
|
||||
((method-of-type connection move-to-dead) (the-as connection s5-0))
|
||||
)
|
||||
(set! s5-0 (-> s5-0 next1))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 17 of type engine
|
||||
(defmethod
|
||||
remove-matching
|
||||
engine
|
||||
((obj engine) (arg0 (function connection engine symbol)))
|
||||
(let* ((s4-0 (-> obj alive-list next0))
|
||||
(s3-0 (-> s4-0 next0))
|
||||
)
|
||||
(while (!= s4-0 (-> obj alive-list-end))
|
||||
(if (arg0 (the-as connection s4-0) obj)
|
||||
((method-of-type connection move-to-dead) (the-as connection s4-0))
|
||||
)
|
||||
(set! s4-0 s3-0)
|
||||
(set! s3-0 (-> s3-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 18 of type engine
|
||||
(defmethod remove-all engine ((obj engine))
|
||||
(let* ((a0-1 (-> obj alive-list next0))
|
||||
(s5-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> obj alive-list-end))
|
||||
((method-of-type connection move-to-dead) (the-as connection a0-1))
|
||||
(set! a0-1 s5-0)
|
||||
(set! s5-0 (-> s5-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 19 of type engine
|
||||
(defmethod remove-by-param1 engine ((obj engine) (p1-value object))
|
||||
(let* ((current (-> obj alive-list next0))
|
||||
(next (-> current next0))
|
||||
)
|
||||
(while (!= current (-> obj alive-list-end))
|
||||
(if (= (-> (the-as connection current) param1) p1-value)
|
||||
((method-of-type connection move-to-dead) (the-as connection current))
|
||||
)
|
||||
(set! current next)
|
||||
(set! next (-> next next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for method 20 of type engine
|
||||
(defmethod remove-by-param2 engine ((obj engine) (p2-value int))
|
||||
(let* ((current (-> obj alive-list next0))
|
||||
(next (-> current next0))
|
||||
)
|
||||
(while (!= current (-> obj alive-list-end))
|
||||
(if (= (-> (the-as connection current) param2) p2-value)
|
||||
((method-of-type connection move-to-dead) (the-as connection current))
|
||||
)
|
||||
(set! current next)
|
||||
(set! next (-> next next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
(vu1-buf dma-buffer :offset 8)
|
||||
(debug-buf dma-buffer :offset 36)
|
||||
(global-buf dma-buffer :offset 40)
|
||||
(buffer uint32 11 :offset 4)
|
||||
(bucket-group dma-bucket :offset 44)
|
||||
(buffer uint32 11 :offset 4)
|
||||
(profile-bar profile-bar 2 :offset 48)
|
||||
(run-time uint64 :offset 56)
|
||||
)
|
||||
@@ -110,7 +110,7 @@
|
||||
(format #t "~Tvu1-buf: ~A~%" (-> obj calc-buf))
|
||||
(format #t "~Tdebug-buf: ~A~%" (-> obj debug-buf))
|
||||
(format #t "~Tglobal-buf: ~A~%" (-> obj global-buf))
|
||||
(format #t "~Tbucket-group: #<dma-bucket @ #x~X>~%" (-> obj buffer 10))
|
||||
(format #t "~Tbucket-group: #<dma-bucket @ #x~X>~%" (-> obj bucket-group))
|
||||
(format #t "~Tprofile-bar[2] @ #x~X~%" (-> obj profile-bar))
|
||||
(format #t "~Trun-time: ~D~%" (-> obj run-time))
|
||||
obj
|
||||
|
||||
@@ -0,0 +1,797 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type char-verts
|
||||
(deftype char-verts (structure)
|
||||
((pos vector 4 :inline :offset-assert 0)
|
||||
(color vector 4 :inline :offset-assert 64)
|
||||
(tex-st vector 4 :inline :offset-assert 128)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc0
|
||||
:flag-assert #x9000000c0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type char-verts
|
||||
(defmethod inspect char-verts ((obj char-verts))
|
||||
(format #t "[~8x] ~A~%" obj 'char-verts)
|
||||
(format #t "~Tpos[4] @ #x~X~%" (-> obj pos))
|
||||
(format #t "~Tcolor[4] @ #x~X~%" (-> obj color))
|
||||
(format #t "~Ttex-st[4] @ #x~X~%" (-> obj tex-st))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type char-color
|
||||
(deftype char-color (structure)
|
||||
((color rgba 4 :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type char-color
|
||||
(defmethod inspect char-color ((obj char-color))
|
||||
(format #t "[~8x] ~A~%" obj 'char-color)
|
||||
(format #t "~Tcolor[4] @ #x~X~%" (-> obj color))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *font-default-matrix*, type matrix
|
||||
(define
|
||||
*font-default-matrix*
|
||||
(new 'static 'matrix
|
||||
:data
|
||||
(new 'static 'array float 16
|
||||
1.0
|
||||
0.0
|
||||
0.0
|
||||
0.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
0.0
|
||||
0.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
-256.0
|
||||
0.0
|
||||
0.0
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type font-context
|
||||
(deftype font-context (basic)
|
||||
((origin vector :inline :offset-assert 16)
|
||||
(strip-gif vector :inline :offset-assert 32)
|
||||
(width float :offset-assert 48)
|
||||
(height float :offset-assert 52)
|
||||
(projection float :offset-assert 56)
|
||||
(color int64 :offset-assert 64)
|
||||
(flags uint32 :offset-assert 72)
|
||||
(mat matrix :offset-assert 76)
|
||||
(start-line uint32 :offset-assert 80)
|
||||
(scale float :offset-assert 84)
|
||||
)
|
||||
:method-count-assert 20
|
||||
:size-assert #x58
|
||||
:flag-assert #x1400000058
|
||||
(:methods
|
||||
(new (symbol type matrix int int float int uint) _type_ 0)
|
||||
(set-mat! (font-context matrix) font-context 9)
|
||||
(set-origin! (font-context int int) font-context 10)
|
||||
(set-depth! (font-context int) font-context 11)
|
||||
(set-w! (font-context float) font-context 12)
|
||||
(set-width! (font-context int) font-context 13)
|
||||
(set-height! (font-context int) font-context 14)
|
||||
(set-projection! (font-context float) font-context 15)
|
||||
(set-color! (font-context int) font-context 16)
|
||||
(set-flags! (font-context uint) font-context 17)
|
||||
(set-start-line! (font-context uint) font-context 18)
|
||||
(set-scale! (font-context float) font-context 19)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type font-context
|
||||
(defmethod inspect font-context ((obj font-context))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Torigin: #<vector @ #x~X>~%" (-> obj origin))
|
||||
(format #t "~Tstrip-gif: #<vector @ #x~X>~%" (-> obj strip-gif))
|
||||
(format #t "~Twidth: ~f~%" (-> obj width))
|
||||
(format #t "~Theight: ~f~%" (-> obj height))
|
||||
(format #t "~Tprojection: ~f~%" (-> obj projection))
|
||||
(format #t "~Tcolor: ~D~%" (-> obj color))
|
||||
(format #t "~Tflags: ~D~%" (-> obj flags))
|
||||
(format #t "~Tmat: #<matrix @ #x~X>~%" (-> obj mat))
|
||||
(format #t "~Tstart-line: ~D~%" (-> obj start-line))
|
||||
(format #t "~Tscale: ~f~%" (-> obj scale))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 9 of type font-context
|
||||
(defmethod set-mat! font-context ((obj font-context) (mat matrix))
|
||||
(set! (-> obj mat) mat)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 10 of type font-context
|
||||
(defmethod set-origin! font-context ((obj font-context) (x int) (y int))
|
||||
(let ((x (gpr->fpr x)))
|
||||
(set! (-> obj origin x) (the float x))
|
||||
)
|
||||
(set! (-> obj origin y) (the float y))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 11 of type font-context
|
||||
(defmethod set-depth! font-context ((obj font-context) (z int))
|
||||
(let ((z (gpr->fpr z)))
|
||||
(set! (-> obj origin z) (the float z))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 12 of type font-context
|
||||
(defmethod set-w! font-context ((obj font-context) (w float))
|
||||
(set! (-> obj origin w) w)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 13 of type font-context
|
||||
(defmethod set-width! font-context ((obj font-context) (width int))
|
||||
(let ((width (gpr->fpr width)))
|
||||
(set! (-> obj width) (the float width))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 14 of type font-context
|
||||
(defmethod set-height! font-context ((obj font-context) (height int))
|
||||
(let ((height (gpr->fpr height)))
|
||||
(set! (-> obj height) (the float height))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 15 of type font-context
|
||||
(defmethod set-projection! font-context ((obj font-context) (proj float))
|
||||
(set! (-> obj projection) proj)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 16 of type font-context
|
||||
(defmethod set-color! font-context ((obj font-context) (color int))
|
||||
(set! (-> obj color) color)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 17 of type font-context
|
||||
(defmethod set-flags! font-context ((obj font-context) (flags uint))
|
||||
(set! (-> obj flags) flags)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 18 of type font-context
|
||||
(defmethod set-start-line! font-context ((obj font-context) (start-line uint))
|
||||
(set! (-> obj start-line) start-line)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 19 of type font-context
|
||||
(defmethod set-scale! font-context ((obj font-context) (scale float))
|
||||
(set! (-> obj scale) scale)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type font-context
|
||||
(defmethod
|
||||
new
|
||||
font-context
|
||||
((allocation symbol)
|
||||
(type-to-make type)
|
||||
(mat matrix)
|
||||
(x int)
|
||||
(y int)
|
||||
(z float)
|
||||
(color int)
|
||||
(flags uint)
|
||||
)
|
||||
(let
|
||||
((obj
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(set! (-> obj mat) mat)
|
||||
(let ((v1-3 obj))
|
||||
(set! (-> v1-3 origin x) (the float x))
|
||||
(set! (-> v1-3 origin y) (the float y))
|
||||
)
|
||||
(if (= z 0.0)
|
||||
(let ((v1-4 obj))
|
||||
(set! (-> v1-4 origin z) (-> *math-camera* isometric data 14))
|
||||
)
|
||||
(let ((v1-5 obj))
|
||||
(set! (-> v1-5 origin z) z)
|
||||
)
|
||||
)
|
||||
(let ((v1-6 obj))
|
||||
(set! (-> v1-6 origin w) 1.0)
|
||||
)
|
||||
(let ((v1-7 obj))
|
||||
(set! (-> v1-7 width) (the float 512))
|
||||
)
|
||||
(let ((v1-8 obj))
|
||||
(set! (-> v1-8 height) (the float 256))
|
||||
)
|
||||
(let ((v1-9 obj))
|
||||
(set! (-> v1-9 projection) 1.0)
|
||||
)
|
||||
(set! (-> obj color) color)
|
||||
(set! (-> obj flags) flags)
|
||||
(let ((a0-4 obj))
|
||||
(set! (-> a0-4 start-line) (the-as uint 0))
|
||||
)
|
||||
(let ((v1-13 obj))
|
||||
(set! (-> v1-13 scale) 1.0)
|
||||
)
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type font-work
|
||||
(deftype font-work (structure)
|
||||
((font-tmpl dma-gif-packet :inline :offset-assert 0)
|
||||
(char-tmpl dma-gif-packet :inline :offset-assert 32)
|
||||
(tex1-tmpl uint64 2 :offset-assert 64)
|
||||
(small-font-lo-tmpl uint64 2 :offset-assert 80)
|
||||
(small-font-hi-tmpl uint64 2 :offset-assert 96)
|
||||
(large-font-lo-tmpl uint64 2 :offset-assert 112)
|
||||
(large-font-hi-tmpl uint64 2 :offset-assert 128)
|
||||
(size1-small vector :inline :offset-assert 144)
|
||||
(size2-small vector :inline :offset-assert 160)
|
||||
(size3-small vector :inline :offset-assert 176)
|
||||
(size1-large vector :inline :offset-assert 192)
|
||||
(size2-large vector :inline :offset-assert 208)
|
||||
(size3-large vector :inline :offset-assert 224)
|
||||
(size-st1 vector :inline :offset-assert 240)
|
||||
(size-st2 vector :inline :offset-assert 256)
|
||||
(size-st3 vector :inline :offset-assert 272)
|
||||
(save vector :inline :offset-assert 288)
|
||||
(save-color vector 4 :inline :offset-assert 304)
|
||||
(current-verts char-verts :inline :offset-assert 368)
|
||||
(src-verts char-verts :inline :offset-assert 560)
|
||||
(dest-verts char-verts :inline :offset-assert 752)
|
||||
(justify vector 64 :inline :offset-assert 944)
|
||||
(color-shadow vector4w :inline :offset-assert 1968)
|
||||
(color-table char-color 64 :inline :offset-assert 1984)
|
||||
(last-color uint64 :offset-assert 3008)
|
||||
(save-last-color uint64 :offset-assert 3016)
|
||||
(buf basic :offset-assert 3024)
|
||||
(str-ptr uint32 :offset-assert 3028)
|
||||
(flags uint32 :offset-assert 3032)
|
||||
(reg-save uint32 5 :offset-assert 3036)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xbf0
|
||||
:flag-assert #x900000bf0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type font-work
|
||||
(defmethod inspect font-work ((obj font-work))
|
||||
(format #t "[~8x] ~A~%" obj 'font-work)
|
||||
(format #t "~Tfont-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj font-tmpl))
|
||||
(format #t "~Tchar-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj char-tmpl))
|
||||
(format #t "~Ttex1-tmpl[2] @ #x~X~%" (-> obj tex1-tmpl))
|
||||
(format #t "~Tsmall-font-lo-tmpl[2] @ #x~X~%" (-> obj small-font-lo-tmpl))
|
||||
(format #t "~Tsmall-font-hi-tmpl[2] @ #x~X~%" (-> obj small-font-hi-tmpl))
|
||||
(format #t "~Tlarge-font-lo-tmpl[2] @ #x~X~%" (-> obj large-font-lo-tmpl))
|
||||
(format #t "~Tlarge-font-hi-tmpl[2] @ #x~X~%" (-> obj large-font-hi-tmpl))
|
||||
(format #t "~Tsize1-small: #<vector @ #x~X>~%" (-> obj size1-small))
|
||||
(format #t "~Tsize2-small: #<vector @ #x~X>~%" (-> obj size2-small))
|
||||
(format #t "~Tsize3-small: #<vector @ #x~X>~%" (-> obj size3-small))
|
||||
(format #t "~Tsize1-large: #<vector @ #x~X>~%" (-> obj size1-large))
|
||||
(format #t "~Tsize2-large: #<vector @ #x~X>~%" (-> obj size2-large))
|
||||
(format #t "~Tsize3-large: #<vector @ #x~X>~%" (-> obj size3-large))
|
||||
(format #t "~Tsize-st1: #<vector @ #x~X>~%" (-> obj size-st1))
|
||||
(format #t "~Tsize-st2: #<vector @ #x~X>~%" (-> obj size-st2))
|
||||
(format #t "~Tsize-st3: #<vector @ #x~X>~%" (-> obj size-st3))
|
||||
(format #t "~Tsave: #<vector @ #x~X>~%" (-> obj save))
|
||||
(format #t "~Tsave-color[4] @ #x~X~%" (-> obj save-color))
|
||||
(format #t "~Tcurrent-verts: #<char-verts @ #x~X>~%" (-> obj current-verts))
|
||||
(format #t "~Tsrc-verts: #<char-verts @ #x~X>~%" (-> obj src-verts))
|
||||
(format #t "~Tdest-verts: #<char-verts @ #x~X>~%" (-> obj dest-verts))
|
||||
(format #t "~Tjustify[64] @ #x~X~%" (-> obj justify))
|
||||
(format #t "~Tcolor-shadow: #<vector4w @ #x~X>~%" (-> obj color-shadow))
|
||||
(format #t "~Tcolor-table[64] @ #x~X~%" (-> obj color-table))
|
||||
(format #t "~Tlast-color: ~D~%" (-> obj last-color))
|
||||
(format #t "~Tsave-last-color: ~D~%" (-> obj save-last-color))
|
||||
(format #t "~Tbuf: ~A~%" (-> obj buf))
|
||||
(format #t "~Tstr-ptr: ~D~%" (-> obj str-ptr))
|
||||
(format #t "~Tflags: ~D~%" (-> obj flags))
|
||||
(format #t "~Treg-save[5] @ #x~X~%" (-> obj reg-save))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *font-work*, type font-work
|
||||
(define
|
||||
*font-work*
|
||||
(new 'static 'font-work
|
||||
:font-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #x102e400000008001 #xe)
|
||||
)
|
||||
:char-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #xe :id (dma-tag-id cnt))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xe :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #xd02e400000008001 #x412412412412e)
|
||||
)
|
||||
:tex1-tmpl (new 'static 'array uint64 2 #x60 #x14)
|
||||
:small-font-lo-tmpl (new 'static 'array uint64 2 #x0 #x6)
|
||||
:small-font-hi-tmpl (new 'static 'array uint64 2 #x0 #x6)
|
||||
:large-font-lo-tmpl (new 'static 'array uint64 2 #x0 #x6)
|
||||
:large-font-hi-tmpl (new 'static 'array uint64 2 #x0 #x6)
|
||||
:size1-small (new 'static 'vector :x 12.0 :w 0.5)
|
||||
:size2-small (new 'static 'vector :y 8.0 :w 8.0)
|
||||
:size3-small
|
||||
(new 'static 'vector :x 12.0 :y 8.0 :w 8.0)
|
||||
:size1-large (new 'static 'vector :x 24.0 :w 1.0)
|
||||
:size2-large (new 'static 'vector :y 16.0 :w 16.0)
|
||||
:size3-large
|
||||
(new 'static 'vector :x 24.0 :y 16.0 :w 16.0)
|
||||
:size-st1 (new 'static 'vector :x 0.08985 :w 0.5)
|
||||
:size-st2
|
||||
(new 'static 'vector :y 0.06153846 :w 0.5)
|
||||
:size-st3
|
||||
(new 'static 'vector :x 0.08985 :y 0.06153846 :w 0.5)
|
||||
:current-verts
|
||||
(new 'static 'char-verts
|
||||
:pos
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
)
|
||||
:tex-st
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
)
|
||||
)
|
||||
:src-verts
|
||||
(new 'static 'char-verts
|
||||
:pos
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
)
|
||||
:tex-st
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
)
|
||||
)
|
||||
:dest-verts
|
||||
(new 'static 'char-verts
|
||||
:pos
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
(new 'static 'vector :w 1.0)
|
||||
)
|
||||
:tex-st
|
||||
(new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
(new 'static 'vector :z 1.0)
|
||||
)
|
||||
)
|
||||
:color-shadow (new 'static 'vector4w :w #x80)
|
||||
:color-table
|
||||
(new 'static 'inline-array char-color 64
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :a #x80)
|
||||
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x38 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x38 :b #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40)
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40)
|
||||
(new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x40)
|
||||
(new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x40)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x64 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x64 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x28 :g #x28 :a #x80)
|
||||
(new 'static 'rgba :r #x28 :g #x28 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x20 :g #x80 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x20 :g #x80 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :g #x30 :a #x80)
|
||||
(new 'static 'rgba :g #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :b #x60 :a #x80)
|
||||
(new 'static 'rgba :b #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :g #x20 :b #x50 :a #x80)
|
||||
(new 'static 'rgba :g #x20 :b #x50 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :b #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x60 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :g #x40 :b #x60 :a #x80)
|
||||
(new 'static 'rgba :g #x40 :b #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x40 :g #x60 :b #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x60 :b #x60 :a #x80)
|
||||
(new 'static 'rgba :g #x20 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :g #x20 :b #x40 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x50 :g #x50 :b #x50 :a #x80)
|
||||
(new 'static 'rgba :r #x50 :g #x50 :b #x50 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x50 :g #x50 :b #x50 :a #x80)
|
||||
(new 'static 'rgba :r #x50 :g #x50 :b #x50 :a #x80)
|
||||
(new 'static 'rgba :r #x28 :g #x28 :b #x28 :a #x80)
|
||||
(new 'static 'rgba :r #x28 :g #x28 :b #x28 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x54 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x54 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x70 :g #x80 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x70 :g #x80 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :g #x60 :a #x80)
|
||||
(new 'static 'rgba :g #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x48 :g #x58 :b #x8 :a #x80)
|
||||
(new 'static 'rgba :r #x48 :g #x58 :b #x10 :a #x80)
|
||||
(new 'static 'rgba :g #x38 :a #x80)
|
||||
(new 'static 'rgba :g #x38 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x58 :g #x60 :b #x58 :a #x80)
|
||||
(new 'static 'rgba :r #x58 :g #x60 :b #x58 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x40 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x40 :b #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x40 :g #x48 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x48 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :r #x18 :g #x28 :b #x18 :a #x80)
|
||||
(new 'static 'rgba :r #x18 :g #x28 :b #x18 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x30 :g #x20 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x20 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x20 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x20 :b #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x79 :b #x48 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x79 :b #x48 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x79 :b #x48 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x79 :b #x48 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x20 :g #x5e :b #x78 :a #x80)
|
||||
(new 'static 'rgba :r #x20 :g #x5e :b #x78 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x7d :b #x4f :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x7d :b #x4f :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x1d :g #x1d :b #x1d :a #x80)
|
||||
(new 'static 'rgba :r #x1d :g #x1d :b #x1d :a #x80)
|
||||
(new 'static 'rgba :r #x1d :g #x1d :b #x1d :a #x80)
|
||||
(new 'static 'rgba :r #x1d :g #x1d :b #x1d :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80)
|
||||
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x7a :g #x4d :b #x65 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x4d :b #x65 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x4d :b #x65 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x4d :b #x65 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x7a :g #x34 :b #x34 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x34 :b #x34 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x34 :b #x34 :a #x80)
|
||||
(new 'static 'rgba :r #x7a :g #x34 :b #x34 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x10 :g #x65 :b #x4c :a #x80)
|
||||
(new 'static 'rgba :r #x10 :g #x65 :b #x4c :a #x80)
|
||||
(new 'static 'rgba :r #x10 :g #x65 :b #x4c :a #x80)
|
||||
(new 'static 'rgba :r #x10 :g #x65 :b #x4c :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x46 :g #x4a :b #x78 :a #x80)
|
||||
(new 'static 'rgba :r #x46 :g #x4a :b #x78 :a #x80)
|
||||
(new 'static 'rgba :r #x46 :g #x4a :b #x78 :a #x80)
|
||||
(new 'static 'rgba :r #x46 :g #x4a :b #x78 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x57 :g #x7e :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x57 :g #x7e :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x29 :g #x63 :b #x79 :a #x80)
|
||||
(new 'static 'rgba :r #x29 :g #x63 :b #x70 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x7f :g #x7b :b #x33 :a #x80)
|
||||
(new 'static 'rgba :r #x7f :g #x7b :b #x33 :a #x80)
|
||||
(new 'static 'rgba :r #x76 :g #x40 :b #x14 :a #x80)
|
||||
(new 'static 'rgba :r #x76 :g #x40 :b #x14 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x79 :g #x79 :b #x2 :a #x80)
|
||||
(new 'static 'rgba :r #x79 :g #x79 :b #x2 :a #x80)
|
||||
(new 'static 'rgba :r #x1b :g #x51 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x1b :g #x51 :b #x20 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x47 :g #x68 :b #x7a :a #x80)
|
||||
(new 'static 'rgba :r #x47 :g #x68 :b #x7a :a #x80)
|
||||
(new 'static 'rgba :g #x3c :b #x4f :a #x80)
|
||||
(new 'static 'rgba :g #x3c :b #x4f :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :a #x80)
|
||||
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x38 :b #x30 :a #x80)
|
||||
(new 'static 'rgba :r #x30 :g #x38 :b #x30 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color
|
||||
:color
|
||||
(new 'static 'array rgba 4
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
(new 'static 'rgba :r #x60 :a #x80)
|
||||
)
|
||||
)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
(new 'static 'char-color)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function font-set-tex0
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun
|
||||
font-set-tex0
|
||||
((ptr-tex0 (pointer gs-tex0))
|
||||
(tex texture)
|
||||
(tex-addr uint)
|
||||
(psm uint)
|
||||
(clut-addr uint)
|
||||
)
|
||||
(set!
|
||||
(-> ptr-tex0 0)
|
||||
(new 'static 'gs-tex0
|
||||
:tcc #x1
|
||||
:cld #x1
|
||||
:cbp clut-addr
|
||||
:th (log2 (-> tex h))
|
||||
:tw (log2 (-> tex w))
|
||||
:tbw (-> tex width 0)
|
||||
:tbp0 (sar tex-addr 6)
|
||||
:psm psm
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-4 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,14 @@
|
||||
(arg4 object)
|
||||
(arg5 object)
|
||||
)
|
||||
(local-vars (pp process) (s7-0 none) (sp-0 none) (sp-1 int) (ra-0 int))
|
||||
(local-vars
|
||||
(pp process)
|
||||
(s7-0 none)
|
||||
(sp-0 none)
|
||||
(sp-1 int)
|
||||
(ra-0 int)
|
||||
(sv-0 none)
|
||||
)
|
||||
(set!
|
||||
(-> pp mask)
|
||||
(logand (lognot (process-mask sleep sleep-code)) (-> pp mask))
|
||||
|
||||
@@ -149,15 +149,15 @@
|
||||
(bsp basic :offset-assert 48)
|
||||
(art-group basic :offset-assert 52)
|
||||
(info basic :offset-assert 56)
|
||||
(texture-page basic 9 :offset-assert 60)
|
||||
(texture-page texture-page 9 :offset-assert 60)
|
||||
(loaded-texture-page basic 16 :offset-assert 96)
|
||||
(loaded-texture-page-count int32 :offset-assert 160)
|
||||
(foreground-sink-group dma-foreground-sink-group 3 :inline :offset-assert 176)
|
||||
(foreground-draw-engine basic 3 :offset-assert 272)
|
||||
(entity basic :offset-assert 284)
|
||||
(ambient basic :offset-assert 288)
|
||||
(closest-object basic 9 :offset-assert 292)
|
||||
(upload-size uint32 9 :offset-assert 328)
|
||||
(closest-object float 9 :offset-assert 292)
|
||||
(upload-size int32 9 :offset-assert 328)
|
||||
(level-distance float :offset-assert 364)
|
||||
(inside-sphere? basic :offset-assert 368)
|
||||
(inside-boxes? basic :offset-assert 372)
|
||||
@@ -187,7 +187,7 @@
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-11 (_type_) none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
@@ -269,8 +269,8 @@
|
||||
;; definition of type level-group
|
||||
(deftype level-group (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(unknown-field-1 basic :offset-assert 8)
|
||||
(unknown-field-2 basic :offset-assert 12)
|
||||
(unknown-level-1 level :offset-assert 8)
|
||||
(unknown-level-2 level :offset-assert 12)
|
||||
(entity-link entity-links :offset 16)
|
||||
(border? basic :offset-assert 20)
|
||||
(vis? basic :offset-assert 24)
|
||||
@@ -335,8 +335,8 @@
|
||||
*level*
|
||||
(new 'static 'level-group
|
||||
:length 2
|
||||
:unknown-field-1 #f
|
||||
:unknown-field-2 #f
|
||||
:unknown-level-1 #f
|
||||
:unknown-level-2 #f
|
||||
:entity-link #f
|
||||
:border? #f
|
||||
:want-level #f
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; this file is debug only
|
||||
(when *debug-segment*
|
||||
;; definition of type memory-usage-info
|
||||
(deftype memory-usage-info (structure)
|
||||
((name basic :offset-assert 0)
|
||||
(count int32 :offset-assert 4)
|
||||
(used int32 :offset-assert 8)
|
||||
(total int32 :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type memory-usage-info
|
||||
(defmethod inspect memory-usage-info ((obj memory-usage-info))
|
||||
(format #t "[~8x] ~A~%" obj 'memory-usage-info)
|
||||
(format #t "~Tname: ~A~%" (-> obj name))
|
||||
(format #t "~Tcount: ~D~%" (-> obj count))
|
||||
(format #t "~Tused: ~D~%" (-> obj used))
|
||||
(format #t "~Ttotal: ~D~%" (-> obj total))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type memory-usage-block
|
||||
(deftype memory-usage-block (basic)
|
||||
((work-bsp basic :offset-assert 4)
|
||||
(length int32 :offset-assert 8)
|
||||
(data memory-usage-info 109 :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x6e0
|
||||
:flag-assert #xc000006e0
|
||||
(:methods
|
||||
(reset! (_type_) _type_ 9)
|
||||
(calculate-total (_type_) int 10)
|
||||
(dummy-11 () none 11)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type memory-usage-block
|
||||
(defmethod inspect memory-usage-block ((obj memory-usage-block))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Twork-bsp: ~A~%" (-> obj work-bsp))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tdata[109] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *mem-usage*, type memory-usage-block
|
||||
(define *mem-usage* (the-as memory-usage-block (new 'debug 'memory-usage-block)))
|
||||
|
||||
;; definition for symbol *dma-mem-usage*, type memory-usage-block
|
||||
(define
|
||||
*dma-mem-usage*
|
||||
(the-as memory-usage-block (new 'debug 'memory-usage-block))
|
||||
)
|
||||
|
||||
;; definition for symbol *temp-mem-usage*, type symbol
|
||||
(define *temp-mem-usage* #f)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(empty-form)
|
||||
|
||||
)
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type setting-data
|
||||
(deftype setting-data (structure)
|
||||
((border-mode basic :offset-assert 0)
|
||||
(sfx-volume float :offset-assert 4)
|
||||
(music-volume float :offset-assert 8)
|
||||
(dialog-volume float :offset-assert 12)
|
||||
(process-mask uint32 :offset-assert 16)
|
||||
(common-page int32 :offset-assert 20)
|
||||
(language int64 :offset-assert 24)
|
||||
(screenx int32 :offset-assert 32)
|
||||
(screeny int32 :offset-assert 36)
|
||||
(vibration basic :offset-assert 40)
|
||||
(play-hints basic :offset-assert 44)
|
||||
(movie (pointer process) :offset-assert 48)
|
||||
(talking (pointer process) :offset-assert 52)
|
||||
(spooling (pointer process) :offset-assert 56)
|
||||
(hint (pointer process) :offset-assert 60)
|
||||
(ambient (pointer process) :offset-assert 64)
|
||||
(video-mode basic :offset-assert 68)
|
||||
(aspect-ratio basic :offset-assert 72)
|
||||
(sound-flava uint8 :offset-assert 76)
|
||||
(auto-save basic :offset-assert 80)
|
||||
(music-volume-movie float :offset-assert 84)
|
||||
(sfx-volume-movie float :offset-assert 88)
|
||||
(music basic :offset-assert 92)
|
||||
(bg-r float :offset-assert 96)
|
||||
(bg-g float :offset-assert 100)
|
||||
(bg-b float :offset-assert 104)
|
||||
(bg-a float :offset-assert 108)
|
||||
(bg-a-speed float :offset-assert 112)
|
||||
(bg-a-force float :offset-assert 116)
|
||||
(allow-progress basic :offset-assert 120)
|
||||
(allow-pause basic :offset-assert 124)
|
||||
(sound-flava-priority float :offset-assert 128)
|
||||
(ocean-off basic :offset-assert 132)
|
||||
(allow-look-around basic :offset-assert 136)
|
||||
(ambient-volume float :offset-assert 140)
|
||||
(ambient-volume-movie float :offset-assert 144)
|
||||
(dialog-volume-hint float :offset-assert 148)
|
||||
(dummy uint32 11 :offset-assert 152)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #xc4
|
||||
:flag-assert #xa000000c4
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type setting-data
|
||||
(defmethod inspect setting-data ((obj setting-data))
|
||||
(format #t "[~8x] ~A~%" obj 'setting-data)
|
||||
(format #t "~Tborder-mode: ~A~%" (-> obj border-mode))
|
||||
(format #t "~Tsfx-volume: ~f~%" (-> obj sfx-volume))
|
||||
(format #t "~Tmusic-volume: ~f~%" (-> obj music-volume))
|
||||
(format #t "~Tdialog-volume: ~f~%" (-> obj dialog-volume))
|
||||
(format #t "~Tprocess-mask: ~D~%" (-> obj process-mask))
|
||||
(format #t "~Tcommon-page: ~D~%" (-> obj common-page))
|
||||
(format #t "~Tlanguage: ~D~%" (-> obj language))
|
||||
(format #t "~Tscreenx: ~D~%" (-> obj screenx))
|
||||
(format #t "~Tscreeny: ~D~%" (-> obj screeny))
|
||||
(format #t "~Tvibration: ~A~%" (-> obj vibration))
|
||||
(format #t "~Tplay-hints: ~A~%" (-> obj play-hints))
|
||||
(let ((t9-12 format)
|
||||
(a0-13 #t)
|
||||
(a1-12 "~Tmovie: ~A~%")
|
||||
(v1-0 (-> obj movie))
|
||||
)
|
||||
(t9-12 a0-13 a1-12 (if v1-0
|
||||
(-> v1-0 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-13 format)
|
||||
(a0-14 #t)
|
||||
(a1-13 "~Ttalking: ~A~%")
|
||||
(v1-2 (-> obj talking))
|
||||
)
|
||||
(t9-13 a0-14 a1-13 (if v1-2
|
||||
(-> v1-2 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-14 format)
|
||||
(a0-15 #t)
|
||||
(a1-14 "~Tspooling: ~A~%")
|
||||
(v1-4 (-> obj spooling))
|
||||
)
|
||||
(t9-14 a0-15 a1-14 (if v1-4
|
||||
(-> v1-4 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-15 format)
|
||||
(a0-16 #t)
|
||||
(a1-15 "~Thint: ~A~%")
|
||||
(v1-6 (-> obj hint))
|
||||
)
|
||||
(t9-15 a0-16 a1-15 (if v1-6
|
||||
(-> v1-6 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-16 format)
|
||||
(a0-17 #t)
|
||||
(a1-16 "~Tambient: ~A~%")
|
||||
(v1-8 (-> obj ambient))
|
||||
)
|
||||
(t9-16 a0-17 a1-16 (if v1-8
|
||||
(-> v1-8 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~Tvideo-mode: ~A~%" (-> obj video-mode))
|
||||
(format #t "~Taspect-ratio: ~A~%" (-> obj aspect-ratio))
|
||||
(format #t "~Tsound-flava: ~D~%" (-> obj sound-flava))
|
||||
(format #t "~Tauto-save: ~A~%" (-> obj auto-save))
|
||||
(format #t "~Tmusic-volume-movie: ~f~%" (-> obj music-volume-movie))
|
||||
(format #t "~Tsfx-volume-movie: ~f~%" (-> obj sfx-volume-movie))
|
||||
(format #t "~Tmusic: ~A~%" (-> obj music))
|
||||
(format #t "~Tbg-r: ~f~%" (-> obj bg-r))
|
||||
(format #t "~Tbg-g: ~f~%" (-> obj bg-g))
|
||||
(format #t "~Tbg-b: ~f~%" (-> obj bg-b))
|
||||
(format #t "~Tbg-a: ~f~%" (-> obj bg-a))
|
||||
(format #t "~Tbg-a-speed: ~f~%" (-> obj bg-a-speed))
|
||||
(format #t "~Tbg-a-force: ~f~%" (-> obj bg-a-force))
|
||||
(format #t "~Tallow-progress: ~A~%" (-> obj allow-progress))
|
||||
(format #t "~Tallow-pause: ~A~%" (-> obj allow-pause))
|
||||
(format #t "~Tsound-flava-priority: ~f~%" (-> obj sound-flava-priority))
|
||||
(format #t "~Tocean-off: ~A~%" (-> obj ocean-off))
|
||||
(format #t "~Tallow-look-around: ~A~%" (-> obj allow-look-around))
|
||||
(format #t "~Tambient-volume: ~f~%" (-> obj ambient-volume))
|
||||
(format #t "~Tambient-volume-movie: ~f~%" (-> obj ambient-volume-movie))
|
||||
(format #t "~Tdialog-volume-hint: ~f~%" (-> obj dialog-volume-hint))
|
||||
(format #t "~Tdummy[11] @ #x~X~%" (-> obj dummy))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type setting-control
|
||||
(deftype setting-control (basic)
|
||||
((current setting-data :inline :offset-assert 16)
|
||||
(target setting-data :inline :offset-assert 224)
|
||||
(default setting-data :inline :offset-assert 432)
|
||||
(engine engine :offset-assert 628)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x278
|
||||
:flag-assert #xe00000278
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type setting-control
|
||||
(defmethod inspect setting-control ((obj setting-control))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tcurrent: #<setting-data @ #x~X>~%" (-> obj current))
|
||||
(format #t "~Ttarget: #<setting-data @ #x~X>~%" (-> obj target))
|
||||
(format #t "~Tdefault: #<setting-data @ #x~X>~%" (-> obj default))
|
||||
(format #t "~Tengine: ~A~%" (-> obj engine))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type setting-control
|
||||
(defmethod
|
||||
new
|
||||
setting-control
|
||||
((allocation symbol) (type-to-make type) (arg0 int))
|
||||
(let
|
||||
((s4-0
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> s4-0 engine)
|
||||
((method-of-type engine new) allocation engine 'setting-control arg0)
|
||||
)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type scf-time
|
||||
(deftype scf-time (structure)
|
||||
((stat uint8 :offset-assert 0)
|
||||
(second uint8 :offset-assert 1)
|
||||
(minute uint8 :offset-assert 2)
|
||||
(hour uint8 :offset-assert 3)
|
||||
(week uint8 :offset-assert 4)
|
||||
(day uint8 :offset-assert 5)
|
||||
(month uint8 :offset-assert 6)
|
||||
(year uint8 :offset-assert 7)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type scf-time
|
||||
(defmethod inspect scf-time ((obj scf-time))
|
||||
(format #t "[~8x] ~A~%" obj 'scf-time)
|
||||
(format #t "~Tstat: ~D~%" (-> obj stat))
|
||||
(format #t "~Tsecond: #x~X~%" (-> obj second))
|
||||
(format #t "~Tminute: #x~X~%" (-> obj minute))
|
||||
(format #t "~Thour: #x~X~%" (-> obj hour))
|
||||
(format #t "~Tweek: #x~X~%" (-> obj week))
|
||||
(format #t "~Tday: #x~X~%" (-> obj day))
|
||||
(format #t "~Tmonth: #x~X~%" (-> obj month))
|
||||
(format #t "~Tyear: #x~X~%" (-> obj year))
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-3 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type game-text
|
||||
(deftype game-text (structure)
|
||||
((id uint32 :offset-assert 0)
|
||||
(text string :offset-assert 4)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type game-text
|
||||
(defmethod inspect game-text ((obj game-text))
|
||||
(format #t "[~8x] ~A~%" obj 'game-text)
|
||||
(format #t "~Tid: ~D~%" (-> obj id))
|
||||
(format #t "~Ttext: ~A~%" (-> obj text))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type game-text-info
|
||||
(deftype game-text-info (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(language-id int32 :offset-assert 8)
|
||||
(group-name string :offset-assert 12)
|
||||
(data game-text :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type game-text-info
|
||||
(defmethod inspect game-text-info ((obj game-text-info))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tlanguage-id: ~D~%" (-> obj language-id))
|
||||
(format #t "~Tgroup-name: ~A~%" (-> obj group-name))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *text-group-names*, type (array string)
|
||||
(define
|
||||
*text-group-names*
|
||||
(the-as (array string) (new 'static 'boxed-array string 1 "common"))
|
||||
)
|
||||
|
||||
;; definition for symbol *common-text-heap*, type kheap
|
||||
(define *common-text-heap* (the-as kheap (new 'global 'kheap)))
|
||||
|
||||
;; definition for symbol *common-text*, type symbol
|
||||
(define *common-text* #f)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-3 0))
|
||||
)
|
||||
|
||||
@@ -46,35 +46,36 @@
|
||||
|
||||
;; definition of type texture-pool
|
||||
(deftype texture-pool (basic)
|
||||
((top int32 :offset-assert 4)
|
||||
(cur int32 :offset-assert 8)
|
||||
(allocate-func basic :offset-assert 12)
|
||||
(font-palette int32 :offset-assert 16)
|
||||
(segment texture-pool-segment 4 :inline :offset-assert 20)
|
||||
(segment-near texture-pool-segment :inline :offset 20)
|
||||
(segment-common texture-pool-segment :inline :offset 28)
|
||||
(common-page int32 32 :offset-assert 52)
|
||||
(common-page-mask int32 :offset-assert 180)
|
||||
(ids int32 126 :offset-assert 184)
|
||||
((top int32 :offset-assert 4)
|
||||
(cur int32 :offset-assert 8)
|
||||
(allocate-func (function texture-pool texture-page kheap int texture-page) :offset-assert 12)
|
||||
(font-palette int32 :offset-assert 16)
|
||||
(segment-near texture-pool-segment :inline :offset-assert 20)
|
||||
(segment-common texture-pool-segment :inline :offset-assert 28)
|
||||
(segment texture-pool-segment 4 :inline :offset 20)
|
||||
(common-page texture-page 32 :offset-assert 52)
|
||||
(common-page-mask int32 :offset-assert 180)
|
||||
(ids uint32 126 :offset-assert 184)
|
||||
)
|
||||
:method-count-assert 23
|
||||
:size-assert #x2b0
|
||||
:flag-assert #x17000002b0
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
(dummy-15 () none 15)
|
||||
(dummy-16 () none 16)
|
||||
(new (symbol type) _type_ 0)
|
||||
(initialize! (_type_) _type_ 9)
|
||||
(print-usage (_type_) _type_ 10)
|
||||
(dummy-11 (_type_) none 11)
|
||||
(allocate-defaults! (_type_) none 12)
|
||||
(login-level-textures (_type_ level int (pointer texture-id)) none 13)
|
||||
(add-tex-to-dma! (_type_ level int) none 14)
|
||||
(allocate-vram-words! (_type_ int) int 15)
|
||||
(allocate-segment! (_type_ texture-pool-segment int) texture-pool-segment 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(upload-one-common! (_type_) symbol 21)
|
||||
(lookup-boot-common-id (_type_ int) int 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -85,16 +86,16 @@
|
||||
(format #t "~Tcur: #x~X~%" (-> obj cur))
|
||||
(format #t "~Tallocate-func: ~A~%" (-> obj allocate-func))
|
||||
(format #t "~Tfont-palette: ~D~%" (-> obj font-palette))
|
||||
(format #t "~Tsegment[4] @ #x~X~%" (-> obj segment))
|
||||
(format #t "~Tsegment[4] @ #x~X~%" (-> obj segment-near))
|
||||
(format
|
||||
#t
|
||||
"~Tsegment-near: #<texture-pool-segment @ #x~X>~%"
|
||||
(-> obj segment)
|
||||
(-> obj segment-near)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~Tsegment-common: #<texture-pool-segment @ #x~X>~%"
|
||||
(-> obj segment 1)
|
||||
(-> obj segment-common)
|
||||
)
|
||||
(format #t "~Tcommon-page[32] @ #x~X~%" (-> obj common-page))
|
||||
(format #t "~Tcommon-page-mask: ~D~%" (-> obj common-page-mask))
|
||||
@@ -108,7 +109,7 @@
|
||||
(h int16 :offset-assert 6)
|
||||
(num-mips uint8 :offset-assert 8)
|
||||
(tex1-control uint8 :offset-assert 9)
|
||||
(psm uint8 :offset-assert 10)
|
||||
(psm gs-psm :offset-assert 10)
|
||||
(mip-shift uint8 :offset-assert 11)
|
||||
(clutpsm uint16 :offset-assert 12)
|
||||
(dest uint16 7 :offset-assert 14)
|
||||
@@ -183,18 +184,18 @@
|
||||
(size uint32 :offset-assert 24)
|
||||
(segment texture-page-segment 3 :inline :offset-assert 28)
|
||||
(pad uint32 16 :offset-assert 64)
|
||||
(data uint8 :dynamic :offset-assert 128)
|
||||
(data texture :dynamic :offset-assert 128)
|
||||
)
|
||||
:method-count-assert 15
|
||||
:size-assert #x80
|
||||
:flag-assert #xf00000080
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(remove-from-heap (_type_ kheap) _type_ 9)
|
||||
(get-leftover-block-count (_type_ int int) int 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
(relocate-dests! (_type_ int int) none 12)
|
||||
(add-to-dma-buffer (_type_ dma-buffer int) none 13)
|
||||
(upload-now! (_type_ int) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -215,7 +216,8 @@
|
||||
|
||||
;; definition of type shader-ptr
|
||||
(deftype shader-ptr (uint32)
|
||||
()
|
||||
((shader uint32 :offset 8 :size 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
@@ -223,7 +225,7 @@
|
||||
|
||||
;; definition of type texture-link
|
||||
(deftype texture-link (structure)
|
||||
((next uint32 :offset-assert 0)
|
||||
((next shader-ptr 1 :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
@@ -233,17 +235,18 @@
|
||||
;; definition for method 3 of type texture-link
|
||||
(defmethod inspect texture-link ((obj texture-link))
|
||||
(format #t "[~8x] ~A~%" obj 'texture-link)
|
||||
(format #t "~Tnext: #x~X~%" (-> obj next))
|
||||
(format #t "~Tnext: #x~X~%" (-> obj next 0))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type texture-page-dir-entry
|
||||
(deftype texture-page-dir-entry (structure)
|
||||
((length int16 :offset-assert 0)
|
||||
(status uint16 :offset-assert 2)
|
||||
(page basic :offset-assert 4)
|
||||
(link uint32 :offset-assert 8)
|
||||
((length int16 :offset-assert 0)
|
||||
(status uint16 :offset-assert 2)
|
||||
(page texture-page :offset-assert 4)
|
||||
(link texture-link :offset-assert 8)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
@@ -261,7 +264,8 @@
|
||||
|
||||
;; definition of type texture-page-dir
|
||||
(deftype texture-page-dir (basic)
|
||||
((pad uint8 16 :offset-assert 4)
|
||||
((length int32 :offset-assert 4)
|
||||
(entries texture-page-dir-entry 1 :inline :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x14
|
||||
@@ -278,7 +282,7 @@
|
||||
(source uint32 :offset-assert 12)
|
||||
(move uint32 :offset-assert 16)
|
||||
(entry texture-page-dir-entry :offset-assert 20)
|
||||
(page basic :offset-assert 24)
|
||||
(page texture-page :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c
|
||||
@@ -311,17 +315,17 @@
|
||||
|
||||
;; definition of type adgif-shader
|
||||
(deftype adgif-shader (structure)
|
||||
((quad uint128 5 :offset 0)
|
||||
(prims uint64 10 :offset 0)
|
||||
(tex0 uint64 :offset 0)
|
||||
(tex1 uint64 :offset 16)
|
||||
(miptbp1 uint64 :offset 32)
|
||||
(clamp uint64 :offset 48)
|
||||
(clamp-reg uint64 :offset 56)
|
||||
(alpha uint64 :offset 64)
|
||||
(link-test uint32 :offset 8)
|
||||
(texture-id uint32 :offset 24)
|
||||
(next uint32 :offset 40)
|
||||
((quad uint128 5 :offset 0)
|
||||
(prims uint64 10 :offset 0)
|
||||
(tex0 uint64 :offset 0)
|
||||
(tex1 uint64 :offset 16)
|
||||
(miptbp1 uint64 :offset 32)
|
||||
(clamp uint64 :offset 48)
|
||||
(clamp-reg uint64 :offset 56)
|
||||
(alpha uint64 :offset 64)
|
||||
(link-test uint32 :offset 8)
|
||||
(texture-id uint32 :offset 24)
|
||||
(next shader-ptr :offset 40)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
@@ -405,6 +409,3 @@
|
||||
(let ((v0-14 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user