ScummVM API documentation
xmaterial.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/*
23 * This file is based on WME.
24 * http://dead-code.org/redir.php?target=wme
25 * Copyright (c) 2003-2013 Jan Nedoma and contributors
26 */
27
28#ifndef WINTERMUTE_XMATERIAL_H
29#define WINTERMUTE_XMATERIAL_H
30
31#include "engines/wintermute/base/base_named_object.h"
32#include "engines/wintermute/base/gfx/xskinmesh.h"
33
34namespace Wintermute {
35
36class Effect3D;
37class Effect3DParams;
38class BaseSprite;
39class BaseSurface;
40class VideoTheoraPlayer;
41class XFileData;
42
43class Material : public BaseNamedObject {
44public:
45 Material(BaseGame *inGame);
46 virtual ~Material();
47
48 DXMaterial _material;
49
50 bool setTexture(const char *filename, bool adoptName = false);
51 bool setSprite(BaseSprite *sprite, bool adoptName = false);
52 bool setTheora(VideoTheoraPlayer *theora, bool adoptName = false);
53 BaseSurface *getSurface();
54 bool setEffect(Effect3D *effect, Effect3DParams *params, bool adoptName = false);
55
56 Effect3D *getEffect() { return _effect; }
57 Effect3DParams *getEffectParams() { return _params; }
58
59 bool invalidateDeviceObjects();
60 bool restoreDeviceObjects();
61
62private:
63 char *_textureFilename;
64 BaseSurface *_surface;
65 bool _ownedSurface;
66 BaseSprite *_sprite;
67 VideoTheoraPlayer *_theora;
68 Effect3D *_effect;
69 Effect3DParams *_params;
70};
71
72} // namespace Wintermute
73
74#endif
Definition: base_game.h:79
Definition: base_named_object.h:36
Definition: base_sprite.h:40
Definition: base_surface.h:37
Definition: 3deffect.h:36
Definition: 3deffect_params.h:36
Definition: xmaterial.h:43
Definition: video_theora_player.h:41
Definition: xskinmesh.h:86