Advertisement
vladikcomper

Sonic 3 in 1 - Calc SEGA logo angle

Jun 8th, 2012
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         ; Calulate scaling for the current angle
  2.         move.b  (Sega_RotAngle).w,d0    ; d0 -> rot angle
  3.         jsr _S1_CalcSine
  4.         move.l  #$8000,d2       ; d2 -> $8000
  5.         asr.w   d1          ; d1 -> Cos/2
  6.         bne.s   @div            ; if Cos/2 != 0 then branch
  7.         moveq   #0,d2           ; d2 -> -1/Cos = 0
  8.         bra.s   @nodiv          ; skip division
  9.     @div:   divs.w  d1,d2           ; d2 -> -1/Cos
  10.         neg.w   d2          ; d2 ->  1/Cos
  11.     @nodiv: move.w  d2,(Sega_VScale).w  ; VScale -> 1/Cos
  12.  
  13.         asr.w   d0          ; d0 -> Sin/2
  14.         move.w  d0,(Sega_HScale).w  ; HScale -> Sin/2
  15.         bsr.w   Sega_VDeform
  16.         bsr.w   Sega_HDeform
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement