1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/Brushes.h
Ykkrosh a2432adad3 # GCC 4.1.1 compatibility
which is just "class C { void C::f(); }" code, which other compilers
seem to have ignored.
Also removed HAVE_PCH from GCC because our build system doesn't have
PCH. Added necessary headers to make it compile again.

This was SVN commit r4437.
2006-09-30 15:46:40 +00:00

41 lines
736 B
C++

#ifndef BRUSHES_H__
#define BRUSHES_H__
#include "maths/Vector3D.h"
class TerrainOverlay;
namespace AtlasMessage {
struct Brush
{
Brush();
~Brush();
void SetData(int w, int h, const std::vector<float>& data);
void SetRenderEnabled(bool enabled); // initial state is disabled
void GetCentre(int& x, int& y) const;
void GetBottomLeft(int& x, int& y) const;
void GetTopRight(int& x, int& y) const;
float Get(int x, int y) const
{
debug_assert(x >= 0 && x < m_W && y >= 0 && y < m_H);
return m_Data[x + y*m_W];
}
int m_W, m_H;
CVector3D m_Centre;
private:
TerrainOverlay* m_TerrainOverlay; // NULL if rendering is not enabled
std::vector<float> m_Data;
};
extern Brush g_CurrentBrush;
}
#endif // BRUSHES_H__