version 1.25 | | version 1.26 |
---|
| | |
/* | | /* |
* static char *rcsid_treasure_c = | | * static char *rcsid_treasure_c = |
* "$Id: treasure.c,v 1.25 2006/03/04 17:37:19 akirschbaum Exp $"; | | * "$Id: treasure.c,v 1.26 2006/03/18 17:15:25 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#define NO_PASS_DOORS 0 | | #define NO_PASS_DOORS 0 |
#define PASS_DOORS 1 | | #define PASS_DOORS 1 |
| | |
| | static object ** surround_by_doors(mapstruct *map,char **layout,int x,int y,int opts); |
| | |
/* returns true if square x,y has P_NO_PASS set, which is true for walls | | /* returns true if square x,y has P_NO_PASS set, which is true for walls |
* and doors but not monsters. | | * and doors but not monsters. |
| | |
a chest. It only goes as far as the 8 squares surrounding, and | | a chest. It only goes as far as the 8 squares surrounding, and |
it'll remove any monsters it finds.*/ | | it'll remove any monsters it finds.*/ |
| | |
object ** surround_by_doors(mapstruct *map,char **layout,int x,int y,int opts) { | | static object ** surround_by_doors(mapstruct *map,char **layout,int x,int y,int opts) { |
int i; | | int i; |
char *doors[2]; | | char *doors[2]; |
object **doorlist; | | object **doorlist; |
| | |
| | |
| | |
/* returns the first door in this square, or NULL if there isn't a door. */ | | /* returns the first door in this square, or NULL if there isn't a door. */ |
object *door_in_square(mapstruct *map,int x,int y) { | | static object *door_in_square(mapstruct *map,int x,int y) { |
object *tmp; | | object *tmp; |
for(tmp=get_map_ob(map,x,y);tmp!=NULL;tmp=tmp->above) | | for(tmp=get_map_ob(map,x,y);tmp!=NULL;tmp=tmp->above) |
if(tmp->type == DOOR || tmp->type== LOCKED_DOOR) return tmp; | | if(tmp->type == DOOR || tmp->type== LOCKED_DOOR) return tmp; |