Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---------------------------------------------------------------------------
- ; Босс-Sonic Runners
- ; ---------------------------------------------------------------------------
- ; Hits
- BossSR_Hits = 8
- ; Attributes
- ;_Setup1 = 2
- ;_Setup2 = 4
- ; Dynamic object variables
- obBSR_Routine = $30 ; .b
- obBSR_Pinch = $31 ; .b
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSR:
- move.l #Obj_Wait,address(a0)
- move.w #$7F,$2E(a0)
- move.l #Obj_BossSR_Start,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- Obj_BossSR_Start:
- move.l #Obj_BossSR_Main,address(a0)
- Obj_BossSR_Main:
- moveq #0,d0
- move.b routine(a0),d0
- move.w BossSR_Index(pc,d0.w),d0
- jsr BossSR_Index(pc,d0.w)
- bsr.w BossSR_CheckTouch
- jmp (Draw_And_Touch_Sprite).l
- ; ---------------------------------------------------------------------------
- BossSR_Index: offsetTable
- offsetTableEntry.w BossSR_Init ; 0
- offsetTableEntry.w BossSR_Setup ; 2
- offsetTableEntry.w BossSR_Setup2 ; 4
- offsetTableEntry.w BossSR_Setup3 ; 6
- ; ---------------------------------------------------------------------------
- BossSR_Init:
- lea ObjDat_BossSR(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.b #_Setup2,routine(a0)
- move.b #BossSR_Hits,collision_property(a0)
- st (Boss_flag).w
- move.w #$7F,$2E(a0)
- move.l #BossSR_MoveDown_Intro,$34(a0)
- move.w #$100,y_vel(a0)
- lea ChildObjDat_RobotnikHud(pc),a2
- jsr (CreateChild6_Simple).l
- bne.s +
- move.w a0,parent3(a1)
- + lea Child1_MakeRoboHead3(pc),a2
- jsr (CreateChild1_Normal).l
- lea ChildObjDat_RobotnikFire(pc),a2
- jsr (CreateChild1_Normal).l
- lea ChildObjDat_BossSRTube(pc),a2
- jmp (CreateChild1_Normal).l
- ; ---------------------------------------------------------------------------
- BossSR_Setup3:
- move.b (Level_frame_counter+1).w,d0
- andi.w #7,d0
- bne.s BossSR_Setup
- sfx sfx_BreakBridge,0,0,0
- BossSR_Setup:
- jsr (Swing_UpAndDown).l
- BossSR_Setup2:
- jsr (MoveSprite2).l
- jmp (Obj_Wait).l
- ; ---------------------------------------------------------------------------
- BossSR_MoveDown_Intro:
- move.b #_Setup1,routine(a0)
- move.l #BossSR_MoveDown_Laugh,$34(a0)
- clr.w y_vel(a0)
- jmp (Swing_Setup1).l
- ; ---------------------------------------------------------------------------
- BossSR_MoveDown_Laugh:
- bset #5,status(a0)
- move.w #$4F,$2E(a0)
- move.l #BossSR_MoveDown_StopLaugh,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_MoveDown_StopLaugh:
- move.w #$F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- bclr #5,status(a0)
- rts
- ; =============== S U B R O U T I N E =======================================
- BossSR_PinchMode:
- sf obBSR_Pinch(a0)
- bset #6,status(a0)
- move.b #_Setup3,routine(a0)
- move.w #$4F,$2E(a0)
- clr.b obBSR_Routine(a0)
- move.l #BossSR_PinchMode_Stop,$34(a0)
- lea ChildObjDat_BossSRTube_Fire(pc),a2
- jmp (CreateChild1_Normal).l
- ; ---------------------------------------------------------------------------
- BossSR_PinchMode_Stop:
- bclr #6,status(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- rts
- ; =============== S U B R O U T I N E =======================================
- BossSR_SetSubroutine:
- tst.b obBSR_Pinch(a0)
- bne.s BossSR_PinchMode
- moveq #0,d0
- move.b obBSR_Routine(a0),d0
- addq.b #1,obBSR_Routine(a0)
- lea BossSR_SetMovement(pc),a1
- cmpi.b #BossSR_Hits/4+1,$29(a0)
- bhs.s +
- lea BossSR_SetMovement2(pc),a1
- + move.b (a1,d0.w),d0
- bmi.s +
- move.l BossSR_Movement(pc,d0.w),$34(a0)
- rts
- + clr.b obBSR_Routine(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_SetMovement:
- dc.b 0<<2
- dc.b 1<<2
- dc.b 4<<2
- dc.b 1<<2
- dc.b 0<<2
- dc.b 4<<2
- dc.b 0<<2
- dc.b 0<<2
- dc.b 5<<2
- dc.b 2<<2
- dc.b 3<<2
- dc.b 1<<2
- dc.b 1<<2
- dc.b 4<<2
- dc.b 1<<2
- dc.b 0<<2
- dc.b 5<<2
- dc.b 2<<2
- dc.b 4<<2
- dc.b 2<<2
- dc.b 4<<2
- dc.b 2<<2
- dc.b 0<<2
- dc.b 4<<2
- dc.b 0<<2
- dc.b 1<<2
- dc.b 0<<2
- dc.b 4<<2
- dc.b 1<<2
- dc.b 3<<2
- dc.b 0<<2
- dc.b 5<<2
- dc.b 0<<2
- dc.b 0<<2
- dc.b 1<<2
- dc.b 1<<2
- dc.b 4<<2
- dc.b 2<<2
- dc.b 4<<2
- dc.b -1 ; Конец
- even
- BossSR_SetMovement2:
- dc.b 6<<2
- dc.b 7<<2
- dc.b 3<<2
- dc.b 2<<2
- dc.b 2<<2
- dc.b 6<<2
- dc.b 7<<2
- dc.b 2<<2
- dc.b 6<<2
- dc.b 7<<2
- dc.b -1 ; Конец
- even
- BossSR_Movement:
- dc.l BossSR_SpikeBall_Attack ; 0
- dc.l BossSR_SpikeBall2_Attack ; 1
- dc.l BossSR_Rocket_Attack ; 2
- dc.l BossSR_Boss_Attack ; 3
- dc.l BossSR_SpikeBall3_Attack ; 4
- dc.l BossSR_Boss_Laugh ; 5
- dc.l BossSR_Laser_Attack_Down ; 6
- dc.l BossSR_Laser_Attack_Up ; 7
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью шипастого шара
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_SpikeBall_Attack:
- move.b #_Setup2,routine(a0)
- move.w #-$200,y_vel(a0)
- move.l #BossSR_SpikeBall_CheckPos,$34(a0)
- BossSR_SpikeBall_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$60,d0
- cmp.w y_pos(a0),d0
- blo.s +
- move.w d0,y_pos(a0)
- move.b #_Setup1,routine(a0)
- move.l #BossSR_SpikeBall_Attack_Start,$34(a0)
- clr.w y_vel(a0)
- jsr (Swing_Setup1).l
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_SpikeBall_Attack_Start:
- move.w #$7F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- sfx sfx_SpikeBall2,0,0,0
- lea ChildObjDat_BossSRSpikeBall(pc),a2
- jmp (CreateChild6_Simple).l
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью шипастого шара 2
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_SpikeBall2_Attack:
- move.b #_Setup2,routine(a0)
- move.w #$200,y_vel(a0)
- move.l #BossSR_SpikeBall2_CheckPos,$34(a0)
- BossSR_SpikeBall2_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$80,d0
- cmp.w y_pos(a0),d0
- bhs.s +
- move.w d0,y_pos(a0)
- move.b #_Setup1,routine(a0)
- move.l #BossSR_SpikeBall2_Attack_Start,$34(a0)
- clr.w y_vel(a0)
- jsr (Swing_Setup1).l
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_SpikeBall2_Attack_Start:
- move.w #$7F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- sfx sfx_SpikeBall2,0,0,0
- lea ChildObjDat_BossSRSpikeBall(pc),a2
- jsr (CreateChild6_Simple).l
- bne.s +
- move.b #2,subtype(a1)
- + rts
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью ракеты
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_Rocket_Attack:
- move.b #_Setup1,routine(a0)
- move.w #$4F,$2E(a0)
- sfx sfx_FireShot,0,0,0
- move.l #BossSR_SetSubroutine,$34(a0)
- lea ChildObjDat_BossSRRocket(pc),a2
- jmp (CreateChild6_Simple).l
- ; ---------------------------------------------------------------------------
- ; Босс атакует самостоятельно
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_Boss_Attack:
- move.b #_Setup2,routine(a0)
- move.w #$200,y_vel(a0)
- move.l #BossSR_Boss_Attack_CheckPos,$34(a0)
- BossSR_Boss_Attack_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$A0,d0
- cmp.w y_pos(a0),d0
- bhs.s +
- move.w d0,y_pos(a0)
- sfx sfx_Squeak,0,0,0
- move.l #BossSR_Boss_Attack_MoveAttack,$34(a0)
- clr.w y_vel(a0)
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Attack_MoveAttack:
- move.w #-$400,x_vel(a0)
- move.w #$37,$2E(a0)
- move.l #BossSR_Boss_Attack_SetMove,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Attack_SetMove:
- move.w #-$100,y_vel(a0)
- move.w #7,$2E(a0)
- move.l #BossSR_Boss_Attack_SetMove2,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Attack_SetMove2:
- move.w #$17,$2E(a0)
- move.l #BossSR_Boss_Attack_StopYMove,$34(a0)
- move.w #$400,x_vel(a0)
- move.w #-$180,y_vel(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Attack_StopYMove:
- move.w #$27,$2E(a0)
- move.l #BossSR_Boss_Attack_StopXMove,$34(a0)
- clr.w y_vel(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Attack_StopXMove:
- move.b #_Setup1,routine(a0)
- move.w #$4F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- clr.w x_vel(a0)
- jmp (Swing_Setup1).l
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью шипастого шара 3
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_SpikeBall3_Attack:
- move.b #_Setup2,routine(a0)
- move.w #-$200,y_vel(a0)
- move.l #BossSR_SpikeBall3_CheckPos,$34(a0)
- BossSR_SpikeBall3_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$60,d0
- cmp.w y_pos(a0),d0
- blo.s +
- move.w d0,y_pos(a0)
- move.b #_Setup1,routine(a0)
- move.l #BossSR_SpikeBall3_Attack_Start,$34(a0)
- clr.w y_vel(a0)
- jsr (Swing_Setup1).l
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_SpikeBall3_Attack_Start:
- move.w #$7F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- sfx sfx_SpikeBall2,0,0,0
- lea ChildObjDat_BossSRSpikeBall(pc),a2
- jsr (CreateChild6_Simple).l
- bne.s +
- move.b #4,subtype(a1)
- + rts
- ; ---------------------------------------------------------------------------
- ; Босс смеётся
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Laugh:
- bset #5,status(a0)
- move.w #$4F,$2E(a0)
- move.l #BossSR_Boss_Laugh_Stop,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- BossSR_Boss_Laugh_Stop:
- bclr #5,status(a0)
- move.w #$4F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- rts
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью лазера (Сверху)
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Attack_Up:
- move.b #_Setup2,routine(a0)
- move.w #-$200,y_vel(a0)
- move.l #BossSR_Laser_Up_CheckPos,$34(a0)
- BossSR_Laser_Up_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$80,d0
- cmp.w y_pos(a0),d0
- blo.s +
- move.w d0,y_pos(a0)
- sfx sfx_Laser6,0,0,0
- move.l #BossSR_Laser_Up_Attack_Start,$34(a0)
- clr.w y_vel(a0)
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Up_Attack_Start:
- move.w #$F,$2E(a0)
- move.l #BossSR_Laser_Up_Stop,$34(a0)
- lea ChildObjDat_BossSRLaser(pc),a2
- jmp (CreateChild1_Normal).l
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Up_Stop:
- move.b #_Setup1,routine(a0)
- move.w #$F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- jmp (Swing_Setup1).l
- ; ---------------------------------------------------------------------------
- ; Босс атакует с помощью лазера (Снизу)
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Attack_Down:
- move.b #_Setup2,routine(a0)
- move.w #$200,y_vel(a0)
- move.l #BossSR_Laser_Down_CheckPos,$34(a0)
- BossSR_Laser_Down_CheckPos:
- move.w (Camera_Y_pos).w,d0
- addi.w #$B0,d0
- cmp.w y_pos(a0),d0
- bhs.s +
- move.w d0,y_pos(a0)
- sfx sfx_Laser6,0,0,0
- move.l #BossSR_Laser_Down_Attack_Start,$34(a0)
- clr.w y_vel(a0)
- + rts
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Down_Attack_Start:
- move.w #$F,$2E(a0)
- move.l #BossSR_Laser_Down_Stop,$34(a0)
- lea ChildObjDat_BossSRLaser(pc),a2
- jmp (CreateChild1_Normal).l
- ; ---------------------------------------------------------------------------
- BossSR_Laser_Down_Stop:
- move.b #_Setup1,routine(a0)
- move.w #$F,$2E(a0)
- move.l #BossSR_SetSubroutine,$34(a0)
- jmp (Swing_Setup1).l
- ; ---------------------------------------------------------------------------
- ; Проверка урона
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- BossSR_CheckTouch:
- tst.b collision_flags(a0)
- bne.s BossSR_CheckTouch_Return
- tst.b collision_property(a0)
- beq.s BossSR_CheckTouch_WaitExplosive
- tst.b $1C(a0)
- bne.s +
- move.b #$30,$1C(a0)
- sfx sfx_HitBoss,0,0,0
- bset #6,status(a0)
- cmpi.b #BossSR_Hits/4,$29(a0)
- bne.s +
- st obBSR_Pinch(a0)
- + moveq #0,d0
- btst #0,$1C(a0)
- bne.s +
- addq.w #3*2,d0
- + jsr (BossFlash).l
- subq.b #1,$1C(a0)
- bne.s BossSR_CheckTouch_Return
- bclr #6,status(a0)
- move.b collision_restore_flags(a0),collision_flags(a0)
- BossSR_CheckTouch_Return:
- rts
- ; ---------------------------------------------------------------------------
- BossSR_CheckTouch_WaitExplosive:
- move.l #Wait_FadeToLevelMusic,address(a0)
- move.l #BossSR_CheckTouch_WaitExplosive_Restore,$34(a0)
- addq.b #2,(BackgroundEvent_routine).w
- bset #7,status(a0)
- lea (Child6_CreateBossExplosion).l,a2
- jsr (CreateChild1_Normal).l
- bne.s +
- move.b #4,subtype(a1)
- + move.w #$7F,$2E(a0)
- jmp (BossDefeated_NoTime).l
- ; ---------------------------------------------------------------------------
- BossSR_CheckTouch_WaitExplosive_Restore:
- move.l #loc_7A3E6,(a0)
- bset #0,render_flags(a0)
- move.w #$400,x_vel(a0)
- clr.w y_vel(a0)
- rts
- ; ---------------------------------------------------------------------------
- loc_7A3E6:
- subq.w #1,$2E(a0)
- bmi.s loc_7A3F8
- jsr (MoveSprite2).l
- jmp (Draw_Sprite).l
- ; ---------------------------------------------------------------------------
- loc_7A3F8:
- addq.b #2,(Dynamic_resize_routine).w
- move.l #Go_Delete_Sprite,address(a0)
- rts
- ; ---------------------------------------------------------------------------
- ; Огонь из трубы босса
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRTube_Fire:
- btst #1,(Level_frame_counter+1).w
- beq.s BossSRTube_Fire_Draw
- move.l a0,-(sp)
- movea.w parent3(a0),a0
- lea ChildObjDat_BossGreyBall_Fire(pc),a2
- jsr (CreateChild1_Normal).l
- bne.s +
- move.b #24/2,$3A(a1)
- move.b #24/2,$3B(a1)
- move.w #$100,$3C(a1)
- + movea.l (sp)+,a0
- BossSRTube_Fire_Draw:
- jsr (Refresh_ChildPositionAdjusted).l
- jmp (Child_CheckParent).l
- ; ---------------------------------------------------------------------------
- ; Труба босса
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRTube:
- lea ObjDat_BossSRTube(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.l #+,address(a0)
- + jsr (Refresh_ChildPositionAdjusted).l
- moveq #0,d0
- jmp (Child_Draw_Sprite_FlickerMove).l
- ; ---------------------------------------------------------------------------
- ; Шипастый шар босса
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRSpikeBall:
- moveq #0,d0
- move.b routine(a0),d0
- move.w BossSRSpikeBall_Index(pc,d0.w),d1
- jsr BossSRSpikeBall_Index(pc,d1.w)
- movea.w parent3(a0),a1
- btst #7,status(a1)
- bne.w BossSRSpikeBall_Remove
- jmp (Sprite_CheckDeleteTouchXY).l
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Index: offsetTable
- offsetTableEntry.w BossSRSpikeBall_Init
- offsetTableEntry.w BossSRSpikeBall_Setup
- offsetTableEntry.w BossSRSpikeBall_Setup2
- offsetTableEntry.w BossSRSpikeBall_Setup3
- offsetTableEntry.w BossSRSpikeBall_Setup4
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Init:
- lea ObjDat_BossSRSpikeBall(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.b #48/2,y_radius(a0)
- move.l #BossSRSpikeBall_Fall,$34(a0)
- tst.b subtype(a0)
- beq.s +
- move.l #BossSRSpikeBall_Fall2,$34(a0)
- + cmpi.b #4,subtype(a0)
- bne.s +
- move.b #_Setup3,routine(a0)
- move.l #BossSRSpikeBall_Fall,$34(a0)
- clr.b collision_flags(a0)
- + rts
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Setup3:
- bsr.w BossSRSpikeBall_CheckPlayer
- btst #0,(V_int_run_count+3).w
- beq.s BossSRSpikeBall_Setup
- eori.w #$6000,art_tile(a0)
- BossSRSpikeBall_Setup:
- jsr (MoveSprite).l
- jmp (ObjHitFloor_DoRoutine).l
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Setup4:
- btst #0,(V_int_run_count+3).w
- beq.s BossSRSpikeBall_Setup2
- eori.w #$6000,art_tile(a0)
- BossSRSpikeBall_Setup2:
- jsr (MoveSprite2).l
- jmp (Obj_Wait).l
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Fall:
- sfx sfx_SpikeBall,0,0,0
- move.w #-$300,x_vel(a0)
- move.w #-$500,y_vel(a0)
- lea ChildObjDat_BossGreyBall_Spark(pc),a2
- jmp (CreateChild6_Simple).l
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Fall2:
- sfx sfx_SpikeBall,0,0,0
- move.b #_Setup2,routine(a0)
- move.w #-$400,x_vel(a0)
- clr.w y_vel(a0)
- move.l #BossSRSpikeBall_Return,$34(a0)
- BossSRSpikeBall_Return:
- rts
- ; ---------------------------------------------------------------------------
- obSpikeBall_CheckXY:
- dc.w -32
- dc.w 64
- dc.w -32
- dc.w 64
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_CheckPlayer:
- lea (Player_1).w,a1
- lea obSpikeBall_CheckXY(pc),a2
- jsr (Check_InMyRange).l
- beq.s BossSRSpikeBall_CheckPlayer_Return
- move.b #_Setup4,routine(a0)
- move.w #$800,x_vel(a0)
- move.w #-$200,y_vel(a0)
- sfx sfx_SpikeAttack,0,0,0
- move.l #BossSRSpikeBall_Fall3,$34(a0)
- BossSRSpikeBall_CheckPlayer_Return:
- rts
- ; ---------------------------------------------------------------------------
- BossSRSpikeBall_Fall3:
- move.w (Camera_X_pos).w,d0
- addi.w #$110,d0
- cmp.w x_pos(a0),d0
- bge.s BossSRSpikeBall_Fall3_Return
- movea.w parent3(a0),a1
- move.b collision_flags(a1),collision_restore_flags(a1)
- move.b #0,collision_flags(a1)
- subq.b #1,boss_hitcount2(a1)
- clr.l x_vel(a0)
- lea ChildObjDat_BossGreyBall_Splinter(pc),a2
- jsr (CreateChild6_Simple).l
- BossSRSpikeBall_Remove:
- move.l #Go_Delete_Sprite,address(a0)
- BossSRSpikeBall_Fall3_Return:
- rts
- ; ---------------------------------------------------------------------------
- ; Ракета босса
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRRocket:
- move.w (Camera_X_pos).w,d0
- addi.w #$140,d0
- move.w d0,x_pos(a0)
- move.w (Camera_Y_pos).w,d0
- addi.w #$C0,d0
- move.w d0,y_pos(a0)
- lea ObjDat_BossSRRocket(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.w #-$500,x_vel(a0)
- lea ChildObjDat_BossSRRocket_Fire(pc),a2
- jsr (CreateChild1_Normal).l
- move.l #+,address(a0)
- + jsr (MoveSprite2).l
- movea.w parent3(a0),a1
- btst #7,status(a1)
- bne.w BossSRSpikeBall_Remove
- jmp (Sprite_CheckDeleteTouchXY).l
- ; ---------------------------------------------------------------------------
- ; Ракета босса (Огонь)
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRRocket_Fire:
- lea ObjDat_BossSRRocket_Fire(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.l #+,address(a0)
- + moveq #1,d0
- btst #0,(V_int_run_count+3).w
- beq.s +
- addq.b #1,d0
- + move.b d0,mapping_frame(a0)
- jsr (Refresh_ChildPositionAdjusted).l
- jmp (Child_Draw_Sprite).l
- ; ---------------------------------------------------------------------------
- ; Лазер босса
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_BossSRLaser:
- lea ObjDat3_BossSRLaser(pc),a1
- jsr (SetUp_ObjAttributes).l
- movea.w parent3(a0),a1
- jsr (Refresh_ChildPositionAdjusted).l
- moveq #0,d0
- tst.b subtype(a0)
- beq.s loc_7ABB8
- moveq #7,d0
- move.b #0,mapping_frame(a0)
- move.w #$100,priority(a0)
- loc_7ABB8:
- move.w d0,$2E(a0)
- move.l #loc_7ABC2,(a0)
- loc_7ABC2:
- subq.w #1,$2E(a0)
- bmi.s loc_7ABCE
- jmp (Child_Draw_Sprite).l
- ; ---------------------------------------------------------------------------
- loc_7ABCE:
- move.l #loc_7ABEE,(a0)
- move.w #-$600,d0
- btst #0,render_flags(a0)
- beq.s loc_7ABE2
- neg.w d0
- loc_7ABE2:
- move.w d0,x_vel(a0)
- loc_7ABEE:
- jsr (MoveSprite2).l
- jmp (Sprite_CheckDeleteTouch).l
- ; ---------------------------------------------------------------------------
- ; Голова роботника
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_RobotnikHead3:
- jsr (Refresh_ChildPositionAdjusted).l
- moveq #0,d0
- move.b routine(a0),d0
- move.w RobotnikHead3_Index(pc,d0.w),d1
- jsr RobotnikHead3_Index(pc,d1.w)
- jmp (Child_Draw_Sprite2).l
- ; ---------------------------------------------------------------------------
- RobotnikHead3_Index: offsetTable
- offsetTableEntry.w Obj_RobotnikHead3Init
- offsetTableEntry.w Obj_RobotnikHead3Main
- offsetTableEntry.w Obj_RobotnikHead3End
- ; ---------------------------------------------------------------------------
- Obj_RobotnikHead3Init:
- lea ObjDat_RobotnikHead(pc),a1
- jsr (SetUp_ObjAttributes).l
- move.l #AniRaw_RobotnikHead,$30(a0)
- movea.w parent3(a0),a1
- btst #7,art_tile(a1)
- beq.s +
- bset #7,art_tile(a0)
- + rts
- ; ---------------------------------------------------------------------------
- Obj_RobotnikHead3Main:
- movea.w parent3(a0),a1
- btst #5,status(a1)
- bne.s Obj_RobotnikHead3_Laugh
- cmpi.b #id_SonicHurt,(Player_1+routine).w
- bhs.s Obj_RobotnikHead3_Laugh
- jsr (Animate_Raw).l
- movea.w parent3(a0),a1
- btst #7,status(a1)
- bne.s ++
- btst #6,status(a1)
- beq.s +
- move.b #2,mapping_frame(a0)
- + rts
- ; ---------------------------------------------------------------------------
- + move.b #4,routine(a0)
- move.b #5,mapping_frame(a0)
- Obj_RobotnikHeadEnd:
- rts
- ; ---------------------------------------------------------------------------
- Obj_RobotnikHead3End:
- movea.w parent3(a0),a1
- btst #7,status(a1)
- bne.s Obj_RobotnikHeadEnd
- lea AniRaw_RobotnikHead(pc),a1
- jmp (Animate_RawNoSST).l
- ; ---------------------------------------------------------------------------
- Obj_RobotnikHead3_Laugh:
- lea AniRaw_RobotnikHead_Laugh(pc),a1
- jmp (Animate_RawNoSST).l
- ; ---------------------------------------------------------------------------
- ; Огонь из корабля
- ; ---------------------------------------------------------------------------
- ; =============== S U B R O U T I N E =======================================
- Obj_RobotnikFire:
- lea ObjDat3_RobotnikFire(pc),a1
- jsr (SetUp_ObjAttributes3).l
- move.l #+,(a0)
- + movea.w parent3(a0),a1
- btst #7,status(a1)
- bne.s RobotnikFire_Remove
- btst #6,$38(a1)
- bne.s Obj_RobotnikHeadEnd
- btst #0,(V_int_run_count+3).w
- bne.s Obj_RobotnikHeadEnd
- jsr (Refresh_ChildPositionAdjusted).l
- jsr (Add_SpriteToCollisionResponseList).l
- jmp (Draw_Sprite).l
- ; ---------------------------------------------------------------------------
- RobotnikFire_Remove:
- jmp (Delete_Current_Sprite).l
- ; =============== S U B R O U T I N E =======================================
- ObjDat_BossSR:
- dc.l Map_RobotnikShip
- dc.w $E0
- dc.w $200
- dc.b 80/2
- dc.b 80/2
- dc.b 7
- dc.b $F
- ObjDat_RobotnikHead:
- dc.l Map_RobotnikShip
- dc.w $E0
- dc.w $280
- dc.b $10
- dc.b 8
- dc.b 0
- dc.b 0
- ObjDat3_RobotnikFire:
- dc.w $200
- dc.b 8
- dc.b 4
- dc.b 8
- dc.b 0
- ObjDat_BossSRTube:
- dc.l Map_RobotnikTube
- dc.w $6152
- dc.w $180
- dc.b 48/2
- dc.b 16/2
- dc.b 0
- dc.b 0
- ObjDat_BossSRSpikeBall:
- dc.l Map_RobotnikSpikeBall
- dc.w $6168
- dc.w $280
- dc.b 48/2
- dc.b 48/2
- dc.b 0
- dc.b $F|$80
- ObjDat_BossSRRocket:
- dc.l Map_RobotnikRocket
- dc.w $6158
- dc.w $280
- dc.b 64/2
- dc.b 16/2
- dc.b 0
- dc.b $B|$80
- ObjDat_BossSRRocket_Fire:
- dc.l Map_RobotnikRocket
- dc.w $6158
- dc.w $280
- dc.b 16/2
- dc.b 16/2
- dc.b 1
- dc.b 0
- ObjDat3_BossSRLaser:
- dc.l Map_RobotnikLaser
- dc.w $617E
- dc.w $280
- dc.b 48/2
- dc.b 16/2
- dc.b 1
- dc.b $9C
- AniRaw_RobotnikHead:
- dc.b 5
- dc.b 0
- dc.b 1
- dc.b $FC
- AniRaw_RobotnikHead_Laugh:
- dc.b 5
- dc.b 3
- dc.b 4
- dc.b $FC
- Child1_MakeRoboHead3:
- dc.w 1-1
- dc.l Obj_RobotnikHead3
- dc.w $E4
- ChildObjDat_RobotnikFire:
- dc.w 1-1
- dc.l Obj_RobotnikFire
- dc.w $1E00
- ChildObjDat_BossSRTube:
- dc.w 1-1
- dc.l Obj_BossSRTube
- dc.b -16, 24
- ChildObjDat_BossSRTube_Fire:
- dc.w 1-1
- dc.l Obj_BossSRTube_Fire
- dc.b 0, 0
- ChildObjDat_BossSRSpikeBall:
- dc.w 1-1
- dc.l Obj_BossSRSpikeBall
- ChildObjDat_BossSRRocket:
- dc.w 1-1
- dc.l Obj_BossSRRocket
- ChildObjDat_BossSRRocket_Fire:
- dc.w 1-1
- dc.l Obj_BossSRRocket_Fire
- dc.b 48, 0
- ChildObjDat_BossSRLaser:
- dc.w 2-1
- dc.l Obj_BossSRLaser
- dc.b $F4, $FC
- dc.l Obj_BossSRLaser
- dc.b $E8, $FC
- ; ---------------------------------------------------------------------------
- include "Objects/Boss Robotnik/Object Data/Map - Robotnik Laser.asm"
- include "Objects/Boss Robotnik/Object Data/Map - Robotnik Rocket.asm"
- include "Objects/Boss Robotnik/Object Data/Map - Robotnik Ship.asm"
- include "Objects/Boss Robotnik/Object Data/Map - Robotnik Spike Ball.asm"
- include "Objects/Boss Robotnik/Object Data/Map - Robotnik Tube.asm"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement