forked from 0ad/0ad
Matei
467b14e928
- Made objects snap to terrain (the game does this automatically for entities but it was a problem with actors) - Small enhancements to the RMS API - New version of cantabrian_highlands This was SVN commit r2688.
35 lines
813 B
C++
35 lines
813 B
C++
#ifndef __SIMPLEGROUP_H__
|
|
#define __SIMPLEGROUP_H__
|
|
|
|
#include "objectgroupplacer.h"
|
|
#include "tileclass.h"
|
|
|
|
class SimpleGroup : public ObjectGroupPlacer
|
|
{
|
|
public:
|
|
class Element {
|
|
public:
|
|
std::string type;
|
|
int count;
|
|
float distance;
|
|
|
|
Element::Element();
|
|
Element::Element(const std::string& type, int count, float distance);
|
|
Element::~Element();
|
|
|
|
bool place(int cx, int cy, class Map* m, int player, bool avoidSelf,
|
|
Constraint* constr, std::vector<Object*>& ret);
|
|
};
|
|
|
|
std::vector<Element*> elements;
|
|
bool avoidSelf;
|
|
int x, y;
|
|
TileClass* tileClass;
|
|
|
|
virtual bool place(class Map* m, int player, Constraint* constr);
|
|
|
|
SimpleGroup(std::vector<Element*>& elements, TileClass* tileClass, bool avoidSelf, int x, int y);
|
|
virtual ~SimpleGroup(void);
|
|
};
|
|
|
|
#endif |