… | |
… | |
49 | printf ("\n"); |
49 | printf ("\n"); |
50 | } |
50 | } |
51 | } |
51 | } |
52 | printf ("\n"); |
52 | printf ("\n"); |
53 | } |
53 | } |
54 | EXTERN FILE *logfile; |
54 | |
|
|
55 | extern FILE *logfile; |
|
|
56 | |
55 | maptile * |
57 | maptile * |
56 | generate_random_map (const char *OutFileName, RMParms * RP) |
58 | generate_random_map (const char *OutFileName, RMParms * RP) |
57 | { |
59 | { |
58 | char **layout, buf[HUGE_BUF]; |
60 | char **layout, buf[HUGE_BUF]; |
59 | maptile *theMap; |
61 | maptile *theMap; |
… | |
… | |
158 | /* free the layout */ |
160 | /* free the layout */ |
159 | for (i = 0; i < RP->Xsize; i++) |
161 | for (i = 0; i < RP->Xsize; i++) |
160 | free (layout[i]); |
162 | free (layout[i]); |
161 | free (layout); |
163 | free (layout); |
162 | |
164 | |
163 | theMap->msg = strdup_local (buf); |
165 | theMap->msg = strdup (buf); |
164 | |
166 | |
165 | return theMap; |
167 | return theMap; |
166 | } |
168 | } |
167 | |
169 | |
168 | /* function selects the layout function and gives it whatever |
170 | /* function selects the layout function and gives it whatever |
… | |
… | |
990 | void |
992 | void |
991 | copy_object_with_inv (object *src_ob, object *dest_ob) |
993 | copy_object_with_inv (object *src_ob, object *dest_ob) |
992 | { |
994 | { |
993 | object *walk, *tmp; |
995 | object *walk, *tmp; |
994 | |
996 | |
995 | copy_object (src_ob, dest_ob); |
997 | src_ob->copy_to (dest_ob); |
996 | |
998 | |
997 | for (walk = src_ob->inv; walk != NULL; walk = walk->below) |
999 | for (walk = src_ob->inv; walk != NULL; walk = walk->below) |
998 | { |
1000 | { |
999 | tmp = get_object (); |
1001 | tmp = object::create (); |
1000 | copy_object (walk, tmp); |
1002 | walk->copy_to (tmp); |
1001 | insert_ob_in_ob (tmp, dest_ob); |
1003 | insert_ob_in_ob (tmp, dest_ob); |
1002 | } |
1004 | } |
1003 | } |
1005 | } |