diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-07 01:25:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-07 01:25:14 +0300 |
commit | 1740b281aa32ba2c30a2a6203f7748af6a21fd39 (patch) | |
tree | 2cc63714431f7ddebb5af57e71926cde419be4b5 /src/resources/horseinfo.h | |
parent | 2b6564dcd936825853727fa256e5da7f84f933da (diff) | |
download | plus-1740b281aa32ba2c30a2a6203f7748af6a21fd39.tar.gz plus-1740b281aa32ba2c30a2a6203f7748af6a21fd39.tar.bz2 plus-1740b281aa32ba2c30a2a6203f7748af6a21fd39.tar.xz plus-1740b281aa32ba2c30a2a6203f7748af6a21fd39.zip |
Extend horses.xml with separate offset for each direction for rider, up and down sprites.
Diffstat (limited to 'src/resources/horseinfo.h')
-rw-r--r-- | src/resources/horseinfo.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/resources/horseinfo.h b/src/resources/horseinfo.h index 4ff1dfb09..97bcdcc6f 100644 --- a/src/resources/horseinfo.h +++ b/src/resources/horseinfo.h @@ -24,6 +24,8 @@ #include "resources/sprite/spritereference.h" +#include "resources/horseoffset.h" + #include "localconsts.h" struct HorseInfo final @@ -31,24 +33,24 @@ struct HorseInfo final HorseInfo() : downSprites(), upSprites(), - downOffsetX(0), - downOffsetY(0), - upOffsetX(0), - upOffsetY(0), - riderOffsetX(0), - riderOffsetY(0) - { } + offsets() + { + for (int f = 0; f < 10; f ++) + { + offsets[f].upOffsetX = 0; + offsets[f].upOffsetY = 0; + offsets[f].downOffsetX = 0; + offsets[f].downOffsetY = 0; + offsets[f].riderOffsetX = 0; + offsets[f].riderOffsetY = 0; + } + } A_DELETE_COPY(HorseInfo) std::vector<SpriteReference*> downSprites; std::vector<SpriteReference*> upSprites; - int downOffsetX; - int downOffsetY; - int upOffsetX; - int upOffsetY; - int riderOffsetX; - int riderOffsetY; + HorseOffset offsets[10]; // by direction }; #endif // RESOURCES_HORSEINFO_H |