git.shiar.nl
/
nemesis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ed35457
)
additional byte for enemy hitpoints
author
Mischa Poslawsky
<nemesis@shiar.org>
Tue, 9 Nov 1999 07:33:56 +0000
(08:33 +0100)
committer
Mischa Poslawsky
<nemesis@shiar.org>
Wed, 18 Mar 2009 02:47:05 +0000
(
03:47
+0100)
nemesis.z80
patch
|
blob
|
history
diff --git
a/nemesis.z80
b/nemesis.z80
index 323344414bba2471eefb78421d7a3db08144d5b1..feb535d97c841c372dba435c1df9a09f3bc0354a 100644
(file)
--- a/
nemesis.z80
+++ b/
nemesis.z80
@@
-96,7
+96,7
@@
your_prevpos = your_locpos+1 ;+88 ;save previous positions (32d)
;^-----------------------------------<1 ;-120=$78
nrenemies = 10 ;max. nr of enemies
;^-----------------------------------<1 ;-120=$78
nrenemies = 10 ;max. nr of enemies
-enemysize =
6
+enemysize =
7
enemies = storepos2 ; +0 ;info about each enemy (6byt)
nrybuls = 10
enemies = storepos2 ; +0 ;info about each enemy (6byt)
nrybuls = 10
@@
-110,7
+110,7
@@
ybuls = ebullets+(nrebuls*3) ;+140
;level_info:
; [0000:damage 0:directfire 0:ground 0:ceiling 0:diagfire]
;enemies:
;level_info:
; [0000:damage 0:directfire 0:ground 0:ceiling 0:diagfire]
;enemies:
-; [000000:HP left 00:(00=no enemy 01=exploding 10=normal 11=moving)]
+; [
HP] [
000000:HP left 00:(00=no enemy 01=exploding 10=normal 11=moving)]
; [ship type or explosion frame] [x] [y] [move] [fire]
;---------------------- introduction ------------------------------------------
; [ship type or explosion frame] [x] [y] [move] [fire]
;---------------------- introduction ------------------------------------------
@@
-432,7
+432,7
@@
_gamestuff1:
cal Display_Screen ;display all
halt ;delay
cal Display_Screen ;display all
halt ;delay
- jp game_main_loop ;LOOP
+ jp game_main_loop ;LOOP
^^^^^^^^^^^^^
;--------------------------- ground -------------------------------------------
;--------------------------- ground -------------------------------------------
@@
-1165,7
+1165,7
@@
handle_laser:
check_laserhits: ;de = (x,y)
ld b,nrenemies
check_laserhits: ;de = (x,y)
ld b,nrenemies
- ld hl,enemies
+ ld hl,enemies
+1
laserhits: ;Hits with normal enemies
psh hl
laserhits: ;Hits with normal enemies
psh hl
@@
-1325,7
+1325,7
@@
next_ybullet:
check_bullethits: ;INPUT: de=X,Y; (temp1)=bullet
ld b,nrenemies
check_bullethits: ;INPUT: de=X,Y; (temp1)=bullet
ld b,nrenemies
- ld hl,enemies
+ ld hl,enemies
+1
hit_enemies: ;Hits with normal enemies
psh hl
hit_enemies: ;Hits with normal enemies
psh hl
@@
-1482,7
+1482,7
@@
place_boss:
standby_event:
ld b,nrenemies
standby_event:
ld b,nrenemies
- ld hl,enemies-enemysize
+ ld hl,enemies
+1
-enemysize
ld de,enemysize
chk_enemyleft:
add hl,de
ld de,enemysize
chk_enemyleft:
add hl,de
@@
-1498,7
+1498,7
@@
enemyleft:
do_event:
do_event:
- ld hl,enemies-enemysize
+ ld hl,enemies
+1
-enemysize
ld bc,enemysize
xor a ;a=0
chk_noenemy:
ld bc,enemysize
xor a ;a=0
chk_noenemy:
@@
-1520,6
+1520,11
@@
place_enemy:
ld a,(hl) ;load hitpoints+occ of this enemy class
ld (de),a ;save occ
ld a,(hl) ;load hitpoints+occ of this enemy class
ld (de),a ;save occ
+ dec de ;goto hp
+ xor a
+ ld (de),a ;save hp64
+ inc de ;next byte (or previous): occ again
+
inc hl ;next enemyInfo byte
inc de ;next byte of current enemy
ld a,(hl) ;load enemy class (nr)
inc hl ;next enemyInfo byte
inc de ;next byte of current enemy
ld a,(hl) ;load enemy class (nr)
@@
-1721,7
+1726,7
@@
remove_ebullet:
;--------------------------- handle enemies -----------------------------------
Handle_enemies:
;--------------------------- handle enemies -----------------------------------
Handle_enemies:
- ld hl,enemies
+ ld hl,enemies
+1
ld b,nrenemies ;handle all enemies
handle_enemy:
ld b,nrenemies ;handle all enemies
handle_enemy:
@@
-1937,7
+1942,7
@@
Enemies_hit:
ld d,h
ld e,l ;e = X+7, d = Y+7
ld d,h
ld e,l ;e = X+7, d = Y+7
- ld hl,enemies
+ ld hl,enemies
+1
ld b,nrenemies ;check all 20 enemies
check_collision:
psh hl
ld b,nrenemies ;check all 20 enemies
check_collision:
psh hl