summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2016-05-18 00:42:45 +0100
committerGravatar Emmanuel Gil Peyrot2016-05-21 20:15:42 +0100
commit080a2d719ca825961ec2db5f26ad22e43d456c5a (patch)
treee9ee342eb661cfa41895f9cf7ef983b21b3a52b6 /src/core/loader/loader.h
parentCitraQt: Simplify the game list loader code (diff)
downloadyuzu-080a2d719ca825961ec2db5f26ad22e43d456c5a.tar.gz
yuzu-080a2d719ca825961ec2db5f26ad22e43d456c5a.tar.xz
yuzu-080a2d719ca825961ec2db5f26ad22e43d456c5a.zip
Loader: Split SMDH into its own header and import helpers from QGameList
Also rewrite Qt wrappers to use those.
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 39aedfeeb..77d87afe1 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -10,10 +10,8 @@
10#include <string> 10#include <string>
11#include <vector> 11#include <vector>
12 12
13#include "common/common_funcs.h"
14#include "common/common_types.h" 13#include "common/common_types.h"
15#include "common/file_util.h" 14#include "common/file_util.h"
16#include "common/swap.h"
17 15
18namespace Kernel { 16namespace Kernel {
19struct AddressMapping; 17struct AddressMapping;
@@ -80,51 +78,6 @@ constexpr u32 MakeMagic(char a, char b, char c, char d) {
80 return a | b << 8 | c << 16 | d << 24; 78 return a | b << 8 | c << 16 | d << 24;
81} 79}
82 80
83/// SMDH data structure that contains titles, icons etc. See https://www.3dbrew.org/wiki/SMDH
84struct SMDH {
85 u32_le magic;
86 u16_le version;
87 INSERT_PADDING_BYTES(2);
88
89 struct Title {
90 std::array<u16, 0x40> short_title;
91 std::array<u16, 0x80> long_title;
92 std::array<u16, 0x40> publisher;
93 };
94 std::array<Title, 16> titles;
95
96 std::array<u8, 16> ratings;
97 u32_le region_lockout;
98 u32_le match_maker_id;
99 u64_le match_maker_bit_id;
100 u32_le flags;
101 u16_le eula_version;
102 INSERT_PADDING_BYTES(2);
103 float_le banner_animation_frame;
104 u32_le cec_id;
105 INSERT_PADDING_BYTES(8);
106
107 std::array<u8, 0x480> small_icon;
108 std::array<u8, 0x1200> large_icon;
109
110 /// indicates the language used for each title entry
111 enum class TitleLanguage {
112 Japanese = 0,
113 English = 1,
114 French = 2,
115 German = 3,
116 Italian = 4,
117 Spanish = 5,
118 SimplifiedChinese = 6,
119 Korean= 7,
120 Dutch = 8,
121 Portuguese = 9,
122 Russian = 10,
123 TraditionalChinese = 11
124 };
125};
126static_assert(sizeof(SMDH) == 0x36C0, "SMDH structure size is wrong");
127
128/// Interface for loading an application 81/// Interface for loading an application
129class AppLoader : NonCopyable { 82class AppLoader : NonCopyable {
130public: 83public: