1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fixing buildings in castle and related improvements.

This commit is contained in:
Michał W. Urbańczyk
2008-01-19 11:55:04 +00:00
parent 4b772315bb
commit 2e25e040d5
8 changed files with 177 additions and 29 deletions

View File

@@ -2,16 +2,26 @@
#include "global.h"
#include "SDL.h"
#include "CPlayerInterface.h"
#include "boost/tuple/tuple.hpp"
//#include "boost/tuple/tuple.hpp"
class CGTownInstance;
class CTownHandler;
struct Structure;
template <typename T> class AdventureMapButton;
class CBuildingRect : public MotionInterested, public ClickableL, public ClickableR//, public TimeInterested
{
public:
Structure* str;
CDefHandler* def;
SDL_Surface* border;
SDL_Surface* area;
CBuildingRect(Structure *Str);
~CBuildingRect();
void activate();
void deactivate();
bool operator<(const CBuildingRect & p2) const;
void mouseMoved (SDL_MouseMotionEvent & sEvent);
void clickLeft (tribool down);
void clickRight (tribool down);
};
class CCastleInterface
@@ -26,7 +36,7 @@ public:
AdventureMapButton<CCastleInterface> * exit;
std::vector<boost::tuples::tuple<int,CDefHandler*,Structure*,SDL_Surface*,SDL_Surface*> *> buildings; //building id, building def, structure struct, border, filling
std::vector<CBuildingRect*> buildings; //building id, building def, structure struct, border, filling
CCastleInterface(const CGTownInstance * Town, bool Activate=true);
~CCastleInterface();