Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

NotesLoaderBMS.h

Go to the documentation of this file.
00001 #ifndef NOTES_LOADER_BMS_H 00002 #define NOTES_LOADER_BMS_H 00003 00004 #include "NotesLoader.h" 00005 #include <map> 00006 00007 class Song; 00008 class Steps; 00009 00010 class BMSLoader: public NotesLoader 00011 { 00012 void SlideDuplicateDifficulties( Song &p ); 00013 00014 typedef multimap<CString, CString> NameToData_t; 00015 bool ReadBMSFile( const CString &sPath, BMSLoader::NameToData_t &mapNameToData ); 00016 bool LoadFromBMSFile( const CString &sPath, const NameToData_t &mapNameToData, Steps &out1 ); 00017 void ReadGlobalTags( const NameToData_t &mapNameToData, Song &out ); 00018 static bool GetTagFromMap( const BMSLoader::NameToData_t &mapNameToData, const CString &sName, CString &sOut ); 00019 static bool GetCommonTagFromMapList( const vector<NameToData_t> &aBMSData, const CString &sName, CString &out ); 00020 void SearchForDifficulty( CString sTag, Steps *pOut ); 00021 00022 typedef map<int, float> MeasureToTimeSig_t; 00023 void ReadTimeSigs( const NameToData_t &mapNameToData, MeasureToTimeSig_t &out ); 00024 float GetBeatsPerMeasure( const MeasureToTimeSig_t &sigs, int iMeasure ); 00025 int GetMeasureStartRow( const MeasureToTimeSig_t &sigs, int iMeasureNo ); 00026 void SetTimeSigAdjustments( const MeasureToTimeSig_t &sigs, Song *pOut ); 00027 MeasureToTimeSig_t m_TimeSigAdjustments; 00028 00029 CString m_sDir; 00030 map<CString,int> m_mapWavIdToKeysoundIndex; 00031 00032 public: 00033 void GetApplicableFiles( CString sPath, CStringArray &out ); 00034 bool LoadFromDir( CString sDir, Song &out ); 00035 }; 00036 00037 #endif 00038 00039 /* 00040 * (c) 2001-2003 Chris Danford 00041 * All rights reserved. 00042 * 00043 * Permission is hereby granted, free of charge, to any person obtaining a 00044 * copy of this software and associated documentation files (the 00045 * "Software"), to deal in the Software without restriction, including 00046 * without limitation the rights to use, copy, modify, merge, publish, 00047 * distribute, and/or sell copies of the Software, and to permit persons to 00048 * whom the Software is furnished to do so, provided that the above 00049 * copyright notice(s) and this permission notice appear in all copies of 00050 * the Software and that both the above copyright notice(s) and this 00051 * permission notice appear in supporting documentation. 00052 * 00053 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00054 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00055 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00056 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00057 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00058 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00059 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00060 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00061 * PERFORMANCE OF THIS SOFTWARE. 00062 */

Generated on Thu Jan 27 20:57:26 2005 for StepMania by doxygen 1.3.7