mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
State saving progress. Most core state seems to be saved/loaded correctly, not so for video yet unfortunately.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@386 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -18,6 +18,15 @@
|
||||
#ifndef _POINTERWRAP_H
|
||||
#define _POINTERWRAP_H
|
||||
|
||||
// Extremely simple serialization framework.
|
||||
|
||||
// (mis)-features:
|
||||
// + Super fast
|
||||
// + Very simple
|
||||
// + Same code is used for serialization and deserializaition (in most cases)
|
||||
// - Zero backwards/forwards compatibility
|
||||
// - Serialization code for anything complex has to be manually written.
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <map>
|
||||
@ -25,6 +34,13 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
template <class T>
|
||||
struct LinkedListItem : public T
|
||||
{
|
||||
LinkedListItem<T> *next;
|
||||
};
|
||||
|
||||
|
||||
class PointerWrap
|
||||
{
|
||||
public:
|
||||
@ -61,10 +77,14 @@ public:
|
||||
// Store maps to file. Very useful.
|
||||
template<class T>
|
||||
void Do(std::map<unsigned int, T> &x) {
|
||||
// TODO
|
||||
PanicAlert("Do(map<>) does not yet work.");
|
||||
}
|
||||
|
||||
// Store vectors.
|
||||
template<class T>
|
||||
void Do(std::vector<T> &x) {
|
||||
// TODO
|
||||
PanicAlert("Do(vector<>) does not yet work.");
|
||||
}
|
||||
|
||||
@ -76,6 +96,12 @@ public:
|
||||
template<class T>
|
||||
void Do(T &x) {
|
||||
DoVoid((void *)&x, sizeof(x));
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void DoLinkedList(LinkedListItem<T> **list_start) {
|
||||
// TODO
|
||||
PanicAlert("Do(vector<>) does not yet work.");
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user