Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CDA_SHOOT:
- ld a,(de)
- inc de
- sub cdb_shoot-2
- ld hl,(saveix)
- add a,l
- ld l,a
- ld b,(hl)
- ld hl,(enemypos)
- ld a,(fireoffset+0)
- add a,l
- ld l,a
- ld a,(fireoffset+1)
- add a,h
- ld h,a
- ld (itemp2),hl
- ld a,l
- or h ;checking if bits 6 or 7 are being occupied. If so, no shoot.
- and %11000000
- jp nz,CDSContinue
- ld a,b
- cda_shootrc:
- ld hl,BType01Shot2
- ld (itemp3),hl
- bit EBTFull,(iy)
- jp nz,CDSContinue
- ld hl,(EBT_curpos)
- ld h,EBTLookupH
- ld b,(hl) ;obtaining MSB
- dec l ;running first test
- jr nz,$+6
- set EBTFull,(iy)
- ld c,(hl) ;getting LSB
- dec l
- ld (EBT_curpos),hl ;just as long as spacer exists after EBT_curpos
- ld h,b
- ld l,c
- ld b,a
- ld a,(itemp3)
- ld (hl),a
- inc l
- ld a,(itemp3+1)
- ld (hl),a
- inc l
- xor a
- ld (hl),a ;initializing accuracy counters to zero.
- inc l
- ld (hl),a
- inc l
- ld (hl),b
- inc l
- ld (hl),$FF ;expiration
- inc l
- ld b,h
- ld c,l
- ld hl,(itemp2) ;L=x H=y. Bits aligned to the right.
- rl l ;
- rl l
- add hl,hl
- add hl,hl
- ld a,l
- add hl,hl
- rla
- ld l,a
- ld a,h
- ld (bc),a
- inc c
- ld a,l
- ld (bc),a
- jp CDSContinue
- CDA_SHOOT2:
- jp CDSContinue
Advertisement
Add Comment
Please, Sign In to add comment