Advertisement
NovaYoshi

spinners

Jan 24th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .proc AObject_Spinner
  2.   lda AObjectF2,x
  3.   cmp #2
  4.   bne NotTeleporting
  5.  
  6.   jsr huge_rand
  7.   and #63
  8.   sub #32
  9.   add AObjectPXH,x
  10.   sta AObjectPXH,x
  11.   add #8
  12.   pha
  13.  
  14.   jsr huge_rand
  15.   and #63
  16.   sub #32
  17.   add AObjectPYH,x
  18.   sta AObjectPYH,x
  19.   add #8
  20.   and #$f0
  21.   sta 0
  22.   pla
  23.   lsr
  24.   lsr
  25.   lsr
  26.   lsr
  27.   ora 0
  28.   tay
  29.   lda LevelBuf,y
  30.   bne :+
  31.     lda #0
  32.     sta AObjectF2,x
  33.   :
  34.  
  35.   ldy #ADRAW_HMIRROR
  36.   lda retraces
  37.   and #8
  38.   lsr
  39.   lsr
  40.   add #$74
  41.   jmp AObjectDrawEx
  42. NotTeleporting:
  43.   lda retraces
  44.   and #3
  45.   bne :+
  46.   jsr huge_rand
  47.   and #%111
  48.   bne :+
  49.     jsr AObjectAimAtPlayer
  50.     sta AObjectAngle,x
  51. : lda retraces
  52.   and #7
  53.   bne :+
  54.   jsr huge_rand
  55.   and #%111
  56.   bne :+
  57.     ldy AObjectAngle,x
  58.     lda #8
  59.     jsr AObjectShoot
  60.   :
  61.  
  62.   jsr AObjectPlayerTouch
  63.   jsr AObjectHurtPlayerIfTouched
  64.   jsr AObjectGetShot
  65.   jsr AObjectGetHurtFromShot
  66.   lda #1
  67.   jsr AObjectUpdateVelocity
  68.   lda #0
  69.   sta 0
  70.   jsr AObjectCheckBounce
  71.   lda 0
  72.   beq :+
  73.     jsr huge_rand
  74.     lsr
  75.     lsr
  76.     and #7
  77.     bne :+
  78.       lda #2
  79.       sta AObjectF2,x
  80.   :
  81.   jsr AObjectApplyVelocity
  82.   ldy #ADRAW_HMIRROR
  83.   lda retraces
  84.   and #8
  85.   lsr
  86.   lsr
  87.   add #$40
  88.   jsr AObjectDrawEx
  89.   rts
  90. .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement