mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
In config file, for adventure map, replaced tilesWidth, tilesHeight, trimX and trimY with width and height. Let VCMI do the right calculations.
This commit is contained in:
parent
96a34c30f0
commit
e5203db83c
@ -55,8 +55,11 @@ CMinimap::CMinimap(bool draw)
|
|||||||
pos.h=ADVOPT.minimapW;//144
|
pos.h=ADVOPT.minimapW;//144
|
||||||
pos.w=ADVOPT.minimapH;//144
|
pos.w=ADVOPT.minimapH;//144
|
||||||
|
|
||||||
int rx = (((float)ADVOPT.tilesW)/(mapSizes.x))*((float)pos.w),
|
const int tilesw=(ADVOPT.advmapW+31)/32;
|
||||||
ry = (((float)ADVOPT.tilesH)/(mapSizes.y))*((float)pos.h);
|
const int tilesh=(ADVOPT.advmapH+31)/32;
|
||||||
|
|
||||||
|
int rx = (((float)tilesw)/(mapSizes.x))*((float)pos.w),
|
||||||
|
ry = (((float)tilesh)/(mapSizes.y))*((float)pos.h);
|
||||||
|
|
||||||
radar = newSurface(rx,ry);
|
radar = newSurface(rx,ry);
|
||||||
temps = newSurface(pos.w,pos.h);
|
temps = newSurface(pos.w,pos.h);
|
||||||
@ -374,12 +377,12 @@ void CMinimap::hideTile(const int3 &pos)
|
|||||||
CTerrainRect::CTerrainRect()
|
CTerrainRect::CTerrainRect()
|
||||||
:currentPath(NULL)
|
:currentPath(NULL)
|
||||||
{
|
{
|
||||||
tilesw=ADVOPT.tilesW;
|
tilesw=(ADVOPT.advmapW+31)/32;
|
||||||
tilesh=ADVOPT.tilesH;
|
tilesh=(ADVOPT.advmapH+31)/32;
|
||||||
pos.x=ADVOPT.advmapX;
|
pos.x=ADVOPT.advmapX;
|
||||||
pos.y=ADVOPT.advmapY;
|
pos.y=ADVOPT.advmapY;
|
||||||
pos.w=tilesw*32 - ADVOPT.advmapTrimX;
|
pos.w=ADVOPT.advmapW;
|
||||||
pos.h=tilesh*32 - ADVOPT.advmapTrimY;
|
pos.h=ADVOPT.advmapH;
|
||||||
moveX = moveY = 0;
|
moveX = moveY = 0;
|
||||||
arrows = CDefHandler::giveDef("ADAG.DEF");
|
arrows = CDefHandler::giveDef("ADAG.DEF");
|
||||||
for(size_t y=0; y < arrows->ourImages.size(); ++y)
|
for(size_t y=0; y < arrows->ourImages.size(); ++y)
|
||||||
|
@ -235,10 +235,8 @@ struct SettingsGrammar : public grammar<SettingsGrammar>
|
|||||||
*(
|
*(
|
||||||
( "x=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapX)]
|
( "x=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapX)]
|
||||||
| "y=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapY)]
|
| "y=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapY)]
|
||||||
| "trimX=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapTrimX)]
|
| "width=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapW)]
|
||||||
| "trimY=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapTrimY)]
|
| "height=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::advmapH)]
|
||||||
| "tilesWidth=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::tilesW)]
|
|
||||||
| "tilesHeight=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::tilesH)]
|
|
||||||
| "smoothMove=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::smoothMove)]
|
| "smoothMove=" >> uint_p[SetAdventureProp_a(&AdventureMapConfig::smoothMove)]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -42,7 +42,7 @@ namespace config
|
|||||||
//infobox
|
//infobox
|
||||||
int infoboxX, infoboxY;
|
int infoboxX, infoboxY;
|
||||||
//advmap
|
//advmap
|
||||||
int tilesW, tilesH, advmapX, advmapY, advmapTrimX, advmapTrimY;
|
int advmapX, advmapY, advmapW, advmapH;
|
||||||
bool smoothMove;
|
bool smoothMove;
|
||||||
//general properties
|
//general properties
|
||||||
std::string mainGraphic;
|
std::string mainGraphic;
|
||||||
|
@ -16,7 +16,7 @@ GUISettings
|
|||||||
{
|
{
|
||||||
AdventureMap
|
AdventureMap
|
||||||
{
|
{
|
||||||
AdvMap: x=7 y=6 tilesWidth=19 tilesHeight=18 trimX=15 trimY=29 smoothMove=1;
|
AdvMap: x=7 y=6 width=593 height=547 smoothMove=1;
|
||||||
InfoBox: x=605 y=389;
|
InfoBox: x=605 y=389;
|
||||||
gem0: x=6 y=508 graphic=agemLL.def;
|
gem0: x=6 y=508 graphic=agemLL.def;
|
||||||
gem1: x=556 y=508 graphic=agemLR.def;
|
gem1: x=556 y=508 graphic=agemLR.def;
|
||||||
@ -44,7 +44,7 @@ GUISettings
|
|||||||
{
|
{
|
||||||
AdventureMap
|
AdventureMap
|
||||||
{
|
{
|
||||||
AdvMap: x=7 y=6 tilesWidth=26 tilesHeight=18 trimX=15 trimY=29 smoothMove=1;
|
AdvMap: x=7 y=6 width=817 height=547 smoothMove=1;
|
||||||
InfoBox: x=829 y=389;
|
InfoBox: x=829 y=389;
|
||||||
gem0: x=6 y=508 graphic=agemLL.def;
|
gem0: x=6 y=508 graphic=agemLL.def;
|
||||||
gem1: x=780 y=508 graphic=agemLR.def;
|
gem1: x=780 y=508 graphic=agemLR.def;
|
||||||
@ -73,7 +73,7 @@ GUISettings
|
|||||||
{
|
{
|
||||||
AdventureMap
|
AdventureMap
|
||||||
{
|
{
|
||||||
AdvMap: x=7 y=6 tilesWidth=26 tilesHeight=23 trimX=15 trimY=20 smoothMove=1;
|
AdvMap: x=7 y=6 width=817 height=715 smoothMove=1;
|
||||||
InfoBox: x=829 y=557;
|
InfoBox: x=829 y=557;
|
||||||
gem0: x=6 y=676 graphic=agemLL.def;
|
gem0: x=6 y=676 graphic=agemLL.def;
|
||||||
gem1: x=780 y=676 graphic=agemLR.def;
|
gem1: x=780 y=676 graphic=agemLR.def;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user