Ja dibuixa la tarjeta amb la ajuda per als botons de servei
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
#include "screen.h"
|
||||
#include <SDL2/SDL_events.h> // for SDL_DISABLE, SDL_ENABLE
|
||||
#include <SDL2/SDL_mouse.h> // for SDL_ShowCursor
|
||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include <algorithm> // for max, min
|
||||
#include <fstream> // for basic_ifstream, ifstream
|
||||
#include <iterator> // for istreambuf_iterator, operator!=
|
||||
#include <string> // for basic_string, operator+, to_string, cha...
|
||||
#include "asset.h" // for Asset
|
||||
#include "dbgtxt.h" // for dbg_print
|
||||
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "notify.h" // for Notify
|
||||
#include "options.h" // for options
|
||||
#include <SDL2/SDL_events.h> // for SDL_DISABLE, SDL_ENABLE
|
||||
#include <SDL2/SDL_mouse.h> // for SDL_ShowCursor
|
||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include <algorithm> // for max, min
|
||||
#include <fstream> // for basic_ifstream, ifstream
|
||||
#include <iterator> // for istreambuf_iterator, operator!=
|
||||
#include <string> // for basic_string, operator+, to_string, cha...
|
||||
#include "asset.h" // for Asset
|
||||
#include "dbgtxt.h" // for dbg_print
|
||||
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "notify.h" // for Notify
|
||||
#include "options.h" // for options
|
||||
#include "on_screen_help.h"
|
||||
|
||||
#ifndef NO_SHADERS
|
||||
#include "jail_shader.h" // for init, render
|
||||
#include "jail_shader.h" // for init, render
|
||||
#endif
|
||||
|
||||
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
|
||||
@@ -39,11 +40,9 @@ Screen *Screen::get()
|
||||
}
|
||||
|
||||
// Constructor
|
||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
|
||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer) : window(window), renderer(renderer)
|
||||
{
|
||||
// Copia punteros
|
||||
this->window = window;
|
||||
this->renderer = renderer;
|
||||
input = Input::get();
|
||||
asset = Asset::get();
|
||||
|
||||
@@ -68,7 +67,7 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
|
||||
fpsCounter = 0;
|
||||
fps = 0;
|
||||
#ifdef DEBUG
|
||||
showInfo = true;
|
||||
showInfo = false;
|
||||
#else
|
||||
showInfo = false;
|
||||
#endif
|
||||
@@ -115,14 +114,17 @@ void Screen::start()
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
void Screen::blit()
|
||||
{
|
||||
// Actualiza el contador de FPS
|
||||
fpsCounter++;
|
||||
|
||||
// Actualiza y dibuja el efecto de flash en la pantalla
|
||||
doFlash();
|
||||
|
||||
// Atenua la pantalla
|
||||
doAttenuate();
|
||||
|
||||
// Actualiza el contador de FPS
|
||||
fpsCounter++;
|
||||
// Muestra la ayuda por pantalla
|
||||
OnScreenHelp::get()->render();
|
||||
|
||||
// Muestra información por pantalla
|
||||
displayInfo();
|
||||
|
||||
Reference in New Issue
Block a user