Files
jak-project/test/decompiler/reference/jak1/engine/gfx/font-h_REF.gc
T
water111 48cb9bb787 [decompiler] as-type and font method support (#3855)
Add support for `as-type` macro, and detecting inline font methods. This
works in all three games but I've only updated jak 3's goal_src for now.
Eventually I will go back and work through the others, but I want to get
more decompiler features in first.


![image](https://github.com/user-attachments/assets/5c31bf85-97b4-437c-bc4b-dc054e60551e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-02-01 21:23:11 -05:00

684 lines
33 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type char-verts
(deftype char-verts (structure)
((pos vector 4 :inline)
(color vector 4 :inline)
(tex-st vector 4 :inline)
)
)
;; definition for method 3 of type char-verts
(defmethod inspect ((this char-verts))
(format #t "[~8x] ~A~%" this 'char-verts)
(format #t "~Tpos[4] @ #x~X~%" (-> this pos))
(format #t "~Tcolor[4] @ #x~X~%" (-> this color))
(format #t "~Ttex-st[4] @ #x~X~%" (-> this tex-st))
this
)
;; definition of type char-color
(deftype char-color (structure)
((color rgba 4)
)
)
;; definition for method 3 of type char-color
(defmethod inspect ((this char-color))
(format #t "[~8x] ~A~%" this 'char-color)
(format #t "~Tcolor[4] @ #x~X~%" (-> this color))
this
)
;; definition for symbol *font-default-matrix*, type matrix
(define *font-default-matrix* (new 'static 'matrix :vector (new 'static 'inline-array vector 4
(new 'static 'vector :x 1.0)
(new 'static 'vector :y 1.0)
(new 'static 'vector :z 1.0)
(new 'static 'vector :x -256.0 :w 1.0)
)
)
)
;; definition of type font-context
(deftype font-context (basic)
((origin vector :inline)
(strip-gif vector :inline)
(width float)
(height float)
(projection float)
(context-vec vector :inline :overlay-at width)
(color font-color)
(color-s32 int32 :overlay-at color)
(flags font-flags)
(flags-signed int32 :overlay-at flags)
(mat matrix)
(start-line uint32)
(scale float)
)
(:methods
(new (symbol type matrix int int float font-color font-flags) _type_)
(set-mat! (font-context matrix) font-context)
(set-origin! (font-context int int) font-context)
(set-depth! (font-context int) font-context)
(set-w! (font-context float) font-context)
(set-width! (font-context int) font-context)
(set-height! (font-context int) font-context)
(set-projection! (font-context float) font-context)
(set-color! (font-context font-color) font-context)
(set-flags! (font-context font-flags) font-context)
(set-start-line! (font-context uint) font-context)
(set-scale! (font-context float) font-context)
)
)
;; definition for method 3 of type font-context
(defmethod inspect ((this font-context))
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Torigin: #<vector @ #x~X>~%" (-> this origin))
(format #t "~Tstrip-gif: #<vector @ #x~X>~%" (-> this strip-gif))
(format #t "~Twidth: ~f~%" (-> this width))
(format #t "~Theight: ~f~%" (-> this height))
(format #t "~Tprojection: ~f~%" (-> this projection))
(format #t "~Tcolor: ~D~%" (-> this color))
(format #t "~Tflags: ~D~%" (-> this flags))
(format #t "~Tmat: #<matrix @ #x~X>~%" (-> this mat))
(format #t "~Tstart-line: ~D~%" (-> this start-line))
(format #t "~Tscale: ~f~%" (-> this scale))
this
)
;; definition for method 9 of type font-context
(defmethod set-mat! ((this font-context) (mat matrix))
(set! (-> this mat) mat)
this
)
;; definition for method 10 of type font-context
(defmethod set-origin! ((this font-context) (x int) (y int))
(set! (-> this origin x) (the float x))
(set! (-> this origin y) (the float y))
this
)
;; definition for method 11 of type font-context
(defmethod set-depth! ((this font-context) (z int))
(set! (-> this origin z) (the float z))
this
)
;; definition for method 12 of type font-context
(defmethod set-w! ((this font-context) (w float))
(set! (-> this origin w) w)
this
)
;; definition for method 13 of type font-context
(defmethod set-width! ((this font-context) (width int))
(set! (-> this width) (the float width))
this
)
;; definition for method 14 of type font-context
(defmethod set-height! ((this font-context) (height int))
(set! (-> this height) (the float height))
this
)
;; definition for method 15 of type font-context
(defmethod set-projection! ((this font-context) (proj float))
(set! (-> this projection) proj)
this
)
;; definition for method 16 of type font-context
(defmethod set-color! ((this font-context) (color font-color))
(set! (-> this color) color)
this
)
;; definition for method 17 of type font-context
(defmethod set-flags! ((this font-context) (flags font-flags))
(set! (-> this flags) flags)
this
)
;; definition for method 18 of type font-context
(defmethod set-start-line! ((this font-context) (start-line uint))
(set! (-> this start-line) start-line)
this
)
;; definition for method 19 of type font-context
(defmethod set-scale! ((this font-context) (scale float))
(set! (-> this scale) scale)
this
)
;; 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 font-color)
(flags font-flags)
)
(let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> this mat) mat)
(let ((v1-3 this))
(set! (-> v1-3 origin x) (the float x))
(set! (-> v1-3 origin y) (the float y))
)
(cond
((= z 0.0)
(let ((v1-4 this))
(set! (-> v1-4 origin z) (-> *math-camera* isometric vector 3 z))
)
)
(else
(let ((v1-5 this))
(set! (-> v1-5 origin z) z)
)
)
)
(let ((v1-6 this))
(set! (-> v1-6 origin w) 1.0)
)
(set-width! this 512)
(set-height! this 256)
(let ((v1-9 this))
(set! (-> v1-9 projection) 1.0)
)
(set! (-> this color) color)
(set! (-> this flags) flags)
(let ((a0-4 this))
(set! (-> a0-4 start-line) (the-as uint 0))
)
(set-scale! this 1.0)
this
)
)
;; definition of type font-work
(deftype font-work (structure)
((font-tmpl dma-gif-packet :inline)
(char-tmpl dma-gif-packet :inline)
(tex1-tmpl uint64 2)
(small-font-lo-tmpl uint64 2)
(small-font-lo-tmpl-qw uint128 :overlay-at (-> small-font-lo-tmpl 0))
(small-font-hi-tmpl uint64 2)
(small-font-hi-tmpl-qw uint128 :overlay-at (-> small-font-hi-tmpl 0))
(large-font-lo-tmpl uint64 2)
(large-font-lo-tmpl-qw uint128 :overlay-at (-> large-font-lo-tmpl 0))
(large-font-hi-tmpl uint64 2)
(large-font-hi-tmpl-qw uint128 :overlay-at (-> large-font-hi-tmpl 0))
(size1-small vector :inline)
(size2-small vector :inline)
(size3-small vector :inline)
(size1-large vector :inline)
(size2-large vector :inline)
(size3-large vector :inline)
(size-st1 vector :inline)
(size-st2 vector :inline)
(size-st3 vector :inline)
(save vector :inline)
(save-color vector 4 :inline)
(current-verts char-verts :inline)
(src-verts char-verts :inline)
(dest-verts char-verts :inline)
(justify vector 64 :inline)
(color-shadow vector4w :inline)
(color-table char-color 64 :inline)
(last-color font-color)
(last-color-32 int32 :overlay-at last-color)
(save-last-color font-color)
(save-last-color-32 int32 :overlay-at save-last-color)
(buf basic)
(str-ptr uint32)
(str-ptr-signed (pointer uint8) :overlay-at str-ptr)
(flags font-flags)
(flags-signed int32 :overlay-at flags)
(reg-save uint32 5)
)
)
;; definition for method 3 of type font-work
(defmethod inspect ((this font-work))
(format #t "[~8x] ~A~%" this 'font-work)
(format #t "~Tfont-tmpl: #<dma-gif-packet @ #x~X>~%" (-> this font-tmpl))
(format #t "~Tchar-tmpl: #<dma-gif-packet @ #x~X>~%" (-> this char-tmpl))
(format #t "~Ttex1-tmpl[2] @ #x~X~%" (-> this tex1-tmpl))
(format #t "~Tsmall-font-lo-tmpl[2] @ #x~X~%" (-> this small-font-lo-tmpl))
(format #t "~Tsmall-font-hi-tmpl[2] @ #x~X~%" (-> this small-font-hi-tmpl))
(format #t "~Tlarge-font-lo-tmpl[2] @ #x~X~%" (-> this large-font-lo-tmpl))
(format #t "~Tlarge-font-hi-tmpl[2] @ #x~X~%" (-> this large-font-hi-tmpl))
(format #t "~Tsize1-small: #<vector @ #x~X>~%" (-> this size1-small))
(format #t "~Tsize2-small: #<vector @ #x~X>~%" (-> this size2-small))
(format #t "~Tsize3-small: #<vector @ #x~X>~%" (-> this size3-small))
(format #t "~Tsize1-large: #<vector @ #x~X>~%" (-> this size1-large))
(format #t "~Tsize2-large: #<vector @ #x~X>~%" (-> this size2-large))
(format #t "~Tsize3-large: #<vector @ #x~X>~%" (-> this size3-large))
(format #t "~Tsize-st1: #<vector @ #x~X>~%" (-> this size-st1))
(format #t "~Tsize-st2: #<vector @ #x~X>~%" (-> this size-st2))
(format #t "~Tsize-st3: #<vector @ #x~X>~%" (-> this size-st3))
(format #t "~Tsave: #<vector @ #x~X>~%" (-> this save))
(format #t "~Tsave-color[4] @ #x~X~%" (-> this save-color))
(format #t "~Tcurrent-verts: #<char-verts @ #x~X>~%" (-> this current-verts))
(format #t "~Tsrc-verts: #<char-verts @ #x~X>~%" (-> this src-verts))
(format #t "~Tdest-verts: #<char-verts @ #x~X>~%" (-> this dest-verts))
(format #t "~Tjustify[64] @ #x~X~%" (-> this justify))
(format #t "~Tcolor-shadow: #<vector4w @ #x~X>~%" (-> this color-shadow))
(format #t "~Tcolor-table[64] @ #x~X~%" (-> this color-table))
(format #t "~Tlast-color: ~D~%" (-> this last-color))
(format #t "~Tsave-last-color: ~D~%" (-> this save-last-color))
(format #t "~Tbuf: ~A~%" (-> this buf))
(format #t "~Tstr-ptr: ~D~%" (-> this str-ptr))
(format #t "~Tflags: ~D~%" (-> this flags))
(format #t "~Treg-save[5] @ #x~X~%" (-> this reg-save))
this
)
;; 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)
)
:gif0 (new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1)
:nreg #x1
)
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))
)
: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)
)
:gif0 (new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1)
:nreg #xd
)
:gif1 (new 'static 'gif-tag-regs
:regs0 (gif-reg-id a+d)
:regs1 (gif-reg-id st)
:regs2 (gif-reg-id rgbaq)
:regs3 (gif-reg-id xyzf2)
:regs4 (gif-reg-id st)
:regs5 (gif-reg-id rgbaq)
:regs6 (gif-reg-id xyzf2)
:regs7 (gif-reg-id st)
:regs8 (gif-reg-id rgbaq)
:regs9 (gif-reg-id xyzf2)
:regs10 (gif-reg-id st)
:regs11 (gif-reg-id rgbaq)
:regs12 (gif-reg-id xyzf2)
)
)
: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 (/ (the-as int tex-addr) 64)
:psm psm
)
)
(none)
)
;; failed to figure out what this is:
0