- player.pos = find_passable_pos(&map);
- void * foo = build_map_objects(&world, &world.monster,
- 0, 1 + rrand() % 27,
- sizeof(struct Monster),
- build_map_objects_monsterdata);
- foo = build_map_objects(&world, foo, 1, 1 + rrand() % 9,
- sizeof(struct Monster),
- build_map_objects_monsterdata);
- build_map_objects(&world, foo, 2, 1 + rrand() % 3,
- sizeof(struct Monster),
- build_map_objects_monsterdata);
- foo = build_map_objects(&world, &world.item, 3, 1 + rrand() % 3,
- sizeof(struct Item),
- build_map_objects_itemdata);
- build_map_objects(&world, foo, 4, 1 + rrand() % 3,
- sizeof(struct Item), build_map_objects_itemdata);
+ world.map_objs = NULL;
+ add_map_objects(0, 1);
+ add_map_objects(1, 1 + rrand() % 27);
+ add_map_objects(2, 1 + rrand() % 9);
+ add_map_objects(3, 1 + rrand() % 3);
+ add_map_objects(4, 1 + rrand() % 3);
+ add_map_objects(5, 1 + rrand() % 3);
+ set_cleanup_flag(CLEANUP_MAP_OBJECTS);
+ world.turn = 1;