forked from jaildesigner-jailgames/jaildoctors_dilemma
Transició a surface: barallantme amb tots els Color que hi ha pel codi
This commit is contained in:
@@ -26,7 +26,7 @@ Credits::Credits()
|
||||
shining_sprite_->setPos({194, 174, 8, 8});
|
||||
|
||||
// Cambia el color del borde
|
||||
Screen::get()->setBorderColor(stringToColor(options.video.palette, "black"));
|
||||
Screen::get()->setBorderColor(stringToColor("black"));
|
||||
|
||||
// Crea la textura para el texto que se escribe en pantalla
|
||||
text_surface_ = std::make_shared<Surface>(Screen::get()->getRenderSurfaceData(), options.game.width, options.game.height);
|
||||
@@ -76,62 +76,62 @@ void Credits::iniTexts()
|
||||
}
|
||||
|
||||
texts_.clear();
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"INSTRUCTIONS:", stringToColor(options.video.palette, "yellow")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"HELP JAILDOC TO GET BACK ALL", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"HIS PROJECTS AND GO TO THE", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"JAIL TO FINISH THEM", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({"INSTRUCTIONS:", stringToColor("yellow")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({"HELP JAILDOC TO GET BACK ALL", stringToColor("white")});
|
||||
texts_.push_back({"HIS PROJECTS AND GO TO THE", stringToColor("white")});
|
||||
texts_.push_back({"JAIL TO FINISH THEM", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
|
||||
texts_.push_back({"KEYS:", stringToColor(options.video.palette, "yellow")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({keys + " TO MOVE AND JUMP", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"M TO SWITCH THE MUSIC", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"H TO PAUSE THE GAME", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"F1-F2 TO CHANGE WINDOWS SIZE", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"F3 TO SWITCH TO FULLSCREEN", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"B TO TOOGLE THE BORDER SCREEN", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"KEYS:", stringToColor("yellow")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({keys + " TO MOVE AND JUMP", stringToColor("white")});
|
||||
texts_.push_back({"M TO SWITCH THE MUSIC", stringToColor("white")});
|
||||
texts_.push_back({"H TO PAUSE THE GAME", stringToColor("white")});
|
||||
texts_.push_back({"F1-F2 TO CHANGE WINDOWS SIZE", stringToColor("white")});
|
||||
texts_.push_back({"F3 TO SWITCH TO FULLSCREEN", stringToColor("white")});
|
||||
texts_.push_back({"B TO TOOGLE THE BORDER SCREEN", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
|
||||
texts_.push_back({"A GAME BY JAILDESIGNER", stringToColor(options.video.palette, "yellow")});
|
||||
texts_.push_back({"MADE ON SUMMER/FALL 2022", stringToColor(options.video.palette, "yellow")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"A GAME BY JAILDESIGNER", stringToColor("yellow")});
|
||||
texts_.push_back({"MADE ON SUMMER/FALL 2022", stringToColor("yellow")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
|
||||
texts_.push_back({"I LOVE JAILGAMES! ", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts_.push_back({"I LOVE JAILGAMES! ", stringToColor("white")});
|
||||
texts_.push_back({"", stringToColor("white")});
|
||||
#else
|
||||
texts.clear();
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"INSTRUCTIONS:", stringToColor(options.video.palette, "yellow")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"HELP JAILDOC TO GET BACK ALL", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"HIS PROJECTS AND GO TO THE", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"JAIL TO FINISH THEM", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"INSTRUCTIONS:", stringToColor("yellow")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"HELP JAILDOC TO GET BACK ALL", stringToColor("white")});
|
||||
texts.push_back({"HIS PROJECTS AND GO TO THE", stringToColor("white")});
|
||||
texts.push_back({"JAIL TO FINISH THEM", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
|
||||
texts.push_back({"KEYS:", stringToColor(options.video.palette, "yellow")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"B TO JUMP", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"R TO SWITCH THE MUSIC", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"L TO SWAP THE COLOR PALETTE", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"START TO PAUSE", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"SELECT TO EXIT", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"KEYS:", stringToColor("yellow")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"B TO JUMP", stringToColor("white")});
|
||||
texts.push_back({"R TO SWITCH THE MUSIC", stringToColor("white")});
|
||||
texts.push_back({"L TO SWAP THE COLOR PALETTE", stringToColor("white")});
|
||||
texts.push_back({"START TO PAUSE", stringToColor("white")});
|
||||
texts.push_back({"SELECT TO EXIT", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
|
||||
texts.push_back({"A GAME BY JAILDESIGNER", stringToColor(options.video.palette, "yellow")});
|
||||
texts.push_back({"MADE ON SUMMER/FALL 2022", stringToColor(options.video.palette, "yellow")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"A GAME BY JAILDESIGNER", stringToColor("yellow")});
|
||||
texts.push_back({"MADE ON SUMMER/FALL 2022", stringToColor("yellow")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
|
||||
texts.push_back({"I LOVE JAILGAMES! ", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"", stringToColor(options.video.palette, "white")});
|
||||
texts.push_back({"I LOVE JAILGAMES! ", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ void Credits::fillTexture()
|
||||
// Escribe el corazón
|
||||
const int TEXT_LENGHT = text->lenght(texts_[22].label, 1) - text->lenght(" ", 1); // Se resta el ultimo caracter que es un espacio
|
||||
const int POS_X = ((PLAY_AREA_WIDTH - TEXT_LENGHT) / 2) + TEXT_LENGHT;
|
||||
text->writeColored(POS_X, 176, "}", stringToColor(options.video.palette, "bright_red"));
|
||||
text->writeColored(POS_X, 176, "}", stringToColor("bright_red"));
|
||||
|
||||
// Recoloca el sprite del brillo
|
||||
shining_sprite_->setPosX(POS_X + 2);
|
||||
|
||||
Reference in New Issue
Block a user