2020-11-05 16:44:34 +01:00
|
|
|
#pragma once
|
2020-12-13 14:05:19 +01:00
|
|
|
#include "pinball.h"
|
2021-10-24 17:23:46 +02:00
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
enum class Languages
|
|
|
|
{
|
|
|
|
English = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
|
2021-10-30 15:50:49 +02:00
|
|
|
Russian = MAKELANGID(LANG_RUSSIAN, SUBLANG_RUSSIAN_RUSSIA),
|
2021-10-25 16:30:39 +02:00
|
|
|
TraditionalChinese = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL),
|
|
|
|
SimplifiedChinese = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED),
|
2021-10-27 08:22:53 +02:00
|
|
|
Polish = MAKELANGID(LANG_POLISH, SUBLANG_POLISH_POLAND),
|
2021-10-28 07:56:49 +02:00
|
|
|
German = MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN),
|
2021-10-28 08:56:14 +02:00
|
|
|
Japanese = MAKELANGID(LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN),
|
2021-10-28 10:41:30 +02:00
|
|
|
French = MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH),
|
2021-10-28 17:17:36 +02:00
|
|
|
Italian = MAKELANGID(LANG_ITALIAN, SUBLANG_ITALIAN),
|
2021-10-29 09:47:17 +02:00
|
|
|
Hungarian = MAKELANGID(LANG_HUNGARIAN, SUBLANG_HUNGARIAN_HUNGARY),
|
2021-11-02 12:04:25 +01:00
|
|
|
Portuguese = MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE),
|
2021-10-29 16:25:26 +02:00
|
|
|
BrazilianPortuguese = MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN),
|
2021-10-29 16:33:09 +02:00
|
|
|
Czech = MAKELANGID(LANG_CZECH, SUBLANG_CZECH_CZECH_REPUBLIC),
|
2021-10-29 16:40:02 +02:00
|
|
|
Danish = MAKELANGID(LANG_DANISH, SUBLANG_DANISH_DENMARK),
|
2021-10-30 15:50:49 +02:00
|
|
|
Finnish = MAKELANGID(LANG_FINNISH, SUBLANG_FINNISH_FINLAND),
|
2021-10-31 11:18:21 +01:00
|
|
|
Hebrew = MAKELANGID(LANG_HEBREW, SUBLANG_HEBREW_ISRAEL),
|
2021-10-31 15:25:24 +01:00
|
|
|
Arabic = MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_SAUDI_ARABIA),
|
|
|
|
Greek = MAKELANGID(LANG_GREEK, SUBLANG_GREEK_GREECE),
|
2021-10-31 15:35:41 +01:00
|
|
|
Spanish = MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN),
|
2021-10-31 16:29:41 +01:00
|
|
|
Korean = MAKELANGID(LANG_KOREAN, SUBLANG_KOREAN),
|
2021-11-01 09:09:13 +01:00
|
|
|
Dutch = MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH),
|
2021-11-01 10:21:50 +01:00
|
|
|
Norwegian = MAKELANGID(LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL),
|
2021-11-02 12:24:47 +01:00
|
|
|
Swedish = MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH),
|
2021-11-02 13:33:22 +01:00
|
|
|
Turkish = MAKELANGID(LANG_TURKISH, SUBLANG_TURKISH_TURKEY),
|
2021-10-24 17:23:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct LanguageMenuEntry
|
|
|
|
{
|
|
|
|
LPCWSTR Name;
|
|
|
|
Languages Language;
|
|
|
|
};
|
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;
|
2021-10-24 17:23:46 +02:00
|
|
|
Languages Language;
|
2020-11-06 14:56:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-11-05 16:44:34 +01:00
|
|
|
class options
|
|
|
|
{
|
|
|
|
public:
|
2021-10-24 17:23:46 +02:00
|
|
|
static void ReadOptions();
|
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-10-28 09:58:19 +02:00
|
|
|
static LPWSTR get_vk_key_name(uint16_t vk, LPWSTR 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];
|
2021-10-24 17:23:46 +02:00
|
|
|
static LanguageMenuEntry LanguageMenu[Menu1_LanguageMax - Menu1_Language];
|
2020-11-05 16:44:34 +01:00
|
|
|
};
|