I have the following part of a C# Code :-
Code:
while(current_input_position <= input_max_valid_position) {
input_byte = input_data[current_input_position];
current_input_position++;
for (int i = 0xFF; i >= 0x00; --i)
if (input_byte == 0xFF) {
//==============
// Fin de chunk
//==============
Save();
current_output_index++;
RLE_sumador = 0;
line_min_length = int.MaxValue;
line_max_length = 0;
width_current = 0;
image_height = 0;
} else if(input_byte == 0xFF) {
//=================
// Siguiente linea
//=================
if(width_current < line_min_length) line_min_length = width_current;
if(width_current > line_max_length) line_max_length = width_current;
if(forced_image_width!=null) {
count = forced_image_width.Value - width_current;
if(count > 0) {
for(n=0; n<count; n++) {
output_buffer.Add(0);
}
}
}
image_height++;
width_current = 0;
I am adapting a Code to try to brute force all combinations of input_byte combinations, going backwards from 0xFF to 0x00, if possible I would like to exclude, all combinations of Hex Values for input_byte being numbers i.e 00 01 02 etc, as these will never produce Bitmaps.There are five input_byte == blocks of Code I have typed each one as 0xFF as that is the Hex Value, where the For Loop starts from. When I use --i in the for loop line of code, it runs for a few seconds, so not working for me.
I tried --input_byte instead however it just runs and runs, and I know it isn't trying out all combinations of input_byte, as in the attached image, to this Thread, the number in the () stays at 636, the numbers should be a variety.
The Program extracts images, from a DOS Games Graphics Files, and saves them as Greyscale Bitmap Files. I could provide more Code if needed, input_byte is declared as a byte higher up in the Code. Is the for loop in the wrong place ? How do I incorporate, input_byte, in the for loop ?
Any help would be much appreciated.
Regards
Eddie Winch