]> git.jsancho.org Git - lugaru.git/blob - Source/Objects/PersonType.cpp
Added hasClaws property for PersonType
[lugaru.git] / Source / Objects / PersonType.cpp
1 /*
2 Copyright (C) 2016-2017 - Lugaru contributors (see AUTHORS file)
3
4 This file is part of Lugaru.
5
6 Lugaru is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 Lugaru is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "Objects/PersonType.hpp"
21
22 std::vector<PersonType> PersonType::types;
23
24 PersonType::PersonType()
25 {
26     animTalkIdle = tempanim;
27 }
28
29 bool PersonType::hasAnimTalkIdle()
30 {
31     return (animTalkIdle != tempanim);
32 }
33
34 void PersonType::Load()
35 {
36     types.resize(2);
37
38     /* Wolf */
39     types[wolftype].proportions[0] = 1.1;
40     types[wolftype].proportions[1] = 1.1;
41     types[wolftype].proportions[2] = 1.1;
42     types[wolftype].proportions[3] = 1.1;
43
44     types[wolftype].animRun = wolfrunanim;
45     types[wolftype].animRunning = wolfrunninganim;
46     types[wolftype].animCrouch = wolfcrouchanim;
47     types[wolftype].animStop = wolfstopanim;
48     types[wolftype].animLanding = wolflandanim;
49     types[wolftype].animLandingHard = wolflandhardanim;
50     types[wolftype].animFightIdle = wolfidle;
51     types[wolftype].animBounceIdle = wolfidle;
52
53     types[wolftype].soundsAttack[0] = barksound;
54     types[wolftype].soundsAttack[1] = bark2sound;
55     types[wolftype].soundsAttack[2] = bark3sound;
56     types[wolftype].soundsAttack[3] = barkgrowlsound;
57     types[wolftype].soundsTalk[0] = growlsound;
58     types[wolftype].soundsTalk[1] = growl2sound;
59
60     types[wolftype].figureFileName = "Skeleton/BasicFigureWolf";
61     types[wolftype].lowFigureFileName = "Skeleton/BasicFigureWolfLow";
62     types[wolftype].clothesFileName = "Skeleton/RabbitBelt";
63     types[wolftype].modelFileNames[0] = "Models/Wolf.solid";
64     types[wolftype].modelFileNames[1] = "Models/Wolf2.solid";
65     types[wolftype].modelFileNames[2] = "Models/Wolf3.solid";
66     types[wolftype].modelFileNames[3] = "Models/Wolf4.solid";
67     types[wolftype].modelFileNames[4] = "Models/Wolf5.solid";
68     types[wolftype].modelFileNames[5] = "Models/Wolf6.solid";
69     types[wolftype].modelFileNames[6] = "Models/Wolf7.solid";
70     types[wolftype].lowModelFileName = "Models/WolfLow.solid";
71     types[wolftype].modelClothesFileName = "Models/Belt.solid";
72
73     types[wolftype].skins.resize(3);
74     types[wolftype].skins[0] = "Textures/FurWolfGrey.jpg";
75     types[wolftype].skins[1] = "Textures/FurWolfDark.jpg";
76     types[wolftype].skins[2] = "Textures/FurWolfSnow.jpg";
77
78     types[wolftype].power = 2.5;
79     types[wolftype].defaultDamageTolerance = 300;
80     types[wolftype].defaultScale = .23;
81     types[wolftype].hasClaws = true;
82
83     /* Rabbit */
84     types[rabbittype].proportions[0] = 1.2;
85     types[rabbittype].proportions[1] = 1.05;
86     types[rabbittype].proportions[2] = 1;
87     types[rabbittype].proportions[3] = 1.1;
88     types[rabbittype].proportions[3].y = 1.05;
89
90     types[rabbittype].animRun = runanim;
91     types[rabbittype].animRunning = rabbitrunninganim;
92     types[rabbittype].animCrouch = crouchanim;
93     types[rabbittype].animStop = stopanim;
94     types[rabbittype].animLanding = landanim;
95     types[rabbittype].animLandingHard = landhardanim;
96     types[rabbittype].animFightIdle = fightidleanim;
97     types[rabbittype].animBounceIdle = bounceidleanim;
98     types[rabbittype].animTalkIdle = talkidleanim;
99
100     types[rabbittype].soundsAttack[0] = rabbitattacksound;
101     types[rabbittype].soundsAttack[1] = rabbitattack2sound;
102     types[rabbittype].soundsAttack[2] = rabbitattack3sound;
103     types[rabbittype].soundsAttack[3] = rabbitattack4sound;
104     types[rabbittype].soundsTalk[0] = rabbitchitter;
105     types[rabbittype].soundsTalk[1] = rabbitchitter2;
106
107     types[rabbittype].figureFileName = "Skeleton/BasicFigure";
108     types[rabbittype].lowFigureFileName = "Skeleton/BasicFigureLow";
109     types[rabbittype].clothesFileName = "Skeleton/RabbitBelt";
110     types[rabbittype].modelFileNames[0] = "Models/Body.solid";
111     types[rabbittype].modelFileNames[1] = "Models/Body2.solid";
112     types[rabbittype].modelFileNames[2] = "Models/Body3.solid";
113     types[rabbittype].modelFileNames[3] = "Models/Body4.solid";
114     types[rabbittype].modelFileNames[4] = "Models/Body5.solid";
115     types[rabbittype].modelFileNames[5] = "Models/Body6.solid";
116     types[rabbittype].modelFileNames[6] = "Models/Body7.solid";
117     types[rabbittype].lowModelFileName = "Models/BodyLow.solid";
118     types[rabbittype].modelClothesFileName = "Models/Belt.solid";
119
120     types[rabbittype].skins.resize(10);
121     types[rabbittype].skins[0] = "Textures/FurBrown.jpg";
122     types[rabbittype].skins[1] = "Textures/FurWhite.jpg";
123     types[rabbittype].skins[2] = "Textures/FurBlack.jpg";
124     types[rabbittype].skins[3] = "Textures/FurLynx.jpg";
125     types[rabbittype].skins[4] = "Textures/FurOtter.jpg";
126     types[rabbittype].skins[5] = "Textures/FurOpal.jpg";
127     types[rabbittype].skins[6] = "Textures/FurSable.jpg";
128     types[rabbittype].skins[7] = "Textures/FurChocolate.jpg";
129     types[rabbittype].skins[8] = "Textures/FurBlackWhite.jpg";
130     types[rabbittype].skins[9] = "Textures/FurBrownWhite.jpg";
131
132     types[rabbittype].power = 1;
133     types[rabbittype].defaultDamageTolerance = 200;
134     types[rabbittype].defaultScale = .2;
135     types[rabbittype].hasClaws = false;
136 }