• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BASIC compiler/interpreter for PIC32MX/MZ-80K


Commit MetaInfo

Révisiona7720c6e1a8d7821dbf4b46ff7766cb4f27ae286 (tree)
l'heure2019-03-03 09:24:51
AuteurKatsumi <kmorimatsu@sour...>
CommiterKatsumi

Message de Log

CKNJ12, CKNJ16: half size fonts for 7 bit chars

Change Summary

Modification

--- a/mips/classes/CKNJ12/CKNJ12.BAS
+++ b/mips/classes/CKNJ12/CKNJ12.BAS
@@ -1,4 +1,4 @@
1-REM CKNJ12.BAS ver 0.1
1+REM CKNJ12.BAS ver 0.2
22 REM Class CKNJ12 for MachiKania Type Z/M
33 REM using Shinonome 12x12 font
44
@@ -42,6 +42,10 @@ LABEL GPRTCH
4242 var i,x,y
4343 REM Create BMP from font file
4444 gosub FGETCH,args(1)
45+ if args(1)<0x100 then
46+ REM Half sized font
47+ goto GPRTHS
48+ endif
4549 for y=0 to 5
4650 i=peek(FBUFF+y*3)
4751 for x=0 to 7
@@ -78,14 +82,36 @@ LABEL GPRTCH
7882 REM Draw in graphic
7983 x=SYSTEM(28)
8084 y=SYSTEM(29)
85+ if SYSTEM(22)<x+12 then
86+ x=0
87+ y=y+12
88+ point x,y
89+ endif
8190 putbmp x,y,12,12,BMPF
82- if x+24<=SYSTEM(22) then
83- x=x+12
84- else
91+ point x+12,y
92+ return
93+
94+LABEL GPRTHS
95+ for y=0 to 11
96+ i=peek(FBUFF+y)
97+ for x=0 to 5
98+ if i and (1<<(7-x)) then
99+ poke BMPF+y*6+x,PLT>>8
100+ else
101+ poke BMPF+y*6+x,PLT and 0xff
102+ endif
103+ next
104+ next
105+ REM Draw in graphic
106+ x=SYSTEM(28)
107+ y=SYSTEM(29)
108+ if SYSTEM(22)<x+6 then
85109 x=0
86110 y=y+12
111+ point x,y
87112 endif
88- point x,y
113+ putbmp x,y,6,12,BMPF
114+ point x+6,y
89115 return
90116
91117 REM Private medthod FGETCH
@@ -103,6 +129,12 @@ LABEL FGETCH
103129 endif
104130 endif
105131 p=args(1)
132+ if 0x20<=p and p<=0x7f then
133+ REM 7 bits half size font
134+ fseek (p-0x20)*12
135+ fget FBUFF,12
136+ return
137+ endif
106138 if 2=MODE then
107139 REM UTF-8
108140 if p<0x0500 then
@@ -129,7 +161,7 @@ LABEL FGETCH
129161 REM EUC
130162 p=p-0xa1a1
131163 endif
132- p=p*18
164+ p=p*18+1152
133165 if 0<=p and p+18<flen() then
134166 fseek p
135167 fget FBUFF,18
@@ -166,9 +198,9 @@ LABEL EUCSTR
166198 i=i+2
167199 REM GPrint character
168200 gosub GPRTCH,j
169- elseif 0x20<b then
201+ elseif 0x20<b and b<0x80 then
170202 REM 7 bit character
171- gosub GPRTCH,0xa3b0+b-0x30
203+ gosub GPRTCH,b
172204 i=i+1
173205 endif
174206 wend
@@ -191,9 +223,9 @@ LABEL UTFSTR
191223 i=i+3
192224 REM GPrint character
193225 gosub GPRTCH,j
194- elseif 0x20<b then
226+ elseif 0x20<b and b<0x80 then
195227 REM 7 bit character
196- gosub GPRTCH,0xff00+b-0x20
228+ gosub GPRTCH,b
197229 i=i+1
198230 endif
199231 wend
Binary files a/mips/classes/CKNJ12/SHNMK12.JIS and b/mips/classes/CKNJ12/SHNMK12.JIS differ
Binary files a/mips/classes/CKNJ12/SHNMK12.UNI and b/mips/classes/CKNJ12/SHNMK12.UNI differ
--- a/mips/classes/CKNJ12/help.txt
+++ b/mips/classes/CKNJ12/help.txt
@@ -1,6 +1,6 @@
11 <クラス名およびバージョン>
22 CKNJ12
3-ver 0.1
3+ver 0.2
44
55 <ファイル名>
66 CKNJ12.BAS
--- a/mips/classes/CKNJ16/CKNJ16.BAS
+++ b/mips/classes/CKNJ16/CKNJ16.BAS
@@ -1,4 +1,4 @@
1-REM CKNJ16.BAS ver 0.11
1+REM CKNJ16.BAS ver 0.2
22 REM Class CKNJ16 for MachiKania Type Z/M
33 REM using Shinonome 16x16 font
44
@@ -42,6 +42,10 @@ LABEL GPRTCH
4242 var i,x,y
4343 REM Create BMP from font file
4444 gosub FGETCH,args(1)
45+ if args(1)<0x100 then
46+ REM Half sized font
47+ goto GPRTHS
48+ endif
4549 for y=0 to 15
4650 i=peek(FBUFF+y*2)
4751 for x=0 to 7
@@ -63,14 +67,36 @@ LABEL GPRTCH
6367 REM Draw in graphic
6468 x=SYSTEM(28)
6569 y=SYSTEM(29)
70+ if SYSTEM(22)<x+16 then
71+ x=0
72+ y=y+16
73+ point x,y
74+ endif
6675 putbmp x,y,16,16,BMPF
67- if x+32<=SYSTEM(22) then
68- x=x+16
69- else
76+ point x+16,y
77+ return
78+
79+LABEL GPRTHS
80+ for y=0 to 15
81+ i=peek(FBUFF+y)
82+ for x=0 to 7
83+ if i and (1<<(7-x)) then
84+ poke BMPF+y*8+x,PLT>>8
85+ else
86+ poke BMPF+y*8+x,PLT and 0xff
87+ endif
88+ next
89+ next
90+ REM Draw in graphic
91+ x=SYSTEM(28)
92+ y=SYSTEM(29)
93+ if SYSTEM(22)<x+8 then
7094 x=0
7195 y=y+16
96+ point x,y
7297 endif
73- point x,y
98+ putbmp x,y,8,16,BMPF
99+ point x+8,y
74100 return
75101
76102 REM Private medthod FGETCH
@@ -88,6 +114,12 @@ LABEL FGETCH
88114 endif
89115 endif
90116 p=args(1)
117+ if 0x20<=p and p<=0x7f then
118+ REM 7 bits half size font
119+ fseek (p-0x20)*16
120+ fget FBUFF,16
121+ return
122+ endif
91123 if 2=MODE then
92124 REM UTF-8
93125 if p<0x0500 then
@@ -114,7 +146,7 @@ LABEL FGETCH
114146 REM EUC
115147 p=p-0xa1a1
116148 endif
117- p=p*32
149+ p=p*32+1536
118150 if 0<=p and p+32<flen() then
119151 fseek p
120152 fget FBUFF,32
@@ -151,9 +183,9 @@ LABEL EUCSTR
151183 i=i+2
152184 REM GPrint character
153185 gosub GPRTCH,j
154- elseif 0x20<b then
186+ elseif 0x20<b and b<0x80 then
155187 REM 7 bit character
156- gosub GPRTCH,0xa3b0+b-0x30
188+ gosub GPRTCH,b
157189 i=i+1
158190 endif
159191 wend
@@ -176,9 +208,9 @@ LABEL UTFSTR
176208 i=i+3
177209 REM GPrint character
178210 gosub GPRTCH,j
179- elseif 0x20<b then
211+ elseif 0x20<b and b<0x80 then
180212 REM 7 bit character
181- gosub GPRTCH,0xff00+b-0x20
213+ gosub GPRTCH,b
182214 i=i+1
183215 endif
184216 wend
Binary files a/mips/classes/CKNJ16/SINONOME.JIS and b/mips/classes/CKNJ16/SINONOME.JIS differ
Binary files a/mips/classes/CKNJ16/SINONOME.UNI and b/mips/classes/CKNJ16/SINONOME.UNI differ
--- a/mips/classes/CKNJ16/help.txt
+++ b/mips/classes/CKNJ16/help.txt
@@ -1,6 +1,6 @@
11 <クラス名およびバージョン>
22 CKNJ16
3-ver 0.11
3+ver 0.2
44
55 <ファイル名>
66 CKNJ16.BAS