1 /*
2  *  This file is part of Dune Legacy.
3  *
4  *  Dune Legacy is free software: you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation, either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  Dune Legacy is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with Dune Legacy.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <structures/WOR.h>
19 
20 #include <globals.h>
21 
22 #include <FileClasses/GFXManager.h>
23 #include <House.h>
24 
WOR(House * newOwner)25 WOR::WOR(House* newOwner) : BuilderBase(newOwner) {
26     WOR::init();
27 
28     setHealth(getMaxHealth());
29 }
30 
WOR(InputStream & stream)31 WOR::WOR(InputStream& stream) : BuilderBase(stream) {
32     WOR::init();
33 }
34 
init()35 void WOR::init() {
36     itemID = Structure_WOR;
37     owner->incrementStructures(itemID);
38 
39     structureSize.x = 2;
40     structureSize.y = 2;
41 
42     graphicID = ObjPic_WOR;
43     graphic = pGFXManager->getObjPic(graphicID,getOwner()->getHouseID());
44     numImagesX = 4;
45     numImagesY = 1;
46     firstAnimFrame = 2;
47     lastAnimFrame = 3;
48 }
49 
~WOR()50 WOR::~WOR() {
51 }
52