Geekboy

Untitled

Apr 10th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NOTFRESH
  2. LutHandlerStart:
  3. ;Flow
  4. ;Decrement timer
  5. ;Check for z or c
  6. ;If z move to next
  7. ;if c move to follow player
  8. ;else increment based on type
  9. ; assume nothing is loaded as we may jump back here. later. can be removed if needed tho
  10.   ld hl,-3
  11.   add hl,sp
  12.   ld a,(hl)  ; ld a with flags
  13.   ld b,a save in b
  14.   rla \ rla
  15.   dec a             ; shift dec
  16.   add a,a \ add a,a ; shift back
  17.   or b
  18.   jr C,FollowPlayer
  19.   jr z,IncLut
  20.   ld (hl),a         ; save back into flags
  21. MoveBulletBasedOnLutAngle:
  22.  ;Increase the bullet based on the lut angle.
  23.  ; pre increment/saving executes with old
  24.  ; First load angle
  25.  ; Check for inc val
  26.  ; if val get mult and mult
  27.  ; save back and execute
  28.   ld e,(hl)   ; flags in E
  29.  dec hl      ; point hl to user
  30.  ld c,(hl)   ; put angle into C
  31.  ld a,(ix)   ; ld a with incdec
  32.  rlca \ rlca \ and %00000011    ; save incdec in %00000011
  33.  jr z,++_       ; if its zero skip the crap
  34.  add a,a        ; mult by 2
  35.  bit 0,E        ; if set to mult by 4 mult by 4
  36.  jr z,_         ; else skip it
  37.  add a,a
  38. _:
  39.  add a,c        ; if its zero just add it anyway
  40.  ld (hl),a      ; save back
  41.  jp moveang    ;inputs may vary juggle for that later. for now assuming c
  42. IncLut:
  43.  ld a,(pTemp1)
  44.  inc a
  45.  inc a
  46.  ld (pTtemp1),a  ; inc to next slot
  47.  dec hl
  48.  xor a
  49.  ld (hl),a      ;zero so its a fresh init
  50.  jp lutinit
Advertisement
Add Comment
Please, Sign In to add comment