2 Commits
v1.1 ... v1.2

Author SHA1 Message Date
51eb933383 - [FIX] Arreglats els errors de la paleta de fósforo
- [CHG] Augmentades les probabilitats de una Cat's Life
- [NEW] Informació dels renderers al arrancar
- [FIX] Quan apareix un dialeg ja no es queda el só de caminar sonant de fondo
- [NEW] Quan apareix un dialeg i sona una fanfarria, la música se pausa
2024-10-10 20:14:18 +02:00
3f127b5444 - [FIX] En pantalla completa se veïa el cursor, ara ja no 2024-10-10 17:28:46 +02:00
4 changed files with 21 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

View File

@@ -2435,13 +2435,13 @@ namespace actor
int partsCollected = 0; int partsCollected = 0;
bool roomVisited[MAX_ROOMS]; bool roomVisited[MAX_ROOMS];
int livesLost = 0; int livesLost = 0;
int catsLifeOdds = 5; int catsLifeOdds = 2;
uint32_t start_time = 0; uint32_t start_time = 0;
void reset() void reset()
{ {
partsCollected = livesLost = 0; partsCollected = livesLost = 0;
catsLifeOdds = 5; catsLifeOdds = 2;
for (int i = 0; i < MAX_ROOMS; ++i) for (int i = 0; i < MAX_ROOMS; ++i)
roomVisited[i] = false; roomVisited[i] = false;
start_time = SDL_GetTicks(); start_time = SDL_GetTicks();

View File

@@ -93,8 +93,21 @@ namespace draw
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height);
SDL_RendererInfo info;
const int num_render_drivers = SDL_GetNumRenderDrivers();
printf("Available renderers:\n");
for (int i=0; i<num_render_drivers; ++i)
{
SDL_GetRenderDriverInfo(i, &info);
printf(" - %i: %s\n", i, info.name);
}
SDL_GetRendererInfo(sdl_renderer, &info);
printf("\nRenderer: %s\n", info.name);
if (screen_fullscreen) if (screen_fullscreen)
{ {
SDL_ShowCursor(false);
int w, h; int w, h;
SDL_GetWindowSize(sdl_window, &w, &h); SDL_GetWindowSize(sdl_window, &w, &h);
fullscreen_scale = h/screen_height; fullscreen_scale = h/screen_height;
@@ -105,6 +118,7 @@ namespace draw
} }
else else
{ {
SDL_ShowCursor(true);
dest_rect.x = dest_rect.y = 0; dest_rect.x = dest_rect.y = 0;
dest_rect.w = screen_width * zoom; dest_rect.w = screen_width * zoom;
dest_rect.h = screen_height * zoom; dest_rect.h = screen_height * zoom;
@@ -175,6 +189,7 @@ namespace draw
if (screen_fullscreen) if (screen_fullscreen)
{ {
SDL_ShowCursor(false);
int w, h; int w, h;
SDL_GetWindowSize(sdl_window, &w, &h); SDL_GetWindowSize(sdl_window, &w, &h);
fullscreen_scale = h/screen_height; fullscreen_scale = h/screen_height;
@@ -185,6 +200,7 @@ namespace draw
} }
else else
{ {
SDL_ShowCursor(true);
dest_rect.x = dest_rect.y = 0; dest_rect.x = dest_rect.y = 0;
dest_rect.w = screen_width * zoom; dest_rect.w = screen_width * zoom;
dest_rect.h = screen_height * zoom; dest_rect.h = screen_height * zoom;

View File

@@ -296,6 +296,7 @@ namespace modules
if ( (controller::pressed(KEY_MENU)) || (controller::pressed(KEY_PICK)) || (controller::pressed(KEY_JUMP)) ) if ( (controller::pressed(KEY_MENU)) || (controller::pressed(KEY_PICK)) || (controller::pressed(KEY_JUMP)) )
{ {
missatge[0] = 0; missatge[0] = 0;
audio::resumeMusic();
return; return;
} }
draw::color(BLACK); draw::color(BLACK);
@@ -989,6 +990,8 @@ namespace modules
void setMissatge(const char *text) void setMissatge(const char *text)
{ {
actor::pauseWalkSound();
audio::pauseMusic();
strcpy(missatge, text); strcpy(missatge, text);
} }