#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA692_X31J
extern FTL_LIBRARY* PRIM_08_Library_Open();

FTL_LIBRARY* G9014_MUSCbase;


MUSC_04_PlayMIDIMusic(
)
{
        asm {
                movea.l G9014_MUSCbase(a5),a0
                movea.l -0x10(a0),a1
                jmp     (a1)
        }
}

MUSC_05_StopMIDIMusic(
)
{
        asm {
                movea.l G9014_MUSCbase(a5),a0
                movea.l -0x14(a0),a1
                jmp     (a1)
        }
}

MUSC_06_(
)
{
        asm {
                movea.l G9014_MUSCbase(a5),a0
                movea.l -0x18(a0),a1
                jmp     (a1)
        }
}

#if (!(defined(MEDIA692_X31J) && (EXETYPE == C03_GAME)))
MUSC_07_(
)
{
        asm {
                movea.l G9014_MUSCbase(a5),a0
                movea.l -0x1C(a0),a1
                jmp     (a1)
        }
}
#endif

FTL_LIBRARY* F9016_OpenMUSC(P9011_i_MinimumVersion)
int16_t P9011_i_MinimumVersion;
{
#if (defined(MEDIA692_X31J) && (EXETYPE == C03_GAME))
        if (P9011_i_MinimumVersion <= 3) {
#else
        if (P9011_i_MinimumVersion <= 4) {
#endif
                G9014_MUSCbase = PRIM_08_Library_Open(FTL_MUSC, (long)P9011_i_MinimumVersion);
        }
        return G9014_MUSCbase;
}

long F9017_CloseMUSC(P9012_l_)
long P9012_l_;
{
        if (P9012_l_) {
                PRIM_09_Library_Close(FTL_MUSC);
        }
}
#endif
