mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
734 B
35 lines
734 B
/*
|
|
* d16out.c
|
|
*
|
|
* Outputting for 16-bit decoder
|
|
*/
|
|
|
|
#include "decoder.h"
|
|
|
|
|
|
void NEAR copy_data_to_output(
|
|
t_decoder_context * context,
|
|
long amount,
|
|
const byte * data
|
|
)
|
|
{
|
|
/*
|
|
* Save pages before we transform
|
|
*
|
|
* Don't save pages if amount < CHUNK_SIZE, because that
|
|
* means that this is our last chunk of data ever.
|
|
* This will save a few page writes at the end.
|
|
*/
|
|
if (amount >= CHUNK_SIZE)
|
|
DComp_Save_Output_Pages(context, (uint) amount);
|
|
|
|
/* perform jump translation */
|
|
if (context->dec_current_file_size)
|
|
{
|
|
decoder_translate_e8(
|
|
context,
|
|
context->dec_output_buffer,
|
|
amount
|
|
);
|
|
}
|
|
}
|