ARGSUSED*/
| 539 | |
| 540 | /*ARGSUSED*/ |
| 541 | staticfn void |
| 542 | dump_everything( |
| 543 | int how, /* ASCENDED, ESCAPED, QUIT, etc */ |
| 544 | time_t when) /* date+time at end of game */ |
| 545 | { |
| 546 | #ifdef DUMPLOG |
| 547 | char pbuf[BUFSZ], datetimebuf[24]; /* [24]: room for 64-bit bogus value */ |
| 548 | |
| 549 | dump_redirect(TRUE); |
| 550 | if (!iflags.in_dumplog) |
| 551 | return; |
| 552 | |
| 553 | init_symbols(); /* revert to default symbol set */ |
| 554 | |
| 555 | /* one line version ID, which includes build date+time; |
| 556 | it's conceivable that the game started with a different |
| 557 | build date+time or even with an older nethack version, |
| 558 | but we only have access to the one it finished under */ |
| 559 | putstr(0, 0, getversionstring(pbuf, sizeof pbuf)); |
| 560 | putstr(0, 0, ""); |
| 561 | |
| 562 | /* game start and end date+time to disambiguate version date+time */ |
| 563 | Strcpy(datetimebuf, yyyymmddhhmmss(ubirthday)); |
| 564 | Sprintf(pbuf, "Game began %4.4s-%2.2s-%2.2s %2.2s:%2.2s:%2.2s", |
| 565 | &datetimebuf[0], &datetimebuf[4], &datetimebuf[6], |
| 566 | &datetimebuf[8], &datetimebuf[10], &datetimebuf[12]); |
| 567 | Strcpy(datetimebuf, yyyymmddhhmmss(when)); |
| 568 | Sprintf(eos(pbuf), ", ended %4.4s-%2.2s-%2.2s %2.2s:%2.2s:%2.2s.", |
| 569 | &datetimebuf[0], &datetimebuf[4], &datetimebuf[6], |
| 570 | &datetimebuf[8], &datetimebuf[10], &datetimebuf[12]); |
| 571 | putstr(0, 0, pbuf); |
| 572 | putstr(0, 0, ""); |
| 573 | |
| 574 | /* character name and basic role info */ |
| 575 | Sprintf(pbuf, "%s, %s %s %s %s", |
| 576 | svp.plname, aligns[1 - u.ualign.type].adj, |
| 577 | genders[flags.female].adj, gu.urace.adj, |
| 578 | (flags.female && gu.urole.name.f) ? gu.urole.name.f |
| 579 | : gu.urole.name.m); |
| 580 | putstr(0, 0, pbuf); |
| 581 | putstr(0, 0, ""); |
| 582 | |
| 583 | /* info about current game state */ |
| 584 | dump_map(); |
| 585 | putstr(0, 0, do_statusline1()); |
| 586 | putstr(0, 0, do_statusline2()); |
| 587 | putstr(0, 0, ""); |
| 588 | |
| 589 | dump_plines(); |
| 590 | putstr(0, 0, ""); |
| 591 | putstr(0, 0, "Inventory:"); |
| 592 | (void) display_inventory((char *) 0, TRUE); |
| 593 | container_contents(gi.invent, TRUE, TRUE, FALSE); |
| 594 | enlightenment((BASICENLIGHTENMENT | MAGICENLIGHTENMENT), |
| 595 | (how >= PANICKED) ? ENL_GAMEOVERALIVE : ENL_GAMEOVERDEAD); |
| 596 | putstr(0, 0, ""); |
| 597 | |
| 598 | /* overview of the game up to this point */ |
no test coverage detected