00001
00002 #ifndef REGISTRY_H
00003 #define REGISTRY_H
00004
00005 #include "main.h"
00006 #include "level.h"
00007
00008
00009
00010 #define REGISTRY_SECURITY_CHECK 0
00011 #define REGISTRY_ROOT HKEY_LOCAL_MACHINE
00012 #define REGISTRY_KEY "software\\Acclaim\\Revolt"
00013
00014 #define GET_REGISTRY_VALUE(_key, _reg, _buf, _size) \
00015 { \
00016 DWORD _s = (_size); \
00017 RegQueryValueEx((_key), (_reg), 0, NULL, (unsigned char*)(_buf), &_s); \
00018 }
00019
00020 #define SET_REGISTRY_VALUE(_key, _reg, _type, _buf, _size) \
00021 { \
00022 RegSetValueEx((_key), (_reg), 0, (_type), (unsigned char*)(_buf), (_size)); \
00023 }
00024
00025 typedef struct {
00026 DWORD EnvFlag, MirrorFlag, AutoBrake, ShadowFlag;
00027 DWORD LightFlag, InstanceFlag, SkidFlag, CarID;
00028 DWORD ScreenWidth, ScreenHeight, ScreenBpp, DrawDevice;
00029 DWORD Brightness, Contrast, TextureBpp;
00030 char PlayerName[MAX_PLAYER_NAME];
00031 char LevelDir[MAX_LEVEL_DIR_NAME];
00032 } REGISTRY_SETTINGS;
00033
00034
00035
00036 extern void GetRegistrySettings(void);
00037 extern void SetRegistrySettings(void);
00038
00039
00040
00041 extern REGISTRY_SETTINGS RegistrySettings;
00042
00043 #endif