int option_set_visual(vis_driver_t * d) { int err; spinlock_lock(&visual_mutex); err = set_visual(d); spinlock_unlock(&visual_mutex); return err; }
/** * Checks to see if the display supports alpha channels */ void TransparentSlider::on_screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen) { auto screen = get_screen(); auto visual = screen->get_rgba_visual(); if (!visual) { std::cout << "Transparency is not supported." << std::endl; } else { std::cout << "Transparency is supported." << std::endl; _SUPPORTS_ALPHA = TRUE; } set_visual(visual); }
//////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeapon //////////////////////////////////////////////////////////////////////////// CSE_ALifeItemWeapon::CSE_ALifeItemWeapon (LPCSTR caSection) : CSE_ALifeItem(caSection) { a_current = 90; a_elapsed = 0; wpn_flags = 0; wpn_state = 0; ammo_type = 0; m_fHitPower = pSettings->r_float(caSection,"hit_power"); m_tHitType = ALife::g_tfString2HitType(pSettings->r_string(caSection,"hit_type")); m_caAmmoSections = pSettings->r_string(caSection,"ammo_class"); if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection,"visual")) set_visual (pSettings->r_string(caSection,"visual")); m_addon_flags.zero (); m_scope_status = (EWeaponAddonStatus)pSettings->r_s32(s_name,"scope_status"); m_silencer_status = (EWeaponAddonStatus)pSettings->r_s32(s_name,"silencer_status"); m_grenade_launcher_status = (EWeaponAddonStatus)pSettings->r_s32(s_name,"grenade_launcher_status"); m_ef_main_weapon_type = READ_IF_EXISTS(pSettings,r_u32,caSection,"ef_main_weapon_type",u32(-1)); m_ef_weapon_type = READ_IF_EXISTS(pSettings,r_u32,caSection,"ef_weapon_type",u32(-1)); }
//////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemAmmo //////////////////////////////////////////////////////////////////////////// CSE_ALifeItemAmmo::CSE_ALifeItemAmmo (LPCSTR caSection) : CSE_ALifeItem(caSection) { a_elapsed = m_boxSize = (u16)pSettings->r_s32(caSection, "box_size"); if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection,"visual")) set_visual (pSettings->r_string(caSection,"visual")); }