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
|
|
|
|
2021-01-29 14:42:05 +01:00
|
|
|
struct optionsStruct
|
2020-11-06 14:56:32 +01:00
|
|
|
{
|
|
|
|
int Sounds;
|
|
|
|
int Music;
|
|
|
|
int Average;
|
|
|
|
int FullScreen;
|
|
|
|
int PriorityAdj;
|
|
|
|
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;
|
2021-02-06 14:53:47 +01:00
|
|
|
int Resolution;
|
2021-02-09 16:09:44 +01:00
|
|
|
bool UniformScaling;
|
2021-10-12 15:30:20 +02:00
|
|
|
bool AlternativeRender;
|
2020-11-06 14:56:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
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-12-04 16:35:47 +01:00
|
|
|
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);
|
2021-02-16 17:03:45 +01:00
|
|
|
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);
|
2020-12-02 18:12:34 +01:00
|
|
|
static void menu_check(UINT uIDCheckItem, int check);
|
|
|
|
static void menu_set(UINT uIDEnableItem, int enable);
|
|
|
|
static void toggle(UINT uIDCheckItem);
|
2021-02-06 14:53:47 +01:00
|
|
|
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();
|
|
|
|
static INT_PTR _stdcall KeyMapDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
2021-02-16 17:03:45 +01:00
|
|
|
static LPSTR get_vk_key_name(uint16_t vk, LPSTR keyName);
|
2020-12-02 18:12:34 +01:00
|
|
|
|
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-11-06 14:56:32 +01:00
|
|
|
static HMENU MenuHandle;
|
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
|
|
|
};
|