Crossfire Server, Trunk
RandomMap.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef RANDOM_MAP_H
14 #define RANDOM_MAP_H
15 
16 #include <QString>
17 
18 #include "assets/AssetWrapper.h"
19 #include "CREMapInformation.h"
20 #include "global.h"
21 #include "random_maps/random_map.h"
22 #include "random_maps/rproto.h"
23 
24 class RandomMap : public AssetWrapper
25 {
26 public:
27  RandomMap(CREMapInformation* parent, int x, int y, const char* parameters);
28 
29  virtual QString displayName() const override { return myMap->path(); }
30 
31  const CREMapInformation* map() const;
32  int x() const;
33  int y() const;
34  const RMParms* parameters() const;
35 
36 private:
38  int myX;
39  int myY;
41 };
42 
43 #endif /* RANDOM_MAP_H */
RandomMap
Definition: RandomMap.h:24
global.h
RandomMap::parameters
const RMParms * parameters() const
Definition: RandomMap.cpp:39
RandomMap::myParameters
RMParms myParameters
Definition: RandomMap.h:40
random_map.h
AssetWrapper.h
RandomMap::map
const CREMapInformation * map() const
Definition: RandomMap.cpp:24
CREMapInformation.h
RandomMap::x
int x() const
Definition: RandomMap.cpp:29
RandomMap::displayName
virtual QString displayName() const override
Definition: RandomMap.h:29
RMParms
Definition: random_map.h:14
CREMapInformation
Definition: CREMapInformation.h:27
RandomMap::y
int y() const
Definition: RandomMap.cpp:34
AssetWrapper
Definition: AssetWrapper.h:25
RandomMap::RandomMap
RandomMap(CREMapInformation *parent, int x, int y, const char *parameters)
Definition: RandomMap.cpp:15
CREMapInformation::path
QString path
Definition: CREMapInformation.h:31
rproto.h
RandomMap::myX
int myX
Definition: RandomMap.h:38
RandomMap::myMap
CREMapInformation * myMap
Definition: RandomMap.h:37
RandomMap::myY
int myY
Definition: RandomMap.h:39