part: add mlx3ds_assets_get() and file embedding *

TODO: docs
also add tester for sdcard files
This commit is contained in:
Zy 2024-10-10 23:25:15 +02:00
parent d57afcccc6
commit 09e319024d
15 changed files with 392 additions and 24 deletions

16
include/mlx3ds.h Normal file
View file

@ -0,0 +1,16 @@
/**
* mlx3ds.h
* for the project "MinilibX for 3DS"
* by Zy
* at https://github.com/frzysk/mlx3ds
*/
// TODO docs
#ifndef MLX3DS_H
# define MLX3DS_H
# include "mlx3ds_typealiases.h"
# include "mlx3ds_embeddedassets.h"
#endif

View file

@ -0,0 +1,26 @@
/**
* mlx3ds_embeddedassets.h
* for the project "MinilibX for 3DS"
* by Zy
* at https://github.com/frzysk/mlx3ds
*/
// TODO docs
#ifndef MLX3DS_ASSETS_H
# define MLX3DS_ASSETS_H
# include <string.h>
// TODO docs
typedef struct s_embeddedasset
{
const char *name;
size_t size;
const char *data;
} t_embeddedasset;
// TODO docs
const t_embeddedasset *mlx3ds_assets_get(const char *name);
#endif

View file

@ -50,3 +50,8 @@ int uc_menu_quick(const char *str, ...);
/// @brief Blocks the program until the user presses A.
/// @details Will also return if aptMainLoop() becomes false.
void uc_pause(void);
/// @brief Show the 3DS keyboard to ask the user for a text.
/// @param def The default text to show the user.
/// @return A freeable address to the text prompted by the user. NULL if error.
char *uc_keyboard(const char *def);

View file

@ -0,0 +1,22 @@
/**
* utilsconsole_extern_c.h
* by Zy
*/
/**
* utilsconsole_extern_c.h (uc_*() functions)
*/
#ifndef UTILSCONSOLE_EXTERN_C_H
# define UTILSCONSOLE_EXTERN_C_H
/// @brief Blocks the program until the user presses A.
/// @details Will also return if aptMainLoop() becomes false.
void uc_pause(void);
/// @brief Show the 3DS keyboard to ask the user for a text.
/// @param def The default text to show the user.
/// @return A freeable address to the text prompted by the user. NULL if error.
char *uc_keyboard(const char *def);
#endif

View file

@ -1,17 +0,0 @@
/**
* utilsconsole_pause.h
* by Zy
*/
/**
* utilsconsole_pause.h (uc_pause() function)
*/
#ifndef UTILSCONSOLE_PAUSE_H
# define UTILSCONSOLE_PAUSE_H
/// @brief Blocks the program until the user presses A.
/// @details Will also return if aptMainLoop() becomes false.
void uc_pause(void);
#endif