O_o
Your "stage" is incredibly narrow. An array/list of layers to be drawn in any order is barely more complicated, yet such a form is far more versatile.
Code:
State * sStage = new Stage(/**/);
// ...
Layer * sLayer = sState->createCompatibleLayer();
// ...
sLayer->drawStuff(); // `sStage' draws every layer on "flip"
Your "inputhandle" seems a pointless form of packing multiple events into a single frame to be later queried. You can pack a series of events which logically group Boolean values into a set over a specified slice of time with transforms provided by the client.
Code:
Whatever sCodes = [/* ordered code representing virtual keys */];
Whatever sKeys = ['w', 'a', 's', 'd'];
InputHandler * sKeyboard = new InputHandler(/**/);
// ...
sKeyboard->filter(sCodes, sKeys, 4);
// ...
InputHandlerWrapper sKeysDown(sKeyboard, KEYS_DOWN);
//
while(sPlayingGame)
{
if(InputHandlerWrapper['w']) // ...
if(InputHandlerWrapper['a']) // ...
if(InputHandlerWrapper['s']) // ...
if(InputHandlerWrapper['d']) // ...
}
Soma