]> git.jsancho.org Git - lugaru.git/blob - Source/Objects/PersonType.cpp
Moved PersonType class to its own file
[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/Wolf.jpg";
75     types[wolftype].skins[1] = "Textures/DarkWolf.jpg";
76     types[wolftype].skins[2] = "Textures/SnowWolf.jpg";
77
78     /* Rabbit */
79     types[rabbittype].proportions[0] = 1.2;
80     types[rabbittype].proportions[1] = 1.05;
81     types[rabbittype].proportions[2] = 1;
82     types[rabbittype].proportions[3] = 1.1;
83     types[rabbittype].proportions[3].y = 1.05;
84
85     types[rabbittype].animRun = runanim;
86     types[rabbittype].animRunning = rabbitrunninganim;
87     types[rabbittype].animCrouch = crouchanim;
88     types[rabbittype].animStop = stopanim;
89     types[rabbittype].animLanding = landanim;
90     types[rabbittype].animLandingHard = landhardanim;
91     types[rabbittype].animFightIdle = fightidleanim;
92     types[rabbittype].animBounceIdle = bounceidleanim;
93
94     types[rabbittype].soundsAttack[0] = rabbitattacksound;
95     types[rabbittype].soundsAttack[1] = rabbitattack2sound;
96     types[rabbittype].soundsAttack[2] = rabbitattack3sound;
97     types[rabbittype].soundsAttack[3] = rabbitattack4sound;
98     types[rabbittype].soundsTalk[0] = rabbitchitter;
99     types[rabbittype].soundsTalk[1] = rabbitchitter2;
100
101     types[rabbittype].figureFileName = "Skeleton/BasicFigure";
102     types[rabbittype].lowFigureFileName = "Skeleton/BasicFigureLow";
103     types[rabbittype].clothesFileName = "Skeleton/RabbitBelt";
104     types[rabbittype].modelFileNames[0] = "Models/Body.solid";
105     types[rabbittype].modelFileNames[1] = "Models/Body2.solid";
106     types[rabbittype].modelFileNames[2] = "Models/Body3.solid";
107     types[rabbittype].modelFileNames[3] = "Models/Body4.solid";
108     types[rabbittype].modelFileNames[4] = "Models/Body5.solid";
109     types[rabbittype].modelFileNames[5] = "Models/Body6.solid";
110     types[rabbittype].modelFileNames[6] = "Models/Body7.solid";
111     types[rabbittype].lowModelFileName = "Models/BodyLow.solid";
112     types[rabbittype].modelClothesFileName = "Models/Belt.solid";
113
114     types[rabbittype].skins.resize(10);
115     types[rabbittype].skins[0] = "Textures/Fur3.jpg";
116     types[rabbittype].skins[1] = "Textures/Fur.jpg";
117     types[rabbittype].skins[2] = "Textures/Fur2.jpg";
118     types[rabbittype].skins[3] = "Textures/Lynx.jpg";
119     types[rabbittype].skins[4] = "Textures/Otter.jpg";
120     types[rabbittype].skins[5] = "Textures/Opal.jpg";
121     types[rabbittype].skins[6] = "Textures/Sable.jpg";
122     types[rabbittype].skins[7] = "Textures/Chocolate.jpg";
123     types[rabbittype].skins[8] = "Textures/BW2.jpg";
124     types[rabbittype].skins[9] = "Textures/WB2.jpg";
125 }