mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-03 04:46:38 +00:00
34f599f3d4
This was SVN commit r2340.
19 lines
352 B
C++
19 lines
352 B
C++
#include "stdafx.h"
|
|
#include "simplepainters.h"
|
|
|
|
using namespace std;
|
|
|
|
TerrainPainter::TerrainPainter(const string& terrain)
|
|
{
|
|
this->terrain = terrain;
|
|
}
|
|
|
|
void TerrainPainter::paint(Map* m, Area* a)
|
|
{
|
|
int id = m->getId(terrain);
|
|
for (int i=0; i<a->points.size(); i++) {
|
|
Point p = a->points[i];
|
|
m->terrain[p.x][p.y] = id;
|
|
}
|
|
}
|