sb: add edga jr easter egg

This commit is contained in:
Vince Weaver 2023-06-03 16:00:05 -04:00
parent 687e963275
commit 7ec3ce6856
7 changed files with 43 additions and 30 deletions

View File

@ -116,6 +116,7 @@ TITLE: title.o
title.o: title.s zx02_optim.s \
zp.inc hardware.inc \
hgr_logo_scroll.s audio.s hgr_sprite.s \
hgr_sprite_big.s \
purple.s lc_detect.s \
title_sound/purple.btc.zx02 \
title_graphics/czmg4ap_title.hgr.zx02 \

View File

@ -1,7 +1,5 @@
Title
+ Fix menu options
+ Add cheat loading screen
+ Only play opening sound once?
+ Out of bounds show Edgar Jr. "Outta Bounds"
Duck:
+ Lots

View File

@ -146,7 +146,7 @@ no_move_head:
sta SPRITE_X
lda #36
sta SPRITE_Y
jsr hgr_draw_sprite
jsr hgr_draw_sprite_big
;==========================
; draw player
@ -160,7 +160,7 @@ no_move_head:
sta SPRITE_X
lda #138
sta SPRITE_Y
jsr hgr_draw_sprite
jsr hgr_draw_sprite_big
check_keypress:
lda KEYPRESS

View File

@ -13,27 +13,27 @@
; orange = color5 1 101 0101 1 010 1010
hgr_draw_sprite:
hgr_draw_sprite_big:
lda SPRITE_X
ror
bcs hgr_draw_sprite_odd
bcs hgr_draw_sprite_big_odd
hgr_draw_sprite_even:
hgr_draw_sprite_big_even:
ldy #0
lda (INL),Y ; load xsize
clc
adc SPRITE_X
sta sprite_width_end_smc+1 ; self modify for end of line
sta big_sprite_width_end_smc+1 ; self modify for end of line
iny ; load ysize
lda (INL),Y
sta sprite_ysize_smc+1 ; self modify
sta big_sprite_ysize_smc+1 ; self modify
; point smc to sprite
lda INL ; 16-bit add
sta sprite_smc1+1
sta big_sprite_smc1+1
lda INH
sta sprite_smc1+2
sta big_sprite_smc1+2
ldx #0 ; X is pointer offset
@ -41,7 +41,7 @@ hgr_draw_sprite_even:
ldx #2
hgr_sprite_yloop:
hgr_big_sprite_yloop:
lda CURRENT_ROW ; row
@ -55,52 +55,46 @@ hgr_sprite_yloop:
sta GBASL
lda hposn_high,Y
; eor #$00 draws on page2
; eor #$60 draws on page1
;hgr_sprite_page_smc:
; eor #$00
clc
adc DRAW_PAGE
sta GBASH
; eor #$60
; sta INH
ldy SPRITE_X
sprite_inner_loop:
big_sprite_inner_loop:
sprite_smc1:
big_sprite_smc1:
lda $f000,X ; load sprite data
sta (GBASL),Y ; store to screen
inx ; increment sprite offset
; if > 1 page
bne sprite_no_page_cross
inc sprite_smc1+2
bne big_sprite_no_page_cross
inc big_sprite_smc1+2
sprite_no_page_cross:
big_sprite_no_page_cross:
iny ; increment output position
sprite_width_end_smc:
big_sprite_width_end_smc:
cpy #6 ; see if reached end of row
bne sprite_inner_loop ; if not, loop
bne big_sprite_inner_loop ; if not, loop
inc CURRENT_ROW ; row
lda CURRENT_ROW ; row
sprite_ysize_smc:
big_sprite_ysize_smc:
cmp #31 ; see if at end
bne hgr_sprite_yloop ; if not, loop
bne hgr_big_sprite_yloop ; if not, loop
rts
hgr_draw_sprite_odd:
hgr_draw_sprite_big_odd:
ldy #0
lda (INL),Y ; load xsize
clc

View File

@ -183,7 +183,7 @@ sector_array:
length_array:
.byte 36, 16, 16, 32 ; TITLE, DUCK, ROOF, ASPLODE
.byte 40, 16, 16, 32 ; TITLE, DUCK, ROOF, ASPLODE
.byte 32, 32, 32 ; TARGET, CLIFF, RAT

View File

@ -189,11 +189,15 @@ wait_until_keypress:
;=========================
; see if number pressed
cmp #'7'
beq draw_edga_jr
cmp #'1'
bcc done_check_number ; blt
cmp #'7'
bcs done_check_number ; bge
; was a number
and #$f
@ -251,6 +255,21 @@ move_arrow:
jmp draw_arrow
draw_edga_jr:
lda #<edga_jr_sprite
sta INL
lda #>edga_jr_sprite
sta INH
lda #(105/7)
sta SPRITE_X
lda #0
sta SPRITE_Y
jsr hgr_draw_sprite_big
jmp draw_arrow
load_from_arrow:
inc MENU_ITEM ; it's zero indexed
@ -278,6 +297,7 @@ load_new_program:
.include "lc_detect.s"
.include "title_graphics/title_sprites.inc"
.include "hgr_sprite.s"
.include "hgr_sprite_big.s"
title_data:
.incbin "title_graphics/czmg4ap_title.hgr.zx02"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB