#include "./bitio.h"
#include "./MD5.h"
+#include "./os.h"
// internal constants
int swf_SetU30(TAG*tag, U32 u)
{
- if(u&0x80000000) {
- fprintf(stderr, "Error: Bit 31 set in U30 value\n");
- u&=0x7fffffff;
- }
int nr = 0;
do {
if(tag)
}
#endif
-int swf_SetU30String(TAG*tag, const char*str)
+int swf_SetU30String(TAG*tag, const char*str, int l)
{
- int l = strlen(str);
int len=0;
len+=swf_SetU30(tag, l);
len+=l;
return swf_ReadSWF2(&reader, swf);
}
+void swf_ReadABCfile(char*filename, SWF*swf)
+{
+ memset(swf, 0, sizeof(SWF));
+ swf->fileVersion=9;
+ swf->fileAttributes=1; //as3
+ TAG*tag = swf->firstTag = swf_InsertTag(0, ST_RAWABC);
+ memfile_t*file = memfile_open(filename);
+ swf_SetBlock(tag, file->data, file->len);
+ memfile_close(file);
+}
+
int no_extra_tags = 0;
int WriteExtraTags(SWF*swf, writer_t*writer)