diff --git a/CCastleInterface.cpp b/CCastleInterface.cpp index ee77629e3..eeeb4fc40 100644 --- a/CCastleInterface.cpp +++ b/CCastleInterface.cpp @@ -142,7 +142,7 @@ void CBuildingRect::clickRight (tribool down) vinya->free = true; vinya->bitmap = CMessage::drawBoxTextBitmapSub (LOCPLINT->playerID, - CGI->buildh->buildings[str->townID][str->ID]->description, + CGI->buildh->buildings[str->townID][str->ID]->Description(), LOCPLINT->castleInt->bicons->ourImages[str->ID].bitmap, CGI->buildh->buildings[str->townID][str->ID]->Name()); vinya->pos.x = screen->w/2 - vinya->bitmap->w/2; @@ -1467,12 +1467,18 @@ void CFortScreen::RecArea::clickLeft (tribool down) void CFortScreen::RecArea::activate() { ClickableL::activate(); + ClickableR::activate(); } void CFortScreen::RecArea::deactivate() { ClickableL::deactivate(); + ClickableR::deactivate(); } +void CFortScreen::RecArea::clickRight( tribool down ) +{ + clickLeft(down);; //r-click does same as l-click - opens recr. window +} CMageGuildScreen::CMageGuildScreen(CCastleInterface * owner) { pos = owner->pos; diff --git a/CCastleInterface.h b/CCastleInterface.h index 54b6af90e..1ef132cea 100644 --- a/CCastleInterface.h +++ b/CCastleInterface.h @@ -153,12 +153,13 @@ public: class CFortScreen : public CMainInterface, public CIntObject { - class RecArea : public ClickableL + class RecArea : public ClickableL, public ClickableR { public: int bid; RecArea(int BID):bid(BID){}; void clickLeft (tribool down); + void clickRight (tribool down); void activate(); void deactivate(); }; diff --git a/CPlayerInterface.cpp b/CPlayerInterface.cpp index 970adfbe9..d3836a69a 100644 --- a/CPlayerInterface.cpp +++ b/CPlayerInterface.cpp @@ -2880,7 +2880,7 @@ int CCreaturePic::blitPic(SDL_Surface *to, int x, int y, bool nextFrame) } if(c->isDoubleWide()) x-=15; - return anim->nextFrameMiddle(to,x+70,y+45,true,nextFrame,false,&dst); + return anim->nextFrameMiddle(to,x+78,y+(big ? 55 : 45),true,nextFrame,false,&dst); } SDL_Surface * CCreaturePic::getPic(bool nextFrame) { @@ -2937,10 +2937,29 @@ void CRecrutationWindow::clickLeft(tribool down) curx += 120; } } +void CRecrutationWindow::clickRight( boost::logic::tribool down ) +{ + if(down) + { + int curx = 192 + 51 - (102*creatures.size()/2) - (18*(creatures.size()-1)/2); + for(int i=0;icurrent->motion.x,LOCPLINT->current->motion.y)) + { + CCreInfoWindow *popup = new CCreInfoWindow(creatures[i].ID,0,0,NULL,NULL,NULL,NULL); + popup->activate(); + break; + } + curx += 120; + } + } +} + void CRecrutationWindow::activate() { LOCPLINT->objsToBlit.push_back(this); ClickableL::activate(); + ClickableR::activate(); buy->activate(); max->activate(); cancel->activate(); @@ -2950,6 +2969,7 @@ void CRecrutationWindow::deactivate() { LOCPLINT->objsToBlit.erase(std::find(LOCPLINT->objsToBlit.begin(),LOCPLINT->objsToBlit.end(),this)); ClickableL::deactivate(); + ClickableR::deactivate(); buy->deactivate(); max->deactivate(); cancel->deactivate(); @@ -3189,10 +3209,10 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState count = pom; } - printAtMiddle(c->namePl,149,30,GEOR13,zwykly,bitmap); //creature name + printAtMiddle(c->namePl,149,30,GEOR13,tytulowy,bitmap); //creature name //atttack - printAt(CGI->generaltexth->zelp[435].first,155,48,GEOR13,zwykly,bitmap); + printAt(CGI->generaltexth->primarySkillNames[0],155,48,GEOR13,zwykly,bitmap); SDL_itoa(c->attack,pom,10); if(State && State->attackBonus) { @@ -3209,7 +3229,7 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState printToWR(pom,276,61,GEOR13,zwykly,bitmap); //defense - printAt(CGI->generaltexth->zelp[436].first,155,67,GEOR13,zwykly,bitmap); + printAt(CGI->generaltexth->primarySkillNames[1],155,67,GEOR13,zwykly,bitmap); SDL_itoa(c->defence,pom,10); if(State && State->defenseBonus) { @@ -3248,14 +3268,14 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState printToWR(pom,276,118,GEOR13,zwykly,bitmap); //health - printAt(CGI->generaltexth->zelp[439].first,155,124,GEOR13,zwykly,bitmap); + printAt(CGI->generaltexth->allTexts[388],155,124,GEOR13,zwykly,bitmap); SDL_itoa(c->hitPoints,pom,10); printToWR(pom,276,137,GEOR13,zwykly,bitmap); //remaining health if(State && State->currentHealth) { - printAt(CGI->generaltexth->zelp[440].first,155,143,GEOR13,zwykly,bitmap); + printAt(CGI->generaltexth->allTexts[200],155,143,GEOR13,zwykly,bitmap); SDL_itoa(State->currentHealth,pom,10); printToWR(pom,276,156,GEOR13,zwykly,bitmap); } @@ -3371,7 +3391,7 @@ void CCreInfoWindow::close() else { CCastleInterface *c = dynamic_cast(LOCPLINT->curint); - if(c) + if(c && !c->subInt) c->showAll(); if(type) LOCPLINT->curint->activate(); @@ -3398,7 +3418,7 @@ void CCreInfoWindow::deactivate() active = false; if(!type) ClickableR::deactivate(); - LOCPLINT->objsToBlit.erase(std::find(LOCPLINT->objsToBlit.begin(),LOCPLINT->objsToBlit.end(),this)); + LOCPLINT->objsToBlit -= static_cast(this); if(ok) ok->deactivate(); if(dismiss) diff --git a/CPlayerInterface.h b/CPlayerInterface.h index dd984f7db..426b5c7db 100644 --- a/CPlayerInterface.h +++ b/CPlayerInterface.h @@ -509,7 +509,7 @@ public: SDL_Surface * getPic(bool nextFrame); }; -class CRecrutationWindow : public IShowable, public ClickableL +class CRecrutationWindow : public IShowable, public ClickableL, public ClickableR { public: struct creinfo @@ -533,6 +533,7 @@ public: void Cancel(); void sliderMoved(int to); void clickLeft(boost::logic::tribool down); + void clickRight(boost::logic::tribool down); void activate(); void deactivate(); void show(SDL_Surface * to = NULL); diff --git a/ChangeLog b/ChangeLog index eda491646..732654bd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,12 @@ -0.64 -> 0.next (???) [as for r679] +0.64 -> 0.next (???) [as for r681] GENERAL: * move some settings to the config/settings.txt file * partial support for new screen resolutions * /Data and /Sprites subfolders can be used for adding files not present in .lod archives * fixed crashbug occuring when hero levelled above 15 level * support for non-standard screen resolutions +* F4 toggles between full-screen and windowed mode (experimental) +* minor improvements in creature card window ADVENTURE INTERFACE: * smooth map scrolling on hero movement