forked from jaildesigner-jailgames/jaildoctors_dilemma
Retocando las constantes
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
// Constructor
|
||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options)
|
||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options, int gameInternalResX, int gameInternalResY)
|
||||
{
|
||||
// Inicializa variables
|
||||
this->window = window;
|
||||
this->renderer = renderer;
|
||||
this->options = options;
|
||||
|
||||
gameCanvasWidth = 256;
|
||||
gameCanvasHeight = 192;
|
||||
gameCanvasWidth = gameInternalResX;
|
||||
gameCanvasHeight = gameInternalResY;
|
||||
|
||||
// Establece el modo de video
|
||||
setVideoMode(options->fullScreenMode);
|
||||
@@ -24,6 +24,14 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options)
|
||||
gameCanvas = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, gameCanvasWidth, gameCanvasHeight);
|
||||
if (gameCanvas == NULL)
|
||||
printf("TitleSurface could not be created!\nSDL Error: %s\n", SDL_GetError());
|
||||
|
||||
// Calcula los anclajes
|
||||
anchor.left = 0;
|
||||
anchor.right = gameCanvasWidth;
|
||||
anchor.center = gameCanvasWidth / 2;
|
||||
anchor.top = 0;
|
||||
anchor.bottom = gameCanvasHeight;
|
||||
anchor.middle = gameCanvasHeight / 2;
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
||||
Reference in New Issue
Block a user