2017-06-03 22:58:42 +02:00
|
|
|
#ifndef GRAPHICS_H
|
|
|
|
#define GRAPHICS_H
|
|
|
|
|
2017-06-05 16:27:06 +02:00
|
|
|
#include "common/scummsys.h"
|
2017-06-03 22:58:42 +02:00
|
|
|
#include "image/image_decoder.h"
|
|
|
|
|
2017-06-05 16:27:06 +02:00
|
|
|
namespace Common {
|
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Graphics {
|
2017-06-07 14:17:16 +02:00
|
|
|
struct Surface;
|
2017-06-05 16:27:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Supernova {
|
|
|
|
|
|
|
|
class MSNImageDecoder : public Image::ImageDecoder {
|
2017-06-03 22:58:42 +02:00
|
|
|
public:
|
|
|
|
MSNImageDecoder();
|
|
|
|
virtual ~MSNImageDecoder();
|
|
|
|
|
|
|
|
virtual void destroy();
|
|
|
|
virtual bool loadStream(Common::SeekableReadStream &stream);
|
|
|
|
virtual const Graphics::Surface *getSurface() const { return _surface; }
|
|
|
|
virtual const byte *getPalette() const { return _palette; }
|
2017-06-05 16:27:06 +02:00
|
|
|
|
|
|
|
bool loadSection(int _section);
|
2017-06-03 22:58:42 +02:00
|
|
|
|
2017-06-05 16:27:06 +02:00
|
|
|
static const int kMaxSections = 50;
|
|
|
|
static const int kMaxClickFields = 80;
|
|
|
|
|
|
|
|
Graphics::Surface *_surface;
|
2017-06-03 22:58:42 +02:00
|
|
|
byte *_palette;
|
2017-06-05 16:27:06 +02:00
|
|
|
byte *_encodedImage;
|
|
|
|
|
|
|
|
struct Section {
|
|
|
|
int16 x1;
|
|
|
|
int16 x2;
|
|
|
|
byte y1;
|
|
|
|
byte y2;
|
|
|
|
byte next;
|
|
|
|
uint16 addressLow;
|
|
|
|
byte addressHigh;
|
|
|
|
} _section[kMaxSections];
|
|
|
|
|
|
|
|
struct ClickField {
|
|
|
|
int16 x1;
|
|
|
|
int16 x2;
|
|
|
|
byte y1;
|
|
|
|
byte y2;
|
|
|
|
byte next;
|
|
|
|
} _clickField[kMaxClickFields];
|
2017-06-03 22:58:42 +02:00
|
|
|
};
|
|
|
|
|
2017-06-05 16:27:06 +02:00
|
|
|
}
|
2017-06-03 22:58:42 +02:00
|
|
|
#endif
|