Commit c781f803 authored by gerstrong@gmail.com's avatar gerstrong@gmail.com

Code cleanup. Version update

parent 6c80c8f9
......@@ -35,7 +35,7 @@ string(REGEX REPLACE "[\r\n]" "" CG_VERSION "${CG_VERSION}")
# Since shell script get_version is not processed properly on windows, we have to define manually here.
# TODO: Better system for defining the version
IF(WIN32)
set(CG_VERSION "2.2.5")
set(CG_VERSION "2.2.6")
endif()
# Generate the README file with the correct version string
......
#include "GsEvent.h"
CEvent::~CEvent()
{}
GsEventSink::~GsEventSink()
{}
#ifndef __GSEVENT_H_
#define __GSEVENT_H_
#ifndef GSEVENT_H
#define GSEVENT_H
#include "base/Singleton.h"
#include <ctime>
#include <vector>
#include <deque>
#include <list>
#include <memory>
struct CEvent { virtual ~CEvent() {} };
struct CEvent { virtual ~CEvent(); };
struct InvokeFunctorEvent : CEvent
{
......@@ -22,19 +21,20 @@ struct InvokeFunctorEvent : CEvent
class GsEventSink
{
public:
virtual ~GsEventSink();
virtual void pumpEvent(const CEvent *ev) = 0;
};
#define gEventManager CEventContainer::get()
class CEventContainer : public GsSingleton<CEventContainer>
{
public:
CEventContainer() :
pausetime(0),
timepoint(0),
mFlush(false)
{}
size_t size() { return m_EventList.size(); }
bool empty() { return m_EventList.empty(); }
void clear() { m_EventList.clear(); }
......@@ -161,7 +161,5 @@ T* CEventContainer::occurredEvent()
return dynamic_cast<T*> (m_EventList.front().get());
}
#define gEventManager CEventContainer::get()
#endif /* __GSEVENT_H_ */
#endif /* GSEVENT_H */
......@@ -301,7 +301,7 @@ bool CGameLauncher::scanSubDirectories(const std::string& path,
if(deltaPerMil < 1)
deltaPerMil = 1;
mGameScanner.setPermilage(startPermil);
mGameScanner.setPermilage(int(startPermil));
for( const auto &subdir : dirs )
{
......
......@@ -16,15 +16,7 @@ static signed char numlooks;
CYorp::CYorp( CMap *p_map, Uint32 x, Uint32 y ) :
CVorticonSpriteObject(p_map,x,y, OBJ_YORP),
m_hardmode(gBehaviorEngine.mDifficulty > NORMAL),
state(YORP_LOOK),
looktimes(YORP_NUM_LOOKS+1),
lookposition(0),
timer(0),
dietimer(0),
walkframe(0),
dist_traveled(0),
movedir(LEFT)
m_hardmode(gBehaviorEngine.mDifficulty > NORMAL)
{
m_type = OBJ_YORP;
mSpriteIdx = OBJ_YORP_DEFSPRITE;
......
......@@ -78,14 +78,14 @@ private:
YORP_MOVE, // yorp is walking either left or right
YORP_STUNNED, // the yorp is stunned
YORP_DYING // the yorp is getting fried!
} state;
} state = YORP_LOOK;
unsigned char looktimes,lookposition;
unsigned char timer, dietimer;
unsigned char walkframe;
unsigned int dist_traveled;
unsigned char looktimes = YORP_NUM_LOOKS+1, lookposition = 0;
unsigned char timer = 0, dietimer = 0;
unsigned char walkframe = 0;
unsigned int dist_traveled = 0;
direction_t movedir;
direction_t movedir = LEFT;
};
#endif /* CYORP_H_ */
......@@ -1944,6 +1944,8 @@ void KeenPoleThink (objtype *ob)
ob->ydir = 1;
KeenDropThink (ob);
return;
default:
break;
}
if (c.xaxis)
......@@ -2003,6 +2005,8 @@ void KeenClimbThink (objtype *ob)
ob->ydir = 1;
KeenDropThink (ob);
break;
default:
break;
}
PoleActions (ob);
......
#ifndef CG_VERSION_H
#define CG_VERSION_H
#define CGVERSION "2.2.5-Release"
#define CGVERSIONCODE 225000
#define CGVERSION "2.2.6-Release"
#define CGVERSIONCODE 226000
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment