… | |
… | |
940 | sprintf (small_buf, "treasureoptions %d\n", treasureoptions_n); |
940 | sprintf (small_buf, "treasureoptions %d\n", treasureoptions_n); |
941 | strcat (buf, small_buf); |
941 | strcat (buf, small_buf); |
942 | } |
942 | } |
943 | } |
943 | } |
944 | |
944 | |
945 | /* copy an object with an inventory... i.e., duplicate the inv too. */ |
|
|
946 | void |
|
|
947 | copy_object_with_inv (object *src_ob, object *dest_ob)//TODO, replace by clone |
|
|
948 | { |
|
|
949 | object *walk, *tmp; |
|
|
950 | |
|
|
951 | src_ob->copy_to (dest_ob); |
|
|
952 | |
|
|
953 | for (walk = src_ob->inv; walk; walk = walk->below) |
|
|
954 | { |
|
|
955 | tmp = object::create (); |
|
|
956 | |
|
|
957 | walk->copy_to (tmp); |
|
|
958 | insert_ob_in_ob (tmp, dest_ob); |
|
|
959 | } |
|
|
960 | } |
|
|
961 | |
|
|
962 | ///////////////////////////////////////////////////////////////////////////// |
945 | ///////////////////////////////////////////////////////////////////////////// |
963 | |
946 | |
964 | LayoutData::LayoutData (int w, int h) |
947 | LayoutData::LayoutData (int w, int h) |
965 | : w(w), h(h) |
948 | : w(w), h(h) |
966 | { |
949 | { |