Browse Source

Compile fix + minor changes.

DjWarmonger 15 years ago
parent
commit
084a0148c7
6 changed files with 12 additions and 14 deletions
  1. 0 1
      client/CMT.cpp
  2. 1 0
      client/CMessage.cpp
  3. 2 1
      client/GUIClasses.cpp
  4. 1 1
      client/GUIClasses.h
  5. 1 5
      client/VCMI_client.vcproj
  6. 7 6
      hch/CObjectHandler.cpp

+ 0 - 1
client/CMT.cpp

@@ -32,7 +32,6 @@
 #include "../hch/CVideoHandler.h"
 #include "../hch/CVideoHandler.h"
 #include "../hch/CLodHandler.h"
 #include "../hch/CLodHandler.h"
 #include "../hch/CDefHandler.h"
 #include "../hch/CDefHandler.h"
-#include "../hch/CAmbarCendamo.h"
 #include "../hch/CGeneralTextHandler.h"
 #include "../hch/CGeneralTextHandler.h"
 #include "Graphics.h"
 #include "Graphics.h"
 #include "Client.h"
 #include "Client.h"

+ 1 - 0
client/CMessage.cpp

@@ -13,6 +13,7 @@
 #include "GUIClasses.h"
 #include "GUIClasses.h"
 #include "AdventureMapButton.h"
 #include "AdventureMapButton.h"
 #include "CConfigHandler.h"
 #include "CConfigHandler.h"
+#include "CBitmapHandler.h"
 
 
 /*
 /*
  * CMessage.cpp, part of VCMI engine
  * CMessage.cpp, part of VCMI engine

+ 2 - 1
client/GUIClasses.cpp

@@ -874,7 +874,8 @@ void SComponent::init(Etype Type, int Subtype, int Val)
 		subtitle = CGI->spellh->spells[Subtype].name;
 		subtitle = CGI->spellh->spells[Subtype].name;
 		break;
 		break;
 	case creature:
 	case creature:
-		subtitle = boost::lexical_cast<std::string>(Val) + " " + CGI->creh->creatures[Subtype]->*(Val != 1 ? &CCreature::namePl : &CCreature::nameSing);
+		if (Val) //no need to display 0 value
+			subtitle = boost::lexical_cast<std::string>(Val) + " " + CGI->creh->creatures[Subtype]->*(Val != 1 ? &CCreature::namePl : &CCreature::nameSing);
 		break;
 		break;
 	case experience:
 	case experience:
 		description = CGI->generaltexth->allTexts[241];
 		description = CGI->generaltexth->allTexts[241];

+ 1 - 1
client/GUIClasses.h

@@ -236,7 +236,7 @@ public:
 	    shiftPos;//1st slot of the second row, set shiftPoint for effect
 	    shiftPos;//1st slot of the second row, set shiftPoint for effect
 	bool ignoreEvent, update, active, splitting, pb, 
 	bool ignoreEvent, update, active, splitting, pb, 
 	     smallIcons, //true - 32x32 imgs, false - 58x64
 	     smallIcons, //true - 32x32 imgs, false - 58x64
-	     removableUnits,//player can remove units from up
+	     removableUnits,//player can remove units from up
 	     twoRows,//slots will be placed in 2 rows
 	     twoRows,//slots will be placed in 2 rows
 		 ourUp,ourDown;//player owns up or down army
 		 ourUp,ourDown;//player owns up or down army
 
 

+ 1 - 5
client/VCMI_client.vcproj

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="windows-1250"?>
 <?xml version="1.0" encoding="windows-1250"?>
 <VisualStudioProject
 <VisualStudioProject
 	ProjectType="Visual C++"
 	ProjectType="Visual C++"
-	Version="9,00"
+	Version="9.00"
 	Name="VCMI_client"
 	Name="VCMI_client"
 	ProjectGUID="{8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}"
 	ProjectGUID="{8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}"
 	RootNamespace="VCMI_client"
 	RootNamespace="VCMI_client"
@@ -381,10 +381,6 @@
 				RelativePath=".\GUIClasses.cpp"
 				RelativePath=".\GUIClasses.cpp"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\mapHandler.cpp"
-				>
-			</File>
 			<File
 			<File
 				RelativePath=".\NetPacksClient.cpp"
 				RelativePath=".\NetPacksClient.cpp"
 				>
 				>

+ 7 - 6
hch/CObjectHandler.cpp

@@ -4625,6 +4625,7 @@ void CGBonusingObject::onHeroVisit( const CGHeroInstance * h ) const
 				i->second.setType(11);
 				i->second.setType(11);
 			}
 			}
 			cb->giveCreatures(h->id, h, creatures); //suboptimal again, but creature sets are screwed in general
 			cb->giveCreatures(h->id, h, creatures); //suboptimal again, but creature sets are screwed in general
+			iw.components.push_back(Component(Component::CREATURE,11,0,1));
 		}
 		}
 		else
 		else
 			messageID = 137;
 			messageID = 137;
@@ -5538,9 +5539,10 @@ void CBank::initialize() const
 	{
 	{
 		for (ui8 n = 0; n < bc->artifacts[i]; n++) //new function using proper randomization algorithm
 		for (ui8 n = 0; n < bc->artifacts[i]; n++) //new function using proper randomization algorithm
 		{	
 		{	
-				cb->setObjProperty (id, 18 + i, ran()); //synchronic
+				cb->setObjProperty (id, 18 + i, ran()); //synchronic artifacts
 		}
 		}
 	}
 	}
+	cb->setObjProperty (id, 17, ran()); //get army
 }
 }
 void CBank::setPropertyDer (ui8 what, ui32 val)
 void CBank::setPropertyDer (ui8 what, ui32 val)
 /// random values are passed as arguments and processed identically on all clients
 /// random values are passed as arguments and processed identically on all clients
@@ -5727,7 +5729,6 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
 {
 {
 	if (accept)
 	if (accept)
 	{
 	{
-		cb->setObjProperty (id, 17, ran()); //get army
 		cb->startBattleI (h, this, boost::bind (&CBank::endBattle, this, h, _1), true);
 		cb->startBattleI (h, this, boost::bind (&CBank::endBattle, this, h, _1), true);
 	}
 	}
 }
 }
@@ -5856,10 +5857,10 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons
 			cb->showInfoDialog(&iw);
 			cb->showInfoDialog(&iw);
 			cb->giveCreatures (id, h, ourArmy);
 			cb->giveCreatures (id, h, ourArmy);
 		}
 		}
-		cb->setObjProperty (id, 15, 0); //bc = NULL
+		//cb->setObjProperty (id, 15, 0); //bc = NULL
 	}
 	}
-	else //in case of defeat
-		initialize();
+	//else //in case of defeat
+	//	initialize();
 }
 }
 
 
 void CGPyramid::initObj()
 void CGPyramid::initObj()
@@ -5900,7 +5901,7 @@ void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
 	{
 	{
 		BlockingDialog bd (true, false);
 		BlockingDialog bd (true, false);
 		bd.player = h->getOwner();
 		bd.player = h->getOwner();
-		bd.soundID = soundBase::DANGER;
+		bd.soundID = soundBase::MYSTERY;
 		bd.text << VLC->generaltexth->advobtxt[105];
 		bd.text << VLC->generaltexth->advobtxt[105];
 		cb->showBlockingDialog (&bd, boost::bind (&CBank::fightGuards, this, h, _1));	
 		cb->showBlockingDialog (&bd, boost::bind (&CBank::fightGuards, this, h, _1));	
 	}
 	}