#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA042_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
#ifdef MEDIA007_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E
overlay "show"
#endif
#ifdef MEDIA351_G14ED_G20E_G21E
segment "gsthings"
#endif

extern void F0697_HatchScreenBox(
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t* P2372_pi_XYZ  SEPARATOR
#ifdef MEDIA531_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_X31J_P31J
unsigned int16_t  P2373_ui_Color
#endif
#ifdef MEDIA670_F31E_F31J
unsigned int      P2373_ui_Color /* ANOMALY_FMT */
#endif
#endif
);


#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
USHORT G1100_l_HatchData[2] = { 0xAAAA, 0x5555 };
USHORT G1101_l_[2] = { 0xFFFF, 0xFFFF };
#endif

#ifdef MEDIA607_X30J_X31J
unsigned char G3098_[16] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
#endif

#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
#include "INVRTZON.C"
#endif

void F0134_VIDEO_FillBitmap(
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
P0218_puc_Bitmap, P0219_i_Color, P0220_i_UnitCount)
REGISTER unsigned char* P0218_puc_Bitmap  SEPARATOR
REGISTER int16_t        P0219_i_Color     SEPARATOR
REGISTER int16_t        P0220_i_UnitCount FINAL_SEPARATOR /* Number of units = 8 bytes = 16 pixels */
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0218_pui_Bitmap, P0219_i_Color, P0220_i_UnitCount)
REGISTER unsigned int16_t* P0218_pui_Bitmap  SEPARATOR
int16_t                    P0219_i_Color     SEPARATOR
int16_t                    P0220_i_UnitCount FINAL_SEPARATOR /* Number of units = 8 bytes = 16 pixels */
#endif
#ifdef MEDIA497_F20E_F20J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_P31J
char*                     P0218_puc_Bitmap SEPARATOR
#endif
#ifdef MEDIA607_X30J_X31J
register char*            P0218_puc_Bitmap SEPARATOR
#endif
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
int16_t                   P0219_i_Color    SEPARATOR
#endif
#ifdef MEDIA607_X30J_X31J
register unsigned int16_t P0219_i_Color    SEPARATOR
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
register int16_t          P0219_i_Color    SEPARATOR
register int16_t          P0216_i_Width    SEPARATOR
#endif
#ifdef MEDIA525_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_F31E_F31J_X31J_P31J
int16_t                   P0216_i_Width    SEPARATOR
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t                   P0217_i_Height   FINAL_SEPARATOR
#endif
{
#ifdef MEDIA007_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E
        asm {
                        moveq   #0,D0
                        moveq   #0,D1
                        lsr.w   #1,P0219_i_Color                 /* Move Bit 0 to processor carry flag */
                        bcc.s   T0134001                        /* If Bit 0 of P0219_i_Color is 0 */
                        not.w   D0                              /* Sets all bits in least significant word of D0 to 1 to match Bit 0 from P0219_i_Color */
                        swap    D0
                T0134001:
                        lsr.w   #1,P0219_i_Color                 /* Move Bit 1 to processor carry flag */
                        bcc.s   T0134002                        /* If Bit 1 of P0219_i_Color is 0 */
                        not.w   D0                              /* Sets all bits in least significant word of D0 to 1 to match Bit 1 from P0219_i_Color */
                T0134002:
                        lsr.w   #1,P0219_i_Color                 /* Move Bit 2 to processor carry flag */
                        bcc.s   T0134003                        /* If Bit 2 of P0219_i_Color is 0 */
                        not.w   D1                              /* Sets all bits in least significant word of D0 to 1 to match Bit 2 from P0219_i_Color */
                        swap    D1
                T0134003:
                        lsr.w   #1,P0219_i_Color                 /* Move Bit 3 to processor carry flag */
                        bcc.s   T0134004_Loop                   /* If Bit 3 of P0219_i_Color is 0 */
                        not.w   D1                              /* Sets all bits in least significant word of D0 to 1 to match Bit 3 from P0219_i_Color */
                T0134004_Loop:
                        move.l  D0,(P0218_puc_Bitmap)+           /* Write 4 bytes and move to the next location */
                        move.l  D1,(P0218_puc_Bitmap)+           /* Write 4 bytes and move to the next location */
                        subq.w  #1,P0220_i_UnitCount
                        bne.s   T0134004_Loop
        }
#endif
#ifdef MEDIA351_G14ED_G20E_G21E
        P0220_i_UnitCount = P0220_i_UnitCount << 2;
        P0219_i_Color = P0219_i_Color | (P0219_i_Color << 4);
        P0219_i_Color = P0219_i_Color | (P0219_i_Color << 8);
        asm {
                        LDX        P0220_i_UnitCount
                L080D17:
                        LDA        P0219_i_Color
                        STA        [P0218_puc_Bitmap]
                        DEX
                        BEQ        L080D2C
                        CLC
                        LDA        P0218_puc_Bitmap
                        ADC        #2
                        STA        P0218_puc_Bitmap
                        BCC        L080D17
                        INC        P0218_puc_Bitmap+2
                        BRA        L080D17
                L080D2C:
        }
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        REGISTER int16_t L1626_i_;
        REGISTER int16_t L1627_i_;
        REGISTER int16_t L1628_i_;


        for (L1627_i_ = 0; L1627_i_ < 4; L1627_i_++) {
                if (P0219_i_Color & (1 << L1627_i_)) {
                        L1626_i_ = 0xFFFF;
                } else {
                        L1626_i_ = 0;
                }
                for (L1628_i_ = 0; L1628_i_ < P0220_i_UnitCount; L1628_i_++) {
                        *P0218_pui_Bitmap++ = L1626_i_;
                }
        }
#endif
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
        unsigned int16_t L2207_ui_Counter;
        unsigned int16_t L2206_ui_ByteCount;


        L2206_ui_ByteCount = M103_BITMAP_BYTE_COUNT(P0216_i_Width, P0217_i_Height);
        P0219_i_Color |= P0219_i_Color << 4;
        for (L2207_ui_Counter = 0; L2207_ui_Counter < L2206_ui_ByteCount; L2207_ui_Counter++) {
                P0218_puc_Bitmap[L2207_ui_Counter] = P0219_i_Color;
        }
#endif
#ifdef MEDIA607_X30J_X31J
        register unsigned long L2208_ul_ByteCount;


        L2208_ul_ByteCount = M103_BITMAP_BYTE_COUNT(P0216_i_Width, P0217_i_Height);
        asm {
                        lea     G3098_(a5),a0
                        move.b  (a0,d7.w),d0
                @Tloc_1F948:
                        move.b  d0,(a4)+
                        subq.l  #1,d6
                        bne.s   @Tloc_1F948
        }
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
        int16_t L2209_ai_XYZ[4];


        P0216_i_Width = (P0216_i_Width + 15) & 0xFFF0;
        M704_ZONE_LEFT(L2209_ai_XYZ) = 0;
        M706_ZONE_TOP(L2209_ai_XYZ) = 0;
        M708_ZONE_WIDTH(L2209_ai_XYZ) = P0216_i_Width;
        M709_ZONE_HEIGHT(L2209_ai_XYZ) = P0217_i_Height;
        F0135_VIDEO_FillBox(P0218_puc_Bitmap, L2209_ai_XYZ, P0219_i_Color, P0216_i_Width, P0217_i_Height);
#endif
}

#ifdef MEDIA353_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
void F0550_VIDEO_FillScreenBox(
P0969_pi_Box, P0970_i_ColorIndex)
int16_t* P0969_pi_Box       SEPARATOR
int16_t  P0970_i_ColorIndex FINAL_SEPARATOR
{
#ifdef MEDIA351_G14ED_G20E_G21E
        F0135_VIDEO_FillBox(G0348_Bitmap_Screen, P0969_pi_Box, P0970_i_ColorIndex, C160_BYTE_WIDTH_SCREEN);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        SetAPen(&G0734_ps_AmigaData->RastPort, (long)P0970_i_ColorIndex);
        RectFill(&G0734_ps_AmigaData->RastPort, (long)M768_BOX_LEFT(P0969_pi_Box), (long)M770_BOX_TOP(P0969_pi_Box), (long)M769_BOX_RIGHT(P0969_pi_Box), (long)M771_BOX_BOTTOM(P0969_pi_Box));
#endif
}
#endif

#ifdef MEDIA077_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_X30J_X31J
#include "FILLBOX.C"
#endif

#ifdef MEDIA525_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_F31E_F31J_X31J_P31J
void F0732_FillScreenArea(
int16_t*         P2222_pi_Box   SEPARATOR
unsigned int16_t P2223_ui_Color FINAL_SEPARATOR
{
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
        F0135_VIDEO_FillBox(NULL, P2222_pi_Box, P2223_ui_Color, G2071_C320_ScreenPixelWidth);
#endif
#ifdef MEDIA577_X30J
        F0135_VIDEO_FillBox(G0348_Bitmap_Screen, P2222_pi_Box, P2223_ui_Color, G2071_C320_ScreenPixelWidth);
#endif
#ifdef MEDIA692_X31J
        VDEO_08_FillScreenBox(0, P2222_pi_Box, P2223_ui_Color);
#endif
}
#endif

#ifdef MEDIA550_F20E_F20J_X30J_A36M_A31E_A31M_A33M_A35E_A35M_X31J
void F0735_FillViewportBox(
int16_t* P2229_pi_XYZ  SEPARATOR
int16_t  P2230_i_Color FINAL_SEPARATOR
{
        M525_F0135_VIDEO_FillBox(G0296_puc_Bitmap_Viewport, P2229_pi_XYZ, P2230_i_Color, G2073_C224_ViewportPixelWidth, G2074_C136_ViewportHeight);
}
#endif

#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
void F0733_FillZoneByIndex(
int16_t P2224_i_ZoneIndex SEPARATOR
int16_t P2225_i_Color     FINAL_SEPARATOR
{
        int16_t L2210_ai_XYZ[4];


#ifdef MEDIA527_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_P31J
        M525_F0135_VIDEO_FillBox(G0348_Bitmap_Screen, F0638_GetZone(P2224_i_ZoneIndex, L2210_ai_XYZ), P2225_i_Color, G2071_C320_ScreenPixelWidth, G2072_C200_ScreenPixelHeight);
#endif
#ifdef MEDIA692_X31J
        VDEO_08_FillScreenBox(0, F0638_GetZone(P2224_i_ZoneIndex, L2210_ai_XYZ), P2225_i_Color);
#endif
}
#endif

#ifdef MEDIA613_X30J_A36M_A31E_A31M_A33M_A35E_A35M_X31J
void F0734_ClearZoneInInventory(
int16_t P2228_i_ZoneIndex FINAL_SEPARATOR
{
        int16_t L2211_ai_XYZ[4];


        M525_F0135_VIDEO_FillBox(G0296_puc_Bitmap_Viewport, F0638_GetZone(P2228_i_ZoneIndex, L2211_ai_XYZ), C12_COLOR_DARKEST_GRAY, G2073_C224_ViewportPixelWidth, G2074_C136_ViewportHeight);
}
#endif

void F0136_VIDEO_HatchScreenBox(
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0225_pi_Box, P0226_Color)
int16_t* P0225_pi_Box SEPARATOR
int16_t  P0226_Color  FINAL_SEPARATOR
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t          P2226_i_ZoneIndex SEPARATOR
unsigned int16_t P0226_Color       FINAL_SEPARATOR
#endif
{
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
#ifdef MEDIA007_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E
        F0135_VIDEO_FillBox(G0348_Bitmap_Screen, P0225_pi_Box, P0226_Color | MASK0x8000_HATCH, C160_BYTE_WIDTH_SCREEN); /* Hatching will be used: only every other pixel will be written */
#endif
#ifdef MEDIA351_G14ED_G20E_G21E
        F2153_subF0136_(G0348_Bitmap_Screen, P0225_pi_Box, P0226_Color, C160_BYTE_WIDTH_SCREEN);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        SetAPen(&G0734_ps_AmigaData->RastPort, (long)P0226_Color);
        G0734_ps_AmigaData->RastPort.AreaPtrn = G1100_l_HatchData;
        G0734_ps_AmigaData->RastPort.AreaPtSz = 1;
        RectFill(&G0734_ps_AmigaData->RastPort, (long)M768_BOX_LEFT(P0225_pi_Box), (long)M770_BOX_TOP(P0225_pi_Box), (long)M769_BOX_RIGHT(P0225_pi_Box), (long)M771_BOX_BOTTOM(P0225_pi_Box));
        G0734_ps_AmigaData->RastPort.AreaPtrn = G1101_l_;
        G0734_ps_AmigaData->RastPort.AreaPtSz = 1;
#endif
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        int16_t L2212_ai_XYZ[4];


#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
        F0697_HatchScreenBox(F0638_GetZone(P2226_i_ZoneIndex, L2212_ai_XYZ), P0226_Color);
#endif
#ifdef MEDIA577_X30J
        F1032_GRF1_12_HatchBox(G0348_Bitmap_Screen, F0638_GetZone(P2226_i_ZoneIndex, L2212_ai_XYZ), P0226_Color, G2073_C224_ViewportPixelWidth);
#endif
#ifdef MEDIA692_X31J
        VDEO_09_HatchScreenBox(0, F0638_GetZone(P2226_i_ZoneIndex, L2212_ai_XYZ), P0226_Color);
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
        F1032_GRF1_12_HatchBox(G0348_Bitmap_Screen, F0638_GetZone(P2226_i_ZoneIndex, L2212_ai_XYZ), P0226_Color, G2071_C320_ScreenPixelWidth, G2072_C200_ScreenPixelHeight);
#endif
#endif
}

#ifdef MEDIA351_G14ED_G20E_G21E
void F2153_subF0136_(
P6058_puc_Bitmap, P6059_pi_Box, P6060_i_Color, P6061_i_Width)
unsigned char*   P6058_puc_Bitmap SEPARATOR
int16_t*         P6059_pi_Box     SEPARATOR
unsigned int16_t P6060_i_Color    SEPARATOR
unsigned int16_t P6061_i_Width    FINAL_SEPARATOR
{
        int16_t L6339_;
        unsigned int16_t L6335_;
        unsigned int16_t L6336_;
        int16_t L6337_;
        int16_t L6338_;
        int16_t L6340_;
        char L6342_;
        char L6341_;


        if (G0578_B_UseByteBoxCoordinates == C1_TRUE) {
                L6335_ = M768_BOX_LEFT(((char*)P6059_pi_Box));
                L6336_ = M769_BOX_RIGHT(((char*)P6059_pi_Box));
                L6338_ = M771_BOX_BOTTOM(((char*)P6059_pi_Box));
                L6337_ = M770_BOX_TOP(((char*)P6059_pi_Box));
        } else {
                L6335_ = M768_BOX_LEFT(P6059_pi_Box);
                L6336_ = M769_BOX_RIGHT(P6059_pi_Box);
                L6338_ = M771_BOX_BOTTOM(P6059_pi_Box);
                L6337_ = M770_BOX_TOP(P6059_pi_Box);
        }
        L6339_ = L6338_ - L6337_ + 1;
        P6060_i_Color &= 0x0F;
        P6060_i_Color = P6060_i_Color | (P6060_i_Color << 12);
        P6058_puc_Bitmap += (P6061_i_Width * L6337_) + (L6335_ >> 1);
        L6340_ = (L6336_ - L6335_ + 1) >> 1;
        if (L6335_ % 2) {
                L6342_ = 0x0F;
        } else {
                L6342_ = 0xFF;
        }
        if (L6336_ % 2) {
                L6341_ = 0xFF;
        } else {
                L6341_ = 0xF0;
        }
        if ((L6342_ & L6341_) == 0xFF) {
                L6340_--;
        }
        if (L6340_ == 0) {
                if (L6335_ == L6336_) {
                        L6342_ &= L6341_;
                } else {
                        L6342_ |= L6341_;
                }
        }
        asm {
                L081050:
                        SEP        #0x30
                        LDA        L6339_
                        AND        #0x01
                        BNE        L081088
                        LDY        L6340_
                        BEQ        L081078
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0xf0
                        ORA        P6060_i_Color
                        EOR        [P6058_puc_Bitmap],Y
                        AND        L6341_
                        EOR        [P6058_puc_Bitmap],Y
                        STA        [P6058_puc_Bitmap],Y
                        DEY
                        BEQ        L081078
                L08106D:
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0xf0
                        ORA        P6060_i_Color
                        STA        [P6058_puc_Bitmap],Y
                        DEY
                        BNE        L08106D
                L081078:
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0xf0
                        ORA        P6060_i_Color
                        EOR        [P6058_puc_Bitmap],Y
                        AND        L6342_
                        EOR        [P6058_puc_Bitmap],Y
                        STA        [P6058_puc_Bitmap],Y
                        BRA        L0810B6
                L081088:
                        LDY        L6340_
                        BEQ        L0810A8
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0x0f
                        ORA        P6060_i_Color+1
                        EOR        [P6058_puc_Bitmap],Y
                        AND        L6341_
                        EOR        [P6058_puc_Bitmap],Y
                        STA        [P6058_puc_Bitmap],Y
                        DEY
                        BEQ        L0810A8
                L08109D:
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0x0f
                        ORA        P6060_i_Color+1
                        STA        [P6058_puc_Bitmap],Y
                        DEY
                        BNE        L08109D
                L0810A8:
                        LDA        [P6058_puc_Bitmap],Y
                        AND        #0x0f
                        ORA        P6060_i_Color+1
                        EOR        [P6058_puc_Bitmap],Y
                        AND        L6342_
                        EOR        [P6058_puc_Bitmap],Y
                        STA        [P6058_puc_Bitmap],Y
                L0810B6:
                        REP        #0x30
                        CLC
                        LDA        P6058_puc_Bitmap
                        ADC        P6061_i_Width
                        STA        P6058_puc_Bitmap
                        BCC        L0810C3
                        INC        P6058_puc_Bitmap+2
                L0810C3:
                        DEC        L6339_
                        BNE        L081050
        }
}
#endif

#ifdef MEDIA577_X30J
void F1033_HatchBox_Unreferenced(
int16_t* P2723_pi_XYZ  SEPARATOR
int16_t  P2764_i_Color FINAL_SEPARATOR
{
        F1032_GRF1_12_HatchBox(G0348_Bitmap_Screen, P2723_pi_XYZ, P2764_i_Color, G2071_C320_ScreenPixelWidth);
}
#endif

#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
void F0551_VIDEO_HatchBox_Unreferenced(
P0971_puc_Plane, P0972_puc_Box, P0973_ui_Color, P0974_ui_Width, P0975_ui_Height) /* Similar to F0136_VIDEO_HatchScreenBox. Works on any bitmap (not only screen) and with both byte or word sized boxes */
PLANEPTR                  P0971_puc_Plane SEPARATOR
unsigned char*            P0972_puc_Box   SEPARATOR
unsigned int16_t          P0973_ui_Color  SEPARATOR
REGISTER unsigned int16_t P0974_ui_Width  SEPARATOR
REGISTER unsigned int16_t P0975_ui_Height FINAL_SEPARATOR
{
        REGISTER long L1748_l_PlaneByteCount;
        REGISTER int16_t* L1749_pi_Box;


        P0974_ui_Width <<= 1;
        L1748_l_PlaneByteCount = (P0974_ui_Width * P0975_ui_Height) >> 3;
        InitBitMap(G0734_ps_AmigaData->HatchBoxBitMap, 4L, (long)P0974_ui_Width, (long)P0975_ui_Height);
        G0734_ps_AmigaData->HatchBoxBitMap->Planes[0] = P0971_puc_Plane;
        G0734_ps_AmigaData->HatchBoxBitMap->Planes[1] = G0734_ps_AmigaData->HatchBoxBitMap->Planes[0] + L1748_l_PlaneByteCount;
        G0734_ps_AmigaData->HatchBoxBitMap->Planes[2] = G0734_ps_AmigaData->HatchBoxBitMap->Planes[1] + L1748_l_PlaneByteCount;
        G0734_ps_AmigaData->HatchBoxBitMap->Planes[3] = G0734_ps_AmigaData->HatchBoxBitMap->Planes[2] + L1748_l_PlaneByteCount;
        Forbid();
        G0734_ps_AmigaData->RastPort.BitMap = G0734_ps_AmigaData->HatchBoxBitMap;
        SetAPen(&G0734_ps_AmigaData->RastPort, (long)P0973_ui_Color);
        G0734_ps_AmigaData->RastPort.AreaPtrn = G1100_l_HatchData;
        G0734_ps_AmigaData->RastPort.AreaPtSz = 1;
        if (G0578_B_UseByteBoxCoordinates) {
                RectFill(&G0734_ps_AmigaData->RastPort, (long)M768_BOX_LEFT(P0972_puc_Box), (long)M770_BOX_TOP(P0972_puc_Box), (long)M769_BOX_RIGHT(P0972_puc_Box), (long)M771_BOX_BOTTOM(P0972_puc_Box));
        } else {
                L1749_pi_Box = (int16_t*)P0972_puc_Box;
                RectFill(&G0734_ps_AmigaData->RastPort, (long)M768_BOX_LEFT(L1749_pi_Box), (long)M770_BOX_TOP(L1749_pi_Box), (long)M769_BOX_RIGHT(L1749_pi_Box), (long)M771_BOX_BOTTOM(L1749_pi_Box));
        }
        G0734_ps_AmigaData->RastPort.AreaPtrn = G1101_l_;
        G0734_ps_AmigaData->RastPort.AreaPtSz = 1;
        G0734_ps_AmigaData->RastPort.BitMap = G0734_ps_AmigaData->ScreenBitMap;
        Permit();
}
#endif

#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
void F0734_ClearZoneInInventory(
int16_t P2228_i_ZoneIndex FINAL_SEPARATOR
{
        int16_t L2213_ai_XYZ[4];


        F0135_VIDEO_FillBox(G0296_puc_Bitmap_Viewport, F0638_GetZone(P2228_i_ZoneIndex, L2213_ai_XYZ), C12_COLOR_DARKEST_GRAY, G2073_C224_ViewportPixelWidth);
}
#endif

#ifdef MEDIA464_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
void F0735_FillViewportBox(
int16_t* P2229_pi_XYZ  SEPARATOR
int16_t  P2230_i_Color FINAL_SEPARATOR
{
        F0135_VIDEO_FillBox(G0296_puc_Bitmap_Viewport, P2229_pi_XYZ, P2230_i_Color, G2073_C224_ViewportPixelWidth);
}
#endif
#endif
