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
+12 -2
View File
@@ -32,6 +32,7 @@
#include "./modules/goatoh.mod.hsp" #include "./modules/goatoh.mod.hsp"
#include "./modules/chat.mod.hsp" #include "./modules/chat.mod.hsp"
#include "./modules/char.mod.hsp"
#ifdef _DEBUG #ifdef _DEBUG
@@ -66,8 +67,8 @@
CelLoad "goatoh-tarso.png", BUFFER_GOATOH_TARSO CelLoad "goatoh-tarso.png", BUFFER_GOATOH_TARSO
CelDiv BUFFER_GOATOH_TARSO, 0, 0, 97, 49 CelDiv BUFFER_GOATOH_TARSO, 0, 0, 97, 49
CelLoad "char.png", BUFFER_CHAR CelLoad "font.png", BUFFER_CHAR
CelDiv BUFFER_CHAR, 32, 32, 0, 0 CelDiv BUFFER_CHAR, 32, 35, 0, 0
; ゴートうインスタンス生成 ; ゴートうインスタンス生成
Goatoh = New@Goatoh (960, 800, DIRECTION_LEFT) Goatoh = New@Goatoh (960, 800, DIRECTION_LEFT)
@@ -82,6 +83,13 @@
GMode GMODE_RGB0 ; アルファあり GMode GMODE_RGB0 ; アルファあり
Pos 100, 100
NoteSel test
NoteLoad "test.txt"
NoteUnsel
Text = New@Char (test)
size@Char.Text = 240
Repeat Repeat
ReDraw False ReDraw False
Pos 0, 0 Pos 0, 0
@@ -94,6 +102,8 @@
Print StrF ("gInfo_winY: %4d", gInfo_winY) Print StrF ("gInfo_winY: %4d", gInfo_winY)
Print StrF ("gInfo_dispX: %4d", gInfo_dispX) Print StrF ("gInfo_dispX: %4d", gInfo_dispX)
Print StrF ("gInfo_dispY: %4d", gInfo_dispY) Print StrF ("gInfo_dispY: %4d", gInfo_dispY)
Draw@Char
ReDraw True ReDraw True
Await LOOP_INTERVAL Await LOOP_INTERVAL
+46 -1
View File
@@ -1,18 +1,63 @@
#module \ #module \
Char Char
#const CHAR_WIDTH 32
#const UNKNOWN 52
#defcfunc local \ #defcfunc local \
New \ New \
str p_text str p_text
If insNum <= 0 {
NoteSel charDict
NoteLoad "dict.dat"
NoteUnsel
}
text.insNum = p_text text.insNum = p_text
posX.insNum = gInfo_cX
posY.insNum = gInfo_cY
size.insNum = CHAR_WIDTH
exists.insNum = True
insNum++ insNum++
Return insNum - 1 Return insNum - 1
#deffunc local \ #deffunc local \
Put \ Destroy \
int p_insId 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 Return
#global #global
Symlink
+1
View File
@@ -0,0 +1 @@
G://hsp-mod/userdef.as