1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

* reduntant quotation marks from artifact descriptions are removed

* fixed map scrolling with ctrl+arrows when some windows are opened
This commit is contained in:
Michał W. Urbańczyk 2009-05-03 23:15:18 +00:00
parent 51821ad5c4
commit ab1a759458
4 changed files with 40 additions and 31 deletions

View File

@ -1373,14 +1373,30 @@ void CAdvMapInt::activate()
heroList.activate();
townList.activate();
terrain.activate();
KeyInterested::activate();
LOCPLINT->cingconsole->activate();
}
void CAdvMapInt::deactivate()
{
KeyInterested::deactivate();
hide();
scrollingDir = 0;
CGI->curh->changeGraphic(0,0);
kingOverview.deactivate();
underground.deactivate();
questlog.deactivate();
sleepWake.deactivate();
moveHero.deactivate();
spellbook.deactivate();
advOptions.deactivate();
sysOptions.deactivate();
nextHero.deactivate();
endTurn.deactivate();
minimap.deactivate();
heroList.deactivate();
townList.deactivate();
terrain.deactivate();
if(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar)!=LOCPLINT->timeinterested.end())
LOCPLINT->timeinterested.erase(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar));
infoBar.mode=-1;
LOCPLINT->cingconsole->deactivate();
@ -1418,28 +1434,6 @@ void CAdvMapInt::showAll(SDL_Surface *to)
infoBar.draw(to);
LOCPLINT->cingconsole->show(to);
}
void CAdvMapInt::hide()
{
CGI->curh->changeGraphic(0,0);
kingOverview.deactivate();
underground.deactivate();
questlog.deactivate();
sleepWake.deactivate();
moveHero.deactivate();
spellbook.deactivate();
advOptions.deactivate();
sysOptions.deactivate();
nextHero.deactivate();
endTurn.deactivate();
minimap.deactivate();
heroList.deactivate();
townList.deactivate();
terrain.deactivate();
if(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar)!=LOCPLINT->timeinterested.end())
LOCPLINT->timeinterested.erase(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar));
infoBar.mode=-1;
}
void CAdvMapInt::show(SDL_Surface *to)
{
++animValHitCount; //for animations

View File

@ -112,7 +112,6 @@ public:
/*****************************/
class CAdvMapInt : public CMainInterface, public KeyInterested //adventure map interface
{
void hide(); //deactivates advmap interface
public:
CAdvMapInt(int Player);
~CAdvMapInt();

View File

@ -1195,6 +1195,7 @@ void CPlayerInterface::yourTurn()
adventureInt->showAll(screen);
pushInt(adventureInt);
adventureInt->KeyInterested::activate();
timeHandler th;
th.getDif();
@ -1243,9 +1244,17 @@ void CPlayerInterface::yourTurn()
delete ev;
}
if(objsToBlit.size() > 1)
blitAt(screen2,0,0,screen); //blit background
objsToBlit.back()->show(screen); //blit active interface/window
if(!adventureInt->active && adventureInt->scrollingDir) //player force map scrolling though interface is disabled
{
totalRedraw();
}
else
{
//update only top interface and draw background
if(objsToBlit.size() > 1)
blitAt(screen2,0,0,screen); //blit background
objsToBlit.back()->show(screen); //blit active interface/window
}
CGI->curh->draw1();
CSDL_Ext::update(screen);
@ -1254,6 +1263,7 @@ void CPlayerInterface::yourTurn()
SDL_framerateDelay(mainFPSmng);
}
adventureInt->KeyInterested::deactivate();
popInt(adventureInt);
cb->endTurn();

View File

@ -55,6 +55,7 @@ void CArtHandler::loadArtifacts(bool onlyTxt)
for (int i=0; i<ARTIFACTS_QUANTITY; i++)
{
CArtifact nart;
nart.id=i;
loadToIt(VLC->generaltexth->artifNames[i],buf,it,4);
loadToIt(pom,buf,it,4);
nart.price=atoi(pom.c_str());
@ -66,8 +67,13 @@ void CArtHandler::loadArtifacts(bool onlyTxt)
}
loadToIt(pom,buf,it,4);
nart.aClass = classes[pom[0]];
loadToIt(VLC->generaltexth->artifDescriptions[i],buf,it,3);
nart.id=i;
//load description and remove quotation marks
std::string &desc = VLC->generaltexth->artifDescriptions[i];
loadToIt(desc,buf,it,3);
if(desc[0] == '\"' && desc[desc.size()-1] == '\"')
desc = desc.substr(1,desc.size()-2);
if(!onlyTxt)
artifacts.push_back(nart);
}