From f17df9538b1c3f58f12b738083b747ac332b8d71 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Sat, 4 Jul 2026 22:34:17 +0530 Subject: the setoption now changes state i can now finally start working on how the non existant engine will interact with uci --- src/uci/state.h | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'src/uci/state.h') diff --git a/src/uci/state.h b/src/uci/state.h index 98b42dd..fd24b7e 100644 --- a/src/uci/state.h +++ b/src/uci/state.h @@ -8,10 +8,7 @@ typedef struct { typedef bool check_t; typedef int spin_t; -typedef struct { - str_t* combinations; - int chosen_option; -} combo_t; +typedef int combo_t; // the button isn't actually a value thing // it's more like an event. // so we parse a button type, we set this to true, handle it @@ -38,35 +35,50 @@ typedef struct { bool check_default; const char* string_default; } data; + union { + combo_t *combo; + spin_t *spin; + check_t *check; + str_t *string; + button_t *button; + } value; } option_setting_t; option_setting_t option_setting_combo( char* option_name, char** combinations, int combinations_count, - int default_index + int default_index, + combo_t *combo ); option_setting_t option_setting_spin( const char* option_name, int min, int max, - int default_value + int default_value, + spin_t *spin ); option_setting_t option_setting_check( const char* option_name, - bool default_value + bool default_value, + check_t *check ); option_setting_t option_setting_string( const char* option_name, - const char* default_value + const char* default_value, + str_t *string +); +option_setting_t option_setting_button( + const char* option_name, + button_t *button ); -option_setting_t option_setting_button(const char* option_name); typedef struct { char name[32]; char author[32]; + bool debug; - option_setting_t option_settings[10]; + option_setting_t option_settings[11]; // options spin_t threads; -- cgit v1.2.3