aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/surface.h
diff options
context:
space:
mode:
authorSven Hesse2011-02-02 16:49:49 +0000
committerSven Hesse2011-02-02 16:49:49 +0000
commitb9b7b449b90f4bdb1a3ef5bd3166cb74574c6682 (patch)
treeaed854e3f6dbee4a04d9a87ec431cdd4398b78b4 /engines/gob/surface.h
parent812680d187e1e0802a383d374e8370d04477ffe9 (diff)
downloadscummvm-rg350-b9b7b449b90f4bdb1a3ef5bd3166cb74574c6682.tar.gz
scummvm-rg350-b9b7b449b90f4bdb1a3ef5bd3166cb74574c6682.tar.bz2
scummvm-rg350-b9b7b449b90f4bdb1a3ef5bd3166cb74574c6682.zip
GOB: Stub o7_loadImage further
svn-id: r55730
Diffstat (limited to 'engines/gob/surface.h')
-rw-r--r--engines/gob/surface.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/gob/surface.h b/engines/gob/surface.h
index a8d52c7b36..c5a364eb7f 100644
--- a/engines/gob/surface.h
+++ b/engines/gob/surface.h
@@ -30,8 +30,21 @@
#include "common/ptr.h"
#include "common/rational.h"
+namespace Common {
+ class SeekableReadStream;
+}
+
namespace Gob {
+enum ImageType {
+ kImageTypeNone = -1,
+ kImageTypeTGA = 0,
+ kImageTypeLBM,
+ kImageTypeBRC,
+ kImageTypeBMP,
+ kImageTypeJPEG
+};
+
/** An iterator over a surface's image data, automatically handles different color depths. */
class Pixel {
public:
@@ -123,6 +136,11 @@ public:
void blitToScreen(uint16 left, uint16 top, uint16 right, uint16 bottom, uint16 x, uint16 y) const;
+ bool loadImage(Common::SeekableReadStream &stream);
+ bool loadImage(Common::SeekableReadStream &stream, ImageType type);
+
+ static ImageType identifyImage(Common::SeekableReadStream &stream);
+
private:
uint16 _width;
uint16 _height;
@@ -133,6 +151,12 @@ private:
static bool clipBlitRect(int16 &left, int16 &top, int16 &right, int16 &bottom, int16 &x, int16 &y,
uint16 dWidth, uint16 dHeight, uint16 sWidth, uint16 sHeight);
+
+ bool loadTGA (Common::SeekableReadStream &stream);
+ bool loadLBM (Common::SeekableReadStream &stream);
+ bool loadBRC (Common::SeekableReadStream &stream);
+ bool loadBMP (Common::SeekableReadStream &stream);
+ bool loadJPEG(Common::SeekableReadStream &stream);
};
typedef Common::SharedPtr<Surface> SurfacePtr;