ScummVM API documentation
wme_vlink.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 WINTERMUTE_VLINK_H
23#define WINTERMUTE_VLINK_H
24
25#include "common/str.h"
26#include "common/mutex.h"
27#include "video/video_decoder.h"
28#include "graphics/surface.h"
29
30#include "engines/wintermute/base/base_scriptable.h"
31#include "engines/wintermute/base/gfx/base_surface.h"
32
33namespace Wintermute {
34
35class SXVlink : public BaseScriptable {
36public:
37 DECLARE_PERSISTENT(SXVlink, BaseScriptable)
38 ScValue *scGetProperty(const char *name) override;
39 bool scSetProperty(const char *name, ScValue *value) override;
40 bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
41 const char *scToString() override;
42 SXVlink(BaseGame *inGame, ScStack *stack);
43 ~SXVlink() override;
44
45private:
46 Common::Mutex _frameMutex;
47 Video::VideoDecoder *_videoDecoder{};
48 Graphics::Surface _surface;
49 int32 _volume;
50 bool _videoFinished{};
51 bool _updateNeeded{};
52 int32 _frame{};
53
54 static void timerCallback(void *instance);
55 void prepareFrame();
56};
57
58} // End of namespace Wintermute
59
60#endif
Definition: mutex.h:67
Definition: video_decoder.h:53
Definition: base_game.h:79
Definition: base_scriptable.h:41
Definition: script.h:44
Definition: script_stack.h:41
Definition: script_value.h:42
Definition: surface.h:67