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;
|
2024-11-29 17:04:12 +01:00
|
|
|
|
2023-09-22 00:38:42 +02:00
|
|
|
/* Optional settings */
|
|
|
|
|
|
|
|
BOOL fullscreen;
|
|
|
|
BOOL windowed;
|
|
|
|
BOOL maintas;
|
2024-08-15 10:16:20 +02:00
|
|
|
char aspect_ratio[16];
|
2024-08-16 07:51:05 +02:00
|
|
|
BOOL boxing;
|
2023-09-22 00:38:42 +02:00
|
|
|
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;
|
2024-09-09 19:41:46 +02:00
|
|
|
int anti_aliased_fonts_min_size;
|
|
|
|
int min_font_size;
|
2024-09-26 19:55:06 +02:00
|
|
|
int center_window;
|
2024-10-03 14:13:59 +02:00
|
|
|
char inject_resolution[128];
|
2023-09-22 00:38:42 +02:00
|
|
|
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;
|
2024-09-10 15:41:04 +02:00
|
|
|
BOOL hook_peekmessage;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Undocumented settings */
|
|
|
|
|
2024-09-12 18:11:08 +02:00
|
|
|
BOOL fix_alt_key_stuck;
|
|
|
|
BOOL fix_not_responding;
|
|
|
|
BOOL no_compat_warning;
|
2023-09-22 00:38:42 +02:00
|
|
|
int guard_lines;
|
|
|
|
int max_resolutions;
|
|
|
|
BOOL lock_surfaces;
|
|
|
|
BOOL flipclear;
|
|
|
|
BOOL rgb555;
|
|
|
|
BOOL no_dinput_hook;
|
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-29 06:16:57 +02:00
|
|
|
BOOL lock_mouse_top_left;
|
2024-09-03 18:20:20 +02:00
|
|
|
char win_version[32];
|
2024-09-12 18:11:08 +02:00
|
|
|
int hook;
|
2024-10-18 18:42:46 +02:00
|
|
|
BOOL limit_gdi_handles;
|
2024-09-12 18:11:08 +02:00
|
|
|
BOOL remove_menu;
|
|
|
|
int refresh_rate;
|
2025-01-02 01:22:03 +01:00
|
|
|
int terminate_process;
|
2023-09-22 00:38:42 +02:00
|
|
|
|
|
|
|
/* Hotkeys */
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int toggle_fullscreen;
|
2024-10-12 01:24:07 +02:00
|
|
|
int toggle_fullscreen2;
|
2023-09-22 00:38:42 +02:00
|
|
|
int toggle_maximize;
|
2024-10-12 01:24:07 +02:00
|
|
|
int toggle_maximize2;
|
2023-09-22 00:38:42 +02:00
|
|
|
int unlock_cursor1;
|
|
|
|
int unlock_cursor2;
|
|
|
|
int screenshot;
|
|
|
|
} hotkeys;
|
|
|
|
|
|
|
|
/* Game specific settings */
|
|
|
|
|
|
|
|
BOOL armadahack;
|
|
|
|
BOOL tshack;
|
|
|
|
BOOL infantryhack;
|
|
|
|
BOOL stronghold_hack;
|
|
|
|
BOOL mgs_hack;
|
2024-05-31 04:55:55 +02:00
|
|
|
BOOL tlc_hack;
|
2024-07-03 04:24:27 +02:00
|
|
|
BOOL carma95_hack;
|
2024-09-12 18:11:08 +02:00
|
|
|
BOOL sirtech_hack;
|
2024-09-19 17:58:35 +02:00
|
|
|
BOOL flightsim98_hack;
|
2025-01-16 05:44:12 +01:00
|
|
|
BOOL darkcolony_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
|