/******************************************************************************
*******************************************************************************

	Bubble Fight EX
	relminator
	http://rel.betterwebber.com


	Level class


*******************************************************************************
******************************************************************************/

#include <nds.h>
#include <gl2d.h>
#include "Fx3D.h"


#ifndef LEVEL_H
#define LEVEL_H

#define  MAP_WIDTH 32
#define  MAP_HEIGHT 12

class Level 
{

public:
	Level();
	~Level();
	void Init( int Palette, glImage* const Sprites, int stage );
	void Update( int Stage, int Frame );
	void UpdateMap( s32 speed );
	void Draw3D( int Stage, int Frame ) const;
	void Draw2D( int Stage, int Frame ) const;
	void DrawMap( int Palette = 0 ) const;

private:	
	int Width;			// dimensions of the map
	int Height;
	
	int CameraX;		// top-left cooordinates of our virtual camera
	int CameraY;		// Works almost the same the 2d BG scroller
	
	int TileX;			// current tile the top-left coordinate of our
	int TileY;			// camera occupies
	
	int PixelX;			// scrolling tile offsets
	int PixelY;

	glImage *Tiles;
	int ColorTable;
	
	short map[MAP_WIDTH][MAP_HEIGHT];
	
};

#endif // LEVEL_H
