diff --git a/applesoft.s b/applesoft.s index 4906717..22c2e2e 100644 --- a/applesoft.s +++ b/applesoft.s @@ -342,6 +342,17 @@ WGAmpersandStrArguments_done: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; WGAmpersand_WEEGUI +; Initializes WeeGUI +; &WEEGUI +WGAmpersand_WEEGUI: + jsr WGInit + jsr WG80 + + rts + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; WGAmpersand_HOME ; Clears the screen @@ -370,6 +381,7 @@ WGAmpersand_DESK: WGAmpersand_WINDOW: jsr WGAmpersandStructArgument jsr WGCreateView + jsr WGEraseView jsr WGPaintView jsr WGBottomCursor @@ -377,10 +389,10 @@ WGAmpersand_WINDOW: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; WGAmpersand_CHECKBOX +; WGAmpersand_CHKBOX ; Create a checkbox -; &CHECKBOX(id,x,y) -WGAmpersand_CHECKBOX: +; &CHKBOX(id,x,y) +WGAmpersand_CHKBOX: jsr WGAmpersandStructArgument jsr WGCreateCheckbox jsr WGPaintView @@ -390,17 +402,18 @@ WGAmpersand_CHECKBOX: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; WGAmpersand_BUTTON +; WGAmpersand_BUTTN ; Create a button -; &BUTTON(id,x,y,width,"title") -WGAmpersand_BUTTON: +; &BUTTN(id,x,y,width,"title") +WGAmpersand_BUTTN: jsr WGAmpersandStructArgument jsr WGCreateButton - lda WGAmpersandCommandBuffer+4 - sta PARAM0 lda WGAmpersandCommandBuffer+5 + sta PARAM0 + lda WGAmpersandCommandBuffer+4 sta PARAM1 + jsr WGViewSetTitle jsr WGPaintView @@ -454,6 +467,9 @@ WGAmpersandCommandBufferEnd: ; WGAmpersandCommandTable: +.byte "WEEGUI",0,0,0,0,0,0,0,0 +.addr WGAmpersand_WEEGUI + .byte $97,0,0,0,0,0,0,0,0,0,0,0,0,0 ; HOME .addr WGAmpersand_HOME @@ -463,11 +479,11 @@ WGAmpersandCommandTable: .byte "WINDOW",0,0,0,0,0,0,0,0 .addr WGAmpersand_WINDOW -.byte "CHECKBOX",0,0,0,0,0,0 -.addr WGAmpersand_CHECKBOX +.byte "CHKBOX",0,0,0,0,0,0,0,0 +.addr WGAmpersand_CHKBOX -.byte "BUT",$c1,"N",0,0,0,0,0,0,0,0,0 ; BUTTON -.addr WGAmpersand_BUTTON +.byte "BUTTN",0,0,0,0,0,0,0,0,0 ; BUTTON +.addr WGAmpersand_BUTTN WGAmpersandCommandTableEnd: diff --git a/gui.s b/gui.s index b14c465..b8d450d 100644 --- a/gui.s +++ b/gui.s @@ -20,7 +20,15 @@ main: jsr WGInit - jsr WG80 + ;jsr WG80 + +; lda #0 +; lda #testTitle1 +; sta PARAM1 +; jsr WGStoreStr + rts ;jmp tortureTestPrint ;jmp tortureTestRects @@ -214,11 +222,24 @@ testCallback: ; WGInit ; Initialization. Should be called once at app startup WGInit: - pha + SAVE_AXY jsr WGInitApplesoft - pla + ldy #15 ; Clear our block allocators +WGInit_clearMemLoop: + tya + asl + asl + asl + asl + tax + lda #0 + sta WG_STRINGS,x + dey + bpl WGInit_clearMemLoop + + RESTORE_AXY rts diff --git a/guidemo.dsk b/guidemo.dsk index da24691..b444208 100644 Binary files a/guidemo.dsk and b/guidemo.dsk differ diff --git a/utility.s b/utility.s index 9d2bf7b..76e34f1 100644 --- a/utility.s +++ b/utility.s @@ -190,10 +190,10 @@ WGStoreStr_terminate: pla ; Return pointer to the start of the block clc - adc #>WG_STRINGS + adc #WG_STRINGS sta PARAM1 WGStoreStr_done: