Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 384 KiB |
@ -69,31 +69,26 @@ ui/map/c1_l1.gfx
|
|||||||
ui/map/c1_l2.gfx
|
ui/map/c1_l2.gfx
|
||||||
ui/map/c1_l3.gfx
|
ui/map/c1_l3.gfx
|
||||||
ui/map/c1_l4.gfx
|
ui/map/c1_l4.gfx
|
||||||
ui/map/c1_boss.gfx
|
|
||||||
ui/map/c1_fair.gfx
|
ui/map/c1_fair.gfx
|
||||||
ui/map/c2_l1.gfx
|
ui/map/c2_l1.gfx
|
||||||
ui/map/c2_l2.gfx
|
ui/map/c2_l2.gfx
|
||||||
ui/map/c2_l3.gfx
|
ui/map/c2_l3.gfx
|
||||||
ui/map/c2_l4.gfx
|
ui/map/c2_l4.gfx
|
||||||
ui/map/c2_boss.gfx
|
|
||||||
ui/map/c2_fair.gfx
|
ui/map/c2_fair.gfx
|
||||||
ui/map/c3_l1.gfx
|
ui/map/c3_l1.gfx
|
||||||
ui/map/c3_l2.gfx
|
ui/map/c3_l2.gfx
|
||||||
ui/map/c3_l3.gfx
|
ui/map/c3_l3.gfx
|
||||||
ui/map/c3_l4.gfx
|
ui/map/c3_l4.gfx
|
||||||
ui/map/c3_boss.gfx
|
|
||||||
ui/map/c3_fair.gfx
|
ui/map/c3_fair.gfx
|
||||||
ui/map/c4_l1.gfx
|
ui/map/c4_l1.gfx
|
||||||
ui/map/c4_l2.gfx
|
ui/map/c4_l2.gfx
|
||||||
ui/map/c4_l3.gfx
|
ui/map/c4_l3.gfx
|
||||||
ui/map/c4_l4.gfx
|
ui/map/c4_l4.gfx
|
||||||
ui/map/c4_boss.gfx
|
|
||||||
ui/map/c4_fair.gfx
|
ui/map/c4_fair.gfx
|
||||||
ui/map/c5_l1.gfx
|
ui/map/c5_l1.gfx
|
||||||
ui/map/c5_l2.gfx
|
ui/map/c5_l2.gfx
|
||||||
ui/map/c5_l3.gfx
|
ui/map/c5_l3.gfx
|
||||||
ui/map/c5_l4.gfx
|
ui/map/c5_l4.gfx
|
||||||
ui/map/c5_boss.gfx
|
|
||||||
ui/map/c5_fair.gfx
|
ui/map/c5_fair.gfx
|
||||||
|
|
||||||
levels/CHAPTER01_LEVEL01.Lvl
|
levels/CHAPTER01_LEVEL01.Lvl
|
||||||
|
10
makefile.gfx
@ -403,11 +403,11 @@ GFX_DATA_OUT += $(BACKDROPS_OUT)
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
MAPSCREENS_IN_DIR := $(GRAF_DIR)/ui/map
|
MAPSCREENS_IN_DIR := $(GRAF_DIR)/ui/map
|
||||||
MAPSCREENS_IN := map_background \
|
MAPSCREENS_IN := map_background \
|
||||||
c1_l1 c1_l2 c1_l3 c1_l4 c1_boss c1_fair \
|
c1_l1 c1_l2 c1_l3 c1_l4 c1_fair \
|
||||||
c2_l1 c2_l2 c2_l3 c2_l4 c2_boss c2_fair \
|
c2_l1 c2_l2 c2_l3 c2_l4 c2_fair \
|
||||||
c3_l1 c3_l2 c3_l3 c3_l4 c3_boss c3_fair \
|
c3_l1 c3_l2 c3_l3 c3_l4 c3_fair \
|
||||||
c4_l1 c4_l2 c4_l3 c4_l4 c4_boss c4_fair \
|
c4_l1 c4_l2 c4_l3 c4_l4 c4_fair \
|
||||||
c5_l1 c5_l2 c5_l3 c5_l4 c5_boss c5_fair
|
c5_l1 c5_l2 c5_l3 c5_l4 c5_fair
|
||||||
|
|
||||||
MAPSCREENS_OUT_DIR := $(DATA_OUT)/ui/map
|
MAPSCREENS_OUT_DIR := $(DATA_OUT)/ui/map
|
||||||
MAPSCREENS_OUT := $(foreach SCREEN,$(MAPSCREENS_IN),$(MAPSCREENS_OUT_DIR)/$(SCREEN).gfx)
|
MAPSCREENS_OUT := $(foreach SCREEN,$(MAPSCREENS_IN),$(MAPSCREENS_OUT_DIR)/$(SCREEN).gfx)
|
||||||
|
@ -127,7 +127,7 @@ void CGameSlotManager::eraseGameSlot(unsigned int _slot)
|
|||||||
slot->m_lives=INITIAL_LIVES;
|
slot->m_lives=INITIAL_LIVES;
|
||||||
slot->m_continues=INITIAL_CONTINUES;
|
slot->m_continues=INITIAL_CONTINUES;
|
||||||
slot->m_maxLevelCompleted=0;
|
slot->m_maxLevelCompleted=0;
|
||||||
for(i=0;i<NUM_CHAPTERS*NUM_LEVELS;i++)
|
for(i=0;i<NUM_CHAPTERS_WITH_SPATULAS*NUM_LEVELS_WITH_SPATULAS;i++)
|
||||||
{
|
{
|
||||||
for(j=0;j<8;j++)
|
for(j=0;j<8;j++)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
Includes
|
Includes
|
||||||
-------- */
|
-------- */
|
||||||
|
|
||||||
|
// Just for ASSERT()..
|
||||||
|
#ifndef __SYSTEM_DBG_H__
|
||||||
|
#include "system\dbg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
|
||||||
@ -39,8 +45,10 @@ public:
|
|||||||
|
|
||||||
NUM_GAME_SLOTS=4,
|
NUM_GAME_SLOTS=4,
|
||||||
|
|
||||||
NUM_CHAPTERS=5,
|
NUM_CHAPTERS_WITH_SPATULAS=5,
|
||||||
NUM_LEVELS=6,
|
NUM_LEVELS_WITH_SPATULAS=4,
|
||||||
|
NUM_CHAPTERS_WITH_KELP_TOKENS=1,
|
||||||
|
NUM_LEVELS_WITH_KELP_TOKENS=5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -50,15 +58,19 @@ public:
|
|||||||
unsigned char m_lives;
|
unsigned char m_lives;
|
||||||
unsigned char m_continues;
|
unsigned char m_continues;
|
||||||
unsigned char m_maxLevelCompleted;
|
unsigned char m_maxLevelCompleted;
|
||||||
unsigned char m_spatulaCollectedFlags[NUM_CHAPTERS*NUM_LEVELS][8]; // Enuf space for 64 spats per level
|
unsigned char m_spatulaCollectedFlags[NUM_CHAPTERS_WITH_SPATULAS*NUM_LEVELS_WITH_SPATULAS][16]; // Enuf space for 128 spats per level
|
||||||
|
unsigned char m_kelpTokenCollectedFlags[NUM_CHAPTERS_WITH_KELP_TOKENS*NUM_LEVELS_WITH_KELP_TOKENS][16]; // Same again..
|
||||||
|
|
||||||
int getSpatulaCollectedCount(int _chapter,int _level)
|
// Spat functions..
|
||||||
|
int getSpatulaCollectedCount(unsigned int _chapter,unsigned int _level)
|
||||||
{
|
{
|
||||||
|
ASSERT(_chapter<=NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_SPATULAS);
|
||||||
int i,j,count;
|
int i,j,count;
|
||||||
count=0;
|
count=0;
|
||||||
for(i=0;i<8;i++)
|
for(i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
unsigned char flags=m_spatulaCollectedFlags[(_chapter*NUM_LEVELS)+_level][i];
|
unsigned char flags=m_spatulaCollectedFlags[(_chapter*NUM_LEVELS_WITH_SPATULAS)+_level][i];
|
||||||
for(j=0;j<8;j++)
|
for(j=0;j<8;j++)
|
||||||
{
|
{
|
||||||
if(flags&1)count++;
|
if(flags&1)count++;
|
||||||
@ -67,13 +79,52 @@ public:
|
|||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
void collectSpatula(int _chapter,int _level,int _spat)
|
void collectSpatula(unsigned int _chapter,unsigned int _level,unsigned int _spat)
|
||||||
{
|
{
|
||||||
m_spatulaCollectedFlags[(_chapter*NUM_LEVELS)+_level][_spat>>3]|=1<<(_spat&7);
|
ASSERT(_chapter<=NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_SPATULAS);
|
||||||
|
ASSERT(_spat<=128);
|
||||||
|
m_spatulaCollectedFlags[(_chapter*NUM_LEVELS_WITH_SPATULAS)+_level][_spat>>3]|=1<<(_spat&7);
|
||||||
}
|
}
|
||||||
int isSpatulaUncollected(int _chapter,int _level,int _spat)
|
int isSpatulaUncollected(unsigned int _chapter,unsigned int _level,unsigned int _spat)
|
||||||
{
|
{
|
||||||
return (m_spatulaCollectedFlags[(_chapter*NUM_LEVELS)+_level][_spat>>3]>>(_spat&7))&1?false:true;
|
ASSERT(_chapter<=NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_SPATULAS);
|
||||||
|
ASSERT(_spat<=128);
|
||||||
|
return (m_spatulaCollectedFlags[(_chapter*NUM_LEVELS_WITH_SPATULAS)+_level][_spat>>3]>>(_spat&7))&1?false:true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kelp Token functions..
|
||||||
|
int getKelpTokenCollectedCount(unsigned int _chapter,unsigned int _level)
|
||||||
|
{
|
||||||
|
ASSERT(_chapter==NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_KELP_TOKENS);
|
||||||
|
int i,j,count;
|
||||||
|
count=0;
|
||||||
|
for(i=0;i<8;i++)
|
||||||
|
{
|
||||||
|
unsigned char flags=m_kelpTokenCollectedFlags[(_chapter*NUM_LEVELS_WITH_KELP_TOKENS)+_level][i];
|
||||||
|
for(j=0;j<8;j++)
|
||||||
|
{
|
||||||
|
if(flags&1)count++;
|
||||||
|
flags>>=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
void collectKelpToken(unsigned int _chapter,unsigned int _level,unsigned int _token)
|
||||||
|
{
|
||||||
|
ASSERT(_chapter==NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_KELP_TOKENS);
|
||||||
|
ASSERT(_token<=128);
|
||||||
|
m_kelpTokenCollectedFlags[(_chapter*NUM_LEVELS_WITH_KELP_TOKENS)+_level][_token>>3]|=1<<(_token&7);
|
||||||
|
}
|
||||||
|
int isKelpTokenUncollected(unsigned int _chapter,unsigned int _level,unsigned int _token)
|
||||||
|
{
|
||||||
|
ASSERT(_chapter==NUM_CHAPTERS_WITH_SPATULAS);
|
||||||
|
ASSERT(_level<=NUM_LEVELS_WITH_KELP_TOKENS);
|
||||||
|
ASSERT(_token<=128);
|
||||||
|
return (m_kelpTokenCollectedFlags[(_chapter*NUM_LEVELS_WITH_KELP_TOKENS)+_level][_token>>3]>>(_token&7))&1?false:true;
|
||||||
}
|
}
|
||||||
} GameSlot;
|
} GameSlot;
|
||||||
|
|
||||||
|
@ -92,41 +92,68 @@
|
|||||||
#include "fx\fxfallingtile.h"
|
#include "fx\fxfallingtile.h"
|
||||||
|
|
||||||
|
|
||||||
|
// 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>
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
sLvlTab LvlTable[]=
|
sLvlTab LvlTable[]=
|
||||||
{
|
{
|
||||||
// C1
|
// C1
|
||||||
{1,1, 21, LEVELS_CHAPTER01_LEVEL01_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL1},
|
{1,1, CHAPTER01_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER01_LEVEL01_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL1},
|
||||||
{1,2, 63, LEVELS_CHAPTER01_LEVEL02_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL2},
|
{1,2, CHAPTER01_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER01_LEVEL02_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL2},
|
||||||
{1,3, 21, LEVELS_CHAPTER01_LEVEL03_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL3},
|
{1,3, CHAPTER01_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER01_LEVEL03_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL3},
|
||||||
{1,4, 20, LEVELS_CHAPTER01_LEVEL04_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL4},
|
{1,4, CHAPTER01_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER01_LEVEL04_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER1_LEVEL4},
|
||||||
|
|
||||||
// C2
|
// C2
|
||||||
{2,1, 20, LEVELS_CHAPTER02_LEVEL01_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL1},
|
{2,1, CHAPTER02_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER02_LEVEL01_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL1},
|
||||||
{2,2, 20, LEVELS_CHAPTER02_LEVEL02_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL2},
|
{2,2, CHAPTER02_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER02_LEVEL02_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL2},
|
||||||
{2,3, 20, LEVELS_CHAPTER02_LEVEL03_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL3},
|
{2,3, CHAPTER02_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER02_LEVEL03_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL3},
|
||||||
{2,4, 20, LEVELS_CHAPTER02_LEVEL04_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL4},
|
{2,4, CHAPTER02_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER02_LEVEL04_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER2_LEVEL4},
|
||||||
// C3
|
// C3
|
||||||
{3,1, 20, LEVELS_CHAPTER03_LEVEL01_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL1},
|
{3,1, CHAPTER03_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER03_LEVEL01_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL1},
|
||||||
{3,2, 20, LEVELS_CHAPTER03_LEVEL02_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL2},
|
{3,2, CHAPTER03_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER03_LEVEL02_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL2},
|
||||||
{3,3, 20, LEVELS_CHAPTER03_LEVEL03_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL3},
|
{3,3, CHAPTER03_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER03_LEVEL03_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL3},
|
||||||
{3,4, 20, LEVELS_CHAPTER03_LEVEL04_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL4},
|
{3,4, CHAPTER03_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER03_LEVEL04_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER3_LEVEL4},
|
||||||
// C4
|
// C4
|
||||||
{4,1, 20, LEVELS_CHAPTER04_LEVEL01_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL1},
|
{4,1, CHAPTER04_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER04_LEVEL01_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL1},
|
||||||
{4,2, 20, LEVELS_CHAPTER04_LEVEL02_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL2},
|
{4,2, CHAPTER04_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER04_LEVEL02_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL2},
|
||||||
{4,3, 20, LEVELS_CHAPTER04_LEVEL03_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL3},
|
{4,3, CHAPTER04_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER04_LEVEL03_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL3},
|
||||||
{4,4, 20, LEVELS_CHAPTER04_LEVEL04_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL4},
|
{4,4, CHAPTER04_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER04_LEVEL04_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER4_LEVEL4},
|
||||||
// C5
|
// C5
|
||||||
{5,1, 20, LEVELS_CHAPTER05_LEVEL01_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL1},
|
{5,1, CHAPTER05_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL01_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL1},
|
||||||
{5,2, 20, LEVELS_CHAPTER05_LEVEL02_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL2},
|
{5,2, CHAPTER05_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL02_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL2},
|
||||||
{5,3, 20, LEVELS_CHAPTER05_LEVEL03_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL3},
|
{5,3, CHAPTER05_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL03_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL3},
|
||||||
{5,4, 20, LEVELS_CHAPTER05_LEVEL04_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL4},
|
{5,4, CHAPTER05_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL04_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL4},
|
||||||
// C6
|
// C6
|
||||||
{6,1, 20, LEVELS_CHAPTER06_LEVEL01_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER6_ROLLERCOASTER},
|
{6,1, CHAPTER06_LEVEL01_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL01_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, CSoundMediator::SONG_CHAPTER6_ROLLERCOASTER},
|
||||||
{6,2, 20, LEVELS_CHAPTER06_LEVEL02_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER6_SNAILRACE},
|
{6,2, CHAPTER06_LEVEL02_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL02_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, CSoundMediator::SONG_CHAPTER6_SNAILRACE},
|
||||||
{6,3, 20, LEVELS_CHAPTER06_LEVEL03_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER6_BIGWHEEL},
|
{6,3, CHAPTER06_LEVEL03_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL03_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, CSoundMediator::SONG_CHAPTER6_BIGWHEEL},
|
||||||
{6,4, 20, LEVELS_CHAPTER06_LEVEL04_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE},
|
{6,4, CHAPTER06_LEVEL04_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL04_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE},
|
||||||
{6,5, 20, LEVELS_CHAPTER06_LEVEL05_LVL,LEVELS_CHAPTER06_LEVEL05_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE},
|
{6,5, CHAPTER06_LEVEL05_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL05_LVL,LEVELS_CHAPTER06_LEVEL05_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE},
|
||||||
// FMA
|
// FMA
|
||||||
{6,99, 0, LEVELS_FMA_SHADYSHOALS_LVL,LEVELS_FMA_SHADYSHOALS_TEX, CSoundMediator::SONG_TITLE},
|
{6,99, 0, LEVELS_FMA_SHADYSHOALS_LVL,LEVELS_FMA_SHADYSHOALS_TEX, CSoundMediator::SONG_TITLE},
|
||||||
|
|
||||||
|
@ -69,6 +69,33 @@
|
|||||||
#include <sprites.h>
|
#include <sprites.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// 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
|
||||||
@ -89,40 +116,57 @@
|
|||||||
CMapScene MapScene;
|
CMapScene MapScene;
|
||||||
|
|
||||||
|
|
||||||
CMapScene::sMapLevelData CMapScene::s_mapLevelData[5]=
|
CMapScene::sMapLevelData CMapScene::s_mapLevelData[MAP_NUM_CHAPTERS][MAP_NUM_LEVELS_PER_CHAPTER]=
|
||||||
{
|
{
|
||||||
// Chapter 1
|
// mapFile globalLevelNumber spatularOrTokenCounts questItemFrame kelpWorldLevel
|
||||||
{
|
{
|
||||||
{ MAP_C1_L1_GFX, MAP_C1_L2_GFX, MAP_C1_L3_GFX, MAP_C1_L4_GFX, MAP_C1_BOSS_GFX, MAP_C1_FAIR_GFX },
|
{ MAP_C1_L1_GFX, 0, CHAPTER01_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C1_L1_QUEST_ITEM, false },
|
||||||
{ 0, 1, 2, 3, -1, 20 },
|
{ MAP_C1_L2_GFX, 1, CHAPTER01_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C1_L2_QUEST_ITEM, false },
|
||||||
{ FRM__C1_L1_QUEST_ITEM, FRM__C1_L2_QUEST_ITEM, FRM__C1_L3_QUEST_ITEM, FRM__C1_L4_QUEST_ITEM},
|
{ MAP_C1_L3_GFX, 2, CHAPTER01_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C1_L3_QUEST_ITEM, false },
|
||||||
|
{ MAP_C1_L4_GFX, 3, CHAPTER01_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C1_L4_QUEST_ITEM, false },
|
||||||
|
{ MAP_C1_FAIR_GFX, 20, CHAPTER06_LEVEL01_INF_TOTAL_ITEM_KELP_TOKEN, -1, true },
|
||||||
},
|
},
|
||||||
// Chapter 2
|
|
||||||
{
|
{
|
||||||
{ MAP_C2_L1_GFX, MAP_C2_L2_GFX, MAP_C2_L3_GFX, MAP_C2_L4_GFX, MAP_C2_BOSS_GFX, MAP_C2_FAIR_GFX },
|
{ MAP_C2_L1_GFX, 4, CHAPTER02_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C2_L1_QUEST_ITEM, false },
|
||||||
{ 4, 5, 6, 7, -1, 21 },
|
{ MAP_C2_L2_GFX, 5, CHAPTER02_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C2_L2_QUEST_ITEM, false },
|
||||||
{ FRM__C2_L1_QUEST_ITEM, FRM__C2_L2_QUEST_ITEM, FRM__C2_L3_QUEST_ITEM, FRM__C2_L4_QUEST_ITEM},
|
{ MAP_C2_L3_GFX, 6, CHAPTER02_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C2_L3_QUEST_ITEM, false },
|
||||||
|
{ MAP_C2_L4_GFX, 7, CHAPTER02_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C2_L4_QUEST_ITEM, false },
|
||||||
|
{ MAP_C2_FAIR_GFX, 21, CHAPTER06_LEVEL02_INF_TOTAL_ITEM_KELP_TOKEN, -1, true },
|
||||||
},
|
},
|
||||||
// Chapter 3
|
|
||||||
{
|
{
|
||||||
{ MAP_C3_L1_GFX, MAP_C3_L2_GFX, MAP_C3_L3_GFX, MAP_C3_L4_GFX, MAP_C3_BOSS_GFX, MAP_C3_FAIR_GFX },
|
{ MAP_C3_L1_GFX, 8, CHAPTER03_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C3_L1_QUEST_ITEM, false },
|
||||||
{ 8, 9, 10, 11, -1, 22 },
|
{ MAP_C3_L2_GFX, 9, CHAPTER03_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C3_L2_QUEST_ITEM, false },
|
||||||
{ FRM__C3_L1_QUEST_ITEM, FRM__C3_L2_QUEST_ITEM, FRM__C3_L3_QUEST_ITEM, FRM__C3_L4_QUEST_ITEM},
|
{ MAP_C3_L3_GFX, 10, CHAPTER03_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C3_L3_QUEST_ITEM, false },
|
||||||
|
{ MAP_C3_L4_GFX, 11, CHAPTER03_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C3_L4_QUEST_ITEM, false },
|
||||||
|
{ MAP_C3_FAIR_GFX, 22, CHAPTER06_LEVEL03_INF_TOTAL_ITEM_KELP_TOKEN, -1, true },
|
||||||
},
|
},
|
||||||
// Chapter 4
|
|
||||||
{
|
{
|
||||||
{ MAP_C4_L1_GFX, MAP_C4_L2_GFX, MAP_C4_L3_GFX, MAP_C4_L4_GFX, MAP_C4_BOSS_GFX, MAP_C4_FAIR_GFX },
|
{ MAP_C4_L1_GFX, 12, CHAPTER04_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C4_QUEST_ITEM_1, false },
|
||||||
{ 12, 13, 14, 15, -1, 23 },
|
{ MAP_C4_L2_GFX, 13, CHAPTER04_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C4_QUEST_ITEM_1, false },
|
||||||
{ FRM__C4_QUEST_ITEM_1, FRM__C4_QUEST_ITEM_1, FRM__C4_QUEST_ITEM_1, FRM__C4_QUEST_ITEM_2 },
|
{ MAP_C4_L3_GFX, 14, CHAPTER04_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C4_QUEST_ITEM_1, false },
|
||||||
|
{ MAP_C4_L4_GFX, 15, CHAPTER04_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C4_QUEST_ITEM_2, false },
|
||||||
|
{ MAP_C4_FAIR_GFX, 23, CHAPTER06_LEVEL04_INF_TOTAL_ITEM_KELP_TOKEN, -1, true },
|
||||||
},
|
},
|
||||||
// Chapter 5
|
|
||||||
{
|
{
|
||||||
{ MAP_C5_L1_GFX, MAP_C5_L2_GFX, MAP_C5_L3_GFX, MAP_C5_L4_GFX, MAP_C5_BOSS_GFX, MAP_C5_FAIR_GFX },
|
{ MAP_C5_L1_GFX, 16, CHAPTER05_LEVEL01_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C5_L1_QUEST_ITEM, false },
|
||||||
{ 16, 17, 18, 19, -1, 24 },
|
{ MAP_C5_L2_GFX, 17, CHAPTER05_LEVEL02_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C5_L2_QUEST_ITEM, false },
|
||||||
{ FRM__C5_L1_QUEST_ITEM, FRM__C5_L2_QUEST_ITEM, FRM__C5_L3_QUEST_ITEM, FRM__C5_L4_QUEST_ITEM},
|
{ MAP_C5_L3_GFX, 18, CHAPTER05_LEVEL03_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C5_L3_QUEST_ITEM, false },
|
||||||
|
{ MAP_C5_L4_GFX, 19, CHAPTER05_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, FRM__C5_L4_QUEST_ITEM, false },
|
||||||
|
{ MAP_C5_FAIR_GFX, 24, CHAPTER06_LEVEL05_INF_TOTAL_ITEM_KELP_TOKEN, -1, true },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DVECTOR CMapScene::s_mapLevelPositions[MAP_NUM_LEVELS_PER_CHAPTER]=
|
||||||
|
{
|
||||||
|
{ 42,49 },
|
||||||
|
{ 186,49 },
|
||||||
|
{ 330,49 },
|
||||||
|
{ 42,113 },
|
||||||
|
{ 330,113 },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
extern int s_globalLevelSelectThing;
|
extern int s_globalLevelSelectThing;
|
||||||
|
|
||||||
|
|
||||||
@ -173,41 +217,48 @@ void CMapScene::shutdown()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::render()
|
void CMapScene::render()
|
||||||
{
|
{
|
||||||
int i,x,y,xpos,ypos;
|
sMapLevelData *level;
|
||||||
int compilerGetsComfused;
|
int i;
|
||||||
char spatCount[10];
|
|
||||||
sFrameHdr *fh;
|
sFrameHdr *fh;
|
||||||
POLY_FT4 *ft4;
|
DVECTOR pos;
|
||||||
|
char buf[100];
|
||||||
|
|
||||||
// Render spatula counts and quest items
|
level=&s_mapLevelData[m_currentChapterSelection][0];
|
||||||
|
|
||||||
|
// Render spatula/kelp counts and quest items
|
||||||
|
for(i=0;i<MAP_NUM_LEVELS_PER_CHAPTER;i++)
|
||||||
|
{
|
||||||
|
pos=s_mapLevelPositions[i];
|
||||||
|
|
||||||
|
if(!level->m_kelpWorldLevel)
|
||||||
|
{
|
||||||
|
// Normal level
|
||||||
|
POLY_FT4 *ft4;
|
||||||
m_font->setColour(253,251,67);
|
m_font->setColour(253,251,67);
|
||||||
i=0;
|
sprintf(buf,"00/%d",level->m_spatularOrTokenCounts);
|
||||||
ypos=MAP_PARCHMENT_START_Y+MAP_LEVEL_TOP_BORDER;
|
fh=CGameScene::getSpriteBank()->getFrameHeader(level->m_questItemFrame);
|
||||||
for(y=0;y<2;y++)
|
ft4=CGameScene::getSpriteBank()->printFT4(fh,pos.vx+MAP_LEVEL_WIDTH-fh->W,pos.vy+MAP_LEVEL_HEIGHT-fh->H,0,0,10);
|
||||||
{
|
|
||||||
xpos=256-((MAP_LEVEL_WIDTH*3)/2)-MAP_LEVEL_X_SPACING;
|
|
||||||
compilerGetsComfused=y==0?3:1; // 3 on top row, 1 on bottom - put this in the for loop and the complier breaks :o
|
|
||||||
for(x=0;x<compilerGetsComfused;x++)
|
|
||||||
{
|
|
||||||
sprintf(spatCount,"%d/%d",getSpatulaCollectedCount(m_currentChapterSelection,i),getSpatulaAvailableCount(m_currentChapterSelection,i));
|
|
||||||
m_font->print(xpos,ypos,spatCount);
|
|
||||||
fh=CGameScene::getSpriteBank()->getFrameHeader(s_mapLevelData[m_currentChapterSelection].m_questItemFrames[i]);
|
|
||||||
ft4=CGameScene::getSpriteBank()->printFT4Scaled(fh,xpos+MAP_LEVEL_WIDTH-fh->W,ypos+MAP_LEVEL_HEIGHT-fh->H,0,0,10,128);
|
|
||||||
if(!hasQuestItemBeenCollected(m_currentChapterSelection,i))
|
if(!hasQuestItemBeenCollected(m_currentChapterSelection,i))
|
||||||
{
|
{
|
||||||
setRGB0(ft4,10,10,10);
|
setRGB0(ft4,50,50,50);
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
xpos+=MAP_LEVEL_WIDTH+MAP_LEVEL_X_SPACING;
|
|
||||||
}
|
}
|
||||||
ypos+=MAP_LEVEL_HEIGHT+MAP_LEVEL_Y_SPACING;
|
else
|
||||||
|
{
|
||||||
|
// Bonuse level
|
||||||
|
m_font->setColour(67,251,67);
|
||||||
|
sprintf(buf,"00/%d",level->m_spatularOrTokenCounts);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_font->print(pos.vx,pos.vy,buf);
|
||||||
|
|
||||||
|
level++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Selection cursor
|
// Selection cursor
|
||||||
fh=CGameScene::getSpriteBank()->getFrameHeader(FRM__MAPPOINTER);
|
fh=CGameScene::getSpriteBank()->getFrameHeader(FRM__MAPPOINTER);
|
||||||
CGameScene::getSpriteBank()->printFT4(fh,m_pointerPos.vx-(fh->W/2),m_pointerPos.vy-(fh->H/2),0,0,9);
|
CGameScene::getSpriteBank()->printFT4(fh,m_pointerPos.vx-(fh->W/2),m_pointerPos.vy-(fh->H/2),0,0,9);
|
||||||
|
|
||||||
char buf[100];
|
|
||||||
sprintf(buf,"Chapter %d, Level %d",m_currentChapterSelection+1,m_currentLevelSelection+1);
|
sprintf(buf,"Chapter %d, Level %d",m_currentChapterSelection+1,m_currentLevelSelection+1);
|
||||||
m_font->setColour(0,255,0);
|
m_font->setColour(0,255,0);
|
||||||
m_font->print(24,24,buf);
|
m_font->print(24,24,buf);
|
||||||
@ -229,12 +280,12 @@ void CMapScene::think(int _frames)
|
|||||||
// Change chapter
|
// Change chapter
|
||||||
if(PadGetDown(0)&PAD_UP)
|
if(PadGetDown(0)&PAD_UP)
|
||||||
{
|
{
|
||||||
if(++m_currentChapterSelection>4)m_currentChapterSelection=0;
|
if(++m_currentChapterSelection>=MAP_NUM_CHAPTERS)m_currentChapterSelection=0;
|
||||||
generateMapScreenImage();
|
generateMapScreenImage();
|
||||||
}
|
}
|
||||||
else if(PadGetDown(0)&PAD_DOWN)
|
else if(PadGetDown(0)&PAD_DOWN)
|
||||||
{
|
{
|
||||||
if(--m_currentChapterSelection<0)m_currentChapterSelection=4;
|
if(--m_currentChapterSelection<0)m_currentChapterSelection=MAP_NUM_CHAPTERS-1;
|
||||||
generateMapScreenImage();
|
generateMapScreenImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +294,7 @@ void CMapScene::think(int _frames)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(--m_currentLevelSelection<0)m_currentLevelSelection=5;
|
if(--m_currentLevelSelection<0)m_currentLevelSelection=MAP_NUM_LEVELS_PER_CHAPTER-1;
|
||||||
}
|
}
|
||||||
while(!isLevelOpen(m_currentChapterSelection,m_currentLevelSelection));
|
while(!isLevelOpen(m_currentChapterSelection,m_currentLevelSelection));
|
||||||
}
|
}
|
||||||
@ -251,7 +302,7 @@ void CMapScene::think(int _frames)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(++m_currentLevelSelection>5)m_currentLevelSelection=0;
|
if(++m_currentLevelSelection>=MAP_NUM_LEVELS_PER_CHAPTER)m_currentLevelSelection=0;
|
||||||
}
|
}
|
||||||
while(!isLevelOpen(m_currentChapterSelection,m_currentLevelSelection));
|
while(!isLevelOpen(m_currentChapterSelection,m_currentLevelSelection));
|
||||||
}
|
}
|
||||||
@ -294,7 +345,7 @@ void CMapScene::think(int _frames)
|
|||||||
|
|
||||||
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
||||||
{
|
{
|
||||||
s_globalLevelSelectThing=s_mapLevelData[m_currentChapterSelection].m_globalLevelNumbers[m_currentLevelSelection];
|
s_globalLevelSelectThing=s_mapLevelData[m_currentChapterSelection][m_currentLevelSelection].m_globalLevelNumber;
|
||||||
m_readyToExit=true;
|
m_readyToExit=true;
|
||||||
// CFader::setFadingOut(CFader::BLACK_FADE);
|
// CFader::setFadingOut(CFader::BLACK_FADE);
|
||||||
GameState::setNextScene(&GameScene);
|
GameState::setNextScene(&GameScene);
|
||||||
@ -323,27 +374,18 @@ int CMapScene::readyToShutdown()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::generateMapScreenImage()
|
void CMapScene::generateMapScreenImage()
|
||||||
{
|
{
|
||||||
int i,x,y,xpos,ypos;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
m_currentLevelSelection=0;
|
m_currentLevelSelection=0;
|
||||||
memset(m_screenImage,0,512*256*2);
|
memset(m_screenImage,0,512*256*2);
|
||||||
copyImageToScreen(MAP_MAP_BACKGROUND_GFX,MAP_PARCHMENT_START_X,MAP_PARCHMENT_START_Y,MAP_PARCHMENT_WIDTH,MAP_PARCHMENT_HEIGHT);
|
copyImageToScreen(MAP_MAP_BACKGROUND_GFX,MAP_PARCHMENT_START_X,MAP_PARCHMENT_START_Y,MAP_PARCHMENT_WIDTH,MAP_PARCHMENT_HEIGHT);
|
||||||
i=0;
|
for(i=0;i<MAP_NUM_LEVELS_PER_CHAPTER;i++)
|
||||||
ypos=MAP_PARCHMENT_START_Y+MAP_LEVEL_TOP_BORDER;
|
|
||||||
for(y=0;y<2;y++)
|
|
||||||
{
|
|
||||||
xpos=256-((MAP_LEVEL_WIDTH*3)/2)-MAP_LEVEL_X_SPACING;
|
|
||||||
for(x=0;x<3;x++)
|
|
||||||
{
|
{
|
||||||
if(isLevelOpen(m_currentChapterSelection,i))
|
if(isLevelOpen(m_currentChapterSelection,i))
|
||||||
{
|
{
|
||||||
copyImageToScreen(s_mapLevelData[m_currentChapterSelection].m_mapFiles[i],xpos,ypos,MAP_LEVEL_WIDTH,MAP_LEVEL_HEIGHT);
|
copyImageToScreen(s_mapLevelData[m_currentChapterSelection][i].m_mapFile,s_mapLevelPositions[i].vx,s_mapLevelPositions[i].vy,MAP_LEVEL_WIDTH,MAP_LEVEL_HEIGHT);
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
xpos+=MAP_LEVEL_WIDTH+MAP_LEVEL_X_SPACING;
|
|
||||||
}
|
|
||||||
ypos+=MAP_LEVEL_HEIGHT+MAP_LEVEL_Y_SPACING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pointerPos=getPointerTargetPosition();
|
m_pointerPos=getPointerTargetPosition();
|
||||||
@ -385,13 +427,11 @@ void CMapScene::copyImageToScreen(int _file,int _x,int _y,int _w,int _h)
|
|||||||
DVECTOR CMapScene::getPointerTargetPosition()
|
DVECTOR CMapScene::getPointerTargetPosition()
|
||||||
{
|
{
|
||||||
DVECTOR pos;
|
DVECTOR pos;
|
||||||
pos.vx=256-((MAP_LEVEL_WIDTH*3)/2)-MAP_LEVEL_X_SPACING+
|
|
||||||
((m_currentLevelSelection%3)*(MAP_LEVEL_WIDTH+MAP_LEVEL_X_SPACING))+
|
pos=s_mapLevelPositions[m_currentLevelSelection];
|
||||||
(MAP_LEVEL_WIDTH/2);
|
pos.vx+=(MAP_LEVEL_WIDTH/2);
|
||||||
pos.vy=MAP_PARCHMENT_START_Y+MAP_LEVEL_TOP_BORDER+
|
pos.vy+=MAP_LEVEL_HEIGHT+(msin(m_pointerSin)*4>>12);
|
||||||
((m_currentLevelSelection/3)*(MAP_LEVEL_HEIGHT+MAP_LEVEL_Y_SPACING))+
|
|
||||||
(MAP_LEVEL_HEIGHT)+
|
|
||||||
(msin(m_pointerSin)*4>>12);
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,24 +442,31 @@ DVECTOR CMapScene::getPointerTargetPosition()
|
|||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int CMapScene::isLevelOpen(int _chapter,int _level)
|
int CMapScene::isLevelOpen(unsigned int _chapter,unsigned int _level)
|
||||||
{
|
{
|
||||||
return _level!=4; // no boss levels atm..
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMapScene::getSpatulaCollectedCount(int _chapter,int _level)
|
int CMapScene::getSpatulaCollectedCount(unsigned int _chapter,unsigned int _level)
|
||||||
{
|
{
|
||||||
return CGameSlotManager::getSlotData()->getSpatulaCollectedCount(_chapter,_level);
|
return CGameSlotManager::getSlotData()->getSpatulaCollectedCount(_chapter,_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMapScene::getSpatulaAvailableCount(int _chapter,int _level)
|
int CMapScene::getSpatulaAvailableCount(unsigned int _chapter,unsigned int _level)
|
||||||
{
|
{
|
||||||
return 99;
|
ASSERT(!s_mapLevelData[_chapter][_level].m_kelpWorldLevel);
|
||||||
|
return s_mapLevelData[_chapter][_level].m_spatularOrTokenCounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMapScene::hasQuestItemBeenCollected(int _chapter,int _level)
|
int CMapScene::getKelpTokenAvailableCount(unsigned int _chapter,unsigned int _level)
|
||||||
{
|
{
|
||||||
return true;
|
ASSERT(s_mapLevelData[_chapter][_level].m_kelpWorldLevel);
|
||||||
|
return s_mapLevelData[_chapter][_level].m_spatularOrTokenCounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMapScene::hasQuestItemBeenCollected(unsigned int _chapter,unsigned int _level)
|
||||||
|
{
|
||||||
|
return _level&1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,38 +52,42 @@ public:
|
|||||||
private:
|
private:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MAP_PARCHMENT_WIDTH=496,
|
MAP_PARCHMENT_WIDTH=512,
|
||||||
MAP_PARCHMENT_HEIGHT=190,
|
MAP_PARCHMENT_HEIGHT=256,
|
||||||
MAP_PARCHMENT_START_X=(512-MAP_PARCHMENT_WIDTH)/2,
|
MAP_PARCHMENT_START_X=0,
|
||||||
MAP_PARCHMENT_START_Y=20,
|
MAP_PARCHMENT_START_Y=0,
|
||||||
|
|
||||||
MAP_LEVEL_WIDTH=140,
|
MAP_LEVEL_WIDTH=140,
|
||||||
MAP_LEVEL_HEIGHT=60,
|
MAP_LEVEL_HEIGHT=60,
|
||||||
MAP_LEVEL_TOP_BORDER=20,
|
MAP_LEVEL_TOP_BORDER=20,
|
||||||
MAP_LEVEL_Y_SPACING=8,
|
|
||||||
MAP_LEVEL_X_SPACING=4,
|
|
||||||
|
|
||||||
|
|
||||||
MAP_INSTRUCTIONS_WIDTH=416,
|
MAP_INSTRUCTIONS_WIDTH=416,
|
||||||
MAP_INSTRUCTIONS_HEIGHT=32,
|
MAP_INSTRUCTIONS_HEIGHT=32,
|
||||||
MAP_INSTRUCTIONS_BOTTOM_OFFSET=40,
|
MAP_INSTRUCTIONS_BOTTOM_OFFSET=40,
|
||||||
|
|
||||||
|
MAP_NUM_CHAPTERS=5,
|
||||||
|
MAP_NUM_LEVELS_PER_CHAPTER=5,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int m_mapFiles[6];
|
int m_mapFile;
|
||||||
int m_globalLevelNumbers[6];
|
int m_globalLevelNumber;
|
||||||
int m_questItemFrames[4];
|
int m_spatularOrTokenCounts;
|
||||||
|
int m_questItemFrame;
|
||||||
|
int m_kelpWorldLevel;
|
||||||
} sMapLevelData;
|
} sMapLevelData;
|
||||||
|
|
||||||
|
|
||||||
void generateMapScreenImage();
|
void generateMapScreenImage();
|
||||||
void copyImageToScreen(int _file,int _x,int _y,int _w,int _h);
|
void copyImageToScreen(int _file,int _x,int _y,int _w,int _h);
|
||||||
DVECTOR getPointerTargetPosition();
|
DVECTOR getPointerTargetPosition();
|
||||||
int isLevelOpen(int _chapter,int _level);
|
int isLevelOpen(unsigned int _chapter,unsigned int _level);
|
||||||
int getSpatulaCollectedCount(int _chapter,int _level);
|
int getSpatulaCollectedCount(unsigned int _chapter,unsigned int _level);
|
||||||
int getSpatulaAvailableCount(int _chapter,int _level);
|
int getSpatulaAvailableCount(unsigned int _chapter,unsigned int _level);
|
||||||
int hasQuestItemBeenCollected(int _chapter,int _level);
|
int getKelpTokenAvailableCount(unsigned int _chapter,unsigned int _level);
|
||||||
|
int hasQuestItemBeenCollected(unsigned int _chapter,unsigned int _level);
|
||||||
|
|
||||||
|
|
||||||
class FontBank *m_font;
|
class FontBank *m_font;
|
||||||
@ -97,7 +101,8 @@ private:
|
|||||||
DVECTOR m_pointerTarget;
|
DVECTOR m_pointerTarget;
|
||||||
int m_pointerSin;
|
int m_pointerSin;
|
||||||
|
|
||||||
static sMapLevelData s_mapLevelData[5];
|
static sMapLevelData s_mapLevelData[MAP_NUM_CHAPTERS][MAP_NUM_LEVELS_PER_CHAPTER];
|
||||||
|
static DVECTOR s_mapLevelPositions[MAP_NUM_LEVELS_PER_CHAPTER];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|