… | |
… | |
29 | #include <stdio.h> |
29 | #include <stdio.h> |
30 | #include <sys/types.h> |
30 | #include <sys/types.h> |
31 | #include <sys/uio.h> |
31 | #include <sys/uio.h> |
32 | #include <object.h> |
32 | #include <object.h> |
33 | #include <funcpoint.h> |
33 | #include <funcpoint.h> |
34 | #include <skills.h> |
|
|
35 | #include <loader.h> |
34 | #include <loader.h> |
36 | |
35 | |
37 | int nrofallocobjects = 0; |
36 | int nrofallocobjects = 0; |
38 | |
37 | |
39 | object *objects; /* Pointer to the list of used objects */ |
38 | object *objects; /* Pointer to the list of used objects */ |
… | |
… | |
2844 | shstr key_ (key); |
2843 | shstr key_ (key); |
2845 | |
2844 | |
2846 | return set_ob_key_value_s (op, key_, value, add_key); |
2845 | return set_ob_key_value_s (op, key_, value, add_key); |
2847 | } |
2846 | } |
2848 | |
2847 | |
|
|
2848 | object::depth_iterator::depth_iterator (object *container) |
|
|
2849 | : iterator_base (container) |
|
|
2850 | { |
|
|
2851 | while (item->inv) |
|
|
2852 | item = item->inv; |
|
|
2853 | } |
|
|
2854 | |
2849 | void |
2855 | void |
2850 | object::deep_iterator::next () |
2856 | object::depth_iterator::next () |
2851 | { |
2857 | { |
2852 | if (item->inv) |
|
|
2853 | item = item->inv; |
|
|
2854 | else if (item->below) |
2858 | if (item->below) |
|
|
2859 | { |
2855 | item = item->below; |
2860 | item = item->below; |
|
|
2861 | |
|
|
2862 | while (item->inv) |
|
|
2863 | item = item->inv; |
|
|
2864 | } |
2856 | else |
2865 | else |
2857 | item = item->env->below; |
2866 | item = item->env; |
2858 | } |
2867 | } |
|
|
2868 | |