2002-11-16 08:07:38 +00:00
|
|
|
#ifndef CODEDETECTOR_H
|
|
|
|
|
#define CODEDETECTOR_H
|
2002-09-03 00:22:12 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: CodeDetector
|
|
|
|
|
|
|
|
|
|
Desc: Uses InputQueue to detect input of codes that would affect player and song options.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "GameInput.h"
|
|
|
|
|
|
2004-01-25 02:29:18 +00:00
|
|
|
struct CodeItem
|
|
|
|
|
{
|
|
|
|
|
public:
|
2004-01-25 15:45:50 +00:00
|
|
|
bool Load( CString sButtonsNames );
|
2004-01-25 02:29:18 +00:00
|
|
|
bool EnteredCode( GameController controller ) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
vector<GameButton> buttons;
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
|
|
|
|
sequence, // press the buttons in sequence
|
|
|
|
|
hold_and_press, // hold the first iNumButtons-1 buttons, then press the last
|
|
|
|
|
tap // press all buttons simultaneously
|
|
|
|
|
};
|
|
|
|
|
Type m_Type;
|
|
|
|
|
float fMaxSecondsBack;
|
|
|
|
|
};
|
|
|
|
|
|
2002-09-03 00:22:12 +00:00
|
|
|
class CodeDetector
|
|
|
|
|
{
|
|
|
|
|
public:
|
2003-04-13 04:50:08 +00:00
|
|
|
enum Code {
|
|
|
|
|
CODE_EASIER1,
|
|
|
|
|
CODE_EASIER2,
|
|
|
|
|
CODE_HARDER1,
|
|
|
|
|
CODE_HARDER2,
|
|
|
|
|
CODE_NEXT_SORT1,
|
|
|
|
|
CODE_NEXT_SORT2,
|
2003-12-06 00:32:42 +00:00
|
|
|
CODE_NEXT_SORT3,
|
|
|
|
|
CODE_NEXT_SORT4,
|
2004-01-11 08:15:44 +00:00
|
|
|
CODE_SORT_MENU1,
|
|
|
|
|
CODE_SORT_MENU2,
|
|
|
|
|
CODE_MODE_MENU1,
|
|
|
|
|
CODE_MODE_MENU2,
|
2003-04-13 04:50:08 +00:00
|
|
|
CODE_MIRROR,
|
|
|
|
|
CODE_LEFT,
|
|
|
|
|
CODE_RIGHT,
|
|
|
|
|
CODE_SHUFFLE,
|
|
|
|
|
CODE_SUPER_SHUFFLE,
|
|
|
|
|
CODE_NEXT_TRANSFORM,
|
|
|
|
|
CODE_NEXT_SCROLL_SPEED,
|
|
|
|
|
CODE_PREVIOUS_SCROLL_SPEED,
|
|
|
|
|
CODE_NEXT_ACCEL,
|
|
|
|
|
CODE_NEXT_EFFECT,
|
|
|
|
|
CODE_NEXT_APPEARANCE,
|
|
|
|
|
CODE_NEXT_TURN,
|
|
|
|
|
CODE_REVERSE,
|
|
|
|
|
CODE_HOLDS,
|
2003-11-07 07:25:52 +00:00
|
|
|
CODE_MINES,
|
2003-04-13 04:50:08 +00:00
|
|
|
CODE_DARK,
|
2003-05-04 13:58:45 +00:00
|
|
|
CODE_HIDDEN,
|
|
|
|
|
CODE_RANDOMVANISH,
|
2003-04-13 04:50:08 +00:00
|
|
|
CODE_CANCEL_ALL,
|
|
|
|
|
CODE_NEXT_THEME,
|
2003-09-25 02:16:37 +00:00
|
|
|
CODE_NEXT_THEME2,
|
2003-04-13 04:50:08 +00:00
|
|
|
CODE_NEXT_ANNOUNCER,
|
2003-09-25 02:16:37 +00:00
|
|
|
CODE_NEXT_ANNOUNCER2,
|
|
|
|
|
CODE_NEXT_GAME,
|
|
|
|
|
CODE_NEXT_GAME2,
|
2003-09-07 22:03:23 +00:00
|
|
|
CODE_BW_NEXT_GROUP,
|
|
|
|
|
CODE_BW_NEXT_GROUP2,
|
2004-02-12 09:44:16 +00:00
|
|
|
CODE_SAVE_SCREENSHOT,
|
2004-02-23 07:44:57 +00:00
|
|
|
CODE_CANCEL_ALL_PLAYER_OPTIONS,
|
2003-04-13 04:50:08 +00:00
|
|
|
NUM_CODES // leave this at the end
|
|
|
|
|
};
|
|
|
|
|
|
2002-09-03 00:22:12 +00:00
|
|
|
static void RefreshCacheItems(); // call this before checking codes, but call infrequently
|
|
|
|
|
static bool EnteredEasierDifficulty( GameController controller );
|
|
|
|
|
static bool EnteredHarderDifficulty( GameController controller );
|
|
|
|
|
static bool EnteredNextSort( GameController controller );
|
2004-01-11 08:15:44 +00:00
|
|
|
static bool EnteredSortMenu( GameController controller );
|
|
|
|
|
static bool EnteredModeMenu( GameController controller );
|
2003-04-13 04:50:08 +00:00
|
|
|
static bool DetectAndAdjustMusicOptions( GameController controller );
|
|
|
|
|
static bool EnteredCode( GameController controller, Code code );
|
2003-09-07 22:03:23 +00:00
|
|
|
static bool EnteredNextBannerGroup( GameController controller );
|
2002-09-03 00:22:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|