mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-14 00:14:05 +09:00
hangasm: rearranging some characters
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
assets/FontROM7x14_HANGUL.kra
LFS
BIN
assets/FontROM7x14_HANGUL.kra
LFS
Binary file not shown.
@@ -110,7 +110,7 @@ i:[
|
|||||||
],p:[
|
],p:[
|
||||||
0xc6,0x8e,0x8f,0xae,0xaf,0xce,0xcf,0xee,0xef,0xb0,0xb1,0xb2,0xb5,0xb6,0xfe
|
0xc6,0x8e,0x8f,0xae,0xaf,0xce,0xcf,0xee,0xef,0xb0,0xb1,0xb2,0xb5,0xb6,0xfe
|
||||||
],f:[
|
],f:[
|
||||||
0x20,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xdb,0xdc,0xdd,0xde,0xdf
|
0x20,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0x13,0x14,0x15,0x16,0x17
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,19 +145,27 @@ function toLineChar(i,p,f) {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let cursReturn = () => {
|
||||||
|
let c = graphics.getCursorYX()
|
||||||
|
con.move(c[0]-1,c[1]+1)
|
||||||
|
}
|
||||||
|
|
||||||
function printHangul(char) {
|
let printHangul = (char) => {
|
||||||
char.forEach((v,i)=>{
|
char.forEach((v,i)=>{
|
||||||
con.addch(v)
|
con.addch(v)
|
||||||
if (i % 2 == 0)
|
if (i % 2 == 0)
|
||||||
con.curs_down()
|
con.curs_down()
|
||||||
else {
|
else
|
||||||
let c = graphics.getCursorYX();
|
cursReturn()
|
||||||
con.move(c[0]-1,c[1]+1);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let printComma = (char) => {
|
||||||
|
con.addch(char)
|
||||||
|
con.curs_down()
|
||||||
|
con.addch(127)
|
||||||
|
cursReturn()
|
||||||
|
}
|
||||||
|
|
||||||
/*let text = "동해물과 백두산이 마르고 닳도록 7비트 한글조합"
|
/*let text = "동해물과 백두산이 마르고 닳도록 7비트 한글조합"
|
||||||
|
|
||||||
@@ -178,13 +186,18 @@ unicode.utf8toCodepoints(text).forEach(cp=>{
|
|||||||
|
|
||||||
// load unicode module to the TVDOS
|
// load unicode module to the TVDOS
|
||||||
if (unicode.uniprint) {
|
if (unicode.uniprint) {
|
||||||
unicode.uniprint.push([
|
unicode.uniprint.unshift([
|
||||||
c => 0xAC00 <= c && c <= 0xD7A3,
|
c => 0x2C == c || 0x3B == c || (0xAC00 <= c && c <= 0xD7A3),
|
||||||
c => {
|
c => {
|
||||||
let i = ((c - 0xAC00) / 588)|0
|
if (0x2C == c || 0x3B == c) {
|
||||||
let p = ((c - 0xAC00) / 28 % 21)|0
|
printComma(c)
|
||||||
let f = (c - 0xAC00) % 28
|
}
|
||||||
printHangul(toLineChar(i,p,f))
|
else {
|
||||||
|
let i = ((c - 0xAC00) / 588)|0
|
||||||
|
let p = ((c - 0xAC00) / 28 % 21)|0
|
||||||
|
let f = (c - 0xAC00) % 28
|
||||||
|
printHangul(toLineChar(i,p,f))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user