mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-23 02:36:41 +00:00
15431ec2c8
* AES: moved CTR initializing/updating functions here from nca.c. * BKTR/RomFS/PFS: check if we're dealing with a NCA with titlekey crypto and the titlekey hasn't been retrieved. * BFTTF: use void pointers for output font data. * Mem: Only exclude Unmapped/Uo/ThreadLocal/Reserved memory pages if dealing with FS. * NCA: use content type context pointers inside NCA contexts to manage ContentMeta, ProgramInfo, Nacp and LegalInfo contexts. * NCA: added 'written' bool elements to patch structs to indicate patch write completion. * NPDM: remove unnecessary inline functions, generate PFS patch right after changing ACID data, add a pfsWriteEntryPatchToMemoryBuffer wrapper. * PFS: added PartitionFileSystemFileContext and related functions to deal with NSP headers. * ProgramInfo: removed unnecessary inline functions. * Save: added commented code to dump a full system savefile - will probably use it down the road. * Tik: added support for volatile tickets (thanks to @shchmue and @Whovian9369!), added a rights ID string representation to the Ticket struct, clear Volatile and ELicenseRequired flags in conversions to common tickets. * Title: added a function to calculate the number of titles (current + siblings) from a TItleInfo block. * Utils: added a function to generate a dynamically allocated path string using a prefix, a filename and a extension. * Removed explicit offset checks throughout all the code. * Codestyle fixes. * Updated to-do.
55 lines
2.1 KiB
C
55 lines
2.1 KiB
C
/*
|
|
* bftff.h
|
|
*
|
|
* Copyright (c) 2018, simontime.
|
|
* Copyright (c) 2020, DarkMatterCore <pabloacurielz@gmail.com>.
|
|
*
|
|
* This file is part of nxdumptool (https://github.com/DarkMatterCore/nxdumptool).
|
|
*
|
|
* nxdumptool is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* nxdumptool is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef __BFTTF_H__
|
|
#define __BFTTF_H__
|
|
|
|
/// Loosely based on PlSharedFontType.
|
|
typedef enum {
|
|
BfttfFontType_Standard = 0, ///< Japan, US and Europe
|
|
BfttfFontType_NintendoExt1 = 1, ///< Nintendo Extended (1). This font only has the special Nintendo-specific characters, which aren't available with the other fonts.
|
|
BfttfFontType_NintendoExt2 = 2, ///< Nintendo Extended (2). This font only has the special Nintendo-specific characters, which aren't available with the other fonts.
|
|
BfttfFontType_Korean = 3, ///< Korean (Hangul).
|
|
BfttfFontType_ChineseSimplified = 4, ///< Chinese Simplified.
|
|
BfttfFontType_ExtChineseSimplified = 5, ///< Extended Chinese Simplified.
|
|
BfttfFontType_ChineseTraditional = 6, ///< Chinese Traditional.
|
|
BfttfFontType_Total = 7 ///< Total fonts supported by this enum.
|
|
} BfttfFontType;
|
|
|
|
/// Loosely based on PlFontData.
|
|
typedef struct {
|
|
u8 type; ///< BfttfFontType.
|
|
u32 size; ///< Decoded BFTFF font size.
|
|
void *ptr; ///< Pointer to font data.
|
|
} BfttfFontData;
|
|
|
|
/// Initializes the BFTTF interface.
|
|
bool bfttfInitialize(void);
|
|
|
|
/// Closes the BFTTF interface.
|
|
void bfttfExit(void);
|
|
|
|
/// Returns a specific BFTTF font using the provided BfttfFontType.
|
|
bool bfttfGetFontByType(BfttfFontData *font, u8 font_type);
|
|
|
|
#endif /* __BFTTF_H__ */
|