Debian Codegraph @

Source/Core/DiscIO/WiiSaveBanner.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <string>
7 #include <vector>
8
9 #include "Common/CommonTypes.h"
10
11 namespace DiscIO
12 {
13 class WiiSaveBanner
14 {
15 public:
16 static constexpr u32 BANNER_WIDTH = 192;
17 static constexpr u32 BANNER_HEIGHT = 64;
18
19 explicit WiiSaveBanner(u64 title_id);
20
21 bool IsValid() const { return m_valid; }
22 const std::string& GetPath() const { return m_path; }
23 std::string GetName() const;
24 std::string GetDescription() const;
25
26 std::vector<u32> GetBanner(u32* width, u32* height) const;
27
28 private:
29 struct Header
30 {
31 char magic[4]; // "WIBN"
32 u32 flags;
33 u16 animation_speed;
34 u8 unused[22];
35 char16_t name[32];
36 char16_t description[32];
37 } m_header;
38
39 bool m_valid = true;
40 std::string m_path;
41 };
42 } // namespace DiscIO