all repos — mgba @ 2f1cb61d0197893cf0c3861e9130ff1aeaefb0b0

mGBA Game Boy Advance Emulator

src/util/patch.h (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef PATCH_H
 7#define PATCH_H
 8
 9#include "util/common.h"
10
11CXX_GUARD_START
12
13struct VFile;
14
15struct Patch {
16	struct VFile* vf;
17
18	size_t (*outputSize)(struct Patch* patch, size_t inSize);
19	bool (*applyPatch)(struct Patch* patch, const void* in, size_t inSize, void* out, size_t outSize);
20};
21
22bool loadPatch(struct VFile* vf, struct Patch* patch);
23
24CXX_GUARD_END
25
26#endif