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