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/>.
27 #define XBTF_MAGIC "XBTF"
28 #define XBTF_VERSION "2"
30 #define XB_FMT_MASK 0xffff ///< mask for format info - other flags are outside this
31 #define XB_FMT_DXT_MASK 15
32 #define XB_FMT_UNKNOWN 0
36 #define XB_FMT_DXT5_YCoCg 8
37 #define XB_FMT_A8R8G8B8 16 // texture.xbt byte order (matches BGRA8)
39 #define XB_FMT_RGBA8 64
40 #define XB_FMT_RGB8 128
41 #define XB_FMT_OPAQUE 65536
47 uint32_t GetWidth() const;
48 void SetWidth(uint32_t width);
49 uint32_t GetFormat(bool raw = false) const;
50 void SetFormat(uint32_t format);
51 uint32_t GetHeight() const;
52 void SetHeight(uint32_t height);
53 uint64_t GetUnpackedSize() const;
54 void SetUnpackedSize(uint64_t size);
55 uint64_t GetPackedSize() const;
56 void SetPackedSize(uint64_t size);
57 uint64_t GetOffset() const;
58 void SetOffset(uint64_t offset);
59 uint64_t GetHeaderSize() const;
60 uint32_t GetDuration() const;
61 void SetDuration(uint32_t duration);
62 bool IsPacked() const;
63 bool HasAlpha() const;
69 uint64_t m_packedSize;
70 uint64_t m_unpackedSize;
79 CXBTFFile(const CXBTFFile& ref);
81 void SetPath(const std::string& path);
82 uint32_t GetLoop() const;
83 void SetLoop(uint32_t loop);
84 std::vector<CXBTFFrame>& GetFrames();
85 uint64_t GetHeaderSize() const;
90 std::vector<CXBTFFrame> m_frames;
97 uint64_t GetHeaderSize() const;
98 std::vector<CXBTFFile>& GetFiles();
101 std::vector<CXBTFFile> m_files;