mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
5b24e43143
* change syntax for boxed array * fix test and make the flava thing kind of work
45 lines
1.2 KiB
Common Lisp
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))
|