Gems/EMotionFX/Code/EMotionFX/Source/Importer/Importer.cpp
Importer::EFileType Importer::CheckFileType(MCore::File* file)
    {
        MCore::Endian::EEndianType  endianType = MCore::Endian::ENDIAN_LITTLE;

        // verify if this is a valid actor file or not
        file->Seek(0);
        if (CheckIfIsValidActorFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_ACTOR;
        }

        // verify if this is a valid skeletal motion file or not
        file->Seek(0);
        if (CheckIfIsValidMotionFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_MOTION;
        }

        // check for node map
        file->Seek(0);
        if (CheckIfIsValidNodeMapFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_NODEMAP;
        }

        // close the file again
        file->Close();

        return FILETYPE_UNKNOWN;
    }
// loads the given file and checks if it is an actor or a motion
loads the given file and checks if it is an actor or a motion
loads the given file and checks if it is an actor or a motion
Importer::EFileType Importer::CheckFileType(MCore::File* file)
    {
        MCore::Endian::EEndianType  endianType = MCore::Endian::ENDIAN_LITTLE;
        file->Seek(0);
        if (CheckIfIsValidActorFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_ACTOR;
        }
        file->Seek(0);
        if (CheckIfIsValidMotionFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_MOTION;
        }
        file->Seek(0);
        if (CheckIfIsValidNodeMapFile(file, &endianType))
        {
            file->Close();
            return FILETYPE_NODEMAP;
        }
        file->Close();
        return FILETYPE_UNKNOWN;
    }
Importer :: EFileType Importer :: CheckFileType ( MCore :: File * file ) { MCore :: Endian :: EEndianType endianType = MCore :: Endian :: ENDIAN_LITTLE ; file -> Seek ( 0 ) ; if ( CheckIfIsValidActorFile ( file , & endianType ) ) { file -> Close ( ) ; return FILETYPE_ACTOR ; } file -> Seek ( 0 ) ; if ( CheckIfIsValidMotionFile ( file , & endianType ) ) { file -> Close ( ) ; return FILETYPE_MOTION ; } file -> Seek ( 0 ) ; if ( CheckIfIsValidNodeMapFile ( file , & endianType ) ) { file -> Close ( ) ; return FILETYPE_NODEMAP ; } file -> Close ( ) ; return FILETYPE_UNKNOWN ; }
loads the given file and checks if it is an actor or a motion
loads the given file and checks if it is an actor or a motion
// verify if this is a valid actor file or not // verify if this is a valid skeletal motion file or not // check for node map // close the file again