Change shots to be single-shot and 8x8 sprite size.
This commit is contained in:
parent
a92499fc40
commit
f5b67dd535
12
pewpew.asm
12
pewpew.asm
@ -65,8 +65,8 @@ Start:
|
|||||||
lda #%11000001
|
lda #%11000001
|
||||||
sta BGMODE
|
sta BGMODE
|
||||||
|
|
||||||
; Set sprite size to 16x16 (small) and 32x32 (large).
|
; Set sprite size to 8x8 (small) and 32x32 (large).
|
||||||
lda #%01100000
|
lda #%00100000
|
||||||
sta OAMSIZE
|
sta OAMSIZE
|
||||||
|
|
||||||
; Main screen: enable sprites & BG3.
|
; Main screen: enable sprites & BG3.
|
||||||
@ -429,15 +429,17 @@ MaybeShoot:
|
|||||||
|
|
||||||
lda playerX
|
lda playerX
|
||||||
clc
|
clc
|
||||||
adc #20
|
adc #28
|
||||||
sta 1, X
|
sta 1, X
|
||||||
|
|
||||||
lda playerY
|
lda playerY
|
||||||
|
clc
|
||||||
|
adc #14
|
||||||
sta 2, X
|
sta 2, X
|
||||||
|
|
||||||
; Get x- and y-velocity out of shotVelocityTable.
|
; Get x- and y-velocity out of shotVelocityTable.
|
||||||
lda nextShotState
|
lda nextShotState
|
||||||
and #%00000111 ; 8 possibilities.
|
and #%00000000 ; 8 possibilities if we use #%00000111.
|
||||||
ldy #0
|
ldy #0
|
||||||
-
|
-
|
||||||
cmp #0
|
cmp #0
|
||||||
@ -686,7 +688,7 @@ UpdateSprites:
|
|||||||
; Update secondary sprite table.
|
; Update secondary sprite table.
|
||||||
phy ; Save playerShotArray index.
|
phy ; Save playerShotArray index.
|
||||||
ldy $00
|
ldy $00
|
||||||
lda #%11000000
|
lda #%01000000
|
||||||
sta spriteTableScratchStart, Y
|
sta spriteTableScratchStart, Y
|
||||||
iny
|
iny
|
||||||
sty $00
|
sty $00
|
||||||
|
BIN
sprites32.pcx
BIN
sprites32.pcx
Binary file not shown.
Loading…
Reference in New Issue
Block a user