diff options
Diffstat (limited to 'trunk/src/emu/config.h')
-rw-r--r-- | trunk/src/emu/config.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/trunk/src/emu/config.h b/trunk/src/emu/config.h new file mode 100644 index 00000000000..e94b0bfbb2f --- /dev/null +++ b/trunk/src/emu/config.h @@ -0,0 +1,61 @@ +/*************************************************************************** + + config.h + + Wrappers for handling MAME configuration files + + Copyright Nicola Salmoria and the MAME Team. + Visit http://mamedev.org for licensing and usage restrictions. + +***************************************************************************/ + +#pragma once + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#include "xmlfile.h" + + + +/************************************* + * + * Constants + * + *************************************/ + +#define CONFIG_VERSION 10 + +enum +{ + CONFIG_TYPE_INIT = 0, /* opportunity to initialize things first */ + CONFIG_TYPE_CONTROLLER, /* loading from controller file */ + CONFIG_TYPE_DEFAULT, /* loading from default.cfg */ + CONFIG_TYPE_GAME, /* loading from game.cfg */ + CONFIG_TYPE_FINAL /* opportunity to finish initialization */ +}; + + + +/************************************* + * + * Type definitions + * + *************************************/ + +typedef delegate<void (int, xml_data_node *)> config_saveload_delegate; + + + +/************************************* + * + * Function prototypes + * + *************************************/ + +void config_init(running_machine &machine); +void config_register(running_machine &machine, const char *nodename, config_saveload_delegate load, config_saveload_delegate save); +int config_load_settings(running_machine &machine); +void config_save_settings(running_machine &machine); + +#endif /* __CONFIG_H__ */ |