mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 16:59:06 +00:00
XEEN: Simplify showPharaohEndText method to use const char *
This commit is contained in:
parent
b5df2f8ec7
commit
d5deec56c8
@ -1203,7 +1203,7 @@ void DarkSideCutscenes::showDarkSideScore(uint endingScore) {
|
||||
saves.saveGame();
|
||||
}
|
||||
|
||||
void DarkSideCutscenes::showPharaohEndText(const Common::String &msg1, const Common::String &msg2, const Common::String &msg3) {
|
||||
void DarkSideCutscenes::showPharaohEndText(const char *msg1, const char *msg2, const char *msg3) {
|
||||
const int YLIST[32] = {
|
||||
-3, -3, -3, -3, -3, -3, -3, -3, -1, 0, 0, 0, 0, 0, 0, 0,
|
||||
-1, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3
|
||||
@ -1225,12 +1225,8 @@ void DarkSideCutscenes::showPharaohEndText(const Common::String &msg1, const Com
|
||||
Windows &windows = *_vm->_windows;
|
||||
SpriteResource claw("claw.int");
|
||||
SpriteResource dragon1("dragon1.int");
|
||||
int numPages = 0 + (msg1.empty() ? 0 : 1) + (msg2.empty() ? 0 : 1) + (msg3.empty() ? 0 : 1);
|
||||
const char *const text[3] = {
|
||||
msg1.empty() ? nullptr : msg1.c_str(),
|
||||
msg2.empty() ? nullptr : msg2.c_str(),
|
||||
msg3.empty() ? nullptr : msg3.c_str()
|
||||
};
|
||||
int numPages = 0 + (msg1 ? 1 : 0) + (msg2 ? 1 : 0) + (msg3 ? 1 : 0);
|
||||
const char *const text[3] = { msg1, msg2, msg3 };
|
||||
|
||||
screen.loadBackground("3room.raw");
|
||||
screen.saveBackground();
|
||||
|
@ -61,13 +61,7 @@ protected:
|
||||
/**
|
||||
* Shows the Pharaoh ending screen where score text is shown
|
||||
*/
|
||||
void showPharaohEndText(const Common::String &msg1, const Common::String &msg2, const Common::String &msg3);
|
||||
void showPharaohEndText(const Common::String &msg1) {
|
||||
showPharaohEndText(msg1, "", "");
|
||||
}
|
||||
void showPharaohEndText(const Common::String &msg1, const Common::String &msg2) {
|
||||
showPharaohEndText(msg1, msg2, "");
|
||||
}
|
||||
void showPharaohEndText(const char *msg1, const char *msg2 = nullptr, const char *msg3 = nullptr);
|
||||
public:
|
||||
DarkSideCutscenes(XeenEngine *vm) : Cutscenes(vm) {}
|
||||
|
||||
|
@ -51,7 +51,7 @@ void WorldOfXeenCutscenes::worldEnding1() {
|
||||
|
||||
files.setGameCc(0);
|
||||
sound.playSong("outday3.m");
|
||||
showPharaohEndText(Res.WORLD_END_TEXT[0], nullptr, nullptr);
|
||||
showPharaohEndText(Res.WORLD_END_TEXT[0]);
|
||||
sound.playSound("elect.voc", 1, 0);
|
||||
|
||||
screen.loadBackground("skymain.raw");
|
||||
|
Loading…
Reference in New Issue
Block a user