ScummVM API documentation
PSPPixelFormat Struct Reference

#include <psppixelformat.h>

Public Types

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

Public Member Functions

void set (Type type)
 
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
 
uint32 getColorValueAt (byte *pointer) const
 

Static Public Member Functions

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

Public Attributes

Type format
 
uint32 bitsPerPixel
 Must match bpp of selected type.
 

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: