dev: clean docs and everything, add TODOs
This commit is contained in:
parent
8fdc653722
commit
898162121d
20 changed files with 74 additions and 127 deletions
|
|
@ -17,9 +17,6 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Functions to use the assets embedded with the program with embedassets.sh
|
||||
* This file contains functions to use the assets embedded with the program
|
||||
* with embedassets.sh.
|
||||
*/
|
||||
|
||||
#ifndef MLX3DS_ASSETS_H
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Define different type aliases for the different void* values used with
|
||||
* the mlx_ functions.
|
||||
* This file contains different typedefs for void*, to differenciate between
|
||||
* the different void* used by the MLX functions.
|
||||
*/
|
||||
|
||||
#ifndef MLX3DS_TYPEALIASES_H
|
||||
# define MLX3DS_TYPEALIASES_H
|
||||
|
||||
|
|
@ -21,4 +22,4 @@ typedef void *t_win;
|
|||
/// @brief Reference to an image in memory.
|
||||
typedef void *t_image;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Functions to manage window events.
|
||||
* This file contains the functions used to manage window events.
|
||||
*/
|
||||
|
||||
#ifndef MLX_HOOK_H
|
||||
|
|
@ -43,7 +43,6 @@ int _mlx_mouse_hook(t_win win_ptr, int (*funct_ptr)(), void *param);
|
|||
/// @param funct_ptr Function to call when the event occurs. `keycode` is the
|
||||
/// key pressed (note that they are obviously different than
|
||||
/// the keyboard ones, use the KEY_* constants from hid.h)).
|
||||
/// (TODO what was the name of the key constants use with mlx?)
|
||||
/// `param` is set as the address given to mlx_key_hook().
|
||||
/// The return value is unused.
|
||||
/// @param param Address to pass to the function every time it is called.
|
||||
|
|
|
|||
|
|
@ -17,13 +17,14 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Functions to import, create, modify and display images.
|
||||
* This file contains functions to import, create, modify and display images.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image (despite how the 3ds screen works, for those
|
||||
* who know).
|
||||
*/
|
||||
|
||||
#ifndef MLX_IMAGE_H
|
||||
|
|
@ -67,17 +68,17 @@ char *mlx_get_data_addr(t_image img_ptr, int *bits_per_pixel,
|
|||
int mlx_put_image_to_window(t_mlx mlx_ptr, t_win win_ptr, t_image img_ptr,
|
||||
int x, int y);
|
||||
|
||||
// ??? TODO docs
|
||||
// ??? TODO docs xpm_to_image
|
||||
// width & height CAN be null (check please :3)
|
||||
t_image mlx_xpm_to_image(t_mlx mlx_ptr, const char **xpm_data,
|
||||
int *width, int *height);
|
||||
|
||||
// ???
|
||||
// ??? TODO docs xpm_file_to_image
|
||||
// width & height CAN be null (check please :3)
|
||||
t_image _mlx_xpm_file_to_image(t_mlx mlx_ptr, char *filename,
|
||||
int *width, int *height);
|
||||
|
||||
/// @brief Destroy an image.
|
||||
/// @brief Destroy an image to avoid leaks.
|
||||
///
|
||||
/// @param mlx_ptr mlx connection identifier returned by mlx_init().
|
||||
/// @param img_ptr Image to destroy.
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Functions to draw specific things on the window.
|
||||
* All the functions to draw specific things on the window.
|
||||
*
|
||||
* Note that mlx_put_image_to_window() is in mlx_image.h
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image (despite how the 3ds screen works, for those
|
||||
* who know).
|
||||
*
|
||||
* (The function mlx_put_image_to_window() is declared in mlx_image.h)
|
||||
*/
|
||||
|
||||
#ifndef MLX_PUT_H
|
||||
|
|
@ -34,8 +35,11 @@
|
|||
# include "mlx3ds_typealiases.h"
|
||||
|
||||
/// @brief Draws a pixel on the window.
|
||||
/// @details Way slower than even the original MinilibX.
|
||||
/// Bad function. Those who use it are condemned to have unexplicable
|
||||
/// segfaults in exams.
|
||||
///
|
||||
/// @param mlx_ptr mlx connection identifier returned by mlx_init().
|
||||
/// @param mlx_ptr mlx connectio n identifier returned by mlx_init().
|
||||
/// @param win_ptr Window to affect.
|
||||
/// @param x x position of the pixel to set.
|
||||
/// @param y y position of the pixel to set.
|
||||
|
|
@ -54,7 +58,7 @@ int mlx_pixel_put(t_mlx mlx_ptr, t_win win_ptr, int x, int y, int color);
|
|||
int _mlx_string_put(void *mlx_ptr, void *win_ptr, int x, int y, int color,
|
||||
char *string);
|
||||
|
||||
// ???
|
||||
// TODO docs set_font
|
||||
void _mlx_set_font(void *mlx_ptr, void *win_ptr, char *name);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -66,4 +63,4 @@ int _mlx_do_key_autorepeatoff(t_mlx mlx_ptr);
|
|||
// ???
|
||||
int _mlx_do_key_autorepeaton(t_mlx mlx_ptr);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,13 +17,10 @@
|
|||
* doesn't do anything. The returned values marked as "unused" are undefined.
|
||||
* Both are kept as is to stay as compatible as possible with project using the
|
||||
* original MinilibX implementation.
|
||||
*
|
||||
* When using a x,y couple to define a position, the origin (0,0) is always at
|
||||
* the top-left corner of the image.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Functions to manage windows.
|
||||
* This file contains functions to manage windows.
|
||||
*/
|
||||
|
||||
#ifndef MLX_WINDOW_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue