#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
BOOLEAN F7272_IsDungeonValid(GAME* P4043_ps_, unsigned int16_t P4044_ui_ValidationCriteria)
{
        BOOLEAN L4110_B_;
        unsigned int16_t L4102_ui_GameType;
        int16_t L4103_i_;
        int16_t L4104_i_;
        int16_t L4109_i_;
        int16_t L4105_i_;
        int16_t L4106_i_;
        int16_t L4107_i_;
        CSB_SAVE_HEADER* L4108_ps_;


        L4110_B_ = C0_FALSE;
        L4102_ui_GameType = P4043_ps_->SaveHeaderFormat;
        switch (L4102_ui_GameType) {
                case C0x01_SAVE_HEADER_FORMAT_DUNGEON_MASTER:
                        L4109_i_ = P4043_ps_->SaveHeader.DungeonID;
                        L4105_i_ = P4043_ps_->SaveHeader.Platform;
                        L4106_i_ = P4043_ps_->SaveHeader.FormatID;
                        L4107_i_ = P4043_ps_->SaveHeader.Useless;
                        break;
                case C0x02_SAVE_HEADER_FORMAT_CHAOS_STRIKES_BACK:
                        L4108_ps_ = (CSB_SAVE_HEADER*)&P4043_ps_->SaveHeader;
                        L4109_i_ = L4108_ps_->DungeonID;
                        L4105_i_ = L4108_ps_->Platform;
                        L4106_i_ = L4108_ps_->FormatID;
                        L4107_i_ = L4108_ps_->Useless;
        }
        L4103_i_ = P4043_ps_->ChampionFormat;
        L4104_i_ = P4043_ps_->PortraitFormat;
        switch (P4044_ui_ValidationCriteria) {
                case 1:
                        if (
#ifdef MEDIA692_X31J
                           (L4105_i_ == C6_PLATFORM_X68000) &&
#endif
#ifdef MEDIA764_AU1E_AU2E_AU3E
                           (L4105_i_ == C3_PLATFORM_AMIGA) &&
#endif
                           ((L4109_i_ == C13_DUNGEON_CSB_GAME) || (L4109_i_ == C12_DUNGEON_CSB_PRISON) || (L4109_i_ == C10_DUNGEON_DM))) {
                                L4110_B_ = C1_TRUE;
                        }
                        break;
                case 2:
                        if (
#ifdef MEDIA692_X31J
                           (L4105_i_ == C6_PLATFORM_X68000) &&
#endif
#ifdef MEDIA764_AU1E_AU2E_AU3E
                           (L4105_i_ == C3_PLATFORM_AMIGA) &&
#endif
                           (L4109_i_ == C13_DUNGEON_CSB_GAME)) {
                                L4110_B_ = C1_TRUE;
                        }
                        break;
                case 3:
                        if (
#ifdef MEDIA692_X31J
                           (L4105_i_ == C6_PLATFORM_X68000) &&
#endif
#ifdef MEDIA764_AU1E_AU2E_AU3E
                           (L4105_i_ == C3_PLATFORM_AMIGA) &&
#endif
                           ((L4109_i_ == C12_DUNGEON_CSB_PRISON) || (L4109_i_ == C10_DUNGEON_DM))) {
                                L4110_B_ = C1_TRUE;
                        }
        }
#ifdef MEDIA762_AU1E
        if (L4110_B_);
#endif
        return L4110_B_;
}
#endif
