#define ANOMALY_TOWNSIMAGE2
#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA463_P20JA_P20JB_I34E_I34M_P31J) && (EXETYPE == C03_GAME)) || (defined(MEDIA551_F20E_F20J_F31E_F31J)) || (defined(MEDIA707_I34E_I34M) && (EXETYPE == C11_SELECTOR)))
#ifdef MEDIA551_F20E_F20J_F31E_F31J
unsigned char* G2160_puc_Bitmap_Destination;
unsigned char* G2159_puc_Bitmap_Source;
unsigned char G4108_DEC_BUF[32000];
#if (EXETYPE == C06_CEDT)
char G3895_Unreferenced[8];
#endif
#endif


#include "IMAGE4.C"

STATICFUNCTION void F0686_IMG_CopyFromPreviousLine(
unsigned int16_t P2350_ui_,
unsigned int16_t P2351_ui_,
int16_t P2352_i_)
{
#ifdef MEDIA463_P20JA_P20JB_I34E_I34M_P31J
        asm     cld
        asm     les     di, G2160_puc_Bitmap_Destination
        asm     mov     si, di
        asm     mov     bx, P2350_ui_
        asm     mov     dx, P2351_ui_
        asm     mov     cx, P2352_i_
        asm     shr     dx, 1
        asm     shr     bx, 1
        asm     pushf
        asm     add     di, bx
        asm     add     si, dx
        asm     popf
        asm     jnb     loc_22891
        asm     mov     dl, es:[di]
        asm     lods    byte ptr es:[si]
        asm     and     dl, 0F0h
        asm     and     al, 0Fh
        asm     or      al, dl
        asm     stosb
        asm     dec     cx
        asm     jz      loc_228A6
        loc_22891:
        asm     inc     cx
        asm     shr     cx, 1
        asm     shr     cx, 1
        asm     jnb     loc_2289A
        asm     movs    byte ptr es:[di], byte ptr es:[si]
        loc_2289A:
#if ((defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA480_P20JB_I34E_I34M_P31J) && (EXETYPE == C03_GAME)) || (defined(MEDIA707_I34E_I34M) && (EXETYPE == C11_SELECTOR)))
        asm     push    ds
        asm     mov     ax, es
        asm     mov     ds, ax
#endif
        loc_2289F:
#if (defined(MEDIA457_P20JA) && ((EXETYPE == C19_NECIO) || (EXETYPE == C03_GAME)))
        asm     SEGES rep movsw         /* Equivalent to (but with prefix bytes swapped): rep movs word ptr es:[di], word ptr es:[si] */
#endif
#if ((defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA480_P20JB_I34E_I34M_P31J) && (EXETYPE == C03_GAME)) || (defined(MEDIA707_I34E_I34M) && (EXETYPE == C11_SELECTOR)))
        asm     rep movsw
#endif
        asm     or      cx, cx
        asm     jnz     loc_2289F
#if ((defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA480_P20JB_I34E_I34M_P31J) && (EXETYPE == C03_GAME)) || (defined(MEDIA707_I34E_I34M) && (EXETYPE == C11_SELECTOR)))
        asm     pop     ds
#endif
        loc_228A6: ;
#endif
#ifdef MEDIA551_F20E_F20J_F31E_F31J
        unsigned int16_t L6516_ = P2350_ui_ >> 1;
        unsigned int16_t L6515_ = P2351_ui_ >> 1;


        if (P2350_ui_ & 1) {
                G2160_puc_Bitmap_Destination[L6516_] = (G2160_puc_Bitmap_Destination[L6516_] & 0x0F) | (G2160_puc_Bitmap_Destination[L6515_] & 0xF0);
                L6516_++;
                L6515_++;
                P2352_i_--;
        }
        while (P2352_i_ > 0) {
                G2160_puc_Bitmap_Destination[L6516_++] = G2160_puc_Bitmap_Destination[L6515_++];
                P2352_i_ -= 2;
        }
#endif
}

#if (defined(MEDIA707_I34E_I34M) && ((EXETYPE == C03_GAME) || (EXETYPE == C11_SELECTOR)))
unsigned char F0687_IMG3_GetNibble(
)
{
        if ((G2157_ & 1) != 0) {
                return G2159_puc_Bitmap_Source[G2157_++ >> 1] & 0x0F;
        } else {
                return G2159_puc_Bitmap_Source[G2157_++ >> 1] >> 4;
        }
}

int16_t F0688_IMG3_GetPixelCount(
)
{
        int16_t L2714_i_;


        if ((L2714_i_ = F0687_IMG3_GetNibble()) == 15) {
                if ((L2714_i_ = (F0687_IMG3_GetNibble() << 4) | F0687_IMG3_GetNibble()) == 255) {
                        L2714_i_ = (F0687_IMG3_GetNibble() << 12) | (F0687_IMG3_GetNibble() << 8) | (F0687_IMG3_GetNibble() << 4) | F0687_IMG3_GetNibble();
                } else {
                        L2714_i_ += 17;
                }
        } else {
                L2714_i_ += 2;
        }
        return L2714_i_;
}
#endif

void F0689_IMG_ExpandGraphicToBitmap(
unsigned char* P2353_puc_Bitmap_AtariST,
unsigned char* P2354_puc_Bitmap)
{
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J)) /* IMG2 */
        unsigned int16_t L2715_ui_;
        unsigned int16_t L2716_ui_;
        unsigned int16_t L2717_ui_;
        unsigned int16_t L2718_ui_;
        unsigned int16_t L2726_ui_;
        unsigned int16_t L2719_ui_;
        unsigned int16_t L2720_ui_;
        unsigned int16_t L2723_ui_;
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
        unsigned int16_t L2724_ui_;
#endif
        unsigned char L2721_uc_;
        unsigned char L2722_uc_;
        unsigned int16_t L2725_ui_;


        G2159_puc_Bitmap_Source = P2353_puc_Bitmap_AtariST;
        G2160_puc_Bitmap_Destination = P2354_puc_Bitmap;
        L2715_ui_ = *((int16_t*)G2159_puc_Bitmap_Source);
        L2716_ui_ = *((int16_t*)G2159_puc_Bitmap_Source + 1);
#ifdef MEDIA551_F20E_F20J_F31E_F31J
        L2717_ui_ = ((int)((L2715_ui_ + 31) & 0xFFFFFFE0) >> 1) * 2;
        L2718_ui_ = L2717_ui_ * L2716_ui_;
#endif
#ifdef MEDIA463_P20JA_P20JB_I34E_I34M_P31J
        L2718_ui_ = (L2717_ui_ = M104_EVEN_INTEGER(L2715_ui_)) * L2716_ui_;
#endif
        G2159_puc_Bitmap_Source += 4;
        if (L2715_ui_ != L2717_ui_) {
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                L2724_ui_ = L2717_ui_ - L2715_ui_;
#endif
                L2720_ui_ = 0;
                L2726_ui_ = L2715_ui_;
                do {
                        L2721_uc_ = *G2159_puc_Bitmap_Source++;
                        L2722_uc_ = L2721_uc_ & 0x0F;
                        if ((L2721_uc_ & 0x80) == 0) {
                                L2725_ui_ = (L2721_uc_ >> 4) + 1;
                                while (L2725_ui_ >= L2726_ui_) {
                                        F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2726_ui_);
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                        L2720_ui_ += L2726_ui_ + 1;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                        L2720_ui_ += L2726_ui_ + L2724_ui_;
#endif
                                        L2725_ui_ -= L2726_ui_;
                                        L2726_ui_ = L2715_ui_;
                                }
                                if (L2725_ui_ > 0) {
                                        F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2725_ui_);
                                        L2720_ui_ += L2725_ui_;
                                        L2726_ui_ -= L2725_ui_;
                                }
                        } else {
                                if ((L2721_uc_ & 0x40) == 0) {
                                        L2725_ui_ = *G2159_puc_Bitmap_Source++ + 1;
                                } else {
                                        L2725_ui_ = (*(G2159_puc_Bitmap_Source + 1) | (*G2159_puc_Bitmap_Source << 8)) + 1;
                                        G2159_puc_Bitmap_Source += 2;
                                }
                                switch (L2721_uc_ & 0x30) {
                                        case 0x00:
                                                while (L2725_ui_ >= L2726_ui_) {
                                                        F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2726_ui_);
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                        L2720_ui_ += L2726_ui_ + 1;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                        L2720_ui_ += L2726_ui_ + L2724_ui_;
#endif
                                                        L2725_ui_ -= L2726_ui_;
                                                        L2726_ui_ = L2715_ui_;
                                                }
                                                if (L2725_ui_ > 0) {
                                                        F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2725_ui_);
                                                        L2720_ui_ += L2725_ui_;
                                                        L2726_ui_ -= L2725_ui_;
                                                }
                                                break;
                                        case 0x10:
                                                if (L2725_ui_ & 1) {
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                        F0790_(L2720_ui_, L2722_uc_);
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                        F0790_(L2720_ui_++, (int16_t)L2722_uc_);
#endif
                                                        if (--L2726_ui_ == 0) {
                                                                L2726_ui_ = L2715_ui_;
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                                L2720_ui_ += 2;
                                                        } else {
                                                                L2720_ui_ += 1;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                                L2720_ui_ += L2724_ui_;
#endif
                                                        }
                                                        L2725_ui_--;
                                                }
                                                L2719_ui_ = 0;
                                                L2723_ui_ = L2725_ui_;
                                                while (L2725_ui_ >= L2726_ui_) {
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA458_P20JA_P20JB) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                        F1003_(L2719_ui_, L2720_ui_, L2726_ui_);
#endif
#if (defined(MEDIA667_P31J) && (EXETYPE == C03_GAME))
                                                        F0680_CopyPixelsToScreenWithoutTransparency(L2719_ui_, L2720_ui_, L2726_ui_);
#endif
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                        L2720_ui_ += L2726_ui_ + 1;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                        L2720_ui_ += L2726_ui_ + L2724_ui_;
#endif
                                                        L2719_ui_ += L2726_ui_;
                                                        L2725_ui_ -= L2726_ui_;
                                                        L2726_ui_ = L2715_ui_;
                                                }
                                                if (L2725_ui_ > 0) {
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA458_P20JA_P20JB) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                        F1003_(L2719_ui_, L2720_ui_, L2725_ui_);
#endif
#if (defined(MEDIA667_P31J) && (EXETYPE == C03_GAME))
                                                        F0680_CopyPixelsToScreenWithoutTransparency(L2719_ui_, L2720_ui_, L2725_ui_);
#endif
                                                        L2720_ui_ += L2725_ui_;
                                                        L2719_ui_ += L2725_ui_;
                                                        L2726_ui_ -= L2725_ui_;
                                                }
                                                G2159_puc_Bitmap_Source += (L2723_ui_ >> 1);
                                                break;
                                        case 0x30:
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                L2723_ui_ = L2725_ui_ + (L2725_ui_ / L2717_ui_);
                                                if (L2725_ui_ > L2726_ui_) {
                                                        L2723_ui_++;
                                                }
                                                F0686_IMG_CopyFromPreviousLine(L2720_ui_, L2720_ui_ - L2717_ui_, L2723_ui_);
                                                L2720_ui_ += L2723_ui_;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                while (L2725_ui_ >= L2726_ui_) {
                                                        F0686_IMG_CopyFromPreviousLine(L2720_ui_, L2720_ui_ - L2717_ui_, L2726_ui_);
                                                        L2720_ui_ += L2726_ui_ + L2724_ui_;
                                                        L2725_ui_ -= L2726_ui_;
                                                        L2726_ui_ = L2715_ui_;
                                                }
                                                if (L2725_ui_ > 0) {
                                                        F0686_IMG_CopyFromPreviousLine(L2720_ui_, L2720_ui_ - L2717_ui_, L2726_ui_);
                                                        L2720_ui_ += L2725_ui_;
                                                        L2726_ui_ -= L2725_ui_;
                                                }
#endif
                                                F0790_(L2720_ui_++, L2722_uc_);
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)))
                                                L2726_ui_ = L2717_ui_ - (L2720_ui_ % L2717_ui_) - 1;
#endif
#if ((defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA459_P20JA_P20JB_P31J) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                if (--L2726_ui_ == 0) {
                                                        L2720_ui_ += L2724_ui_;
                                                        L2726_ui_ = L2715_ui_;
                                                }
#endif
                                }
                        }
                } while (L2720_ui_ < L2718_ui_);
        } else {
                L2720_ui_ = 0;
                do {
                        L2721_uc_ = *G2159_puc_Bitmap_Source++;
                        L2722_uc_ = L2721_uc_ & 0x0F;
                        if ((L2721_uc_ & 0x80) == 0) {
                                L2725_ui_ = (L2721_uc_ >> 4) + 1;
                                F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2725_ui_);
                                L2720_ui_ += L2725_ui_;
                        } else {
                                if ((L2721_uc_ & 0x40) == 0) {
                                        L2725_ui_ = *G2159_puc_Bitmap_Source++ + 1;
                                } else {
                                        L2725_ui_ = (*(G2159_puc_Bitmap_Source + 1) | (*G2159_puc_Bitmap_Source << 8)) + 1;
                                        G2159_puc_Bitmap_Source += 2;
                                }
                                switch (L2721_uc_ & 0x30) {
                                        case 0x00:
                                                F0685_IMG3_LineColorFilling(L2720_ui_, L2722_uc_, L2725_ui_);
                                                L2720_ui_ += L2725_ui_;
                                                break;
                                        case 0x10:
                                                if (L2725_ui_ & 1) {
                                                        F0790_(L2720_ui_, L2722_uc_);
                                                        L2720_ui_++;
                                                        L2725_ui_--;
                                                }
#if ((defined(MEDIA457_P20JA) && (EXETYPE == C19_NECIO)) || (defined(MEDIA478_P20JB_I34E_I34M) && (EXETYPE == C01_SWOOSH)) || (defined(MEDIA667_P31J) && (EXETYPE == C06_CEDT)) || (defined(MEDIA458_P20JA_P20JB) && (EXETYPE == C03_GAME)) || defined(MEDIA551_F20E_F20J_F31E_F31J))
                                                F1003_(0, L2720_ui_, L2725_ui_);
#endif
#if (defined(MEDIA667_P31J) && (EXETYPE == C03_GAME))
                                                F0680_CopyPixelsToScreenWithoutTransparency(0, L2720_ui_, L2725_ui_);
#endif
                                                G2159_puc_Bitmap_Source += (L2725_ui_ >> 1);
                                                L2720_ui_ += L2725_ui_;
                                                break;
                                        case 0x30:
                                                F0686_IMG_CopyFromPreviousLine(L2720_ui_, L2720_ui_ - L2717_ui_, L2725_ui_);
                                                L2720_ui_ += L2725_ui_;
                                                F0790_(L2720_ui_++, L2722_uc_);
                                }
                        }
                } while (L2720_ui_ < L2718_ui_);
        }
#endif
#if (defined(MEDIA707_I34E_I34M) && ((EXETYPE == C03_GAME) || (EXETYPE == C11_SELECTOR))) /* IMG3 */
        int16_t L2727_i_;
        int16_t L2728_i_;
        unsigned int16_t L2729_ui_;
        int16_t L2730_i_;
        unsigned int16_t L2731_ui_;
        int16_t L2732_i_;
#if (EXETYPE == C03_GAME)
        int16_t L2733_i_;
#endif
        unsigned char L2734_uc_;
        unsigned char L2735_uc_;
#if (EXETYPE == C03_GAME)
        unsigned char L2736_auc_LocalPalette[6];
#endif
        char L2737_c_;
#if (EXETYPE == C11_SELECTOR)
        int16_t L2733_i_;
#endif
        unsigned int16_t L2738_ui_;
        unsigned int16_t L2739_ui_;


        G2159_puc_Bitmap_Source = P2353_puc_Bitmap_AtariST;
        G2160_puc_Bitmap_Destination = P2354_puc_Bitmap;
        L2727_i_ = *((int16_t*)G2159_puc_Bitmap_Source);
        L2728_i_ = *((int16_t*)G2159_puc_Bitmap_Source + 1);
        L2730_i_ = (L2729_ui_ = M104_EVEN_INTEGER(L2727_i_)) * L2728_i_;
        G2157_ = 8;
        for (L2733_i_ = 0; L2733_i_ < 6; L2733_i_++) {
#if (EXETYPE == C03_GAME)
                L2736_auc_LocalPalette[L2733_i_] = F0687_IMG3_GetNibble();
#endif
#if (EXETYPE == C11_SELECTOR)
                G8245_auc_LocalPalette[L2733_i_] = F0687_IMG3_GetNibble();
#endif
        }
        if (L2727_i_ != L2729_ui_) {
                L2732_i_ = L2729_ui_ - L2727_i_;
                L2738_ui_ = 0;
                L2731_ui_ = L2727_i_;
                do {
                        L2735_uc_ = (L2734_uc_ = F0687_IMG3_GetNibble()) & 0x07;
                        if (L2735_uc_ == 6) {
                                if (L2734_uc_ & 8) {
                                        L2739_ui_ = F0688_IMG3_GetPixelCount();
                                } else {
                                        L2739_ui_ = 1;
                                }
                                while (L2739_ui_ >= L2731_ui_) {
                                        F0686_IMG_CopyFromPreviousLine(L2738_ui_, L2738_ui_ - L2729_ui_, L2731_ui_);
                                        L2738_ui_ += L2731_ui_ + L2732_i_;
                                        L2739_ui_ -= L2731_ui_;
                                        L2731_ui_ = L2727_i_;
                                }
                                if (L2739_ui_ > 0) {
                                        F0686_IMG_CopyFromPreviousLine(L2738_ui_, L2738_ui_ - L2729_ui_, L2731_ui_);
                                        L2738_ui_ += L2739_ui_;
                                        L2731_ui_ -= L2739_ui_;
                                }
                        } else {
                                if (L2735_uc_ < 6) {
#if (EXETYPE == C03_GAME)
                                        L2737_c_ = L2736_auc_LocalPalette[L2735_uc_];
#endif
#if (EXETYPE == C11_SELECTOR)
                                        L2737_c_ = G8245_auc_LocalPalette[L2735_uc_];
#endif
                                } else {
                                        L2737_c_ = F0687_IMG3_GetNibble();
                                }
                                if (L2734_uc_ & 8) {
                                        L2739_ui_ = F0688_IMG3_GetPixelCount();
                                } else {
                                        L2739_ui_ = 1;
                                }
                                while (L2739_ui_ >= L2731_ui_) {
                                        F0685_IMG3_LineColorFilling(L2738_ui_, L2737_c_, L2731_ui_);
                                        L2738_ui_ += L2731_ui_ + L2732_i_;
                                        L2739_ui_ -= L2731_ui_;
                                        L2731_ui_ = L2727_i_;
                                }
                                if (L2739_ui_ > 0) {
                                        F0685_IMG3_LineColorFilling(L2738_ui_, L2737_c_, L2739_ui_);
                                        L2738_ui_ += L2739_ui_;
                                        L2731_ui_ -= L2739_ui_;
                                }
                        }
                } while (L2738_ui_ < L2730_i_);
        } else {
                L2738_ui_ = 0;
                do {
                        L2735_uc_ = (L2734_uc_ = F0687_IMG3_GetNibble()) & 0x07;
                        if (L2735_uc_ == 6) {
                                if (L2734_uc_ & 8) {
                                        L2739_ui_ = F0688_IMG3_GetPixelCount();
                                } else {
                                        L2739_ui_ = 1;
                                }
                                F0686_IMG_CopyFromPreviousLine(L2738_ui_, L2738_ui_ - L2729_ui_, L2739_ui_);
                        } else {
                                if (L2735_uc_ < 6) {
#if (EXETYPE == C03_GAME)
                                        L2737_c_ = L2736_auc_LocalPalette[L2735_uc_];
#endif
#if (EXETYPE == C11_SELECTOR)
                                        L2737_c_ = G8245_auc_LocalPalette[L2735_uc_];
#endif
                                } else {
                                        L2737_c_ = F0687_IMG3_GetNibble();
                                }
                                if (L2734_uc_ & 8) {
                                        L2739_ui_ = F0688_IMG3_GetPixelCount();
                                } else {
                                        L2739_ui_ = 1;
                                }
                                F0685_IMG3_LineColorFilling(L2738_ui_, L2737_c_, L2739_ui_);
                        }
                        L2738_ui_ += L2739_ui_;
                } while (L2738_ui_ < L2730_i_);
        }
#endif
}

#ifdef MEDIA551_F20E_F20J_F31E_F31J
#include "EXPAND.C"

#if (EXETYPE == C03_GAME)
#include "TOWNSSCR.C"
#endif
#endif
#endif
#endif
