#include <iostream>
Include dependency graph for mapping.cpp:
Go to the source code of this file.
Functions | |
int | main () |
int main | ( | void | ) |
Definition at line 8 of file mapping.cpp.
00009 { 00010 00011 const int map[64]= 00012 {17, 1 , 3 , 5, 7, 8, 10, 12, 00013 18, 0 , 2 , 4, 6, 9, 11, 13, 00014 20, 19, 16, 15 ,14, 21, 22, 23, 00015 31, 30, 29, 28, 27, 26, 25, 24, 00016 32, 33, 34, 35, 36, 37, 38, 39, 00017 42, 44, 47, 48, 49, 50, 41, 40, 00018 43, 45, 62, 60, 57, 55, 53, 51, 00019 46, 63, 61, 59, 58, 56, 54, 52 }; 00020 00021 int foo[64]; 00022 00023 00024 for ( int line = 0 ; line < 8 ; line++ ) 00025 { 00026 for ( int row = 0 ; row < 8 ; row++ ) 00027 { 00028 int id = map[(line*8) + row]; 00029 cout <<"id[" << id <<"] line[" << line << "], col[" << row << "]" << endl; 00030 foo[id] = line*8 + row; 00031 00032 } 00033 00034 } 00035 00036 for ( int i = 0 ; i < 64 ; i++) 00037 { 00038 cout << foo[i] << ", " ; 00039 if ( (i+1) % 8 == 0 ) cout << endl; 00040 } 00041 cout << endl; 00042 return 0; 00043 00044 }