;validate new pos first
.L3_ValidateAndComputePosFromShip
	LD (IY+3),C
	LD (IY+4),B	
;B = Y , C = X - compute object pos relative to ship
.L3_ComputePosFromShip	
	ld A,(SEQBUFF+4)
	add B
	ld B,A	
	ld A,(SEQBUFF+3)
	add C
	ld C,A
	ret

;fix explosion pos
.L3_FixExplosion
	call L3_ComputePosFromShip
	ld HL,(last_explo)
	inc HL
	ld (HL),C
	inc HL
	ld (HL),B
	ret	



;check player for exit secret level
.L3_CheatCheckPlayer
	ld A,(SHIPX)
	sub (IY+3)
	cp 4
	ret nc
	ld A,(SHIPY)
	sub (IY+4)
	sub 8
	ret c
	cp 2
	ret nc
	
	;stop all
	call BIG_EXPLO_StartStopAll
	
	;shutdown music
	xor A
	call SND_SetMode
	;no music
	ld A,#FF
	call MUSIC_Play
	;play start sound
	ld A,sfx_1up
	call SND_SfxPlay
	
	
	ld A,128
	ld (END_LEVEL_Jump),A
	jp END_LEVEL_Final
	;jp SOFT_END_Start
	;jp END_LEVEL_Final
	
	

	
