#include "crt.h" #include #include "jinput.h" void update() { SDL_Event e; while(SDL_PollEvent(&e)) { if (e.type==SDL_QUIT) { exit(0); } if (e.type==SDL_KEYDOWN) { if (input::getKey() == SDL_SCANCODE_UNKNOWN) input::updateKey(e.key.keysym.scancode); } if (e.type==SDL_KEYUP) { if (input::getKey() == e.key.keysym.scancode) input::updateKey(SDL_SCANCODE_UNKNOWN); } } } uint8_t get_hours() { time_t t; struct tm *tm; time (&t); tm = localtime (&t); return tm->tm_hour; }