LDX player1_object
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
LDA #$00
STA temp2
DeactivateCurrentObject
LDA #$FF
STA player1_object
CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, temp2, currentNametable
LDA player2Mode
BEQ +
LDA player2_object
CMP #$FF
BEQ +
LDX player2_object
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
LDA #$01
STA temp2
DeactivateCurrentObject
LDA #$FF
STA player2_object
CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, temp2, currentNametable
+
LDA #$01
STA loadObjectFlag
;StopSound
;LDA #$FF
PlaySound #SND_VICTORY