all repos — mgba @ ea1c8573513942483b51e98e80e8c76ccf90c1cc

mGBA Game Boy Advance Emulator

include/mgba/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 <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba-util/vector.h>
14
15DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast);
16
17struct VFile;
18struct mCoreRewindContext {
19	struct mCoreRewindPatches patchMemory;
20	size_t current;
21	size_t size;
22	int stateFlags;
23	struct VFile* previousState;
24	struct VFile* currentState;
25};
26
27void mCoreRewindContextInit(struct mCoreRewindContext*, size_t entries);
28void mCoreRewindContextDeinit(struct mCoreRewindContext*);
29
30struct mCore;
31void mCoreRewindAppend(struct mCoreRewindContext*, struct mCore*);
32bool mCoreRewindRestore(struct mCoreRewindContext*, struct mCore*);
33
34CXX_GUARD_END
35
36#endif