#ifndef ELECTONELOC_H
#define ELECTONELOC_H


/****************************************************************************/


/* This file was created automatically by CatComp.
 * Do NOT edit by hand!
 */


#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifdef CATCOMP_ARRAY
#undef CATCOMP_NUMBERS
#undef CATCOMP_STRINGS
#define CATCOMP_NUMBERS
#define CATCOMP_STRINGS
#endif

#ifdef CATCOMP_BLOCK
#undef CATCOMP_STRINGS
#define CATCOMP_STRINGS
#endif


/****************************************************************************/


#ifdef CATCOMP_NUMBERS

#define MSGD_ABOUT 0
#define MSGD_SEND_TYPE0 1
#define MSGD_SEND_TYPE1 2
#define MSGD_SEND_TYPE2 3
#define MSGD_SEND_TYPE3 4
#define MSGD_SEND_TYPE4 5
#define MSGD_SEND_TYPE5 6
#define MSGD_SEND_TYPE6 7
#define MSGD_REQUEST_TYPE0 8
#define MSGD_REQUEST_TYPE1 9
#define MSGD_REQUEST_TYPE2 10
#define MSGD_REQUEST_TYPE3 11
#define MSGD_REQUEST_TYPE4 12
#define MSGD_REQUEST_TYPE5 13
#define MSGD_REQUEST_TYPE6 14
#define MSGD_RECIEVED_TYPE0 15
#define MSGD_RECIEVED_TYPE1 16
#define MSGD_RECIEVED_TYPE2 17
#define MSGD_RECIEVED_TYPE3 18
#define MSGD_RECIEVED_TYPE4 19
#define MSGD_RECIEVED_TYPE5 20
#define MSGD_RECIEVED_TYPE6 21
#define MSGD_UNKNOWN_TYPE 22
#define MSGD_SEND_END 23
#define MSGD_SEND_ERROR 24
#define MSGD_UNEXPECTED_ANSWER 25
#define MSGD_TOO_MANY_DATAS 26
#define MSGD_OUT_OF_MEMORY 27

#endif /* CATCOMP_NUMBERS */


/****************************************************************************/


#ifdef CATCOMP_STRINGS

#define MSGD_ABOUT_STR "Yamaha Electones driver\nfor SynthLib\nŠ1993 Jean-Alexis MONTIGNIES."
#define MSGD_SEND_TYPE0_STR "Sending all memory datas."
#define MSGD_SEND_TYPE1_STR "Sending registration datas."
#define MSGD_SEND_TYPE2_STR "Sending rythm and chord sequences datas."
#define MSGD_SEND_TYPE3_STR "Sending full music play sequence datas."
#define MSGD_SEND_TYPE4_STR "Sending user rythm patterns datas."
#define MSGD_SEND_TYPE5_STR "Sending user chord patterns datas."
#define MSGD_SEND_TYPE6_STR "Sending user voices datas."
#define MSGD_REQUEST_TYPE0_STR "Asking for all memory datas."
#define MSGD_REQUEST_TYPE1_STR "Asking for registration datas."
#define MSGD_REQUEST_TYPE2_STR "Asking for rythm and chord sequences datas."
#define MSGD_REQUEST_TYPE3_STR "Asking for full music play sequence datas."
#define MSGD_REQUEST_TYPE4_STR "Asking for user rythm patterns datas."
#define MSGD_REQUEST_TYPE5_STR "Asking for user chord patterns datas."
#define MSGD_REQUEST_TYPE6_STR "Asking for user voices datas."
#define MSGD_RECIEVED_TYPE0_STR "All memory datas recieved."
#define MSGD_RECIEVED_TYPE1_STR "Registration datas recieved."
#define MSGD_RECIEVED_TYPE2_STR "Rythm and chord sequences datas recieved."
#define MSGD_RECIEVED_TYPE3_STR "Full music play sequence datas recieved."
#define MSGD_RECIEVED_TYPE4_STR "User rythm patterns datas recieved."
#define MSGD_RECIEVED_TYPE5_STR "User chord patterns datas recieved."
#define MSGD_RECIEVED_TYPE6_STR "User voices datas recieved."
#define MSGD_UNKNOWN_TYPE_STR "Unknown data type."
#define MSGD_SEND_END_STR "%s datas sent."
#define MSGD_SEND_ERROR_STR "Bulk dump was not recognised."
#define MSGD_UNEXPECTED_ANSWER_STR "Unexpected answer."
#define MSGD_TOO_MANY_DATAS_STR "Too many datas."
#define MSGD_OUT_OF_MEMORY_STR "Out of memory."

#endif /* CATCOMP_STRINGS */


/****************************************************************************/


#ifdef CATCOMP_ARRAY

struct CatCompArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct CatCompArrayType CatCompArray[] =
{
    {MSGD_ABOUT,(STRPTR)MSGD_ABOUT_STR},
    {MSGD_SEND_TYPE0,(STRPTR)MSGD_SEND_TYPE0_STR},
    {MSGD_SEND_TYPE1,(STRPTR)MSGD_SEND_TYPE1_STR},
    {MSGD_SEND_TYPE2,(STRPTR)MSGD_SEND_TYPE2_STR},
    {MSGD_SEND_TYPE3,(STRPTR)MSGD_SEND_TYPE3_STR},
    {MSGD_SEND_TYPE4,(STRPTR)MSGD_SEND_TYPE4_STR},
    {MSGD_SEND_TYPE5,(STRPTR)MSGD_SEND_TYPE5_STR},
    {MSGD_SEND_TYPE6,(STRPTR)MSGD_SEND_TYPE6_STR},
    {MSGD_REQUEST_TYPE0,(STRPTR)MSGD_REQUEST_TYPE0_STR},
    {MSGD_REQUEST_TYPE1,(STRPTR)MSGD_REQUEST_TYPE1_STR},
    {MSGD_REQUEST_TYPE2,(STRPTR)MSGD_REQUEST_TYPE2_STR},
    {MSGD_REQUEST_TYPE3,(STRPTR)MSGD_REQUEST_TYPE3_STR},
    {MSGD_REQUEST_TYPE4,(STRPTR)MSGD_REQUEST_TYPE4_STR},
    {MSGD_REQUEST_TYPE5,(STRPTR)MSGD_REQUEST_TYPE5_STR},
    {MSGD_REQUEST_TYPE6,(STRPTR)MSGD_REQUEST_TYPE6_STR},
    {MSGD_RECIEVED_TYPE0,(STRPTR)MSGD_RECIEVED_TYPE0_STR},
    {MSGD_RECIEVED_TYPE1,(STRPTR)MSGD_RECIEVED_TYPE1_STR},
    {MSGD_RECIEVED_TYPE2,(STRPTR)MSGD_RECIEVED_TYPE2_STR},
    {MSGD_RECIEVED_TYPE3,(STRPTR)MSGD_RECIEVED_TYPE3_STR},
    {MSGD_RECIEVED_TYPE4,(STRPTR)MSGD_RECIEVED_TYPE4_STR},
    {MSGD_RECIEVED_TYPE5,(STRPTR)MSGD_RECIEVED_TYPE5_STR},
    {MSGD_RECIEVED_TYPE6,(STRPTR)MSGD_RECIEVED_TYPE6_STR},
    {MSGD_UNKNOWN_TYPE,(STRPTR)MSGD_UNKNOWN_TYPE_STR},
    {MSGD_SEND_END,(STRPTR)MSGD_SEND_END_STR},
    {MSGD_SEND_ERROR,(STRPTR)MSGD_SEND_ERROR_STR},
    {MSGD_UNEXPECTED_ANSWER,(STRPTR)MSGD_UNEXPECTED_ANSWER_STR},
    {MSGD_TOO_MANY_DATAS,(STRPTR)MSGD_TOO_MANY_DATAS_STR},
    {MSGD_OUT_OF_MEMORY,(STRPTR)MSGD_OUT_OF_MEMORY_STR},
};

#endif /* CATCOMP_ARRAY */


/****************************************************************************/


#ifdef CATCOMP_BLOCK

static const char CatCompBlock[] =
{
    "\x00\x00\x00\x00\x00\x44"
    MSGD_ABOUT_STR "\x00\x00"
    "\x00\x00\x00\x01\x00\x1A"
    MSGD_SEND_TYPE0_STR "\x00"
    "\x00\x00\x00\x02\x00\x1C"
    MSGD_SEND_TYPE1_STR "\x00"
    "\x00\x00\x00\x03\x00\x2A"
    MSGD_SEND_TYPE2_STR "\x00\x00"
    "\x00\x00\x00\x04\x00\x28"
    MSGD_SEND_TYPE3_STR "\x00"
    "\x00\x00\x00\x05\x00\x24"
    MSGD_SEND_TYPE4_STR "\x00\x00"
    "\x00\x00\x00\x06\x00\x24"
    MSGD_SEND_TYPE5_STR "\x00\x00"
    "\x00\x00\x00\x07\x00\x1C"
    MSGD_SEND_TYPE6_STR "\x00\x00"
    "\x00\x00\x00\x08\x00\x1E"
    MSGD_REQUEST_TYPE0_STR "\x00\x00"
    "\x00\x00\x00\x09\x00\x20"
    MSGD_REQUEST_TYPE1_STR "\x00\x00"
    "\x00\x00\x00\x0A\x00\x2C"
    MSGD_REQUEST_TYPE2_STR "\x00"
    "\x00\x00\x00\x0B\x00\x2C"
    MSGD_REQUEST_TYPE3_STR "\x00\x00"
    "\x00\x00\x00\x0C\x00\x26"
    MSGD_REQUEST_TYPE4_STR "\x00"
    "\x00\x00\x00\x0D\x00\x26"
    MSGD_REQUEST_TYPE5_STR "\x00"
    "\x00\x00\x00\x0E\x00\x1E"
    MSGD_REQUEST_TYPE6_STR "\x00"
    "\x00\x00\x00\x0F\x00\x1C"
    MSGD_RECIEVED_TYPE0_STR "\x00\x00"
    "\x00\x00\x00\x10\x00\x1E"
    MSGD_RECIEVED_TYPE1_STR "\x00\x00"
    "\x00\x00\x00\x11\x00\x2A"
    MSGD_RECIEVED_TYPE2_STR "\x00"
    "\x00\x00\x00\x12\x00\x2A"
    MSGD_RECIEVED_TYPE3_STR "\x00\x00"
    "\x00\x00\x00\x13\x00\x24"
    MSGD_RECIEVED_TYPE4_STR "\x00"
    "\x00\x00\x00\x14\x00\x24"
    MSGD_RECIEVED_TYPE5_STR "\x00"
    "\x00\x00\x00\x15\x00\x1C"
    MSGD_RECIEVED_TYPE6_STR "\x00"
    "\x00\x00\x00\x16\x00\x14"
    MSGD_UNKNOWN_TYPE_STR "\x00\x00"
    "\x00\x00\x00\x17\x00\x10"
    MSGD_SEND_END_STR "\x00\x00"
    "\x00\x00\x00\x18\x00\x1E"
    MSGD_SEND_ERROR_STR "\x00"
    "\x00\x00\x00\x19\x00\x14"
    MSGD_UNEXPECTED_ANSWER_STR "\x00\x00"
    "\x00\x00\x00\x1A\x00\x10"
    MSGD_TOO_MANY_DATAS_STR "\x00"
    "\x00\x00\x00\x1B\x00\x10"
    MSGD_OUT_OF_MEMORY_STR "\x00\x00"
};

#endif /* CATCOMP_BLOCK */


/****************************************************************************/


struct LocaleInfo
{
    APTR li_LocaleBase;
    APTR li_Catalog;
};


#ifdef CATCOMP_CODE

STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
{
LONG   *l;
UWORD  *w;
STRPTR  builtIn;

    l = (LONG *)CatCompBlock;

    while (*l != stringNum)
    {
        w = (UWORD *)((ULONG)l + 4);
        l = (LONG *)((ULONG)l + (ULONG)*w + 6);
    }
    builtIn = (STRPTR)((ULONG)l + 6);

#define XLocaleBase LocaleBase
#define LocaleBase li->li_LocaleBase
    
    if (LocaleBase)
        return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
#define LocaleBase XLocaleBase
#undef XLocaleBase

    return(builtIn);
}


#endif /* CATCOMP_CODE */


/****************************************************************************/


#endif /* ELECTONELOC_H */
