Advertisement
Guest User

Untitled

a guest
May 6th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. Obj37_Init:
  2. movea.l a0,a1
  3. moveq #0,d5
  4. move.w (Ring_count).w,d5
  5. tst.b parent+1(a0)
  6. beq.s +
  7. move.w (Ring_count_2P).w,d5
  8. +
  9. moveq #$20,d0
  10. cmp.w d0,d5
  11. blo.s +
  12. move.w d0,d5
  13. +
  14. subq.w #1,d5
  15. move.w #$288,d4
  16. bra.s +
  17. ; ===========================================================================
  18.  
  19. - bsr.w SingleObjLoad
  20. bne.w +++
  21. +
  22. _move.b #ObjID_LostRings,id(a1) ; load obj37
  23. addq.b #2,routine(a1)
  24. move.b #8,y_radius(a1)
  25. move.b #8,x_radius(a1)
  26. move.w x_pos(a0),x_pos(a1)
  27. move.w y_pos(a0),y_pos(a1)
  28. move.l #Obj25_MapUnc_12382,mappings(a1)
  29. move.w #make_art_tile(ArtTile_ArtNem_Ring,1,0),art_tile(a1)
  30. bsr.w Adjust2PArtPointer2
  31. move.b #$84,render_flags(a1)
  32. move.b #3,priority(a1)
  33. move.b #$47,collision_flags(a1)
  34. move.b #8,width_pixels(a1)
  35. move.b #-1,(Ring_spill_anim_counter).w
  36. tst.w d4
  37. bmi.s +
  38. move.w d4,d0
  39. jsrto (CalcSine).l, JmpTo4_CalcSine
  40. move.w d4,d2
  41. lsr.w #8,d2
  42. asl.w d2,d0
  43. asl.w d2,d1
  44. move.w d0,d2
  45. move.w d1,d3
  46. addi.b #$10,d4
  47. bcc.s +
  48. subi.w #$80,d4
  49. bcc.s +
  50. move.w #$288,d4
  51. +
  52. move.w d2,x_vel(a1)
  53. move.w d3,y_vel(a1)
  54. neg.w d2
  55. neg.w d4
  56. cmpi.w #MainCharacter,parent(a0)
  57. beq.s +
  58. move.b (Tails_hit_counter).w,d2 ; get the number of times Player 2/Tails has been hit
  59. cmpi.b #1,d2 ; is it more than once?
  60. ble.s - ; if not, branch
  61. ext d2 ; change value from byte to word
  62. muls.w #$50,d2 ; multiply by #$50
  63. sub.w d2,$12(a1) ; change y-velocity of each ring
  64. dbf d5,-
  65. +
  66. move.b (Sonic_hit_counter).w,d2 ; get the number of times Sonic has been hit
  67. cmpi.b #1,d2 ; is it more than once?
  68. ble.s - ; if not, branch
  69. ext d2 ; change value from byte to word
  70. muls.w #$50,d2 ; multiply by #$50
  71. sub.w d2,$12(a1) ; change y-velocity of each ring
  72. dbf d5,-
  73. +
  74. move.w #SndID_RingSpill,d0
  75. jsr (PlaySoundStereo).l
  76. tst.b parent+1(a0)
  77. bne.s +
  78. move.w #0,(Ring_count).w
  79. move.b #$80,(Update_HUD_rings).w
  80. move.b #0,(Extra_life_flags).w
  81. bra.s Obj37_Main
  82. ; ===========================================================================
  83. +
  84. move.w #0,(Ring_count_2P).w
  85. move.b #$80,(Update_HUD_rings_2P).w
  86. move.b #0,(Extra_life_flags_2P).w
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement