- Treballant en algo de UI
This commit is contained in:
@@ -16,7 +16,7 @@ namespace game
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
game::init();
|
||||
input::init();
|
||||
input::init(draw::getZoom());
|
||||
|
||||
static unsigned int current_ticks = SDL_GetTicks();
|
||||
|
||||
@@ -35,6 +35,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
input::updateKeypressed(e.key.keysym.scancode);
|
||||
}
|
||||
if (e.type==SDL_MOUSEBUTTONUP)
|
||||
{
|
||||
input::updateClk(e.button.button);
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_GetTicks()-current_ticks >= game::ticks_per_frame)
|
||||
@@ -42,6 +46,7 @@ int main(int argc, char *argv[])
|
||||
if (!game::loop()) should_exit = true;
|
||||
input::updateKey(SDL_SCANCODE_UNKNOWN);
|
||||
input::updateKeypressed(SDL_SCANCODE_UNKNOWN);
|
||||
input::updateClk(0);
|
||||
current_ticks = SDL_GetTicks();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user