// Liquid3D - Moteur 3D C++ NDS par Morukutsu
// Surcouche de l'ulibrary de Brunni
// Version alpha 1

#include <nds.h>
#include <ulib/ulib.h>

#include "L3DTypes.h"
#include "CSceneManager.h"
#include "CRessourceManager.h"

#ifndef _H_L3D
#define _H_L3D

//Defines
#define	GFX_MODE_3D			1
#define	GFX_MODE_DUAL3D		2

#define GFX_SYNC_60         1
#define GFX_SYNC_SKIP       2
#define GFX_SYNC_FULLSKIP   3

#define GFX_INTERRUPT_HBL   1
#define GFX_INTERRUPT_VBL   2

namespace L3D
{
	// - - - - - - - - -
	// Classe VideoCore - Gère les fonctions principales de la lib (init, boucle d'affichage)
	// - - - - - - - - - 
	void HBLFuncWrapper();
	void VBLFuncWrapper();

	class VideoCore
	{
	public:
		static void Init(UL_INIT_FLAGS flags);
		static void InitGfx(int mode);
		static void InitInterrupts(int flags);
		static void StartDrawing2D();
		static void StartDrawing3D();
		static void EndDrawing();
		static void EndFrame();
		static void SyncFrame(int mode);
		
	public:
		static int cpuCount, cpuUsage;
		static int vcount, hcount;
		static int32 viewportRatio, fov, near, far;
	};
};

#endif