diff --git a/include/mlx3ds.h b/include/mlx3ds.h index e9d705f..eb3f2b9 100644 --- a/include/mlx3ds.h +++ b/include/mlx3ds.h @@ -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 diff --git a/include/mlx3ds_embeddedassets.h b/include/mlx3ds_embeddedassets.h index 3fd1c0b..0520cea 100644 --- a/include/mlx3ds_embeddedassets.h +++ b/include/mlx3ds_embeddedassets.h @@ -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 -// 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