1 | |
1 | |
2 | /* |
2 | /* |
3 | * static char *rcsid_treasure_c = |
3 | * static char *rcsid_treasure_c = |
4 | * "$Id: treasure.C,v 1.4 2006/09/10 16:06:37 root Exp $"; |
4 | * "$Id: treasure.C,v 1.5 2006/09/14 21:16:12 root Exp $"; |
5 | */ |
5 | */ |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
9 | |
9 | |
… | |
… | |
662 | *cy = ly; |
662 | *cy = ly; |
663 | return; |
663 | return; |
664 | } |
664 | } |
665 | } |
665 | } |
666 | /* give up and return the closest free spot. */ |
666 | /* give up and return the closest free spot. */ |
667 | i = find_first_free_spot (&find_archetype ("chest")->clone, map, x, y); |
667 | i = find_first_free_spot (&archetype::find ("chest")->clone, map, x, y); |
668 | if (i != -1 && i <= SIZEOFFREE1) |
668 | if (i != -1 && i <= SIZEOFFREE1) |
669 | { |
669 | { |
670 | *cx = x + freearr_x[i]; |
670 | *cx = x + freearr_x[i]; |
671 | *cy = y + freearr_y[i]; |
671 | *cy = y + freearr_y[i]; |
672 | return; |
672 | return; |