1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00

little change for gcc

This commit is contained in:
Łukasz Wychrystenko 2008-12-17 21:16:19 +00:00
parent 584eced759
commit 4d35d1ee35

View File

@ -9,9 +9,10 @@
#include "CMessage.h" #include "CMessage.h"
#include "CPathfinder.h" #include "CPathfinder.h"
#include "CPlayerInterface.h" #include "CPlayerInterface.h"
//#include "SDL_Extensions.h"
#include "SDL_Extensions.h" #include "SDL_Extensions.h"
#include "SDL_Extensions.h" //#include "SDL_framerate.h"
#include "SDL_framerate.h"
#include "SDL_framerate.h" #include "SDL_framerate.h"
#include "client/CConfigHandler.h" #include "client/CConfigHandler.h"
#include "client/CCreatureAnimation.h" #include "client/CCreatureAnimation.h"
@ -52,9 +53,8 @@ extern std::queue<SDL_Event> events;
extern boost::mutex eventsM; extern boost::mutex eventsM;
class OCM_HLP_CGIN struct OCM_HLP_CGIN
{ {
public:
bool inline operator ()(const std::pair<const CGObjectInstance*,SDL_Rect> & a, const std::pair<const CGObjectInstance*,SDL_Rect> & b) const bool inline operator ()(const std::pair<const CGObjectInstance*,SDL_Rect> & a, const std::pair<const CGObjectInstance*,SDL_Rect> & b) const
{ {
return (*a.first)<(*b.first); return (*a.first)<(*b.first);
@ -918,6 +918,11 @@ ClickableL::ClickableL()
{ {
pressedL=false; pressedL=false;
} }
ClickableL::~ClickableL() {
}
void ClickableL::clickLeft(tribool down) void ClickableL::clickLeft(tribool down)
{ {
if (down) if (down)
@ -934,10 +939,16 @@ void ClickableL::deactivate()
LOCPLINT->lclickable.erase LOCPLINT->lclickable.erase
(std::find(LOCPLINT->lclickable.begin(),LOCPLINT->lclickable.end(),this)); (std::find(LOCPLINT->lclickable.begin(),LOCPLINT->lclickable.end(),this));
} }
ClickableR::ClickableR() ClickableR::ClickableR()
{ {
pressedR=false; pressedR=false;
} }
ClickableR::~ClickableR() {
}
void ClickableR::clickRight(tribool down) void ClickableR::clickRight(tribool down)
{ {
if (down) if (down)
@ -953,10 +964,17 @@ void ClickableR::deactivate()
{ {
LOCPLINT->rclickable.erase(std::find(LOCPLINT->rclickable.begin(),LOCPLINT->rclickable.end(),this)); LOCPLINT->rclickable.erase(std::find(LOCPLINT->rclickable.begin(),LOCPLINT->rclickable.end(),this));
} }
//ClickableR
Hoverable::~Hoverable() {
}
void Hoverable::activate() void Hoverable::activate()
{ {
LOCPLINT->hoverable.push_front(this); LOCPLINT->hoverable.push_front(this);
} }
void Hoverable::deactivate() void Hoverable::deactivate()
{ {
LOCPLINT->hoverable.erase(std::find(LOCPLINT->hoverable.begin(),LOCPLINT->hoverable.end(),this)); LOCPLINT->hoverable.erase(std::find(LOCPLINT->hoverable.begin(),LOCPLINT->hoverable.end(),this));
@ -965,6 +983,12 @@ void Hoverable::hover(bool on)
{ {
hovered=on; hovered=on;
} }
//Hoverable
KeyInterested::~KeyInterested() {
}
void KeyInterested::activate() void KeyInterested::activate()
{ {
LOCPLINT->keyinterested.push_front(this); LOCPLINT->keyinterested.push_front(this);
@ -974,6 +998,8 @@ void KeyInterested::deactivate()
LOCPLINT-> LOCPLINT->
keyinterested.erase(std::find(LOCPLINT->keyinterested.begin(),LOCPLINT->keyinterested.end(),this)); keyinterested.erase(std::find(LOCPLINT->keyinterested.begin(),LOCPLINT->keyinterested.end(),this));
} }
//KeyInterested
void MotionInterested::activate() void MotionInterested::activate()
{ {
LOCPLINT->motioninterested.push_front(this); LOCPLINT->motioninterested.push_front(this);