jak-project/goal_src/engine/ui/text-h.gc
water111 5b24e43143
Change syntax for boxed array to support different length and allocated-length (#568)
* change syntax for boxed array

* fix test and make the flava thing kind of work
2021-06-07 20:22:06 -04:00

45 lines
1.2 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: text-h.gc
;; name in dgo: text-h
;; dgos: GAME, ENGINE
;; This file contains types related to game text.
;; Each game string is assigned an ID number.
;; This ID is used to lookup the string for the currently selected language.
;; an individual string.
(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
)
;; A table of all strings.
(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 (_type_ uint symbol) string 9)
)
)
;; todo, need support for array
(define *text-group-names* (new 'static 'boxed-array :type string :length 1 "common"))
(define *common-text-heap* (new 'global 'kheap))
;; definition for symbol *common-text*, type game-text-info
(define *common-text* (the-as game-text-info #f))