mirror of
https://github.com/jeremysrand/BuGS.git
synced 2024-09-28 12:55:03 +00:00
Add the code to reset the mushrooms after death.
This commit is contained in:
parent
7264cf907d
commit
5258e79176
@ -77,7 +77,7 @@
|
|||||||
9D3396FF24AED09D003222B3 /* sprites.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = sprites.md; sourceTree = "<group>"; };
|
9D3396FF24AED09D003222B3 /* sprites.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = sprites.md; sourceTree = "<group>"; };
|
||||||
9D33970024AEFBF2003222B3 /* segments.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = segments.s; sourceTree = "<group>"; };
|
9D33970024AEFBF2003222B3 /* segments.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = segments.s; sourceTree = "<group>"; };
|
||||||
9D33970124AF9D55003222B3 /* sprites.macros */ = {isa = PBXFileReference; lastKnownFileType = text; path = sprites.macros; sourceTree = "<group>"; };
|
9D33970124AF9D55003222B3 /* sprites.macros */ = {isa = PBXFileReference; lastKnownFileType = text; path = sprites.macros; sourceTree = "<group>"; };
|
||||||
9D47CBE02547BEDB00CDA5CB /* gameMushroom.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameMushroom.s; sourceTree = "<group>"; };
|
9D47CBE02547BEDB00CDA5CB /* gameMushroom.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameMushroom.s; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.orcam; };
|
||||||
9D47CC14254A698900CDA5CB /* gamePlayer.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gamePlayer.s; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.orcam; };
|
9D47CC14254A698900CDA5CB /* gamePlayer.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gamePlayer.s; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.orcam; };
|
||||||
9D47CCBA25525C1A00CDA5CB /* tileData.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = tileData.pl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.perl; };
|
9D47CCBA25525C1A00CDA5CB /* tileData.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = tileData.pl; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.perl; };
|
||||||
9D53E5B32562320300E10169 /* gameShot.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameShot.s; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.orcam; };
|
9D53E5B32562320300E10169 /* gameShot.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameShot.s; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.orcam; };
|
||||||
|
@ -19,12 +19,75 @@ STARTING_NUM_MUSHROOMS equ 30
|
|||||||
|
|
||||||
|
|
||||||
resetMushrooms entry
|
resetMushrooms entry
|
||||||
; TODO - Write this code...
|
lda mushroomToRefresh
|
||||||
|
cmp #INVALID_TILE_NUM
|
||||||
|
beq resetMushrooms_startFromBeginning
|
||||||
|
tax
|
||||||
|
lda mushroomExplosionSprite
|
||||||
|
beq resetMushrooms_doneReset
|
||||||
|
sec
|
||||||
|
sbc #4
|
||||||
|
|
||||||
|
resetMushrooms_explode anop
|
||||||
|
sta mushroomExplosionSprite
|
||||||
|
tay
|
||||||
|
lda explosionJumpTable,y
|
||||||
|
sta resetMushrooms_jumpInst+1
|
||||||
|
lda explosionJumpTable+2,y
|
||||||
|
sta resetMushrooms_jumpInst+3
|
||||||
|
lda #TILE_STATE_DIRTY
|
||||||
|
sta tileDirty,x
|
||||||
|
lda tileScreenOffset,x
|
||||||
|
sec
|
||||||
|
sbc #3
|
||||||
|
tay
|
||||||
|
jsl resetMushrooms_jumpInst
|
||||||
|
sec
|
||||||
|
rtl
|
||||||
|
|
||||||
|
resetMushrooms_jumpInst anop
|
||||||
|
jmp >explosion1
|
||||||
|
nop
|
||||||
|
|
||||||
|
resetMushrooms_doneReset anop
|
||||||
|
txa
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
bra resetMushrooms_loop
|
||||||
|
resetMushrooms_startFromBeginning anop
|
||||||
|
ldx #0
|
||||||
|
|
||||||
|
resetMushrooms_loop anop
|
||||||
|
cpx #RHS_FIRST_TILE_OFFSET
|
||||||
|
blt resetMushrooms_keepChecking
|
||||||
|
lda #INVALID_TILE_NUM
|
||||||
|
sta mushroomToRefresh
|
||||||
clc
|
clc
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
|
resetMushrooms_keepChecking anop
|
||||||
|
lda tileType,x
|
||||||
|
beq resetMushrooms_next
|
||||||
|
cmp #TILE_MUSHROOM4
|
||||||
|
beq resetMushrooms_next
|
||||||
|
stx mushroomToRefresh
|
||||||
|
lda #TILE_MUSHROOM4
|
||||||
|
sta tileType,x
|
||||||
|
jsl scoreAddFive
|
||||||
|
ldx mushroomToRefresh
|
||||||
|
lda #EXPLOSION_LAST_OFFSET
|
||||||
|
bra resetMushrooms_explode
|
||||||
|
|
||||||
|
resetMushrooms_next anop
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
bra resetMushrooms_loop
|
||||||
|
|
||||||
|
|
||||||
addRandomMushrooms entry
|
addRandomMushrooms entry
|
||||||
stz numInfieldMushrooms
|
stz numInfieldMushrooms
|
||||||
|
lda #INVALID_TILE_NUM
|
||||||
|
sta mushroomToRefresh
|
||||||
ldy #STARTING_NUM_MUSHROOMS
|
ldy #STARTING_NUM_MUSHROOMS
|
||||||
|
|
||||||
addRandomMushrooms_loop anop
|
addRandomMushrooms_loop anop
|
||||||
@ -83,4 +146,9 @@ shootMushroom_poisonedNoScore anop
|
|||||||
shootMushroom_done anop
|
shootMushroom_done anop
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
|
|
||||||
|
mushroomToRefresh dc i2'INVALID_TILE_NUM'
|
||||||
|
mushroomExplosionSprite dc i2'0'
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
1
TODO.md
1
TODO.md
@ -2,7 +2,6 @@ TODO
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
* Implement a high score list and save the high scores across restarts
|
* Implement a high score list and save the high scores across restarts
|
||||||
* When the player dies, the mushrooms need to be reset and the score incremented for damaged and poisoned mushrooms.
|
|
||||||
* Implement the code to support pausing the game
|
* Implement the code to support pausing the game
|
||||||
* Implement the code for supporting a two player game
|
* Implement the code for supporting a two player game
|
||||||
* So much more.
|
* So much more.
|
||||||
|
Loading…
Reference in New Issue
Block a user