mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-26 08:41:13 +02:00
CAdvMapInt tweak
This commit is contained in:
parent
1ccb0d98be
commit
36ac9ac86c
@ -505,7 +505,7 @@ CAdvMapInt::CAdvMapInt():
|
||||
|
||||
for (int g=0; g<ADVOPT.gemG.size(); ++g)
|
||||
{
|
||||
gems.push_back(CDefHandler::giveDef(ADVOPT.gemG[g]));
|
||||
gems.push_back(new CAnimImage(ADVOPT.gemG[g], 0, 0, ADVOPT.gemX[g], ADVOPT.gemY[g]));
|
||||
}
|
||||
|
||||
auto makeButton = [&] (int textID, std::function<void()> callback, config::ButtonInfo info, int key) -> CButton *
|
||||
@ -633,9 +633,6 @@ CAdvMapInt::~CAdvMapInt()
|
||||
{
|
||||
SDL_FreeSurface(bg);
|
||||
|
||||
for(int i=0; i<gems.size(); i++)
|
||||
delete gems[i];
|
||||
|
||||
delete worldViewIconsDef;
|
||||
}
|
||||
|
||||
@ -983,6 +980,8 @@ void CAdvMapInt::show(SDL_Surface * to)
|
||||
scrollingState = false;
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < 4; i++)
|
||||
gems[i]->setFrame(LOCPLINT->playerID.getNum());
|
||||
if(updateScreen)
|
||||
{
|
||||
int3 betterPos = LOCPLINT->repairScreenPos(position);
|
||||
@ -993,16 +992,16 @@ void CAdvMapInt::show(SDL_Surface * to)
|
||||
}
|
||||
|
||||
terrain.show(to);
|
||||
for(int i=0;i<4;i++)
|
||||
blitAt(gems[i]->ourImages[LOCPLINT->playerID.getNum()].bitmap,ADVOPT.gemX[i],ADVOPT.gemY[i],to);
|
||||
for(int i = 0; i < 4; i++)
|
||||
gems[i]->showAll(to);
|
||||
updateScreen=false;
|
||||
LOCPLINT->cingconsole->show(to);
|
||||
}
|
||||
else if (terrain.needsAnimUpdate())
|
||||
{
|
||||
terrain.showAnim(to);
|
||||
for(int i=0;i<4;i++)
|
||||
blitAt(gems[i]->ourImages[LOCPLINT->playerID.getNum()].bitmap,ADVOPT.gemX[i],ADVOPT.gemY[i],to);
|
||||
for(int i = 0; i < 4; i++)
|
||||
gems[i]->showAll(to);
|
||||
}
|
||||
|
||||
infoBar.show(to);
|
||||
|
@ -131,25 +131,25 @@ public:
|
||||
|
||||
EAdvMapMode mode;
|
||||
float worldViewScale;
|
||||
|
||||
|
||||
struct WorldViewOptions
|
||||
{
|
||||
bool showAllTerrain; //for expert viewEarth
|
||||
|
||||
|
||||
std::vector<ObjectPosInfo> iconPositions;
|
||||
|
||||
|
||||
WorldViewOptions();
|
||||
|
||||
|
||||
void clear();
|
||||
|
||||
void adjustDrawingInfo(MapDrawingInfo & info);
|
||||
|
||||
void adjustDrawingInfo(MapDrawingInfo & info);
|
||||
};
|
||||
|
||||
WorldViewOptions worldViewOptions;
|
||||
|
||||
WorldViewOptions worldViewOptions;
|
||||
|
||||
SDL_Surface * bg;
|
||||
SDL_Surface * bgWorldView;
|
||||
std::vector<CDefHandler *> gems;
|
||||
std::vector<CAnimImage *> gems;
|
||||
CMinimap minimap;
|
||||
CGStatusBar statusbar;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user