/* terrain.h: Class declaration that implements the creation and management of a flat plane. Derived from H.S. Fortuna's (http://www.hsfortuna.pwp.blueyonder.co.uk/) class of the same name but with some alterations

   Copyright (C) 2008  Stuart William Coulson

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

#ifndef _TERRAIN_H_
#define _TERRAIN_H_

#include "ps2matrix4x4.h"

#define tileSize 70			//Value that represents the size of tiles in the maze

class CTerrain
{
public:
	CTerrain();
	~CTerrain();
	
	void Render(void) const;
	
	void SetWorldMatrix(const Matrix4x4 & matWorld);
	
	void SetWVPMatrix(const Matrix4x4 & matWVP);
	
	void LoadTerrainData(int mazeWidth, int mazeHeight);		//Function now has two parameters that define the width and depth of the terrain plane in terms of tiles
	
protected:

	// Pointer to the data in Static DMA memory
	int m_iStaticAddr;
	
	// The world and WorldViewProjection Matrices
	Matrix4x4 m_World, m_WVP;
	
	// Check variables
	bool m_bWorldLoaded;	
};


#endif
