Preparado para empezar con el ending2

This commit is contained in:
2022-11-04 18:55:36 +01:00
parent d37b21fc3b
commit 6257c0b1e8
7 changed files with 272 additions and 4 deletions

View File

@@ -318,6 +318,21 @@ void Director::loadResources(section_t section)
resource->loadOffsets(offsetsList);
}
else if (section.name == SECTION_PROG_ENDING2)
{
// Texturas
std::vector<std::string> textureList;
textureList.push_back("smb2.png");
resource->loadTextures(textureList);
// Offsets
std::vector<std::string> offsetsList;
offsetsList.push_back("smb2.txt");
resource->loadOffsets(offsetsList);
}
else if (section.name == SECTION_PROG_GAME_OVER)
{
std::vector<std::string> textureList;
@@ -1218,6 +1233,20 @@ void Director::runEnding()
resource->free();
}
// Ejecuta la seccion del final del juego
void Director::runEnding2()
{
if (options->console)
{
std::cout << "\n* SECTION: ENDING2" << std::endl;
}
loadResources(section);
ending2 = new Ending2(renderer, screen, resource, asset, options);
setSection(ending2->run());
delete ending2;
resource->free();
}
// Ejecuta la seccion del final de la partida
void Director::runGameOver()
{
@@ -1285,6 +1314,10 @@ void Director::run()
case SECTION_PROG_ENDING:
runEnding();
break;
case SECTION_PROG_ENDING2:
runEnding2();
break;
}
}
}