SpaceCadetPinball/SpaceCadetPinball/options.h

54 lines
1.3 KiB
C
Raw Normal View History

2020-11-05 16:44:34 +01:00
#pragma once
2020-12-13 14:05:19 +01:00
#include "pinball.h"
2020-11-06 14:56:32 +01:00
struct optionsStruct
2020-11-06 14:56:32 +01:00
{
int Sounds;
int Music;
int Average;
int FullScreen;
int Players;
int LeftFlipperKey;
int RightFlipperKey;
int PlungerKey;
int LeftTableBumpKey;
int RightTableBumpKey;
int BottomTableBumpKey;
2020-12-13 14:05:19 +01:00
int LeftFlipperKeyDft;
int RightFlipperKeyDft;
int PlungerKeyDft;
int LeftTableBumpKeyDft;
int RightTableBumpKeyDft;
int BottomTableBumpKeyDft;
int Resolution;
2021-02-09 16:09:44 +01:00
bool UniformScaling;
2020-11-06 14:56:32 +01:00
};
2020-11-05 16:44:34 +01:00
class options
{
public:
static void init();
static void uninit();
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 dst, LPCSTR defaultValue, int iMaxLength);
2020-11-05 16:44:34 +01:00
static void set_string(LPCSTR optPath, LPCSTR lpValueName, LPCSTR value);
static void toggle(uint32_t uIDCheckItem);
static void update_resolution_menu();
static void init_resolution();
2020-12-13 14:05:19 +01:00
2020-12-02 18:12:34 +01:00
static void keyboard();
2020-11-06 14:56:32 +01:00
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-12-13 14:05:19 +01:00
static winhelp_entry keymap_help[18];
static short vk_list[28];
2020-11-05 16:44:34 +01:00
};