NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
ui.hpp
Go to the documentation of this file.
1
15#pragma once
16
18#include "NNL/common/io.hpp"
19namespace nnl {
26
31namespace ui {
46bool IsOfType(BufferView buffer);
47
48bool IsOfType(const std::filesystem::path& path);
49
50bool IsOfType(Reader& f);
52namespace raw {
53constexpr u32 kMagicBytes = 0x00'00'80'01;
54
55NNL_PACK(struct RHeader {
56 u32 magic_bytes = kMagicBytes;
57 u16 num_struct_0 = 0;
58 u16 num_struct_1 = 0;
59 u16 num_struct_2 = 0;
60 u16 num_struct_3 = 0;
61 u16 num_struct_4 = 0;
62 u16 num_struct_5 = 0;
63 u16 num_struct_6 = 0;
64 u16 num_struct_7 = 0;
65 u16 num_struct_8 = 0;
66 u16 padding = 0;
67 u32 offset_struct_0 = 0;
68 u32 offset_struct_1 = 0;
69 u32 offset_struct_2 = 0;
70 u32 offset_struct_3 = 0;
71 u32 offset_struct_4 = 0;
72 u32 offset_struct_5 = 0;
73 u32 offset_struct_6 = 0;
74 // u32 offset_struct_7 = 0;
75 // u32 offset_struct_8 = 0;
76});
77
78static_assert(sizeof(RHeader) == 0x34);
79} // namespace raw
80
81} // namespace ui
82
83} // namespace nnl
Contains macros and definitions for fixed-width types.
std::uint16_t u16
16-bit unsigned integer
Definition fixed_type.hpp:62
std::uint32_t u32
32-bit unsigned integer
Definition fixed_type.hpp:60
#define NNL_PACK(...)
A structure packing directive.
Definition fixed_type.hpp:41
Reader implementation for read-only memory buffers.
Definition io.hpp:598
Abstract class for reading data.
Definition io.hpp:78
bool IsOfType(BufferView buffer)
Tests if the provided file is a UI config.
Provides classes for reading and writing binary data to and from various sources.
Contains structures and functions for working with in-game ui configs.
Definition ui.hpp:31
Definition exception.hpp:56