all repos — mgba @ 4c38f769565e8ddd7d3a8eef1a41975206c129a0

mGBA Game Boy Advance Emulator

src/core/rewind.h (view raw)

 1/* Copyright (c) 2013-2016 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 M_CORE_REWIND_H
 7#define M_CORE_REWIND_H
 8
 9#include "util/common.h"
10
11#include "util/vector.h"
12
13DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast);
14
15struct VFile;
16struct mCoreRewindContext {
17	struct mCoreRewindPatches patchMemory;
18	size_t current;
19	size_t size;
20	struct VFile* previousState;
21	struct VFile* currentState;
22};
23
24void mCoreRewindContextInit(struct mCoreRewindContext*, size_t entries);
25void mCoreRewindContextDeinit(struct mCoreRewindContext*);
26
27struct mCore;
28void mCoreRewindAppend(struct mCoreRewindContext*, struct mCore*);
29bool mCoreRewindRestore(struct mCoreRewindContext*, struct mCore*);
30
31#endif