CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
|
RLE decoder for pcx RLE format. More...
Private Member Functions | |
virtual void | read_mode (input_buffer_type &input, output_buffer_type &output) |
Get the type of the following data in the input buffer. |
void claw::graphic::pcx::reader::rle_pcx_decoder::read_mode | ( | input_buffer_type & | input, |
output_buffer_type & | output | ||
) | [private, virtual] |
Get the type of the following data in the input buffer.
input | The input stream (the pcx file). |
output | The output stream (the pcx image). |
Definition at line 230 of file pcx_reader.cpp.
{ this->m_mode = this->stop; bool ok = !output.completed(); if ( ok && (input.remaining() < 1) ) ok = input.read_more(1); if (ok) { unsigned char key = input.get_next(); this->m_mode = this->compressed; if ( (key & 0xC0) == 0xC0 ) { this->m_count = key & 0x3F; if ( input.remaining() < 1 ) input.read_more(1); this->m_pattern = input.get_next(); } else { this->m_count = 1; this->m_pattern = key; } } } // pcx::reader::rle_pcx_decoder::read_mode()