-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.ps1
25 lines (20 loc) · 953 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env pwsh
Set-Content -Path .\zxspb.fnt -Value @"
info face=zxspb size=8 unicode=0 bold=0 italic=0 stretchH=100 aa=1 padding=0,0,0,0 spacing=0,0
common lineHeight=8 base=0 scaleW=128 scaleH=56 pages=1
page id=0 file=zxspb.png
"@
Set-Content -Path .\zxspw.fnt -Value @"
info face=zxspw size=8 unicode=0 bold=0 italic=0 stretchH=100 aa=1 padding=0,0,0,0 spacing=0,0
common lineHeight=8 base=0 scaleW=128 scaleH=56 pages=1
page id=0 file=zxspw.png
"@
$chars = ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_£abcdefghijklmnopqrstuvwxyz{|}~'.ToCharArray()
for ($i = 0; $i -lt 95; $i++)
{
$code = [byte][char]$chars[$i]
$x = $i%16*8
$y = [math]::Floor($i/16)*8
Add-Content -Path .\zxspb.fnt -Value "char id=$code x=$x y=$y width=8 height=8 xoffset=0 yoffset=0 xadvance=8 page=0 chnl=15"
Add-Content -Path .\zxspw.fnt -Value "char id=$code x=$x y=$y width=8 height=8 xoffset=0 yoffset=0 xadvance=8 page=0 chnl=15"
}