- Jo que se, moltes coses
This commit is contained in:
20
crt.cpp
20
crt.cpp
@@ -1,5 +1,25 @@
|
||||
#include "crt.h"
|
||||
#include <time.h>
|
||||
#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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user