- [NEW] Els stats del final també mostren el temps empleat

- [NEW] La música i el audio sonen o no segons la configuració
This commit is contained in:
2024-10-02 12:32:43 +02:00
parent 0ca9ad3f0b
commit 5620fff446
5 changed files with 37 additions and 12 deletions

View File

@@ -860,7 +860,7 @@ namespace actor
{
act->flags |= FLAG_ANIMATED;
//if (audio::getChannelState(walk_channel) == audio::CHANNEL_PAUSED) audio::resumeChannel(walk_channel);
if (act->anim_frame==0) walk_channel = audio::playSound(walk, 0);
if ( (config::getSoundMode()==SOUND_ALL) && (act->anim_frame==0)) walk_channel = audio::playSound(walk, 0);
}
else
{
@@ -1890,7 +1890,7 @@ namespace actor
boosters_collected[i] = false;
brilli = draw::getSurface("objectes.gif");
walk = audio::loadSound("walk.wav");
if (config::getSoundMode()==SOUND_ALL) walk = audio::loadSound("walk.wav");
//walk_channel = audio::playSound(walk, -1);
//audio::pauseChannel(walk_channel);
}
@@ -2176,6 +2176,7 @@ namespace actor
bool roomVisited[MAX_ROOMS];
int livesLost = 0;
int catsLifeOdds = 5;
uint32_t start_time = 0;
void reset()
{
@@ -2183,6 +2184,7 @@ namespace actor
catsLifeOdds = 5;
for (int i = 0; i < MAX_ROOMS; ++i)
roomVisited[i] = false;
start_time = SDL_GetTicks();
}
void collectPart() { partsCollected++; }
@@ -2199,6 +2201,8 @@ namespace actor
return roomsVisited;
}
uint32_t getStartTime() { return start_time; }
int getLivesLost() { return livesLost; }
bool catsLife()