PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
player_calibration.h
1 /*
2  * Platformer Game Engine by Wohlstand, a free platform for game making
3  * Copyright (c) 2015 Vitaly Novichkov <admin@wohlnet.ru>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef PLAYER_CALIBRATION_H
20 #define PLAYER_CALIBRATION_H
21 
22 class QSettings;
23 #include <QString>
24 #include <QList>
25 
26 struct AniFrame
27 {
28  int x;
29  int y;
30 };
31 
33 {
34  QList<AniFrame > L;
35  QList<AniFrame > R;
36  QString name;
37 };
38 
39 struct FrameSets
40 {
41  QList<AniFrameSet > set;
42 };
43 
44 struct frameOpts
45 {
46  unsigned int H;
47  unsigned int W;
48  int offsetX;
49  int offsetY;
50  bool used;
51  bool isDuck;
52  bool isRightDir;
53  bool showGrabItem;
54 };
55 
57 {
58  int frameWidth;
59  int frameHeight;
60  int frameHeightDuck;
61  int frameGrabOffsetX;
62  int frameGrabOffsetY;
63  int frameOverTopGrab;
64  QList<QList<frameOpts > > framesX;
66  void init(int x, int y);
67  bool load(QString fileName);
68 private:
69  void getSpriteAniData(QSettings &set, QString name);
70 };
71 
72 #endif // PLAYER_CALIBRATION_H
73 
Definition: player_calibration.h:26
Definition: player_calibration.h:39
Definition: player_calibration.h:32
FrameSets AniFrames
Animation settings.
Definition: player_calibration.h:65
Definition: player_calibration.h:56
QList< QList< frameOpts > > framesX
Collision boxes settings.
Definition: player_calibration.h:64
Definition: player_calibration.h:44