mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-06-16 07:29:34 +00:00
add description frame, painted but not fully populated
This commit is contained in:
parent
d3b96a7e1b
commit
f851ff8707
|
@ -1,7 +1,7 @@
|
||||||
kNumberOfGames = 25
|
kNumberOfGames = 25
|
||||||
|
|
||||||
gCurrentGame
|
gCurrentGame
|
||||||
!byte 22
|
!byte $FD ; set at runtime
|
||||||
kGameDirectory ; length-prefixed pathname of where game subdirectories are stored
|
kGameDirectory ; length-prefixed pathname of where game subdirectories are stored
|
||||||
!byte 2
|
!byte 2
|
||||||
!raw "Z/"
|
!raw "Z/"
|
||||||
|
|
143
src/pitchdark.a
143
src/pitchdark.a
|
@ -27,8 +27,7 @@ Init
|
||||||
beq + ; yes, continue
|
beq + ; yes, continue
|
||||||
jmp QuitToProDOS
|
jmp QuitToProDOS
|
||||||
+
|
+
|
||||||
jsr LoadGameInfo
|
bit $c010
|
||||||
|
|
||||||
jsr LoadFile ; load WEEGUI binary at $4000
|
jsr LoadFile ; load WEEGUI binary at $4000
|
||||||
!word weeguifilename
|
!word weeguifilename
|
||||||
!word $4000
|
!word $4000
|
||||||
|
@ -37,6 +36,13 @@ Init
|
||||||
|
|
||||||
jsr $4000 ; initialize WeeGUI
|
jsr $4000 ; initialize WeeGUI
|
||||||
|
|
||||||
|
lda #22
|
||||||
|
sta gCurrentGame
|
||||||
|
jsr LoadGameInfo
|
||||||
|
|
||||||
|
ldx #WGEnableMouse ; enable mouse support
|
||||||
|
jsr WeeGUI
|
||||||
|
|
||||||
ldx #WGClearScreen ; clear screen
|
ldx #WGClearScreen ; clear screen
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
|
||||||
|
@ -55,7 +61,7 @@ Init
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
jsr NORMAL
|
jsr NORMAL
|
||||||
|
|
||||||
jsr _create_button
|
jsr _create_button ; create buttons
|
||||||
!word view_previous
|
!word view_previous
|
||||||
jsr _create_button
|
jsr _create_button
|
||||||
!word view_next
|
!word view_next
|
||||||
|
@ -68,50 +74,43 @@ Init
|
||||||
jsr _create_button
|
jsr _create_button
|
||||||
!word view_options
|
!word view_options
|
||||||
|
|
||||||
ldx #WGCreateView ; create game info box
|
ldx #WGCreateView ; create borderless frame for game title and info
|
||||||
lda #<view_info
|
lda #<view_info
|
||||||
sta PARAM0
|
sta PARAM0
|
||||||
lda #>view_info
|
lda #>view_info
|
||||||
sta PARAM1
|
sta PARAM1
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
|
||||||
lda addrInfo
|
ldx #WGCreateView ; create scrollable frame for game description text
|
||||||
sta $00
|
lda #<view_description
|
||||||
lda addrInfo+1
|
|
||||||
sta $01
|
|
||||||
stz .line+1
|
|
||||||
infoloop
|
|
||||||
ldx #WGSetCursor
|
|
||||||
stz PARAM0
|
|
||||||
.line lda #$FD ; set at runtime
|
|
||||||
sta PARAM1
|
|
||||||
jsr WeeGUI
|
|
||||||
ldx #WGPrint
|
|
||||||
lda $00
|
|
||||||
sta PARAM0
|
sta PARAM0
|
||||||
lda $01
|
lda #>view_description
|
||||||
sta PARAM1
|
sta PARAM1
|
||||||
bit MAGICRTS ; set overflow bit
|
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
bit #%00000000
|
ldx #WGViewSetAction
|
||||||
- lda ($00)
|
lda #<PaintDescription
|
||||||
bne +
|
sta PARAM0
|
||||||
bit MAGICRTS
|
lda #>PaintDescription
|
||||||
+ inc $00
|
sta PARAM1
|
||||||
bne +
|
jsr WeeGUI
|
||||||
inc $01
|
ldx #WGPaintView
|
||||||
+ bvc -
|
jsr WeeGUI
|
||||||
inc .line+1
|
|
||||||
lda .line+1
|
|
||||||
cmp #$06
|
|
||||||
bne infoloop
|
|
||||||
|
|
||||||
bit $c010
|
jsr PaintInfo
|
||||||
- lda $c000
|
jsr PaintDescription
|
||||||
bpl -
|
|
||||||
ldx #WGExit
|
runloop
|
||||||
|
ldx #WGPendingViewAction
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
jmp QuitToProDOS
|
lda $c000
|
||||||
|
bpl runloop
|
||||||
|
bit $c010
|
||||||
|
|
||||||
|
ldx #WGDisableMouse ; disable mouse support before quitting
|
||||||
|
jsr WeeGUI
|
||||||
|
ldx #WGExit ; clean up WeeGUI
|
||||||
|
jsr WeeGUI
|
||||||
|
jmp QuitToProDOS ; quit via ProDOS MLI
|
||||||
|
|
||||||
callback_previous
|
callback_previous
|
||||||
callback_next
|
callback_next
|
||||||
|
@ -149,6 +148,60 @@ _create_button
|
||||||
ldx #WGPaintView
|
ldx #WGPaintView
|
||||||
jmp WeeGUI
|
jmp WeeGUI
|
||||||
|
|
||||||
|
PaintInfo
|
||||||
|
ldx #WGSelectView
|
||||||
|
lda #12
|
||||||
|
jsr WeeGUI
|
||||||
|
ldx #WGEraseViewContents
|
||||||
|
jsr WeeGUI
|
||||||
|
lda addrInfo
|
||||||
|
ldy addrInfo+1
|
||||||
|
ldx #0
|
||||||
|
bra MultiPrint
|
||||||
|
|
||||||
|
PaintDescription
|
||||||
|
ldx #WGSelectView
|
||||||
|
lda #13
|
||||||
|
jsr WeeGUI
|
||||||
|
ldx #WGEraseViewContents
|
||||||
|
jsr WeeGUI
|
||||||
|
lda addrDescription
|
||||||
|
ldy addrDescription+1
|
||||||
|
ldx #1
|
||||||
|
|
||||||
|
MultiPrint
|
||||||
|
sta $00
|
||||||
|
sty $01
|
||||||
|
stx .htab+1
|
||||||
|
stx .vtab+1
|
||||||
|
printloop
|
||||||
|
ldx #WGSetCursor
|
||||||
|
.htab lda #$FD ; set at runtime
|
||||||
|
sta PARAM0
|
||||||
|
.vtab lda #$FD ; set at runtime
|
||||||
|
sta PARAM1
|
||||||
|
jsr WeeGUI
|
||||||
|
ldx #WGPrint
|
||||||
|
lda $00
|
||||||
|
sta PARAM0
|
||||||
|
lda $01
|
||||||
|
sta PARAM1
|
||||||
|
bit MAGICRTS ; set overflow bit
|
||||||
|
jsr WeeGUI
|
||||||
|
bit #%00000000
|
||||||
|
- lda ($00)
|
||||||
|
bne +
|
||||||
|
bit MAGICRTS
|
||||||
|
+ inc $00
|
||||||
|
bne +
|
||||||
|
inc $01
|
||||||
|
+ bvc -
|
||||||
|
inc .vtab+1
|
||||||
|
lda .vtab+1
|
||||||
|
cmp #$06
|
||||||
|
bne printloop
|
||||||
|
rts
|
||||||
|
|
||||||
weeguifilename
|
weeguifilename
|
||||||
!byte 6
|
!byte 6
|
||||||
!raw "WEEGUI"
|
!raw "WEEGUI"
|
||||||
|
@ -242,12 +295,12 @@ view_info
|
||||||
!byte 20 ; width
|
!byte 20 ; width
|
||||||
!byte 7 ; height
|
!byte 7 ; height
|
||||||
|
|
||||||
view_blurb
|
view_description
|
||||||
!byte 12 ; view ID
|
!byte 13 ; view ID
|
||||||
!byte 0 ; style
|
!byte 2 ; style
|
||||||
!byte 30 ; left
|
!byte 1 ; left
|
||||||
!byte 2 ; top
|
!byte 15 ; top
|
||||||
!byte 20 ; visible width
|
!byte 77 ; visible width
|
||||||
!byte 7 ; visible height
|
!byte 8 ; visible height
|
||||||
!byte 20 ; width
|
!byte 77 ; width
|
||||||
!byte 7 ; height
|
!byte 17 ; height
|
||||||
|
|
Loading…
Reference in New Issue
Block a user