This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
void | init_map_coding (void) |
int | Coding_GetIndex (char terrain, char elevation) |
char | Coding_GetElevation (int index) |
char | Coding_GetTerrain (int index) |
char Coding_GetElevation | ( | int | index | ) |
Definition at line 56 of file map.coding.c.
References hex_struct::elev, and id_to_data.
00057 { 00058 return id_to_data[index].elev; 00059 }
int Coding_GetIndex | ( | char | terrain, | |
char | elevation | |||
) |
Definition at line 43 of file map.coding.c.
References data_to_id, hex_struct::elev, first_free, id_to_data, and hex_struct::terrain.
00044 { 00045 int i; 00046 00047 if((i = data_to_id[(short) terrain][(short) elevation])) 00048 return i - 1; 00049 id_to_data[first_free].terrain = terrain; 00050 id_to_data[first_free].elev = elevation; 00051 first_free++; 00052 data_to_id[(short) terrain][(short) elevation] = first_free; 00053 return first_free - 1; 00054 }
char Coding_GetTerrain | ( | int | index | ) |
Definition at line 61 of file map.coding.c.
References id_to_data, and hex_struct::terrain.
00062 { 00063 return id_to_data[index].terrain; 00064 }
void init_map_coding | ( | void | ) |
Definition at line 37 of file map.coding.c.
References data_to_id, and id_to_data.
00038 { 00039 bzero(id_to_data, sizeof(id_to_data)); 00040 bzero(data_to_id, sizeof(data_to_id)); 00041 }