… | |
… | |
16 | |
16 | |
17 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | |
20 | |
21 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
22 | */ |
22 | */ |
23 | |
23 | |
24 | |
24 | |
25 | #include <global.h> |
25 | #include <global.h> |
26 | |
26 | |
… | |
… | |
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; |