- Jo que se, moltes coses

This commit is contained in:
2024-01-29 06:59:46 +01:00
parent a690619865
commit 3832fdf5e4
13 changed files with 1068 additions and 399 deletions

20
crt.cpp
View File

@@ -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()
{