mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Version set to 0.80. (real, fixed release)
Hopefully fixed #412, #413, #414
This commit is contained in:
parent
6a756cf882
commit
eec43d3c58
@ -1835,7 +1835,7 @@ void CAdvMapInt::keyPressed(const SDL_KeyboardEvent & key)
|
|||||||
case SDLK_d:
|
case SDLK_d:
|
||||||
{
|
{
|
||||||
const CGHeroInstance *h = dynamic_cast<const CGHeroInstance*>(selection);
|
const CGHeroInstance *h = dynamic_cast<const CGHeroInstance*>(selection);
|
||||||
if(h && isActive())
|
if(h && isActive() && key.state == SDL_PRESSED)
|
||||||
LOCPLINT->tryDiggging(h);
|
LOCPLINT->tryDiggging(h);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1947,8 +1947,9 @@ void CPlayerInterface::tryDiggging(const CGHeroInstance *h)
|
|||||||
showInfoDialog(CGI->generaltexth->allTexts[60]); //Try looking on land!
|
showInfoDialog(CGI->generaltexth->allTexts[60]); //Try looking on land!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const TerrainTile *t = cb->getTileInfo(h->getPosition());
|
||||||
CGI->mh->getTerrainDescr(h->getPosition(false), hlp, false);
|
CGI->mh->getTerrainDescr(h->getPosition(false), hlp, false);
|
||||||
if(hlp.length())
|
if(hlp.length() || t->blockingObjects.size() > 1)
|
||||||
showInfoDialog(CGI->generaltexth->allTexts[97]); //Try searching on clear ground.
|
showInfoDialog(CGI->generaltexth->allTexts[97]); //Try searching on clear ground.
|
||||||
else
|
else
|
||||||
cb->dig(h);
|
cb->dig(h);
|
||||||
|
@ -42,7 +42,7 @@ Graphics * graphics = NULL;
|
|||||||
|
|
||||||
SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
|
SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
|
||||||
{
|
{
|
||||||
char buf[10];
|
char buf[15];
|
||||||
blueToPlayersAdv(hInfo,curh.owner);
|
blueToPlayersAdv(hInfo,curh.owner);
|
||||||
SDL_Surface * ret = SDL_DisplayFormat(hInfo);
|
SDL_Surface * ret = SDL_DisplayFormat(hInfo);
|
||||||
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
||||||
|
2
global.h
2
global.h
@ -21,7 +21,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
|||||||
#define THC
|
#define THC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NAME_VER ("VCMI 0.8")
|
#define NAME_VER ("VCMI 0.80")
|
||||||
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
|
||||||
|
@ -1085,6 +1085,9 @@ SDL_Surface * CMapHandler::getVisBitmap(int x, int y, const std::vector< std::ve
|
|||||||
|
|
||||||
bool CMapHandler::printObject(const CGObjectInstance *obj)
|
bool CMapHandler::printObject(const CGObjectInstance *obj)
|
||||||
{
|
{
|
||||||
|
if(!obj->defInfo->handler)
|
||||||
|
processDef(obj->defInfo);
|
||||||
|
|
||||||
const SDL_Surface *bitmap = obj->defInfo->handler->ourImages[0].bitmap;
|
const SDL_Surface *bitmap = obj->defInfo->handler->ourImages[0].bitmap;
|
||||||
int tilesW = bitmap->w/32,
|
int tilesW = bitmap->w/32,
|
||||||
tilesH = bitmap->h/32;
|
tilesH = bitmap->h/32;
|
||||||
|
@ -4030,7 +4030,7 @@ bool CGameHandler::dig( const CGHeroInstance *h )
|
|||||||
{
|
{
|
||||||
for (std::vector<CGObjectInstance*>::const_iterator i = gs->map->objects.begin(); i != gs->map->objects.end(); i++) //unflag objs
|
for (std::vector<CGObjectInstance*>::const_iterator i = gs->map->objects.begin(); i != gs->map->objects.end(); i++) //unflag objs
|
||||||
{
|
{
|
||||||
if((*i)->ID == 124 && (*i)->pos == h->getPosition())
|
if(*i && (*i)->ID == 124 && (*i)->pos == h->getPosition())
|
||||||
{
|
{
|
||||||
complain("Cannot dig - there is already a hole under the hero!");
|
complain("Cannot dig - there is already a hole under the hero!");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user