Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Obj37_Init:
- movea.l a0,a1
- moveq #0,d5
- move.w (Ring_count).w,d5
- tst.b parent+1(a0)
- beq.s +
- move.w (Ring_count_2P).w,d5
- +
- moveq #$20,d0
- cmp.w d0,d5
- blo.s +
- move.w d0,d5
- +
- subq.w #1,d5
- move.w #$288,d4
- bra.s +
- ; ===========================================================================
- - bsr.w SingleObjLoad
- bne.w +++
- +
- _move.b #ObjID_LostRings,id(a1) ; load obj37
- addq.b #2,routine(a1)
- move.b #8,y_radius(a1)
- move.b #8,x_radius(a1)
- move.w x_pos(a0),x_pos(a1)
- move.w y_pos(a0),y_pos(a1)
- move.l #Obj25_MapUnc_12382,mappings(a1)
- move.w #make_art_tile(ArtTile_ArtNem_Ring,1,0),art_tile(a1)
- bsr.w Adjust2PArtPointer2
- move.b #$84,render_flags(a1)
- move.b #3,priority(a1)
- move.b #$47,collision_flags(a1)
- move.b #8,width_pixels(a1)
- move.b #-1,(Ring_spill_anim_counter).w
- tst.w d4
- bmi.s +
- move.w d4,d0
- jsrto (CalcSine).l, JmpTo4_CalcSine
- move.w d4,d2
- lsr.w #8,d2
- asl.w d2,d0
- asl.w d2,d1
- move.w d0,d2
- move.w d1,d3
- addi.b #$10,d4
- bcc.s +
- subi.w #$80,d4
- bcc.s +
- move.w #$288,d4
- +
- move.w d2,x_vel(a1)
- move.w d3,y_vel(a1)
- neg.w d2
- neg.w d4
- cmpi.w #MainCharacter,parent(a0)
- beq.s +
- move.b (Tails_hit_counter).w,d2 ; get the number of times Player 2/Tails has been hit
- cmpi.b #1,d2 ; is it more than once?
- ble.s - ; if not, branch
- ext d2 ; change value from byte to word
- muls.w #$50,d2 ; multiply by #$50
- sub.w d2,$12(a1) ; change y-velocity of each ring
- dbf d5,-
- +
- move.b (Sonic_hit_counter).w,d2 ; get the number of times Sonic has been hit
- cmpi.b #1,d2 ; is it more than once?
- ble.s - ; if not, branch
- ext d2 ; change value from byte to word
- muls.w #$50,d2 ; multiply by #$50
- sub.w d2,$12(a1) ; change y-velocity of each ring
- dbf d5,-
- +
- move.w #SndID_RingSpill,d0
- jsr (PlaySoundStereo).l
- tst.b parent+1(a0)
- bne.s +
- move.w #0,(Ring_count).w
- move.b #$80,(Update_HUD_rings).w
- move.b #0,(Extra_life_flags).w
- bra.s Obj37_Main
- ; ===========================================================================
- +
- move.w #0,(Ring_count_2P).w
- move.b #$80,(Update_HUD_rings_2P).w
- move.b #0,(Extra_life_flags_2P).w
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement