diff options
author | johndoe123 | 2011-07-04 17:58:38 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:30:58 +0200 |
commit | 21eb88053caa4cc7167f81dba9afc7f0ef89996d (patch) | |
tree | bbc1f3e645a55c3dda70bfdbbe3ab075e4e0f13b /engines/neverhood/smackerplayer.h | |
parent | bd1749863e45cde53707d0ae38b28825bc0dba2e (diff) | |
download | scummvm-rg350-21eb88053caa4cc7167f81dba9afc7f0ef89996d.tar.gz scummvm-rg350-21eb88053caa4cc7167f81dba9afc7f0ef89996d.tar.bz2 scummvm-rg350-21eb88053caa4cc7167f81dba9afc7f0ef89996d.zip |
NEVERHOOD: Implement SmackerScene, SmackerPlayer and related stuff
- The intro video after the logo screens is now played (still needs better sync)
Diffstat (limited to 'engines/neverhood/smackerplayer.h')
-rw-r--r-- | engines/neverhood/smackerplayer.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/engines/neverhood/smackerplayer.h b/engines/neverhood/smackerplayer.h new file mode 100644 index 0000000000..d923bbdf6b --- /dev/null +++ b/engines/neverhood/smackerplayer.h @@ -0,0 +1,75 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef NEVERHOOD_SMACKERPLAYER_H +#define NEVERHOOD_SMACKERPLAYER_H + +#include "video/smk_decoder.h" +#include "neverhood/neverhood.h" +#include "neverhood/entity.h" + +namespace Neverhood { + +class Scene; +class Palette; + +class SmackerSurface : public BaseSurface { +public: + SmackerSurface(NeverhoodEngine *vm); + virtual void draw(); + void setSmackerFrame(const Graphics::Surface *smackerFrame); +protected: + const Graphics::Surface *_smackerFrame; +}; + +class SmackerDoubleSurface : public SmackerSurface { +public: + SmackerDoubleSurface(NeverhoodEngine *vm); + virtual void draw(); +}; + +class SmackerPlayer : public Entity { +public: + SmackerPlayer(NeverhoodEngine *vm, Scene *scene, uint32 fileHash, bool doubleSurface, bool flag); + ~SmackerPlayer(); + BaseSurface *getSurface() { return _smackerSurface; } + void open(uint32 fileHash, bool flag1); + void close(); + void gotoFrame(uint frameNumber); + uint getStatus(); +protected: + Scene *_scene; + Palette *_palette; + Video::SmackerDecoder *_smackerDecoder; + SmackerSurface *_smackerSurface; + bool _doubleSurface; + Common::SeekableReadStream *_stream; + bool _flag1; + bool _flag2; + bool _dirtyFlag; + void update(); + void updatePalette(); +}; + +} // End of namespace Neverhood + +#endif /* NEVERHOOD_SMACKERPLAYER_H */ |