Added help screen
This commit is contained in:
parent
92a3a9040e
commit
06527a3f61
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import math
|
||||||
import PIL
|
import PIL
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from numpy import asarray
|
from numpy import asarray
|
||||||
|
@ -160,7 +161,8 @@ def main(argv):
|
||||||
|
|
||||||
def scaleForFontWidth(charWidth):
|
def scaleForFontWidth(charWidth):
|
||||||
output = ""
|
output = ""
|
||||||
for i in range(0,(int)(charWidth/4)):
|
shiftCount = math.log(charWidth/2,2)
|
||||||
|
for i in range(0,(int)(shiftCount)):
|
||||||
output = output + "\tasl\n"
|
output = output + "\tasl\n"
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -68,7 +68,7 @@ fonts:
|
||||||
rm -f $(FONTBANK)
|
rm -f $(FONTBANK)
|
||||||
./CompileFont.py 4 5 48 0 "tinyNum" "Art/Assets/TinyNumbers.gif" > fonts.s
|
./CompileFont.py 4 5 48 0 "tinyNum" "Art/Assets/TinyNumbers.gif" > fonts.s
|
||||||
./CompileFont.py 8 8 32 0 "font8" "Art/Assets/Font8x8.gif" >> fonts.s
|
./CompileFont.py 8 8 32 0 "font8" "Art/Assets/Font8x8.gif" >> fonts.s
|
||||||
# ./CompileFont.py 16 16 32 14 "font16" "Art/Assets/Font16x16.gif" > font16x16.s
|
./CompileFont.py 16 16 32 0 "font16" "Art/Assets/Font16x16.gif" >> fonts.s
|
||||||
@PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh -C linkerConfig --cpu 65816 --start-addr 0000 -lfontEngine.lst fontEngine.s -o $(FONTBANK)
|
@PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh -C linkerConfig --cpu 65816 --start-addr 0000 -lfontEngine.lst fontEngine.s -o $(FONTBANK)
|
||||||
rm -f fontEngine.o
|
rm -f fontEngine.o
|
||||||
|
|
||||||
|
|
11844
font16x16.s
11844
font16x16.s
File diff suppressed because it is too large
Load Diff
|
@ -29,6 +29,7 @@ renderStringReturn:
|
||||||
fontJumpTable:
|
fontJumpTable:
|
||||||
.addr renderString_tinyNum
|
.addr renderString_tinyNum
|
||||||
.addr renderString_font8
|
.addr renderString_font8
|
||||||
|
.addr renderString_font16
|
||||||
|
|
||||||
|
|
||||||
.include "fonts.s"
|
.include "fonts.s"
|
||||||
|
|
20
graphics.s
20
graphics.s
|
@ -229,17 +229,14 @@ vblInterruptHandler:
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; setBorderAtScanLine
|
; setBorderAtScanLine
|
||||||
;
|
;
|
||||||
; X = Scan Line Number
|
|
||||||
;
|
|
||||||
; Trashes A
|
; Trashes A
|
||||||
;
|
;
|
||||||
setBorderAtScanLine:
|
setBorderAtScanLine:
|
||||||
dex ; Scanline interrupts technically fire on the previous line
|
|
||||||
|
|
||||||
BITS8A
|
BITS8A
|
||||||
lda $e19d00,x ; Enable interrupt on requested scanline
|
lda $e19d92 ; Enable interrupt on scanline 146
|
||||||
ora #%01000000
|
ora #%01000000
|
||||||
sta $e19d00,x
|
sta $e19d92
|
||||||
|
|
||||||
lda $e19dc7 ; Enable interrupt on scanline 199
|
lda $e19dc7 ; Enable interrupt on scanline 199
|
||||||
ora #%01000000
|
ora #%01000000
|
||||||
|
@ -264,14 +261,17 @@ scanLineInterruptHandler:
|
||||||
and #%11011111
|
and #%11011111
|
||||||
sta $e0c032
|
sta $e0c032
|
||||||
|
|
||||||
lda scanLineColorChangePhaseCounter
|
lda $e0C02f
|
||||||
beq scanLineInterruptHandler0
|
asl ; VA is now in the Carry flag
|
||||||
|
lda $e0C02e
|
||||||
|
rol ; Roll Carry into bit 0. A now contains line number
|
||||||
|
cmp #155
|
||||||
|
bcc scanLineInterruptHandler0
|
||||||
|
|
||||||
lda BORDERCOLOR ; Set border color
|
lda BORDERCOLOR ; Set border color
|
||||||
and #$f0
|
and #$f0
|
||||||
ora #$7 ; Set to sky at bottom of screen
|
ora #$7 ; Set to sky at bottom of screen
|
||||||
sta BORDERCOLOR
|
sta BORDERCOLOR
|
||||||
dec scanLineColorChangePhaseCounter
|
|
||||||
bra scanLineInterruptHandlerDone
|
bra scanLineInterruptHandlerDone
|
||||||
|
|
||||||
scanLineInterruptHandler0:
|
scanLineInterruptHandler0:
|
||||||
|
@ -279,15 +279,11 @@ scanLineInterruptHandler0:
|
||||||
and #$f0
|
and #$f0
|
||||||
ora #$4
|
ora #$4
|
||||||
sta BORDERCOLOR
|
sta BORDERCOLOR
|
||||||
inc scanLineColorChangePhaseCounter
|
|
||||||
|
|
||||||
scanLineInterruptHandlerDone:
|
scanLineInterruptHandlerDone:
|
||||||
clc
|
clc
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
scanLineColorChangePhaseCounter:
|
|
||||||
.byte 0
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; setScanlinePalette
|
; setScanlinePalette
|
||||||
; Set the palette for a given scan line
|
; Set the palette for a given scan line
|
||||||
|
|
17
input.s
17
input.s
|
@ -239,3 +239,20 @@ kbdScanTab_store:
|
||||||
breakpoint:
|
breakpoint:
|
||||||
.word 0
|
.word 0
|
||||||
|
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; kbdWaitForAnyKey
|
||||||
|
;
|
||||||
|
; Waits for any keypress
|
||||||
|
;
|
||||||
|
; Trashes A
|
||||||
|
;
|
||||||
|
kbdWaitForAnyKey:
|
||||||
|
BITS8
|
||||||
|
|
||||||
|
kbdWaitForAnyKeyLoop:
|
||||||
|
lda KBD
|
||||||
|
bpl kbdWaitForAnyKeyLoop
|
||||||
|
sta KBDSTROBE
|
||||||
|
BITS16
|
||||||
|
rts
|
||||||
|
|
21
loader.s
21
loader.s
|
@ -244,24 +244,23 @@ mainContinue2:
|
||||||
EMULATION
|
EMULATION
|
||||||
|
|
||||||
; Load rest of font data into bank 0 (needed if font size exceeds BUFFERSIZE)
|
; Load rest of font data into bank 0 (needed if font size exceeds BUFFERSIZE)
|
||||||
; jsr PRODOS
|
jsr PRODOS
|
||||||
; .byte $ca
|
.byte $ca
|
||||||
; .addr fileRead
|
.addr fileRead
|
||||||
; bne ioErrorJmp
|
bne ioErrorJmp
|
||||||
|
|
||||||
; Close the file
|
; Close the file
|
||||||
jsr PRODOS
|
jsr PRODOS
|
||||||
.byte $cc
|
.byte $cc
|
||||||
.addr fileClose
|
.addr fileClose
|
||||||
|
|
||||||
; NATIVE
|
NATIVE
|
||||||
|
|
||||||
; Copy rest of font data into bank 5 (needed if font size exceeds BUFFERSIZE)
|
; Copy rest of font data into bank 5 (needed if font size exceeds BUFFERSIZE)
|
||||||
; ldx fileReadLen
|
ldx fileReadLen
|
||||||
; txa
|
lda #5
|
||||||
; lda #5
|
ldy #BUFFERSIZE
|
||||||
; ldy #BUFFERSIZE
|
jsr copyBytes
|
||||||
; jsr copyBytes
|
|
||||||
|
|
||||||
bra mainContinue3
|
bra mainContinue3
|
||||||
|
|
||||||
|
@ -270,7 +269,7 @@ ioErrorJmp:
|
||||||
|
|
||||||
mainContinue3:
|
mainContinue3:
|
||||||
|
|
||||||
; EMULATION
|
EMULATION
|
||||||
|
|
||||||
; Open the title screen file
|
; Open the title screen file
|
||||||
jsr PRODOS
|
jsr PRODOS
|
||||||
|
|
126
titleScreen.s
126
titleScreen.s
|
@ -51,7 +51,6 @@ titleScreenCopyLoop:
|
||||||
; Render menu text
|
; Render menu text
|
||||||
jsr titleScreenRenderMenu
|
jsr titleScreenRenderMenu
|
||||||
|
|
||||||
ldx #147
|
|
||||||
jsr setBorderAtScanLine
|
jsr setBorderAtScanLine
|
||||||
|
|
||||||
; Fade in
|
; Fade in
|
||||||
|
@ -178,6 +177,8 @@ titleScreenKeyboardMenuDown:
|
||||||
titleScreenKeyboardMenuGo:
|
titleScreenKeyboardMenuGo:
|
||||||
lda menuSelection
|
lda menuSelection
|
||||||
beq titleScreenBeginGame
|
beq titleScreenBeginGame
|
||||||
|
cmp #1
|
||||||
|
beq titleScreenHelp
|
||||||
cmp #2
|
cmp #2
|
||||||
beq titleScreenQuit
|
beq titleScreenQuit
|
||||||
|
|
||||||
|
@ -187,8 +188,7 @@ titleScreenMainLoopEndFrame:
|
||||||
|
|
||||||
titleScreenBeginGame:
|
titleScreenBeginGame:
|
||||||
; Transition to gameplay
|
; Transition to gameplay
|
||||||
jsr unsetVBLInterruptVector
|
jsr titleScreenRemoveBorderEffect
|
||||||
jsr unsetScanLineInterruptVector
|
|
||||||
stz menuActionRequested
|
stz menuActionRequested
|
||||||
lda #skyPalette
|
lda #skyPalette
|
||||||
sta PARAML2
|
sta PARAML2
|
||||||
|
@ -196,8 +196,25 @@ titleScreenBeginGame:
|
||||||
jmp beginGameplay
|
jmp beginGameplay
|
||||||
|
|
||||||
titleScreenQuit:
|
titleScreenQuit:
|
||||||
|
jsr titleScreenRemoveBorderEffect
|
||||||
jmp quitGame
|
jmp quitGame
|
||||||
|
|
||||||
|
titleScreenHelp:
|
||||||
|
jsr titleScreenRemoveBorderEffect
|
||||||
|
stz menuActionRequested
|
||||||
|
|
||||||
|
; Fade out
|
||||||
|
lda #skyPalette
|
||||||
|
sta PARAML2
|
||||||
|
jsr paletteFade
|
||||||
|
jmp titleScreenRenderHelp
|
||||||
|
|
||||||
|
titleScreenRemoveBorderEffect:
|
||||||
|
jsr unsetVBLInterruptVector
|
||||||
|
jsr unsetScanLineInterruptVector
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
titleAnimationCounter:
|
titleAnimationCounter:
|
||||||
.word 0
|
.word 0
|
||||||
titleAnimationPos0:
|
titleAnimationPos0:
|
||||||
|
@ -307,3 +324,106 @@ titleScreenUnRenderSelection:
|
||||||
lda #1
|
lda #1
|
||||||
jsl renderStringFar
|
jsl renderStringFar
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; titleScreenRenderHelp
|
||||||
|
;
|
||||||
|
; Render the help menu
|
||||||
|
;
|
||||||
|
titleScreenRenderHelp:
|
||||||
|
SAVE_AXY
|
||||||
|
|
||||||
|
; Clear screen
|
||||||
|
ldx #0
|
||||||
|
ldy #200
|
||||||
|
jsr colorFill
|
||||||
|
|
||||||
|
; Draw help text
|
||||||
|
lda #helpText0
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$2c8a
|
||||||
|
lda #1
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText1
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$32ca
|
||||||
|
lda #1
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText2
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$390a
|
||||||
|
lda #1
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText3
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$4bed
|
||||||
|
lda #2
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText4
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$572d
|
||||||
|
lda #2
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText5
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$6265
|
||||||
|
lda #2
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText6
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$6dad
|
||||||
|
lda #2
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText7
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$78ed
|
||||||
|
lda #2
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
lda #helpText8
|
||||||
|
sta PARAML0
|
||||||
|
ldy #$90b7
|
||||||
|
lda #1
|
||||||
|
jsl renderStringFar
|
||||||
|
|
||||||
|
; Fade in
|
||||||
|
lda #titlePalette
|
||||||
|
sta PARAML2
|
||||||
|
jsr paletteFade
|
||||||
|
|
||||||
|
jsr kbdWaitForAnyKey
|
||||||
|
|
||||||
|
; Fade out
|
||||||
|
lda #skyPalette
|
||||||
|
sta PARAML2
|
||||||
|
jsr paletteFade
|
||||||
|
|
||||||
|
RESTORE_AXY
|
||||||
|
jmp titleScreen
|
||||||
|
|
||||||
|
helpText0:
|
||||||
|
pstring "SPROCKET AND TINKER DO NOT GET ALONG!"
|
||||||
|
helpText1:
|
||||||
|
pstring "YOUR GOAL IS TO ANGER THE OTHER CAT"
|
||||||
|
helpText2:
|
||||||
|
pstring "SO MUCH THAT SHE PEES AND RUNS OFF."
|
||||||
|
helpText3:
|
||||||
|
pstring "_^ AIM"
|
||||||
|
helpText4:
|
||||||
|
pstring "\] POWER"
|
||||||
|
helpText5:
|
||||||
|
pstring "`ab FIRE"
|
||||||
|
helpText6:
|
||||||
|
pstring "ef WEAPON"
|
||||||
|
helpText7:
|
||||||
|
pstring "cd SCROLL"
|
||||||
|
helpText8:
|
||||||
|
pstring "PRESS ANY KEY"
|
||||||
|
|
Loading…
Reference in New Issue