33 std::cout <<
" 0x" << std::setfill(
'0') << std::setw(2) << std::hex << val << std::dec <<
',';
43 for (
int i = 0; i < 256; ++i)
45 int col_diff = i & 0xf;
46 int row_diff = i >> 4;
47 if (col_diff == 8 || row_diff == 8)
56 if (col_diff == 0 && row_diff == 0)
61 if (col_diff != 0 && row_diff != 0 && std::abs(col_diff) != std::abs(row_diff))
66 if (col_diff == 0 && row_diff < 0)
68 else if (col_diff == 0 && row_diff > 0)
70 else if (col_diff < 0 && row_diff == 0)
72 else if (col_diff > 0 && row_diff == 0)
74 else if (col_diff < 0 && row_diff < 0)
76 else if (col_diff < 0 && row_diff > 0)
78 else if (col_diff > 0 && row_diff < 0)
80 else if (col_diff > 0 && row_diff > 0)