#include "Area.h" Area::Area(void){ first.X=NOMAP; first.Z=NOMAP; last.X=NOMAP; last.Z=NOMAP; } Area::~Area(void) { } void Area::InitTexture(char *texfile ) { ilInit(); iluInit(); ilutRenderer(ILUT_OPENGL); ti=ilutGLLoadImage(texfile); ilutGLBuildMipmaps(); } void Area::setTexture(bool ch, bool col) { if (ch) { if (!col) glColor3f(1,1,1); else glColor3f(0.4,0.5,0.7); } } bool Area::isArea(int x, int z) { return ((x >= first.X) && (x <= last.X) && (z >= first.Z) && (z <= last.Z));} bool Area::isArea(int x, int z,int t) { return (((x >= first.X) && (x <= last.X) && (z >= first.Z) && (z <= last.Z))||(type==t));} void Area::set(coord f, coord l) { first.X=f.X; first.Z=f.Z; last.X=l.X; last.Z=l.Z; } void Area::set(int t) { type=t; }