/** 
 * \file Language.h
 * \brief This file defines simple class containing string table. 
 * 
 * \author Petar Bajic, MPE (C) All Rights Reserved, Homepage: www.mystic-peanut.com
 * \date January, 16 2007.
 */

#include "d3dx9.h"
#pragma warning( disable : 4996 ) // disable deprecated warning 
#include <strsafe.h>
#pragma warning( disable : 4995 )


#ifndef MPE_LANGUAGES
#define MPE_LANGUAGES

#define NUM_LANGUAGES 2
#define NUM_LINES 500

#define MPE_TEXT_ENGLISH "english"
#define MPE_TEXT_SRPSKI "srpski"

enum {
	ENGLISH = 0,
	SRPSKI,
} Languages;

/** 
* String table index enumerator.
* This enumerator values are used to acces string table.
*/
enum MPE_TEXT_ENUM
{
	MPE_TEXT_GAME_NAME = 0,
	MPE_TEXT_GAME_LOADING,

	MPE_TEXT_MENU_TITLE1 = 100,
	MPE_TEXT_MENU_TITLE2,
	MPE_TEXT_MENU_START,
	MPE_TEXT_MENU_OPTIONS,
	MPE_TEXT_MENU_CREDITS,
	MPE_TEXT_MENU_EXIT,
	MPE_TEXT_MENU_CONTROLS,
	MPE_TEXT_MENU_DETAILS,
	MPE_TEXT_MENU_DIFFICULTY,
	MPE_TEXT_MENU_BACK,
	MPE_TEXT_MENU_CONTROL_SHOOT,
	MPE_TEXT_MENU_CONTROL_PAUSE,
	MPE_TEXT_MENU_CONTROL_MOVE,
	MPE_TEXT_MENU_CONTROL_RUN,
	MPE_TEXT_MENU_DIFFICULTY_HARD,
	MPE_TEXT_MENU_DIFFICULTY_EASY,
	MPE_TEXT_MENU_DETAILS_ON,
	MPE_TEXT_MENU_DETAILS_OFF,

	MPE_TEXT_MOVIE_TEXT1 = 200,
	MPE_TEXT_MOVIE_TEXT2,
	MPE_TEXT_MOVIE_TEXT3,
	MPE_TEXT_MOVIE_TEXT4,
	MPE_TEXT_MOVIE_TEXT5,

	MPE_TEXT_LEVEL_SUCCESS = 300,
	MPE_TEXT_LEVEL_PRESS_SPACE,
	MPE_TEXT_LEVEL_PAUSED,
	MPE_TEXT_LEVEL_SAVED_SHEEPS,
	MPE_TEXT_LEVEL_PRESS_SPACE_EXIT,
	MPE_TEXT_LEVEL_OOOPS,
	MPE_TEXT_LEVEL_STOLEN_SHEEP,
	MPE_TEXT_LEVEL_KILLED_SHEEP,
	MPE_TEXT_LEVEL_THIRD_TIME,
	MPE_TEXT_LEVEL_BORDER_WARNING,
};


/**
 * \brief Language class holds string table.
 *
 * \author Petar Bajic \date January, 16 2007.
 */
class CLanguage
{
	int	m_Language;
	WCHAR m_allText[NUM_LINES][1024];
	void LoadTextLanguages(int languages);

public:
	CLanguage();
	~CLanguage();
	WCHAR* GetText(int index);
	bool SetLanguage(int language);
};



#endif //MPE_LANGUAGES