ScummVM API documentation
Buffer Class Reference

#include <display_client.h>

Public Types

enum  HowToSize { kSizeByTextureSize, kSizeBySourceSize }
 

Public Member Functions

void setSize (uint32 width, uint32 height, HowToSize textureOrSource=kSizeByTextureSize)
 
void setBitsPerPixel (uint32 bits)
 
void setBytesPerPixel (uint32 bytes)
 
void setPixelFormat (PSPPixelFormat::Type type, bool swapRedBlue=false)
 
uint32 getWidth () const
 
uint32 getWidthInBytes () const
 
uint32 getHeight () const
 
uint32 getSourceWidth () const
 
uint32 getSourceWidthInBytes () const
 
uint32 getSourceHeight () const
 
uint32 getTextureWidth () const
 
uint32 getTextureHeight () const
 
PSPPixelFormat::Type getPixelFormat () const
 
uint32 getBitsPerPixel () const
 
uint32 getBytesPerPixel () const
 
const byte * getPixels () const
 
byte * getPixels ()
 
uint32 getSizeInBytes () const
 
bool hasPalette ()
 
void copyFromArray (const byte *buffer, int pitch)
 
void copyFromRect (const byte *buf, uint32 pitch, int destX, int destY, uint32 recWidth, uint32 recHeight)
 
void copyToArray (byte *dst, int pitch)
 
bool allocate (bool inVram=false)
 
void deallocate ()
 
bool isAllocated () const
 
void clear ()
 
void flipNibbles ()
 
void print (uint32 mask, uint32 numToPrint=0)
 

Static Public Member Functions

static uint32 scaleUpToPowerOfTwo (uint32 size)
 

Protected Attributes

byte * _pixels
 
uint32 _width
 True allocated width.
 
uint32 _height
 True allocated height.
 
Dimensions _textureSize
 Size rounded up to power of 2. Used for drawing.
 
Dimensions _sourceSize
 Original size of the buffer.
 
PSPPixelFormat _pixelFormat
 Format of the buffer.
 

Detailed Description

Universal PSP buffer/texture object Use this in any class that wishes to draw to the PSP screen. Use together with GuRenderer


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