#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA724_I34E_I34M_A36M_A31M_A33M_A35E_A35M
#ifdef MEDIA701_I34E
char* G1059_pc_DungeonFileName = "DATA\\DUNGEON.DAT";
char* G1064_pc_ExpansionSetDungeonFileName = "A:DUNGEON.FTL";
char* G1149_pc_BonusDungeonFileName = "A:DUNGEONB.DAT";
char* G2130_GraphicsDatFileName = "DATA\\GRAPHICS.DAT";
char G0575_ac_SavedGameFileName[] = "A:DMSAVE.DAT";
char* G0569_pc_SavedGameFileName = G0575_ac_SavedGameFileName;
char G0576_ac_SavedGameBackupFileName[] = "A:DMSAVE.BAK";
char* G0570_pc_SavedGameBackupFileName = G0576_ac_SavedGameBackupFileName;
#endif
#ifdef MEDIA739_A35E
char* G1059_pc_DungeonFileName = "DungeonMaster:Dungeon.dat";
char* G1064_pc_ExpansionSetDungeonFileName = "DungeonMaster:Dungeon.FTL";
char* G1149_pc_BonusDungeonFileName = "DungeonMaster:DungeonB.dat";
char* G2130_GraphicsDatFileName = "DungeonMaster:graphics.dat";
char* G0569_pc_SavedGameFileName = "DF0:CSBGAME.DAT";
char* G0570_pc_SavedGameBackupFileName = "DF0:CSBGAME.BAK";
#endif
#ifdef MEDIA757_A36M_A31M_A33M_A35M
char G2175_ac_DungeonFileName[] = "DungeonMaster:Dungeon~.dat";
char* G1059_pc_DungeonFileName = G2175_ac_DungeonFileName;
char G2176_ac_ExpansionSetDungeonFileName[] = "DungeonMaster:Dungeon~.FTL";
char* G1064_pc_ExpansionSetDungeonFileName = G2176_ac_ExpansionSetDungeonFileName;
char G2177_ac_BonusDungeonFileName[] = "DungeonMaster:DungeonB~.dat";
char* G1149_pc_BonusDungeonFileName = G2177_ac_BonusDungeonFileName;
char* G2130_GraphicsDatFileName = "DungeonMaster:graphics.dat";
#endif
#ifdef MEDIA658_A31M_A33M_A35M
char G0575_ac_SavedGameFileName[] = "DF0:CSBGAME~.DAT";
char* G0569_pc_SavedGameFileName = G0575_ac_SavedGameFileName;
char G0576_ac_SavedGameBackupFileName[] = "DF0:CSBGAME~.BAK";
char* G0570_pc_SavedGameBackupFileName = G0576_ac_SavedGameBackupFileName;
#endif
#ifdef MEDIA744_A36M
char G0575_ac_SavedGameFileName[] = "DF0:DMGAME~.DAT"; /* BUGX_XX If French or German language was selected at the beginning of the game, the saved game file name is not the same as in Amiga versions 2.x and the Utility Disk will fail to load these files because of the name mismatch */
char* G0569_pc_SavedGameFileName = G0575_ac_SavedGameFileName;
char G0576_ac_SavedGameBackupFileName[] = "DF0:DMGAME~.BAK";
char* G0570_pc_SavedGameBackupFileName = G0576_ac_SavedGameBackupFileName;
#endif
#ifdef MEDIA733_I34M
char G2175_ac_DungeonFileName[] = "EUDATA\\DUNGEON~.DAT";
char* G1059_pc_DungeonFileName = G2175_ac_DungeonFileName;
char G2176_ac_ExpansionSetDungeonFileName[] = "A:DUNGEON~.FTL";
char* G1064_pc_ExpansionSetDungeonFileName = G2176_ac_ExpansionSetDungeonFileName;
char G2177_ac_BonusDungeonFileName[] = "A:DUNGB~.DAT";
char* G1149_pc_BonusDungeonFileName = G2177_ac_BonusDungeonFileName;
char* G2130_GraphicsDatFileName = "EUDATA\\GRAPHICS.DAT";
char G0575_ac_SavedGameFileName[] = "A:DMSAVE~.DAT";
char* G0569_pc_SavedGameFileName = G0575_ac_SavedGameFileName;
char G0576_ac_SavedGameBackupFileName[] = "A:DMSAVE~.BAK";
char* G0570_pc_SavedGameBackupFileName = G0576_ac_SavedGameBackupFileName;
#endif


#ifdef MEDIA736_I34M_A36M_A31M_A33M_A35M
void F0744_ReplaceTildeInFileName(
register char* P2429_pc_FileName SEPARATOR
char           P2430_c_          FINAL_SEPARATOR
{
        register char* L3026_pc_String;
        register char L3027_c_Character;


        while ((L3027_c_Character = *P2429_pc_FileName) != 0) {
                if (L3027_c_Character == '~') {
                        if (P2430_c_ != '\0') {
                                *P2429_pc_FileName = P2430_c_;
                        } else {
                                L3026_pc_String = P2429_pc_FileName;
                                while (*L3026_pc_String = *(L3026_pc_String + 1)) {
                                        L3026_pc_String++;
                                }
                                continue;
                        }
                }
                P2429_pc_FileName++;
        }
}

void F0745_SetFileNamesAccordingToLanguage(
)
{
        register char L3028_c_;


        switch (G2000_Language) {
                case C0_ENGLISH:
                        L3028_c_ = '\0';
                        break;
                case C1_FRENCH:
                        L3028_c_ = 'F';
                        break;
                case C2_GERMAN:
                        L3028_c_ = 'G';
        }
        F0744_ReplaceTildeInFileName(G1059_pc_DungeonFileName, L3028_c_);
        F0744_ReplaceTildeInFileName(G1064_pc_ExpansionSetDungeonFileName, L3028_c_);
        F0744_ReplaceTildeInFileName(G1149_pc_BonusDungeonFileName, L3028_c_);
        F0744_ReplaceTildeInFileName(G0569_pc_SavedGameFileName, L3028_c_);
        F0744_ReplaceTildeInFileName(G0570_pc_SavedGameBackupFileName, L3028_c_);
}
#endif
#endif
