#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA678_F31E_F31J_X31J_P31J_SU1E_AU1E_AU2E_AU3E
void F7077_InitCMPStructure(
)
{
        GAME* L4002_ps_;
        CSB_SAVE_HEADER* L4003_ps_;
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
        int16_t L4004_i_;
        int16_t L4005_i_;
#endif


        L4002_ps_ = &G7111_Games[C0_GAME_SOURCE];
#ifdef MEDIA772_SU1E
        G2246_CMPData.Magic = 0x91A7;
#endif
        L4003_ps_ = (CSB_SAVE_HEADER*)&L4002_ps_->SaveHeader;
        if (L4002_ps_->SaveHeaderFormat == C0x02_SAVE_HEADER_FORMAT_CHAOS_STRIKES_BACK) {
#ifdef MEDIA772_SU1E
                G2246_CMPData.DungeonID = L4003_ps_->DungeonID;
                if (L4003_ps_->FormatID == C1_FORMAT_DM_ATARI_ST) {
                        G2246_CMPData.Platform = C1_PLATFORM_ATARI_ST;
                        G2246_CMPData.DungeonID = C10_DUNGEON_DM;
                } else {
                        G2246_CMPData.Platform = L4003_ps_->Platform;
                        G2246_CMPData.DungeonID = L4003_ps_->DungeonID;
                }
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
                L4004_i_ = L4003_ps_->Platform;
                L4005_i_ = L4003_ps_->DungeonID;
#endif
        } else {
#ifdef MEDIA772_SU1E
                G2246_CMPData.DungeonID = L4002_ps_->SaveHeader.DungeonID;
                if (L4002_ps_->SaveHeader.FormatID == C1_FORMAT_DM_ATARI_ST) {
                        G2246_CMPData.Platform = C1_PLATFORM_ATARI_ST;
                        G2246_CMPData.DungeonID = C10_DUNGEON_DM;
                } else {
                        G2246_CMPData.Platform = L4002_ps_->SaveHeader.Platform;
                        G2246_CMPData.DungeonID = L4002_ps_->SaveHeader.DungeonID;
                }
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
                L4004_i_ = L4002_ps_->SaveHeader.Platform;
                L4005_i_ = L4002_ps_->SaveHeader.DungeonID;
#endif
        }
#ifdef MEDIA772_SU1E
        G2246_CMPData.cmp_ui_6 = 1;
        G2246_CMPData.cmp_ui_8 = 1;
#endif
        G2246_CMPData.cmp_i_A = 0;
        G2246_CMPData.cmp_i_C = 0;
        G2246_CMPData.cmp_i_E = 0;
        G2246_CMPData.Name[0] = '\0';
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
        G2246_CMPData.Magic = 0x91A7;
        G2246_CMPData.Platform = L4004_i_;
        G2246_CMPData.DungeonID = L4005_i_;
        G2246_CMPData.cmp_ui_6 = 1;
        G2246_CMPData.cmp_ui_8 = 1;
#endif
}
#endif
