
part: - remove mlx3ds_3dskey.h, instead use hid.h - add definitions of: - mlx_init() - mlx_new_window() - mlx_clear_window() - mlx_destroy_window() - mlx_pixel_put() - mlx_new_image() - mlx_get_data_addr() - mlx_put_image_to_window() - mlx_destroy_image() dev: - Makefile: add rule check_headers - Makefile: add variable FLAGS (call 'make rule FLAGS=flags' to add flags to compilation) - add /dev/norm.sh: nicer norminette - add tester in main(), and related utilsconsole.* docs: - make clear mlx_get_data_addr() docs
31 lines
920 B
C
31 lines
920 B
C
/**
|
|
* mlx_inline.c
|
|
* for the project "MinilibX for 3DS"
|
|
* by Zy
|
|
* at https://github.com/frzysk/mlx3ds
|
|
*/
|
|
|
|
#include "3ds.h"
|
|
|
|
/// @brief Write a color at a specific location of the memory,
|
|
/// the 3 color values will be in the same order.
|
|
/// It's basically a memcpy of 3 bytes.
|
|
/// @param dest Address to the first color value of the destination.
|
|
/// @param src Address to the first color value of the source.
|
|
inline void mlx_inline_drawcolor(u8 *dest, u8 *src)
|
|
{
|
|
dest[0] = src[0];
|
|
dest[1] = src[1];
|
|
dest[2] = src[2];
|
|
}
|
|
|
|
/// @brief Write a color at a specific location of the memory,
|
|
/// the 3 color values will be in opposite order.
|
|
/// @param dest Address to the first color value of the destination.
|
|
/// @param src Address to the first color value of the source.
|
|
inline void mlx_inline_drawcolor_invert(u8 *dest, u8 *src)
|
|
{
|
|
dest[2] = src[0];
|
|
dest[1] = src[1];
|
|
dest[0] = src[2];
|
|
}
|