summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-01 22:30:44 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-01 22:30:44 +0300
commitd13de51121a332cf8613a38d7ed5468f971c999f (patch)
tree253c2911e291303fd90eb5d61c23076630782a11 /src/resources
parent6915c38ca9c35bfb9a5ea05fe957463d644a75de (diff)
downloadplus-d13de51121a332cf8613a38d7ed5468f971c999f.tar.gz
plus-d13de51121a332cf8613a38d7ed5468f971c999f.tar.bz2
plus-d13de51121a332cf8613a38d7ed5468f971c999f.tar.xz
plus-d13de51121a332cf8613a38d7ed5468f971c999f.zip
replace tile size from 32 to mapTitleSize.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/itemdb.cpp2
-rw-r--r--src/resources/iteminfo.cpp2
-rw-r--r--src/resources/mapreader.cpp2
-rw-r--r--src/resources/spritedef.cpp10
4 files changed, 9 insertions, 7 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index eeae4cfec..19b618208 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -244,7 +244,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
std::string drawAfter = XML::getProperty(node, "drawAfter", "");
const int pet = XML::getProperty(node, "pet", 0);
const int maxFloorOffset = XML::getIntProperty(
- node, "maxFloorOffset", 32, 0, 32);
+ node, "maxFloorOffset", mapTileSize, 0, mapTileSize);
std::string colors;
if (serverVersion >= 1)
{
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index eb8014f3e..fa8ca2b61 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -60,7 +60,7 @@ ItemInfo::ItemInfo() :
mHitEffectId(-1),
mCriticalHitEffectId(-1),
mMissEffectId(-1),
- maxFloorOffset(32),
+ maxFloorOffset(mapTileSize),
mPickupCursor(Cursor::CURSOR_POINTER),
mPet(0),
mProtected(false)
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 4097acb89..1382e66af 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -934,7 +934,7 @@ Map *MapReader::createEmptyMap(const std::string &filename,
const std::string &realFilename)
{
logger->log1("Creating empty map");
- Map *const map = new Map(300, 300, 32, 32);
+ Map *const map = new Map(300, 300, mapTileSize, mapTileSize);
map->setProperty("_filename", realFilename);
map->setProperty("_realfilename", filename);
updateMusic(map);
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index af0ada0dc..1c593fc71 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -23,6 +23,7 @@
#include "resources/spritedef.h"
#include "logger.h"
+#include "map.h"
#include "resources/action.h"
#include "resources/animation.h"
@@ -293,10 +294,11 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode,
{
const int delay = XML::getIntProperty(
frameNode, "delay", 0, 0, 100000);
- const int offsetX = XML::getProperty(frameNode, "offsetX", 0) +
- imageSet->getOffsetX() - imageSet->getWidth() / 2 + 16;
- const int offsetY = XML::getProperty(frameNode, "offsetY", 0) +
- imageSet->getOffsetY() - imageSet->getHeight() + 32;
+ const int offsetX = XML::getProperty(frameNode, "offsetX", 0)
+ + imageSet->getOffsetX() - imageSet->getWidth() / 2
+ + mapTileSize / 2;
+ const int offsetY = XML::getProperty(frameNode, "offsetY", 0)
+ + imageSet->getOffsetY() - imageSet->getHeight() + mapTileSize;
const int rand = XML::getIntProperty(frameNode, "rand", 100, 0, 100);
if (xmlNameEqual(frameNode, "frame"))