ScummVM API documentation
Grim::BitmapData Class Reference

#include <bitmap.h>

Classes

struct  Layer
 
struct  Vert
 

Public Member Functions

 BitmapData (const Common::String &fname)
 
 BitmapData (const Graphics::Surface &buf, int w, int h, const char *fname)
 
void freeData ()
 
void load ()
 
bool loadTile (Common::SeekableReadStream *data)
 
bool loadGrimBm (Common::SeekableReadStream *data)
 
bool loadTGA (Common::SeekableReadStream *data)
 
const Graphics::SurfacegetImageData (int num) const
 
void convertToColorFormat (const Graphics::PixelFormat &format)
 
void convertToColorFormat (int num, const Graphics::PixelFormat &format)
 

Static Public Member Functions

static BitmapDatagetBitmapData (const Common::String &fname)
 

Public Attributes

Common::String _fname
 
int _numImages
 
int _width
 
int _height
 
int _x
 
int _y
 
int _format
 
int _numTex
 
int _bpp
 
void * _texIds
 
bool _hasTransparency
 
bool _loaded
 
bool _keepData
 
int _refCount
 
float * _texc
 
Vert_verts
 
Layer_layers
 
uint32 _numCoords
 
uint32 _numVerts
 
uint32 _numLayers
 
Graphics::Surface_data
 
void * _userData
 

Static Public Attributes

static Common::HashMap< Common::String, BitmapData * > * _bitmaps
 

Detailed Description

This BitmapData class keeps the actual bitmap data and can be shared between Bitmap instances, by using getBitmapData. Bitmap still keeps the data that can change between the instances i.e. _x, _y and _currImage. They are automatically deleted if they are not used by any bitmap anymore.

Member Function Documentation

◆ loadTile()

bool Grim::BitmapData::loadTile ( Common::SeekableReadStream data)

Loads an EMI TILE-bitmap.

Parameters
datathe data for the TILE.
lenthe length of the data.

◆ convertToColorFormat() [1/2]

void Grim::BitmapData::convertToColorFormat ( const Graphics::PixelFormat format)

Convert a bitmap to another color-format.

Parameters
formatthe format to convert to.

◆ convertToColorFormat() [2/2]

void Grim::BitmapData::convertToColorFormat ( int  num,
const Graphics::PixelFormat format 
)

Convert a bitmap to another color-format.

Parameters
formatthe format to convert to.

The documentation for this class was generated from the following file: