1 /* CodeDetector - Uses InputQueue to detect input of codes. */
3 #ifndef CODE_DETECTOR_H
4 #define CODE_DETECTOR_H
25 CODE_NEXT_SCROLL_SPEED
,
26 CODE_PREVIOUS_SCROLL_SPEED
,
46 CODE_SAVE_SCREENSHOT1
,
47 CODE_SAVE_SCREENSHOT2
,
48 CODE_CANCEL_ALL_PLAYER_OPTIONS
,
49 CODE_BACK_IN_EVENT_MODE
,
50 CODE_OPTIONS_LIST_OPEN1
,
51 CODE_OPTIONS_LIST_OPEN2
,
52 CODE_LINKED_MENU_SWITCH1
,
53 CODE_LINKED_MENU_SWITCH2
,
54 NUM_CODES
// leave this at the end
56 #define FOREACH_Code( c ) FOREACH_ENUM( Code, NUM_CODES, c )
61 bool Load( CString sButtonsNames
);
62 bool EnteredCode( GameController controller
) const;
65 vector
<GameButton
> buttons
;
68 sequence
, // press the buttons in sequence
69 hold_and_press
, // hold the first iNumButtons-1 buttons, then press the last
70 tap
// press all buttons simultaneously
73 float fMaxSecondsBack
;
79 static void RefreshCacheItems( CString sClass
="" ); // call this before checking codes, but call infrequently
80 static bool EnteredEasierDifficulty( GameController controller
);
81 static bool EnteredHarderDifficulty( GameController controller
);
82 static bool EnteredNextSort( GameController controller
);
83 static bool EnteredModeMenu( GameController controller
);
84 static bool DetectAndAdjustMusicOptions( GameController controller
);
85 static bool EnteredCode( GameController controller
, Code code
);
86 static bool EnteredNextBannerGroup( GameController controller
);
92 * (c) 2001-2004 Chris Danford
93 * All rights reserved.
95 * Permission is hereby granted, free of charge, to any person obtaining a
96 * copy of this software and associated documentation files (the
97 * "Software"), to deal in the Software without restriction, including
98 * without limitation the rights to use, copy, modify, merge, publish,
99 * distribute, and/or sell copies of the Software, and to permit persons to
100 * whom the Software is furnished to do so, provided that the above
101 * copyright notice(s) and this permission notice appear in all copies of
102 * the Software and that both the above copyright notice(s) and this
103 * permission notice appear in supporting documentation.
105 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
106 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
107 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
108 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
109 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
110 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
111 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
112 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
113 * PERFORMANCE OF THIS SOFTWARE.