This commit is contained in:
parent
9980a564ba
commit
57d7f580ef
@ -66,6 +66,10 @@
|
||||
#include "sound\sound.h"
|
||||
#endif
|
||||
|
||||
#ifndef __MAP_MAP_H__
|
||||
#include "map\map.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
@ -289,9 +293,11 @@ void CFrontEndStart::drawGameSlot(int _xOff,int _slotNumber)
|
||||
|
||||
if(gameSlot->m_isInUse)
|
||||
{
|
||||
int chapter,level;
|
||||
char buf[100];
|
||||
|
||||
sprintf(buf,TranslationDatabase::getString(STR__SLOT_SELECT_SCREEN__LEVEL_REACHED),0,0);
|
||||
gameSlot->getHighestLevelOpen(&chapter,&level);
|
||||
sprintf(buf,TranslationDatabase::getString(STR__SLOT_SELECT_SCREEN__LEVEL_REACHED),chapter+1,level+1);
|
||||
m_font->print(xbase+SLOT_LEVEL_TEXT_X,SLOT_FRAME_Y+SLOT_LEVEL_TEXT_Y,buf);
|
||||
|
||||
x=xbase+SLOT_TOKENCOUNT_X;
|
||||
@ -432,6 +438,9 @@ void CFrontEndStart::think(int _frames)
|
||||
gameSlot=CGameSlotManager::getSlotData();
|
||||
if(gameSlot->m_isInUse)
|
||||
{
|
||||
int chapter,level;
|
||||
gameSlot->getHighestLevelOpen(&chapter,&level);
|
||||
CMapScene::setLevelToStartOn(chapter,level);
|
||||
m_state=STATE_EXITING_TO_GAME;
|
||||
CFader::setFadingOut();
|
||||
CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__OK);
|
||||
|
@ -128,7 +128,6 @@ void CGameSlotManager::eraseGameSlot(unsigned int _slot)
|
||||
slot->m_isInUse=false;
|
||||
slot->m_lives=INITIAL_LIVES;
|
||||
slot->m_continues=INITIAL_CONTINUES;
|
||||
slot->m_maxLevelCompleted=0;
|
||||
|
||||
// Clear spatula and kelp token flags
|
||||
for(i=0;i<NUM_CHAPTERS*NUM_LEVELS_WITH_SPATULAS;i++)
|
||||
|
@ -44,7 +44,7 @@ class CGameSlotManager
|
||||
public:
|
||||
enum
|
||||
{
|
||||
INITIAL_LIVES=4,
|
||||
INITIAL_LIVES=5,
|
||||
INITIAL_CONTINUES=3,
|
||||
|
||||
NUM_GAME_SLOTS=4,
|
||||
@ -68,7 +68,6 @@ public:
|
||||
unsigned char m_isInUse;
|
||||
unsigned char m_lives;
|
||||
unsigned char m_continues;
|
||||
unsigned char m_maxLevelCompleted;
|
||||
unsigned char m_spatulaCollectedFlags[NUM_CHAPTERS*NUM_LEVELS_WITH_SPATULAS][16]; // Enuf space for 128 spats per level
|
||||
unsigned char m_kelpTokenCollectedFlags[NUM_CHAPTERS][16]; // Same again..
|
||||
unsigned char m_kelpTokensHeld;
|
||||
@ -190,6 +189,22 @@ public:
|
||||
m_levelCompletionState[index]=LEVELCOMPETESTATE_COMPLETED;
|
||||
}
|
||||
|
||||
void getHighestLevelOpen(int *_chapter,int *_level)
|
||||
{
|
||||
int chapter,level;
|
||||
for(chapter=0;chapter<NUM_CHAPTERS;chapter++)
|
||||
{
|
||||
for(level=0;level<NUM_LEVELS_PER_CHAPTER_WITH_QUEST_ITEMS;level++)
|
||||
{
|
||||
if(isLevelOpen(chapter,level))
|
||||
{
|
||||
*_chapter=chapter;
|
||||
*_level=level;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __VERSION_DEBUG__
|
||||
void debugCheatOpenAllLevels()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user