… | |
… | |
60 | return NULL; |
60 | return NULL; |
61 | } |
61 | } |
62 | |
62 | |
63 | /* This might need optimising at some point. */ |
63 | /* This might need optimising at some point. */ |
64 | region * |
64 | region * |
65 | get_region_by_map (mapstruct *m) |
65 | get_region_by_map (maptile *m) |
66 | { |
66 | { |
67 | return get_region_by_name (get_name_of_region_for_map (m)); |
67 | return get_region_by_name (get_name_of_region_for_map (m)); |
68 | } |
68 | } |
69 | |
69 | |
70 | /* |
70 | /* |
… | |
… | |
72 | * explicit check that it is, this is much nicer here than scattered throughout |
72 | * explicit check that it is, this is much nicer here than scattered throughout |
73 | * the map code. |
73 | * the map code. |
74 | */ |
74 | */ |
75 | |
75 | |
76 | const char * |
76 | const char * |
77 | get_name_of_region_for_map (const mapstruct *m) |
77 | get_name_of_region_for_map (const maptile *m) |
78 | { |
78 | { |
79 | region *reg; |
79 | region *reg; |
80 | |
80 | |
81 | if (m->region != NULL) |
81 | if (m->region != NULL) |
82 | return m->region->name; |
82 | return m->region->name; |