//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- StyleSettings::StyleSettings(const CString &name, int typeId) { font = NULL; InitDefaults(); this->name = name; this->typeId = typeId; }
void UnitStateMgr::Update(uint32 diff) { if (m_needReinit) { m_needReinit = false; InitDefaults(true); } ActionInfo* state = CurrentState(); if (!m_oldAction) m_oldAction = state->Action(); else if (m_oldAction && m_oldAction != state->Action()) { if (ActionInfo* oldAction = GetAction(m_oldAction)) { if (oldAction->HasFlag(ACTION_STATE_ACTIVE) && !oldAction->HasFlag(ACTION_STATE_FINALIZED) && !oldAction->HasFlag(ACTION_STATE_INTERRUPTED)) oldAction->Interrupt(this); } // else do nothing - action be deleted without interrupt/finalize (may be need correct?) m_oldAction = state->Action(); } if (!state->Update(this, diff)) { DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "UnitStateMgr: %s finished action %s", GetOwnerStr().c_str(), state->TypeName()); DropAction(state->priority); } }
bool CApnCamera::InitDriver( unsigned long CamIdA, unsigned short /*CamIdB*/, unsigned long /*Option*/ ) { if ( ApnUsbOpen( (unsigned short)CamIdA ) != APN_USB_SUCCESS ) { return false; } m_CameraInterface = Apn_Interface_USB; // Before trying to initialize, perform a simple loopback test unsigned short RegData; unsigned short NewRegData; RegData = 0x5AA5; if ( Write( FPGA_REG_SCRATCH, RegData ) != APN_USB_SUCCESS ) return false; if ( Read( FPGA_REG_SCRATCH, NewRegData ) != APN_USB_SUCCESS ) return false; if ( RegData != NewRegData ) return false; RegData = 0xA55A; if ( Write( FPGA_REG_SCRATCH, RegData ) != APN_USB_SUCCESS ) return false; if ( Read( FPGA_REG_SCRATCH, NewRegData ) != APN_USB_SUCCESS ) return false; if ( RegData != NewRegData ) return false; // The loopback test was successful. Proceed with initialization. if ( InitDefaults() != 0 ) return false; return true; }
CClickWindowController::CClickWindowController(CViacamController & pViacamController) { m_pViacamController= &pViacamController; // Create text window m_pWindowText= new CClickWindowText (NULL); m_pWindowText->SetController (*this); // Create bitmap window m_pWindowBitmap= new CClickWindowBitmap (NULL); m_pWindowBitmap->SetController (*this); // Create bitmap vertical window m_pWindowBitmapVertical= new CClickWindowBitmapVertical (NULL); m_pWindowBitmapVertical->SetController (*this); // Create text vertical window m_pWindowTextVertical= new CClickWindowTextVertical (NULL); m_pWindowTextVertical->SetController (*this); // Set current window m_pWindow= m_pWindowBitmap; // FIXME: implement this using the observer pattern m_pViacamController->GetMainWindow()->Connect (ID_WVIACAM, wxEVT_SHOW, wxShowEventHandler(CClickWindow::OnMainWindowShow), NULL, m_pWindow); InitDefaults(); Reset(); }
EcWii::EcWii() { bool init = true; std::string keys_path = File::GetUserPath(D_WIIUSER_IDX) + "keys.bin"; if (File::Exists(keys_path)) { File::IOFile keys_f(keys_path, "rb"); if (keys_f.IsOpen()) { if (keys_f.ReadBytes(&BootMiiKeysBin, sizeof(BootMiiKeysBin))) { init = false; INFO_LOG(WII_IPC_ES, "Successfully loaded keys.bin created by: %s", BootMiiKeysBin.creator); } else { ERROR_LOG(WII_IPC_ES, "Failed to read keys.bin, check it is the correct size of %08X bytes.", (unsigned int) sizeof(BootMiiKeysBin)); } } else { ERROR_LOG(WII_IPC_ES, "Failed to open keys.bin, maybe a permissions error or it is in use?"); } } else { ERROR_LOG(WII_IPC_ES, "%s could not be found. Using default values. We recommend you grab keys.bin from BootMii.", keys_path.c_str()); } if (init) InitDefaults(); }
CViacamController::CViacamController(void) : m_pMainWindow(NULL) , m_pCamera(NULL) , m_pCaptureThread(NULL) , m_pointerAction(NULL) , m_visionPipeline() , m_hotKeyManager(NULL) , m_configManager(NULL) , m_locale(NULL) , m_pAutostart(NULL) , m_pConfiguration(NULL) , m_pMotionCalibration(NULL) , m_wizardManager() , m_pCameraDialog(NULL) , m_wConfigurationListener(*this) , m_wCameraDialogListener(*this) , m_cameraName() , m_enabled(false) , m_enabledAtStartup(false) , m_languageId(wxLANGUAGE_DEFAULT) , m_onScreenKeyboardCommand() , m_frameRate(0) , m_motionCalibrationEnabled(false) , m_runWizardAtStartup(false) { m_locale= new wxLocale (); m_configManager= new CConfigManager(this); InitDefaults(); }
void CPreferences::LoadPreferences() { #ifdef _DEBUG MessageBox(0, "Loading preferences", "Info", 0); #endif InitDefaults(); ReadPreferences(); }
void CPreferences::LoadPreferences() { _preferences_heading = "Preferences"; InitDefaults(); ReadPreferences(); CheckForOutdatedICMConfig(); }
UnitStateMgr::UnitStateMgr(Unit* owner) : m_owner(owner), m_needReinit(false) { for (int32 i = UNIT_ACTION_IDLE; i != UNIT_ACTION_END; ++i) m_stateCounter[i] = 0; InitDefaults(true); }
TimeLogChart::TimeLogChart(wxWindow *parent, int id, const wxString& title): wxPanel(parent, id), m_title(title) { InitDefaults(); SetDoubleBuffered(true); Connect(wxEVT_PAINT, wxPaintEventHandler(TimeLogChart::OnPaint)); Connect(wxEVT_SIZE, wxSizeEventHandler(TimeLogChart::OnSize)); }
//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- StyleSettings::StyleSettings(const CString &name, int typeId, COLORREF foreground) { font = NULL; InitDefaults(); this->name = name; this->typeId = typeId; this->foreground = foreground; defaultForeground = false; }
AbbreviationPlugin::AbbreviationPlugin(IManager *manager) : IPlugin(manager) , m_topWindow(NULL) , m_config("abbreviations.conf") { m_longName = _("Abbreviation plugin"); m_shortName = wxT("abbreviation"); m_topWindow = m_mgr->GetTheApp(); EventNotifier::Get()->Connect(wxEVT_CCBOX_SELECTION_MADE, clCodeCompletionEventHandler(AbbreviationPlugin::OnAbbrevSelected), NULL, this); InitDefaults(); }
// CTOR (animName, drivable, reversible) // this construct is typically used when you want to create a one-shot task as part of a sequence // of tasks // it's different than the message-based constructor in that fDetachAnimation and fMoveHandle default to false plAvOneShotTask::plAvOneShotTask(const plString &animName, bool drivable, bool reversible, plOneShotCallbacks *callbacks) { InitDefaults(); fDrivable = drivable; fReversible = reversible; fCallbacks = callbacks; // we're going to use this sometime in the future, better ref it so someone else doesn't release it hsRefCnt_SafeRef(fCallbacks); fAnimName = animName; }
CCameraIO::CCameraIO() { InitDefaults(); m_TDI = false; m_Shutter = false; m_FilterPosition = 0; m_FilterStepPos = 0; m_WaitingforImage = false; m_WaitingforLine = false; m_WaitingforTrigger = false; m_Status = Camera_Status_Idle; m_CoolerStatus = Camera_CoolerStatus_Off; m_ExposureBinX = 0; m_ExposureBinY = 0; m_ExposureStartX = 0; m_ExposureStartY = 0; m_ExposureNumX = 0; m_ExposureNumY = 0; m_ExposureColumns = 0; m_ExposureRows = 0; m_ExposureSkipC = 0; m_ExposureSkipR = 0; m_ExposureHFlush = 0; m_ExposureVFlush = 0; m_ExposureBIC = 0; m_ExposureBIR = 0; m_ExposureAIC = 0; m_ExposureRemainingLines = 0; m_ExposureAIR = 0; m_RegShadow[ Reg_Command ] = 0; m_RegShadow[ Reg_Timer ] = 0; m_RegShadow[ Reg_VBinning ] = 0; m_RegShadow[ Reg_AICCounter ] = 0; m_RegShadow[ Reg_TempSetPoint ] = 0; m_RegShadow[ Reg_PixelCounter ] = 0; m_RegShadow[ Reg_LineCounter ] = 0; m_RegShadow[ Reg_BICCounter ] = 0; m_FastShutterBits_Mode = 0; m_FastShutterBits_Test = 0; m_IRQMask = 0; saveIRQS = 0; }
// CTOR (plAvOneShotMsg, plArmatureMod) // this constructor is typically used when we're doing a classic, isolated one-shot // fDetachAnimation and fMoveHandle both default to *true* plAvOneShotTask::plAvOneShotTask (plAvOneShotMsg *msg, plArmatureMod *avatar, plArmatureBrain *brain) { InitDefaults(); fDrivable = msg->fDrivable; fReversible = msg->fReversible; fCallbacks = msg->fCallbacks; fDetachAnimation = true; fMoveHandle = true; // we're going to use this sometime in the future, better ref it so someone else doesn't release it hsRefCnt_SafeRef(fCallbacks); fAnimName = msg->fAnimName; }
CPointerAction::CPointerAction() : m_enabled(false) { m_pClickSound= new wxSound (eviacam::GetDataDir() + _T("/click.wav")); m_pLeftUpClickSound= new wxSound (eviacam::GetDataDir() + _T("/click2.wav")); #if defined(__WXGTK__) m_pMouseControl= new CMouseControl ((void *) wxGetDisplay()); #else m_pMouseControl= new CMouseControl (); #endif m_pDwellClick= new CDwellClick (*m_pMouseControl); m_pGestureClick= new CGestureClick (*m_pMouseControl); InitDefaults (); }
CVisionPipeline::CVisionPipeline (wxThreadKind kind) : wxThread (kind) // Actually it is not needed all the features a condition object offers, but // we use it because we need a timeout based wait call. The associated mutex // is not used at all. , m_condition(m_mutex) { InitDefaults(); m_isRunning= false; m_trackAreaTimeout.SetWaitTimeMs(COLOR_DEGRADATION_TIME); // // Open face haarcascade // wxString cascadePath (eviacam::GetDataDir() + _T("/haarcascade_frontalface_default.xml")); m_faceCascade = (CvHaarClassifierCascade*)cvLoad(cascadePath.mb_str(wxConvUTF8), 0, 0, 0); // In debug mode if previous load attemp try to open it from the standard location. #ifndef NDEBUG if (!m_faceCascade) m_faceCascade = (CvHaarClassifierCascade*) cvLoad("/usr/share/eviacam/haarcascade_frontalface_default.xml", 0, 0, 0); #endif if (!m_faceCascade) { wxMessageDialog dlg (NULL, _("The face localization option is not enabled."), _T("Enable Viacam"), wxICON_ERROR | wxOK ); dlg.ShowModal(); } m_storage = cvCreateMemStorage(0); // Create and start face detection thread if (m_faceCascade) { if (Create() == wxTHREAD_NO_ERROR) { #if defined (WIN32) // On linux this ends up calling setpriority syscall which changes // the priority of the whole process :-( (see wxWidgets threadpsx.cpp) // TODO: implement it using pthreads SetPriority (WXTHREAD_MIN_PRIORITY); #endif m_isRunning= true; Run(); } } }
std::shared_ptr<cSslConfig> cSslConfig::MakeDefaultConfig(bool a_IsClient) { // TODO: Default CA chain and SetAuthMode(eSslAuthMode::Required) auto Ret = std::make_shared<cSslConfig>(); Ret->InitDefaults(a_IsClient); { auto CtrDrbg = std::make_shared<cCtrDrbgContext>(); CtrDrbg->Initialize("Cuberite", 8); Ret->SetRng(std::move(CtrDrbg)); } Ret->SetAuthMode(eSslAuthMode::None); // We cannot verify because we don't have a CA chain #ifdef _DEBUG #ifdef ENABLE_SSL_DEBUG_MSG Ret->SetDebugCallback(&SSLDebugMessage, nullptr); Ret->SetVerifyCallback(SSLVerifyCert, nullptr); mbedtls_debug_set_threshold(2); #endif /* // Set ciphersuite to the easiest one to decode, so that the connection can be wireshark-decoded: Ret->SetCipherSuites( { MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA } ); */ #endif return Ret; }
RomShip::RomShip() { InitDefaults(); }
int main(int argc, char **argv, char **env) { int c, ret; my_argv = argv; char *ce; uselogchan = 1; starttime = time(NULL); skip_banner = 0; #if defined(RLIMIT_CORE) && defined(HAVE_SYS_RESOURCE_H) // Make sure we can dump a core struct rlimit rlim; ret = getrlimit (RLIMIT_CORE, &rlim); if (ret == 0) { if (rlim.rlim_cur == 0) { //fprintf (stderr, "Core limit 0, attempting to set to %d\n", rlim.rlim_max); rlim.rlim_cur = rlim.rlim_max; setrlimit (RLIMIT_CORE, &rlim); } } #endif #ifdef HAVE_GNUTLS gnutls_global_init (); gnutls_certificate_allocate_credentials (&tls_x509_cred); #endif SetTime(); sprintf (CfgSettings.conf_name, "%s/%s", EPATH, "security.cfg"); my_env = env; while ((c = getopt (argc, argv, "xrshbvntd:c:l:")) != -1) { switch (c) { case 'x': skip_banner = 1; break; case 'h': showHelp (); break; case 'v': printf("Version: \033[1;31m%s %s-%s\033[0m\n",PACKAGE_NAME,PACKAGE_VERSION,VERSION_STRING); exit(0); case 's': nomodules = 1; break; case 'd': if (optarg) { debug = atoi(optarg); if ((debug < 1) || (debug > 3)) { fprintf (stderr, "Invalid value for -d (%d)\n", debug); exit (0); } } break; case 'n': nofork = 1; break; case 'c': if (optarg) { if ((optarg[strlen(optarg) - 4] == '.') && optarg[strlen(optarg) - 3] == 'c') { if ((*optarg == '/') || (*optarg == '.')) strlcpy (CfgSettings.conf_name, optarg, sizeof(CfgSettings.conf_name)); else sprintf (CfgSettings.conf_name, "%s/%s", EPATH, optarg); } else fprintf(stderr,"Invalid config file specified with -c option skipping.\n"); } break; case 'l': if (optarg) memcpy(logchan,optarg,sizeof(logchan)); break; case 't': config_test(); exit(0); } } //check to see if were running under root and bail if ((getuid() == 0) && (getgid() == 0)) { printf("Error: You are currently trying to run this program as root\n"); printf("This program does not require root privileges ...\n"); printf(" \n"); printf("Running an application as root that does not require root privileges\n"); printf("can and may have undesirable side effects. \n"); printf(" We strongly caution against this. \n"); exit(0); } if (chdir (DPATH)) { fprintf (stderr, "Unable to chdir to %s: %s\n", DPATH, strerror(errno)); exit (EXIT_FAILURE); } Omega = Core_Construct(); //initialize our core class. init_lists (); InitDefaults(); //we should work on making this more detailed in its error throws if (!config_load (CfgSettings.conf_name)) { fprintf(stderr, "Unable to read config file.\n"); exit(0); } VerifyConf(); DaemonSeed(); atexit(AtExit); Run(); //we returned from Run() Some how :/ i shit you not.. we need to exit ;( *tear* Exit(0); return 0; }
TimeManager::TimeManager(void) { myClocks.Init(NUM_CLOCKS); InitDefaults(); }
// CTOR default plAvOneShotTask::plAvOneShotTask() { InitDefaults(); }
/// \brief /// Constructor that initializes defaults inline VTerrainConfig() {m_bFinalized=false;InitDefaults();}
void VisionApp::InitSettings(void) { // initialize arrays with Vision's default settings in case of new user InitDefaults(); Theme::TimestampFore = C_TIMESTAMP; Theme::TimestampBack = C_TIMESTAMP; Theme::TimespaceFore = MAX_COLORS; Theme::TimespaceBack = MAX_COLORS; Theme::TimespaceFont = MAX_FONTS; Theme::TimestampFont = F_TIMESTAMP; Theme::NormalFore = C_TEXT; Theme::NormalBack = C_TEXT; Theme::NormalFont = F_TEXT; Theme::SelectionBack = C_SELECTION; if (fDebugSettings) printf(":SETTINGS: loading...\n"); fVisionSettings = new SettingsFile("VisionSettings", "Vision"); if (fVisionSettings->InitCheck() == B_OK) { fVisionSettings->Load(); } else printf(":ERROR: Error Loading /Vision/VisionSettings\n"); if (fVisionSettings->IsEmpty()) { LoadInitialSettings(); } LoadAliases(); int32 i(0); LoadDefaults(SET_SERVER); LoadDefaults(SET_GENERAL); LoadDefaults(SET_WINDOW); LoadDefaults(SET_NOTIFY); LoadDefaults(SET_FONT); LoadDefaults(SET_COLOR); LoadDefaults(SET_STRINGS); LoadDefaults(SET_DCC); // initialize theme, TODO: move to separate function fActiveTheme->WriteLock(); for (i = 0; i < MAX_COLORS; i++) { fActiveTheme->SetForeground(i, fColors[i]); fActiveTheme->SetBackground(i, fColors[C_BACKGROUND]); } for (i = C_MIRC_WHITE; i < MAX_COLORS; i++) fActiveTheme->SetBackground(i, fColors[i]); fActiveTheme->SetBackground(C_SELECTION, fColors[C_SELECTION]); fActiveTheme->SetBackground(C_TIMESTAMP, fColors[C_TIMESTAMP_BACKGROUND]); fActiveTheme->SetBackground(MAX_COLORS, fColors[C_BACKGROUND]); fActiveTheme->SetForeground(MAX_COLORS, fColors[C_TEXT]); fActiveTheme->SetFont(MAX_FONTS, fClientFont[F_TEXT]); for (i = 0; i < MAX_FONTS; i++) fActiveTheme->SetFont(i, fClientFont[i]); fActiveTheme->WriteUnlock(); fSettingsLoaded = true; if (fDebugSettings) printf(":SETTINGS: done loading\n"); }
char * XGetDefault( Display *dpy, /* display for defaults.... */ char _Xconst *prog, /* name of program for option */ register _Xconst char *name) /* name of option program wants */ { /* to get, for example, "font" */ XrmName names[3]; XrmClass classes[3]; XrmRepresentation fromType; XrmValue result; char *progname; #ifdef WIN32 char *progname2; #endif #ifdef __UNIXOS2__ char *progname2; char *dotpos; #endif /* * strip path off of program name (XXX - this is OS specific) */ progname = strrchr (prog, '/'); #ifdef WIN32 progname2 = strrchr (prog, '\\'); if (progname2 && (!progname || progname < progname2)) progname = progname2; #endif #ifdef __UNIXOS2__ /* Very similar to WIN32 */ progname2 = strrchr (prog, '\\'); if (progname2 && (!progname || progname < progname2)) progname = progname2; dotpos = strrchr (prog, '.'); if (dotpos && (dotpos>progname2)) *dotpos='\0'; #endif /* We take out the .exe suffix */ if (progname) progname++; else progname = (char *)prog; /* * see if database has ever been initialized. Lookups can be done * without locks held. */ LockDisplay(dpy); if (dpy->db == NULL) { dpy->db = InitDefaults(dpy); dpy->flags |= XlibDisplayDfltRMDB; } UnlockDisplay(dpy); names[0] = XrmStringToName(progname); names[1] = XrmStringToName(name); names[2] = NULLQUARK; classes[0] = XrmStringToClass("Program"); classes[1] = XrmStringToClass("Name"); classes[2] = NULLQUARK; (void)XrmQGetResource(dpy->db, names, classes, &fromType, &result); return (result.addr); }
void CPreferences::LoadPreferences() { _preferences_heading = "Preferences"; InitDefaults(); ReadPreferences(); }
void CPreferences::ReadPreferences() { InitDefaults(); { // Main window location and size ReadReg("main_x", &_main_x); ReadReg("main_y", &_main_y); ReadReg("main_dx", &_main_dx); ReadReg("main_dy", &_main_dy); // Formula window location and size ReadReg("formula_x", &_formula_x); ReadReg("formula_y", &_formula_y); ReadReg("formula_dx", &_formula_dx); ReadReg("formula_dy", &_formula_dy); // ppro window location and size ReadReg("ppro_x", &_ppro_x); ReadReg("ppro_y", &_ppro_y); ReadReg("ppro_dx", &_ppro_dx); ReadReg("ppro_dy", &_ppro_dy); // scraper window location and size ReadReg("scraper_x", &_scraper_x); ReadReg("scraper_y", &_scraper_y); ReadReg("scraper_dx", &_scraper_dx); ReadReg("scraper_dy", &_scraper_dy); // formula editor ReadReg("precision", &_precision); ReadReg("equal", &_equal); ReadReg("udf_sort", &_udf_sort); ReadReg("udf_group", &_udf_group); ReadReg("expand_auto", &_expand_auto); ReadReg("expand_debug", &_expand_debug); ReadReg("expand_list", &_expand_list); ReadReg("expand_std", &_expand_std); ReadReg("expand_udf", &_expand_udf); // prefs - analyzer ReadReg("max_opponents", &_max_opponents); // prefs - autoplayer ReadReg("frame_delay", &_frame_delay); ReadReg("swag_delay_1", &_swag_delay_1); ReadReg("swag_delay_2", &_swag_delay_2); // If a key "swag_delay" exists, use this as "swag_delay_3", // if not defined in another way (checked below). // (WH backward compatibility.) ReadReg("swag_delay", &_swag_delay_3); ReadReg("swag_delay_3", &_swag_delay_3); ReadReg("auto", &_ap_auto); ReadReg("focus_detect", &_focus_detect); ReadReg("swag_use_comma", &_swag_use_comma); ReadReg("calc_only_my_turn", &_calc_only_my_turn); ReadReg("need_balance_stability", &_need_balance_stability); // prefs - dll extension ReadReg("dll_always_send_state", &_dll_always_send_state); ReadReg("load_dll_on_startup", &_dll_load_on_startup); ReadReg("dll_name", &_dll_name); // prefs - scraper ReadReg("scrape_delay", &_scrape_delay); // prefs - symbols ReadReg("avtime", &_sym_av_time); ReadReg("handrank_value", &_sym_handrank_value); ReadReg("disable_caching", &_sym_disable_caching); // Prefs - poker tracker ReadReg("pt_disable", &_pt_disable); ReadReg("pt_version", &_pt_version); ReadReg("pt_ip_addr", &_pt_ip_addr); ReadReg("pt_port", &_pt_port); ReadReg("pt_user", &_pt_user); ReadReg("pt_pass", &_pt_pass); ReadReg("pt_dbname", &_pt_dbname); ReadReg("pt_updatedelay", &_pt_update_delay); ReadReg("pt_cacherefresh", &_pt_cache_refresh); // prefs - ICM ReadReg("icm_prize1", &_icm_prize1); ReadReg("icm_prize2", &_icm_prize2); ReadReg("icm_prize3", &_icm_prize3); ReadReg("icm_prize4", &_icm_prize4); ReadReg("icm_prize5", &_icm_prize5); // Prefs - Replay frames ReadReg("replay_record", &_replay_record); ReadReg("replay_record_every_change", &_replay_record_every_change); ReadReg("replay_max_frames", &_replay_max_frames); ReadReg("replay_record_every_change_playing", &_replay_record_every_change_playing); // poker Pro ReadReg("ppro_hostname", &_ppro_hostname); ReadReg("ppro_port", &_ppro_port); ReadReg("ppro_username", &_ppro_username); ReadReg("ppro_password", &_ppro_password); ReadReg("ppro_handhistory", &_ppro_handhistory); ReadReg("ppro_ft_hhlog_format", &_ppro_ft_hhlog_format); ReadReg("ppro_chips", &_ppro_chips); ReadReg("ppro_autoseat", &_ppro_autoseat); // blind locking ReadReg("sblind", &_sblind); ReadReg("bblind", &_bblind); ReadReg("bbet", &_bbet); ReadReg("ante", &_ante); ReadReg("gametype", &_gametype); // f$debug logging ReadReg("fdebuglog", &_fdebuglog); ReadReg("fdebuglog_myturn", &_fdebuglog_myturn); // scraper zoom level ReadReg("scraper_zoom", &_scraper_zoom); // Perl ReadReg("perl_editor", &_perl_editor); ReadReg("perl_load_default_formula", &_perl_load_default_formula); ReadReg("perl_load_interpreter", &_perl_load_interpreter); ReadReg("perl_default_formula", &_perl_default_formula); // PokerChat ReadReg("chat_enabled", &_chat_enabled); ReadReg("chat_min_delay", &_chat_min_delay); ReadReg("chat_random_delay", &_chat_random_delay); // log$ logging ReadReg("log_symbol_enabled", &_log_symbol_enabled); ReadReg("log_symbol_max_log", &_log_symbol_max_log); ReadReg("trace_enabled", &_trace_enabled); CString regValue; for (int i=0;i<nTraceFunctions;i++) { regValue.Format("trace_functions%d", i+1); ReadReg(regValue, &_trace_functions[i]); } // Logging and debugging ReadReg("disable_msgbox", &_disable_msgbox); ReadReg("log_level", &_log_level); ReadReg("log_level_pt", &_log_level_pt); ReadReg("log_max_logsize", &_log_max_logsize); // Validator ReadReg("validator_enabled", &_validator_enabled); ReadReg("validator_use_heuristic_rules", &_validator_use_heuristic_rules); ReadReg("validator_stop_on_error", &_validator_stop_on_error); ReadReg("validator_shoot_replayframe_on_error", &_validator_shoot_replayframe_on_error); // Auto-connector ReadReg("autoconnector_connection_method", &_autoconnector_connection_method); ReadReg("autoconnector_when_to_connect", & _autoconnector_when_to_connect); ReadReg("autoconnector_close_when_table_disappears", &_autoconnector_close_when_table_disappears); // GUI ReadReg("gui_start_minimized", &_gui_start_minimized); ReadReg("gui_disable_progress_dialog", &_gui_disable_progress_dialog); // Rebuy ReadReg("rebuy_condition_no_cards", &_rebuy_condition_no_cards); ReadReg("rebuy_condition_change_in_handnumber", &_rebuy_condition_change_in_handnumber); ReadReg("rebuy_condition_heuristic_check_for_occlusion", &_rebuy_condition_heuristic_check_for_occlusion); ReadReg("rebuy_minimum_time_to_next_try", &_rebuy_minimum_time_to_next_try); ReadReg("rebuy_script", &_rebuy_script); // Configuration check ReadReg("configurationcheck_keyboard_settings", &_configurationcheck_keyboard_settings); ReadReg("configurationcheck_theme_settings", &_configurationcheck_theme_settings); ReadReg("configurationcheck_font_settings", &_configurationcheck_font_settings); // Lazy scraping ReadReg("lazy_scraping_when_sitin_sitout_leave", &_lazy_scraping_when_sitin_sitout_leave); ReadReg("lazy_scraping_when_we_hold_cards", &_lazy_scraping_when_we_hold_cards); ReadReg("lazy_scraping_always_complete", &_lazy_scraping_always_complete); // Handhistory_generator ReadReg("handhistory_generator_enable", &_handhistory_generator_enable); // obscure ReadReg("window_class_name", &_window_class_name); ReadReg("mutex_name", &_mutex_name); ReadReg("simple_window_title", &_simple_window_title); // CFileDialog saved paths ReadReg("last_path_ohf", &_path_ohf); ReadReg("last_path_tm", &_path_tm); ReadReg("last_path_perl", &_path_perl); ReadReg("last_path_dll", &_path_dll); } }
//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- StyleSettings::StyleSettings() { InitDefaults(); }
KLUSystem::KLUSystem (unsigned nBus, unsigned nV, unsigned nI) { InitDefaults (); Initialize (nBus, nV, nI); }
void CPreferences::ReadPreferences() { InitDefaults(); { // Main window location and size ReadReg("main_x", &_main_x); ReadReg("main_y", &_main_y); ReadReg("main_dx", &_main_dx); ReadReg("main_dy", &_main_dy); // Formula window location and size ReadReg("formula_x", &_formula_x); ReadReg("formula_y", &_formula_y); ReadReg("formula_dx", &_formula_dx); ReadReg("formula_dy", &_formula_dy); // scraper window location and size ReadReg("scraper_x", &_scraper_x); ReadReg("scraper_y", &_scraper_y); ReadReg("scraper_dx", &_scraper_dx); ReadReg("scraper_dy", &_scraper_dy); // prefs - autoplayer ReadReg("frame_delay", &_frame_delay); ReadReg("click_delay", &_click_delay); ReadReg("swag_delay_1", &_swag_delay_1); ReadReg("swag_delay_2", &_swag_delay_2); // If a key "swag_delay" exists, use this as "swag_delay_3", // if not defined in another way (checked below). // (WH backward compatibility.) ReadReg("swag_delay", &_swag_delay_3); ReadReg("swag_delay_3", &_swag_delay_3); ReadReg("auto", &_engage_autoplayer); ReadReg("swag_use_comma", &_swag_use_comma); // prefs - dll extension ReadReg("dll_name", &_dll_name); // prefs - scraper ReadReg("scrape_delay", &_scrape_delay); // Prefs - poker tracker ReadReg("pt_ip_addr", &_pt_ip_addr); ReadReg("pt_port", &_pt_port); ReadReg("pt_user", &_pt_user); ReadReg("pt_pass", &_pt_pass); ReadReg("pt_dbname", &_pt_dbname); // prefs - ICM ReadReg("icm_prize1", &_icm_prize1); ReadReg("icm_prize2", &_icm_prize2); ReadReg("icm_prize3", &_icm_prize3); ReadReg("icm_prize4", &_icm_prize4); ReadReg("icm_prize5", &_icm_prize5); // Prefs - Replay frames ReadReg("replay_record", &_replay_record); ReadReg("replay_record_every_change", &_replay_record_every_change); ReadReg("replay_max_frames", &_replay_max_frames); ReadReg("replay_record_every_change_playing", &_replay_record_every_change_playing); // scraper zoom level ReadReg("scraper_zoom", &_scraper_zoom); // Perl ReadReg("perl_editor", &_perl_editor); ReadReg("perl_default_formula", &_perl_default_formula); // PokerChat ReadReg("chat_min_delay", &_chat_min_delay); ReadReg("chat_random_delay", &_chat_random_delay); // log$ logging ReadReg("log_symbol_enabled", &_log_symbol_enabled); ReadReg("log_symbol_max_log", &_log_symbol_max_log); ReadReg("trace_enabled", &_trace_enabled); ReadReg("basic_logging_enabled", &_basic_logging_enabled); ReadReg("error_logging_enabled", &_error_logging_enabled); ReadReg("dll_logging_enabled", &_dll_logging_enabled); // Logging and debugging ReadReg("disable_msgbox", &_disable_msgbox); ReadReg("log_max_logsize", &_log_max_logsize); // Debugging ReadReg("debug_autoconnector", &_debug_autoconnector); ReadReg("debug_autoplayer", &_debug_autoplayer); ReadReg("debug_heartbeat", &_debug_heartbeat); ReadReg("debug_prwin", &_debug_prwin); ReadReg("debug_icm", &_debug_icm); ReadReg("debug_occlusionchecker", &_debug_occlusionchecker); ReadReg("debug_pokertracker", &_debug_pokertracker); ReadReg("debug_rebuy", &_debug_rebuy); ReadReg("debug_replayframes", &_debug_replayframes); ReadReg("debug_scraper", &_debug_scraper); ReadReg("debug_sessioncounter", &_debug_sessioncounter); ReadReg("debug_stableframescounter", &_debug_stableframescounter); ReadReg("debug_symbolengine", &_debug_symbolengine); ReadReg("debug_blindlocking", &_debug_blindlocking); ReadReg("debug_memorysymbols", &_debug_memorysymbols); ReadReg("debug_tablemap_loader", &_debug_tablemap_loader); ReadReg("debug_filesystem_monitor", &_debug_filesystem_monitor); ReadReg("debug_table_positioner", &_debug_table_positioner); ReadReg("debug_istournament", &_debug_istournament); ReadReg("debug_gui", &_debug_gui); ReadReg("debug_table_limits", &_debug_table_limits); ReadReg("debug_lazy_scraper", &_debug_lazy_scraper); ReadReg("debug_betsize_adjustment", &_debug_betsize_adjustment); ReadReg("debug_handreset_detector", &_debug_handreset_detector); ReadReg("debug_engine_container", &_debug_engine_container); ReadReg("debug_handhistory", &_debug_handhistory); ReadReg("debug_alltherest", &_debug_alltherest); // Validator ReadReg("validator_enabled", &_validator_enabled); ReadReg("validator_use_heuristic_rules", &_validator_use_heuristic_rules); ReadReg("validator_stop_on_error", &_validator_stop_on_error); ReadReg("validator_shoot_replayframe_on_error", &_validator_shoot_replayframe_on_error); // Auto-connector ReadReg("autoconnector_when_to_connect", & _autoconnector_when_to_connect); ReadReg("autoconnector_close_when_table_disappears", &_autoconnector_close_when_table_disappears); // GUI ReadReg("gui_start_minimized", &_gui_start_minimized); ReadReg("gui_disable_progress_dialog", &_gui_disable_progress_dialog); // Rebuy ReadReg("rebuy_condition_no_cards", &_rebuy_condition_no_cards); ReadReg("rebuy_condition_change_in_handnumber", &_rebuy_condition_change_in_handnumber); ReadReg("rebuy_condition_heuristic_check_for_occlusion", &_rebuy_condition_heuristic_check_for_occlusion); ReadReg("rebuy_minimum_time_to_next_try", &_rebuy_minimum_time_to_next_try); ReadReg("rebuy_script", &_rebuy_script); // Configuration check ReadReg("configurationcheck_input_settings", &_configurationcheck_input_settings); ReadReg("configurationcheck_theme_settings", &_configurationcheck_theme_settings); ReadReg("configurationcheck_font_settings", &_configurationcheck_font_settings); // Lazy scraping ReadReg("lazy_scraping_when_to_scrape", &_lazy_scraping_when_to_scrape); // Handhistory_generator ReadReg("handhistory_generator_enable", &_handhistory_generator_enable); // Table positioner ReadReg("table_positioner_options", &_table_positioner_options); // obscure ReadReg("window_class_name", &_window_class_name); ReadReg("mutex_name", &_mutex_name); ReadReg("simple_window_title", &_simple_window_title); // CFileDialog saved paths ReadReg("last_path_ohf", &_path_ohf); ReadReg("last_path_tm", &_path_tm); ReadReg("last_path_perl", &_path_perl); ReadReg("last_path_dll", &_path_dll); } }