forked from jaildesigner-jailgames/jaildoctors_dilemma
Canviades les paletes dels .gif
Ara es poden carregar paletes desde fitxers .pal Reajustada la pleta general fix: la pantalla de càrrega deixava un pixel per pintar, desde sempre Ajustat el color del borde en el Logo i el Title per a ser igual al fondo amb les paletes de 16 colors (la del Spectrum es de 15)
This commit is contained in:
@@ -16,8 +16,7 @@
|
||||
#include "screen.h" // for Screen
|
||||
#include "text.h" // for Text
|
||||
#include "surface.h" // for Surface
|
||||
#include "utils.h" // for Color, stringToColor
|
||||
#include <iostream>
|
||||
#include "utils.h" // for Color, static_cast<Uint8>
|
||||
|
||||
// Constructor
|
||||
Ending2::Ending2()
|
||||
@@ -38,7 +37,7 @@ Ending2::Ending2()
|
||||
}
|
||||
|
||||
// Cambia el color del borde
|
||||
Screen::get()->setBorderColor(stringToColor("black"));
|
||||
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
|
||||
|
||||
// Inicializa la lista de sprites
|
||||
iniSpriteList();
|
||||
@@ -101,7 +100,7 @@ void Ending2::render()
|
||||
Screen::get()->start();
|
||||
|
||||
// Limpia la pantalla
|
||||
Screen::get()->clearSurface(stringToColor("black"));
|
||||
Screen::get()->clearSurface(static_cast<Uint8>(PaletteColor::BLACK));
|
||||
|
||||
// Dibuja los sprites
|
||||
renderSprites();
|
||||
@@ -113,7 +112,7 @@ void Ending2::render()
|
||||
renderTexts();
|
||||
|
||||
// Dibuja una trama arriba y abajo
|
||||
Uint8 color = stringToColor("black");
|
||||
Uint8 color = static_cast<Uint8>(PaletteColor::BLACK);
|
||||
auto surface = Screen::get()->getRendererSurface();
|
||||
for (int i = 0; i < 256; i += 2)
|
||||
{
|
||||
@@ -326,7 +325,7 @@ void Ending2::updateTexts()
|
||||
// Dibuja los sprites
|
||||
void Ending2::renderSprites()
|
||||
{
|
||||
const Uint8 colorA = stringToColor("red");
|
||||
const Uint8 colorA = static_cast<Uint8>(PaletteColor::RED);
|
||||
for (auto sprite : sprites_)
|
||||
{
|
||||
const bool A = sprite->getRect().y + sprite->getRect().h > 0;
|
||||
@@ -338,14 +337,14 @@ void Ending2::renderSprites()
|
||||
}
|
||||
|
||||
// Pinta el ultimo elemento de otro color
|
||||
const Uint8 colorB = stringToColor("white");
|
||||
const Uint8 colorB = static_cast<Uint8>(PaletteColor::WHITE);
|
||||
sprites_.back()->render(1, colorB);
|
||||
}
|
||||
|
||||
// Dibuja los sprites con el texto
|
||||
void Ending2::renderSpriteTexts()
|
||||
{
|
||||
const Uint8 color = stringToColor("white");
|
||||
const Uint8 color = static_cast<Uint8>(PaletteColor::WHITE);
|
||||
for (auto sprite : sprite_texts_)
|
||||
{
|
||||
const bool A = sprite->getRect().y + sprite->getRect().h > 0;
|
||||
|
||||
Reference in New Issue
Block a user