/*---------------------------------------------------------------------------* Project: NintendoWare File: snd_AnimSoundFileReader.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: $ *---------------------------------------------------------------------------*/ #ifndef NW_SND_ANIM_SOUND_FILE_READER_H_ #define NW_SND_ANIM_SOUND_FILE_READER_H_ #include namespace nw { namespace snd { namespace internal { class AnimSoundFileReader { public: static bool IsValidFileHeader( const void* bcasdFile ); AnimSoundFileReader(); bool Initialize( const void* bcasdFile ); void Finalize(); bool IsAvailable() const { return m_pAnimEventTable != NULL; } u32 GetFrameSize() const { if ( IsAvailable() ) { return m_FrameSize; } return 0; } u32 GetEventCount() const { if ( IsAvailable() ) { return m_pAnimEventTable->count; } return 0; } const AnimSoundFile::AnimEvent* GetAnimEvent( u32 eventIndex ) const { if ( IsAvailable() ) { if ( eventIndex >= m_FrameSize ) { return NULL; } return &m_pAnimEventTable->item[eventIndex]; } return NULL; } private: const AnimSoundFile::AnimEventTable* m_pAnimEventTable; u32 m_FrameSize; }; } // namespace nw::snd::internal } // namespace nw::snd } // namespace nw #endif /* NW_SND_ANIM_SOUND_FILE_READER_H_ */