- [NEW] jshader (shader fan cosa rara en fullscreen)
- [NEW] jfile convertit - [NEW] jinput te en compte el ratio per a les coordenades en pantalla (falla en fullscreen, falta afegir offset) - [NEW] F1 escala avall la finestra - [NEW] F2 escala amunt la finestra - [NEW] F3 togglecha la pantalla completa - [NEW] F4 togglecha el shader
This commit is contained in:
@@ -9,12 +9,10 @@ namespace input
|
||||
static uint8_t keydown = 0;
|
||||
static uint8_t btnClicked = 0;
|
||||
static int wheel = 0;
|
||||
static int screen_zoom = 1;
|
||||
|
||||
void init(const int zoom)
|
||||
void init()
|
||||
{
|
||||
keys = SDL_GetKeyboardState(NULL);
|
||||
screen_zoom = zoom;
|
||||
}
|
||||
|
||||
// Determina si la tecla especificada està sent polsada ara mateix
|
||||
@@ -81,7 +79,7 @@ namespace input
|
||||
{
|
||||
float x;
|
||||
SDL_GetMouseState(&x, NULL);
|
||||
return x/screen_zoom;
|
||||
return x/draw::getScaleX();
|
||||
}
|
||||
|
||||
// Torna la posició Y actual del ratolí
|
||||
@@ -89,7 +87,7 @@ namespace input
|
||||
{
|
||||
float y;
|
||||
SDL_GetMouseState(NULL, &y);
|
||||
return y/screen_zoom;
|
||||
return y/draw::getScaleY();
|
||||
}
|
||||
|
||||
// Determina si el botó del ratolí especificat està sent polsada ara mateix
|
||||
|
||||
Reference in New Issue
Block a user