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

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


	Engine class


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

#include <nds.h>
#include <maxmod9.h>

#include <cstdio>
#include <vector>
#include <gl2d.h>

#include "StarFighter.h"
#include "EntityContainer.h"
#include "Cancer.h"
#include "Metroid.h"
#include "Blob.h"
#include "Tentakill.h"
#include "Centipede.h"
#include "Sparky.h"
#include "RotoSpark.h"
#include "Popcorn.h"


#include "Moai.h"
#include "CircleSaw.h"
#include "Bouncer.h"
#include "Tentaklaus.h"


#include "Sound.h"
#include "Level.h"
#include "VertexBuffer.h"
#include "Fx3D.h"
#include "Fx2D.h"
#include "Palettes.h"
#include "Sprite.h"
#include "Oamfont.h"
#include "GlFont.h"

#include "Explosion.h"

// Cearn's awesome Fixed-point ATAN2
#include "cearn_atan.h"


#include "UTIL.h"

// GRIT generated files
#include "star_sprite.h"
#include "cancer_sprite.h"
#include "metroid_sprite.h"
#include "blob_sprite.h"
#include "tentakill_sprite.h"
#include "centipede_sprite.h"
#include "sparky_sprite.h"
#include "explosions_sprite.h"
#include "small_enemies_sprite.h"
#include "moai_sprite.h"
#include "circlesaw_sprite.h"
#include "bouncer_sprite.h"



#include "stage01bg.h"
#include "stage02bg.h"
#include "organ.h"
#include "xmasballs.h"
#include "muscle.h"

#include "walar1a.h"
#include "walar1b.h"
#include "font_bubbla.h"
#include "font_krom.h"
#include "glfont_bubbla.h"
#include "glfont_krom.h"

// Our plasma pals
#include "plasma_pal.h"
#include "plasma_pal2.h"



//MAXMOD headers
#include "soundbank_bin.h"
#include "soundbank.h"



#ifndef ENGINE_H
#define ENGINE_H

class Engine 
{

public:
	Engine();
	~Engine();

	void Main();
	
private:
	void InitHardware();
	void InitEverything();
	void LoadSounds();
	void LoadFonts();
	void LoadImages();
	void Load3D();
	void DoSplash();
	void DoIntro();
	void DoEnding();
	void GameDoSubScreen( int Frame, s32 &BGInterp );
	void GameUpdateAll( int Frame,
						int KeyH,
						int KeyD,
						int Stage,
						bool &StageFinished,
					    StarFighter &Star,
						std::vector<EntityContainer*> Enemies,
						Level &Lvl
					  );
	void GamePause( int Frame,
					int Stage,
					s32 &BGInterp,
				    const StarFighter &Star,
				    std::vector<EntityContainer*> Enemies,
				    const Level &Lvl
			      );	
	
	void GameSpawnEnemies( int Frame );
	
	void DrawDebug(  int frames, 
					 int Stage,
					 int StageFinished,
					 const StarFighter &Star,
					 std::vector<EntityContainer*> en
				  );
	void KillAllEnemies( std::vector<EntityContainer*> Enemies,
					     BossEntity *&Boss
						);	
	
	
};

#endif // ENGINE_H
