mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
49 lines
920 B
C
49 lines
920 B
C
|
/*
|
||
|
* RiverPlacer.h, part of VCMI engine
|
||
|
*
|
||
|
* Authors: listed in file AUTHORS in main folder
|
||
|
*
|
||
|
* License: GNU General Public License v2.0 or later
|
||
|
* Full text of license available in license.txt file, in main folder
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
#include "Zone.h"
|
||
|
|
||
|
class RiverPlacer: public Modificator
|
||
|
{
|
||
|
public:
|
||
|
MODIFICATOR(RiverPlacer);
|
||
|
|
||
|
void process() override;
|
||
|
void init() override;
|
||
|
char dump(const int3 &) override;
|
||
|
|
||
|
void addRiverNode(const int3 & node);
|
||
|
|
||
|
rmg::Area & riverSource();
|
||
|
rmg::Area & riverSink();
|
||
|
rmg::Area & riverProhibit();
|
||
|
|
||
|
protected:
|
||
|
void drawRivers();
|
||
|
|
||
|
void preprocess();
|
||
|
void connectRiver(const int3 & tile);
|
||
|
|
||
|
void prepareHeightmap();
|
||
|
|
||
|
private:
|
||
|
rmg::Area rivers;
|
||
|
rmg::Area source;
|
||
|
rmg::Area sink;
|
||
|
rmg::Area prohibit;
|
||
|
rmg::Tileset riverNodes;
|
||
|
rmg::Area deltaSink;
|
||
|
std::map<int3, int3> deltaPositions;
|
||
|
std::map<int3, int> deltaOrientations;
|
||
|
|
||
|
std::map<int3, int> heightMap;
|
||
|
};
|