Scripting: Expose MD5 checksum

This commit is contained in:
Vicki Pfau 2024-12-31 17:04:52 -08:00
parent 39ced7dd81
commit 9f5c2aa00c
2 changed files with 4 additions and 0 deletions

View File

@ -350,6 +350,9 @@ static struct mScriptValue* _mScriptCoreChecksum(const struct mCore* core, int t
case mCHECKSUM_CRC32:
size = 4;
break;
case mCHECKSUM_MD5:
size = 16;
break;
}
if (!size) {
return &mScriptValueNull;

View File

@ -130,6 +130,7 @@ void mScriptContextAttachStdlib(struct mScriptContext* context) {
});
mScriptContextExportConstants(context, "CHECKSUM", (struct mScriptKVPair[]) {
mSCRIPT_CONSTANT_PAIR(mCHECKSUM, CRC32),
mSCRIPT_CONSTANT_PAIR(mCHECKSUM, MD5),
mSCRIPT_KV_SENTINEL
});
#ifdef M_CORE_GBA