Compare commits
9 Commits
250efd69bf
...
v1.08
| Author | SHA1 | Date | |
|---|---|---|---|
| 944784b329 | |||
| df4c1366fe | |||
| 1ee1ea560b | |||
| 5c7f72253c | |||
| e2e41cf435 | |||
| 674323d445 | |||
| f4e2c11f1b | |||
| 1b130feb85 | |||
| 5f3ecbbd79 |
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ executable = jaildoctors_dilemma
|
||||
source = source/*.cpp source/jail_engine/*.cpp
|
||||
appName = JailDoctor's Dilemma
|
||||
releaseFolder = jdd_release
|
||||
version = v1.09
|
||||
version = v1.08
|
||||
|
||||
# Release names
|
||||
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
BIN
data/title/title_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -23,11 +23,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.9</string>
|
||||
<string>1.08</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.8</string>
|
||||
<string>1.08</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@@ -62,6 +62,8 @@ const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3;
|
||||
// Subsecciones
|
||||
#define SUBSECTION_LOGO_TO_INTRO 0
|
||||
#define SUBSECTION_LOGO_TO_TITLE 1
|
||||
#define SUBSECTION_TITLE_WITH_LOADING_SCREEN 2
|
||||
#define SUBSECTION_TITLE_WITHOUT_LOADING_SCREEN 3
|
||||
|
||||
// Colores
|
||||
const color_t borderColor = {0x27, 0x27, 0x36};
|
||||
|
||||
@@ -505,6 +505,7 @@ void Director::loadResources(section_t *section)
|
||||
textureList.push_back("smb2.png");
|
||||
textureList.push_back("subatomic.png");
|
||||
textureList.push_back("notify.png");
|
||||
textureList.push_back("title_logo.png");
|
||||
|
||||
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_color_zxarne.png", t_bitmap);
|
||||
asset->add(prefix + "/data/title/loading_screen_color.gif", t_bitmap);
|
||||
asset->add(prefix + "/data/title/title_logo.png", t_bitmap);
|
||||
|
||||
// Ending
|
||||
asset->add(prefix + "/data/ending/ending1.png", t_bitmap);
|
||||
|
||||
@@ -173,7 +173,7 @@ void LoadingScreen::updateLoad()
|
||||
if (loadCounter >= 768)
|
||||
{
|
||||
section->name = SECTION_TITLE;
|
||||
section->subsection = 0;
|
||||
section->subsection = SUBSECTION_TITLE_WITH_LOADING_SCREEN;
|
||||
JA_StopMusic();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
|
||||
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"), online);
|
||||
if (options->palette == p_zxspectrum)
|
||||
{
|
||||
texture = resource->getTexture("loading_screen_color.png");
|
||||
texture = resource->getTexture("title_logo.png");
|
||||
}
|
||||
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);
|
||||
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
|
||||
counter = 0;
|
||||
state = section->subsection == SUBSECTION_TITLE_WITH_LOADING_SCREEN ? show_loading_screen : show_menu;
|
||||
section->name = SECTION_TITLE;
|
||||
section->subsection = 0;
|
||||
ticks = 0;
|
||||
@@ -54,7 +55,6 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
|
||||
marqueeSpeed = 3;
|
||||
initMarquee();
|
||||
showCheevos = false;
|
||||
state = show_loading_screen;
|
||||
|
||||
// Crea y rellena la textura para mostrar los logros
|
||||
createCheevosTexture();
|
||||
@@ -200,10 +200,9 @@ void Title::checkInput()
|
||||
|
||||
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;
|
||||
// section->subsection = 0;
|
||||
state = fade_loading_screen;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,18 +280,23 @@ void Title::update()
|
||||
switch (state)
|
||||
{
|
||||
case show_loading_screen:
|
||||
if (counter == 2000)
|
||||
if (counter == 500)
|
||||
{
|
||||
counter = 0;
|
||||
state = show_menu;
|
||||
state = fade_loading_screen;
|
||||
}
|
||||
break;
|
||||
|
||||
case fade_loading_screen:
|
||||
if (counter % 4 == 0)
|
||||
if (pFadePal())
|
||||
{
|
||||
counter = 0;
|
||||
state = show_menu;
|
||||
}
|
||||
break;
|
||||
|
||||
case show_menu:
|
||||
|
||||
// Actualiza la marquesina
|
||||
updateMarquee();
|
||||
|
||||
@@ -318,24 +322,11 @@ void Title::render()
|
||||
{
|
||||
// Prepara para empezar a dibujar en la textura de juego
|
||||
screen->start();
|
||||
screen->clean(stringToColor(options->palette, "black"));
|
||||
|
||||
switch (state)
|
||||
if (state == show_menu)
|
||||
{
|
||||
case show_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 fade_loading_screen:
|
||||
break;
|
||||
|
||||
case show_menu:
|
||||
// Dibuja la textura de fondo
|
||||
// Dibuja la textura de fondo
|
||||
SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr);
|
||||
|
||||
// Dibuja la marquesina
|
||||
@@ -346,10 +337,16 @@ void Title::render()
|
||||
{
|
||||
cheevosSprite->render();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Dibuja la pantalla de carga
|
||||
pCls(4);
|
||||
pBlit(0, 0, 0, 0, 256, 128);
|
||||
pFlip(renderer);
|
||||
|
||||
default:
|
||||
break;
|
||||
// Dibuja el logo del título
|
||||
sprite->render();
|
||||
}
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
@@ -437,33 +434,14 @@ void Title::fillTexture()
|
||||
SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 0xFF);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
// Pinta el grafico del titulo a partir del sprite
|
||||
sprite->setPosX(0);
|
||||
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
|
||||
// Pinta el gráfico del titulo a partir del sprite
|
||||
sprite->render();
|
||||
|
||||
// Borra la firma
|
||||
const color_t coverColor = stringToColor(options->palette, "black");
|
||||
SDL_SetRenderDrawColor(renderer, coverColor.r, coverColor.g, coverColor.b, 0xFF);
|
||||
SDL_Rect coverRect = {28, 11, 21, 5};
|
||||
SDL_RenderFillRect(renderer, &coverRect);
|
||||
//const color_t coverColor = stringToColor(options->palette, "black");
|
||||
//SDL_SetRenderDrawColor(renderer, coverColor.r, coverColor.g, coverColor.b, 0xFF);
|
||||
//SDL_Rect coverRect = {28, 11, 21, 5};
|
||||
//SDL_RenderFillRect(renderer, &coverRect);
|
||||
|
||||
// Escribe el texto en la textura
|
||||
const color_t textColor = stringToColor(options->palette, "green");
|
||||
|
||||
@@ -61,7 +61,7 @@ void pBlit(int dx, int dy, int sx, int sy, int w, int h)
|
||||
{
|
||||
if (jSourceSurf == NULL)
|
||||
return;
|
||||
|
||||
|
||||
for (int iy = 0; iy < h; ++iy)
|
||||
{
|
||||
for (int ix = 0; ix < w; ++ix)
|
||||
@@ -140,7 +140,7 @@ void pFlip(SDL_Renderer *renderer)
|
||||
for (int i = 0; i < jWidth * jHeight; ++i)
|
||||
pixels[i] = paleta[jScreen->data[i]];
|
||||
SDL_UnlockTexture(jTex);
|
||||
SDL_Rect rect = {0,64,256,128};
|
||||
SDL_Rect rect = {0, 64, 256, 128};
|
||||
SDL_RenderCopy(renderer, jTex, NULL, &rect);
|
||||
}
|
||||
|
||||
@@ -154,4 +154,23 @@ void pPutPixel(int x, int y, Uint8 color)
|
||||
Uint8 pGetPixel(int x, int y)
|
||||
{
|
||||
return jSourceSurf->data[x + y * jSourceSurf->w];
|
||||
}
|
||||
|
||||
bool pFadePal()
|
||||
{
|
||||
// Colores pares
|
||||
for (int i = 18; i > 0; i = i - 2)
|
||||
{
|
||||
paleta[i] = paleta[i - 2];
|
||||
}
|
||||
|
||||
// Colores impares
|
||||
for (int i = 17; i > 1; i = i - 2)
|
||||
{
|
||||
paleta[i] = paleta[i - 2];
|
||||
}
|
||||
|
||||
paleta[1] = paleta[0];
|
||||
|
||||
return paleta[15] == paleta[0] ? true : false;
|
||||
}
|
||||
@@ -23,3 +23,5 @@ void pLoadPal(const char *filename);
|
||||
void pCls(Uint8 color);
|
||||
|
||||
void pFlip(SDL_Renderer *renderer);
|
||||
|
||||
bool pFadePal();
|
||||
|
||||
Reference in New Issue
Block a user