#module
#deffunc gmesinit str, int, int, int, int
mref file, 32 : mref id, 1 : mref x, 2 : mref y, 3 : mref sp, 4
mref bmscr, 67
gid = id : sx = x : sy = y : space = sp
buffer gid
picload file
gsel bmscr.18 // アクティブウィンドウを戻す
gmode 2, sx, sy
return
#deffunc gmes str
mref string, 32
s = string
cx = csrx : cx.1 = cx : cy = csry
strlen len, s
repeat len
peek code, s, cnt
// 改行処理
if code = 13 {
peek code, s, cnt + 1
cx = cx.1 : cy += sy
continue cnt + (code = 10) + 1
}
pos cx, cy : gcopy gid, (code - 33) * sx
cx += sx + space
loop
return
#global
gmesinit "gfont.bmp", 1, 10, 20, 2
redraw 0
pos 20, 20 : gmes "This is a Graphical-Font show.\nCan you read this Message!?"
pos 20, 80 : gmes "I'm sorry that only the alphabet can be used..."
redraw 1
stop
|