forked from jaildesigner-jailgames/jaildoctors_dilemma
Resuelto bug al cambiar de paleta con los tiles animados
This commit is contained in:
@@ -138,17 +138,6 @@ void Credits::fillTexture()
|
||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
|
||||
//texts.push_back({"KEYS:", stringToColor(options->palette, "yellow")});
|
||||
//texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"USE 'CURSORS' TO MOVE AND JUMP", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"'F1-F4' TO CHANGE WINDOWS SIZE", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"'F' TO SWITCH TO FULLSCREEN", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"'B' TO SWITCH THE BORDER SCREEN", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"'M' TO TURN ON/OFF THE MUSIC", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"'ESC' TO LEAVE THE GAME", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
//texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
|
||||
texts.push_back({"KEYS:", stringToColor(options->palette, "yellow")});
|
||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
||||
texts.push_back({"CURSORS: MOVE AND JUMP", stringToColor(options->palette, "white")});
|
||||
|
||||
@@ -265,6 +265,7 @@ void Director::loadResources(section_t section)
|
||||
textureList.push_back("arounders_machine.png");
|
||||
textureList.push_back("bat.png");
|
||||
textureList.push_back("batman_bell.png");
|
||||
textureList.push_back("batman_fire.png");
|
||||
textureList.push_back("batman.png");
|
||||
textureList.push_back("bell.png");
|
||||
textureList.push_back("bin.png");
|
||||
@@ -326,6 +327,7 @@ void Director::loadResources(section_t section)
|
||||
animationList.push_back("arounders_machine.ani");
|
||||
animationList.push_back("bat.ani");
|
||||
animationList.push_back("batman_bell.ani");
|
||||
animationList.push_back("batman_fire.ani");
|
||||
animationList.push_back("batman.ani");
|
||||
animationList.push_back("bell.ani");
|
||||
animationList.push_back("bin.ani");
|
||||
@@ -837,10 +839,10 @@ bool Director::setFileList()
|
||||
asset->add("/data/tilesets/standard_zxarne.png", t_bitmap);
|
||||
|
||||
// Enemigos
|
||||
asset->add("/data/enemies/abad.ani", t_data);
|
||||
asset->add("/data/enemies/abad.png", t_bitmap);
|
||||
asset->add("/data/enemies/abad_bell.ani", t_data);
|
||||
asset->add("/data/enemies/abad_bell.png", t_bitmap);
|
||||
asset->add("/data/enemies/abad.ani", t_data);
|
||||
asset->add("/data/enemies/abad.png", t_bitmap);
|
||||
asset->add("/data/enemies/amstrad_character_set.ani", t_data);
|
||||
asset->add("/data/enemies/amstrad_character_set.png", t_bitmap);
|
||||
asset->add("/data/enemies/arounder_fly.ani", t_data);
|
||||
@@ -857,6 +859,8 @@ bool Director::setFileList()
|
||||
asset->add("/data/enemies/bat.png", t_bitmap);
|
||||
asset->add("/data/enemies/batman_bell.ani", t_data);
|
||||
asset->add("/data/enemies/batman_bell.png", t_bitmap);
|
||||
asset->add("/data/enemies/batman_fire.ani", t_data);
|
||||
asset->add("/data/enemies/batman_fire.png", t_bitmap);
|
||||
asset->add("/data/enemies/batman.ani", t_data);
|
||||
asset->add("/data/enemies/batman.png", t_bitmap);
|
||||
asset->add("/data/enemies/bell.ani", t_data);
|
||||
|
||||
@@ -20,9 +20,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
|
||||
// ****
|
||||
// this->debug->setEnabled(true);
|
||||
currentRoom = "25.room";
|
||||
const int x = 30;
|
||||
const int y = 7;
|
||||
currentRoom = "46.room";
|
||||
const int x = 0;
|
||||
const int y = 6;
|
||||
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
|
||||
// ****
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ void Player::move()
|
||||
}
|
||||
|
||||
// Si está bajando la rampa, recoloca al jugador
|
||||
if (isOnDownSlope())
|
||||
if (isOnDownSlope() && state != s_jumping)
|
||||
{
|
||||
y += 1;
|
||||
}
|
||||
@@ -418,7 +418,7 @@ void Player::move()
|
||||
}
|
||||
|
||||
// Si está bajando la rampa, recoloca al jugador
|
||||
if (isOnDownSlope())
|
||||
if (isOnDownSlope() && state != s_jumping)
|
||||
{
|
||||
y += 1;
|
||||
}
|
||||
|
||||
@@ -816,13 +816,12 @@ void Room::reLoadPalette()
|
||||
screen->setBorderColor(stringToColor(options->palette, borderColor));
|
||||
|
||||
// Cambia la textura
|
||||
if (options->palette == p_zxspectrum)
|
||||
texture = (options->palette == p_zxspectrum) ? textureA : textureB;
|
||||
|
||||
// Pone la nueva textura a los tiles animados
|
||||
for (auto tile : aTile)
|
||||
{
|
||||
texture = textureA;
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = textureB;
|
||||
tile.sprite->setTexture(texture);
|
||||
}
|
||||
|
||||
// Recarga las texturas
|
||||
|
||||
Reference in New Issue
Block a user