#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA678_F31E_F31J_X31J_P31J_SU1E_AU1E_AU2E_AU3E
void F7248_InvertBox(REGISTER int16_t* P4009_pi_Box)
{
#ifdef MEDIA772_SU1E
        register char* L5818_;
        register int16_t L5819_;
        register int16_t L5820_;
        register int16_t L5821_;
        int16_t L6131_ai_XYZ[4];
#endif
#ifdef MEDIA768_AU2E_AU3E
        int16_t L6131_ai_XYZ[4];
        static unsigned char G3925_[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
#endif


#ifdef MEDIA772_SU1E
        L6131_ai_XYZ[0] = 0;
        L6131_ai_XYZ[2] = 0;
        L5820_ = M769_BOX_RIGHT(P4009_pi_Box) - M768_BOX_LEFT(P4009_pi_Box);
        L6131_ai_XYZ[1] = L5820_++;
        L5821_ = M771_BOX_BOTTOM(P4009_pi_Box) - M770_BOX_TOP(P4009_pi_Box);
        L6131_ai_XYZ[3] = L5821_++;
        L5820_ = (int16_t)((L5820_ + 15) & 0xFFF0) >> 1;
        F0077_MOUSE_EnableScreenUpdate_CPSE();
        F0132_VIDEO_Blit(G0348_Bitmap_Screen, L5818_ = G3822_, L6131_ai_XYZ, M768_BOX_LEFT(P4009_pi_Box), M770_BOX_TOP(P4009_pi_Box), C160_BYTE_WIDTH_SCREEN, L5820_, CM1_COLOR_NO_TRANSPARENCY);
        L5819_ = (L5820_ * L5821_) >> 2;
        asm {
                        bra.s   @Tloc_35A8
                @Tloc_35A6:
                        not.l   (a3)+
                @Tloc_35A8:
                        dbf     d7,@Tloc_35A6
        }
        F7259_DrawBitmapOnScreen(G3822_, P4009_pi_Box, L5820_, CM1_COLOR_NO_TRANSPARENCY);
        F0078_MOUSE_DisableScreenUpdate();
#endif
#ifdef MEDIA762_AU1E
        F1131_InvertBox(P4009_pi_Box);
#endif
#ifdef MEDIA768_AU2E_AU3E
        F1653_ConvertCoordinates(P4009_pi_Box, L6131_ai_XYZ);
        VDEO_10_InvertScreenBox(0, L6131_ai_XYZ, G3925_);
#endif
#ifdef MEDIA671_F31E_F31J_P31J
        F0077_MOUSE_EnableScreenUpdate_CPSE();
#endif
#ifdef MEDIA674_F31E_F31J_X31J_P31J
        F0698_InvertBox(M768_BOX_LEFT(P4009_pi_Box), M769_BOX_RIGHT(P4009_pi_Box), M770_BOX_TOP(P4009_pi_Box), M771_BOX_BOTTOM(P4009_pi_Box));
#endif
#ifdef MEDIA671_F31E_F31J_P31J
        F0078_MOUSE_DisableScreenUpdate();
#endif
}
#endif
