Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nanamiTest:
- ;1
- ;Moves the bullet in the directoin given via an angle
- ; the angle is gotten from a lut and the lower bits of the counter are used for the lut table loc
- ; t = Ftttttt
- ; charweapondat holds the ttl for the angle
- ;E=Y D=X
- ;inc e \ inc d ;modify for collision routine
- ;ld ix,PBMoveANGcont ;return address for collision routine
- ;jp SmallBulletCollision ;IN: DE=XY,
- PBMoveANGcont:
- ; dec e \ dec d ;unmodify from collision routine
- push de ;move the stack back for something...
- ;********************************
- ;If you needed to modify the counter, you will need the following code.
- ;AND DON'T FORGET TO PRESERVE BIT 7 OF L SINCE THAT IS THE FOCUSED FLAG.
- dec sp \ pop hl ;ENTER CODE
- ; Lut pos is in L
- ld a,(charweapondat)
- and %01111111
- cp 1
- jp c,_ ; if the counter is at 0 we destroy the bullet
- jp z,INCLUT ; if lut is 1 move to the next item on it
- push hl \ inc sp
- ld a,l ; put offset into a
- and %01111111 ; clear focus bit
- ld hl,nanami45LUT ; load hl with LUTptr
- inc a ; do this so we are looking at the second item at the pointer
- add a,l ; add l to a to make
- ld l,a ; LUT+ofs
- ld a,(hl) ; store the angle we get into a
- jp ++_
- _:
- pop de
- jp PBTDestroy
- INCLUT: ; must inc lut value by 2
- ld b,a
- ld a,l
- inc a \ inc a
- Xor l
- and %01111111
- xor l
- ld l,A
- push hl \ inc sp ;EXIT CODE
- ld hl,nanamiLUT45
Add Comment
Please, Sign In to add comment