diff options
author | Nicola Mettifogo | 2007-04-07 10:02:59 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-04-07 10:02:59 +0000 |
commit | 59b15386853af4e2e3dbe4ec21518874b6b45625 (patch) | |
tree | d20c349eef264ab64d370ce0167e698a7e502c14 /engines/parallaction/graphics.h | |
parent | 93673711073bbf6947e83ca3ec9cd262036aa64a (diff) | |
download | scummvm-rg350-59b15386853af4e2e3dbe4ec21518874b6b45625.tar.gz scummvm-rg350-59b15386853af4e2e3dbe4ec21518874b6b45625.tar.bz2 scummvm-rg350-59b15386853af4e2e3dbe4ec21518874b6b45625.zip |
Reduced dependency between project files, and prepared defs.h for deletion as soon as List<>'s usage is implemented.
svn-id: r26400
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r-- | engines/parallaction/graphics.h | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index 400f08d43f..ddee2f22df 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -23,10 +23,13 @@ #ifndef PARALLACTION_GRAPHICS_H #define PARALLACTION_GRAPHICS_H -#include "parallaction/defs.h" +#include "common/rect.h" #include "common/stream.h" +#include "parallaction/defs.h" + + namespace Parallaction { @@ -65,6 +68,48 @@ struct PaletteFxRange { #include "common/pack-end.h" // END STRUCT PACKING +struct StaticCnv { + uint16 _width; // + uint16 _height; // + byte* _data0; // bitmap + byte* _data1; // unused + + StaticCnv() { + _width = _height = 0; + _data0 = _data1 = NULL; + } +}; + +struct Cnv { + uint16 _count; // # of frames + uint16 _width; // + uint16 _height; // + byte** field_8; // unused + byte* _data; + +public: + Cnv() { + _width = _height = _count = 0; + _data = NULL; + } + + Cnv(uint16 numFrames, uint16 width, uint16 height, byte* data) : _count(numFrames), _width(width), _height(height), _data(data) { + + } + + ~Cnv() { + if (_count == 0 || _data == NULL) return; + free(_data); + } + + byte* getFramePtr(uint16 index) { + if (index >= _count) + return NULL; + return &_data[index * _width * _height]; + } +}; + + #define NUM_BUFFERS 6 class Parallaction; |