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,7 +124,8 @@ 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);
itype = new_itemtype(rtype, ITF_ANIMAL|ITF_BIG, 5000, 7000); rt_register(rtype);
itype = new_itemtype(rtype, ITF_ANIMAL | ITF_BIG, 5000, 7000);
return itype; return itype;
} }
@ -148,7 +149,7 @@ void test_create_world(void)
test_create_itemtype(names+0); test_create_itemtype(names+0);
test_create_itemtype(names+4); test_create_itemtype(names+4);
test_create_itemtype(names+6); test_create_itemtype(names + 6);
t_plain = test_create_terrain("plain", LAND_REGION | FOREST_REGION | WALK_INTO | CAVALRY_REGION); t_plain = test_create_terrain("plain", LAND_REGION | FOREST_REGION | WALK_INTO | CAVALRY_REGION);
t_plain->size = 1000; t_plain->size = 1000;