90Lit Convert(
const std::vector<nnl::SLight>& slights, glm::vec3 ambient = glm::vec3(0),
bool enable_specular =
true,
91 float character_brightness = 1.0f);
106bool IsOfType(
const std::filesystem::path& path);
125Lit Import(
const std::filesystem::path& path);
139void Export(
const Lit&
lit,
const std::filesystem::path& path);
158static_assert(
sizeof(RLight) == 0x9);
162 u8 active_flags = 0b0'0'0;
163 RLight lights[4] = {};
164 Vec3<i8> shadow_light_direction{0};
165 u8 character_brightness = 0;
166 Vec3<u8> global_ambient{0};
167 u32 unknown30 = 0xFF'FF'FF'FF;
171static_assert(
sizeof(RLit) == 0x35);
173Lit Convert(
const RLit& rlit);
175RLit Parse(Reader& f);
Provides functions and classes for handling binary data.
Contains macros and definitions for fixed-width types.
constexpr u32 FourCC(const char(&str)[5]) noexcept
Generates a numeric four character code from a given string.
Definition data.hpp:36
3D vector template with packed storage
Definition fixed_type.hpp:163
std::uint32_t u32
32-bit unsigned integer
Definition fixed_type.hpp:60
std::uint8_t u8
8-bit unsigned integer
Definition fixed_type.hpp:64
#define NNL_PACK(...)
A structure packing directive.
Definition fixed_type.hpp:41
glm::vec3 cel_shadow_light_direction
Definition lit.hpp:62
std::array< Light, 3 > lights
Definition lit.hpp:60
u32 specular
Definition lit.hpp:52
u32 diffuse
Definition lit.hpp:50
glm::vec3 direction
Direction to the light source.
Definition lit.hpp:49
u32 global_ambient
Definition lit.hpp:66
u8 character_brightness
Definition lit.hpp:64
bool active
Indicates if the light is used.
Definition lit.hpp:48
Represents a lighting configuration for a scene.
Definition lit.hpp:59
Represents a directional light in the scene. This structure represents a directional light source tha...
Definition lit.hpp:47
Lit Import(BufferView buffer)
Parses a binary file and converts it to a Lit struct.
Buffer Export(const Lit &lit)
Converts a light config to a binary file representation.
bool IsOfType(BufferView buffer)
Tests if the provided file is a light source config.
std::vector< nnl::SLight > Convert(const Lit &lit)
Converts a light config to a more generic representation that is more suitable for exporting into oth...
constexpr u32 kMagicBytes
Magic bytes.
Definition lit.hpp:150
Provides classes for reading and writing binary data to and from various sources.
Contains structures and functions for working with light source configs.
Definition lit.hpp:32
Definition exception.hpp:56
Provides data structures for representing essential components of a 3D asset.