version 1.2 | | version 1.3 |
---|
| | |
/* | | /* |
* static char *rcsid_treasure_c = | | * static char *rcsid_treasure_c = |
* "$Id: treasure.c,v 1.2 1999/07/13 06:03:03 cvs Exp $"; | | * "$Id: treasure.c,v 1.3 2000/05/26 09:50:47 jec Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* actually place the chest. */ | | /* actually place the chest. */ |
i = find_first_free_spot(the_chest->arch,map,x,y); | | i = find_first_free_spot(the_chest->arch,map,x,y); |
the_chest->x = x+freearr_x[i]; the_chest->y = y+freearr_y[i]; | | the_chest->x = x+freearr_x[i]; the_chest->y = y+freearr_y[i]; |
insert_ob_in_map(the_chest,map); | | insert_ob_in_map(the_chest,map,NULL); |
return the_chest; | | return the_chest; |
} | | } |
| | |
| | |
if(the_keymaster==NULL) { | | if(the_keymaster==NULL) { |
the_key->x = kx; | | the_key->x = kx; |
the_key->y = ky; | | the_key->y = ky; |
insert_ob_in_map(the_key,map); | | insert_ob_in_map(the_key,map,NULL); |
return; | | return; |
} | | } |
| | |
| | |
new_door->x = x + freearr_x[i]; | | new_door->x = x + freearr_x[i]; |
new_door->y = y + freearr_y[i]; | | new_door->y = y + freearr_y[i]; |
remove_monsters(new_door->x,new_door->y,map); | | remove_monsters(new_door->x,new_door->y,map); |
insert_ob_in_map(new_door,map); | | insert_ob_in_map(new_door,map,NULL); |
doorlist[ndoors_made]=new_door; | | doorlist[ndoors_made]=new_door; |
ndoors_made++; | | ndoors_made++; |
} | | } |
| | |
remove_ob(door); | | remove_ob(door); |
free_object(door); | | free_object(door); |
doorlist[i]=new_door; | | doorlist[i]=new_door; |
insert_ob_in_map(new_door,map); | | insert_ob_in_map(new_door,map,NULL); |
sprintf(keybuf,"%d",RANDOM()); | | sprintf(keybuf,"%d",RANDOM()); |
new_door->slaying = add_string(keybuf); | | new_door->slaying = add_string(keybuf); |
keyplace(map,new_door->x,new_door->y,keybuf,NO_PASS_DOORS,2); | | keyplace(map,new_door->x,new_door->y,keybuf,NO_PASS_DOORS,2); |