|
NSUNI/NSLAR Library a250670
|
Classes | |
| struct | nnl::minimap::MinimapConfig |
| Defines settings for a minimap. More... | |
Functions | |
| bool | nnl::minimap::IsOfType (BufferView buffer) |
| Tests if the provided file is a minimap config. | |
| MinimapConfig | nnl::minimap::Import (BufferView buffer) |
| Parses a binary file and converts it to a MinimapConfig struct. | |
| Buffer | nnl::minimap::Export (const MinimapConfig &minimap) |
| Converts a minimap config to a binary file representation. | |
| std::vector< SPosition > | nnl::minimap::Convert (const MinimapConfig &minimap, unsigned int texture_width) |
| Converts a minimap config to a simplified representation. | |
| MinimapConfig | nnl::minimap::Convert (const std::vector< SPosition > &minimap_pos, unsigned int texture_width) |
| Converts a list of positions to the in-game minimap config format. | |
| struct nnl::minimap::MinimapConfig |
Defines settings for a minimap.
Public Attributes | |
| f32 | anchor_x = 0.0f |
| f32 | anchor_z = 0.0f |
| f32 | pixels_per_unit = 0.0f |
| Ratio of texture pixels to world units (Texture Width / World Width) | |
| std::vector< glm::vec3 > | markers |
| f32 nnl::minimap::MinimapConfig::anchor_x = 0.0f |
The world-space X anchor, offset by the PSP's half-screen width scaled by the pixel ratio. ((world_x + (240.0f / pixels_per_unit)))
| f32 nnl::minimap::MinimapConfig::anchor_z = 0.0f |
The world-space Z anchor, offset by the PSP's half-screen height scaled by the pixel ratio. ((world_z + (136.0f / pixels_per_unit)))
| std::vector<glm::vec3> nnl::minimap::MinimapConfig::markers |
Used only in NSUNI, mostly to mark closed areas. X/Y are pixel coordinates, Z is rotation in degrees.
| f32 nnl::minimap::MinimapConfig::pixels_per_unit = 0.0f |
Ratio of texture pixels to world units (Texture Width / World Width)
| std::vector< SPosition > nnl::minimap::Convert | ( | const MinimapConfig & | minimap, |
| unsigned int | texture_width ) |
Converts a minimap config to a simplified representation.
This function converts an in-game minimap config to a list of world-space positions.
The first SPosition object in the resulting vector represents the world-space origin aligned with the top-left corner of the minimap image. The second SPosition object marks the world-space boundary aligned with the top-right corner of the image. The remaining objects (if present) represent various map markers in the world space.
| minimap | The input config to be converted. |
| texture_width | The width of the minimap texture (e.g., 128 or 480). |
| MinimapConfig nnl::minimap::Convert | ( | const std::vector< SPosition > & | minimap_pos, |
| unsigned int | texture_width ) |
Converts a list of positions to the in-game minimap config format.
The first SPosition object is assumed to be the world-space origin aligned with the top-left corner of a minimap image. The second SPosition object is assumed to be the world-space boundary aligned with the top-right corner of the same image. The remaining objects, if present, are converted to 2D map markers.
| minimap_pos | The input positions to be converted. |
| texture_width | The width of the minimap texture. |
|
nodiscard |
Converts a minimap config to a binary file representation.
This function takes a MinimapConfig object and converts it into a Buffer, which represents the binary format of the minimap config.
| minimap | The MinimapConfig object to be converted into a binary format. |
| MinimapConfig nnl::minimap::Import | ( | BufferView | buffer | ) |
Parses a binary file and converts it to a MinimapConfig struct.
This function takes a binary representation of a minimap config, parses its contents, and converts them into a MinimapConfig struct for easier access and manipulation.
| buffer | The binary data to be processed. |
| bool nnl::minimap::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is a minimap config.
This function takes data representing a file and checks whether it corresponds to the in-game minimap config format.
| buffer | The data to be tested. |