#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA753_A36M_A31E_A31M_A33M_A35E_A35M_AU1E_AU2E_AU2F
DRIA_Video* G3191_ps_MsgPort_FTL_DRIA_Video;
COPPERSTRUCT* G3192_;


BOOLEAN F1138_(
)
{
        if ((G3191_ps_MsgPort_FTL_DRIA_Video = FindPort("FTL_DRIA_Video")) == NULL) {
                return C0_FALSE;
        }
        G3192_ = &G3191_ps_MsgPort_FTL_DRIA_Video->_ps_0x110;
        G0348_Bitmap_Screen = G3191_ps_MsgPort_FTL_DRIA_Video->_0x0A0_RastPort.BitMap->Planes[0];
        return C1_TRUE;
}

void F1139_(P2809_)
BOOLEAN P2809_;
{
        if (P2809_) {
                G3192_ = &G3191_ps_MsgPort_FTL_DRIA_Video->_ps_0x120;
        } else {
                G3192_ = &G3191_ps_MsgPort_FTL_DRIA_Video->_ps_0x110;
        }
        G3191_ps_MsgPort_FTL_DRIA_Video->_0x032_View.LOFCprList = G3192_->_0x0C_cprlist;
        LoadView(&G3191_ps_MsgPort_FTL_DRIA_Video->_0x032_View);
}

void F1140_InitializeColorPaletteFullBlack(
)
{
        Forbid();
        WaitTOF();
        asm {
                        lea     (0xDFF000).l,a0
                        move.w  #0x180,0x96(a0)         /* Clear (bit 15 = 0) bits 8 DMAF_RASTER and 7 DMAF_COPPER in custom.dmacon. Stop playfield display and copper */
                        adda.w  #0x180,a0               /* custom.color[0] */
                        moveq   #0xF,d0
                        moveq   #0,d1                   /* Color: Black */
                @Tloc_12D0A:
                        move.l  d1,(a0)+
                        dbf     d0,@Tloc_12D0A          /* Loop to initialize 16 color registers */
        }
        Permit();
}

void F1141_EnablePlayfieldDisplayAndCopper(
)
{
        Forbid();
        WaitTOF();
        custom.dmacon = 0x8180;         /* Set (bit 15 = 1) bits 8 DMAF_RASTER and 7 DMAF_COPPER in custom.dmacon. Start playfield display and copper */
        Permit();
}
#endif
