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
11CXX_GUARD_START
12
13#include "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 struct VFile* previousState;
23 struct VFile* currentState;
24};
25
26void mCoreRewindContextInit(struct mCoreRewindContext*, size_t entries);
27void mCoreRewindContextDeinit(struct mCoreRewindContext*);
28
29struct mCore;
30void mCoreRewindAppend(struct mCoreRewindContext*, struct mCore*);
31bool mCoreRewindRestore(struct mCoreRewindContext*, struct mCore*);
32
33CXX_GUARD_END
34
35#endif