This commit is contained in:
2023-07-06 01:17:06 +09:00
parent adbf71bc51
commit 83bd8c0772
3 changed files with 59 additions and 3 deletions
+46 -1
View File
@@ -1,18 +1,63 @@
#module \
Char
#const CHAR_WIDTH 32
#const UNKNOWN 52
#defcfunc local \
New \
str p_text
If insNum <= 0 {
NoteSel charDict
NoteLoad "dict.dat"
NoteUnsel
}
text.insNum = p_text
posX.insNum = gInfo_cX
posY.insNum = gInfo_cY
size.insNum = CHAR_WIDTH
exists.insNum = True
insNum++
Return insNum - 1
#deffunc local \
Put \
Destroy \
int p_insId
exists.insNum = False
Return
#deffunc local \
Draw \
local cnt_,\
local found,\
local zoom
Repeat insNum
If exists.cnt {
cnt_ = cnt
NoteSel charDict
Repeat StrLen (text.cnt_) / 3
Pos posX.cnt_ + cnt * size.cnt_, posY.cnt_
found = NoteFind (StrMid (text.cnt_, cnt * 3, 3))
If (found = -1) {
found = UNKNOWN
}
zoom = Double (size.cnt_) / CHAR_WIDTH
CelPut BUFFER_CHAR, found, zoom, zoom
Loop
NoteUnsel
}
Loop
Return
#global