mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
* PreGame interface gets now redrawn every frame.
* Changed PreGame event handling and update/draw order. * Changed mouse cursor drawing in PreGame * Fixed linux bug where main menu WOG animation gets played only once, windows/linux video handling is now more similar * Minor code improvements
This commit is contained in:
@@ -76,6 +76,11 @@ void CCursorHandler::draw2()
|
|||||||
//blitAt(help,x,y);
|
//blitAt(help,x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCursorHandler::draw(SDL_Surface *to)
|
||||||
|
{
|
||||||
|
CSDL_Ext::blitSurface(cursors[mode]->ourImages[number].bitmap, 0, to, &genRect(40, 40, xpos, ypos));
|
||||||
|
}
|
||||||
|
|
||||||
void CCursorHandler::shiftPos( int &x, int &y )
|
void CCursorHandler::shiftPos( int &x, int &y )
|
||||||
{
|
{
|
||||||
if((mode==1 && number!=6) || mode ==3)
|
if((mode==1 && number!=6) || mode ==3)
|
||||||
|
@@ -32,6 +32,7 @@ public:
|
|||||||
void changeGraphic(const int & type, const int & no); //changes cursor graphic for type type (0 - adventure, 1 - combat, 2 - default, 3 - spellbook) and frame no (not used for type 3)
|
void changeGraphic(const int & type, const int & no); //changes cursor graphic for type type (0 - adventure, 1 - combat, 2 - default, 3 - spellbook) and frame no (not used for type 3)
|
||||||
void dragAndDropCursor (SDL_Surface* image); // Replace cursor with a custom image.
|
void dragAndDropCursor (SDL_Surface* image); // Replace cursor with a custom image.
|
||||||
void draw1();
|
void draw1();
|
||||||
|
void draw(SDL_Surface *to);
|
||||||
|
|
||||||
void shiftPos( int &x, int &y );
|
void shiftPos( int &x, int &y );
|
||||||
void draw2();
|
void draw2();
|
||||||
|
@@ -658,6 +658,7 @@ static void listenForEvents()
|
|||||||
void startGame(StartInfo * options, CConnection *serv/* = NULL*/)
|
void startGame(StartInfo * options, CConnection *serv/* = NULL*/)
|
||||||
{
|
{
|
||||||
GH.curInt =NULL;
|
GH.curInt =NULL;
|
||||||
|
SDL_FillRect(screen, 0, 0);
|
||||||
if(gOnlyAI)
|
if(gOnlyAI)
|
||||||
{
|
{
|
||||||
for(std::map<int, PlayerSettings>::iterator it = options->playerInfos.begin();
|
for(std::map<int, PlayerSettings>::iterator it = options->playerInfos.begin();
|
||||||
|
@@ -1337,6 +1337,9 @@ void CPlayerInterface::update()
|
|||||||
else
|
else
|
||||||
GH.simpleRedraw();
|
GH.simpleRedraw();
|
||||||
|
|
||||||
|
if (conf.cc.showFPS)
|
||||||
|
GH.drawFPSCounter();
|
||||||
|
|
||||||
// draw the mouse cursor and update the screen
|
// draw the mouse cursor and update the screen
|
||||||
// todo: bad way of updating the cursor, update screen should be the last statement of the rendering process
|
// todo: bad way of updating the cursor, update screen should be the last statement of the rendering process
|
||||||
CCS->curh->draw1();
|
CCS->curh->draw1();
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#include "../lib/RegisterTypes.cpp"
|
#include "../lib/RegisterTypes.cpp"
|
||||||
#include <boost/thread/recursive_mutex.hpp>
|
#include <boost/thread/recursive_mutex.hpp>
|
||||||
#include "../CThreadHelper.h"
|
#include "../CThreadHelper.h"
|
||||||
|
#include "CConfigHandler.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CPreGame.cpp, part of VCMI engine
|
* CPreGame.cpp, part of VCMI engine
|
||||||
@@ -270,13 +271,14 @@ CMenuScreen::~CMenuScreen()
|
|||||||
void CMenuScreen::showAll( SDL_Surface * to )
|
void CMenuScreen::showAll( SDL_Surface * to )
|
||||||
{
|
{
|
||||||
blitAt(CGP->mainbg, 0, 0, to);
|
blitAt(CGP->mainbg, 0, 0, to);
|
||||||
|
CCS->videoh->update(pos.x + 8, pos.y + 105, to, true, false);
|
||||||
CIntObject::showAll(to);
|
CIntObject::showAll(to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuScreen::show( SDL_Surface * to )
|
void CMenuScreen::show( SDL_Surface * to )
|
||||||
{
|
{
|
||||||
CIntObject::show(to);
|
CIntObject::show(to);
|
||||||
CCS->videoh->update(pos.x + 8, pos.y + 105, screen, true, false);
|
//CCS->videoh->update(pos.x + 8, pos.y + 105, screen, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuScreen::moveTo( CMenuScreen *next )
|
void CMenuScreen::moveTo( CMenuScreen *next )
|
||||||
@@ -337,31 +339,33 @@ void CGPreGame::disposeGraphics()
|
|||||||
|
|
||||||
void CGPreGame::update()
|
void CGPreGame::update()
|
||||||
{
|
{
|
||||||
|
SDL_FillRect(screen, 0, 0);
|
||||||
|
|
||||||
if (GH.listInt.size() == 0)
|
if (GH.listInt.size() == 0)
|
||||||
{
|
{
|
||||||
CCS->musich->playMusic(musicBase::mainMenu, -1);
|
CCS->musich->playMusic(musicBase::mainMenu, -1);
|
||||||
#ifdef _WIN32
|
|
||||||
CCS->videoh->open("ACREDIT.SMK");
|
CCS->videoh->open("ACREDIT.SMK");
|
||||||
#else
|
|
||||||
CCS->videoh->open("ACREDIT.SMK", true, false);
|
|
||||||
#endif
|
|
||||||
GH.pushInt(scrs[CMenuScreen::mainMenu]);
|
GH.pushInt(scrs[CMenuScreen::mainMenu]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SEL)
|
if(SEL)
|
||||||
SEL->update();
|
SEL->update();
|
||||||
|
|
||||||
// draw the mouse cursor and update the screen
|
|
||||||
// todo: bad way of updating the cursor, update screen should be the last statement of the rendering process
|
|
||||||
CCS->curh->draw1();
|
|
||||||
CSDL_Ext::update(screen);
|
|
||||||
CCS->curh->draw2();
|
|
||||||
|
|
||||||
GH.topInt()->show(screen);
|
|
||||||
|
|
||||||
// Handles mouse and key input
|
// Handles mouse and key input
|
||||||
GH.updateTime();
|
GH.updateTime();
|
||||||
GH.handleEvents();
|
GH.handleEvents();
|
||||||
|
|
||||||
|
if (GH.curInt == 0) // no redraw, when a new game was created
|
||||||
|
return;
|
||||||
|
|
||||||
|
GH.totalRedraw();
|
||||||
|
|
||||||
|
if (conf.cc.showFPS)
|
||||||
|
GH.drawFPSCounter();
|
||||||
|
|
||||||
|
// draw the mouse cursor and update the screen
|
||||||
|
CCS->curh->draw(screen);
|
||||||
|
CSDL_Ext::update(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSelectionScreen::CSelectionScreen(CMenuScreen::EState Type, CMenuScreen::EMultiMode MultiPlayer /*= CMenuScreen::SINGLE_PLAYER*/, const std::map<ui32, std::string> *Names /*= NULL*/)
|
CSelectionScreen::CSelectionScreen(CMenuScreen::EState Type, CMenuScreen::EMultiMode MultiPlayer /*= CMenuScreen::SINGLE_PLAYER*/, const std::map<ui32, std::string> *Names /*= NULL*/)
|
||||||
@@ -3503,6 +3507,7 @@ CCampaignScreen::CCampaignButton::CCampaignButton(SDL_Surface *bg, const std::st
|
|||||||
// Create the button hover effect
|
// Create the button hover effect
|
||||||
hoverLabel = new CLabel(pos.w / 2., pos.h + 20, FONT_MEDIUM, CENTER, tytulowy, "");
|
hoverLabel = new CLabel(pos.w / 2., pos.h + 20, FONT_MEDIUM, CENTER, tytulowy, "");
|
||||||
hoverLabel->ignoreLeadingWhitespace = false;
|
hoverLabel->ignoreLeadingWhitespace = false;
|
||||||
|
hoverLabel->autoRedraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCampaignScreen::CCampaignButton::~CCampaignButton()
|
CCampaignScreen::CCampaignButton::~CCampaignButton()
|
||||||
@@ -3523,19 +3528,18 @@ void CCampaignScreen::CCampaignButton::hover(bool on)
|
|||||||
{
|
{
|
||||||
// Deletes the text from the screen when you hover out of the bounds of the button
|
// Deletes the text from the screen when you hover out of the bounds of the button
|
||||||
hoverLabel->setTxt(" ");
|
hoverLabel->setTxt(" ");
|
||||||
GH.totalRedraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCampaignScreen::CCampaignButton::show(SDL_Surface *to)
|
void CCampaignScreen::CCampaignButton::showAll(SDL_Surface *to)
|
||||||
{
|
{
|
||||||
CIntObject::show(to);
|
CIntObject::showAll(to);
|
||||||
|
|
||||||
if (status == CCampaignScreen::DISABLED || video == "" || button == 0)
|
if (status == CCampaignScreen::DISABLED || video == "" || button == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// TODO: windows video code seem to have diverged a little bit
|
// TODO: windows video code seem to have diverged a little bit
|
||||||
// from non-windows code. Needs to be fixed and this ifdef removed.
|
// from non-windows code. Needs to be fixed and this ifdef removed.
|
||||||
|
|
||||||
@@ -3552,7 +3556,7 @@ void CCampaignScreen::CCampaignButton::show(SDL_Surface *to)
|
|||||||
CCS->videoh->close();
|
CCS->videoh->close();
|
||||||
blitAt(button, pos, to);
|
blitAt(button, pos, to);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (status == CCampaignScreen::COMPLETED) // Draw a checked symbol when you completed the mission
|
if (status == CCampaignScreen::COMPLETED) // Draw a checked symbol when you completed the mission
|
||||||
{
|
{
|
||||||
|
@@ -449,7 +449,7 @@ class CCampaignScreen : public CIntObject
|
|||||||
|
|
||||||
CCampaignButton(SDL_Surface *bg, const std::string image, const int x, const int y, CampaignStatus status); // c-tor
|
CCampaignButton(SDL_Surface *bg, const std::string image, const int x, const int y, CampaignStatus status); // c-tor
|
||||||
~CCampaignButton(); // d-tor
|
~CCampaignButton(); // d-tor
|
||||||
void show(SDL_Surface *to);
|
void showAll(SDL_Surface *to);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<CCampaignButton*> campButtons; // a container which holds all buttons where you can start a campaign
|
std::vector<CCampaignButton*> campButtons; // a container which holds all buttons where you can start a campaign
|
||||||
|
@@ -668,6 +668,7 @@ bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay)
|
|||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
|
|
||||||
|
this->fname = fname;
|
||||||
offset = 0;
|
offset = 0;
|
||||||
refreshWait = 3;
|
refreshWait = 3;
|
||||||
refreshCount = -1;
|
refreshCount = -1;
|
||||||
@@ -871,7 +872,10 @@ void CVideoPlayer::update( int x, int y, SDL_Surface *dst, bool forceRedraw, boo
|
|||||||
refreshCount = refreshWait;
|
refreshCount = refreshWait;
|
||||||
if (nextFrame())
|
if (nextFrame())
|
||||||
show(x,y,dst,update);
|
show(x,y,dst,update);
|
||||||
} else {
|
else
|
||||||
|
open(fname);
|
||||||
|
}
|
||||||
|
else {
|
||||||
redraw(x, y, dst, update);
|
redraw(x, y, dst, update);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -880,6 +884,7 @@ void CVideoPlayer::update( int x, int y, SDL_Surface *dst, bool forceRedraw, boo
|
|||||||
|
|
||||||
void CVideoPlayer::close()
|
void CVideoPlayer::close()
|
||||||
{
|
{
|
||||||
|
fname = "";
|
||||||
if (sws) {
|
if (sws) {
|
||||||
sws_freeContext(sws);
|
sws_freeContext(sws);
|
||||||
sws = NULL;
|
sws = NULL;
|
||||||
|
@@ -235,7 +235,7 @@ public:
|
|||||||
~CVideoPlayer();
|
~CVideoPlayer();
|
||||||
|
|
||||||
bool init();
|
bool init();
|
||||||
bool open(std::string fname, bool loop=false, bool useOverlay=false);
|
bool open(std::string fname, bool loop = false, bool useOverlay = false);
|
||||||
void close();
|
void close();
|
||||||
bool nextFrame(); // display next frame
|
bool nextFrame(); // display next frame
|
||||||
|
|
||||||
@@ -250,6 +250,7 @@ public:
|
|||||||
const char *data; // video buffer
|
const char *data; // video buffer
|
||||||
int length; // video size
|
int length; // video size
|
||||||
unsigned int offset; // current data offset
|
unsigned int offset; // current data offset
|
||||||
|
std::string fname; //name of current video file (empty if idle)
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VIDEO_WIN "win3.mjpg"
|
#define VIDEO_WIN "win3.mjpg"
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
#include "../CThreadHelper.h"
|
#include "../CThreadHelper.h"
|
||||||
#include "CConfigHandler.h"
|
#include "CConfigHandler.h"
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GUIBase.cpp, part of VCMI engine
|
* GUIBase.cpp, part of VCMI engine
|
||||||
@@ -370,9 +371,6 @@ void CGuiHandler::run()
|
|||||||
if(curInt)
|
if(curInt)
|
||||||
curInt->update(); // calls a update and drawing process of the loaded game interface object at the moment
|
curInt->update(); // calls a update and drawing process of the loaded game interface object at the moment
|
||||||
|
|
||||||
if (conf.cc.showFPS)
|
|
||||||
drawFPSCounter();
|
|
||||||
|
|
||||||
mainFPSmng->framerateDelay(); // holds a constant FPS
|
mainFPSmng->framerateDelay(); // holds a constant FPS
|
||||||
}
|
}
|
||||||
} HANDLE_EXCEPTION
|
} HANDLE_EXCEPTION
|
||||||
@@ -406,7 +404,7 @@ void CGuiHandler::drawFPSCounter()
|
|||||||
static SDL_Rect overlay = { 0, 0, 64, 32};
|
static SDL_Rect overlay = { 0, 0, 64, 32};
|
||||||
Uint32 black = SDL_MapRGB(screen->format, 10, 10, 10);
|
Uint32 black = SDL_MapRGB(screen->format, 10, 10, 10);
|
||||||
SDL_FillRect(screen, &overlay, black);
|
SDL_FillRect(screen, &overlay, black);
|
||||||
std::string fps = toString(mainFPSmng->fps);
|
std::string fps = boost::lexical_cast<std::string>(mainFPSmng->fps);
|
||||||
CSDL_Ext::printAt(fps, 10, 10, FONT_BIG, yellow, screen);
|
CSDL_Ext::printAt(fps, 10, 10, FONT_BIG, yellow, screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,18 +63,18 @@
|
|||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
|
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">D:\Program Files\boost\boost_1_46_1;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath>
|
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">D:\Program Files\boost\boost_1_46_1\stage\lib;$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>
|
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\C++\boost_1_42_0;$(IncludePath)</IncludePath>
|
||||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">$(IncludePath)</IncludePath>
|
<IncludePath Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">C:\C++\boost_1_42_0;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
|
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\C++\boost_1_42_0\stage\lib;$(LibraryPath)</LibraryPath>
|
||||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">$(LibraryPath)</LibraryPath>
|
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">C:\C++\boost_1_42_0\stage\lib;$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/MP4 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/MP4 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>D:\Program Files\boost\boost_1_46_1;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessToFile>false</PreprocessToFile>
|
<PreprocessToFile>false</PreprocessToFile>
|
||||||
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>SDL.lib;zdll.lib;SDL_image.lib;SDL_ttf.lib;SDL_mixer.lib;VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>SDL.lib;zdll.lib;SDL_image.lib;SDL_ttf.lib;SDL_mixer.lib;VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<ShowProgress>NotSet</ShowProgress>
|
<ShowProgress>NotSet</ShowProgress>
|
||||||
<AdditionalLibraryDirectories>../../libs;../;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>D:\Program Files\boost\boost_1_46_1\stage\lib;../../libs;../;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<OptimizeReferences>false</OptimizeReferences>
|
<OptimizeReferences>false</OptimizeReferences>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>D:\Program Files\boost\boost_1_46_1;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>SDL.lib;zdll.lib;SDL_image.lib;SDL_ttf.lib;SDL_mixer.lib;VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>SDL.lib;zdll.lib;SDL_image.lib;SDL_ttf.lib;SDL_mixer.lib;VCMI_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>../../libs;../;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>D:\Program Files\boost\boost_1_46_1\stage\lib;../../libs;../;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<Driver>NotSet</Driver>
|
<Driver>NotSet</Driver>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
10
global.h
10
global.h
@@ -370,16 +370,6 @@ enum EAlignment
|
|||||||
GOOD, EVIL, NEUTRAL
|
GOOD, EVIL, NEUTRAL
|
||||||
};
|
};
|
||||||
|
|
||||||
// Converts an int/double or any data type you wish to a string
|
|
||||||
template<typename T>
|
|
||||||
std::string toString(const T& value)
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
oss << value;
|
|
||||||
return oss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//uncomment to make it work
|
//uncomment to make it work
|
||||||
//#define MARK_BLOCKED_POSITIONS
|
//#define MARK_BLOCKED_POSITIONS
|
||||||
//#define MARK_VISITABLE_POSITIONS
|
//#define MARK_VISITABLE_POSITIONS
|
||||||
|
Reference in New Issue
Block a user