Project

General

Profile

Bug #104 » XBMC4Xbox_AmbilightPatch3.patch

Improved ambilight function, however, code is still a mess. - lagwagon667, 01/09/2010 09:44 PM

View differences:

skin/Project Mayhem III/PAL/Home.xml (working copy)
<onright>96</onright>
<onup>9</onup>
<ondown>5</ondown>
<onfocus>XBMC.System.PWMControl(#FF0000)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>30</textoffsetx>
......
<onright>96</onright>
<onup>2</onup>
<ondown>3</ondown>
<onfocus>XBMC.System.PWMControl(#00FF00)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>30</textoffsetx>
......
<onright>96</onright>
<onup>5</onup>
<ondown>4</ondown>
<onfocus>XBMC.System.PWMControl(#FFFFFF,#000000,#000000,#000000,firework,500)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>30</textoffsetx>
......
<onright>96</onright>
<onup>3</onup>
<ondown>7</ondown>
<onfocus>XBMC.System.PWMControl(#FF00FF)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>30</textoffsetx>
......
<onright>96</onright>
<onup>4</onup>
<ondown>9</ondown>
<onfocus>XBMC.System.PWMControl(#FFFF00)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>30</textoffsetx>
......
<onright>6</onright>
<onup>10</onup>
<ondown>5</ondown>
<onfocus>XBMC.System.PWMControl(#00FFFF)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>20</textoffsetx>
......
<onright>96</onright>
<onup>10</onup>
<ondown>5</ondown>
<onfocus>XBMC.System.PWMControl(#FFFFFF)</onfocus>
<texturefocus>home-focus.gif</texturefocus>
<texturenofocus>-</texturenofocus>
<textoffsetx>20</textoffsetx>
userdata/AdvancedSettings.xml (revision 0)
<advancedsettings>
<ambilight>
<enabled>true</enabled>
<spaceBetweenPixels>30</spaceBetweenPixels>
<FloatingAverageFrames>1</FloatingAverageFrames>
<GammaR>1.2</GammaR>
<GammaG>1.0</GammaG>
<GammaB>0.8</GammaB>
<MinRGB>2</MinRGB>
<FilterThreshold>50</FilterThreshold>
<DarknessLimit>20</DarknessLimit>
</ambilight>
</advancedsettings>
xbmc/AdvancedSettings.cpp (working copy)
m_bAutoFatxLimit = true;
m_bgInfoLoaderMaxThreads = 1;
m_ambiLight = false;
m_ambiLightSpaceBetweenPixels = 30;
m_ambiLightFloatingAverageFrames = 1;
m_ambiLightMinRGB = 2;
m_ambiLightMaxRGB = 255;
m_ambiLightMode = "linear";
m_ambiLightPosition = "all";
m_ambiLightGammaR = 1.2f;
m_ambiLightGammaG = 1.0f;
m_ambiLightGammaB = 0.8f;
m_ambiLightIntensityR = 1.0f;
m_ambiLightIntensityG = 1.0f;
m_ambiLightIntensityB = 1.0f;
m_ambiLightFilterThreshold = 50;
m_ambiLightDarknessLimit = 20;
}
bool CAdvancedSettings::Load()
......
XMLUtils::GetBoolean(pElement, "verbose", m_bPythonVerbose);
}
pElement = pRootElement->FirstChildElement("ambilight");
if (pElement)
{
XMLUtils::GetBoolean(pElement, "enabled", m_ambiLight);
XMLUtils::GetInt(pElement, "spaceBetweenPixels", m_ambiLightSpaceBetweenPixels);
XMLUtils::GetInt(pElement, "floatingAverageFrames", m_ambiLightFloatingAverageFrames);
XMLUtils::GetInt(pElement, "minRGB", m_ambiLightMinRGB);
XMLUtils::GetInt(pElement, "maxRGB", m_ambiLightMaxRGB);
XMLUtils::GetString(pElement, "mode", m_ambiLightMode);
XMLUtils::GetString(pElement, "position", m_ambiLightPosition);
XMLUtils::GetFloat(pElement, "gammaR", m_ambiLightGammaR);
XMLUtils::GetFloat(pElement, "gammaG", m_ambiLightGammaG);
XMLUtils::GetFloat(pElement, "gammaB", m_ambiLightGammaB);
XMLUtils::GetFloat(pElement, "intensityR", m_ambiLightIntensityR);
XMLUtils::GetFloat(pElement, "intensityG", m_ambiLightIntensityG);
XMLUtils::GetFloat(pElement, "intensityB", m_ambiLightIntensityB);
XMLUtils::GetInt(pElement, "filterThreshold", m_ambiLightFilterThreshold);
XMLUtils::GetInt(pElement, "darknessLimit", m_ambiLightDarknessLimit);
}
XMLUtils::GetBoolean(pRootElement, "autofatxlimit", m_bAutoFatxLimit);
XMLUtils::GetString(pRootElement, "cddbaddress", m_cddbAddress);
......
XMLUtils::GetInt(pElement, "commbreakautowait", m_iEdlCommBreakAutowait, 0, 10); // Between 0 and 10 seconds
XMLUtils::GetInt(pElement, "commbreakautowind", m_iEdlCommBreakAutowind, 0, 10); // Between 0 and 10 seconds
}
// picture exclude regexps
TiXmlElement* pPictureExcludes = pRootElement->FirstChildElement("pictureexcludes");
if (pPictureExcludes)
xbmc/AdvancedSettings.h (working copy)
bool m_bPythonVerbose;
bool m_bAutoFatxLimit;
int m_bgInfoLoaderMaxThreads;
bool m_ambiLight;
int m_ambiLightSpaceBetweenPixels;
int m_ambiLightFloatingAverageFrames;
int m_ambiLightMinRGB;
int m_ambiLightMaxRGB;
CStdString m_ambiLightMode;
CStdString m_ambiLightPosition;
float m_ambiLightGammaR;
float m_ambiLightGammaG;
float m_ambiLightGammaB;
float m_ambiLightIntensityR;
float m_ambiLightIntensityG;
float m_ambiLightIntensityB;
int m_ambiLightFilterThreshold;
int m_ambiLightDarknessLimit;
};
extern CAdvancedSettings g_advancedSettings;
(3-3/7)