Kernel 0.9.1 : LibGui, Fonts.....

This commit is contained in:
Rémy GIBERT 2017-12-13 17:35:10 +01:00
parent 403e4f4e8a
commit aecea8d118
3 changed files with 109 additions and 57 deletions

Binary file not shown.

View File

@ -11,46 +11,7 @@ AUTO 6
.INB /A2OSX.BUILD/INC/MACROS.I
.INB /A2OSX.BUILD/INC/A2OSX.I
.INB /A2OSX.BUILD/INC/LIBGUI.I
*--------------------------------------
S.FNT.dfVersion .EQ 0
S.FNT.dfSize .EQ 2
S.FNT.dfCopyright .EQ 6
S.FNT.dfType .EQ 66
S.FNT.dfPoints .EQ 68
S.FNT.dfVertRes .EQ 70
S.FNT.dfHorizRes .EQ 72
S.FNT.dfAscent .EQ 74
S.FNT.dfInternalLeading .EQ 76
S.FNT.dfExternalLeading .EQ 78
S.FNT.dfItalic .EQ 80
S.FNT.dfUnderline .EQ 81
S.FNT.dfStrikeOut .EQ 82
S.FNT.dfWeight .EQ 83
S.FNT.dfCharSet .EQ 85
S.FNT.dfPixWidth .EQ 86
S.FNT.dfPixHeight .EQ 88
S.FNT.dfPitchAndFamily .EQ 90
S.FNT.dfAvgWidth .EQ 91
S.FNT.dfMaxWidth .EQ 93
S.FNT.dfFirstChar .EQ 95
S.FNT.dfLastChar .EQ 96
S.FNT.dfDefaultChar .EQ 97
S.FNT.dfBreakChar .EQ 98
S.FNT.dfWidthBytes .EQ 99
S.FNT.dfDevice .EQ 101
S.FNT.dfFace .EQ 105
S.FNT.dfBitsPointer .EQ 109
S.FNT.dfBitsOffset .EQ 113
S.FNT.dfReserved .EQ 117
S.FNT.dfCharTable2 .EQ 118
*S.FNT.dfFlags3 .EQ 118
*S.FNT.dfAspace3 .EQ 122
*S.FNT.dfBspace3 .EQ 124
*S.FNT.dfCspace3 .EQ 126
*S.FNT.dfColorPointer3 .EQ 128
*S.FNT.dfReserved13 .EQ 132
S.FNT.dfCharTable3 .EQ 148
.INB /A2OSX.BUILD/X.FNT.I
*--------------------------------------
ZPPTR1 .EQ ZPBIN
ZPInputBufPtr .EQ ZPBIN+2
@ -238,8 +199,7 @@ CS.RUN ldy #S.FNT.dfBreakChar
lda (ZPInputBufPtr),y
>STA.G FON.Header+S.FON.Default
>PUSHA
ldy #S.FNT.dfLastChar
lda (ZPInputBufPtr),y
>STA.G FON.Header+S.FON.Last
@ -257,11 +217,12 @@ CS.RUN ldy #S.FNT.dfBreakChar
>LDA.G FON.Header+S.FON.Last
sec
>SBC.G FON.Header+S.FON.First
inc
>STA.G CharCount
asl
pha
>STA.G BM.Offset
>STA.G FileOffset
lda #0
rol
iny
@ -269,27 +230,32 @@ CS.RUN ldy #S.FNT.dfBreakChar
ply
>SYSCALL GetMem.YA
bcs .9
>STYA ZPOutPutTblPtr
txa
>STA.G hTblBuf
lda #S.FON
clc
>ADC.G BM.Offset
>ADC.G FileOffset
sta (pData),y
sta ZPOutPutCharOfs
lda #S.FON+1
>ADC.G BM.Offset+1
iny
lda /S.FON
adc (pData),y
sta (pData),y
sta ZPOutPutCharOfs+1
>LEA.G BM.Offset
>LEA.G FileOffset
>PUSHYA
>PUSHBI SYS.FSeek.SET
>LDA.G hOutputFile
>PUSHA
>SYSCALL FSeek
bcc .1
rts
.9 rts
.1 >LDA.G FNT.Version
ldx #S.FNT.dfCharTable2
@ -424,7 +390,6 @@ CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
>CMP.G CharByteW
bne .2
clc
rts
*--------------------------------------
@ -733,6 +698,7 @@ CS.RUN.WriteByte
inc
>STA.G OutPutPtr
tay
clc
bne .8
>PUSHW ZPOutPutBufPtr
@ -743,11 +709,9 @@ CS.RUN.WriteByte
bcs .9
.8 inc ZPOutPutCharOfs
bne .81
bne .9
inc ZPOutPutCharOfs+1
.81 clc
.9 plx
ply
rts
@ -769,14 +733,53 @@ CS.RUN.FlushOutPutBuf
.8 rts
*--------------------------------------
CS.RUN.WriteBMAndTbl
ldy #FileOffset
ldx #4
lda #0
.1 sta (pData),y
iny
dex
bne .1
>LEA.G FileOffset
>PUSHYA
>PUSHBI SYS.FSeek.SET
>LDA.G hOutputFile
>PUSHA
>SYSCALL FSeek
bcs .9
>LEA.G FON.Header
>PUSHYA
>PUSHWI S.FON
>LDA.G hOutputFile
>PUSHA
>SYSCALL FWrite
bcs .9
>LDA.G hTblBuf
>SYSCALL GetMemPtr.A
>STYA ZPOutPutTblPtr
>PUSHYA
>LDA.G FON.Header+S.FON.Last
sec
>SBC.G FON.Header+S.FON.First
inc
asl
pha
lda #0
rol
ply
>PUSHYA
>LDA.G hOutputFile
>PUSHA
>SYSCALL FWrite
clc
rts
.9 rts
*--------------------------------------
CS.DOEVENT sec
rts
@ -839,7 +842,7 @@ CharOutPixW .BS 1
CharOutByteW .BS 1
hOutPutBuf .BS 1
OutPutPtr .BS 1
BM.Offset .BS 4
FileOffset .BS 4
DS.END
.ED

49
X.FNT.I.txt Normal file
View File

@ -0,0 +1,49 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
S.FNT.dfVersion .EQ 0
S.FNT.dfSize .EQ 2
S.FNT.dfCopyright .EQ 6
S.FNT.dfType .EQ 66
S.FNT.dfPoints .EQ 68
S.FNT.dfVertRes .EQ 70
S.FNT.dfHorizRes .EQ 72
S.FNT.dfAscent .EQ 74
S.FNT.dfInternalLeading .EQ 76
S.FNT.dfExternalLeading .EQ 78
S.FNT.dfItalic .EQ 80
S.FNT.dfUnderline .EQ 81
S.FNT.dfStrikeOut .EQ 82
S.FNT.dfWeight .EQ 83
S.FNT.dfCharSet .EQ 85
S.FNT.dfPixWidth .EQ 86
S.FNT.dfPixHeight .EQ 88
S.FNT.dfPitchAndFamily .EQ 90
S.FNT.dfAvgWidth .EQ 91
S.FNT.dfMaxWidth .EQ 93
S.FNT.dfFirstChar .EQ 95
S.FNT.dfLastChar .EQ 96
S.FNT.dfDefaultChar .EQ 97
S.FNT.dfBreakChar .EQ 98
S.FNT.dfWidthBytes .EQ 99
S.FNT.dfDevice .EQ 101
S.FNT.dfFace .EQ 105
S.FNT.dfBitsPointer .EQ 109
S.FNT.dfBitsOffset .EQ 113
S.FNT.dfReserved .EQ 117
S.FNT.dfCharTable2 .EQ 118
S.FNT.dfFlags3 .EQ 118
S.FNT.dfAspace3 .EQ 122
S.FNT.dfBspace3 .EQ 124
S.FNT.dfCspace3 .EQ 126
S.FNT.dfColorPointer3 .EQ 128
S.FNT.dfReserved13 .EQ 132
S.FNT.dfCharTable3 .EQ 148
*--------------------------------------
MAN
SAVE /A2OSX.BUILD/X.FNT.I