mirror of
https://github.com/jeremysrand/BuGS.git
synced 2025-02-06 06:29:50 +00:00
Start to get scorpion support into the game.
This commit is contained in:
parent
b813253c83
commit
1ccdb1d0b6
@ -84,6 +84,7 @@
|
||||
9D8FFC602491CA28005C9327 /* game.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = game.s; sourceTree = "<group>"; };
|
||||
9D8FFC612491CAF0005C9327 /* game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = "<group>"; };
|
||||
9DB1505024C3801100558B87 /* gameFlea.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameFlea.s; sourceTree = "<group>"; };
|
||||
9DB1505124C6875C00558B87 /* gameScorpion.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = gameScorpion.s; sourceTree = "<group>"; };
|
||||
9DC4D7BD24B7652100BACF4B /* ship.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = ship.s; sourceTree = "<group>"; };
|
||||
9DC4D7BE24B80C9600BACF4B /* shot.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = shot.s; sourceTree = "<group>"; };
|
||||
9DC4D7BF24BE9F7100BACF4B /* tiles.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tiles.h; sourceTree = "<group>"; };
|
||||
@ -131,6 +132,7 @@
|
||||
9D8FFC602491CA28005C9327 /* game.s */,
|
||||
9D8FFC612491CAF0005C9327 /* game.h */,
|
||||
9DB1505024C3801100558B87 /* gameFlea.s */,
|
||||
9DB1505124C6875C00558B87 /* gameScorpion.s */,
|
||||
9D62AF3B249871A300348F45 /* colour.s */,
|
||||
9D2FF6DA24C4C79A000181E5 /* random.s */,
|
||||
9D3396F324AECACC003222B3 /* sprites */,
|
||||
|
23
BuGS/game.s
23
BuGS/game.s
@ -29,9 +29,11 @@ game start
|
||||
|
||||
gameLoop anop
|
||||
jsl drawDirtyGameTiles
|
||||
jsl drawScorpion
|
||||
jsl drawFlea
|
||||
jsl drawDirtyNonGameTiles
|
||||
|
||||
jsl updateScorpion
|
||||
jsl updateFlea
|
||||
jsl checkKeyboard
|
||||
|
||||
@ -652,12 +654,12 @@ checkKey_loop2 anop
|
||||
cmp #'f'
|
||||
beq checkKey_addFlea
|
||||
cmp #'F'
|
||||
beq checkKey_addFlea
|
||||
beq checkKey_shootFlea
|
||||
|
||||
cmp #'s'
|
||||
beq checkKey_shootFlea
|
||||
beq checkKey_addScorpion
|
||||
cmp #'S'
|
||||
beq checkKey_shootFlea
|
||||
beq checkKey_shootScorpion
|
||||
|
||||
lda colourPalette
|
||||
inc a
|
||||
@ -666,16 +668,19 @@ checkKey_loop2 anop
|
||||
lda #$0000
|
||||
checkKey_skip anop
|
||||
sta colourPalette
|
||||
jsl setColour
|
||||
rtl
|
||||
jmp setColour
|
||||
|
||||
checkKey_addFlea anop
|
||||
jsl addFlea
|
||||
rtl
|
||||
jmp addFlea
|
||||
|
||||
checkKey_shootFlea anop
|
||||
jsl shootFlea
|
||||
rtl
|
||||
jmp shootFlea
|
||||
|
||||
checkKey_addScorpion anop
|
||||
jmp addScorpion
|
||||
|
||||
checkKey_shootScorpion anop
|
||||
jmp shootScorpion
|
||||
|
||||
checkKey_quit anop
|
||||
stz shouldQuit
|
||||
|
77
BuGS/gameScorpion.s
Normal file
77
BuGS/gameScorpion.s
Normal file
@ -0,0 +1,77 @@
|
||||
;
|
||||
; gameScorpion.s
|
||||
; BuGS
|
||||
;
|
||||
; Created by Jeremy Rand on 2020-07-20.
|
||||
;Copyright © 2020 Jeremy Rand. All rights reserved.
|
||||
;
|
||||
|
||||
case on
|
||||
mcopy gameScorpion.macros
|
||||
keep gameScorpion
|
||||
|
||||
gameScorpion start
|
||||
|
||||
|
||||
scorpionState_none equ 0
|
||||
scorpionState_left equ 1
|
||||
scorpionState_right equ 2
|
||||
scorpionState_exploding equ 3
|
||||
|
||||
|
||||
drawScorpion entry
|
||||
rtl
|
||||
|
||||
|
||||
updateScorpion entry
|
||||
rtl
|
||||
|
||||
|
||||
addScorpion entry
|
||||
lda scorpionState
|
||||
beq addScorpion_done
|
||||
|
||||
addScorpion_done anop
|
||||
rtl
|
||||
|
||||
|
||||
shootScorpion entry
|
||||
rtl
|
||||
|
||||
|
||||
scorpionState dc i2'scorpionState_none'
|
||||
scorpionScreenOffset dc i2'0'
|
||||
scorpionTileOffsets dc i2'0'
|
||||
dc i2'0'
|
||||
dc i2'0'
|
||||
dc i2'0'
|
||||
dc i2'0'
|
||||
dc i2'0'
|
||||
scorpionSpriteCounter dc i2'0'
|
||||
scorpionSprite dc i2'0'
|
||||
|
||||
scorpionLeftJumpTable dc i4'leftScorpion1s'
|
||||
dc i4'leftScorpion1'
|
||||
dc i4'leftScorpion1s'
|
||||
dc i4'leftScorpion1'
|
||||
dc i4'leftScorpion2s'
|
||||
dc i4'leftScorpion2'
|
||||
dc i4'leftScorpion2s'
|
||||
dc i4'leftScorpion2'
|
||||
dc i4'leftScorpion3s'
|
||||
dc i4'leftScorpion3'
|
||||
dc i4'leftScorpion3s'
|
||||
dc i4'leftScorpion3'
|
||||
dc i4'leftScorpion4s'
|
||||
dc i4'leftScorpion4'
|
||||
dc i4'leftScorpion4s'
|
||||
dc i4'leftScorpion4'
|
||||
|
||||
explosionJumpTable dc i4'explosion1'
|
||||
dc i4'explosion2'
|
||||
dc i4'explosion3'
|
||||
dc i4'explosion4'
|
||||
dc i4'explosion5'
|
||||
dc i4'explosion6'
|
||||
|
||||
end
|
@ -13,6 +13,7 @@
|
||||
scorpions start
|
||||
|
||||
leftScorpion1 entry
|
||||
iny
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -168,8 +169,6 @@ leftScorpion1 entry
|
||||
|
||||
|
||||
leftScorpion1s entry
|
||||
dex
|
||||
dex
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -310,6 +309,7 @@ leftScorpion1s entry
|
||||
|
||||
|
||||
leftScorpion2 entry
|
||||
iny
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -470,8 +470,6 @@ leftScorpion2 entry
|
||||
|
||||
|
||||
leftScorpion2s entry
|
||||
dex
|
||||
dex
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -627,6 +625,7 @@ leftScorpion2s entry
|
||||
|
||||
|
||||
leftScorpion3 entry
|
||||
iny
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -771,8 +770,6 @@ leftScorpion3 entry
|
||||
|
||||
|
||||
leftScorpion3s entry
|
||||
dex
|
||||
dex
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -939,6 +936,7 @@ leftScorpion3s entry
|
||||
|
||||
|
||||
leftScorpion4 entry
|
||||
iny
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
@ -1082,8 +1080,6 @@ leftScorpion4 entry
|
||||
|
||||
|
||||
leftScorpion4s entry
|
||||
dex
|
||||
dex
|
||||
_spriteHeader
|
||||
|
||||
; $c - Green
|
||||
|
Loading…
x
Reference in New Issue
Block a user