~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/resources/db/petdb.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2014-01-10 11:00:12 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20140110110012-4mt9zewufrl9bbtj
Tags: 1.4.1.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  The ManaPlus Client
3
3
 *  Copyright (C) 2008-2009  The Mana World Development Team
4
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 
 *  Copyright (C) 2011-2013  The ManaPlus Developers
 
5
 *  Copyright (C) 2011-2014  The ManaPlus Developers
6
6
 *
7
7
 *  This file is part of The ManaPlus Client.
8
8
 *
22
22
 
23
23
#include "resources/db/petdb.h"
24
24
 
 
25
#include "configuration.h"
25
26
#include "logger.h"
26
27
 
27
28
#include "resources/beingcommon.h"
28
29
#include "resources/beinginfo.h"
29
30
 
 
31
#include "utils/gettext.h"
30
32
#include "utils/dtor.h"
31
 
#include "configuration.h"
32
33
 
33
34
#include "debug.h"
34
35
 
74
75
 
75
76
        BeingInfo *const currentInfo = new BeingInfo;
76
77
 
 
78
        currentInfo->setName(XML::langProperty(petNode,
 
79
            // TRANSLATORS: unknown info name
 
80
            "name", _("pet")));
 
81
 
77
82
        currentInfo->setTargetSelection(XML::getBoolProperty(petNode,
78
 
            "targetSelection", false));
 
83
            "targetSelection", true));
79
84
 
80
85
        BeingCommon::readBasicAttributes(currentInfo, petNode, "talk");
81
86
 
82
87
        currentInfo->setDeadSortOffsetY(XML::getProperty(petNode,
83
88
            "deadSortOffsetY", 31));
84
89
 
 
90
        currentInfo->setStartFollowDist(XML::getProperty(petNode,
 
91
            "startFollowDistance", 3));
 
92
        currentInfo->setFollowDist(XML::getProperty(petNode,
 
93
            "followDistance", 0));
 
94
        currentInfo->setWarpDist(XML::getProperty(petNode,
 
95
            "warpDistance", 11));
 
96
 
 
97
        currentInfo->setWalkSpeed(XML::getProperty(petNode,
 
98
            "walkSpeed", 0));
 
99
 
 
100
        currentInfo->setTargetOffsetX(XML::getProperty(petNode,
 
101
            "offsetX", 0));
 
102
        currentInfo->setTargetOffsetY(XML::getProperty(petNode,
 
103
            "offsetY", 1));
 
104
        currentInfo->setSitOffsetX(XML::getProperty(petNode,
 
105
            "sitOffsetX", 0));
 
106
        currentInfo->setSitOffsetY(XML::getProperty(petNode,
 
107
            "sitOffsetY", 1));
 
108
        currentInfo->setMoveOffsetX(XML::getProperty(petNode,
 
109
            "moveOffsetX", 0));
 
110
        currentInfo->setMoveOffsetY(XML::getProperty(petNode,
 
111
            "moveOffsetY", 1));
 
112
        currentInfo->setDeadOffsetX(XML::getProperty(petNode,
 
113
            "deadOffsetX", 0));
 
114
        currentInfo->setDeadOffsetY(XML::getProperty(petNode,
 
115
            "deadOffsetY", 1));
 
116
 
 
117
        currentInfo->setThinkTime(XML::getProperty(petNode,
 
118
            "thinkTime", 500) / 10);
 
119
 
 
120
        currentInfo->setDirectionType(XML::getProperty(petNode,
 
121
            "directionType", 1));
 
122
        currentInfo->setSitDirectionType(XML::getProperty(petNode,
 
123
            "sitDirectionType", 1));
 
124
        currentInfo->setDeadDirectionType(XML::getProperty(petNode,
 
125
            "deadDirectionType", 1));
 
126
 
85
127
        SpriteDisplay display;
86
128
        for_each_xml_child_node(spriteNode, petNode)
87
129
        {