1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

*fixed bugs with hero dismissing

This commit is contained in:
Michał W. Urbańczyk 2008-03-02 13:16:11 +00:00
parent 1b55f6457f
commit 6cb9ed9f8b
3 changed files with 9 additions and 21 deletions

View File

@ -310,6 +310,7 @@ int _tmain(int argc, _TCHAR* argv[])
//cb.open("CSECRET.BIK");
THC timeHandler tmh;
THC tmh.getDif();
timeHandler pomtime;pomtime.getDif();
int xx=0, yy=0, zz=0;
SDL_Event sEvent;
srand ( time(NULL) );
@ -767,7 +768,6 @@ int _tmain(int argc, _TCHAR* argv[])
cgi->scenarioOps = cpg->runLoop();
THC tmh.getDif();
timeHandler pomtime;pomtime.getDif();
CArtHandler * arth = new CArtHandler;
arth->loadArtifacts();
cgi->arth = arth;

View File

@ -2200,7 +2200,10 @@ void CHeroList::updateHList()
genList();
if(selected>=items.size())
select(items.size()-1);
draw();
if(items.size()==0)
LOCPLINT->adventureInt->townList.select(0);
else
select(selected);
}
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
{

View File

@ -1,8 +1,6 @@
#ifndef CBUILDINGHANDLER_H
#define CBUILDINGHANDLER_H
#include <vector>
#include <string>
#include "../global.h"
enum EbuildingType {NEUTRAL=0, CASTLE, RAMPART, TOWER, INFERNO, NECROPOLIS, DUNGEON, STRONGHOLD, FORTRESS, CONFLUX};
@ -17,23 +15,10 @@ public:
bool isDwelling; //true, if this building is a dwelling
};
//class CGBuilding
//{
// int ID, subID;
//
// struct {
// int x, y;
// } pos;
//
// bool allowed;
// bool built;
//
// std::string name, description
//};
class CBuildingHandler
{
public:
//std::map<int, std::map<int, CBuilding*> > buildings; ///< first int is the castle ID, second the building ID (in ERM-U format)
std::vector<CBuilding> buildings; //vector of buildings
std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions