2004-04-18 08:05:18 +00:00
|
|
|
#ifndef STEPSUTIL_H
|
|
|
|
|
#define STEPSUTIL_H
|
|
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: StepsUtil
|
|
|
|
|
|
|
|
|
|
Desc: Holds note information for a Song. A Song may have one or more Notess.
|
|
|
|
|
A Steps can be played by one or more Styles. See StyleDef.h for more info on
|
|
|
|
|
Styles.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "GameConstantsAndTypes.h"
|
|
|
|
|
|
|
|
|
|
class Steps;
|
|
|
|
|
class Song;
|
|
|
|
|
class Profile;
|
2004-04-18 18:42:42 +00:00
|
|
|
struct XNode;
|
2004-04-18 08:05:18 +00:00
|
|
|
|
|
|
|
|
namespace StepsUtil
|
|
|
|
|
{
|
2004-05-24 03:41:39 +00:00
|
|
|
bool CompareNotesPointersByRadarValues(const Steps* pSteps1, const Steps* pSteps2);
|
|
|
|
|
bool CompareNotesPointersByMeter(const Steps *pSteps1, const Steps* pSteps2);
|
|
|
|
|
bool CompareNotesPointersByDifficulty(const Steps *pSteps1, const Steps *pSteps2);
|
2004-04-18 08:05:18 +00:00
|
|
|
void SortNotesArrayByDifficulty( vector<Steps*> &arrayNotess );
|
|
|
|
|
bool CompareStepsPointersByTypeAndDifficulty(const Steps *pStep1, const Steps *pStep2);
|
|
|
|
|
void SortStepsByTypeAndDifficulty( vector<Steps*> &arraySongPointers );
|
|
|
|
|
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers, ProfileSlot slot, bool bDescending );
|
|
|
|
|
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers, const Profile* pProfile, bool bDescending );
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class StepsID
|
|
|
|
|
{
|
|
|
|
|
StepsType st;
|
|
|
|
|
Difficulty dc;
|
|
|
|
|
CString sDescription;
|
2004-04-23 00:53:29 +00:00
|
|
|
unsigned uHash;
|
2004-04-18 08:05:18 +00:00
|
|
|
|
|
|
|
|
public:
|
2004-04-22 07:59:42 +00:00
|
|
|
StepsID() { Unset(); }
|
|
|
|
|
void Unset() { FromSteps(NULL); }
|
2004-04-18 08:05:18 +00:00
|
|
|
void FromSteps( const Steps *p );
|
|
|
|
|
Steps *ToSteps( const Song *p, bool bAllowNull ) const;
|
2004-04-26 00:08:51 +00:00
|
|
|
bool operator<( const StepsID &rhs ) const;
|
2004-05-02 00:06:55 +00:00
|
|
|
bool MatchesStepsType( StepsType s ) const { return st == s; }
|
2004-04-18 18:42:42 +00:00
|
|
|
|
|
|
|
|
XNode* CreateNode() const;
|
|
|
|
|
void LoadFromNode( const XNode* pNode );
|
2004-05-08 10:12:10 +00:00
|
|
|
CString ToString() const;
|
2004-04-18 18:42:42 +00:00
|
|
|
bool IsValid() const;
|
2004-05-21 05:08:04 +00:00
|
|
|
static void FlushCache();
|
2004-04-18 08:05:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|