const int PAUSE = 0;enum EKeyConsts { KEY_UP = 1 << 0, KEY_DOWN = 1 << 1, KEY_LEFT = 1 << 2, KEY_RIGHT = 1 << 3,};struct SInput { SHORT x, y; //mouse movement UINT keys; //key states UINT time; //time for state if};class CReplay{public: std::vector< SInput > m_States;public: void playBack() { vector<SInput>::iterator state = m_States.begin(); for(; state!=m_States.end(); ++state) { sendKeys(state); } } void sendKeys(SInput *state) { if( state->keys == 0 ) { killTime(state->time); } if( state->keys & KEY_UP ) { doKey(KEY_UP, state->time); } if( /* etc etc */ ) {} }};
hope you get the idea