mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00

Unlike custom banners which work as an override, this mechanism works as a fallback. The use case is if you have games you don't really play but want to keep around for testing purposes without filling up your NAND with lots of saves. For ease of use, the directory structure is the same but only title/$title_hi/$title_lo/data/banner.bin files are relevant.
43 lines
838 B
C++
43 lines
838 B
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
namespace DiscIO
|
|
{
|
|
class WiiSaveBanner
|
|
{
|
|
public:
|
|
static constexpr u32 BANNER_WIDTH = 192;
|
|
static constexpr u32 BANNER_HEIGHT = 64;
|
|
|
|
explicit WiiSaveBanner(u64 title_id);
|
|
|
|
bool IsValid() const { return m_valid; }
|
|
const std::string& GetPath() const { return m_path; }
|
|
std::string GetName() const;
|
|
std::string GetDescription() const;
|
|
|
|
std::vector<u32> GetBanner(u32* width, u32* height) const;
|
|
|
|
private:
|
|
struct Header
|
|
{
|
|
char magic[4]; // "WIBN"
|
|
u32 flags;
|
|
u16 animation_speed;
|
|
u8 unused[22];
|
|
char16_t name[32];
|
|
char16_t description[32];
|
|
} m_header;
|
|
|
|
bool m_valid = true;
|
|
std::string m_path;
|
|
};
|
|
} // namespace DiscIO
|