2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
24 class CTextureBundleXBT
28 explicit CTextureBundleXBT(bool themeBundle
);
31 void SetThemeBundle(bool themeBundle
);
32 bool HasFile(const std::string
& Filename
);
33 std::vector
<std::string
> GetTexturesFromPath(const std::string
& path
);
34 static std::string
Normalize(std::string name
);
38 std::unique_ptr
<CTexture
> texture
;
44 * \brief See CTextureBundle::LoadTexture
46 std::optional
<Texture
> LoadTexture(const std::string
& filename
);
50 std::vector
<std::pair
<std::unique_ptr
<CTexture
>, int>> textures
;
57 * \brief See CTextureBundle::LoadAnim
59 std::optional
<Animation
> LoadAnim(const std::string
& filename
);
61 //! @todo Change return to std::optional<std::vector<uint8_t>>> when c++17 is allowed
62 static std::vector
<uint8_t> UnpackFrame(const CXBTFReader
& reader
, const CXBTFFrame
& frame
);
68 std::unique_ptr
<CTexture
> ConvertFrameToTexture(const std::string
& name
, const CXBTFFrame
& frame
);
74 std::shared_ptr
<CXBTFReader
> m_XBTFReader
;