mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.92
This commit is contained in:
parent
cdbc85120d
commit
0b1112e5a2
Binary file not shown.
@ -13,9 +13,10 @@ AUTO 4,1
|
||||
.INB INC/IO.I
|
||||
.INB INC/GFX.I
|
||||
.INB INC/GFX.EVE.I
|
||||
.INB INC/GUI.I
|
||||
.INB INC/LIBGUI.I
|
||||
*--------------------------------------
|
||||
ZPPtr .EQ ZPDRV
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
CS.START cld
|
||||
@ -56,7 +57,7 @@ Dev.Detect >LDYA L.MSG.DETECT
|
||||
|
||||
.1 php
|
||||
sei
|
||||
|
||||
sta SET80STORE
|
||||
sta SETPAGE2
|
||||
ldx $400 Save Aux $400
|
||||
|
||||
@ -85,7 +86,6 @@ Dev.Detect >LDYA L.MSG.DETECT
|
||||
|
||||
plp
|
||||
|
||||
|
||||
>LDYA L.MSG.DETECT.EVE
|
||||
|
||||
bit DCB+S.DCB.GFX.S
|
||||
@ -106,6 +106,45 @@ Dev.Detect >LDYA L.MSG.DETECT
|
||||
>PUSHW L.FD.DEV.NAME
|
||||
>LDYA L.FD.DEV
|
||||
>SYSCALL MKDEV
|
||||
bcs .9
|
||||
|
||||
php
|
||||
sei
|
||||
>LDYAI $4000
|
||||
>STYA $800
|
||||
sta SETWRITEAUX
|
||||
>STYA $800
|
||||
sta CLRWRITEAUX
|
||||
|
||||
sta SET80STORE
|
||||
ldx #191
|
||||
lda #0
|
||||
|
||||
.4 ldy BASEL,x
|
||||
sty ZPPtr
|
||||
ldy BASEH,x
|
||||
sty ZPPtr+1
|
||||
|
||||
sta SETPAGE2
|
||||
|
||||
ldy #39
|
||||
|
||||
.5 sta (ZPPtr),y
|
||||
dey
|
||||
bpl .5
|
||||
|
||||
sta CLRPAGE2
|
||||
|
||||
ldy #39
|
||||
|
||||
.6 sta (ZPPtr),y
|
||||
dey
|
||||
bpl .6
|
||||
|
||||
dex
|
||||
bpl .4
|
||||
|
||||
plp
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
|
@ -8,9 +8,9 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
.INB INC/MACROS.I
|
||||
.INB INC/A2OSX.I
|
||||
.INB INC/IO.I
|
||||
.INB INC/MLI.E.I
|
||||
.INB INC/XY.MOUSE.I
|
||||
.INB INC/GUI.I
|
||||
.INB INC/LIBGUI.I
|
||||
*--------------------------------------
|
||||
ZPSlotPtr .EQ ZPDRV
|
||||
@ -234,6 +234,9 @@ READ >STYA ZPBufPtr NON STANDARD
|
||||
php
|
||||
sei
|
||||
|
||||
sta SET80STORE
|
||||
sta CLRPAGE2
|
||||
|
||||
* ldy #READMOUSE DONE BY IRQ MANAGER
|
||||
* jsr GOMOUSE
|
||||
|
||||
|
231
INC/GUI.I.txt
231
INC/GUI.I.txt
@ -1,231 +0,0 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* GC : Graphic Context
|
||||
*--------------------------------------
|
||||
S.GC.hParentGC .EQ 0
|
||||
S.GC.hDev .EQ 1
|
||||
S.GC.hMem .EQ 2
|
||||
*
|
||||
S.GC.X1 .EQ 4
|
||||
S.GC.Y1 .EQ 6
|
||||
S.GC.X2 .EQ 8
|
||||
S.GC.Y2 .EQ 10
|
||||
S.GC.W .EQ 12
|
||||
S.GC.H .EQ 14
|
||||
|
||||
S.GC.Cursor .EQ 15
|
||||
S.GC.Color .EQ 16
|
||||
S.GC.hFont .EQ 17
|
||||
S.GC.hBrush .EQ 18
|
||||
*
|
||||
S.GC .EQ 20
|
||||
*--------------------------------------
|
||||
S.CB.CMD .EQ 0
|
||||
S.CB.CMD.SETPIXEL .EQ 0
|
||||
S.CB.CMD.GETPIXEL .EQ 2
|
||||
S.CB.CMD.HLINE .EQ 4
|
||||
S.CB.CMD.VLINE .EQ 6
|
||||
S.CB.CMD.FILLRECT .EQ 8
|
||||
S.CB.CMD.BITBLT .EQ 10
|
||||
S.CB.CMD.GETRECTBUFSIZE .EQ 12
|
||||
S.CB.CMD.DRAWLINE .EQ 14
|
||||
S.CB.CMD.DRAWTEXT .EQ 16
|
||||
S.CB.CMD.GETTEXTSIZE .EQ 18
|
||||
S.CB.OP .EQ 1
|
||||
S.CB.OP.XOR .EQ 0 screen EOR bitmap -> Screen
|
||||
S.CB.OP.SET .EQ 2 replace screen with bitmap
|
||||
S.CB.OP.ORA .EQ 4 combine screen & bitmap -> Screen
|
||||
S.CB.OP.MASK .EQ %00001000 Apply BitMap mask before painting
|
||||
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
|
||||
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr
|
||||
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
|
||||
|
||||
S.CB.OP.F.B .EQ %00010000
|
||||
S.CB.OP.F.I .EQ %00100000
|
||||
S.CB.OP.F.U .EQ %01000000
|
||||
S.CB.OP.F.G .EQ %10000000
|
||||
S.CB.M .EQ 2
|
||||
S.CB.M.MONO .EQ %00000001 b/w (1 bit/pixel)
|
||||
*S.CB.M.C4 .EQ %00000010
|
||||
*S.CB.M.C8 .EQ %00000100
|
||||
S.CB.M.C16 .EQ %00001000 16 colors (4 bits/pixel)
|
||||
*S.CB.M.C256 .EQ %00010000 256 colors (8 bits/pixel)
|
||||
S.CB.COLOR .EQ 3 xPIXEL,xLINE,FILLRECT
|
||||
S.CB.hFont .EQ 3 DRAWTEXT
|
||||
S.CB.X1 .EQ 4 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.Y1 .EQ 6 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.X2 .EQ 8 VLINE,FILLRECT,DRAWLINE
|
||||
S.CB.Y2 .EQ 10 HLINE,FILLRECT,DRAWLINE
|
||||
S.CB.SrcW .EQ 8 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.SrcH .EQ 10 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.DstX .EQ 12 BITBLT,DRAWTEXT
|
||||
S.CB.DstY .EQ 14 BITBLT,DRAWTEXT
|
||||
S.CB.SrcPtr .EQ 16 BITBLT
|
||||
S.CB.TxtPtr .EQ 16 DRAWTEXT
|
||||
S.CB.DstPtr .EQ 18 BITBLT
|
||||
*
|
||||
S.CB .EQ 20
|
||||
*--------------------------------------
|
||||
CUR.T.ARROW .EQ 0
|
||||
CUR.T.RESIZEX .EQ 2
|
||||
CUR.T.RESIZEY .EQ 4
|
||||
CUR.T.RESIZEXY1 .EQ 6
|
||||
CUR.T.RESIZEXY2 .EQ 8
|
||||
CUR.T.CROSS .EQ 10
|
||||
CUR.T.TEXT .EQ 12
|
||||
CUR.T.WAIT .EQ 14
|
||||
*--------------------------------------
|
||||
S.MOUSE.X1 .EQ 0
|
||||
S.MOUSE.Y1 .EQ 2
|
||||
S.MOUSE.X2 .EQ 4
|
||||
S.MOUSE.Y2 .EQ 6
|
||||
S.MOUSE.S .EQ 8
|
||||
S.MOUSE.S.UP .EQ %00000001
|
||||
S.MOUSE.S.DOWN .EQ %00000010
|
||||
S.MOUSE.S.MOVE .EQ %00000100
|
||||
S.MOUSE.S.DRAGSTART .EQ %00001000
|
||||
S.MOUSE.S.DRAGEND .EQ %00010000
|
||||
S.MOUSE.S.CLK .EQ %00100000
|
||||
S.MOUSE.S.DCLK .EQ %01000000
|
||||
S.MOUSE.KEYMOD .EQ 9
|
||||
S.MOUSE.KEYMOD.OA .EQ %00000001
|
||||
S.MOUSE.KEYMOD.CA .EQ %00000010
|
||||
*
|
||||
S.MOUSE .EQ 10
|
||||
*--------------------------------------
|
||||
S.POINT.X .EQ 0
|
||||
S.POINT.Y .EQ 2
|
||||
*
|
||||
S.POINT .EQ 4
|
||||
*--------------------------------------
|
||||
S.RECT.X1 .EQ 0
|
||||
S.RECT.Y1 .EQ 2
|
||||
S.RECT.X2 .EQ 4
|
||||
S.RECT.Y2 .EQ 6
|
||||
*
|
||||
S.RECT .EQ 8
|
||||
*--------------------------------------
|
||||
S.OBJ.T .EQ 0
|
||||
S.OBJ.T.SCREEN .EQ 0
|
||||
S.OBJ.T.WND .EQ 2
|
||||
S.OBJ.T.MENUBAR .EQ 4
|
||||
S.OBJ.T.MENU .EQ 6
|
||||
S.OBJ.T.MITEM .EQ 8
|
||||
S.OBJ.T.BUT .EQ 10
|
||||
S.OBJ.T.TEXT .EQ 12
|
||||
|
||||
S.OBJ.F .EQ 1
|
||||
S.OBJ.S .EQ 2
|
||||
S.OBJ.ID .EQ 3
|
||||
S.OBJ.hOWNER .EQ 4
|
||||
S.OBJ.hPARENT .EQ 6
|
||||
|
||||
S.OBJ.X .EQ 8
|
||||
S.OBJ.Y .EQ 10
|
||||
S.OBJ.W .EQ 12
|
||||
S.OBJ.H .EQ 14
|
||||
*--------------------------------------
|
||||
S.WND.F.RESIZE .EQ %00000001
|
||||
S.WND.F.MOVE .EQ %00000010
|
||||
S.WND.F.CLOSE .EQ %00000100
|
||||
S.WND.F.MAX .EQ %00001000
|
||||
S.WND.F.MIN .EQ %00010000
|
||||
S.WND.F.NOBORDER .EQ %00100000
|
||||
S.WND.F.MODAL .EQ %01000000
|
||||
S.WND.F.SYSMODAL .EQ %10000000
|
||||
*
|
||||
S.WND.S.MAX .EQ %00001000
|
||||
S.WND.S.MIN .EQ %00010000
|
||||
*
|
||||
S.WND.MinW .EQ 16
|
||||
S.WND.MinH .EQ 18
|
||||
|
||||
S.WND.hTITLE .EQ 20
|
||||
S.WND.hMENUBAR .EQ 22
|
||||
S.WND.hBKCOLOR .EQ 24
|
||||
S.WND.hBKBM .EQ 26
|
||||
S.WND.hCUR .EQ 28
|
||||
S.WND.hSTATUS .EQ 30
|
||||
S.WND.hICON .EQ 32
|
||||
*
|
||||
S.WND .EQ 34
|
||||
*--------------------------------------
|
||||
S.MENUBAR
|
||||
*--------------------------------------
|
||||
S.MENU.hSAVEBUF .EQ 2
|
||||
* ... S.MITEMs...
|
||||
*--------------------------------------
|
||||
*S.MITEM.F. .EQ %00000001
|
||||
*S.MITEM.F. .EQ %00000010
|
||||
*S.MITEM.F. .EQ %00000100
|
||||
*S.MITEM.F. .EQ %00001000
|
||||
*S.MITEM.F. .EQ %00010000
|
||||
S.MITEM.F.SEP .EQ %00100000
|
||||
S.MITEM.F.CHECKED .EQ %01000000
|
||||
S.MITEM.F.DISABLED .EQ %10000000
|
||||
S.MITEM.ID .EQ 1
|
||||
S.MITEM.hSUBM .EQ 2
|
||||
S.MITEM.hBM .EQ 3
|
||||
S.MITEM.HOTKEY .EQ 4
|
||||
S.MITEM.HOTKEY.CTRL .EQ %10000000
|
||||
S.MITEM.HOTKEY.OA .EQ %01000000
|
||||
S.MITEM.HOTKEY.CA .EQ %00100000
|
||||
S.MITEM.TEXTLEN .EQ 5
|
||||
S.MITEM.TEXT .EQ 6 CSTR
|
||||
* ...
|
||||
*--------------------------------------
|
||||
S.BUT.T .EQ 0
|
||||
S.BUT.F .EQ 1
|
||||
S.BUT.F.DISABLED .EQ %10000000
|
||||
S.BUT.S .EQ 2
|
||||
S.BUT.S.PUSHED .EQ %10000000
|
||||
S.BUT.ID .EQ 3
|
||||
S.BUT.hOWNER .EQ 4
|
||||
S.BUT.hPARENT .EQ 6
|
||||
S.BUT.X .EQ 8
|
||||
S.BUT.Y .EQ 10
|
||||
S.BUT.W .EQ 12
|
||||
S.BUT.H .EQ 14
|
||||
S.BUT.hBM .EQ 16
|
||||
S.BUT.TEXTX .EQ 18
|
||||
S.BUT.TEXTY .EQ 20
|
||||
S.BUT.TEXTLEN .EQ 22
|
||||
S.BUT.TEXT .EQ 23
|
||||
* ...
|
||||
*--------------------------------------
|
||||
S.TEXT.T .EQ 0
|
||||
S.TEXT.F .EQ 1
|
||||
S.TEXT.F.DISABLED .EQ %10000000
|
||||
S.TEXT.ID .EQ 2
|
||||
S.TEXT.hBM .EQ 3
|
||||
S.TEXT.TEXTLEN .EQ 5
|
||||
S.TEXT.TEXT .EQ 6
|
||||
*--------------------------------------
|
||||
S.BM.F .EQ 0
|
||||
S.BM.F.BBP1 .EQ %00000001
|
||||
S.BM.F.BBP2 .EQ %00000010
|
||||
S.BM.F.BBP4 .EQ %00000100
|
||||
S.BM.F.BBP8 .EQ %00001000
|
||||
S.BM.RowBytes .EQ 1
|
||||
S.BM.W .EQ 2
|
||||
S.BM.H .EQ 4
|
||||
S.BM.MASK.OFS .EQ 6
|
||||
*
|
||||
S.BM .EQ 8
|
||||
*--------------------------------------
|
||||
S.FON.F .EQ 0
|
||||
S.FON.Ascent .EQ 1
|
||||
S.FON.PixW .EQ 2 if 0, variable W
|
||||
S.FON.PixH .EQ 3
|
||||
S.FON.First .EQ 4
|
||||
S.FON.Last .EQ 5
|
||||
S.FON.Default .EQ 6
|
||||
S.FON.Break .EQ 7
|
||||
*
|
||||
S.FON .EQ 8
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE INC/GUI.I
|
217
INC/LIBGUI.I.txt
217
INC/LIBGUI.I.txt
@ -11,7 +11,222 @@ LIBGUI.HideCursor .EQ 10
|
||||
LIBGUI.ShowCursor .EQ 12
|
||||
LIBGUI.UpdateCursor .EQ 14
|
||||
LIBGUI.ReadMouse .EQ 16
|
||||
LIBGUI.GetScreenGC .EQ 18
|
||||
*--------------------------------------
|
||||
* Resource Headers
|
||||
*--------------------------------------
|
||||
S.BM.F .EQ 0
|
||||
S.BM.F.BBP1 .EQ %00000001
|
||||
S.BM.F.BBP2 .EQ %00000010
|
||||
S.BM.F.BBP4 .EQ %00000100
|
||||
S.BM.F.BBP8 .EQ %00001000
|
||||
S.BM.RowBytes .EQ 1
|
||||
S.BM.W .EQ 2
|
||||
S.BM.H .EQ 4
|
||||
S.BM.MASK.OFS .EQ 6
|
||||
*
|
||||
S.BM .EQ 8
|
||||
*--------------------------------------
|
||||
S.FON.F .EQ 0
|
||||
S.FON.Ascent .EQ 1
|
||||
S.FON.PixW .EQ 2 if 0, variable W
|
||||
S.FON.PixH .EQ 3
|
||||
S.FON.First .EQ 4
|
||||
S.FON.Last .EQ 5
|
||||
S.FON.Default .EQ 6
|
||||
S.FON.Break .EQ 7
|
||||
*
|
||||
S.FON .EQ 8
|
||||
*--------------------------------------
|
||||
* Command Block
|
||||
*--------------------------------------
|
||||
S.CB.CMD .EQ 0
|
||||
S.CB.CMD.SETPIXEL .EQ 0
|
||||
S.CB.CMD.GETPIXEL .EQ 2
|
||||
S.CB.CMD.HLINE .EQ 4
|
||||
S.CB.CMD.VLINE .EQ 6
|
||||
S.CB.CMD.FILLRECT .EQ 8
|
||||
S.CB.CMD.BITBLT .EQ 10
|
||||
S.CB.CMD.GETRECTBUFSIZE .EQ 12
|
||||
S.CB.CMD.DRAWLINE .EQ 14
|
||||
S.CB.CMD.DRAWTEXT .EQ 16
|
||||
S.CB.CMD.GETTEXTSIZE .EQ 18
|
||||
S.CB.OP .EQ 1
|
||||
S.CB.OP.XOR .EQ 0 screen EOR bitmap -> Screen
|
||||
S.CB.OP.SET .EQ 2 replace screen with bitmap
|
||||
S.CB.OP.ORA .EQ 4 combine screen & bitmap -> Screen
|
||||
S.CB.OP.MASK .EQ %00001000 Apply BitMap mask before painting
|
||||
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
|
||||
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr
|
||||
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
|
||||
|
||||
S.CB.OP.F.B .EQ %00010000
|
||||
S.CB.OP.F.I .EQ %00100000
|
||||
S.CB.OP.F.U .EQ %01000000
|
||||
S.CB.OP.F.G .EQ %10000000
|
||||
S.CB.M .EQ 2
|
||||
S.CB.M.MONO .EQ %00000001 b/w (1 bit/pixel)
|
||||
*S.CB.M.C4 .EQ %00000010
|
||||
*S.CB.M.C8 .EQ %00000100
|
||||
S.CB.M.C16 .EQ %00001000 16 colors (4 bits/pixel)
|
||||
*S.CB.M.C256 .EQ %00010000 256 colors (8 bits/pixel)
|
||||
S.CB.COLOR .EQ 3 xPIXEL,xLINE,FILLRECT
|
||||
S.CB.hFont .EQ 3 DRAWTEXT
|
||||
S.CB.X1 .EQ 4 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.Y1 .EQ 6 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.X2 .EQ 8 VLINE,FILLRECT,DRAWLINE
|
||||
S.CB.Y2 .EQ 10 HLINE,FILLRECT,DRAWLINE
|
||||
S.CB.SrcW .EQ 8 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.SrcH .EQ 10 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.DstX .EQ 12 BITBLT,DRAWTEXT
|
||||
S.CB.DstY .EQ 14 BITBLT,DRAWTEXT
|
||||
S.CB.SrcPtr .EQ 16 BITBLT
|
||||
S.CB.TxtPtr .EQ 16 DRAWTEXT
|
||||
S.CB.DstPtr .EQ 18 BITBLT
|
||||
*
|
||||
S.CB .EQ 20
|
||||
*--------------------------------------
|
||||
CUR.T.ARROW .EQ 0
|
||||
CUR.T.RESIZEX .EQ 2
|
||||
CUR.T.RESIZEY .EQ 4
|
||||
CUR.T.RESIZEXY1 .EQ 6
|
||||
CUR.T.RESIZEXY2 .EQ 8
|
||||
CUR.T.CROSS .EQ 10
|
||||
CUR.T.TEXT .EQ 12
|
||||
CUR.T.WAIT .EQ 14
|
||||
*--------------------------------------
|
||||
S.MOUSE.X1 .EQ 0
|
||||
S.MOUSE.Y1 .EQ 2
|
||||
S.MOUSE.X2 .EQ 4
|
||||
S.MOUSE.Y2 .EQ 6
|
||||
S.MOUSE.S .EQ 8
|
||||
S.MOUSE.S.UP .EQ %00000001
|
||||
S.MOUSE.S.DOWN .EQ %00000010
|
||||
S.MOUSE.S.MOVE .EQ %00000100
|
||||
S.MOUSE.S.DRAGSTART .EQ %00001000
|
||||
S.MOUSE.S.DRAGEND .EQ %00010000
|
||||
S.MOUSE.S.CLK .EQ %00100000
|
||||
S.MOUSE.S.DCLK .EQ %01000000
|
||||
S.MOUSE.KEYMOD .EQ 9
|
||||
S.MOUSE.KEYMOD.OA .EQ %00000001
|
||||
S.MOUSE.KEYMOD.CA .EQ %00000010
|
||||
*
|
||||
S.MOUSE .EQ 10
|
||||
*--------------------------------------
|
||||
S.POINT.X .EQ 0
|
||||
S.POINT.Y .EQ 2
|
||||
*
|
||||
S.POINT .EQ 4
|
||||
*--------------------------------------
|
||||
S.RECT.X1 .EQ 0
|
||||
S.RECT.Y1 .EQ 2
|
||||
S.RECT.X2 .EQ 4
|
||||
S.RECT.Y2 .EQ 6
|
||||
*
|
||||
S.RECT .EQ 8
|
||||
*--------------------------------------
|
||||
S.OBJ.T .EQ 0
|
||||
S.OBJ.T.SCREEN .EQ 0
|
||||
S.OBJ.T.WND .EQ 2
|
||||
S.OBJ.T.MENUBAR .EQ 4
|
||||
S.OBJ.T.MENU .EQ 6
|
||||
S.OBJ.T.MITEM .EQ 8
|
||||
S.OBJ.T.BUT .EQ 10
|
||||
S.OBJ.T.TEXT .EQ 12
|
||||
|
||||
S.OBJ.F .EQ 1
|
||||
S.OBJ.S .EQ 2
|
||||
S.OBJ.ID .EQ 3
|
||||
S.OBJ.hOWNER .EQ 4
|
||||
S.OBJ.hPARENT .EQ 6
|
||||
|
||||
S.OBJ.X1 .EQ 8
|
||||
S.OBJ.Y1 .EQ 10
|
||||
S.OBJ.X2 .EQ 12
|
||||
S.OBJ.Y2 .EQ 14
|
||||
S.OBJ.W .EQ 16
|
||||
S.OBJ.H .EQ 18
|
||||
S.OBJ.Childs .EQ 20
|
||||
*
|
||||
S.OBJ .EQ 22
|
||||
*--------------------------------------
|
||||
S.SCREEN.hDEV .EQ S.OBJ
|
||||
*
|
||||
S.SCREEN .EQ S.OBJ+1
|
||||
*--------------------------------------
|
||||
S.WND.F.RESIZE .EQ %00000001
|
||||
S.WND.F.MOVE .EQ %00000010
|
||||
S.WND.F.CLOSE .EQ %00000100
|
||||
S.WND.F.MAX .EQ %00001000
|
||||
S.WND.F.MIN .EQ %00010000
|
||||
S.WND.F.BORDER .EQ %00100000
|
||||
S.WND.F.MODAL .EQ %01000000
|
||||
S.WND.F.SYSMODAL .EQ %10000000
|
||||
*
|
||||
S.WND.S.MAX .EQ %00001000
|
||||
S.WND.S.MIN .EQ %00010000
|
||||
*
|
||||
S.WND.MinW .EQ S.OBJ
|
||||
S.WND.MinH .EQ S.OBJ+2
|
||||
S.WND.hTITLE .EQ S.OBJ+4
|
||||
S.WND.hMENUBAR .EQ S.OBJ+6
|
||||
S.WND.hBKCOLOR .EQ S.OBJ+8
|
||||
S.WND.hBKBM .EQ S.OBJ+10
|
||||
S.WND.hCUR .EQ S.OBJ+12
|
||||
S.WND.hSTATUS .EQ S.OBJ+14
|
||||
S.WND.hICON .EQ S.OBJ+16
|
||||
S.WND.InnerW .EQ S.OBJ+18
|
||||
S.WND.InnerH .EQ S.OBJ+20
|
||||
*
|
||||
S.WND .EQ S.OBJ+22
|
||||
*--------------------------------------
|
||||
S.MBAR.MENULIST .EQ S.OBJ
|
||||
* ... S.MENUs...
|
||||
*--------------------------------------
|
||||
S.MENU.hSAVEBUF .EQ S.OBJ
|
||||
S.MENU.ITEMLIST .EQ S.OBJ+2
|
||||
* ... S.MITEMs...
|
||||
*--------------------------------------
|
||||
*S.MITEM.F. .EQ %00000001
|
||||
*S.MITEM.F. .EQ %00000010
|
||||
*S.MITEM.F. .EQ %00000100
|
||||
*S.MITEM.F. .EQ %00001000
|
||||
*S.MITEM.F. .EQ %00010000
|
||||
S.MITEM.F.SEP .EQ %00100000
|
||||
*
|
||||
S.MITEM.S
|
||||
S.MITEM.S.CHECKED .EQ %01000000
|
||||
S.MITEM.S.DISABLED .EQ %10000000
|
||||
*
|
||||
S.MITEM.hSUBM .EQ S.OBJ
|
||||
S.MITEM.hBM .EQ S.OBJ+2
|
||||
S.MITEM.HOTKEY .EQ S.OBJ+4
|
||||
S.MITEM.KEYMOD .EQ S.OBJ+5
|
||||
S.MITEM.KEYMOD.CTRL .EQ %10000000
|
||||
S.MITEM.KEYMOD.OA .EQ %01000000
|
||||
S.MITEM.KEYMOD.CA .EQ %00100000
|
||||
S.MITEM.TEXTLEN .EQ S.OBJ+6
|
||||
S.MITEM.TEXT .EQ S.OBJ+8 CSTR
|
||||
* ...
|
||||
*--------------------------------------
|
||||
S.BUT.F.DISABLED .EQ %10000000
|
||||
*
|
||||
S.BUT.S.PUSHED .EQ %10000000
|
||||
*
|
||||
S.BUT.hBM .EQ S.OBJ
|
||||
S.BUT.TEXTX .EQ S.OBJ+2
|
||||
S.BUT.TEXTY .EQ S.OBJ+4
|
||||
S.BUT.TEXTLEN .EQ S.OBJ+6
|
||||
S.BUT.TEXT .EQ S.OBJ+8
|
||||
* ...
|
||||
*--------------------------------------
|
||||
S.TEXT.F.DISABLED .EQ %10000000
|
||||
*
|
||||
S.TEXT.hBM .EQ S.OBJ
|
||||
S.TEXT.TEXTX .EQ S.OBJ+2
|
||||
S.TEXT.TEXTY .EQ S.OBJ+4
|
||||
S.TEXT.TEXTLEN .EQ S.OBJ+6
|
||||
S.TEXT.TEXT .EQ S.OBJ+8
|
||||
* ...
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.BUILD/INC/LIBGUI.I
|
||||
|
@ -5,7 +5,6 @@ AUTO 4,1
|
||||
WND.TB.H .BS 1
|
||||
WND.Stack.Top .BS 1
|
||||
WND.Stack .BS WND.MAX
|
||||
WND.Cache .BS S.WND
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/LIB/LIBGUI.G.WND
|
||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
BUT.New >STYA ZPPtr1
|
||||
|
||||
ldy #S.BUT.W
|
||||
ldy #S.OBJ.W
|
||||
lda (ZPPtr1),y
|
||||
iny
|
||||
ora (ZPPtr1),y
|
||||
@ -18,7 +18,7 @@ BUT.New >STYA ZPPtr1
|
||||
>SYSCALL GetStkObjProp
|
||||
|
||||
phy
|
||||
ldy #S.BUT.W+1
|
||||
ldy #S.OBJ.W+1
|
||||
sta (ZPPtr1),y
|
||||
dey
|
||||
pla
|
||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
* CLIPPING Functions:
|
||||
* In:
|
||||
* Graphic Context in GC.Cache
|
||||
* Graphic Context in OBJ.Cache
|
||||
* YA = Control Block
|
||||
* Out:
|
||||
* CC : CB.Cache clipped & visible
|
||||
@ -31,20 +31,20 @@ CLIP.BitBlt lda CB.Cache+S.CB.DstX
|
||||
ldx CB.Cache+S.CB.DstX+1
|
||||
pha
|
||||
|
||||
>SCMPAX GC.Cache+S.GC.X2
|
||||
>SCMPAX OBJ.Cache+S.OBJ.X2
|
||||
bpl CLIP.BitBlt.9 DestX after X2....exit
|
||||
|
||||
pla
|
||||
>SCMPAX GC.Cache+S.GC.X1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.X1
|
||||
bpl .1 DestX Inside X1-X2, go check if X1+W fit in
|
||||
|
||||
* S.CB.DstX before S.GC.X1: D=S.GC.X1-S.CB.DstX, S.CB.SrcW-=D, S.CB.DstX=+=D, S.CB.X1+=D
|
||||
* S.CB.DstX before S.OBJ.X1: D=S.OBJ.X1-S.CB.DstX, S.CB.SrcW-=D, S.CB.DstX=+=D, S.CB.X1+=D
|
||||
|
||||
lda GC.Cache+S.GC.X1 Compute D....
|
||||
lda OBJ.Cache+S.OBJ.X1 Compute D....
|
||||
sec
|
||||
sbc CB.Cache+S.CB.DstX
|
||||
sta D
|
||||
lda GC.Cache+S.GC.X1+1
|
||||
lda OBJ.Cache+S.OBJ.X1+1
|
||||
sbc CB.Cache+S.CB.DstX+1
|
||||
sta D+1 ....always positive
|
||||
|
||||
@ -71,15 +71,15 @@ CLIP.BitBlt lda CB.Cache+S.CB.DstX
|
||||
sta CB.Cache+S.CB.X1
|
||||
lda CB.Cache+S.CB.X1+1
|
||||
adc D+1
|
||||
sta CB.Cache+S.CB.X1+1 S.CB.DstX=0, new between S.GC.X1 & S.GC.X2....
|
||||
sta CB.Cache+S.CB.X1+1 S.CB.DstX=0, new between S.OBJ.X1 & S.OBJ.X2....
|
||||
|
||||
* S.CB.DstX between S.GC.X1 & S.GC.X2: D=(S.GC.X2+1)-S.CB.DstX
|
||||
* S.CB.DstX between S.OBJ.X1 & S.OBJ.X2: D=(S.OBJ.X2+1)-S.CB.DstX
|
||||
|
||||
.1 lda GC.Cache+S.GC.X2 Compute D in X,Y
|
||||
.1 lda OBJ.Cache+S.OBJ.X2 Compute D in X,Y
|
||||
sec
|
||||
sbc CB.Cache+S.CB.DstX
|
||||
tax
|
||||
lda GC.Cache+S.GC.X2+1
|
||||
lda OBJ.Cache+S.OBJ.X2+1
|
||||
sbc CB.Cache+S.CB.DstX+1
|
||||
|
||||
inx
|
||||
@ -98,23 +98,23 @@ CLIP.BitBlt lda CB.Cache+S.CB.DstX
|
||||
CLIP.BitBlt.Y lda CB.Cache+S.CB.DstY
|
||||
ldx CB.Cache+S.CB.DstY+1
|
||||
pha
|
||||
>SCMPAX GC.Cache+S.GC.Y2 DestY after Y2....exit
|
||||
>SCMPAX OBJ.Cache+S.OBJ.Y2 DestY after Y2....exit
|
||||
bmi .10
|
||||
pla
|
||||
sec
|
||||
rts
|
||||
|
||||
.10 pla
|
||||
>SCMPAX GC.Cache+S.GC.Y1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.Y1
|
||||
bpl .1 DestY Inside Y1-Y2, go check if Y1+H fit in
|
||||
|
||||
* S.CB.DstY above S.GC.Y1: D=S.GC.Y1-S.CB.DstY, S.CB.SrcH-=D, S.CB.DstY=0, S.CB.Y1+=D
|
||||
* S.CB.DstY above S.OBJ.Y1: D=S.OBJ.Y1-S.CB.DstY, S.CB.SrcH-=D, S.CB.DstY=0, S.CB.Y1+=D
|
||||
|
||||
lda GC.Cache+S.GC.Y1 Compute D....
|
||||
lda OBJ.Cache+S.OBJ.Y1 Compute D....
|
||||
sec
|
||||
sbc CB.Cache+S.CB.DstY
|
||||
sta D
|
||||
lda GC.Cache+S.GC.Y1+1
|
||||
lda OBJ.Cache+S.OBJ.Y1+1
|
||||
sbc CB.Cache+S.CB.DstY+1
|
||||
sta D+1 ....always positive
|
||||
|
||||
@ -141,15 +141,15 @@ CLIP.BitBlt.Y lda CB.Cache+S.CB.DstY
|
||||
sta CB.Cache+S.CB.Y1
|
||||
lda CB.Cache+S.CB.Y1+1
|
||||
adc D+1
|
||||
sta CB.Cache+S.CB.Y1+1 S.CB.DstY=0, new between S.GC.Y1 & S.GC.Y2....
|
||||
sta CB.Cache+S.CB.Y1+1 S.CB.DstY=0, new between S.OBJ.Y1 & S.OBJ.Y2....
|
||||
|
||||
* S.CB.DstY between S.GC.Y1 & S.GC.Y2: D=(S.GC.Y2+1)-S.CB.DstY
|
||||
* S.CB.DstY between S.OBJ.Y1 & S.OBJ.Y2: D=(S.OBJ.Y2+1)-S.CB.DstY
|
||||
|
||||
.1 lda GC.Cache+S.GC.Y2 Compute D in X,Y
|
||||
.1 lda OBJ.Cache+S.OBJ.Y2 Compute D in X,Y
|
||||
sec
|
||||
sbc CB.Cache+S.CB.DstY
|
||||
tax
|
||||
lda GC.Cache+S.GC.Y2+1
|
||||
lda OBJ.Cache+S.OBJ.Y2+1
|
||||
sbc CB.Cache+S.CB.DstY+1
|
||||
|
||||
inx
|
||||
@ -280,7 +280,7 @@ CLIP.Line.EncodeP2
|
||||
*--------------------------------------
|
||||
CLIP.Line.EncodeX.AX
|
||||
pha
|
||||
>SCMPAX GC.Cache+S.GC.X1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.X1
|
||||
bmi .1
|
||||
tya
|
||||
ora #CLIP.Line.LEFT
|
||||
@ -288,7 +288,7 @@ CLIP.Line.EncodeX.AX
|
||||
rts
|
||||
|
||||
.1 pla
|
||||
>SCMPAX GC.Cache+S.GC.X1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.X1
|
||||
bpl .8
|
||||
tya
|
||||
ora #CLIP.Line.RIGHT
|
||||
@ -296,7 +296,7 @@ CLIP.Line.EncodeX.AX
|
||||
*--------------------------------------
|
||||
CLIP.Line.EncodeY.AX
|
||||
pha
|
||||
>SCMPAX GC.Cache+S.GC.Y1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.Y1
|
||||
bmi .1
|
||||
tya
|
||||
ora #CLIP.Line.TOP
|
||||
@ -304,7 +304,7 @@ CLIP.Line.EncodeY.AX
|
||||
rts
|
||||
|
||||
.1 pla
|
||||
>SCMPAX GC.Cache+S.GC.Y1
|
||||
>SCMPAX OBJ.Cache+S.OBJ.Y1
|
||||
bpl .8
|
||||
tya
|
||||
ora #CLIP.Line.BOTTOM
|
||||
|
@ -120,14 +120,12 @@ ShowCursor.I lda #S.CB.OP.ORA+S.CB.OP.MASK+S.CB.OP.SAVE
|
||||
sbc #0
|
||||
sta CUR.CB+S.CB.DstY+1
|
||||
|
||||
DrawCursor.I
|
||||
|
||||
* >LDYA L.GC.Screen
|
||||
* jsr GC.Get
|
||||
DrawCursor.I >LDYA L.SCR
|
||||
jsr OBJ.Get
|
||||
|
||||
* >LDYA L.CUR.CB
|
||||
* jsr CLIP.YA
|
||||
* bcs .9
|
||||
>LDYA L.CUR.CB
|
||||
jsr CLIP.YA
|
||||
bcs .9
|
||||
|
||||
>LDYA L.CUR.CB
|
||||
jmp GFXWrite.YA
|
||||
|
@ -5,7 +5,7 @@ AUTO 4,1
|
||||
Draw >PULLW ZPCBPtr Get CB
|
||||
|
||||
>PULLYA Get GC
|
||||
jsr GC.Get
|
||||
jsr OBJ.Get
|
||||
|
||||
.1 >LDYA ZPCBPtr
|
||||
jsr CB.Get
|
||||
@ -23,7 +23,7 @@ Draw >PULLW ZPCBPtr Get CB
|
||||
jsr Draw.Jmp
|
||||
bra .7
|
||||
|
||||
.2 jsr GoDevGfx
|
||||
.2 jsr GFXWrite.CB
|
||||
|
||||
.7 lda (ZPCBPtr) Get Cmd
|
||||
tax
|
||||
@ -66,7 +66,7 @@ DrawLine lda CB.Cache+S.CB.X2
|
||||
|
||||
lda #S.CB.CMD.VLINE
|
||||
sta CB.Cache+S.CB.CMD
|
||||
jmp GoDevGfx DX=0 : VLIN Y1,Y2 At X1
|
||||
jmp GFXWrite.CB DX=0 : VLIN Y1,Y2 At X1
|
||||
|
||||
.1 >SWAP16 CB.Cache+S.CB.X1,CB.Cache+S.CB.X2
|
||||
* >SWAP16 CB.Cache+S.CB.Y1,CB.Cache+S.CB.Y2
|
||||
@ -98,7 +98,7 @@ DrawLine lda CB.Cache+S.CB.X2
|
||||
|
||||
lda #S.CB.CMD.HLINE
|
||||
sta CB.Cache+S.CB.CMD
|
||||
jmp GoDevGfx DY=0 : HLIN X1,X2 At Y1
|
||||
jmp GFXWrite.CB DY=0 : HLIN X1,X2 At Y1
|
||||
|
||||
.3 >NOT16 DY set DY=-DY
|
||||
lda #$ff
|
||||
@ -106,7 +106,7 @@ DrawLine lda CB.Cache+S.CB.X2
|
||||
|
||||
.4 lda #S.CB.CMD.SETPIXEL
|
||||
sta CB.Cache+S.CB.CMD
|
||||
jsr GoDevGfx
|
||||
jsr GFXWrite.CB
|
||||
|
||||
lda DX
|
||||
sec
|
||||
@ -144,7 +144,7 @@ DrawLine.IncXY lda DX DX=DY
|
||||
adc IY
|
||||
sta CB.Cache+S.CB.Y1
|
||||
|
||||
jsr GoDevGfx
|
||||
jsr GFXWrite.CB
|
||||
bra .1
|
||||
|
||||
.8 rts
|
||||
@ -227,7 +227,7 @@ DrawLine.IncY lda DY
|
||||
adc IY
|
||||
sta CB.Cache+S.CB.Y1
|
||||
|
||||
jsr GoDevGfx
|
||||
jsr GFXWrite.CB
|
||||
bra .1
|
||||
|
||||
.8 rts
|
||||
@ -311,7 +311,7 @@ DrawLine.IncX lda DX
|
||||
bne .6
|
||||
inc CB.Cache+S.CB.X1+1
|
||||
|
||||
.6 jsr GoDevGfx
|
||||
.6 jsr GFXWrite.CB
|
||||
bra .1
|
||||
|
||||
.8 rts
|
||||
@ -322,7 +322,7 @@ DrawText >LDYA L.CB.Cache
|
||||
jsr SYS.GuiOSD.JMP
|
||||
bcs .9
|
||||
|
||||
jsr GoDevGfx
|
||||
jsr GFXWrite.CB
|
||||
|
||||
lda CB.Cache+S.CB.SrcPtr
|
||||
>SYSCALL FreeStkObj
|
||||
|
@ -20,37 +20,37 @@ MENU.SysMenu
|
||||
*--------------------------------------
|
||||
MENU.MenuEditor .AZ "File"
|
||||
.DA #02 ID
|
||||
.DA #S.MITEM.HOTKEY.CTRL
|
||||
.DA #S.MITEM.KEYMOD.CTRL
|
||||
.DA #'N'
|
||||
.AZ "New"
|
||||
.DA #04 ID
|
||||
.DA #S.MITEM.HOTKEY.CTRL
|
||||
.DA #S.MITEM.KEYMOD.CTRL
|
||||
.DA #'O'
|
||||
.AZ "Open..."
|
||||
.DA #06 ID
|
||||
.DA #S.MITEM.HOTKEY.CTRL
|
||||
.DA #S.MITEM.KEYMOD.CTRL
|
||||
.DA #'S'
|
||||
.AZ "Save"
|
||||
.DA #08 ID
|
||||
.DA #S.MITEM.HOTKEY.OA+S.MITEM.HOTKEY.CTRL
|
||||
.DA #S.MITEM.KEYMOD.OA+S.MITEM.KEYMOD.CTRL
|
||||
.DA #'S'
|
||||
.AZ "Save As..."
|
||||
.DA #10 ID
|
||||
.DA #S.MITEM.HOTKEY.CTRL
|
||||
.DA #S.MITEM.KEYMOD.CTRL
|
||||
.DA #'Q'
|
||||
.AZ "Quit"
|
||||
.DA #0
|
||||
.AZ "Edit"
|
||||
.DA #12 ID
|
||||
.DA #S.MITEM.HOTKEY.OA
|
||||
.DA #S.MITEM.KEYMOD.OA
|
||||
.DA #'X'
|
||||
.AZ "Cut"
|
||||
.DA #14 ID
|
||||
.DA #S.MITEM.HOTKEY.OA
|
||||
.DA #S.MITEM.KEYMOD.OA
|
||||
.DA #'C'
|
||||
.AZ "Copy"
|
||||
.DA #16 ID
|
||||
.DA #S.MITEM.HOTKEY.OA
|
||||
.DA #S.MITEM.KEYMOD.OA
|
||||
.DA #'V'
|
||||
.AZ "Paste"
|
||||
.DA #0
|
||||
|
@ -7,7 +7,7 @@ WND.Init >PUSHBI 0
|
||||
>SYSCALL open
|
||||
bcs .9
|
||||
|
||||
sta hDevGFX
|
||||
sta SCR+S.SCREEN.hDEV
|
||||
|
||||
>LDYA L.DCB.GFX
|
||||
>STYA IOCTL+S.IOCTL.BUFPTR
|
||||
@ -16,44 +16,53 @@ WND.Init >PUSHBI 0
|
||||
|
||||
>PUSHW L.IOCTL
|
||||
>PUSHBI IOCTL.STATUS
|
||||
lda hDevGFX
|
||||
lda SCR+S.SCREEN.hDEV
|
||||
>SYSCALL IOCTL
|
||||
|
||||
bcs .9
|
||||
|
||||
lda DCB.GFX+S.DCB.GFX.W
|
||||
sta WND.Cache+S.OBJ.W
|
||||
lda DCB.GFX+S.DCB.GFX.W+1
|
||||
sta WND.Cache+S.OBJ.W+1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
WND.Setup >LDYA DCB.GFX+S.DCB.GFX.W
|
||||
>STYA SCR+S.OBJ.W
|
||||
>STYA WND.Desktop+S.OBJ.W
|
||||
>STYA WND.SysBar+S.OBJ.W
|
||||
|
||||
lda SYSFON.H
|
||||
clc
|
||||
adc #6
|
||||
sta WND.TB.H
|
||||
sta WND.SysBar+S.OBJ.H
|
||||
|
||||
lda DCB.GFX+S.DCB.GFX.H
|
||||
sta SCR+S.OBJ.H
|
||||
sec
|
||||
sbc SYSFON.H
|
||||
sta WND.Cache+S.OBJ.H
|
||||
sbc WND.SysBar+S.OBJ.H
|
||||
sta WND.Desktop+S.OBJ.H
|
||||
sta WND.SysBar+S.OBJ.X1
|
||||
|
||||
lda DCB.GFX+S.DCB.GFX.H+1
|
||||
lda DCB.GFX+S.DCB.GFX.H+1
|
||||
sta WND.SysBar+S.OBJ.H+1
|
||||
sbc #0
|
||||
sta WND.Cache+S.OBJ.H+1
|
||||
sta WND.Desktop+S.OBJ.H+1
|
||||
sta WND.SysBar+S.OBJ.X1+1
|
||||
|
||||
>LDYA L.SCR
|
||||
jsr OBJ.SetX2Y2
|
||||
|
||||
lda #S.WND.F.NOBORDER
|
||||
sta WND.Cache+S.OBJ.F
|
||||
>LDYA L.WND.Desktop
|
||||
>STYA SCR.Childs
|
||||
jsr OBJ.SetX2Y2
|
||||
|
||||
>LDYA L.WND.SysBar
|
||||
jsr OBJ.SetX2Y2
|
||||
>STYA SCR.Childs+2
|
||||
|
||||
>LDYA L.WND.Desktop
|
||||
|
||||
lda #CUR.T.ARROW
|
||||
sta WND.Cache+S.WND.hCUR
|
||||
>LDYA L.WND.CACHE
|
||||
jsr WND.New
|
||||
bcs .9
|
||||
|
||||
stx WND.Stack
|
||||
|
||||
.9 rts
|
||||
sta WND.Desktop+S.WND.hCUR
|
||||
sta WND.SysBar+S.WND.hCUR
|
||||
rts
|
||||
*--------------------------------------
|
||||
WND.Quit lda hDevGFX
|
||||
WND.Quit lda SCR+S.SCREEN.hDEV
|
||||
beq .8
|
||||
|
||||
pha
|
||||
@ -88,7 +97,8 @@ WND.Paint >STYA ZPPtr1
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
WND.Close
|
||||
WND.Close clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/LIB/LIBGUI.S.WND
|
||||
|
112
LIB/LIBGUI.S.txt
112
LIB/LIBGUI.S.txt
@ -10,7 +10,6 @@ AUTO 4,1
|
||||
.INB INC/A2OSX.I
|
||||
.INB INC/KERNEL.I
|
||||
.INB INC/GFX.I
|
||||
.INB INC/GUI.I
|
||||
.INB INC/LIBGUI.I
|
||||
*--------------------------------------
|
||||
WND.MAX .EQ 64
|
||||
@ -45,8 +44,8 @@ WND.MAX .EQ 64
|
||||
.EM
|
||||
*--------------------------------------
|
||||
ZPPtr1 .EQ ZPLIB
|
||||
ZPPtr2 .EQ ZPLIB+2
|
||||
ZPGCPtr .EQ ZPLIB+4
|
||||
|
||||
ZPObjPtr .EQ ZPLIB+4
|
||||
ZPCBPtr .EQ ZPLIB+6
|
||||
ZPWNDPtr .EQ ZPLIB+8
|
||||
|
||||
@ -74,7 +73,6 @@ CS.START cld
|
||||
.DA ShowCursor
|
||||
.DA UpdateCursor
|
||||
.DA MOU.ReadMouse
|
||||
.DA GetScreenGC
|
||||
*--------------------------------------
|
||||
J.Cmds .DA DrawLine
|
||||
.DA DrawText
|
||||
@ -86,10 +84,12 @@ L.SYSX7B .DA SYSX7B
|
||||
L.IOCTL .DA IOCTL
|
||||
L.DCB.GFX .DA DCB.GFX
|
||||
L.MouseClamp .DA MouseClamp
|
||||
L.GC.Screen .DA GC.Screen
|
||||
L.GC.Desktop .DA GC.Desktop
|
||||
L.GC.SysBar .DA GC.SysBar
|
||||
L.CB.Cache .DA CB.Cache
|
||||
L.SCR .DA SCR
|
||||
L.WND.Desktop .DA WND.Desktop
|
||||
L.WND.SysBar .DA WND.SysBar
|
||||
*--------------------------------------
|
||||
L.BM.Apple .DA BM.Apple
|
||||
*--------------------------------------
|
||||
L.CUR.CB .DA CUR.CB
|
||||
L.CUR.SaveBuf .DA CUR.SaveBuf
|
||||
@ -114,8 +114,7 @@ J.Clip .DA CLIP.Point SETPIXEL
|
||||
.DA CLIP.BitBlt
|
||||
.DA CLIP.Rect GETRECTBUFSIZE
|
||||
.DA CLIP.Line
|
||||
.DA CLIP.Text
|
||||
L.WND.CACHE .DA WND.CACHE
|
||||
.DA CLIP.Text
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
LIB.LOAD lda LibCount
|
||||
@ -130,6 +129,8 @@ LIB.LOAD lda LibCount
|
||||
jsr WND.Init
|
||||
bcs .9
|
||||
|
||||
jsr WND.Setup
|
||||
|
||||
lda hDevMouse
|
||||
beq .8
|
||||
|
||||
@ -150,17 +151,71 @@ LIB.UNLOAD dec LibCount
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
GC.Get >STYA .1+1
|
||||
OBJ.Get >STYA .1+1
|
||||
|
||||
ldx #S.GC-1
|
||||
ldx #S.OBJ-1
|
||||
|
||||
.1 lda $ffff,x SELF MODIFIED
|
||||
sta GC.Cache,x
|
||||
sta OBJ.Cache,x
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
OBJ.SetX2Y2 >STYA ZPObjPtr
|
||||
|
||||
ldy #S.OBJ.W
|
||||
lda (ZPObjPtr),y
|
||||
clc
|
||||
sbc #0
|
||||
pha
|
||||
iny
|
||||
lda (ZPObjPtr),y
|
||||
sbc #0
|
||||
tax
|
||||
|
||||
pla
|
||||
clc
|
||||
ldy #S.OBJ.X1
|
||||
adc (ZPObjPtr),y
|
||||
pha
|
||||
txa
|
||||
iny
|
||||
adc (ZPObjPtr),y
|
||||
|
||||
ldy #S.OBJ.X2+1
|
||||
sta (ZPObjPtr),y
|
||||
dey
|
||||
pla
|
||||
sta (ZPObjPtr),y
|
||||
|
||||
ldy #S.OBJ.H
|
||||
lda (ZPObjPtr),y
|
||||
clc
|
||||
sbc #0
|
||||
pha
|
||||
iny
|
||||
lda (ZPObjPtr),y
|
||||
sbc #0
|
||||
tax
|
||||
|
||||
pla
|
||||
clc
|
||||
ldy #S.OBJ.Y1
|
||||
adc (ZPObjPtr),y
|
||||
pha
|
||||
txa
|
||||
iny
|
||||
adc (ZPObjPtr),y
|
||||
|
||||
ldy #S.OBJ.Y2+1
|
||||
sta (ZPObjPtr),y
|
||||
dey
|
||||
pla
|
||||
sta (ZPObjPtr),y
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CB.Get >STYA .1+1
|
||||
|
||||
ldx #S.CB-1
|
||||
@ -172,14 +227,11 @@ CB.Get >STYA .1+1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
GetScreenGC >LDYA L.GC.Screen
|
||||
rts
|
||||
*--------------------------------------
|
||||
GoDevGfx >LDYA L.CB.Cache
|
||||
GFXWrite.CB >LDYA L.CB.Cache
|
||||
|
||||
GFXWrite.YA >PUSHYA
|
||||
>PUSHBI IOCTL.WRITE
|
||||
lda hDevGFX
|
||||
lda SCR+S.SCREEN.hDEV
|
||||
>SYSCALL IOCTL
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -208,7 +260,6 @@ SYSX7 .AZ "/A2OSX.BUILD/SBIN/GUI/SYSX7"
|
||||
SYSX7B .AZ "/A2OSX.BUILD/SBIN/GUI/SYSX7B"
|
||||
*--------------------------------------
|
||||
LibCount .BS 1
|
||||
hDevGFX .BS 1
|
||||
hDevMouse .BS 1
|
||||
*--------------------------------------
|
||||
DX .BS 2
|
||||
@ -231,8 +282,6 @@ CB.CmdLen .DA S.CB.Y1+1 SETPIXEL
|
||||
.DA S.CB.Y2+1 DRAWLINE
|
||||
.DA S.CB.TxtPtr+1 DRAWTEXT
|
||||
*--------------------------------------
|
||||
MouseClamp .BS 8
|
||||
*--------------------------------------
|
||||
PAT.Buf .BS 1 S.BM.F
|
||||
.DA #1 S.BM.RowBytes
|
||||
.DA 8 S.BM.W
|
||||
@ -243,13 +292,24 @@ PAT.Buf .BS 1 S.BM.F
|
||||
IOCTL .BS S.IOCTL
|
||||
DCB.GFX .BS S.DCB.GFX
|
||||
*--------------------------------------
|
||||
GC.Cache .BS S.GC
|
||||
CB.Cache .BS S.CB
|
||||
BM.Cache .BS S.BM
|
||||
MouseClamp .BS 8
|
||||
*--------------------------------------
|
||||
GC.Screen .BS S.GC
|
||||
GC.Desktop .BS S.GC
|
||||
GC.SysBar .BS S.GC
|
||||
CB.Cache .BS S.CB
|
||||
OBJ.Cache .BS S.OBJ
|
||||
*--------------------------------------
|
||||
SCR .BS S.SCREEN S.OBJ.T.SCREEN
|
||||
SCR.Childs .BS 2 WND.Desktop
|
||||
.BS 2 WND.SysBar
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
WND.Desktop .DA #S.OBJ.T.WND
|
||||
.BS S.WND-1
|
||||
*--------------------------------------
|
||||
WND.SysBar .DA #S.OBJ.T.WND
|
||||
.BS S.WND-1
|
||||
WND.SysBar.Childs
|
||||
.BS 2 BUT.Sys
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
BUT.Sys .DA #S.OBJ.T.BUT
|
||||
.DA #0 F
|
||||
|
@ -9,7 +9,6 @@ AUTO 4,1
|
||||
.INB INC/IO.I
|
||||
.INB INC/MACROS.I
|
||||
.INB INC/A2OSX.I
|
||||
.INB INC/GUI.I
|
||||
.INB INC/LIBGUI.I
|
||||
*--------------------------------------
|
||||
* Zero Page Segment, up to 32 bytes
|
||||
|
Loading…
Reference in New Issue
Block a user