we are about to remove rt_register, but not quite yet.

This commit is contained in:
Enno Rehling 2014-06-29 16:46:42 -07:00
parent 773f3767d3
commit 95929a99b5
3 changed files with 4 additions and 4 deletions

View File

@ -193,7 +193,6 @@ void it_register(item_type * itype)
assert(len<sizeof(buffer)-sizeof(itype)); assert(len<sizeof(buffer)-sizeof(itype));
len = cb_new_kv(name, len, &itype, sizeof(itype), buffer); len = cb_new_kv(name, len, &itype, sizeof(itype), buffer);
rt_register(itype->rtype);
} }
static const char *it_aliases[][2] = { static const char *it_aliases[][2] = {

View File

@ -225,7 +225,7 @@ extern "C" {
int *deaths); int *deaths);
} weapon_type; } weapon_type;
extern void rt_register(resource_type * it); void rt_register(resource_type * it);
resource_type *rt_find(const char *name); resource_type *rt_find(const char *name);
item_type *it_find(const char *name); item_type *it_find(const char *name);

View File

@ -124,6 +124,7 @@ item_type * test_create_itemtype(const char ** names) {
item_type * itype; item_type * itype;
rtype = new_resourcetype(names, NULL, RTF_ITEM); rtype = new_resourcetype(names, NULL, RTF_ITEM);
rt_register(rtype);
itype = new_itemtype(rtype, ITF_ANIMAL | ITF_BIG, 5000, 7000); itype = new_itemtype(rtype, ITF_ANIMAL | ITF_BIG, 5000, 7000);
return itype; return itype;