#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA736_I34M_A36M_A31M_A33M_A35M
int16_t G2000_Language = C0_ENGLISH;
char* G2135_ = "";
int16_t G2171_;
char* G2170_; /* Texts */
char** G2172_;
/* align 2 */
/* 2B4Bh to 2CBAh Data for code segment 0 - C runtime and helper functions */



void F0757_LoadTexts(
)
{
        register char* L2967_pc_Character;
        register char** L2968_ppc_;
        register int16_t L2969_i_ByteIndex;
        register int16_t L2970_i_StringCount;
        register unsigned int16_t L2971_ui_ByteCount;


        G2170_ = L2967_pc_Character = (char*)M533_F0468_MEMORY_Allocate((long)(L2971_ui_ByteCount = F0494_MEMORY_GetGraphicDecompressedByteCount(C700_GRAPHIC_TEXTS)), C1_ALLOCATION_PERMANENT, MASK0x0400_MEMREQ);
        F0490_MEMORY_LoadDecompressAndExpandGraphic(MASK0x8000_NOT_EXPANDED | MASK0x4000_DO_NOT_COPY_DIMENSIONS | C700_GRAPHIC_TEXTS, L2967_pc_Character);
        L2970_i_StringCount = 0;
        for (L2969_i_ByteIndex = 0; L2969_i_ByteIndex < L2971_ui_ByteCount; L2969_i_ByteIndex++) {
                if (!(*L2967_pc_Character++)) {
                        L2970_i_StringCount++;
                }
        }
        G2171_ = L2970_i_StringCount;
        G2172_ = L2968_ppc_ = (char**)M533_F0468_MEMORY_Allocate((long)(L2970_i_StringCount * sizeof(char*)), C1_ALLOCATION_PERMANENT, MASK0x0400_MEMREQ); /* Allocate memory for an array of pointers, one for each string */
        L2967_pc_Character = G2170_;
        *L2968_ppc_++ = L2967_pc_Character;
        while (--L2970_i_StringCount > 0) {
                while (*L2967_pc_Character++);
                *L2968_ppc_++ = L2967_pc_Character;
        }
}

char* F0758_TranslateLanguage(P4178_i_StringIndex)
int16_t P4178_i_StringIndex;
{
        if ((P4178_i_StringIndex < 0) || P4178_i_StringIndex >= G2171_) {
                return G2135_;
        } else {
                return G2172_[P4178_i_StringIndex];
        }
}
#endif
