summaryrefslogtreecommitdiff
path: root/lib/as3/scripts.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/as3/scripts.c')
-rw-r--r--lib/as3/scripts.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/as3/scripts.c b/lib/as3/scripts.c
index 57b2da1a..5cd5db80 100644
--- a/lib/as3/scripts.c
+++ b/lib/as3/scripts.c
@@ -23,7 +23,6 @@
#include <time.h>
#include "abc.h"
-#include "../MD5.h"
void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events)
{
@@ -31,27 +30,21 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events)
int has_buttons = 0;
TAG*tag=swf->firstTag;
- void*md5 = initialize_md5();
-
+ unsigned int checksum = 0;
while(tag) {
if(tag->id == ST_SHOWFRAME)
num_frames++;
if(tag->id == ST_DEFINEBUTTON || tag->id == ST_DEFINEBUTTON2)
has_buttons = 1;
- update_md5(md5, tag->data, tag->len);
+ crc32_add_bytes(checksum, tag->data, tag->len);
tag = tag->next;
}
int t = time(0);
- update_md5(md5, (unsigned char*)&t, sizeof(t));
+ crc32_add_bytes(checksum, &t, sizeof(t));
unsigned char h[16];
unsigned char file_signature[33];
- finish_md5(md5, h);
- sprintf((char*)file_signature, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- h[0],h[1],h[2],h[3],
- h[4],h[5],h[6],h[7],
- h[8],h[9],h[10],h[11],
- h[12],h[13],h[14],h[15]);
+ sprintf((char*)file_signature, "%x", checksum);
char scenename1[80], scenename2[80];
sprintf(scenename1, "rfx.MainTimeline_%s", file_signature);