ScummVM API documentation
PSPPixelFormat Struct Reference

#include <psppixelformat.h>

Public Types

enum  Type {
  Type_None, Type_4444, Type_5551, Type_5650,
  Type_8888, Type_8888_RGBA, Type_Palette_8bit, Type_Palette_4bit,
  Type_Unknown
}
 

Public Member Functions

void set (Type type, bool swap=false)
 
uint32 convertTo32BitColor (uint32 color) const
 
uint32 rgbaToColor (uint32 r, uint32 g, uint32 b, uint32 a) const
 
void colorToRgba (uint32 color, uint32 &r, uint32 &g, uint32 &b, uint32 &a) const
 
uint32 setColorAlpha (uint32 color, byte alpha)
 
uint32 pixelsToBytes (uint32 pixels) const
 
uint16 swapRedBlue16 (uint16 color) const
 
uint32 swapRedBlue32 (uint32 color) const
 
uint32 getColorValueAt (byte *pointer) const
 

Static Public Member Functions

static void convertFromScummvmPixelFormat (const Graphics::PixelFormat *pf, PSPPixelFormat::Type &bufferType, PSPPixelFormat::Type &paletteType, bool &swapRedBlue)
 
static Graphics::PixelFormat convertToScummvmPixelFormat (PSPPixelFormat::Type type)
 

Public Attributes

Type format
 
uint32 bitsPerPixel
 Must match bpp of selected type.
 
bool swapRB
 Swap red and blue values when reading and writing.
 

Detailed Description

Specialized PixelFormat class Supports only those formats which the PSP allows, including 4 bit palettes. Also provides accurate color conversion (needed for color masking) As well as swapping of red and blue channels (needed by HE games, for example)


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