… | |
… | |
32 | |
32 | |
33 | //#define TREASURE_VERBOSE |
33 | //#define TREASURE_VERBOSE |
34 | |
34 | |
35 | #include <global.h> |
35 | #include <global.h> |
36 | #include <treasure.h> |
36 | #include <treasure.h> |
37 | #include <funcpoint.h> |
|
|
38 | #include <loader.h> |
37 | #include <loader.h> |
39 | |
38 | |
40 | extern char *spell_mapping[]; |
39 | extern char *spell_mapping[]; |
41 | |
40 | |
42 | static treasurelist *first_treasurelist; |
41 | static treasurelist *first_treasurelist; |
… | |
… | |
145 | |
144 | |
146 | switch (f.kw) |
145 | switch (f.kw) |
147 | { |
146 | { |
148 | case KW_arch: |
147 | case KW_arch: |
149 | t->item = archetype::find (f.get_str ()); |
148 | t->item = archetype::find (f.get_str ()); |
|
|
149 | |
150 | if (!t->item) |
150 | if (!t->item) |
151 | { |
151 | { |
152 | f.parse_warn ("treasure references unknown archetype"); |
152 | f.parse_warn ("treasure references unknown archetype"); |
153 | goto error; |
153 | t->item = archetype::empty; |
154 | } |
154 | } |
155 | |
155 | |
156 | break; |
156 | break; |
157 | |
157 | |
158 | case KW_list: f.get (t->name); break; |
158 | case KW_list: f.get (t->name); break; |