mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
* fixed r-click on tavern hero crash
* fixed removing one-week bonuses * added keybindings for components in selection window (eg. for treasure chest dialog) * HANDLE_EXCEPTIONC macro will rethrow exception after logging
This commit is contained in:
@ -172,6 +172,90 @@
|
|||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="RD|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin\AI"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/Oy-"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
AdditionalIncludeDirectories=""D:\!GameDevelopment\VCMI\libs\include";G:\vcmt\repa\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GENIUS_EXPORTS"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
AssemblerOutput="2"
|
||||||
|
AssemblerListingLocation="$(SolutionDir)$(ConfigurationName)\"
|
||||||
|
ProgramDataBaseFileName="$(SolutionDir)$(ConfigurationName)\GeniusAI.pdb"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="VCMI_lib.lib"
|
||||||
|
OutputFile="../GeniusAI.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
||||||
|
GenerateManifest="false"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
GenerateMapFile="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
@ -476,7 +476,7 @@ void CGameState::applyNL(IPack * pack)
|
|||||||
h->bonuses.remove_if(HeroBonus::OneDay);
|
h->bonuses.remove_if(HeroBonus::OneDay);
|
||||||
if(getDate(1) == 7) //new week
|
if(getDate(1) == 7) //new week
|
||||||
BOOST_FOREACH(CGHeroInstance *h, map->heroes)
|
BOOST_FOREACH(CGHeroInstance *h, map->heroes)
|
||||||
h->bonuses.remove_if(HeroBonus::OneDay);
|
h->bonuses.remove_if(HeroBonus::OneWeek);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 102: //set resource amount
|
case 102: //set resource amount
|
||||||
|
@ -497,7 +497,7 @@ void CGarrisonInt::splitStacks(int am2)
|
|||||||
am2);
|
am2);
|
||||||
|
|
||||||
}
|
}
|
||||||
CGarrisonInt::CGarrisonInt(int x, int y, int inx, int iny, SDL_Surface *pomsur, int OX, int OY, const CArmedInstance *s1,
|
CGarrisonInt::CGarrisonInt(int x, int y, int inx, int iny, SDL_Surface *&pomsur, int OX, int OY, const CArmedInstance *s1,
|
||||||
const CArmedInstance *s2)
|
const CArmedInstance *s2)
|
||||||
:interx(inx),intery(iny),sur(pomsur),highlighted(NULL),sup(NULL),sdown(NULL),oup(s1),odown(s2),
|
:interx(inx),intery(iny),sur(pomsur),highlighted(NULL),sup(NULL),sdown(NULL),oup(s1),odown(s2),
|
||||||
offx(OX),offy(OY)
|
offx(OX),offy(OY)
|
||||||
@ -878,6 +878,8 @@ CSelWindow::CSelWindow(std::string text, int player, int charperline, std::vecto
|
|||||||
{
|
{
|
||||||
components.push_back(comps[i]);
|
components.push_back(comps[i]);
|
||||||
comps[i]->onSelect = boost::bind(&CSelWindow::selectionChange,this,i);
|
comps[i]->onSelect = boost::bind(&CSelWindow::selectionChange,this,i);
|
||||||
|
if(i<9)
|
||||||
|
comps[i]->assignedKeys.insert(SDLK_1+i);
|
||||||
}
|
}
|
||||||
CMessage::drawIWindow(this,text,player,charperline);
|
CMessage::drawIWindow(this,text,player,charperline);
|
||||||
}
|
}
|
||||||
@ -2233,6 +2235,7 @@ void CPlayerInterface::battleAttack(BattleAttack *ba)
|
|||||||
battleInt->stackAttacking( ba->stackAttacking, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo );
|
battleInt->stackAttacking( ba->stackAttacking, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayerInterface::showComp(SComponent comp)
|
void CPlayerInterface::showComp(SComponent comp)
|
||||||
{
|
{
|
||||||
boost::unique_lock<boost::recursive_mutex> un(*pim);
|
boost::unique_lock<boost::recursive_mutex> un(*pim);
|
||||||
|
@ -302,7 +302,7 @@ public:
|
|||||||
int interx, intery;
|
int interx, intery;
|
||||||
CGarrisonSlot *highlighted;
|
CGarrisonSlot *highlighted;
|
||||||
|
|
||||||
SDL_Surface *sur;
|
SDL_Surface *&sur;
|
||||||
int offx, offy, p2;
|
int offx, offy, p2;
|
||||||
bool ignoreEvent, update, active, splitting, pb;
|
bool ignoreEvent, update, active, splitting, pb;
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ public:
|
|||||||
void splitClick();
|
void splitClick();
|
||||||
void splitStacks(int am2);
|
void splitStacks(int am2);
|
||||||
|
|
||||||
CGarrisonInt(int x, int y, int inx, int iny, SDL_Surface *pomsur, int OX, int OY, const CArmedInstance *s1, const CArmedInstance *s2=NULL);
|
CGarrisonInt(int x, int y, int inx, int iny, SDL_Surface *&pomsur, int OX, int OY, const CArmedInstance *s1, const CArmedInstance *s2=NULL);
|
||||||
~CGarrisonInt();
|
~CGarrisonInt();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="RD|Win32"
|
Name="RD|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
@ -199,10 +199,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/Oy-"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="false"
|
||||||
EnableFiberSafeOptimizations="true"
|
EnableFiberSafeOptimizations="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="G:\vcmt\repa\include"
|
AdditionalIncludeDirectories="G:\vcmt\repa\include"
|
||||||
@ -211,6 +212,8 @@
|
|||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="false"
|
EnableFunctionLevelLinking="false"
|
||||||
EnableEnhancedInstructionSet="0"
|
EnableEnhancedInstructionSet="0"
|
||||||
|
AssemblerOutput="2"
|
||||||
|
AssemblerListingLocation="$(SolutionDir)$(ConfigurationName)\"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
@ -228,6 +231,7 @@
|
|||||||
AdditionalDependencies="SDL.lib zdll.lib SDL_image.lib SDL_ttf.lib SDL_mixer.lib lua5.1.lib VCMI_lib.lib"
|
AdditionalDependencies="SDL.lib zdll.lib SDL_image.lib SDL_ttf.lib SDL_mixer.lib lua5.1.lib VCMI_lib.lib"
|
||||||
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
GenerateMapFile="true"
|
||||||
Driver="0"
|
Driver="0"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
6
global.h
6
global.h
@ -249,22 +249,24 @@ extern DLL_EXPORT CLogger<5> tlog5; //gray - minor log info
|
|||||||
catch (const std::exception * e) \
|
catch (const std::exception * e) \
|
||||||
{ \
|
{ \
|
||||||
tlog1 << e->what()<< std::endl; \
|
tlog1 << e->what()<< std::endl; \
|
||||||
delete e; \
|
throw; \
|
||||||
} \
|
} \
|
||||||
catch (const std::string& e) { \
|
catch (const std::string& e) { \
|
||||||
tlog1 << e << std::endl; \
|
tlog1 << e << std::endl; \
|
||||||
|
throw; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HANDLE_EXCEPTIONC(COMMAND) \
|
#define HANDLE_EXCEPTIONC(COMMAND) \
|
||||||
catch (const std::exception& e) { \
|
catch (const std::exception& e) { \
|
||||||
COMMAND; \
|
COMMAND; \
|
||||||
tlog1 << e.what() << std::endl; \
|
tlog1 << e.what() << std::endl; \
|
||||||
|
throw; \
|
||||||
} \
|
} \
|
||||||
catch (const std::exception * e) \
|
catch (const std::exception * e) \
|
||||||
{ \
|
{ \
|
||||||
COMMAND; \
|
COMMAND; \
|
||||||
tlog1 << e->what()<< std::endl; \
|
tlog1 << e->what()<< std::endl; \
|
||||||
delete e; \
|
throw; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,7 +242,10 @@ void CGeneralTextHandler::load()
|
|||||||
{
|
{
|
||||||
loadToIt(temp,buf,it,3);
|
loadToIt(temp,buf,it,3);
|
||||||
temp = temp.substr(1,temp.length()-2);
|
temp = temp.substr(1,temp.length()-2);
|
||||||
|
if(i < mines.size())
|
||||||
mines[i++].second = temp;
|
mines[i++].second = temp;
|
||||||
|
else
|
||||||
|
tlog2 << "Warning - too much entries in MINEEVNT. Omitting this one: " << temp << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
tlog5 << "\t\tReading RESTYPES \n";
|
tlog5 << "\t\tReading RESTYPES \n";
|
||||||
|
@ -171,7 +171,7 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="RD|Win32"
|
Name="RD|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
@ -194,10 +194,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/Oy-"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="false"
|
||||||
EnableFiberSafeOptimizations="true"
|
EnableFiberSafeOptimizations="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="G:\vcmt\repa\include"
|
AdditionalIncludeDirectories="G:\vcmt\repa\include"
|
||||||
@ -206,6 +207,8 @@
|
|||||||
BasicRuntimeChecks="0"
|
BasicRuntimeChecks="0"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="false"
|
EnableFunctionLevelLinking="false"
|
||||||
|
AssemblerOutput="2"
|
||||||
|
AssemblerListingLocation="$(SolutionDir)$(ConfigurationName)\"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
@ -224,6 +227,7 @@
|
|||||||
Version=""
|
Version=""
|
||||||
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
GenerateMapFile="true"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
LinkTimeCodeGeneration="0"
|
LinkTimeCodeGeneration="0"
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="RD|Win32"
|
Name="RD|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
@ -188,14 +188,17 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/Oy-"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="false"
|
||||||
EnableFiberSafeOptimizations="true"
|
EnableFiberSafeOptimizations="true"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="false"
|
EnableFunctionLevelLinking="false"
|
||||||
|
AssemblerOutput="2"
|
||||||
|
AssemblerListingLocation="$(SolutionDir)$(ConfigurationName)\"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
DisableSpecificWarnings="4251"
|
DisableSpecificWarnings="4251"
|
||||||
@ -214,6 +217,7 @@
|
|||||||
AdditionalDependencies="VCMI_lib.lib zdll.lib"
|
AdditionalDependencies="VCMI_lib.lib zdll.lib"
|
||||||
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
AdditionalLibraryDirectories="G:\vcmt\repa\libs"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
GenerateMapFile="true"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
|
Reference in New Issue
Block a user