GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/resources/horseinfo.h Lines: 11 11 100.0 %
Date: 2017-11-29 Branches: 4 4 100.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2009  Aethyra Development Team
4
 *  Copyright (C) 2011-2017  The ManaPlus Developers
5
 *
6
 *  This file is part of The ManaPlus Client.
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
#ifndef RESOURCES_HORSEINFO_H
23
#define RESOURCES_HORSEINFO_H
24
25
#include "resources/sprite/spritereference.h"
26
27
#include "resources/horseoffset.h"
28
29
#include "localconsts.h"
30
31
6
struct HorseInfo final
32
{
33
2
    HorseInfo() :
34
        downSprites(),
35
        upSprites(),
36
26
        offsets()
37
    {
38
42
        for (int f = 0; f < 10; f ++)
39
        {
40
20
            offsets[f].upOffsetX = 0;
41
20
            offsets[f].upOffsetY = 0;
42
20
            offsets[f].downOffsetX = 0;
43
20
            offsets[f].downOffsetY = 0;
44
20
            offsets[f].riderOffsetX = 0;
45
20
            offsets[f].riderOffsetY = 0;
46
        }
47
2
    }
48
49
    A_DELETE_COPY(HorseInfo)
50
51
    STD_VECTOR<SpriteReference*> downSprites;
52
    STD_VECTOR<SpriteReference*> upSprites;
53
    HorseOffset offsets[10];  // by direction
54
};
55
56
#endif  // RESOURCES_HORSEINFO_H