8 Commits

9 changed files with 34 additions and 64 deletions

View File

@@ -2,7 +2,7 @@ executable = jaildoctors_dilemma
source = source/*.cpp source/jail_engine/*.cpp source = source/*.cpp source/jail_engine/*.cpp
appName = JailDoctor's Dilemma appName = JailDoctor's Dilemma
releaseFolder = jdd_release releaseFolder = jdd_release
version = v1.09 version = v1.08
# Release names # Release names
windowsRelease = $(executable)-$(version)-win32-x64.zip windowsRelease = $(executable)-$(version)-win32-x64.zip

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
data/title/title_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -23,11 +23,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.9</string> <string>1.08</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0.8</string> <string>1.08</string>
<key>CSResourcesFileMapped</key> <key>CSResourcesFileMapped</key>
<true/> <true/>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>

View File

@@ -62,6 +62,8 @@ const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3;
// Subsecciones // Subsecciones
#define SUBSECTION_LOGO_TO_INTRO 0 #define SUBSECTION_LOGO_TO_INTRO 0
#define SUBSECTION_LOGO_TO_TITLE 1 #define SUBSECTION_LOGO_TO_TITLE 1
#define SUBSECTION_TITLE_WITH_LOADING_SCREEN 2
#define SUBSECTION_TITLE_WITHOUT_LOADING_SCREEN 3
// Colores // Colores
const color_t borderColor = {0x27, 0x27, 0x36}; const color_t borderColor = {0x27, 0x27, 0x36};

View File

@@ -505,6 +505,7 @@ void Director::loadResources(section_t *section)
textureList.push_back("smb2.png"); textureList.push_back("smb2.png");
textureList.push_back("subatomic.png"); textureList.push_back("subatomic.png");
textureList.push_back("notify.png"); textureList.push_back("notify.png");
textureList.push_back("title_logo.png");
resource->loadTextures(textureList); resource->loadTextures(textureList);
@@ -1704,6 +1705,7 @@ bool Director::setFileList()
asset->add(prefix + "/data/title/loading_screen_bn_zxarne.png", t_bitmap); asset->add(prefix + "/data/title/loading_screen_bn_zxarne.png", t_bitmap);
asset->add(prefix + "/data/title/loading_screen_color_zxarne.png", t_bitmap); asset->add(prefix + "/data/title/loading_screen_color_zxarne.png", t_bitmap);
asset->add(prefix + "/data/title/loading_screen_color.gif", t_bitmap); asset->add(prefix + "/data/title/loading_screen_color.gif", t_bitmap);
asset->add(prefix + "/data/title/title_logo.png", t_bitmap);
// Ending // Ending
asset->add(prefix + "/data/ending/ending1.png", t_bitmap); asset->add(prefix + "/data/ending/ending1.png", t_bitmap);

View File

@@ -173,7 +173,7 @@ void LoadingScreen::updateLoad()
if (loadCounter >= 768) if (loadCounter >= 768)
{ {
section->name = SECTION_TITLE; section->name = SECTION_TITLE;
section->subsection = 0; section->subsection = SUBSECTION_TITLE_WITH_LOADING_SCREEN;
JA_StopMusic(); JA_StopMusic();
} }
} }

View File

@@ -18,11 +18,11 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"), online); cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"), online);
if (options->palette == p_zxspectrum) if (options->palette == p_zxspectrum)
{ {
texture = resource->getTexture("loading_screen_color.png"); texture = resource->getTexture("title_logo.png");
} }
else if (options->palette == p_zxarne) else if (options->palette == p_zxarne)
{ {
texture = resource->getTexture("loading_screen_color_zxarne.png"); texture = resource->getTexture("title_logo.png");
} }
sprite = new Sprite(0, 0, texture->getWidth(), texture->getHeight(), texture, renderer); sprite = new Sprite(0, 0, texture->getWidth(), texture->getHeight(), texture, renderer);
text = new Text(resource->getOffset("smb2.txt"), resource->getTexture("smb2.png"), renderer); text = new Text(resource->getOffset("smb2.txt"), resource->getTexture("smb2.png"), renderer);
@@ -47,6 +47,7 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
// Inicializa variables // Inicializa variables
counter = 0; counter = 0;
state = section->subsection == SUBSECTION_TITLE_WITH_LOADING_SCREEN ? show_loading_screen : show_menu;
section->name = SECTION_TITLE; section->name = SECTION_TITLE;
section->subsection = 0; section->subsection = 0;
ticks = 0; ticks = 0;
@@ -54,7 +55,6 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
marqueeSpeed = 3; marqueeSpeed = 3;
initMarquee(); initMarquee();
showCheevos = false; showCheevos = false;
state = show_loading_screen;
// Crea y rellena la textura para mostrar los logros // Crea y rellena la textura para mostrar los logros
createCheevosTexture(); createCheevosTexture();
@@ -200,10 +200,9 @@ void Title::checkInput()
else if (input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_pause, REPEAT_FALSE)) else if (input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_pause, REPEAT_FALSE))
{ {
if (!showCheevos) if (state == show_loading_screen)
{ {
// section->name = SECTION_GAME; state = fade_loading_screen;
// section->subsection = 0;
} }
} }
} }
@@ -281,7 +280,7 @@ void Title::update()
switch (state) switch (state)
{ {
case show_loading_screen: case show_loading_screen:
if (counter == 200) if (counter == 500)
{ {
counter = 0; counter = 0;
state = fade_loading_screen; state = fade_loading_screen;
@@ -323,31 +322,11 @@ void Title::render()
{ {
// Prepara para empezar a dibujar en la textura de juego // Prepara para empezar a dibujar en la textura de juego
screen->start(); screen->start();
screen->clean(stringToColor(options->palette, "black"));
switch (state) if (state == show_menu)
{ {
case show_loading_screen: // Dibuja la textura de fondo
// Dibuja la textura de fondo
SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr);
// Dibuja la pantalla de carga
pCls(4);
pBlit(0, 0, 0, 0, 256, 128);
pFlip(renderer);
break;
case fade_loading_screen:
// Dibuja la textura de fondo
SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr);
// Dibuja la pantalla de carga
pCls(4);
pBlit(0, 0, 0, 0, 256, 128);
pFlip(renderer);
break;
case show_menu:
// Dibuja la textura de fondo
SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr); SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr);
// Dibuja la marquesina // Dibuja la marquesina
@@ -358,10 +337,16 @@ void Title::render()
{ {
cheevosSprite->render(); cheevosSprite->render();
} }
break; }
else
{
// Dibuja la pantalla de carga
pCls(4);
pBlit(0, 0, 0, 0, 256, 128);
pFlip(renderer);
default: // Dibuja el logo del título
break; sprite->render();
} }
// Vuelca el contenido del renderizador en pantalla // Vuelca el contenido del renderizador en pantalla
@@ -449,33 +434,14 @@ void Title::fillTexture()
SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 0xFF); SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 0xFF);
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
// Pinta el grafico del titulo a partir del sprite // Pinta el gráfico del titulo a partir del sprite
sprite->setPosX(0); sprite->render();
sprite->setPosY(0);
sprite->setSpriteClip(0, 0, sprite->getWidth(), 64);
sprite->render(); // Titulo grande
sprite->setPosY(64);
sprite->setSpriteClip(0, 64, 5, 16);
sprite->render(); // Palito de la izquierda
sprite->setPosX(251);
sprite->setSpriteClip(251, 64, 5, 16);
sprite->render(); // Palito de la derecha
sprite->setPosX(20);
sprite->setSpriteClip(20, 64, 33, 8);
sprite->render(); // Palito bajo titulo izquierda
sprite->setPosX(203);
SDL_Rect rect = sprite->getSpriteClip();
sprite->getTexture()->render(renderer, 203, 64, &rect, 1.0F, 1.0F, 0.0, nullptr, SDL_FLIP_HORIZONTAL); // Palito bajo titulo derecha
// Borra la firma // Borra la firma
const color_t coverColor = stringToColor(options->palette, "black"); //const color_t coverColor = stringToColor(options->palette, "black");
SDL_SetRenderDrawColor(renderer, coverColor.r, coverColor.g, coverColor.b, 0xFF); //SDL_SetRenderDrawColor(renderer, coverColor.r, coverColor.g, coverColor.b, 0xFF);
SDL_Rect coverRect = {28, 11, 21, 5}; //SDL_Rect coverRect = {28, 11, 21, 5};
SDL_RenderFillRect(renderer, &coverRect); //SDL_RenderFillRect(renderer, &coverRect);
// Escribe el texto en la textura // Escribe el texto en la textura
const color_t textColor = stringToColor(options->palette, "green"); const color_t textColor = stringToColor(options->palette, "green");

View File

@@ -158,8 +158,6 @@ Uint8 pGetPixel(int x, int y)
bool pFadePal() bool pFadePal()
{ {
paleta[1] = paleta[0];
// Colores pares // Colores pares
for (int i = 18; i > 0; i = i - 2) for (int i = 18; i > 0; i = i - 2)
{ {
@@ -171,6 +169,8 @@ bool pFadePal()
{ {
paleta[i] = paleta[i - 2]; paleta[i] = paleta[i - 2];
} }
paleta[1] = paleta[0];
return paleta[15] == paleta[0] ? true : false; return paleta[15] == paleta[0] ? true : false;
} }