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

Comparing deliantra/server/random_maps/decor.C (file contents):
Revision 1.4 by root, Sat Sep 16 22:24:12 2006 UTC vs.
Revision 1.6 by root, Wed Dec 20 09:14:22 2006 UTC

34obj_count_in_map (maptile *map, int x, int y) 34obj_count_in_map (maptile *map, int x, int y)
35{ 35{
36 int count = 0; 36 int count = 0;
37 object *tmp; 37 object *tmp;
38 38
39 for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above) 39 for (tmp = GET_MAP_OB (map, x, y); tmp != NULL; tmp = tmp->above)
40 count++; 40 count++;
41 return count; 41 return count;
42} 42}
43 43
44/* put the decor into the map. Right now, it's very primitive. */ 44/* put the decor into the map. Right now, it's very primitive. */
77 { /* empty */ 77 { /* empty */
78 object *this_object; 78 object *this_object;
79 79
80 new_decor_object = pick_random_object (decor_map); 80 new_decor_object = pick_random_object (decor_map);
81 this_object = arch_to_object (new_decor_object->arch); 81 this_object = arch_to_object (new_decor_object->arch);
82 copy_object (new_decor_object, this_object); 82 new_decor_object->copy_to (this_object);
83 this_object->x = x; 83 this_object->x = x;
84 this_object->y = y; 84 this_object->y = y;
85 /* it screws things up if decor can stop people */ 85 /* it screws things up if decor can stop people */
86 this_object->move_block = MOVE_BLOCK_DEFAULT; 86 this_object->move_block = MOVE_BLOCK_DEFAULT;
87 insert_ob_in_map (this_object, map, NULL, 0); 87 insert_ob_in_map (this_object, map, NULL, 0);
103 { 103 {
104 object *new_decor_object, *this_object; 104 object *new_decor_object, *this_object;
105 105
106 new_decor_object = pick_random_object (decor_map); 106 new_decor_object = pick_random_object (decor_map);
107 this_object = arch_to_object (new_decor_object->arch); 107 this_object = arch_to_object (new_decor_object->arch);
108 copy_object (new_decor_object, this_object); 108 new_decor_object->copy_to (this_object);
109 this_object->x = i; 109 this_object->x = i;
110 this_object->y = j; 110 this_object->y = j;
111 /* it screws things up if decor can stop people */ 111 /* it screws things up if decor can stop people */
112 this_object->move_block = MOVE_BLOCK_DEFAULT; 112 this_object->move_block = MOVE_BLOCK_DEFAULT;
113 insert_ob_in_map (this_object, map, NULL, 0); 113 insert_ob_in_map (this_object, map, NULL, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines