… | |
… | |
27 | |
27 | |
28 | #include <loader.h> |
28 | #include <loader.h> |
29 | #include <unistd.h> |
29 | #include <unistd.h> |
30 | |
30 | |
31 | #include "path.h" |
31 | #include "path.h" |
32 | |
|
|
33 | |
32 | |
34 | /* |
33 | /* |
35 | * Returns the maptile which has a name matching the given argument. |
34 | * Returns the maptile which has a name matching the given argument. |
36 | * return NULL if no match is found. |
35 | * return NULL if no match is found. |
37 | */ |
36 | */ |
… | |
… | |
1639 | last->next = m->next; |
1638 | last->next = m->next; |
1640 | |
1639 | |
1641 | delete m; |
1640 | delete m; |
1642 | } |
1641 | } |
1643 | |
1642 | |
1644 | |
|
|
1645 | |
|
|
1646 | /* |
1643 | /* |
1647 | * Makes sure the given map is loaded and swapped in. |
1644 | * Makes sure the given map is loaded and swapped in. |
1648 | * name is path name of the map. |
1645 | * name is path name of the map. |
1649 | * flags meaning: |
1646 | * flags meaning: |
1650 | * 0x1 (MAP_FLUSH): flush the map - always load from the map directory, |
1647 | * 0x1 (MAP_FLUSH): flush the map - always load from the map directory, |
… | |
… | |
1652 | * 0x2 (MAP_PLAYER_UNIQUE) - this is a unique map for each player. |
1649 | * 0x2 (MAP_PLAYER_UNIQUE) - this is a unique map for each player. |
1653 | * dont do any more name translation on it. |
1650 | * dont do any more name translation on it. |
1654 | * |
1651 | * |
1655 | * Returns a pointer to the given map. |
1652 | * Returns a pointer to the given map. |
1656 | */ |
1653 | */ |
1657 | |
|
|
1658 | maptile * |
1654 | maptile * |
1659 | ready_map_name (const char *name, int flags) |
1655 | ready_map_name (const char *name, int flags) |
1660 | { |
1656 | { |
1661 | maptile *m; |
1657 | maptile *m; |
1662 | |
1658 | |