1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

* close button properly closes (same does 'q' key)

* two players can't have selected same hero
* double click on "Show Avalible Scenarios" won't reset options
* fixed crashbug in town/hero lists
* fixed crashbug in initializing game caused by wrong prisons handling
* fixed crashbug on reading custom artifacts in RoE map
* fixed crashbug on reading custom pandora's box in RoE map
* fixed crashbug on reading blank quest guards
* improved console messages


Ufff....
This commit is contained in:
Michał W. Urbańczyk
2008-02-03 04:22:58 +00:00
parent 313f940e7e
commit 847126f57a
7 changed files with 63 additions and 16 deletions

View File

@@ -595,7 +595,10 @@ void CMapHandler::calculateBlockedPos()
}
void CMapHandler::init()
{
timeHandler th;
th.getDif();
randomizeObjects();//randomizing objects on map
std::cout<<"\tRandomizing objects: "<<th.getDif()<<std::endl;
for(int h=0; h<reader->map.defy.size(); ++h) //initializing loaded def handler's info
{
@@ -603,12 +606,18 @@ void CMapHandler::init()
std::transform(hlp.begin(), hlp.end(), hlp.begin(), (int(*)(int))toupper);
CGI->mh->loadedDefs.insert(std::make_pair(hlp, reader->map.defy[h]->handler));
}
std::cout<<"\tCollecting loaded def's handlers: "<<th.getDif()<<std::endl;
prepareFOWDefs();
roadsRiverTerrainInit(); //road's and river's DefHandlers; and simple values initialization
borderAndTerrainBitmapInit();
std::cout<<"\tPreparing FoW, roads, rivers,borders: "<<th.getDif()<<std::endl;
initObjectRects();
std::cout<<"\tMaking object rects: "<<th.getDif()<<std::endl;
calculateBlockedPos();
std::cout<<"\tCalculating blockmap: "<<th.getDif()<<std::endl;
}
SDL_Surface * CMapHandler::terrainRect(int x, int y, int dx, int dy, int level, unsigned char anim, PseudoV< PseudoV< PseudoV<unsigned char> > > & visibilityMap, bool otherHeroAnim, unsigned char heroAnim)