Add more define constants for file magics.
This commit is contained in:
parent
fbac545897
commit
68614f005f
@ -5,6 +5,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#define CBMD_MAGIC "CBMD"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char magic[4];
|
char magic[4];
|
||||||
u32 zero;
|
u32 zero;
|
||||||
@ -17,7 +19,7 @@ static void* cbmd_build_data(u32* size, CBMD cbmd, bool bnr) {
|
|||||||
CBMDHeader header;
|
CBMDHeader header;
|
||||||
memset(&header, 0, sizeof(header));
|
memset(&header, 0, sizeof(header));
|
||||||
|
|
||||||
memcpy(header.magic, "CBMD", sizeof(header.magic));
|
memcpy(header.magic, CBMD_MAGIC, sizeof(header.magic));
|
||||||
|
|
||||||
u32 outputSize = sizeof(CBMDHeader);
|
u32 outputSize = sizeof(CBMDHeader);
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
|
#define SMDH_MAGIC "SMDH"
|
||||||
|
|
||||||
#define SMDH_NUM_LANGUAGE_SLOTS 16
|
#define SMDH_NUM_LANGUAGE_SLOTS 16
|
||||||
#define SMDH_NUM_VALID_LANGUAGE_SLOTS 12
|
#define SMDH_NUM_VALID_LANGUAGE_SLOTS 12
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ int cmd_process_command(int argc, char* argv[]) {
|
|||||||
SMDH smdh;
|
SMDH smdh;
|
||||||
memset(&smdh, 0, sizeof(smdh));
|
memset(&smdh, 0, sizeof(smdh));
|
||||||
|
|
||||||
memcpy(smdh.magic, "SMDH", sizeof(smdh.magic));
|
memcpy(smdh.magic, SMDH_MAGIC, sizeof(smdh.magic));
|
||||||
|
|
||||||
static const char* shortTitleShortArgs[SMDH_NUM_VALID_LANGUAGE_SLOTS] = {"js", "es", "fs", "gs", "is", "ss", "scs", "ks", "ds", "ps", "rs", "tcs"};
|
static const char* shortTitleShortArgs[SMDH_NUM_VALID_LANGUAGE_SLOTS] = {"js", "es", "fs", "gs", "is", "ss", "scs", "ks", "ds", "ps", "rs", "tcs"};
|
||||||
static const char* shortTitleLongArgs[SMDH_NUM_VALID_LANGUAGE_SLOTS] = {"japaneseshorttitle", "englishshorttitle", "frenchshorttitle", "germanshorttitle", "italianshorttitle", "spanishshorttitle", "simplifiedchineseshorttitle", "koreanshorttitle", "dutchshorttitle", "portugueseshorttitle", "russianshorttitle", "traditionalchineseshorttitle"};
|
static const char* shortTitleLongArgs[SMDH_NUM_VALID_LANGUAGE_SLOTS] = {"japaneseshorttitle", "englishshorttitle", "frenchshorttitle", "germanshorttitle", "italianshorttitle", "spanishshorttitle", "simplifiedchineseshorttitle", "koreanshorttitle", "dutchshorttitle", "portugueseshorttitle", "russianshorttitle", "traditionalchineseshorttitle"};
|
||||||
|
Loading…
Reference in New Issue
Block a user