summaryrefslogtreecommitdiff
path: root/src/deh_main.c
diff options
context:
space:
mode:
authorSimon Howard2006-10-05 22:12:22 +0000
committerSimon Howard2006-10-05 22:12:22 +0000
commitd2b34da108fae24c9c70ab00aa261cc9648018c3 (patch)
tree3ca5729fedc3f44462051fed4e4c7580a799ed2a /src/deh_main.c
parent09180d3f73e522c1e0c43993aec28cf339dcf74d (diff)
downloadchocolate-doom-d2b34da108fae24c9c70ab00aa261cc9648018c3.tar.gz
chocolate-doom-d2b34da108fae24c9c70ab00aa261cc9648018c3.tar.bz2
chocolate-doom-d2b34da108fae24c9c70ab00aa261cc9648018c3.zip
Dehacked information checksum generation
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 687
Diffstat (limited to 'src/deh_main.c')
-rw-r--r--src/deh_main.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/deh_main.c b/src/deh_main.c
index b3e77426..b7c59316 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: deh_main.c 641 2006-09-21 11:13:28Z rtc_marine $
+// $Id: deh_main.c 687 2006-10-05 22:12:22Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -113,6 +113,24 @@ static deh_section_t *section_types[] =
static int num_section_types = sizeof(section_types) / sizeof(*section_types);
+void DEH_Checksum(byte digest[16])
+{
+ md5_context_t md5_context;
+ int i;
+
+ MD5_Init(&md5_context);
+
+ for (i=0; i<num_section_types; ++i)
+ {
+ if (section_types[i]->md5_hash != NULL)
+ {
+ section_types[i]->md5_hash(&md5_context);
+ }
+ }
+
+ MD5_Final(digest, &md5_context);
+}
+
// Called on startup to call the Init functions
static void InitialiseSections(void)