Geekboy

Untitled

Jan 31st, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1.  
  2. PBTShot01DrawIam:
  3. ;Draws a 8x16 arc
  4. ;fires on of 3 sprites based off of the angle in the counter
  5. ;E=Y D=X normalized (00yy yyyy,00xx xxxx)
  6. ;IX=spritelocation
  7. ; Is this a piercing attack? i dont think it is. ask teh dragon later
  8. ld hl,0
  9. add hl,sp ; save the current stack pointer into hl
  10. ld sp,(itemp1) ; restores the stack so we can use it
  11. push hl ; push it onto the stack for safe keeping
  12. ex af,af' ; exchange and save flags
  13. push af ; why i have no bloody clue
  14. ;ex af,af'
  15. ld a,d ; ld a with X
  16. add a,6 ; Increase a with 6 ; we do this so that the 8x16 sprite is over the center of
  17. ld d,a ; load it back into D ; the dragon not the far left
  18. push de ; save to stack
  19. sub 8 ; move it over so that the main point is at the top of the arc but we draw it from the side like
  20. ; the sprite is oriented
  21. ld d,a ; load the modified x back into a
  22. ld ix,WaveGfxDat ; load ix with sprite pointer...
  23. call DrawClippedSpriteGeneral ;do shit that is in teh lable
  24. pop de ; restore x and y (even though y is unmodified)
  25. ld ix,wavegfxdat+8 ; load ix with second half of wave sprite
  26. call drawclippedspritegeneral ;.. do i really need to spell this out for you
  27. ;ex af,af'
  28. pop af ;restore af
  29. ex af,af' ; ^
  30.  
  31. pop hl
  32. ld sp,hl ; restore previous stack
  33.  
  34. jp PBTMainDrawRet
Advertisement
Add Comment
Please, Sign In to add comment