Definition at line 229 of file bitmap.hpp.
Public Member Functions | |
| void | operator() (scanline &dest, const char *src, const color_palette_type &palette) const |
| Convert a 4bpp array to a pixel32 scanline. | |
| void claw::graphic::bitmap::reader::pixel4_to_pixel32::operator() | ( | scanline & | dest, | |
| const char * | src, | |||
| const color_palette_type & | palette | |||
| ) | const |
Convert a 4bpp array to a pixel32 scanline.
| dest | (out) Filled scanline. | |
| src | Pixel array to convert. | |
| palette | Color palette. |
Definition at line 218 of file bitmap_reader.cpp.
References claw::graphic::image::scanline::begin(), and claw::graphic::image::scanline::size().
00219 { 00220 assert(palette.size() == 16); 00221 00222 scanline::iterator it( dest.begin() ); 00223 const unsigned int upper_bound = dest.size() / 2; 00224 00225 for (unsigned int i=0; i!=upper_bound; ++i, ++src) 00226 { 00227 *it = palette[ (*src & 0xF0) >> 4 ]; 00228 ++it; 00229 *it = palette[ *src & 0x0F ]; 00230 ++it; 00231 } 00232 00233 if (dest.size() % 2) 00234 *it = palette[ (*src & 0xF0) >> 4 ]; 00235 } // bitmap::reader::pixel4_to_pixel32()
1.5.5