mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2025-08-08 16:24:59 +00:00
.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user