1
0
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:
Michał W. Urbańczyk 2010-03-02 20:12:32 +00:00
parent 6a756cf882
commit eec43d3c58
6 changed files with 9 additions and 5 deletions

View File

@ -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;
} }

View File

@ -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);

View File

@ -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));

View File

@ -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

View File

@ -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;

View File

@ -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;