mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-21 07:43:59 -07:00
- Created binaries/data/mods/official/maps/random folder to store maps and also moved rmlibrary.js to maps (though perhaps it should be somewhere in system?). - RM generator now uses "logical terrains" that can have units attached to them in addition to textures, for things like forests. - Added basic clump placer, avoid constraints, layered painter, and random terrains (each tile is chosen between several options). - Misc. infrastructure changes. This was SVN commit r2378.
21 lines
381 B
C++
21 lines
381 B
C++
#include "stdafx.h"
|
|
#include "simplepainters.h"
|
|
#include "random.h"
|
|
#include "rmgen.h"
|
|
|
|
using namespace std;
|
|
|
|
// TerrainPainter
|
|
|
|
TerrainPainter::TerrainPainter(Terrain* terrain)
|
|
{
|
|
this->terrain = terrain;
|
|
}
|
|
|
|
void TerrainPainter::paint(Map* m, Area* a)
|
|
{
|
|
for (int i=0; i<a->points.size(); i++) {
|
|
Point p = a->points[i];
|
|
terrain->place(m, p.x, p.y);
|
|
}
|
|
}
|