| 1343 | } |
| 1344 | |
| 1345 | static void _write_object_stats() |
| 1346 | { |
| 1347 | _write_stat_info(); |
| 1348 | |
| 1349 | for (int i = 0; i < NUM_ITEM_BASE_TYPES; i++) |
| 1350 | { |
| 1351 | item_base_type base_type = static_cast<item_base_type>(i); |
| 1352 | _write_base_item_stats(base_type); |
| 1353 | } |
| 1354 | |
| 1355 | string out_file = make_stringf("%s%s%s", stat_out_prefix, "Spells", |
| 1356 | stat_out_ext); |
| 1357 | stat_outf = _open_stat_file(out_file.c_str()); |
| 1358 | |
| 1359 | _write_stat_headers(spell_fields, "Spell"); |
| 1360 | for (const auto spell : objstat_spells) |
| 1361 | _write_spell_stats(spell); |
| 1362 | |
| 1363 | fclose(stat_outf); |
| 1364 | printf("Wrote Spell stats to %s.\n", out_file.c_str()); |
| 1365 | |
| 1366 | out_file = make_stringf("%s%s%s", stat_out_prefix, "Monsters", |
| 1367 | stat_out_ext); |
| 1368 | stat_outf = _open_stat_file(out_file.c_str()); |
| 1369 | |
| 1370 | _write_stat_headers(monster_fields, "Monster"); |
| 1371 | for (const auto mc : objstat_monsters) |
| 1372 | _write_monster_stats(mc); |
| 1373 | |
| 1374 | fclose(stat_outf); |
| 1375 | printf("Wrote Monster stats to %s.\n", out_file.c_str()); |
| 1376 | |
| 1377 | out_file = make_stringf("%s%s%s", stat_out_prefix, "Features", |
| 1378 | stat_out_ext); |
| 1379 | stat_outf = _open_stat_file(out_file.c_str()); |
| 1380 | |
| 1381 | _write_stat_headers(feature_fields, "Feature"); |
| 1382 | for (auto feat : objstat_features) |
| 1383 | _write_feature_stats(feat); |
| 1384 | |
| 1385 | fclose(stat_outf); |
| 1386 | printf("Wrote Feature stats to %s.\n", out_file.c_str()); |
| 1387 | } |
| 1388 | |
| 1389 | void objstat_generate_stats() |
| 1390 | { |
no test coverage detected