diff options
author | 2012-01-02 04:59:11 +0000 | |
---|---|---|
committer | 2012-01-02 04:59:11 +0000 | |
commit | 80cd316a2ad134c67ca028a606266bb733a025b6 (patch) | |
tree | e198baaf50207b99fd46fb4696cdcda17e94ab65 /src/lib/util/bitmap.h | |
parent | 1ded844ee73ec0768de1b7ccba5491c92fd4ad5a (diff) |
Bulk conversion of bitmap_t * to bitmap_t & . With this change the
parameters for the global SCREEN_UPDATE callback match the parameters
for the driver_device version. Added allocate() and deallocate()
methods to bitmap_t to permit cleaner handling of bitmaps in drivers
and modern devices. [Aaron Giles]
Diffstat (limited to 'src/lib/util/bitmap.h')
-rw-r--r-- | src/lib/util/bitmap.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h index e1e4abe5398..969e34f8e40 100644 --- a/src/lib/util/bitmap.h +++ b/src/lib/util/bitmap.h @@ -137,10 +137,13 @@ public: INT32 rowbytes() const { return m_rowpixels * m_bpp / 8; } UINT8 bpp() const { return m_bpp; } bitmap_format format() const { return m_format; } + bool valid() const { return (m_format != BITMAP_FORMAT_INVALID); } palette_t *palette() const { return m_palette; } const rectangle &cliprect() const { return m_cliprect; } - // helpers + // operations + void allocate(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0); + void deallocate(); void clone_existing(const bitmap_t &srcbitmap); void set_palette(palette_t *palette); void fill(rgb_t color) { fill(color, m_cliprect); } |