Advertisement
lilggamegenuis

LoadSonicDynPLC

Mar 23rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LoadSonicDynPLC:
  2.     moveq   #0,d0
  3.     move.b  mapping_frame(a0),d0    ; load frame number
  4. ; loc_1B84E:
  5. LoadSonicDynPLC_Part2:
  6.     cmp.b   (Sonic_LastLoadedDPLC).w,d0
  7.     beq.s   return_1B89A
  8.     move.b  d0,(Sonic_LastLoadedDPLC).w
  9.     lea (MapRUnc_Sonic).l,a2
  10.     tst.b   (Super_Sonic_flag).w
  11.     beq.s   +  
  12.     lea (MapRUnc_SupSonic).l,a2
  13. +
  14.     add.w   d0,d0
  15.     adda.w  (a2,d0.w),a2
  16.     move.w  (a2)+,d5
  17.     subq.w  #1,d5
  18.     bmi.s   return_1B89A
  19.     move.w  #tiles_to_bytes(ArtTile_ArtUnc_Sonic),d4
  20. ; loc_1B86E:
  21. SPLC_ReadEntry:
  22.     moveq   #0,d1
  23.     move.w  (a2)+,d1
  24.     move.w  d1,d3
  25.     lsr.w   #8,d3
  26.     andi.w  #$F0,d3
  27.     addi.w  #$10,d3
  28.     andi.w  #$FFF,d1
  29.     lsl.l   #5,d1
  30.     tst.b   (Super_Sonic_flag).w    ; is sonic super?
  31.     beq.s   +                       ; branch if not
  32.     addi.l  #ArtUnc_SupSonic,d1     ; Use supersonic's art
  33.     bra.s   ++
  34. +  
  35.     addi.l  #ArtUnc_Sonic,d1        ; Use sonic's art
  36. +
  37.     move.w  d4,d2
  38.     add.w   d3,d4
  39.     add.w   d3,d4
  40.     jsr (QueueDMATransfer).l
  41.     dbf d5,SPLC_ReadEntry   ; repeat for number of entries
  42.  
  43. return_1B89A:
  44.     rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement