docs: mlx3ds.h and mlx3ds_embeddedassets.h

This commit is contained in:
Zy 2024-10-11 19:20:18 +02:00
parent d305f831e8
commit 8fdc653722
2 changed files with 17 additions and 4 deletions

View file

@ -5,7 +5,10 @@
* at https://github.com/frzysk/mlx3ds
*/
// TODO docs
/**
* This file includes everything that doesn't exist in the original MinilibX
* but can be useful for the 3DS implementation.
*/
#ifndef MLX3DS_H
# define MLX3DS_H

View file

@ -5,22 +5,32 @@
* at https://github.com/frzysk/mlx3ds
*/
// TODO docs
/**
* Functions to use the assets embedded with the program with embedassets.sh
*/
#ifndef MLX3DS_ASSETS_H
# define MLX3DS_ASSETS_H
# include <string.h>
// TODO docs
/// @brief Represents a file embedded with the program.
typedef struct s_embeddedasset
{
/// @brief Path of the file, relative to the assets directory (`.+(/.+)+`).
const char *name;
/// @brief Size of the file content.
size_t size;
/// @brief Content of the file. NUL-terminated (data[size] is '\0').
const char *data;
} t_embeddedasset;
// TODO docs
/// @brief Get an reference to the t_embeddedasset from its name.
///
/// @param name Name of the asset to get.
/// @return A reference to the asset. NULL if the asset doesn't exist.
const t_embeddedasset *mlx3ds_assets_get(const char *name);
// TODO add mlx3ds_assets_open()
#endif