mirror of
https://github.com/silenty4ng/k5web
synced 2025-04-10 18:48:50 +00:00
update
This commit is contained in:
parent
a78e16644f
commit
6df014f878
3 changed files with 39 additions and 11 deletions
BIN
public/new_font_h.bin
Normal file
BIN
public/new_font_h.bin
Normal file
Binary file not shown.
BIN
public/new_font_k.bin
Normal file
BIN
public/new_font_k.bin
Normal file
Binary file not shown.
|
@ -66,11 +66,6 @@ const restore = async(type: any = 1) => {
|
||||||
switch(type){
|
switch(type){
|
||||||
case 1:
|
case 1:
|
||||||
fontPacket = await fetch('/old_font.bin')
|
fontPacket = await fetch('/old_font.bin')
|
||||||
break
|
|
||||||
default:
|
|
||||||
alert('TODO')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const reader = fontPacket.body.getReader();
|
const reader = fontPacket.body.getReader();
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
while(true) {
|
while(true) {
|
||||||
|
@ -82,6 +77,39 @@ const restore = async(type: any = 1) => {
|
||||||
}
|
}
|
||||||
const binary = new Uint8Array(chunks)
|
const binary = new Uint8Array(chunks)
|
||||||
await restoreRange(0x02000, binary)
|
await restoreRange(0x02000, binary)
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
fontPacket = await fetch('/new_font_k.bin')
|
||||||
|
const reader = fontPacket.body.getReader();
|
||||||
|
const chunks = [];
|
||||||
|
while(true) {
|
||||||
|
const {done, value} = await reader.read();
|
||||||
|
if (done) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
chunks.push(...value)
|
||||||
|
}
|
||||||
|
const binary = new Uint8Array(chunks)
|
||||||
|
await restoreRange(0x02480, binary)
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
fontPacket = await fetch('/new_font_h.bin')
|
||||||
|
const reader = fontPacket.body.getReader();
|
||||||
|
const chunks = [];
|
||||||
|
while(true) {
|
||||||
|
const {done, value} = await reader.read();
|
||||||
|
if (done) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
chunks.push(...value)
|
||||||
|
}
|
||||||
|
const binary = new Uint8Array(chunks)
|
||||||
|
await restoreRange(0x02480, binary)
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
alert('TODO')
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue