mgba/include/mgba-util/patch.h

27 lines
620 B
C
Raw Normal View History

/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2014-07-07 06:39:27 +00:00
#ifndef PATCH_H
#define PATCH_H
#include <mgba-util/common.h>
2014-07-07 06:39:27 +00:00
2016-12-27 05:01:55 +00:00
CXX_GUARD_START
struct VFile;
2014-07-07 06:39:27 +00:00
struct Patch {
struct VFile* vf;
2014-07-07 06:39:27 +00:00
size_t (*outputSize)(struct Patch* patch, size_t inSize);
2016-08-29 03:36:52 +00:00
bool (*applyPatch)(struct Patch* patch, const void* in, size_t inSize, void* out, size_t outSize);
2014-07-07 06:39:27 +00:00
};
bool loadPatch(struct VFile* vf, struct Patch* patch);
2014-07-07 06:39:27 +00:00
2016-12-27 05:01:55 +00:00
CXX_GUARD_END
2014-07-07 06:39:27 +00:00
#endif