diff options
author | Johannes Schickel | 2008-09-16 14:10:55 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-09-16 14:10:55 +0000 |
commit | 259d87a8a68d443d2bbb2bcc1887b4f11b7d342e (patch) | |
tree | 15389a0901e3439eda5b83975f0d98556fbd2b41 /graphics/surface.h | |
parent | 9d96d9d3806c43107ffcf4173bd99c3d10eeb565 (diff) | |
download | scummvm-rg350-259d87a8a68d443d2bbb2bcc1887b4f11b7d342e.tar.gz scummvm-rg350-259d87a8a68d443d2bbb2bcc1887b4f11b7d342e.tar.bz2 scummvm-rg350-259d87a8a68d443d2bbb2bcc1887b4f11b7d342e.zip |
Added "querySaveMetaInfos" to MetaEngine.
-> Allows easy addition of save state specific infos like playtime, save date atc.
-> Removed MetaEngine::loadThumbnailFromSlot, superseded by meta infos
-> Changed SCUMM / KYRA to implement the newly added functionallity
-> Removed hack in KYRAs listSavefiles, which is now handled via meta infos
svn-id: r34581
Diffstat (limited to 'graphics/surface.h')
-rw-r--r-- | graphics/surface.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/graphics/surface.h b/graphics/surface.h index ff1ddda695..747bda9a26 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -30,7 +30,6 @@ namespace Graphics { - /** * An arbitrary graphics surface, which can be the target (or source) of blit * operations, font rendering, etc. @@ -67,6 +66,12 @@ struct Surface { */ void free(); + /** + * Copies data from another Surface, this calls *free* on the current surface, to assure + * it being clean. + */ + void copyFrom(const Surface &surf); + void drawLine(int x0, int y0, int x1, int y1, uint32 color); void hLine(int x, int y, int x2, uint32 color); void vLine(int x, int y, int y2, uint32 color); @@ -76,6 +81,18 @@ struct Surface { void move(int dx, int dy, int height); }; +/** + * For safe deletion of surface with SharedPtr. + * The deleter assures Surface::free is called on + * deletion. + */ +struct SharedPtrSurfaceDeleter { + void operator()(Surface *ptr) { + ptr->free(); + delete ptr; + } +}; + } // End of namespace Graphics |