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:
parent
1b55f6457f
commit
6cb9ed9f8b
2
CMT.cpp
2
CMT.cpp
@ -310,6 +310,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||||||
//cb.open("CSECRET.BIK");
|
//cb.open("CSECRET.BIK");
|
||||||
THC timeHandler tmh;
|
THC timeHandler tmh;
|
||||||
THC tmh.getDif();
|
THC tmh.getDif();
|
||||||
|
timeHandler pomtime;pomtime.getDif();
|
||||||
int xx=0, yy=0, zz=0;
|
int xx=0, yy=0, zz=0;
|
||||||
SDL_Event sEvent;
|
SDL_Event sEvent;
|
||||||
srand ( time(NULL) );
|
srand ( time(NULL) );
|
||||||
@ -767,7 +768,6 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||||||
cgi->scenarioOps = cpg->runLoop();
|
cgi->scenarioOps = cpg->runLoop();
|
||||||
THC tmh.getDif();
|
THC tmh.getDif();
|
||||||
|
|
||||||
timeHandler pomtime;pomtime.getDif();
|
|
||||||
CArtHandler * arth = new CArtHandler;
|
CArtHandler * arth = new CArtHandler;
|
||||||
arth->loadArtifacts();
|
arth->loadArtifacts();
|
||||||
cgi->arth = arth;
|
cgi->arth = arth;
|
||||||
|
@ -2200,7 +2200,10 @@ void CHeroList::updateHList()
|
|||||||
genList();
|
genList();
|
||||||
if(selected>=items.size())
|
if(selected>=items.size())
|
||||||
select(items.size()-1);
|
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
|
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#ifndef CBUILDINGHANDLER_H
|
#ifndef CBUILDINGHANDLER_H
|
||||||
#define CBUILDINGHANDLER_H
|
#define CBUILDINGHANDLER_H
|
||||||
|
#include "../global.h"
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
enum EbuildingType {NEUTRAL=0, CASTLE, RAMPART, TOWER, INFERNO, NECROPOLIS, DUNGEON, STRONGHOLD, FORTRESS, CONFLUX};
|
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
|
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
|
class CBuildingHandler
|
||||||
{
|
{
|
||||||
public:
|
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> buildings; //vector of buildings
|
||||||
std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
|
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
|
std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions
|
||||||
|
Loading…
Reference in New Issue
Block a user