Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;=============================================================================
- ;Bullet move/collide routines and all shared routines that associates with it
- ; nostack
- ; count = 1 for start everythign else is 0
- ; this is so we load the first set of values into the table
- ; ld hl,-X ; where X is offset 4 = user 1 = Y
- ; add hl,sp
- ; to make hl = entry on bullet table
- InitLut:
- ;Moves a bullet based on a LUT
- ;Post read decriment start by checking counter
- ; Counter of 1 means next LUT entry
- ; Count of 0 means return to player via arctan
- ld ix,(pTemp1) ; current LUT address. yay static adressing
- ld hl,-4 ; ld hl with the start of the bullet table enntry
- add hl,sp ;
- ld
- ld a,(ix)
- and %01111111 ; put angle into USER
- ld (hl),a
- inc hl ; point hl to flags
- ld a,(ix+1) ;
- add a,a ;shifts over and clears the lower bits via magic
- add a,a ; curtosy of calc84maniac
- ld b,a
- ld a,(hl) ; put flags in a
- or b ; merge into a
- ld (hl),a ; put back into flags
- LutHandlerStart
- ;Flow
- ;Decrement timer
- ;Check for z or c
- ;If z move to next
- ;if c
Advertisement
Add Comment
Please, Sign In to add comment