瀏覽代碼

Splitting buttons in the exchange window. Minor fixes. Updated changelog. Version set to 0.73.

Michał W. Urbańczyk 16 年之前
父節點
當前提交
92ef19942f
共有 7 個文件被更改,包括 33 次插入9 次删除
  1. 6 5
      ChangeLog
  2. 5 0
      client/CMT.cpp
  3. 3 2
      client/CPreGame.cpp
  4. 11 0
      client/GUIClasses.cpp
  5. 1 1
      client/GUIClasses.h
  6. 1 1
      global.h
  7. 6 0
      lib/map.h

+ 6 - 5
ChangeLog

@@ -1,11 +1,11 @@
-0.72 -> 0.73 (scheguled on 1 Sep) as for r1044
+0.72 -> 0.73 (1 Aug 2009) as for r1044
 GENERAL:
 GENERAL:
 * infowindow popup will be completely on screen
 * infowindow popup will be completely on screen
 * fixed possible crash with in game console
 * fixed possible crash with in game console
 * fixed crash when gaining artifact after r-click on hero in tavern
 * fixed crash when gaining artifact after r-click on hero in tavern
 * Estates / hero bonuses won't give resources on first day. 
 * Estates / hero bonuses won't give resources on first day. 
 * video handling (intro, main menu animation, tavern animation, spellbook animation, battle result window)
 * video handling (intro, main menu animation, tavern animation, spellbook animation, battle result window)
-* hero meeting window allowing exchanging armies between heroes on adventure map
+* hero meeting window allowing exchanging armies and artifacts between heroes on adventure map
 * 'T' hotkey opens marketplace window
 * 'T' hotkey opens marketplace window
 * giving starting spells for heroes
 * giving starting spells for heroes
 * pressing enter or escape close spellbook
 * pressing enter or escape close spellbook
@@ -15,7 +15,7 @@ GENERAL:
 * increased char per line limit for subtitles under components
 * increased char per line limit for subtitles under components
 * corrected some exp/level values
 * corrected some exp/level values
 * primary skills cannot be negative
 * primary skills cannot be negative
-* support for 3 new artifacts: Ring of Vitality, Ring of Life, Vial of Lifeblood
+* support for new artifacts: Ring of Vitality, Ring of Life, Vial of Lifeblood, Garniture of Interference, Surcoat of Counterpoise, Boots of Polarity
 * fixed timed events reappearing
 * fixed timed events reappearing
 * saving system options
 * saving system options
 * saving hero direction
 * saving hero direction
@@ -30,11 +30,11 @@ ADVENTURE INTERFACE:
 
 
 BATTLES:
 BATTLES:
 * spell resistance supported (secondary skill, artifacts, creature skill)
 * spell resistance supported (secondary skill, artifacts, creature skill)
+* corrected damage inflicted by spells and ballista
 * added some missing projectile infos
 * added some missing projectile infos
 * added native terrain bonuses in battles
 * added native terrain bonuses in battles
-* number of units in stack in battle should now fit the box
+* number of units in stack in battle should better fit the box
 * non-living and undead creatures have now always 0 morale
 * non-living and undead creatures have now always 0 morale
-* partial handling of advmap objects changing battle background (like clover field) (their existence should change the background but nothing else)
 * displaying luck effect animation
 * displaying luck effect animation
 * support for battleground overlays:
 * support for battleground overlays:
 - cursed ground
 - cursed ground
@@ -74,6 +74,7 @@ OBJECTS:
 - Ocean bottle
 - Ocean bottle
 - Sea Chest 
 - Sea Chest 
 - Shipwreck Survivor
 - Shipwreck Survivor
+- Shipyard
 - Sirens 
 - Sirens 
 
 
 0.71 -> 0.72 (Jun 1 2009)
 0.71 -> 0.72 (Jun 1 2009)

+ 5 - 0
client/CMT.cpp

@@ -343,6 +343,11 @@ void processCommand(const std::string &message, CClient *&client)
 	}
 	}
 	else if(cn=="resolution")
 	else if(cn=="resolution")
 	{
 	{
+		if(LOCPLINT)
+		{
+			tlog1 << "Resolution can be set only before starting the game.\n";
+			return;
+		}
 		std::map<std::pair<int,int>, config::GUIOptions >::iterator j;
 		std::map<std::pair<int,int>, config::GUIOptions >::iterator j;
 		int i=1, hlp=1;
 		int i=1, hlp=1;
 		tlog4 << "Available screen resolutions:\n";
 		tlog4 << "Available screen resolutions:\n";

+ 3 - 2
client/CPreGame.cpp

@@ -1072,14 +1072,14 @@ void MapSel::show()
 void MapSel::processMaps(const std::vector<std::string> &pliczkiTemp, int start, int threads)
 void MapSel::processMaps(const std::vector<std::string> &pliczkiTemp, int start, int threads)
 {
 {
 	int read=0;
 	int read=0;
-	unsigned char sss[1000];
+	unsigned char sss[1500];
 	while(true)
 	while(true)
 	{
 	{
 		if(start >= ourMaps.size())
 		if(start >= ourMaps.size())
 			break;
 			break;
 		ourMaps[start] = NULL;
 		ourMaps[start] = NULL;
 		gzFile tempf = gzopen(pliczkiTemp[start].c_str(),"rb");
 		gzFile tempf = gzopen(pliczkiTemp[start].c_str(),"rb");
-		read = gzread(tempf, sss, 1000);
+		read = gzread(tempf, sss, 1500);
 		gzclose(tempf);
 		gzclose(tempf);
 		if(read < 50)
 		if(read < 50)
 		{
 		{
@@ -2054,6 +2054,7 @@ void CPreGame::scenHandleEv(SDL_Event& sEvent)
 StartInfo CPreGame::runLoop()
 StartInfo CPreGame::runLoop()
 {
 {
 	SDL_Event sEvent;
 	SDL_Event sEvent;
+	while(SDL_PollEvent(&sEvent)); //remove old events
 	ret.turnTime = 0;
 	ret.turnTime = 0;
 
 
 #ifdef _WIN32
 #ifdef _WIN32

+ 11 - 0
client/GUIClasses.cpp

@@ -3714,6 +3714,8 @@ void CExchangeWindow::activate()
 {
 {
 	quit->activate();
 	quit->activate();
 	garr->activate();
 	garr->activate();
+	splitButton[0]->activate();
+	splitButton[1]->activate();
 
 
 	artifs[0]->activate();
 	artifs[0]->activate();
 	artifs[1]->activate();
 	artifs[1]->activate();
@@ -3753,6 +3755,8 @@ void CExchangeWindow::deactivate()
 {
 {
 	quit->deactivate();
 	quit->deactivate();
 	garr->deactivate();
 	garr->deactivate();
+	splitButton[0]->deactivate();
+	splitButton[1]->deactivate();
 
 
 	artifs[0]->deactivate();
 	artifs[0]->deactivate();
 	artifs[1]->deactivate();
 	artifs[1]->deactivate();
@@ -3807,6 +3811,8 @@ void CExchangeWindow::show(SDL_Surface * to)
 	}
 	}
 
 
 	garr->show(to);
 	garr->show(to);
+	splitButton[0]->show(to);
+	splitButton[1]->show(to);
 }
 }
 
 
 void CExchangeWindow::questlog(int whichHero)
 void CExchangeWindow::questlog(int whichHero)
@@ -3977,6 +3983,9 @@ CExchangeWindow::CExchangeWindow(si32 hero1, si32 hero2) : bg(NULL)
 
 
 	//garrison interface
 	//garrison interface
 	garr = new CGarrisonInt(pos.x + 69, pos.y + 131, 4, Point(418,0), bg, Point(69,131), heroInst[0],heroInst[1], true);
 	garr = new CGarrisonInt(pos.x + 69, pos.y + 131, 4, Point(418,0), bg, Point(69,131), heroInst[0],heroInst[1], true);
+
+	splitButton[0] = new AdventureMapButton(CGI->generaltexth->tcommands[3],"",boost::bind(&CGarrisonInt::splitClick,garr),pos.x+10,pos.y+132,"TSBTNS.DEF");
+	splitButton[1] = new AdventureMapButton(CGI->generaltexth->tcommands[3],"",boost::bind(&CGarrisonInt::splitClick,garr),pos.x+740,pos.y+132,"TSBTNS.DEF");
 }
 }
 
 
 CExchangeWindow::~CExchangeWindow() //d-tor
 CExchangeWindow::~CExchangeWindow() //d-tor
@@ -3992,6 +4001,8 @@ CExchangeWindow::~CExchangeWindow() //d-tor
 	delete artifs[1];
 	delete artifs[1];
 
 
 	delete garr;
 	delete garr;
+	delete splitButton[0];
+	delete splitButton[1];
 	delete ourBar;
 	delete ourBar;
 
 
 	for(int g=0; g<ARRAY_COUNT(secSkillAreas); g++)
 	for(int g=0; g<ARRAY_COUNT(secSkillAreas); g++)

+ 1 - 1
client/GUIClasses.h

@@ -687,7 +687,7 @@ class CExchangeWindow : public CIntObject, public CWindowWithGarrison
 	CStatusBar * ourBar; //internal statusbar
 	CStatusBar * ourBar; //internal statusbar
 
 
 	SDL_Surface *bg; //background
 	SDL_Surface *bg; //background
-	AdventureMapButton * quit, * questlogButton[2];
+	AdventureMapButton * quit, * questlogButton[2], * splitButton[2];
 
 
 	std::vector<LRClickableAreaWTextComp *> secSkillAreas[2], primSkillAreas;
 	std::vector<LRClickableAreaWTextComp *> secSkillAreas[2], primSkillAreas;
 
 

+ 1 - 1
global.h

@@ -19,7 +19,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
 #define THC
 #define THC
 #endif
 #endif
 
 
-#define NAME_VER ("VCMI 0.72d")
+#define NAME_VER ("VCMI 0.73")
 extern std::string NAME; //full name
 extern std::string NAME; //full name
 extern std::string NAME_AFFIX; //client / server
 extern std::string NAME_AFFIX; //client / server
 #define CONSOLE_LOGGING_LEVEL 5
 #define CONSOLE_LOGGING_LEVEL 5

+ 6 - 0
lib/map.h

@@ -443,11 +443,17 @@ struct DLL_EXPORT Mapa : public CMapHeader
 					if(vistile == towns[j]->pos) //hero stands on the town entrance
 					if(vistile == towns[j]->pos) //hero stands on the town entrance
 					{
 					{
 						if(heroes[i]->inTownGarrison)
 						if(heroes[i]->inTownGarrison)
+						{
 							towns[j]->garrisonHero = heroes[i];
 							towns[j]->garrisonHero = heroes[i];
+							removeBlockVisTiles(heroes[i]);
+						}
 						else
 						else
+						{
 							towns[j]->visitingHero = heroes[i];
 							towns[j]->visitingHero = heroes[i];
+						}
 
 
 						heroes[i]->visitedTown = towns[j];
 						heroes[i]->visitedTown = towns[j];
+						break;
 					}
 					}
 				}
 				}