ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/treasure.C
(Generate patch)

Comparing deliantra/server/random_maps/treasure.C (file contents):
Revision 1.25 by root, Sat Feb 17 23:32:11 2007 UTC vs.
Revision 1.29 by root, Mon Jun 4 13:04:00 2007 UTC

59wall_blocked (maptile *m, int x, int y) 59wall_blocked (maptile *m, int x, int y)
60{ 60{
61 if (OUT_OF_REAL_MAP (m, x, y)) 61 if (OUT_OF_REAL_MAP (m, x, y))
62 return 1; 62 return 1;
63 63
64 m->at (x, y).update ();
64 int r = GET_MAP_MOVE_BLOCK (m, x, y) & ~MOVE_BLOCK_DEFAULT; 65 return GET_MAP_MOVE_BLOCK (m, x, y) & MOVE_WALK;
65 return r;
66} 66}
67 67
68/* place treasures in the map, given the 68/* place treasures in the map, given the
69map, (required) 69map, (required)
70layout, (required) 70layout, (required)
250 the_chest->randomitems = tlist; 250 the_chest->randomitems = tlist;
251 the_chest->stats.hp = n_treasures; 251 the_chest->stats.hp = n_treasures;
252 } 252 }
253#endif 253#endif
254 { /* neither style_map no treasure list given */ 254 { /* neither style_map no treasure list given */
255 treasurelist *tlist = find_treasurelist ("chest"); 255 treasurelist *tlist = treasurelist::find ("chest");
256 256
257 the_chest->randomitems = tlist; 257 the_chest->randomitems = tlist;
258 the_chest->stats.hp = n_treasures; 258 the_chest->stats.hp = n_treasures;
259 } 259 }
260 260
658 *cy = ly; 658 *cy = ly;
659 return; 659 return;
660 } 660 }
661 } 661 }
662 /* give up and return the closest free spot. */ 662 /* give up and return the closest free spot. */
663 i = find_free_spot (&archetype::find ("chest")->clone, map, x, y, 1, SIZEOFFREE1 + 1); 663 i = find_free_spot (archetype::find ("chest"), map, x, y, 1, SIZEOFFREE1 + 1);
664 664
665 if (i != -1) 665 if (i != -1)
666 { 666 {
667 *cx = x + freearr_x[i]; 667 *cx = x + freearr_x[i];
668 *cy = y + freearr_y[i]; 668 *cy = y + freearr_y[i];
698 it'll remove any monsters it finds.*/ 698 it'll remove any monsters it finds.*/
699object ** 699object **
700surround_by_doors (maptile *map, char **layout, int x, int y, int opts) 700surround_by_doors (maptile *map, char **layout, int x, int y, int opts)
701{ 701{
702 int i; 702 int i;
703 char *doors[2]; 703 const char *doors[2];
704 object **doorlist; 704 object **doorlist;
705 int ndoors_made = 0; 705 int ndoors_made = 0;
706 doorlist = (object **) calloc (9, sizeof (object *)); /* 9 doors so we can hold termination null */ 706 doorlist = (object **) calloc (9, sizeof (object *)); /* 9 doors so we can hold termination null */
707 707
708 /* this is a list we pick from, for horizontal and vertical doors */ 708 /* this is a list we pick from, for horizontal and vertical doors */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines