InputQueue.h
Go to the documentation of this file.00001
00002
00003
#ifndef INPUTQUEUE_H
00004
#define INPUTQUEUE_H
00005
00006
#include "GameConstantsAndTypes.h"
00007
#include "GameInput.h"
00008
#include "MenuInput.h"
00009
00010 const unsigned MAX_INPUT_QUEUE_LENGTH = 16;
00011
00012 class InputQueue
00013 {
00014
public:
00015
InputQueue();
00016
00017
void RememberInput(
GameInput );
00018
bool MatchesSequence(
GameController c,
const GameButton* button_sequence,
int iNumButtons,
float fMaxSecondsBack );
00019
bool MatchesSequence(
GameController c,
const MenuButton* button_sequence,
int iNumButtons,
float fMaxSecondsBack );
00020
bool AllWerePressedRecently(
GameController c,
const GameButton* buttons,
int iNumButtons,
float fMaxSecondsBack );
00021
00022
protected:
00023 struct GameButtonAndTime
00024 {
00025 GameButtonAndTime() {}
00026 GameButtonAndTime( GameButton b,
float t ) {
button = b;
fTime = t; };
00027 GameButton button;
00028 float fTime;
00029 };
00030 vector<GameButtonAndTime>
m_aQueue[
MAX_GAME_CONTROLLERS];
00031 };
00032
00033
00034 extern InputQueue*
INPUTQUEUE;
00035
00036
#endif
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
Generated on Thu Jan 27 20:57:22 2005 for StepMania by
1.3.7