forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en la recarga de texturas
This commit is contained in:
@@ -14,11 +14,11 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
|
||||
eventHandler = new SDL_Event();
|
||||
if (options->palette == p_zxspectrum)
|
||||
{
|
||||
texture =resource->getTexture("loading_screen_color.png");
|
||||
texture = resource->getTexture("loading_screen_color.png");
|
||||
}
|
||||
else if (options->palette == p_zxarne)
|
||||
{
|
||||
texture =resource->getTexture("loading_screen_color_zxarne.png");
|
||||
texture = resource->getTexture("loading_screen_color_zxarne.png");
|
||||
}
|
||||
sprite = new Sprite(0, 0, texture->getWidth(), texture->getHeight(), texture, renderer);
|
||||
text = new Text(asset->get("smb2.png"), asset->get("smb2.txt"), renderer);
|
||||
@@ -107,7 +107,7 @@ void Title::checkEventHandler()
|
||||
|
||||
case SDL_SCANCODE_F5:
|
||||
switchPalette();
|
||||
reLoadTextures();
|
||||
// reLoadTextures();
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -247,12 +247,19 @@ void Title::switchPalette()
|
||||
if (options->palette == p_zxspectrum)
|
||||
{
|
||||
options->palette = p_zxarne;
|
||||
texture = resource->getTexture("loading_screen_color_zxarne.png");
|
||||
sprite->setTexture(texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
options->palette = p_zxspectrum;
|
||||
texture = resource->getTexture("loading_screen_color.png");
|
||||
sprite->setTexture(texture);
|
||||
}
|
||||
|
||||
// resource->reLoadTextures();
|
||||
// reLoadTextures();
|
||||
|
||||
// Cambia el color del borde
|
||||
screen->setBorderColor(stringToColor(options->palette, "bright_blue"));
|
||||
}
|
||||
Reference in New Issue
Block a user