SpaceCadetPinball/SpaceCadetPinball/options.h

46 lines
1.1 KiB
C
Raw Normal View History

2020-11-05 16:44:34 +01:00
#pragma once
2020-11-06 14:56:32 +01:00
struct __declspec(align(4)) optionsStruct
{
int Sounds;
int Music;
int Average;
int FullScreen;
int PriorityAdj;
int Players;
int LeftFlipperKey;
int RightFlipperKey;
int PlungerKey;
int LeftTableBumpKey;
int RightTableBumpKey;
int BottomTableBumpKey;
int LeftFlipperKey2;
int RightFlipperKey2;
int PlungerKey2;
int LeftTableBumpKey2;
int RightTableBumpKey2;
int BottomTableBumpKey2;
};
2020-11-05 16:44:34 +01:00
class options
{
public:
2020-11-06 14:56:32 +01:00
static void init(HMENU menuHandle);
2020-11-05 16:44:34 +01:00
static void path_init(LPCSTR regPath);
static void path_uninit();
static int get_int(LPCSTR optPath, LPCSTR lpValueName, int defaultValue);
static void set_int(LPCSTR optPath, LPCSTR lpValueName, int data);
static void get_string(LPCSTR optPath, LPCSTR lpValueName, LPSTR lpString1, LPCSTR lpString2, int iMaxLength);
static void set_string(LPCSTR optPath, LPCSTR lpValueName, LPCSTR value);
2020-11-06 14:56:32 +01:00
static HMENU menu_check(UINT uIDCheckItem, int value);
static optionsStruct Options;
2020-11-05 16:44:34 +01:00
private:
static LPCSTR OptionsRegPath;
static LPSTR OptionsRegPathCur;
static LPCSTR path(LPCSTR regPath);
static void path_free();
2020-11-06 14:56:32 +01:00
static HMENU MenuHandle;
2020-11-05 16:44:34 +01:00
};