This commit is contained in:
4am
2018-04-18 16:44:52 -04:00
parent c44e1e50f2
commit 2759460897
2 changed files with 25 additions and 26 deletions

View File

@@ -3,12 +3,6 @@
;
; It is Pitch Dark. You are likely to be eaten by a GUI.
;
; Public functions
; - MainScreen
;
; Public variables
; - gGamesListStore
;
!cpu 65c02
!ct "src/lcase.ct"
@@ -51,20 +45,5 @@
!source "src/ui.versions.a"
!source "src/ui.artwork.a"
MainScreen
ldx #$FF
txs
jsr PaintMain ; create all WeeGUI views (UI elements) and paint them
jsr ClearPendingInput
.mainRunLoop
jsr RepaintMainIfDirty
ldx #WGPendingViewAction
jsr WeeGUI ; handle mouse movement and clicks
lda $C000
bpl .mainRunLoop
jsr ClearPendingInput
jsr HandleKey ; handle keypresses
bra .mainRunLoop
gGamesListStore
!word *+2 ; address of first okvs store

View File

@@ -4,8 +4,7 @@
; User interface - views and paint routines for main screen
;
; Public functions
; - PaintMain
; - RepaintMainIfDirty
; - MainScreen
;
; Public variables
; - gMainScreenPaintDirty byte 0=false, nonzero=true
@@ -31,6 +30,30 @@ gViewInUse
kInfoPaintWidth = 65
kDescriptionPaintWidth = 78
;------------------------------------------------------------------------------
; MainScreen
; display main screen and run to completion
;------------------------------------------------------------------------------
!zone {
MainScreen
ldx #$FF
txs
jsr PaintMain ; create all WeeGUI views (UI elements) and paint them
jsr ClearPendingInput
.mainRunLoop
jsr RepaintMainIfDirty
ldx #WGPendingViewAction
jsr WeeGUI ; handle mouse movement and clicks
lda $C000
bpl .mainRunLoop
jsr ClearPendingInput
jsr HandleKey ; handle keypresses
bra .mainRunLoop
}
;------------------------------------------------------------------------------
; internal functions
;------------------------------------------------------------------------------
; PaintMain/RepaintMainIfDirty
; call WeeGUI to create all application views and paint them
@@ -152,9 +175,6 @@ RepaintMainIfDirty
jmp PaintDescriptionView ; paint contents of description box
}
;------------------------------------------------------------------------------
; internal functions
;------------------------------------------------------------------------------
; CreateOrDestroyButton
; create or destroy a WeeGUI Button view, based on per-game options