This commit is contained in:
parent
9fc5b891d7
commit
f7d2355ca0
3 changed files with 117 additions and 3 deletions
|
@ -70,6 +70,10 @@
|
||||||
#include "utils\utils.h"
|
#include "utils\utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAMESLOT_H__
|
||||||
|
#include "game\gameslot.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -183,9 +187,7 @@ void CFrontEndMainTitles::select()
|
||||||
|
|
||||||
m_demoTimeout=0;
|
m_demoTimeout=0;
|
||||||
|
|
||||||
// Currently the selection of title screens is random.. eventually it will be tied
|
s_image=CFileIO::loadFile(s_imageFiles[CGameSlotManager::getNumberOfFrontendScreenToUse()]);
|
||||||
// into how much of the game has been completed (pkg)
|
|
||||||
s_image=CFileIO::loadFile(s_imageFiles[getRndRange(4)]);
|
|
||||||
ASSERT(s_image);
|
ASSERT(s_image);
|
||||||
SetScreenImage(s_image);
|
SetScreenImage(s_image);
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,34 @@
|
||||||
/* Data
|
/* Data
|
||||||
---- */
|
---- */
|
||||||
|
|
||||||
|
// Level data include files:
|
||||||
|
#include <CHAPTER01_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER01_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER01_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER01_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER02_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER02_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER02_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER02_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER03_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER03_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER03_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER03_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER04_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER04_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER04_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER04_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER05_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER05_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER05_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER05_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER06_LEVEL01_INF.h>
|
||||||
|
#include <CHAPTER06_LEVEL02_INF.h>
|
||||||
|
#include <CHAPTER06_LEVEL03_INF.h>
|
||||||
|
#include <CHAPTER06_LEVEL04_INF.h>
|
||||||
|
#include <CHAPTER06_LEVEL05_INF.h>
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Tyepdefs && Defines
|
Tyepdefs && Defines
|
||||||
------------------- */
|
------------------- */
|
||||||
|
@ -205,5 +233,87 @@ CGameSlotManager::GameSlot CGameSlotManager::getSlotData(int _slot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns: 0..3
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
int CGameSlotManager::getNumberOfFrontendScreenToUse()
|
||||||
|
{
|
||||||
|
int bestSoFar;
|
||||||
|
GameSlot *slot;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
bestSoFar=0;
|
||||||
|
slot=s_gameSlots;
|
||||||
|
for(i=0;i<NUM_GAME_SLOTS&&bestSoFar<3;i++)
|
||||||
|
{
|
||||||
|
int bestForThisSlot=0;
|
||||||
|
|
||||||
|
if(slot->m_isInUse)
|
||||||
|
{
|
||||||
|
// All normal levels completed? ( screen 1 )
|
||||||
|
if(slot->hasQustItemBeenCollected(5-1,4-1))
|
||||||
|
{
|
||||||
|
bestForThisSlot=1;
|
||||||
|
|
||||||
|
// ..and bought all party items? ( screen 2 )
|
||||||
|
int j;
|
||||||
|
for(j=CShopScene::NUM_SHOP_ITEM_IDS;j>0&&slot->isPartyItemHeld(j);j--);
|
||||||
|
if(j==0)
|
||||||
|
{
|
||||||
|
bestForThisSlot=2;
|
||||||
|
|
||||||
|
// ..and collected all spats? ( screen 3 )
|
||||||
|
int count,c,l;
|
||||||
|
count=0;
|
||||||
|
for(c=0;c<5;c++)
|
||||||
|
{
|
||||||
|
for(l=0;l<4;l++)
|
||||||
|
{
|
||||||
|
count+=slot->getSpatulaCollectedCount(c,l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(count==CHAPTER01_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER01_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER01_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER01_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER02_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER02_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER02_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER02_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER03_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER03_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER03_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER03_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER04_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER04_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER04_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER04_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER05_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER05_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER05_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA+
|
||||||
|
CHAPTER05_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA)
|
||||||
|
{
|
||||||
|
bestForThisSlot=3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Is this slot better than the others?
|
||||||
|
if(bestForThisSlot>bestSoFar)
|
||||||
|
{
|
||||||
|
bestSoFar=bestForThisSlot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
slot++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bestSoFar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
end */
|
end */
|
||||||
|
|
|
@ -216,6 +216,8 @@ public:
|
||||||
static void eraseGameSlot(unsigned int _slot);
|
static void eraseGameSlot(unsigned int _slot);
|
||||||
static void copyGameSlot(unsigned int _src,unsigned int _dest);
|
static void copyGameSlot(unsigned int _src,unsigned int _dest);
|
||||||
|
|
||||||
|
static int getNumberOfFrontendScreenToUse();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static GameSlot s_gameSlots[NUM_GAME_SLOTS];
|
static GameSlot s_gameSlots[NUM_GAME_SLOTS];
|
||||||
|
|
Loading…
Add table
Reference in a new issue