2020-10-13 09:20:52 +02:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#include <windows.h>
|
2023-10-17 18:13:35 +02:00
|
|
|
#include "ini.h"
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2023-10-14 05:00:27 +02:00
|
|
|
#define FILE_EXISTS(a) (GetFileAttributes(a) != INVALID_FILE_ATTRIBUTES)
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
typedef struct CNCDDRAWCONFIG
|
2020-10-13 09:20:52 +02:00
|
|
|
{
|
|
|
|
RECT window_rect;
|
|
|
|
int window_state;
|
2023-11-14 17:16:23 +01:00
|
|
|
int upscaled_state;
|
2020-10-13 09:20:52 +02:00
|
|
|
char ini_path[MAX_PATH];
|
2021-09-09 21:32:54 +02:00
|
|
|
char game_path[MAX_PATH];
|
2024-02-16 22:55:17 +05:00
|
|
|
char dll_path[MAX_PATH];
|
2021-09-09 21:32:54 +02:00
|
|
|
char process_file_name[MAX_PATH];
|
2024-02-16 22:55:17 +05:00
|
|
|
char dll_file_name[MAX_PATH];
|
2022-09-08 04:20:51 +02:00
|
|
|
char process_file_ext[MAX_PATH];
|
2024-02-16 22:55:17 +05:00
|
|
|
char dll_file_ext[MAX_PATH];
|
2024-06-01 07:29:48 +02:00
|
|
|
char game_section[MAX_PATH];
|
2023-10-17 18:13:35 +02:00
|
|
|
INIFILE ini;
|
2024-03-11 17:48:27 +01:00
|
|
|
BOOL d3d9on12;
|
|
|
|
BOOL opengl_core;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Optional settings */
|
|
|
|
|
|
|
|
BOOL fullscreen;
|
|
|
|
BOOL windowed;
|
|
|
|
BOOL maintas;
|
|
|
|
BOOL boxing;
|
|
|
|
int maxfps;
|
|
|
|
BOOL vsync;
|
|
|
|
BOOL adjmouse;
|
|
|
|
char shader[MAX_PATH];
|
|
|
|
char renderer[256];
|
|
|
|
BOOL devmode;
|
|
|
|
BOOL border;
|
2020-10-13 09:20:52 +02:00
|
|
|
int save_settings;
|
2023-09-22 00:38:42 +02:00
|
|
|
BOOL resizable;
|
|
|
|
int d3d9_filter;
|
|
|
|
BOOL vhack;
|
|
|
|
char screenshot_dir[MAX_PATH];
|
|
|
|
BOOL toggle_borderless;
|
2023-11-14 17:16:23 +01:00
|
|
|
BOOL toggle_upscaled;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Compatibility settings */
|
|
|
|
|
|
|
|
BOOL noactivateapp;
|
|
|
|
int maxgameticks;
|
2024-05-31 21:43:33 +02:00
|
|
|
int limiter_type;
|
2023-09-23 17:48:06 +02:00
|
|
|
int minfps;
|
2023-09-22 00:38:42 +02:00
|
|
|
BOOL nonexclusive;
|
|
|
|
BOOL singlecpu;
|
|
|
|
int resolutions;
|
|
|
|
int fixchilds;
|
|
|
|
BOOL hook_peekmessage;
|
2023-10-07 09:03:11 +02:00
|
|
|
BOOL hook_getmessage;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Undocumented settings */
|
|
|
|
|
|
|
|
BOOL releasealt;
|
|
|
|
BOOL fixnotresponding;
|
|
|
|
int hook;
|
|
|
|
int guard_lines;
|
|
|
|
int max_resolutions;
|
|
|
|
BOOL lock_surfaces;
|
|
|
|
BOOL allow_wmactivate;
|
|
|
|
BOOL flipclear;
|
|
|
|
BOOL fixmousehook;
|
|
|
|
BOOL rgb555;
|
|
|
|
BOOL no_dinput_hook;
|
|
|
|
int refresh_rate;
|
|
|
|
int anti_aliased_fonts_min_size;
|
|
|
|
int custom_width;
|
|
|
|
int custom_height;
|
|
|
|
int min_font_size;
|
2023-10-16 01:02:42 +02:00
|
|
|
BOOL direct3d_passthrough;
|
2024-05-12 21:35:28 +02:00
|
|
|
BOOL center_cursor_fix;
|
2024-05-22 23:23:27 +02:00
|
|
|
char fake_mode[128];
|
2024-05-24 02:26:46 +02:00
|
|
|
BOOL wine_allow_resize;
|
2024-05-29 06:16:57 +02:00
|
|
|
BOOL lock_mouse_top_left;
|
2024-05-30 07:20:44 +02:00
|
|
|
BOOL no_compat_warning;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Hotkeys */
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int toggle_fullscreen;
|
|
|
|
int toggle_maximize;
|
|
|
|
int unlock_cursor1;
|
|
|
|
int unlock_cursor2;
|
|
|
|
int screenshot;
|
|
|
|
} hotkeys;
|
|
|
|
|
|
|
|
/* Game specific settings */
|
|
|
|
|
|
|
|
BOOL remove_menu;
|
|
|
|
|
|
|
|
BOOL armadahack;
|
|
|
|
BOOL tshack;
|
|
|
|
BOOL infantryhack;
|
|
|
|
BOOL stronghold_hack;
|
|
|
|
BOOL mgs_hack;
|
2024-05-31 04:55:55 +02:00
|
|
|
BOOL tlc_hack;
|
2024-06-12 02:47:31 +02:00
|
|
|
BOOL homm_hack;
|
2024-07-03 04:24:27 +02:00
|
|
|
BOOL carma95_hack;
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
} CNCDDRAWCONFIG;
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
extern CNCDDRAWCONFIG g_config;
|
2020-10-13 09:20:52 +02:00
|
|
|
|
|
|
|
void cfg_load();
|
|
|
|
void cfg_save();
|
|
|
|
|
|
|
|
#endif
|