use libnx nro.h
This commit is contained in:
parent
43fc635fdf
commit
12ef7f766b
@ -54,7 +54,7 @@ typedef union {
|
|||||||
|
|
||||||
// when building for pc we need to include nro.h separately
|
// when building for pc we need to include nro.h separately
|
||||||
#ifndef __SWITCH__
|
#ifndef __SWITCH__
|
||||||
#include "nro.h"
|
#include <switch/nro.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void menuStartup();
|
void menuStartup();
|
||||||
|
54
common/nro.h
54
common/nro.h
@ -1,54 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file nro.h
|
|
||||||
* @brief NRO headers.
|
|
||||||
* @copyright libnx Authors
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define NROHEADER_MAGIC 0x304f524e
|
|
||||||
|
|
||||||
#define NROASSETHEADER_MAGIC 0x54455341
|
|
||||||
#define NROASSETHEADER_VERSION 0
|
|
||||||
|
|
||||||
/// Entry for each segment in the codebin.
|
|
||||||
typedef struct {
|
|
||||||
u32 file_off;
|
|
||||||
u32 size;
|
|
||||||
} NroSegment;
|
|
||||||
|
|
||||||
/// Offset 0x0 in the NRO.
|
|
||||||
typedef struct {
|
|
||||||
u32 unused;
|
|
||||||
u32 mod_offset;
|
|
||||||
u8 padding[8];
|
|
||||||
} NroStart;
|
|
||||||
|
|
||||||
/// This follows NroStart, the actual nro-header.
|
|
||||||
typedef struct {
|
|
||||||
u32 magic;
|
|
||||||
u32 unk1;
|
|
||||||
u32 size;
|
|
||||||
u32 unk2;
|
|
||||||
NroSegment segments[3];
|
|
||||||
u32 bss_size;
|
|
||||||
u32 unk3;
|
|
||||||
u8 build_id[0x20];
|
|
||||||
u8 padding[0x20];
|
|
||||||
} NroHeader;
|
|
||||||
|
|
||||||
/// Custom asset section.
|
|
||||||
typedef struct {
|
|
||||||
u64 offset;
|
|
||||||
u64 size;
|
|
||||||
} NroAssetSection;
|
|
||||||
|
|
||||||
/// Custom asset header.
|
|
||||||
typedef struct {
|
|
||||||
u32 magic;
|
|
||||||
u32 version;
|
|
||||||
NroAssetSection icon;
|
|
||||||
NroAssetSection nacp;
|
|
||||||
NroAssetSection romfs;
|
|
||||||
} NroAssetHeader;
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user