Add more information to the version command.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5729 c06c8d41-db1a-0410-9941-cceddc491573
DWSABP6YFM2CCMO7NVGGBWVCPAXOXOT5VQ6SADR4M66LHW66AP6QC
RJI2QPQBXWAO73WAWUFUZGPUUKQTCXWHMYIVIADBTS5QYN7IQABAC
PNIGZ2ABVEGC6DN6PMKO6Z4M2SQ5EB7VZQT33YMEAUPEZVVEDJZQC
CKY7MRFWMNHXIPJD5ZUAJN5T2YHUIEAYBNYYV5GN74LBZJRDJMEQC
DMG73XDQHY2X2PHKWIY56XKD3O4NPGZKKIO6GX3IV2LLRVXPGKYQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
I2B33Z7NZGC33AMDSSK446AZZYWKPHWLAGULVHKKZU4MVB4BNJOAC
CIAIASCBKKV7VMYBL2CIFAYGFQTB6GIME4FSQGZNQGXO7FXQTA5AC
4UXFU3FZOCBSLDQ4S7MJKAE2H7VUHCNRDQMIY6NJ3PHYXWNGISDQC
W5VEC2PBIM5DMU5233HOWAZUEPTGWJRZZIA3H35YYQQW6BTP6XUAC
AVCMVFA3MKCXHO6H44UK5KJNIHTGQV7UA7GYXM26VI6TXXU5ZN6QC
TO43FWKHNIA5MVDOFXYHQODTLBQYEZKX5UIUGID57436UF7G2EXQC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
PL6I2CMSTHY5ZHWVMIQE5YTM5S5VPKBNZM6QJVHZSSKOJGIJ5W4AC
T4IH76FA5TWHFOZUJFHLQXQJENJHWTUZZP4EGNA7D4GTZY7D4ZKAC
22RFWMSJGG26Z2MQEEXGKVTFSTLREHQIG46WYOTMDRKI5YVMRNVAC
W2D7G5ARFVO2HKUPFITKCGFC6UKB6ZCZFIT6223QLQ7PU7UO7L5AC
NMA2HIGBH56WSZB5KQN2TMFC2BVELZOXJWAKKPOO7ZR6V3Z2ZR2QC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
NTLIBIV3QH27YYESURSGCYTGXPBETE6TAUSGDO6LJHKWG5CJAOBQC
NLXVJSK53M3GCGGVJWYPHYZJ2A7JAF2FEYQPIGLRUYJ3FTWYONLQC
EIY4GQI3FDZOE242QLFTMRTAGWI6YQ4KBS3H26ZC2OZ2IYBP5QIQC
MDFQRJ6QZNFUBVSFWLXUJ6EBXOU47T3CVDI2XKBGNNRF4DXDKESQC
UFGBNLXSCQWIKCFRAPQNAMQOW3KGAIFXSNQ26PH5CXGF3DXXJ4SQC
static std::string _get_version_changes(void)
{
std::string result = "";
bool start = false;
// Attempts to print "Highlights" of the latest version.
FILE* fp = fopen(datafile_path("changes.stone_soup", true).c_str(), "r");
if (fp)
{
char buf[200];
std::string help;
bool skip_lines = true;
while (fgets(buf, sizeof buf, fp))
{
// Remove trailing spaces.
for (int i = strlen(buf) - 1; i >= 0; i++)
{
if (isspace( buf[i] ))
buf[i] = 0;
else
break;
}
help = buf;
// Give up if you encountered the second set of underliners
// and still haven't found Highlights.
if (help.find("---") != std::string::npos)
{
if (skip_lines)
{
skip_lines = false;
continue;
}
else if (!start)
break;
}
if (help.find("Highlights") != std::string::npos)
{
// Highlight the Highlights, so to speak.
std::string text = "<w>";
text += buf;
text += "</w>";
text += EOL;
result += text;
// And start printing from now on.
start = true;
}
else if (!start)
continue;
else if (buf[0] == 0)
{
// Stop reading and copying text with the first empty line
// following the Highlights section.
break;
}
else
{
result += buf;
result += EOL;
}
}
}
fclose(fp);
// Did we ever get to print the Highlights?
if (start)
{
result += EOL;
result += "For a more complete list of changes, see changes.stone_soup "
"in the /docs " EOL
"folder.";
}
else
{
result += "For a list of changes, see changes.stone_soup in the /docs "
"folder.";
}
// Use this to seed the PRNG with a bit more than just time()... turning
// this off is perfectly okay, the game just becomes more exploitable
// Use this to seed the PRNG with a bit more than just time()... turning
// this off is perfectly okay, the game just becomes more exploitable
// Option to allow scoring of wizard characters. Note that even if
// you define this option, wizard characters are still tagged as such
// Option to allow scoring of wizard characters. Note that even if
// you define this option, wizard characters are still tagged as such
There are a number of new options, some of them outsourced into various
files in the /settings folder, so if you intend to use your old init file,
you may still want to at least look through the new one.