For example, some of the spacing and offset stuff could be replaced with tests of other things, like the backwards bit, line wrapping, and space lengths.
Also, if/when Lunatic adds support for \n characters.
*/
definequote 999
definequote 1000 AbCdEfGhIjKlM
definequote 1001 nOpQrStUvWxYz
definequote 1010 X1234567890-.!?;:'\ / %
definequote 1020 ^2R^8G^1B^7Y
definequote 1337 1337
definequote 2000 Left
definequote 2001 Center
definequote 2002 Right
definequote 2003 Top
definequote 2004 Center
definequote 2005 Bottom
definequote 3000 Spacing
definequote 3001 X-Offset
definequote 3002 %d: UiUiUiUiUi
definequote 3003 Justification
definequote 4000 Normal: aBcDeF
definequote 4001 Upper: aBcDeF
definequote 4002 Lower: aBcDeF
definequote 4003 Inverted: aBcDeF
definequote 5000 Rotate
definequote 5001 Top, Left:
definequote 5002 Center, Center:
definequote 5003 Bottom, Right:
gamevar font STARTALPHANUM 0
gamevar x 0 0
gamevar y 0 0
gamevar z 65536 0
gamevar blockangle 0 0
gamevar charangle 0 0
gamevar q 1000 0
gamevar shade 0 0
gamevar pal 0 0
gamevar o 16 0
gamevar alpha 0 0
gamevar xspace 5 0
gamevar yline 8 0
gamevar xbetween 0 0
gamevar ybetween 0 0
gamevar f 0 0
gamevar x1 0 0
gamevar y1 0 0
gamevar x2 0 0
gamevar y2 0 0
gamevar temp 0 0
state resetbounds
setvarvar x1 windowx1
setvarvar y1 windowy1
setvarvar x2 windowx2
setvarvar y2 windowy2
ends
onevent EVENT_ENTERLEVEL
state resetbounds
endevent
define TEXT_XRIGHT 0x00000001
define TEXT_XCENTER 0x00000002
define TEXT_YBOTTOM 0x00000004
define TEXT_YCENTER 0x00000008
define TEXT_INTERNALSPACE 0x00000010
define TEXT_TILESPACE 0x00000020
define TEXT_INTERNALLINE 0x00000040
define TEXT_TILELINE 0x00000080
define TEXT_XOFFSETZERO 0x00000100
define TEXT_XJUSTIFY 0x00000200
define TEXT_YOFFSETZERO 0x00000400
define TEXT_YJUSTIFY 0x00000800
define TEXT_LINEWRAP 0x00001000
define TEXT_UPPERCASE 0x00002000
define TEXT_INVERTCASE 0x00004000
define TEXT_IGNOREESCAPE 0x00008000
define TEXT_LITERALESCAPE 0x00010000
define TEXT_BACKWARDS 0x00020000
define TEXT_GAMETEXTNUMHACK 0x00040000
define TEXT_DIGITALNUMBER 0x00080000
define TEXT_BIGALPHANUM 0x00100000
define TEXT_GRAYFONT 0x00200000
state increment_line
ifvarg q 0
screentext font x y z blockangle charangle q shade pal o alpha xspace yline xbetween ybetween f x1 y1 x2 y2
addvar y 8
ends
state increment_line_test
ifvarg q 0
{
qsprintf 999 q temp
screentext font x y z blockangle charangle 999 shade pal o alpha xspace yline temp ybetween f x1 y1 x2 y2
}
addvar temp 1
addvar y 8
ends
onevent EVENT_DISPLAYREST
state resetbounds
// screentext font x y z blockangle charangle q shade pal o alpha xspace yline xbetween ybetween f x1 y1 x2 y2
// spacing
setvar f 0
setvar x 35
setvar y 3
setvar pal 0
setvar temp 0
setvar q 3000
state increment_line_test
setvar temp -3
setvar q 3002
state increment_line_test
state increment_line_test
state increment_line_test
state increment_line_test
state increment_line_test
state increment_line_test
state increment_line_test
// justification
setvar f 0
orvar f TEXT_XCENTER
orvar f TEXT_XJUSTIFY
screentext font 160 y z blockangle charangle 3003 shade 12 o alpha xspace yline 320 ybetween f x1 y1 x2 y2