Kernel 0.9.1 : GUI, Fonts, bugfix

This commit is contained in:
Rémy GIBERT 2018-05-09 08:02:05 +02:00
parent 6b13da95f2
commit 0f520c6024
7 changed files with 49 additions and 27 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -789,13 +789,14 @@ Decimal.Out stz ZPTmpWord
cld
stz ZPTmpBool No leading 0
lda ZPTmpWord+1
and #$0f
beq .2
ora #$30
dec ZPTmpBool non zero, print everything
jsr Char.Out.Put
jsr Char.Out.Put30
.2 lda ZPTmpWord
lsr
@ -807,13 +808,12 @@ Decimal.Out stz ZPTmpWord
bit ZPTmpBool Print this digit ?
bpl .4
.3 ora #$30
jsr Char.Out.Put
.3 jsr Char.Out.Put30
.4 lda ZPTmpWord
and #$0f
ora #$30
*--------------------------------------
Char.Out.Put30 ora #$30
Char.Out.Put pha
lda OutPtr
clc

View File

@ -40,6 +40,7 @@ L.Filename .DA Filename
L.MouseData .DA MouseData
L.CB.Paint .DA CB.Paint
L.BM.Apple .DA BM.Apple
L.TXT.SampleB .DA TXT.SampleB
L.TXT.Sample .DA TXT.Sample
L.TXT.A2osX .DA TXT.A2osX
L.CB.Marylin .DA CB.Marylin
@ -62,6 +63,7 @@ CS.INIT >LDYA L.LIBGUI
>SYSCALL LoadStkObj
.98 bcs .99
sta hSYSFON
sta CB.DrawText+S.CB.hFont
sta CB.DrawA2osX+S.CB.hFont
>PUSHWI 0 Aux type
@ -71,17 +73,19 @@ CS.INIT >LDYA L.LIBGUI
>SYSCALL LoadStkObj
bcs .99
sta hSYSFONB
sta CB.DrawText+S.CB.hFont
sta CB.DrawTextB+S.CB.hFont
>PUSHWI 0 Aux type
>PUSHBI $CB Type
>PUSHBI SYS.FOpen.R
>PUSHW L.FILENAME
>SYSCALL LoadStkObj
.99 bcs .9
.99 bcs CS.INIT.RTS
sta CB.Marylin+S.CB.SrcPtr
>LDYA L.TXT.SampleB
>STYA CB.DrawTextB+S.CB.TxtPtr
>LDYA L.TXT.Sample
>STYA CB.DrawText+S.CB.TxtPtr
@ -104,7 +108,7 @@ CS.INIT >LDYA L.LIBGUI
sta (pPs)
clc
.9 rts
CS.INIT.RTS rts
*--------------------------------------
CS.RUN lda A2osX.ASCREEN GUI screen active ?
cmp #3
@ -216,16 +220,28 @@ CB.Paint .DA #S.CB.CMD.FILLRECT
.DA 519 X2
.DA 171 Y2
*--------------------------------------
CB.DrawText .DA #S.CB.CMD.DRAWTEXT
CB.DrawTextB .DA #S.CB.CMD.DRAWTEXT
.DA #S.CB.OP.SET OP
.DA #S.CB.M.MONO M
.DA #0 M
.BS 1 hFont
.DA 0 X1
.DA 0 Y1
.DA 0 SrcW
.DA 0 SrcH
.DA 4 DstX
.DA 7 DstY
.DA 2 DstY
.BS 2 TxtPtr
*--------------------------------------
CB.DrawText .DA #S.CB.CMD.DRAWTEXT
.DA #S.CB.OP.SET OP
.DA #0 M
.BS 1 hFont
.DA 0 X1
.DA 0 Y1
.DA 0 SrcW
.DA 0 SrcH
.DA 4 DstX
.DA 12 DstY
.BS 2 TxtPtr
*--------------------------------------
CB.Apple .DA #S.CB.CMD.BITBLT
@ -243,7 +259,7 @@ CB.Apple .DA #S.CB.CMD.BITBLT
*--------------------------------------
CB.DrawA2osX .DA #S.CB.CMD.DRAWTEXT
.DA #S.CB.OP.SET OP
.DA #S.CB.M.MONO M
.DA #255 M
.BS 1 hFont
.DA 0 X1
.DA 0 Y1
@ -269,8 +285,9 @@ BM.Apple .DA #S.BM.F.BBP4
.HS 9999 violet (11)
.HS 1FF1 Dark blue (4)
*--------------------------------------
TXT.Sample .AZ "@ This Is A Sample Text with SYSX7B.FON Height=7px, Variable Width {}[] #0123456789$ "
TXT.A2osX .AZ "A2osX"
TXT.SampleB .AZ "A2osX: A Sample Text with SYSX7B.FON Height=7px, Variable Width {}[] #0123456789$ "
TXT.Sample .AZ "XXXXXXXX: SYSX7.FON Height=7px, Variable Width @@ /\ () {}[] #0123456789$ "
TXT.A2osX .AZ "XXXXXXXXXXXXXXXXX"
*--------------------------------------
CB.Marylin .DA #S.CB.CMD.BITBLT
.DA #S.CB.OP.SET

View File

@ -236,12 +236,9 @@ GETTEXTSIZE clc
lda CB.Cache+S.CB.SrcW
ldx CB.Cache+S.CB.SrcW+1
ldy CB.Cache+S.CB.SrcH
bcs .5
rts
bcc GETRECTBUFSIZE.RTS
.5 sta DstBM.Cache+S.BM.W
sta DstBM.Cache+S.BM.W
stx DstBM.Cache+S.BM.W+1
sty DstBM.Cache+S.BM.H
stz DstBM.Cache+S.BM.H+1
@ -324,7 +321,8 @@ DRAWTEXT.SHIFT0 lda FON.Cache+S.FON.PixH
ldy GWORD get col index in BM
.7 jsr CHAR.GetNext
eor CB.Cache+S.CB.M
sta (ZPTmpPtr),y
iny
@ -348,18 +346,22 @@ DRAWTEXT.SHIFT1 lda FON.Cache+S.FON.PixH
.1 pha save Height counter
clc make sure reset first bit in line for initial ORA
ldx GBYTE2 init Width counter
ldy GWORD get col index in BM
.2 jsr CHAR.GetNext
eor CB.Cache+S.CB.M
rol 8th bit in ->carry, 1st bit from carry
asl 8th bit in ->carry
eor (ZPTmpPtr),y
sta (ZPTmpPtr),y
iny
lda #0
rol
sta (ZPTmpPtr),y
dex
bne .2
@ -399,6 +401,8 @@ DRAWTEXT.SHIFT26
.2 pha save Width counter
jsr CHAR.GetNext
eor CB.Cache+S.CB.M
pha
and First.Masks,x x = 2->6, for X=3 : A=000xxxxx
tay Range 0..127
@ -406,11 +410,11 @@ DRAWTEXT.SHIFT26
.3 lda $FFFF,y SELF MODIFIED ShiftL3 A=xxxxx000
ldy ColIndex get col index in BM
ora (ZPTmpPtr),y
eor (ZPTmpPtr),y
sta (ZPTmpPtr),y
inc ColIndex
lda (ZPCharPtr)
pla
and Last.Masks,x x = 2->6, for X=3 : A=xxx00000
lsr Range 0..127 !! A=0xxx0000
@ -446,6 +450,7 @@ DRAWTEXT.SHIFT7 lda FON.Cache+S.FON.PixH
ldy GWORD get col index in BM
.2 jsr CHAR.GetNext
eor CB.Cache+S.CB.M
lsr 1st bit in carry, for COL 1
pha Other 7 bits for COL 2
@ -453,7 +458,7 @@ DRAWTEXT.SHIFT7 lda FON.Cache+S.FON.PixH
lda #0
ror get back 1st bit, -> for bit 8
ora (ZPTmpPtr),y
eor (ZPTmpPtr),y
sta (ZPTmpPtr),y
iny