Files
jak-project/test/decompiler/reference/jak3/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

773 lines
39 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))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'char-verts)
(format #t "~1Tpos[4] @ #x~X~%" (-> this pos))
(format #t "~1Tcolor[4] @ #x~X~%" (-> this color))
(format #t "~1Ttex-st[4] @ #x~X~%" (-> this tex-st))
(label cfg-4)
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))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'char-color)
(format #t "~1Tcolor[4] @ #x~X~%" (-> this color))
(label cfg-4)
this
)
;; definition for symbol *font-default-matrix*, type matrix
(define *font-default-matrix* (new 'static 'matrix
:rvec (new 'static 'vector :x 1.0)
:uvec (new 'static 'vector :y 1.0)
:fvec (new 'static 'vector :z 1.0)
:trans (new 'static 'vector :x -256.0 :y -208.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)
(scale float)
(color font-color)
(color-signed int32 :overlay-at color)
(flags font-flags)
(mat matrix)
(start-line uint32)
(alpha float)
(max-x 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)
(set-alpha! (font-context float) font-context)
)
)
;; definition for method 3 of type font-context
(defmethod inspect ((this font-context))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Torigin: #<vector @ #x~X>~%" (-> this origin))
(format #t "~1Tstrip-gif: #<vector @ #x~X>~%" (-> this strip-gif))
(format #t "~1Twidth: ~f~%" (-> this width))
(format #t "~1Theight: ~f~%" (-> this height))
(format #t "~1Tprojection: ~f~%" (-> this projection))
(format #t "~1Tscale: ~f~%" (-> this scale))
(format #t "~1Tcolor: ~D~%" (-> this color))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tmat: #<matrix @ #x~X>~%" (-> this mat))
(format #t "~1Tstart-line: ~D~%" (-> this start-line))
(format #t "~1Talpha: ~f~%" (-> this alpha))
(format #t "~1Tmax-x: ~f~%" (-> this max-x))
(label cfg-4)
this
)
;; definition for method 9 of type font-context
(defmethod set-mat! ((this font-context) (arg0 matrix))
(set! (-> this mat) arg0)
this
)
;; definition for method 10 of type font-context
(defmethod set-origin! ((this font-context) (arg0 int) (arg1 int))
(set! (-> this origin x) (the float arg0))
(set! (-> this origin y) (the float arg1))
this
)
;; definition for method 11 of type font-context
(defmethod set-depth! ((this font-context) (arg0 int))
(set! (-> this origin z) (the float arg0))
this
)
;; definition for method 12 of type font-context
(defmethod set-w! ((this font-context) (arg0 float))
(set! (-> this origin w) arg0)
this
)
;; definition for method 13 of type font-context
(defmethod set-width! ((this font-context) (arg0 int))
(set! (-> this width) (the float arg0))
this
)
;; definition for method 14 of type font-context
(defmethod set-height! ((this font-context) (arg0 int))
(set! (-> this height) (the float arg0))
this
)
;; definition for method 15 of type font-context
(defmethod set-projection! ((this font-context) (arg0 float))
(set! (-> this projection) arg0)
this
)
;; definition for method 16 of type font-context
(defmethod set-color! ((this font-context) (arg0 font-color))
(set! (-> this color) arg0)
this
)
;; definition for method 17 of type font-context
(defmethod set-flags! ((this font-context) (arg0 font-flags))
(set! (-> this flags) arg0)
this
)
;; definition for method 18 of type font-context
(defmethod set-start-line! ((this font-context) (arg0 uint))
(set! (-> this start-line) arg0)
this
)
;; definition for method 19 of type font-context
(defmethod set-scale! ((this font-context) (arg0 float))
(set! (-> this scale) arg0)
this
)
;; definition for method 20 of type font-context
(defmethod set-alpha! ((this font-context) (arg0 float))
(set! (-> this alpha) arg0)
this
)
;; definition for method 0 of type font-context
(defmethod new font-context ((allocation symbol)
(type-to-make type)
(arg0 matrix)
(arg1 int)
(arg2 int)
(arg3 float)
(arg4 font-color)
(arg5 font-flags)
)
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> v0-0 mat) arg0)
(let ((v1-3 v0-0))
(set! (-> v1-3 origin x) (the float arg1))
(set! (-> v1-3 origin y) (the float arg2))
)
(cond
((= arg3 0.0)
(let ((v1-4 v0-0))
(set! (-> v1-4 origin z) (-> *math-camera* isometric trans z))
)
)
(else
(let ((v1-5 v0-0))
(set! (-> v1-5 origin z) arg3)
)
)
)
(let ((v1-6 v0-0))
(set! (-> v1-6 origin w) 1.0)
)
(set-width! v0-0 512)
(set-height! v0-0 416)
(let ((v1-9 v0-0))
(set! (-> v1-9 projection) 1.0)
)
(set! (-> v0-0 color) arg4)
(set! (-> v0-0 flags) arg5)
(let ((a0-6 v0-0))
(set! (-> a0-6 start-line) (the-as uint 0))
)
(set-scale! v0-0 1.0)
(let ((v1-14 v0-0))
(set! (-> v1-14 alpha) 1.0)
)
v0-0
)
)
;; 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-0-tmpl uint64 2)
(small-font-1-tmpl uint64 2)
(small-font-2-tmpl uint64 2)
(small-font-3-tmpl uint64 2)
(large-font-0-tmpl uint64 2)
(large-font-1-tmpl uint64 2)
(large-font-2-tmpl uint64 2)
(large-font-3-tmpl uint64 2)
(size1-small vector :inline)
(size2-small vector :inline)
(size3-small vector :inline)
(size1-large vector :inline)
(size2-large-0 vector :inline)
(size2-large-1 vector :inline)
(size2-large-2 vector :inline)
(size2-large-3 vector :inline)
(size3-large vector :inline)
(size2-0 vector :inline)
(size2-1 vector :inline)
(size2-2 vector :inline)
(size2-3 vector :inline)
(size-st1 vector :inline)
(size-st2 vector :inline)
(size-st3 vector :inline)
(save vector :inline)
(save-color vector 4 :inline)
(character-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 45 :inline)
(current-font-0-tmpl uint64 2)
(current-font-1-tmpl uint64 2)
(current-font-2-tmpl uint64 2)
(current-font-3-tmpl uint64 2)
(last-color font-color)
(save-last-color font-color)
(character-save-last-color uint32)
(buf basic)
(str-ptr uint32)
(flags font-flags)
(reg-save uint32 5)
)
(:methods
(set-context! (_type_ font-context) none)
)
)
;; definition for method 3 of type font-work
(defmethod inspect ((this font-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'font-work)
(format #t "~1Tfont-tmpl: #<dma-gif-packet @ #x~X>~%" (-> this font-tmpl))
(format #t "~1Tchar-tmpl: #<dma-gif-packet @ #x~X>~%" (-> this char-tmpl))
(format #t "~1Ttex1-tmpl[2] @ #x~X~%" (-> this tex1-tmpl))
(format #t "~1Tsmall-font-0-tmpl[2] @ #x~X~%" (-> this small-font-0-tmpl))
(format #t "~1Tsmall-font-1-tmpl[2] @ #x~X~%" (-> this small-font-1-tmpl))
(format #t "~1Tsmall-font-2-tmpl[2] @ #x~X~%" (-> this small-font-2-tmpl))
(format #t "~1Tsmall-font-3-tmpl[2] @ #x~X~%" (-> this small-font-3-tmpl))
(format #t "~1Tlarge-font-0-tmpl[2] @ #x~X~%" (-> this large-font-0-tmpl))
(format #t "~1Tlarge-font-1-tmpl[2] @ #x~X~%" (-> this large-font-1-tmpl))
(format #t "~1Tlarge-font-2-tmpl[2] @ #x~X~%" (-> this large-font-2-tmpl))
(format #t "~1Tlarge-font-3-tmpl[2] @ #x~X~%" (-> this large-font-3-tmpl))
(format #t "~1Tsize1-small: #<vector @ #x~X>~%" (-> this size1-small))
(format #t "~1Tsize2-small: #<vector @ #x~X>~%" (-> this size2-small))
(format #t "~1Tsize3-small: #<vector @ #x~X>~%" (-> this size3-small))
(format #t "~1Tsize1-large: #<vector @ #x~X>~%" (-> this size1-large))
(format #t "~1Tsize2-large-0: #<vector @ #x~X>~%" (-> this size2-large-0))
(format #t "~1Tsize2-large-1: #<vector @ #x~X>~%" (-> this size2-large-1))
(format #t "~1Tsize2-large-2: #<vector @ #x~X>~%" (-> this size2-large-2))
(format #t "~1Tsize2-large-3: #<vector @ #x~X>~%" (-> this size2-large-3))
(format #t "~1Tsize3-large: #<vector @ #x~X>~%" (-> this size3-large))
(format #t "~1Tsize2-0: #<vector @ #x~X>~%" (-> this size2-0))
(format #t "~1Tsize2-1: #<vector @ #x~X>~%" (-> this size2-1))
(format #t "~1Tsize2-2: #<vector @ #x~X>~%" (-> this size2-2))
(format #t "~1Tsize2-3: #<vector @ #x~X>~%" (-> this size2-3))
(format #t "~1Tsize-st1: #<vector @ #x~X>~%" (-> this size-st1))
(format #t "~1Tsize-st2: #<vector @ #x~X>~%" (-> this size-st2))
(format #t "~1Tsize-st3: #<vector @ #x~X>~%" (-> this size-st3))
(format #t "~1Tsave: #<vector @ #x~X>~%" (-> this save))
(format #t "~1Tsave-color[4] @ #x~X~%" (-> this save-color))
(format #t "~1Tcharacter-save-color[4] @ #x~X~%" (-> this character-save-color))
(format #t "~1Tcurrent-verts: #<char-verts @ #x~X>~%" (-> this current-verts))
(format #t "~1Tsrc-verts: #<char-verts @ #x~X>~%" (-> this src-verts))
(format #t "~1Tdest-verts: #<char-verts @ #x~X>~%" (-> this dest-verts))
(format #t "~1Tjustify[64] @ #x~X~%" (-> this justify))
(format #t "~1Tcolor-shadow: #<vector4w @ #x~X>~%" (-> this color-shadow))
(format #t "~1Tcolor-table[45] @ #x~X~%" (-> this color-table))
(format #t "~1Tcurrent-font-0-tmpl[2] @ #x~X~%" (-> this current-font-0-tmpl))
(format #t "~1Tcurrent-font-1-tmpl[2] @ #x~X~%" (-> this current-font-1-tmpl))
(format #t "~1Tcurrent-font-2-tmpl[2] @ #x~X~%" (-> this current-font-2-tmpl))
(format #t "~1Tcurrent-font-3-tmpl[2] @ #x~X~%" (-> this current-font-3-tmpl))
(format #t "~1Tlast-color: ~D~%" (-> this last-color))
(format #t "~1Tsave-last-color: ~D~%" (-> this save-last-color))
(format #t "~1Tcharacter-save-last-color: ~D~%" (-> this character-save-last-color))
(format #t "~1Tbuf: ~A~%" (-> this buf))
(format #t "~1Tstr-ptr: ~D~%" (-> this str-ptr))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Treg-save[5] @ #x~X~%" (-> this reg-save))
(label cfg-4)
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)
)
: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-0-tmpl (new 'static 'array uint64 2 #x0 #x6)
:small-font-1-tmpl (new 'static 'array uint64 2 #x0 #x6)
:small-font-2-tmpl (new 'static 'array uint64 2 #x0 #x6)
:small-font-3-tmpl (new 'static 'array uint64 2 #x0 #x6)
:large-font-0-tmpl (new 'static 'array uint64 2 #x0 #x6)
:large-font-1-tmpl (new 'static 'array uint64 2 #x0 #x6)
:large-font-2-tmpl (new 'static 'array uint64 2 #x0 #x6)
:large-font-3-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 14.857 :w 8.0)
:size3-small (new 'static 'vector :x 12.0 :y 14.857 :w 14.857)
:size1-large (new 'static 'vector :x 24.0 :w 1.0)
:size2-large-0 (new 'static 'vector :y 29.714 :w 24.0)
:size2-large-1 (new 'static 'vector :y 29.714 :w 24.0)
:size2-large-2 (new 'static 'vector :y 29.714 :w 24.0)
:size2-large-3 (new 'static 'vector :y 29.714 :w 24.0)
:size3-large (new 'static 'vector :x 24.0 :y 29.714 :w 29.714)
:size-st1 (new 'static 'vector :x 0.08985 :w 0.5)
:size-st2 (new 'static 'vector :y 0.031007752 :w 0.5)
:size-st3 (new 'static 'vector :x 0.08985 :y 0.031007752 :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 45
(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 #x70 :g #x78 :b #x70 :a #x80)
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :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 #x80 :g #x80 :b #x80 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x80 :g #x80 :b #x80 :a #x40)
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x80 :g #x20 :a #x80)
(new 'static 'rgba :r #x80 :g #x20 :a #x80)
(new 'static 'rgba :r #x80 :g #x20 :a #x80)
(new 'static 'rgba :r #x80 :g #x20 :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 :g #x64 :a #x80)
(new 'static 'rgba :r #x80 :g #x64 :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 #x80 :g #x80 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :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 :r #x20 :g #x80 :b #x20 :a #x80)
(new 'static 'rgba :r #x20 :g #x80 :b #x20 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :g #x20 :b #x80 :a #x80)
(new 'static 'rgba :g #x20 :b #x80 :a #x80)
(new 'static 'rgba :g #x20 :b #x80 :a #x80)
(new 'static 'rgba :g #x20 :b #x80 :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 #x80 :b #x80 :a #x80)
(new 'static 'rgba :g #x80 :b #x80 :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 #x80 :g #x40 :b #x80 :a #x80)
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :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 :r #x60 :g #x80 :b #x80 :a #x80)
(new 'static 'rgba :r #x60 :g #x80 :b #x80 :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 :r #x40 :g #x60 :b #x60 :a #x80)
(new 'static 'rgba :r #x40 :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 #x80)
(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 #x80 :g #x80 :b #x80 :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 #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 #x80 :g #x54 :a #x80)
(new 'static 'rgba :r #x80 :g #x54 :a #x80)
(new 'static 'rgba :r #x80 :g #x54 :a #x80)
(new 'static 'rgba :r #x80 :g #x54 :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 :r #x70 :g #x80 :b #x30 :a #x80)
(new 'static 'rgba :r #x70 :g #x80 :b #x30 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x48 :g #x58 :b #x10 :a #x80)
(new 'static 'rgba :r #x48 :g #x58 :b #x10 :a #x80)
(new 'static 'rgba :r #x48 :g #x58 :b #x10 :a #x80)
(new 'static 'rgba :r #x48 :g #x58 :b #x10 :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 #x58 :g #x60 :b #x58 :a #x80)
(new 'static 'rgba :r #x58 :g #x60 :b #x58 :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 #x40 :g #x48 :b #x40 :a #x80)
(new 'static 'rgba :r #x40 :g #x48 :b #x40 :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 #x20 :g #x5e :b #x78 :a #x80)
(new 'static 'rgba :r #x20 :g #x5e :b #x78 :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 #x57 :g #x7e :b #x80 :a #x80)
(new 'static 'rgba :r #x57 :g #x7e :b #x80 :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 #x7f :g #x7b :b #x33 :a #x80)
(new 'static 'rgba :r #x7f :g #x7b :b #x33 :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 #x79 :g #x79 :b #x2 :a #x80)
(new 'static 'rgba :r #x79 :g #x79 :b #x2 :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 :r #x47 :g #x68 :b #x7a :a #x80)
(new 'static 'rgba :r #x47 :g #x68 :b #x7a :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #xb7 :g #x80 :b #x7 :a #x80)
(new 'static 'rgba :r #xb7 :g #x80 :b #x7 :a #x80)
(new 'static 'rgba :r #xb7 :g #x80 :b #x7 :a #x80)
(new 'static 'rgba :r #xb7 :g #x80 :b #x7 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x80 :g #x80 :b #x40 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :b #x40 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :b #x40 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :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 #x80 :g #x80 :b #x80 :a #x80)
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x9a :g #x4d :a #x60)
(new 'static 'rgba :r #x9a :g #x4d :a #x60)
(new 'static 'rgba :r #x9a :g #x4d :a #x60)
(new 'static 'rgba :r #x9a :g #x4d :a #x60)
)
)
(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 #x70 :g #x78 :b #x70 :a #x80)
(new 'static 'rgba :r #x70 :g #x78 :b #x70 :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 #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 #x60 :b #x20 :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 'rgba :r #x80 :g #x60 :b #x20 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :b #x1 :a #x80)
(new 'static 'rgba :b #x1 :a #x80)
(new 'static 'rgba :b #x1 :a #x80)
(new 'static 'rgba :b #x1 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x48 :g #x74 :b #x48 :a #x80)
(new 'static 'rgba :r #x48 :g #x74 :b #x48 :a #x80)
(new 'static 'rgba :r #x48 :g #x74 :b #x48 :a #x80)
(new 'static 'rgba :r #x48 :g #x74 :b #x48 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :g #x39 :b #x67 :a #x80)
(new 'static 'rgba :g #x39 :b #x67 :a #x80)
(new 'static 'rgba :g #x39 :b #x67 :a #x80)
(new 'static 'rgba :g #x39 :b #x67 :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x7c :a #x80)
(new 'static 'rgba :r #x7c :a #x80)
(new 'static 'rgba :r #x7c :a #x80)
(new 'static 'rgba :r #x7c :a #x80)
)
)
(new 'static 'char-color :color (new 'static 'array rgba 4
(new 'static 'rgba :r #x60 :g #x60 :b #x60 :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 'rgba :r #x60 :g #x60 :b #x60 :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)
)
)
)
)
)
;; definition for function font-set-tex0
;; WARN: Return type mismatch int vs none.
(defun font-set-tex0 ((arg0 (pointer gs-tex0)) (arg1 texture) (arg2 int) (arg3 int) (arg4 int))
(set! (-> arg0 0) (new 'static 'gs-tex0
:tcc #x1
:cld #x1
:cbp arg4
:th (+ (log2 (+ (-> arg1 h) -1)) 1)
:tw (log2 (-> arg1 w))
:tbw (-> arg1 width 0)
:tbp0 (/ arg2 64)
:psm arg3
)
)
(none)
)
;; definition for function set-font-color
(defun set-font-color ((idx font-color) (clr0 rgba) (clr1 rgba) (clr2 rgba) (clr3 rgba))
(set! (-> *font-work* color-table idx color 0) clr0)
(set! (-> *font-work* color-table idx color 1) clr1)
(set! (-> *font-work* color-table idx color 2) clr2)
(set! (-> *font-work* color-table idx color 3) clr3)
0
)
;; failed to figure out what this is:
0