#include "macros/scrcmd.inc"
#include "res/text/bank/galactic_hq_b2f.h"


    ScriptEntry _000E
    ScriptEntry _0021
    ScriptEntry _0034
    ScriptEntryEnd

_000E:
    PlayFanfare SEQ_SE_CONFIRM
    LockAll
    FacePlayer
    Message 0
    WaitABXPadPress
    CloseMessage
    ReleaseAll
    End

_0021:
    PlayFanfare SEQ_SE_CONFIRM
    LockAll
    FacePlayer
    Message 1
    WaitABXPadPress
    CloseMessage
    ReleaseAll
    End

_0034:
    PlayFanfare SEQ_SE_CONFIRM
    LockAll
    FacePlayer
    CheckItem ITEM_GALACTIC_KEY, 1, VAR_RESULT
    GoToIfEq VAR_RESULT, 1, _005C
    Message 2
    WaitABXPadPress
    CloseMessage
    ReleaseAll
    End

_005C:
    Message 3
    ShowYesNoMenu VAR_RESULT
    GoToIfEq VAR_RESULT, MENU_YES, _007F
    GoToIfEq VAR_RESULT, MENU_NO, _00B3
    End

_007F:
    BufferPlayerName 0
    Message 4
    WaitABXPadPress
    WaitFanfare SEQ_SE_CONFIRM
    PlayFanfare SEQ_SE_DP_DOOR10
    ApplyMovement 6, _00BC
    ApplyMovement 7, _00C4
    WaitMovement
    SetFlag FLAG_UNK_0x0227
    RemoveObject 6
    RemoveObject 7
    CloseMessage
    ReleaseAll
    End

_00B3:
    CloseMessage
    ReleaseAll
    End

    .balign 4, 0
_00BC:
    WalkFastWest
    EndMovement

    .balign 4, 0
_00C4:
    WalkFastEast
    EndMovement
