mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-13 08:04:03 +09:00
fixing hangul print functions
This commit is contained in:
@@ -155,7 +155,9 @@ let printHangul = (char) => {
|
||||
if (i % 2 == 0)
|
||||
con.curs_down()
|
||||
else
|
||||
cursReturn()
|
||||
cursReturn()
|
||||
|
||||
//if (graphics.getCursorYX()[1] == 1) con.curs_down();
|
||||
})
|
||||
}
|
||||
|
||||
@@ -183,10 +185,18 @@ if (unicode.uniprint) {
|
||||
let f = (c - 0xAC00) % 28
|
||||
let char = toLineChar(i,p,f)
|
||||
let w = Math.ceil(char.length / 2.0)|0
|
||||
if (con.getyx()[1] + w > termw) println()
|
||||
if (con.getyx()[1] + w > termw) print('\n\n');
|
||||
printHangul(char)
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
unicode.uniprint.unshift([
|
||||
c => 0x20 == c,
|
||||
c => {
|
||||
if (con.getyx()[1] >= termw) print('\n\n');
|
||||
else print(' ')
|
||||
}
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
30
assets/disk0/tvdos/i18n/korean_font_upload.js
Normal file
30
assets/disk0/tvdos/i18n/korean_font_upload.js
Normal file
@@ -0,0 +1,30 @@
|
||||
let status = 0
|
||||
let workarea = sys.malloc(1920)
|
||||
|
||||
// install LOCHRROM
|
||||
let hangulRomL = files.open("A:/tvdos/i18n/hang_lo.chr")
|
||||
if (!hangulRomL.exists) {
|
||||
printerrln("hang_lo.chr not found")
|
||||
sys.free(workarea)
|
||||
return status
|
||||
}
|
||||
hangulRomL.pread(workarea, 1920, 0)
|
||||
for (let i = 0; i < 1920; i++) sys.poke(-133121 - i, sys.peek(workarea + i))
|
||||
sys.poke(-1299460, 18)
|
||||
|
||||
|
||||
// install HICHRROM
|
||||
let hangulRomH = files.open("A:/tvdos/i18n/hang_hi.chr")
|
||||
if (!hangulRomH.exists) {
|
||||
printerrln("hang_hi.chr not found")
|
||||
sys.free(workarea)
|
||||
sys.poke(-1299460, 20) // clean up the crap
|
||||
return status
|
||||
}
|
||||
hangulRomH.pread(workarea, 1920, 0)
|
||||
for (let i = 0; i < 1920; i++) sys.poke(-133121 - i, sys.peek(workarea + i))
|
||||
sys.poke(-1299460, 19)
|
||||
|
||||
|
||||
|
||||
sys.free(workarea)
|
||||
Reference in New Issue
Block a user