SBSPSS/source/level/level.cpp
Charles a067d6d551
2001-03-21 20:00:22 +00:00

554 lines
51 KiB
C++

/*************/
/*** Level ***/
/*************/
#include "system\global.h"
#include "fileio\fileio.h"
#include "utils\utils.h"
#include "gfx\tpage.h"
#include "gfx\prim.h"
#include <DStructs.h>
#include "game\game.h"
#include "level\level.h"
#include "level\layertile.h"
#include "level\layerback.h"
#include "level\layertile3d.h"
#include "level\layercollision.h"
#ifndef __TRIGGERS_TLEVEXIT_H__
#include "triggers\tlevexit.h"
#endif
#include "pad\pads.h"
DVECTOR CLevel::MapPos;
DVECTOR CLevel::s_playerSpawnPos;
struct sLvlTab
{
FileEquate TileBank,Level,Tex;
int exitX,exitY,exitW,exitH;
int spawnX,spawnY;
int Spr0,Spr1;
};
sLvlTab LvlTable[]=
{
// C1
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0101_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //0
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0102_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0103_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0104_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0105_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0106_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0107_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0108_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0109_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0110_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0111_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL01_TBK,LEVELS_CHAPTER01_LEVEL0112_LVL,LEVELS_CHAPTER01_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0201_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //12
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0202_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0203_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0204_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0205_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0206_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0207_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0208_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0209_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0210_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0211_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL02_TBK,LEVELS_CHAPTER01_LEVEL0212_LVL,LEVELS_CHAPTER01_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0301_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //24
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0302_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0303_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0304_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0305_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0306_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0307_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0308_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0309_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0310_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0311_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL03_TBK,LEVELS_CHAPTER01_LEVEL0312_LVL,LEVELS_CHAPTER01_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0401_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //36
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0402_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0403_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0404_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0405_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0406_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0407_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0408_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0409_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0410_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0411_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER01_LEVEL04_TBK,LEVELS_CHAPTER01_LEVEL0412_LVL,LEVELS_CHAPTER01_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
// C2
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0101_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 95*16,29*16,98*16,32*16, 14*16,6*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //48
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0102_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 96*16,66*16,99*16,69*16, 5*16,5*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0103_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 1*16,42*16,4*16,45*16, 81*16,7*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0104_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 85*16,67*16,88*16,70*16, 86*16,22*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0105_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 1*16,63*16,4*16,66*16, 62*16,17*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0106_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 71*16,26*16,74*16,29*16, 3*16,85*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0107_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 93*16,15*16,96*16,18*16, 2*16,20*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0108_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0109_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0110_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0111_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL01_TBK,LEVELS_CHAPTER02_LEVEL0112_LVL,LEVELS_CHAPTER02_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0201_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0*16,33*16,3*16,41*16, 27*16,19*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //60
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0202_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 122*16,126*16,134*16,129*16, 32*16,75*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0203_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 92*16,11*16,95*16,27*16, 64*16,93*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0204_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 76*16,10*16,79*16,23*16, 58*16,68*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0205_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0206_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0207_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0208_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0209_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0210_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0211_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL02_TBK,LEVELS_CHAPTER02_LEVEL0212_LVL,LEVELS_CHAPTER02_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0301_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 129*16,75*16,133*16,84*16, 8*16,23*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //72
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0302_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 65*16,71*16,68*16,79*16, 3*16,8*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0303_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 169*16,16*16,174*16,37*16, 5*16,35*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0304_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 70*16,9*16,73*16,20*16, 5*16,76*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0305_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 131*16,13*16,137*16,26*16, 5*16,26*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0306_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 112*16,5*16,117*16,18*16, 3*16,18*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0307_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0308_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0309_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0310_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0311_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL03_TBK,LEVELS_CHAPTER02_LEVEL0312_LVL,LEVELS_CHAPTER02_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0401_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 146*16,44*16,149*16,56*16, 4*16,16*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //84
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0402_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 127*16,15*16,129*16,29*16, 3*16,45*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0403_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 223*16,81*16,229*16,94*16, 4*16,42*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0404_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 130*16,52*16,134*16,63*16, 4*16,67*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0405_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 126*16,44*16,129*16,55*16, 3*16,35*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0406_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0407_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0408_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0409_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0410_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0411_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER02_LEVEL04_TBK,LEVELS_CHAPTER02_LEVEL0412_LVL,LEVELS_CHAPTER02_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
// C3
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0101_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //96
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0102_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0103_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 110*16,0*16,113*16,31*16, 24*16,8*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0104_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 85*16,39*16,106*16,42*16, 0*16,13*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0105_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 90*16,30*16,93*16,40*16, 23*16,18*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0106_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 84*16,10*16,87*16,24*16, 80*16,10*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0107_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 74*16,30*16,77*16,40*16, 1*16,30*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0108_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0109_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0110_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0111_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL01_TBK,LEVELS_CHAPTER03_LEVEL0112_LVL,LEVELS_CHAPTER03_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0201_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 152*16,19*16,159*16,26*19, 3*16,32*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //108
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0202_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 171*16,24*16,179*16,31*16, 2*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0203_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 148*16,7*16,155*16,14*16, 2*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0204_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 184*16,22*16,191*16,29*16, 2*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0205_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 161*16,32*16,165*16,39*16, 2*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0206_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 115*16,8*16,122*16,15*16, 2*16,28*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0207_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 203*16,28*16,210*16,34*16, 2*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0208_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0209_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0210_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0211_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL02_TBK,LEVELS_CHAPTER03_LEVEL0212_LVL,LEVELS_CHAPTER03_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0301_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 140*16,12*16,147*16,19*16, 2*16,30*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //120
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0302_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 140*16,12*16,147*16,19*16, 2*16,30*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0303_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 88*16,34*16,95*16,41*16, 2*16,19*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0304_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 49*16,6*16,56*16,13*16, 2*16,21*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0305_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 144*16,27*16,151*16,34*16, 2*16,19*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0306_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 157*16,25*16,164*16,32*16, 2*16,20*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0307_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0308_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0309_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0310_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0311_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL03_TBK,LEVELS_CHAPTER03_LEVEL0312_LVL,LEVELS_CHAPTER03_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0401_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 160*16,16*16,167*16,23*16, 0*16,19*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE}, //132
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0402_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 19*16,0*16,25*16,4*16, 19*16,4*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0403_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 158*16,25*16,165*16,32*16, 0*16,25*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0404_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 149*16,28*16,164*16,35*16, 0*16,9*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0405_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0*16,42*16,7*16,49*16, 111*16,21*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0405X_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0*16,16*16,7*16,18*16, 9*16,16*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0406_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 123*16,25*16,128*16,30*16, 32*16,2*16, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0407_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0408_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0409_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0410_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
{LEVELS_CHAPTER03_LEVEL04_TBK,LEVELS_CHAPTER03_LEVEL0411_LVL,LEVELS_CHAPTER03_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FISHBONE,CLayerBack::FISHBONE},
// C4
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0101_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 15*16,98*16,19*16,103*16, 4*16,9*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL}, //144
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0102_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 13*16,118*16,17*16,123*16, 45*16,35*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0103_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 118*16,31*16,122*16,36*16, 7*16,43*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0104_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 152*16,104*16,156*16,109*16, 118*16,13*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0105_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0106_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0107_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0108_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0109_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0110_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0111_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL01_TBK,LEVELS_CHAPTER04_LEVEL0112_LVL,LEVELS_CHAPTER04_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0201_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 219*16,15*16,222*16,18*16, 0*16,28*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //156
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0202_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 196*16,25*16,199*16,28*16, 0*16,16*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0203_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 156*16,23*16,159*16,26*16, 0*16,27*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0204_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 180*16,33*16,183*16,36*16, 0*16,25*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0205_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 226*16,24*16,229*16,27*16, 2*16,67*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0206_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0207_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0208_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0209_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0210_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0211_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL02_TBK,LEVELS_CHAPTER04_LEVEL0212_LVL,LEVELS_CHAPTER04_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0301_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 74*16,6*16,81*16,13*16, 2*16,13*16, CLayerBack::PUMPKIN,CLayerBack::GHOST}, //168
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0302_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 24*16,0*16,28*16,1*16, 26*16,0*16, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0303_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 79*16,5*16,86*16,12*16, 2*16,16*16, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0304_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 79*16,9*16,86*16,16*16, 2*16,16*16, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0305_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 97*16,4*16,104*16,11*16, 2*16,16*16, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0306_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 32*16,0*16,38*16,1*16, 33*16,0*16, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0307_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0308_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0309_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0310_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0311_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL03_TBK,LEVELS_CHAPTER04_LEVEL0312_LVL,LEVELS_CHAPTER04_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::PUMPKIN,CLayerBack::GHOST},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0401_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 99*16,36*16,102*16,39*16, 2*16,20*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //180
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0402_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 173*16,36*16,176*16,39*16, 33*16,4*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0403_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 3*16,36*16,6*16,39*16, 169*16,3*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0404_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 177*16,36*16,180*16,39*16, 33*16,4*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0405_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 68*16,0*16,70*16,3*16, 17*16,4*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0406_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 67*16,0*16,70*16,3*16, 31*16,39*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0407_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 27*16,0*16,30*16,3*16, 15*16,59*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0408_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0409_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0410_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0411_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER04_LEVEL04_TBK,LEVELS_CHAPTER04_LEVEL0412_LVL,LEVELS_CHAPTER04_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
// C5
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0101_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 214*16,8*16,221*16,15*16, 0*16,8*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //192
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0102_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 210*16,12*16,217*16,19*16, 0*16,8*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0103_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 233*16,4*16,240*16,11*16, 0*16,17*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0104_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0105_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0106_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0107_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0108_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0109_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0110_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0111_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL01_TBK,LEVELS_CHAPTER05_LEVEL0112_LVL,LEVELS_CHAPTER05_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0201_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 164*16,21*16,171*16,28*16, 0*16,13*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //204
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0202_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 218*16,30*16,225*16,37*16, 8*16,18*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0203_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 173*16,26*16,180*16,33*16, 4*16,24*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0204_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 134*16,12*16,141*16,19*16, 0*16,25*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0205_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0206_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0207_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0208_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0209_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0210_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0211_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL02_TBK,LEVELS_CHAPTER05_LEVEL0212_LVL,LEVELS_CHAPTER05_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0301_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 16*16,67*16,19*16,70*16, 10*16,16*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //216
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0302_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 8*16,55*16,11*16,58*16, 160*16,18*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0303_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 14*16,14*16,17*16,17*16, 124*16,14*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0304_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 71*16,8*16,74*16,11*16, 44*16,17*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0305_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 15*16,0*16,18*16,3*16, 177*16,0*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0306_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0307_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0308_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0309_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0310_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0311_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL03_TBK,LEVELS_CHAPTER05_LEVEL0312_LVL,LEVELS_CHAPTER05_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0401_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 56*16,19*16,63*16,26*16, 5*16,16*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL}, //228
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0402_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 48*16,31*16,51*16,35*16, 5*16,9*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0403_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 67*16,27*16,70*16,31*16, 41*16,4*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0404_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 109*16,50*16,112*16,54*16, 12*16,16*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0405_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 64*16,15*16,67*16,19*16, 82*16,25*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0406_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 16*16,4*16,19*16,7*16, 11*16,35*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0407_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 80*16,3*16,82*16,11*16, 19*16,42*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0408_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 38*16,65*16,43*16,71*16, 2*16,13*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0409_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0410_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0411_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER05_LEVEL04_TBK,LEVELS_CHAPTER05_LEVEL0412_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
// C6
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0101_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 152*16,22*16,155*16,25*16, 2*16,25*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //240
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0102_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 8*16,100*16,11*16,103*16, 10*16,30*16, CLayerBack::BUBBLE,CLayerBack::BUBBLESMALL},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0103_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0104_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0105_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0106_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0107_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0108_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0109_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0110_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0111_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL01_TBK,LEVELS_CHAPTER06_LEVEL0112_LVL,LEVELS_CHAPTER06_LEVEL01_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0201_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER}, //252
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0202_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0203_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0204_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0205_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0206_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0207_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0208_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0209_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0210_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0211_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL02_TBK,LEVELS_CHAPTER06_LEVEL0212_LVL,LEVELS_CHAPTER06_LEVEL02_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0301_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 185*16,22*16,189*16,25*16, 4*16,15*16, CLayerBack::FLOWER,CLayerBack::FLOWER}, //264
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0302_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 211*16,62*16,214*16,65*16, 3*16,21*16, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0303_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0304_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0305_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0306_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0307_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0308_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0309_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0310_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0311_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL03_TBK,LEVELS_CHAPTER06_LEVEL0312_LVL,LEVELS_CHAPTER06_LEVEL03_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0401_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0402_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0403_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0404_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0405_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0406_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0407_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0408_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0409_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0410_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0411_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
{LEVELS_CHAPTER06_LEVEL04_TBK,LEVELS_CHAPTER06_LEVEL0412_LVL,LEVELS_CHAPTER06_LEVEL04_TEX, 0,0,50,50, 268,160, CLayerBack::FLOWER,CLayerBack::FLOWER},
};
const static int LvlTableSize=sizeof(LvlTable)/sizeof(sLvlTab);
extern int s_globalLevelSelectThing;
#if defined(__USER_daveo__)
int Lvl=-1;
#endif
CLevelExitTrigger *exitTrigger;
// (pkg)
int ex,ey,ew,eh;
// (pkg)
/*****************************************************************************/
void CLevel::init()
{
#if defined(__USER_daveo__)
if (Lvl>-1) s_globalLevelSelectThing=Lvl;
#endif
if (s_globalLevelSelectThing>=LvlTableSize) s_globalLevelSelectThing=0;
while (CFileIO::getFileSize(LvlTable[s_globalLevelSelectThing ].Level)<=3636) // Dodgy blank level skip
{
s_globalLevelSelectThing++;
if (s_globalLevelSelectThing>=LvlTableSize) s_globalLevelSelectThing=0;
}
for (int i=0; i<CLayerTile::LAYER_TILE_TYPE_MAX; i++)
{
TileLayers[i]=0;
}
CollisionLayer=0;
MapPos.vx=0;
MapPos.vy=0;
sLvlTab *lvlTab;
lvlTab=&LvlTable[s_globalLevelSelectThing];
TileBank=(sTile *)CFileIO::loadFile(lvlTab->TileBank,"Tile Bank Data");
LevelHdr=(sLvlHdr *)CFileIO::loadFile(lvlTab->Level,"Level Data");
m_levelTPage=TPLoadTex(lvlTab->Tex);
// Assuming this will come from the level data eventually.. (pkg)
exitTrigger=new ("LevelExitTrigger") CLevelExitTrigger();
exitTrigger->init();
// (pkg)
#if defined(__USER_art__) || defined(__USER_sbart__) || defined(__USER_paul__)
if(lvlTab->exitX==0&&lvlTab->exitY==0)
{
PAUL_DBGMSG("-- NO LEVEL EXIT DEFINED FOR %d",s_globalLevelSelectThing);
}
if(lvlTab->spawnX==268&&lvlTab->spawnY==160)
{
PAUL_DBGMSG("-- NO LEVEL START DEFINED FOR %d",s_globalLevelSelectThing);
}
#endif
ex=lvlTab->exitX;
ey=lvlTab->exitY;
ew=lvlTab->exitW-ex;
eh=lvlTab->exitH-ey;
s_playerSpawnPos.vx=lvlTab->spawnX;
s_playerSpawnPos.vy=lvlTab->spawnY;
// (pkg)
initLayers();
}
/*****************************************************************************/
void CLevel::initLayers()
{
// Back
if (LevelHdr->BackLayer)
{
sLayerHdr *Layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->BackLayer);
CLayerTile *NewLayer=new ("Back Layer") CLayerBack(Layer, TileBank);
((CLayerBack*)NewLayer)->SetFrames(LvlTable[s_globalLevelSelectThing].Spr0,LvlTable[s_globalLevelSelectThing].Spr1);
NewLayer->init(MapPos,3);
TileLayers[CLayerTile::LAYER_TILE_TYPE_BACK]=NewLayer;
}
// Mid
if (LevelHdr->MidLayer)
{
sLayerHdr *Layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->MidLayer);
CLayerTile *NewLayer=new ("Mid Layer") CLayerTile(Layer, TileBank);
NewLayer->init(MapPos,2);
TileLayers[CLayerTile::LAYER_TILE_TYPE_MID]=NewLayer;
}
// Action
if (LevelHdr->ActionLayer)
{
sLayerHdr *Layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->ActionLayer);
CLayerTile *NewLayer=new ("Action Layer") CLayerTile3d(Layer, TileBank);
NewLayer->init(MapPos,0);
TileLayers[CLayerTile::LAYER_TILE_TYPE_ACTION]=NewLayer;
}
/*
// Fore
if (LevelHdr->ForeLayer)
{
sLayerHdr *Layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->ForeLayer);
CLayerTile *NewLayer=new ("Fore Layer") CLayerTile(Layer, TileList, TriList, QuadList, VtxList);
NewLayer->init();
TileLayers[CLayerTile::LAYER_TILE_TYPE_FORE]=NewLayer;
}
*/
// Collision
if (LevelHdr->CollisionLayer)
{
sLayerHdr *Layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->CollisionLayer);
CollisionLayer=new ("Collision Layer") CLayerCollision(Layer);
}
}
/*****************************************************************************/
void CLevel::shutdown()
{
for (int i=0; i<CLayerTile::LAYER_TILE_TYPE_MAX; i++)
{
if (TileLayers[i])
{
TileLayers[i]->shutdown();
delete TileLayers[i];
}
}
TPFree(m_levelTPage);
if (CollisionLayer)
{
CollisionLayer->shutdown(); MemFree(CollisionLayer);
}
MemFree(TileBank);
MemFree(LevelHdr);
}
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
void CLevel::render()
{
// Setup Constant Rot Matrix
MATRIX *Mtx=CGameScene::GetCamMtx();
SetRotMatrix(Mtx);
SetTransMatrix(Mtx);
// Setup dummy prim to ensure OtPos 0 is initialised (for fast add)
for (int i=0;i<8; i++)
{
TILE_16 *Prim=GetPrimTILE16();
sOT *ThisOT=OtPtr+LayerOT+i-4;
Prim->x0=1024;
Prim->y0=1024;
AddPrim(ThisOT,Prim);
ASSERT(ThisOT->FirstPrim);
}
for (int i=0; i<CLayerTile::LAYER_TILE_TYPE_MAX; i++)
{
if (TileLayers[i]) TileLayers[i]->render();
}
#ifdef __SHOW_COLLISION__
if(CollisionLayer)
{
CollisionLayer->render(MapPos);
}
#endif
}
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
void CLevel::think(int _frames)
{
// (pkg)
exitTrigger->setExitPosition(ex,ey,ew,eh);
// (pkg)
for (int i=0; i<CLayerTile::LAYER_TILE_TYPE_MAX; i++)
{
if (TileLayers[i]) TileLayers[i]->think(MapPos);
}
}
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
DVECTOR CLevel::getMapSize()
{
DVECTOR size;
sLayerHdr *layer;
layer=(sLayerHdr*)MakePtr(LevelHdr,LevelHdr->ActionLayer);
size.vx=layer->Width;
size.vy=layer->Height;
return size;
}
/*****************************************************************************/