#ifndef WORLD_H
#define WORLD_H
#include "stuff.h"
#include "UnitList.h"

#include "Area.h"


#define all 9999
#include "Globle.h"
#define tempId = 1;


#define WHITE makecol(255, 255, 255)
//#include "UnitList.h"

//extern bool pass = false;
//DATAFILE *data;
//BITMAP *buffer; // double_buffering
//buffer=create_bitmap(SCREEN_W,SCREEN_H);
 




class World
{
private:
//need to make and area class that chang world to ares
	
char *worldname;



	public:

//CharacterList npcs;
 World();
 
 ///need to load areas from text file
 Area areas; //we want a 2d arrya instead
void redraw(View *view,TileAnimeList,UnitList ,DATAFILE *);
//void edit(View);
//Layer *get_layers();

};
//end of world



 World::World()
{
	 
worldname = "Namic";
//int i,j;
	//for( j=0; j<numAreas;j++)
	//{

	//	for( i=0; i<numAreas;i++)
	//	{
			areas.filename = "area1.txt";

//areas.setDatafile(data);
			areas.load();
/*
			areas[0][1].filename = "area2.txt";
			areas[0][1].load();

			areas[0][1].filename = "area3.txt";
			areas[0][1].load();

			areas[1][1].filename = "area4.txt";
			areas[1][1].load();
*/
			




		//}

	//}

//npcs.load("npcs.txt");

//sleep(5);
}


void World::redraw(View *view,TileAnimeList animations,UnitList unitL1,DATAFILE * data)
{
areas.redraw(view[0], animations, unitL1,data);
//areas[1][0].redraw(view[1], animations);
//areas[0][1].redraw(view[2], animations);
//areas[1][1].redraw(view[3], animations);
//draw area that is corently on screen

}

#endif