1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef PETKA_HEROES_H
24 #define PETKA_HEROES_H
25 
26 #include "common/ptr.h"
27 #include "petka/objects/object.h"
28 #include "petka/walk.h"
29 
30 namespace Petka {
31 
32 class QObjectPetka : public QObject {
33 public:
34 	QObjectPetka();
35 	void processMessage(const QMessage &msg) override;
36 	void initSurface();
37 
38 	void walk(int x, int y);
39 	void stopWalk();
40 	void updateWalk();
41 	void setReactionAfterWalk(uint index, QReaction *reaction, QMessageObject *sender, bool deleteReaction);
42 
43 	void draw() override;
44 	bool isInPoint(Common::Point p) override;
45 	void update(int time) override;
46 	void setPos(Common::Point p, bool ) override;
47 
48 	double calcPerspective(int y);
49 
50 	void updateZ() override;
51 
52 	void sub_408940();
53 
54 private:
55 	virtual void recalcOffset();
56 
57 public:
58 	int _field7C;
59 	int _surfW;
60 	int _surfH;
61 	int _x_;
62 	int _y_;
63 	// int _surfId;
64 	int _imageId;
65 	double _k;
66 	Common::ScopedPtr<Walk> _walk;
67 	int _destX;
68 	int _destY;
69 	bool _isWalking;
70 	QReaction *_heroReaction;
71 	QMessageObject *_sender;
72 	int _fieldB4;
73 };
74 
75 class QObjectChapayev : public QObjectPetka {
76 public:
77 	QObjectChapayev();
78 
recalcOffset()79 	void recalcOffset() override {}
80 
81 };
82 
83 } // End of namespace Petka
84 
85 #endif
86