summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emu.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
commit4f7efb1ca4bcf00edd9e519167367f44d797186c (patch)
treec9ee8aae0bc80942f118df4df24d9054504b9ad9 /src/emu/emu.h
parentf4f3adf2506ce7808363593436de5b13bb304d47 (diff)
Moved the state saving system to C++. For now the registration macros
are still intact. The new state_manager class has templatized methods for saving the various types, and through template specialization can save more complex system types cleanly (like bitmaps and attotimes). Added new mechanism to detect proper state save types. This is much more strict and there will likely be some games/devices that fatalerror at startup until they are remedied. Spot checking has caught the more common situations. The new state_manager is embedded directly in the running_machine, allowing objects to register state saving in their constructors now. Added NAME() macro which is a generalization of FUNC() and can be used to wrap variables that are registered when directly using the new methods as opposed to the previous macros. For example: machine->state().save_item(NAME(global_item)) Added methods in the device_t class that implicitly register state against the current device, making for a cleaner interface. Just a couple of required regexes for now: state_save_register_postload( *)\(( *)([^,;]+), * \3->state().register_postload\1\(\2 state_save_register_presave( *)\(( *)([^,;]+), * \3->state().register_presave\1\(\2
Diffstat (limited to 'src/emu/emu.h')
-rw-r--r--src/emu/emu.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/emu.h b/src/emu/emu.h
index 8659d2ce5b0..9cb34fbe1cf 100644
--- a/src/emu/emu.h
+++ b/src/emu/emu.h
@@ -70,6 +70,10 @@
#include "memory.h"
#include "addrmap.h"
+// machine-wide utilities
+#include "romload.h"
+#include "state.h"
+
// define machine_config_constructor here due to circular dependency
// between devices and the machine config
class machine_config;
@@ -103,10 +107,6 @@ typedef device_config * (*machine_config_constructor)(machine_config &config, de
#include "mconfig.h"
#include "driver.h"
-// machine-wide utilities
-#include "romload.h"
-#include "state.h"
-
// image-related
#include "softlist.h"
#include "image.h"