#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA387_G20E
extern unsigned char G0741_aai_PaletteAnimationData[81];
extern GSString128 G4069_;
extern char G4064_[];

QuitRecGS G4065_s_QuitRecGS = { 0, NULL, 0 };

void main(
)
{
        char* L6454_;


        F1272_Initialize_CPSX();
        F0902_DrawFTLLogo();
        F0022_MAIN_SwooshDelay(60);
        F0909_PlaySwooshSound();
        asm { /* Process palette animation */
                        LDA     #G0741_aai_PaletteAnimationData
                        STA     L6454_
                        LDA     #^G0741_aai_PaletteAnimationData
                        STA     L6454_+2
                        LDY     #0x00
                        SEP     #0x30
                L000706:
                        LDA     [L6454_],Y
                        BEQ     L000740
                        CMP     #0x10
                        BCC     L000725
                        PHY                     /* If value > 16 then it is a delay */
                        SEC
                        SBC     #0x0f
                        REP     #0x30
                        AND     #0xff
                        PHA
                        JSL     >F0022_MAIN_SwooshDelay
                        PLA
                        SEP     #0x30
                        PLY
                        INY
                        INY
                L000722:
                        INY
                        BRA     L000706
                L000725:
                        ASL     A               /* If value < 16 then it is a color index */
                        TAX
                        INY
                        LDA     [L6454_],Y
                        STA     0xe19e00,X
                        STA     0xe19e20,X
                        INX
                        INY
                        LDA     [L6454_],Y
                        STA     0xe19e00,X
                        STA     0xe19e20,X
                        BRA     L000722
                L000740:
                        REP     #0x30
        }
        G4069_.length = strlen(G4064_);
        strcpy(G4069_.text, G4064_);
        G4065_s_QuitRecGS.pCount = 2;
        G4065_s_QuitRecGS.pathname = &G4069_;
        G4065_s_QuitRecGS.flags = 0;
        QuitGS(&G4065_s_QuitRecGS);
}
#endif
