all repos — mgba @ 90edf4d1a085f8611822a8eaa98f063704ab00fb

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
11struct VFile;
12
13struct Patch {
14	struct VFile* vf;
15
16	size_t (*outputSize)(struct Patch* patch, size_t inSize);
17	bool (*applyPatch)(struct Patch* patch, void* in, size_t inSize, void* out, size_t outSize);
18};
19
20bool loadPatch(struct VFile* vf, struct Patch* patch);
21
22#endif