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
- PBTMainMove: ;name used here for compatibility with that which calls this.
- PSHT_MoveAndCollidePlayerBullet:
- ld hl,PSHT_MoveAndCollideCharacterBulletTable
- call PSHT_SelectRoutine
- ld hl,psht_bitmap
- ld e,(hl)
- ld bc,$4008
- ld (itemp2),sp
- ld sp,$8D00
- PSHT_MoveAndCollidePlayerBulletLoopStart:
- rrc e ;used to check which bullets are empty. Hint: 0=empty.
- exx
- pop bc
- pop de
- jr nc,PSHT_MoveAndCollidePlayerBulletLoopReturn
- ld hl,(itemp3)
- bit 1,b
- jr nz,_
- ld hl,(itemp4)
- _:
- jp (hl)
- PSHT_MoveAndCollidePlayerBulletLoopReturn:
- exx
- dec c
- jr nz,_
- ld c,8 ;snap back to 8 bits in a byte
- inc hl ;and increment to next byte in the bitmap table
- ld e,(hl)
- _:
- djnz PSHT_MoveAndCollidePlayerBulletLoopStart
- ld sp,(itemp2)
- ret
Advertisement
Add Comment
Please, Sign In to add comment