Geekboy

Untitled

Oct 18th, 2011
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CDA_SHOOT:
  2.  ld a,(de)
  3.  inc de
  4.  sub cdb_shoot-2
  5.  ld hl,(saveix)
  6.  add a,l
  7.  ld l,a
  8.  ld b,(hl)
  9.  ld hl,(enemypos)
  10.  ld a,(fireoffset+0)
  11.  add a,l
  12.  ld l,a
  13.  ld a,(fireoffset+1)
  14.  add a,h
  15.  ld h,a
  16.  ld (itemp2),hl
  17.  ld a,l
  18.  or h          ;checking if bits 6 or 7 are being occupied. If so, no shoot.
  19.  and %11000000
  20.  jp nz,CDSContinue
  21.  ld a,b
  22. cda_shootrc:
  23.  ld hl,BType01Shot2
  24.  ld (itemp3),hl
  25.  bit EBTFull,(iy)
  26.  jp nz,CDSContinue
  27.  ld hl,(EBT_curpos)
  28.  ld h,EBTLookupH
  29.  ld b,(hl)        ;obtaining MSB
  30.  dec l            ;running first test
  31.  jr nz,$+6
  32.  set EBTFull,(iy)
  33.  ld c,(hl)        ;getting LSB
  34.  dec l
  35.  ld (EBT_curpos),hl  ;just as long as spacer exists after EBT_curpos
  36.  ld h,b
  37.  ld l,c
  38.  ld b,a
  39.  ld a,(itemp3)
  40.  ld (hl),a
  41.  inc l
  42.  ld a,(itemp3+1)
  43.  ld (hl),a
  44.  inc l
  45.  xor a
  46.  ld (hl),a    ;initializing accuracy counters to zero.
  47.  inc l
  48.  ld (hl),a
  49.  inc l
  50.  ld (hl),b
  51.  inc l
  52.  ld (hl),$FF   ;expiration
  53.  inc l
  54.  ld b,h
  55.  ld c,l
  56.  ld hl,(itemp2)  ;L=x H=y. Bits aligned to the right.
  57.  rl l            ;
  58.  rl l
  59.  add hl,hl
  60.  add hl,hl
  61.  ld a,l
  62.  add hl,hl
  63.  rla
  64.  ld l,a
  65.  ld a,h
  66.  ld (bc),a
  67.  inc c
  68.  ld a,l
  69.  ld (bc),a
  70.  jp CDSContinue
  71. CDA_SHOOT2:
  72.  jp CDSContinue
Advertisement
Add Comment
Please, Sign In to add comment