ScummVM API documentation
oscar.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 HOLLYWOOD_RUNAWAY_OSCAR_H
23#define HOLLYWOOD_RUNAWAY_OSCAR_H
24
25#include "common/scummsys.h"
26
27namespace Common {
28class RandomSource;
29}
30
31namespace Hollywood {
32class RunawayAudio;
33
34namespace Runaway {
35
37public:
38 explicit OscarAnimation(bool closeup, byte chapter = 4) : _closeup(closeup), _chapter(chapter) {}
39 void resume(uint32 now) { _tick = now; }
40 void update(uint32 now, Common::RandomSource &random, RunawayAudio &audio);
41 uint frame(bool speaking, byte speechFrame) const;
42 void setTalking(bool talking) { _talking = talking; }
43 void startIdle();
44
45private:
46 const bool _closeup;
47 const byte _chapter;
48 bool _talking = false;
49 uint16 _step = 130;
50 byte _idle = 3;
51 uint32 _tick = 0;
52};
53
54} // End of namespace Runaway
55} // End of namespace Hollywood
56
57#endif // HOLLYWOOD_RUNAWAY_OSCAR_H
Definition: random.h:44
Definition: audio.h:29
Definition: algorithm.h:29