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

extern GRF1_FTL_LIBRARY* G9000_GRF1base;


#if ((EXETYPE != C13_GRF1) && (!defined(MEDIA768_AU2E_AU3E) || (EXETYPE != C06_CEDT)))
#include "GRF1BASE.C"
#endif

GRF1_15_GetBlitterTemporaryBitplane(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x3C(a0),a1
                jmp     (a1)
        }
}

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

void GRF1_05_F0466_EXPAND_GraphicToBitmap(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x14(a0),a1
                jmp     (a1)
        }
}

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

GRF1_07_Empty(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x1C(a0),a1
                jmp     (a1)
        }
}

GRF1_08_FillBox(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x20(a0),a1
                jmp     (a1)
        }
}

GRF1_09_BlitShrinkWithPaletteChanges(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x24(a0),a1
                jmp     (a1)
        }
}

GRF1_10_FlipHorizontal(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x28(a0),a1
                jmp     (a1)
        }
}

GRF1_11_FlipVertical(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x2C(a0),a1
                jmp     (a1)
        }
}

GRF1_12_HatchBox(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x30(a0),a1
                jmp     (a1)
        }
}

GRF1_13_InvertBox(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x34(a0),a1
                jmp     (a1)
        }
}

GRF1_14_BlitBoxFilledWithMaskedBitmap(
)
{
        asm {
                movea.l G9000_GRF1base(a5),a0
                movea.l -0x38(a0),a1
                jmp     (a1)
        }
}

FTL_LIBRARY* F9000_OpenGRF1(P9000_i_MinimumVersion)
int16_t P9000_i_MinimumVersion;
{
        if (P9000_i_MinimumVersion <= 2) {
                G9000_GRF1base = PRIM_08_Library_Open(FTL_GRF1, (long)P9000_i_MinimumVersion);
        }
        return G9000_GRF1base;
}

long F9001_CloseGRF1(P9001_l_)
long P9001_l_;
{
        if (P9001_l_) {
                PRIM_09_Library_Close(FTL_GRF1);
        }
}
#endif
