Geekboy

Untitled

Apr 9th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;=============================================================================
  2. ;Bullet move/collide routines and all shared routines that associates with it
  3. ; nostack
  4. ; count = 1 for start everythign else is 0
  5. ; this is so we load the first set of values into the table
  6. ; ld hl,-X  ; where X is offset 4 = user 1 = Y
  7. ; add hl,sp
  8. ; to make hl = entry on bullet table
  9. InitLut:
  10. ;Moves a bullet based on a LUT
  11. ;Post read decriment start by checking counter
  12. ; Counter of 1 means next LUT entry
  13. ; Count of 0 means return to player via arctan
  14.  ld ix,(pTemp1)    ; current LUT address. yay static adressing
  15.  ld hl,-4          ; ld hl with the start of the bullet table enntry
  16.  add hl,sp         ;
  17.  ld
  18.  ld a,(ix)
  19.  and %01111111     ; put angle into USER
  20.  ld (hl),a
  21.  inc hl            ; point hl to flags
  22.  ld a,(ix+1)       ;
  23.  add a,a           ;shifts over and clears the lower bits via magic
  24.  add a,a           ; curtosy of calc84maniac
  25.  ld b,a
  26.  ld a,(hl)         ; put flags in a
  27.  or b              ; merge into a
  28.  ld (hl),a         ; put back into flags
  29. LutHandlerStart
  30. ;Flow
  31. ;Decrement timer
  32. ;Check for z or c
  33. ;If z move to next
  34. ;if c
Advertisement
Add Comment
Please, Sign In to add comment