PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/engines/lure/animseq.h

http://github.com/scummvm/scummvm
C Header | 65 lines | 34 code | 10 blank | 21 comment | 0 complexity | 5979d016b49980b63499e36c5dcf3cae MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, GPL-2.0
  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
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (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, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  20. *
  21. */
  22. #ifndef LURE_ANIMSEQ_H
  23. #define LURE_ANIMSEQ_H
  24. #include "lure/screen.h"
  25. namespace Lure {
  26. enum AnimAbortType {ABORT_NONE, ABORT_END_INTRO, ABORT_NEXT_SCENE};
  27. struct AnimSoundSequence {
  28. uint16 numFrames;
  29. uint8 adlibSoundId;
  30. uint8 rolandSoundId;
  31. uint8 channelNum;
  32. };
  33. class AnimationSequence {
  34. private:
  35. bool _isEGA;
  36. uint16 _screenId;
  37. Palette &_palette;
  38. MemoryBlock *_decodedData;
  39. MemoryBlock *_lineRefs;
  40. byte *_pPixels, *_pLines;
  41. byte *_pPixelsEnd, *_pLinesEnd;
  42. const AnimSoundSequence *_soundList;
  43. int _frameDelay;
  44. AnimAbortType delay(uint32 milliseconds);
  45. void egaDecodeFrame(byte *&pPixels);
  46. void vgaDecodeFrame(byte *&pPixels, byte *&pLines);
  47. public:
  48. AnimationSequence(uint16 screenId, Palette &palette, bool fadeIn, int frameDelay = 7,
  49. const AnimSoundSequence *soundList = NULL);
  50. ~AnimationSequence();
  51. AnimAbortType show();
  52. bool step();
  53. };
  54. } // End of namespace Lure
  55. #endif