diff options
author | Eugene Sandulenko | 2004-11-14 20:11:22 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-11-14 20:11:22 +0000 |
commit | ddda67753e012a2946403933f57115b37e796bf8 (patch) | |
tree | bab4ebf24cb0e9cb03082658e5986e32a5fc0d79 /kyra/wsamovie.h | |
parent | 0cfd573951c2cdd886cea650c43f0c4406e7fa94 (diff) | |
download | scummvm-rg350-ddda67753e012a2946403933f57115b37e796bf8.tar.gz scummvm-rg350-ddda67753e012a2946403933f57115b37e796bf8.tar.bz2 scummvm-rg350-ddda67753e012a2946403933f57115b37e796bf8.zip |
Patch #1066256. Mostly indentation fixes and some debug messages removed.
svn-id: r15811
Diffstat (limited to 'kyra/wsamovie.h')
-rw-r--r-- | kyra/wsamovie.h | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/kyra/wsamovie.h b/kyra/wsamovie.h index 62b7b8489d..7d9da17e76 100644 --- a/kyra/wsamovie.h +++ b/kyra/wsamovie.h @@ -26,109 +26,109 @@ namespace Kyra { - // a generic movie - class Movie { +// a generic movie +class Movie { - public: +public: - virtual ~Movie() { _transparency = -1; _ownPalette = 0; _frameCount = 0; } + virtual ~Movie() { _transparency = -1; _ownPalette = 0; _frameCount = 0; } - virtual void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame) = 0; - virtual const uint8* loadFrame(uint16 frame, uint16* width = 0, uint16* height = 0) = 0; - virtual uint16 countFrames(void) { return _frameCount; } + virtual void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame) = 0; + virtual const uint8* loadFrame(uint16 frame, uint16* width = 0, uint16* height = 0) = 0; + virtual uint16 countFrames(void) { return _frameCount; } - // could be deleted(not imdiantly maybe it's needed sometime) - virtual void transparency(int16 color) { _transparency = color; } - virtual void position(uint16 x, uint16 y) = 0; + // could be deleted(not imdiantly maybe it's needed sometime) + virtual void transparency(int16 color) { _transparency = color; } + virtual void position(uint16 x, uint16 y) = 0; - virtual bool hasPalette(void) { return (_ownPalette != 0); } - virtual Palette* palette(void) { return _ownPalette; } - - virtual bool looping(void) { return false; } - virtual uint32 frameChange(void) { return 100; } - virtual void setImageBackground(uint8* plane, uint16 planepitch, uint16 height) {}; + virtual bool hasPalette(void) { return (_ownPalette != 0); } + virtual Palette* palette(void) { return _ownPalette; } - protected: - int16 _transparency; - uint16 _frameCount; - Palette* _ownPalette; - }; + virtual bool looping(void) { return false; } + virtual uint32 frameChange(void) { return 100; } + virtual void setImageBackground(uint8* plane, uint16 planepitch, uint16 height) {}; - // movie format for Kyrandia 1 - class WSAMovieV1 : public Movie { +protected: + int16 _transparency; + uint16 _frameCount; + Palette* _ownPalette; +}; + +// movie format for Kyrandia 1 +class WSAMovieV1 : public Movie { - public: +public: - WSAMovieV1(uint8* data, uint32 size, uint8 gameid); - ~WSAMovieV1(); - - void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame); - const uint8* loadFrame(uint16 frame, uint16* width, uint16* height); - void setImageBackground(uint8* plane, uint16 planepitch, uint16 height); + WSAMovieV1(uint8* data, uint32 size, uint8 gameid); + ~WSAMovieV1(); - void position(uint16 x, uint16 y) { _wsaHeader._xPos = x; _wsaHeader._yPos = y; } - protected: + void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame); + const uint8* loadFrame(uint16 frame, uint16* width, uint16* height); + void setImageBackground(uint8* plane, uint16 planepitch, uint16 height); - uint8* _buffer; + void position(uint16 x, uint16 y) { _wsaHeader._xPos = x; _wsaHeader._yPos = y; } +protected: + + uint8* _buffer; #pragma START_PACK_STRUCTS - struct WSAHeader { - uint16 _numFrames; // All right - uint16 _width; // All right - uint16 _height; // All right - uint8 _xPos; // is wrong - uint8 _yPos; // is wrong - uint16 _delta; // should be right - uint16 _type; // should be right - } GCC_PACK _wsaHeader; + struct WSAHeader { + uint16 _numFrames; // All right + uint16 _width; // All right + uint16 _height; // All right + uint8 _xPos; // is wrong + uint8 _yPos; // is wrong + uint16 _delta; // is wrong + uint16 _type; // is wrong + } GCC_PACK _wsaHeader; #pragma END_PACK_STRUCTS - uint32* _offsetTable; - - uint8* _currentFrame; - uint16 _prefetchedFrame; - - uint8* _background; // only a pointer to the screen - uint16 _backWidth, _backHeight; - }; + uint32* _offsetTable; - // movie format for Kyrandia 2+ - class WSAMovieV2 : public Movie { + uint8* _currentFrame; + uint16 _prefetchedFrame; - public: - WSAMovieV2(uint8* data, uint32 size); - ~WSAMovieV2(); + uint8* _background; // only a pointer to the screen + uint16 _backWidth, _backHeight; +}; - void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame); - const uint8* loadFrame(uint16 frame, uint16* width, uint16* height); - void setImageBackground(uint8* plane, uint16 planepitch, uint16 height); - - void position(uint16 x, uint16 y) { _wsaHeader._xPos = x; _wsaHeader._yPos = y; } - bool looping(void) { return _looping; } - protected: +// movie format for Kyrandia 2+ +class WSAMovieV2 : public Movie { - uint8* _buffer; - - struct WSAHeader { - uint16 _numFrames; // All right - uint16 _width; // should be right - uint16 _height; // should be right - uint16 _xPos; // could be wrong - uint16 _yPos; // could be wrong - uint16 _delta; // could be wrong - uint16 _type; // should be right - } GCC_PACK _wsaHeader; - - uint32* _offsetTable; - - uint8* _currentFrame; - uint16 _prefetchedFrame; - - uint8* _background; // only a pointer to the screen - uint16 _backWidth, _backHeight; +public: + WSAMovieV2(uint8* data, uint32 size); + ~WSAMovieV2(); + + void renderFrame(uint8* plane, uint16 planepitch, uint16 planeheight, uint16 frame); + const uint8* loadFrame(uint16 frame, uint16* width, uint16* height); + void setImageBackground(uint8* plane, uint16 planepitch, uint16 height); + + void position(uint16 x, uint16 y) { _wsaHeader._xPos = x; _wsaHeader._yPos = y; } + bool looping(void) { return _looping; } +protected: + + uint8* _buffer; - bool _looping; - }; + struct WSAHeader { + uint16 _numFrames; // All right + uint16 _width; // should be right + uint16 _height; // should be right + uint16 _xPos; // could be wrong + uint16 _yPos; // could be wrong + uint16 _delta; // could be wrong + uint16 _type; // should be right + } GCC_PACK _wsaHeader; + + uint32* _offsetTable; + + uint8* _currentFrame; + uint16 _prefetchedFrame; + + uint8* _background; // only a pointer to the screen + uint16 _backWidth, _backHeight; + + bool _looping; +}; } // end of namespace Kyra #endif |