164
+ − 1
/*
1066
+ − 2
* Hedgewars, a free turn based strategy game
164
+ − 3
* Copyright (c) 2006 Igor Ulyanov <iulyanov@gmail.com>
+ − 4
*
184
+ − 5
* This program is free software; you can redistribute it and/or modify
+ − 6
* it under the terms of the GNU General Public License as published by
+ − 7
* the Free Software Foundation; version 2 of the License
164
+ − 8
*
184
+ − 9
* This program is distributed in the hope that it will be useful,
+ − 10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
+ − 11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ − 12
* GNU General Public License for more details.
164
+ − 13
*
184
+ − 14
* You should have received a copy of the GNU General Public License
+ − 15
* along with this program; if not, write to the Free Software
+ − 16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
164
+ − 17
*/
+ − 18
+ − 19
#ifndef _HWMAP_INCLUDED
+ − 20
#define _HWMAP_INCLUDED
+ − 21
+ − 22
#include <QByteArray>
+ − 23
#include <QString>
+ − 24
#include <QImage>
+ − 25
177
+ − 26
#include "tcpBase.h"
164
+ − 27
+ − 28
#include <string>
+ − 29
3133
+ − 30
enum MapGenerator
+ − 31
{
+ − 32
MAPGEN_REGULAR,
+ − 33
MAPGEN_MAZE,
+ − 34
};
+ − 35
177
+ − 36
class HWMap : public TCPBase
164
+ − 37
{
+ − 38
Q_OBJECT
2377
+ − 39
164
+ − 40
public:
+ − 41
HWMap();
168
+ − 42
virtual ~HWMap();
3133
+ − 43
void getImage(std::string seed, int templateFilter, MapGenerator mapgen, int maze_size);
164
+ − 44
177
+ − 45
protected:
+ − 46
virtual QStringList setArguments();
+ − 47
virtual void onClientDisconnect();
+ − 48
virtual void SendToClientFirst();
+ − 49
164
+ − 50
signals:
+ − 51
void ImageReceived(const QImage newImage);
1790
+ − 52
void HHLimitReceived(int hhLimit);
164
+ − 53
+ − 54
private:
+ − 55
std::string m_seed;
1797
+ − 56
int templateFilter;
3133
+ − 57
MapGenerator m_mapgen;
+ − 58
int m_maze_size;
164
+ − 59
+ − 60
private slots:
+ − 61
};
+ − 62
+ − 63
#endif // _HWMAP_INCLUDED