mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2024-09-27 15:54:35 +00:00
- Initialization now clears string allocator
- Changed some AppleSoft APIs to be more keyword-friendly - Fixed button string pointers being wrong endian in AppleSoft API - Fixed incorrect endian in return value of string allocator
This commit is contained in:
parent
1c9d9a7bdd
commit
72bab2ba8f
40
applesoft.s
40
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:
|
||||
|
27
gui.s
27
gui.s
@ -20,7 +20,15 @@
|
||||
|
||||
main:
|
||||
jsr WGInit
|
||||
jsr WG80
|
||||
;jsr WG80
|
||||
|
||||
; lda #0
|
||||
; lda #<testTitle1
|
||||
; sta PARAM0
|
||||
; 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
|
||||
|
||||
|
||||
|
BIN
guidemo.dsk
BIN
guidemo.dsk
Binary file not shown.
Loading…
Reference in New Issue
Block a user