2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
22 #include "TextureBundle.h"
24 CTextureBundle::CTextureBundle(void)
30 CTextureBundle::~CTextureBundle(void)
34 bool CTextureBundle::HasFile(const CStdString& Filename)
38 return m_tbXBT.HasFile(Filename);
42 return m_tbXPR.HasFile(Filename);
44 else if (m_tbXBT.HasFile(Filename))
49 else if (m_tbXPR.HasFile(Filename))
60 void CTextureBundle::GetTexturesFromPath(const CStdString &path, std::vector<CStdString> &textures)
64 m_tbXBT.GetTexturesFromPath(path, textures);
68 m_tbXPR.GetTexturesFromPath(path, textures);
72 bool CTextureBundle::LoadTexture(const CStdString& Filename, CBaseTexture** ppTexture,
73 int &width, int &height)
77 return m_tbXBT.LoadTexture(Filename, ppTexture, width, height);
81 return m_tbXPR.LoadTexture(Filename, ppTexture, width, height);
89 int CTextureBundle::LoadAnim(const CStdString& Filename, CBaseTexture*** ppTextures,
90 int &width, int &height, int& nLoops, int** ppDelays)
94 return m_tbXBT.LoadAnim(Filename, ppTextures, width, height, nLoops, ppDelays);
98 return m_tbXPR.LoadAnim(Filename, ppTextures, width, height, nLoops, ppDelays);
106 void CTextureBundle::Cleanup()
110 m_useXPR = m_useXBT = false;
113 void CTextureBundle::SetThemeBundle(bool themeBundle)
115 m_tbXPR.SetThemeBundle(themeBundle);
116 m_tbXBT.SetThemeBundle(themeBundle);
119 CStdString CTextureBundle::Normalize(const CStdString &name)
121 return CTextureBundleXBT::Normalize(name);