diff --git a/games/sb/asplode.s b/games/sb/asplode.s index b763d7d9..71d60249 100644 --- a/games/sb/asplode.s +++ b/games/sb/asplode.s @@ -101,6 +101,9 @@ load_background: lda #1 sta STRONGBAD_DIR + lda #SHIELD_DOWN + sta SHIELD_POSITION + ;========================== ; main loop ;=========================== @@ -126,7 +129,7 @@ done_flip: sta DRAW_PAGE ;======================== - ; copy over backgrund + ; copy over background ;======================== jsr hgr_copy @@ -182,9 +185,10 @@ no_move_head: ; draw player ;=========================== - lda #player_sprite + lda shield_sprites_h,X sta INH lda PLAYER_X sta SPRITE_X @@ -209,8 +213,11 @@ check_keypress: beq done_game cmp #'A' ; shield left + beq shield_left cmp #'S' ; shield center + beq shield_center cmp #'D' ; shield right + beq shield_right cmp #8 ; left beq move_left @@ -231,12 +238,23 @@ no_more_left: move_right: lda PLAYER_X - cmp #29 ; bge + cmp #28 ; bge bcs no_more_right inc PLAYER_X no_more_right: jmp main_loop +shield_left: + lda #SHIELD_UP_LEFT + bne adjust_shield +shield_center: + lda #SHIELD_UP_CENTER + bne adjust_shield +shield_right: + lda #SHIELD_UP_RIGHT +adjust_shield: + sta SHIELD_POSITION + jmp main_loop @@ -273,3 +291,10 @@ comp_data: .incbin "asplode_graphics/sb_zone.hgr.zx02" +shield_sprites_l: + .byte player_sprite,>shield_left_sprite + .byte >shield_center_sprite,>shield_right_sprite diff --git a/games/sb/asplode_graphics/Makefile b/games/sb/asplode_graphics/Makefile index 7a4ced95..ef4dbb2a 100644 --- a/games/sb/asplode_graphics/Makefile +++ b/games/sb/asplode_graphics/Makefile @@ -33,7 +33,12 @@ sb_title.hgr: sb_title.png sb_sprites.inc: sb_sprites.png $(HGR_SPRITE) -s -l head_sprite sb_sprites.png 84 36 132 92 > sb_sprites.inc - $(HGR_SPRITE) -s -l player_sprite sb_sprites.png 112 138 167 192 >> sb_sprites.inc + $(HGR_SPRITE) -s -l player_sprite sb_sprites.png 98 138 181 192 >> sb_sprites.inc + $(HGR_SPRITE) -s -l shield_left_sprite sb_sprites.png 0 138 83 192 >> sb_sprites.inc + $(HGR_SPRITE) -s -l shield_center_sprite sb_sprites.png 196 83 279 137 >> sb_sprites.inc + $(HGR_SPRITE) -s -l shield_right_sprite sb_sprites.png 196 138 279 192 >> sb_sprites.inc + + diff --git a/games/sb/asplode_graphics/sb_sprites.png b/games/sb/asplode_graphics/sb_sprites.png index 0f9a7c81..03ec5448 100644 Binary files a/games/sb/asplode_graphics/sb_sprites.png and b/games/sb/asplode_graphics/sb_sprites.png differ diff --git a/games/sb/zp.inc b/games/sb/zp.inc index f75c227f..572bd7dc 100644 --- a/games/sb/zp.inc +++ b/games/sb/zp.inc @@ -65,6 +65,11 @@ NOT_FIRST_TIME = $6A STRONGBAD_X = $6B PLAYER_X = $6C STRONGBAD_DIR = $6D +SHIELD_POSITION = $6E + SHIELD_DOWN = 0 + SHIELD_UP_LEFT = 1 + SHIELD_UP_CENTER = 2 + SHIELD_UP_RIGHT = 3 .if 0 REGISTER_DUMP = $70