- export 'GetChecksum' as part of FLevelLocals in ZScript

This commit is contained in:
Rachael Alexanderson 2018-01-06 19:59:49 -05:00
commit 9fd78e90ad
2 changed files with 15 additions and 0 deletions

View file

@ -116,6 +116,7 @@
#include "events.h"
#include "types.h"
#include "i_time.h"
#include "scripting/vm/vm.h"
#include "fragglescript/t_fs.h"
@ -552,6 +553,18 @@ void MapData::GetChecksum(uint8_t cksum[16])
md5.Final(cksum);
}
DEFINE_ACTION_FUNCTION(FLevelLocals, GetChecksum)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
char md5string[33];
for(int j = 0; j < 16; ++j)
{
sprintf(md5string + j * 2, "%02x", level.md5[j]);
}
ACTION_RETURN_STRING((const char*)md5string);
}
//===========================================================================
//