00001
#ifndef STEPSUTIL_H
00002
#define STEPSUTIL_H
00003
00004
#include "GameConstantsAndTypes.h"
00005
#include "Difficulty.h"
00006
00007
class Steps;
00008
class Song;
00009
class Profile;
00010
struct XNode;
00011
00012 namespace StepsUtil
00013 {
00014
bool CompareNotesPointersByRadarValues(
const Steps* pSteps1,
const Steps* pSteps2);
00015
bool CompareNotesPointersByMeter(
const Steps *pSteps1,
const Steps* pSteps2);
00016
bool CompareNotesPointersByDifficulty(
const Steps *pSteps1,
const Steps *pSteps2);
00017
void SortNotesArrayByDifficulty( vector<Steps*> &arrayNotess );
00018
bool CompareStepsPointersByTypeAndDifficulty(
const Steps *pStep1,
const Steps *pStep2);
00019
void SortStepsByTypeAndDifficulty( vector<Steps*> &arraySongPointers );
00020
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers,
ProfileSlot slot,
bool bDescending );
00021
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers,
const Profile* pProfile,
bool bDescending );
00022 };
00023
00024 class StepsID
00025 {
00026 StepsType st;
00027 Difficulty dc;
00028 CString sDescription;
00029 unsigned uHash;
00030
00031
public:
00032 StepsID() {
Unset(); }
00033 void Unset() {
FromSteps(NULL); }
00034
void FromSteps(
const Steps *p );
00035
Steps *ToSteps(
const Song *p,
bool bAllowNull,
bool bUseCache =
true )
const;
00036
bool operator<(
const StepsID &rhs )
const;
00037 bool MatchesStepsType( StepsType s )
const {
return st == s; }
00038
00039
XNode*
CreateNode() const;
00040
void LoadFromNode( const
XNode* pNode );
00041 CString ToString() const;
00042
bool IsValid() const;
00043 static
void ClearCache();
00044 };
00045
00046 #endif
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071