ScummVM API documentation
beetle.h
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 modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (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, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef LASTEXPRESS_BEETLE_H
23#define LASTEXPRESS_BEETLE_H
24
25#include "lastexpress/lastexpress.h"
26
27#include "lastexpress/helpers.h"
28
29#include "common/array.h"
30#include "common/rect.h"
31#include "common/system.h"
32
33namespace LastExpress {
34
35class LastExpressEngine;
36struct Seq;
37struct Sprite;
38
39class CBeetle {
40public:
42 ~CBeetle();
43
44 void tick();
45 void checkMouse();
46 void setDirection(int direction);
47 bool onTable();
48 bool click();
49
50private:
51 LastExpressEngine *_engine = nullptr;
52
53 Seq *_sequences[30];
54 Seq *_currentSequence = nullptr;
55 int _currentFrame = 0;
56 int _index = 0;
57 int _coordOffset = 0;
58 Common::Point _coords;
59 int _directions[16];
60 int _currentDirectionIndex = 0;
61 Sprite *_frame = nullptr;
62 bool _loaded = false;
63 int _mouseCooldown = 0;
64 int _fleeSpeed = 0;
65 int _spawnCounter = 0;
66};
67
68} // End of namespace LastExpress
69
70#endif // LASTEXPRESS_BEETLE_H
Definition: beetle.h:39
Definition: lastexpress.h:523
Definition: archive.h:29
Definition: rect.h:144
Definition: lastexpress.h:212
Definition: lastexpress.h:159