1
0
forked from 0ad/0ad
0ad/source/graphics/Patch.h
Ykkrosh d39a4fac21 Premake: include precompiled.h in the project; set up dependencies for Atlas projects.
# Attempted to make compilation faster
by including as little as possible in some .h files, and moving it into
.cpp.
Fixed BaseTechCollection memory leak.

This was SVN commit r3992.
2006-06-09 16:44:16 +00:00

49 lines
1.1 KiB
C++

///////////////////////////////////////////////////////////////////////////////
//
// Name: Patch.h
// Author: Rich Cross
// Contact: rich@wildfiregames.com
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _PATCH_H
#define _PATCH_H
#include "MiniPatch.h"
#include "RenderableObject.h"
class CTerrain;
///////////////////////////////////////////////////////////////////////////////
// Terrain Constants:
//
// PATCH_SIZE: number of tiles in each patch
const int PATCH_SIZE = 16;
///////////////////////////////////////////////////////////////////////////////
// CPatch: a single terrain patch, PATCH_SIZE tiles square
class CPatch : public CRenderableObject
{
public:
// constructor
CPatch();
// destructor
~CPatch();
// initialize the patch
void Initialize(CTerrain* parent,u32 x,u32 z);
// calculate and store bounds of this patch
void CalcBounds();
public:
// minipatches (tiles) making up the patch
CMiniPatch m_MiniPatches[PATCH_SIZE][PATCH_SIZE];
// position of patch in parent terrain grid
u32 m_X,m_Z;
// parent terrain
CTerrain* m_Parent;
};
#endif