diff options
author | frosch <frosch@openttd.org> | 2010-06-13 14:11:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-06-13 14:11:32 +0000 |
commit | 56fbbdeafd2321a1e1d3a9349d5d07cdaf4d64a7 (patch) | |
tree | 414041a43fec98d9e845ef00638e00ee4a476bda /src/gamelog.cpp | |
parent | 641fc68aa80fc24fa277ae3dc62eec2969bdd26b (diff) | |
download | openttd-56fbbdeafd2321a1e1d3a9349d5d07cdaf4d64a7.tar.xz |
(svn r19972) -Change: Use the md5sum from the previous save of the game for BaNaNaS instead of the initial (when the grf was added) md5sum from the gamelog. Neither method is 'better', but this way it is independent from the gamelog.
Diffstat (limited to 'src/gamelog.cpp')
-rw-r--r-- | src/gamelog.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 62781fddd..7d56a0ba5 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -705,30 +705,3 @@ void GamelogGRFUpdate(const GRFConfig *oldc, const GRFConfig *newc) free(ol); free(nl); } - -/** - * Get the MD5 checksum of the original NewGRF that was loaded. - * @param grfid the GRF ID to search for - * @param md5sum the MD5 checksum to write to. - */ -void GamelogGetOriginalGRFMD5Checksum(uint32 grfid, byte *md5sum) -{ - const LoggedAction *la = &_gamelog_action[_gamelog_actions - 1]; - /* There should always be a "start game" action */ - assert(_gamelog_actions > 0); - - do { - const LoggedChange *lc = &la->change[la->changes - 1]; - /* There should always be at least one change per action */ - assert(la->changes > 0); - - do { - if (lc->ct == GLCT_GRFADD && lc->grfadd.grfid == grfid) { - memcpy(md5sum, lc->grfadd.md5sum, sizeof(lc->grfadd.md5sum)); - return; - } - } while (lc-- != la->change); - } while (la-- != _gamelog_action); - - NOT_REACHED(); -} |