libmsx
C library for MSX
|
8x8px, 16x16px bitmap image processing. More...
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Typedefs | |
typedef uint8_t | BM8x8[8] |
8x8 pixels 1bpp bitmap image (8 rows x 1 byte/row). | |
typedef BM8x8 | SP8x8 |
8x8 pixels 1bpp sprite pattern (Type alias for BM8x8). | |
typedef BM8x8 | SP16x16[4] |
16x16 pixels 1bpp sprite pattern (Four 8x8px 1bpp images, top left, bottom left, top right, bottom right). | |
Enumerations | |
enum | ImOp { IM_IDENTITY = 0 , IM_COPY = IM_IDENTITY , IM_COMPLEMENT = 1 , IM_TRANSPOSE = (1 << 5) , IM_FLIP_VERT = (1 << 6) , IM_FLIP_HORZ = (1 << 7) , IM_ROTATE_90 = (IM_TRANSPOSE | IM_FLIP_HORZ) , IM_ROTATE_180 = (IM_FLIP_VERT | IM_FLIP_HORZ) , IM_ROTATE_270 = (IM_TRANSPOSE | IM_FLIP_VERT) , IM_ANTITRANSPOSE = (IM_TRANSPOSE | IM_FLIP_VERT | IM_FLIP_HORZ) } |
Enumeration of unary operators for images. More... | |
Functions | |
void | im_copy_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Copy an 8x8 pixels 1bpp image. | |
void | im_copy_v_BM8x8 (const BM8x8 *src) |
MSX Copy an 8x8 pixels 1bpp image. | |
void | im_hflip_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Flip an 8x8 pixels 1bpp image horizontally. | |
void | im_hflip_v_BM8x8 (const BM8x8 *src) |
MSX Flip an 8x8 pixels 1bpp image horizontally. | |
void | im_vflip_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Flip an 8x8 pixels 1bpp image vertically. | |
void | im_vflip_v_BM8x8 (const BM8x8 *src) |
MSX Flip an 8x8 pixels 1bpp image vertically. | |
void | im_tr_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Transpose an 8x8 pixels 1bpp image around the main diagonal. | |
void | im_tr_v_BM8x8 (const BM8x8 *src) |
MSX Transpose an 8x8 pixels 1bpp image around the main diagonal. | |
void | im_adtr_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Transpose an 8x8 pixels 1bpp image around the antidiagonal. | |
void | im_adtr_v_BM8x8 (const BM8x8 *src) |
MSX Transpose an 8x8 pixels 1bpp image around the antidiagonal. | |
void | im_rot90_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Rotate an 8x8 pixels 1bpp image 90 degrees clockwise. | |
void | im_rot90_v_BM8x8 (const BM8x8 *src) |
MSX Rotate an 8x8 pixels 1bpp image 90 degrees clockwise. | |
void | im_rot180_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Rotate an 8x8 pixels 1bpp image 180 degrees. | |
void | im_rot180_v_BM8x8 (const BM8x8 *src) |
MSX Rotate an 8x8 pixels 1bpp image 180 degrees. | |
void | im_rot270_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Rotate an 8x8 pixels 1bpp image 270 degrees clockwise. | |
void | im_rot270_v_BM8x8 (const BM8x8 *src) |
MSX Rotate an 8x8 pixels 1bpp image 270 degrees clockwise. | |
void | im_cmpl_BM8x8 (const BM8x8 *src, BM8x8 *dst) |
MSX Bitwise NOT (complement) of an 8x8 pixel 1bpp image. | |
void | im_cmpl_v_BM8x8 (const BM8x8 *src) |
MSX Bitwise NOT (complement) of an 8x8 pixel 1bpp image. | |
void | im_diff_BM8x8 (const BM8x8 *src1, const BM8x8 *src2, BM8x8 *dst) |
MSX Bitwise SET-DIFFERENCE of two 8x8 pixel 1bpp images. | |
void | im_diff_v_BM8x8 (const BM8x8 *src1, const BM8x8 *src2) |
MSX Bitwise SET-DIFFERENCE of two 8x8 pixel 1bpp images. | |
void | im_and_BM8x8 (const BM8x8 *src1, const BM8x8 *src2, BM8x8 *dst) |
MSX Bitwise AND of two 8x8 pixel 1bpp images. | |
void | im_and_v_BM8x8 (const BM8x8 *src1, const BM8x8 *src2) |
MSX Bitwise AND of two 8x8 pixel 1bpp images. | |
void | im_or_BM8x8 (const BM8x8 *src1, const BM8x8 *src2, BM8x8 *dst) |
MSX Bitwise OR of two 8x8 pixel 1bpp images. | |
void | im_or_v_BM8x8 (const BM8x8 *src1, const BM8x8 *src2) |
MSX Bitwise OR of two 8x8 pixel 1bpp images. | |
void | im_xor_BM8x8 (const BM8x8 *src1, const BM8x8 *src2, BM8x8 *dst) |
MSX Bitwise XOR of two 8x8 pixel 1bpp images. | |
void | im_xor_v_BM8x8 (const BM8x8 *src1, const BM8x8 *src2) |
MSX Bitwise XOR of two 8x8 pixel 1bpp images. | |
void | im_shift_u_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Shift an 8x8 pixel 1bpp image upward. | |
void | im_shift_u_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Shift an 8x8 pixel 1bpp image upward. | |
void | im_shift_d_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Shift an 8x8 pixel 1bpp image downward. | |
void | im_shift_d_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Shift an 8x8 pixel 1bpp image downward. | |
void | im_shift_l_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Shift an 8x8 pixel 1bpp image to the left. | |
void | im_shift_l_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Shift an 8x8 pixel 1bpp image to the left. | |
void | im_shift_r_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Shift an 8x8 pixel 1bpp image to the right. | |
void | im_shift_r_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Shift an 8x8 pixel 1bpp image to the right. | |
void | im_rotate_u_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image upward. | |
void | im_rotate_u_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image upward. | |
void | im_rotate_d_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image downward. | |
void | im_rotate_d_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image downward. | |
void | im_rotate_l_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image to the left. | |
void | im_rotate_l_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image to the left. | |
void | im_rotate_r_BM8x8 (uint8_t sft, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image to the right. | |
void | im_rotate_r_v_BM8x8 (uint8_t sft, const BM8x8 *src) |
MSX Rotate (scroll) an 8x8 pixel 1bpp image to the right. | |
void | im_shift_l_vec_BM8x8 (uint8_t sft, size_t n, const BM8x8 *src, BM8x8 *dst) |
MSX Shift n-columns row vector of 8x8 pixel 1bpp image to the left. | |
void | im_shift_r_vec_BM8x8 (uint8_t sft, size_t n, const BM8x8 *src, BM8x8 *dst) |
MSX Shift n-columns row vector of 8x8 pixel 1bpp image to the right. | |
void | im_rotate_l_vec_BM8x8 (uint8_t sft, size_t n, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) n-columns row vector of 8x8 pixel 1bpp image to the left. | |
void | im_rotate_r_vec_BM8x8 (uint8_t sft, size_t n, const BM8x8 *src, BM8x8 *dst) |
MSX Rotate (scroll) n-columns row vector of 8x8 pixel 1bpp image to the right. | |
void | im_tilemap_BM8x8 (const BM8x8 tileset[256], size_t n, const uint8_t tilemap[][2], BM8x8 *dst) |
MSX Construct a set of 8x8 pixels 1bpp tile images from tileset and tilemap. | |
void | im_tilemap_v_BM8x8 (const BM8x8 tileset[256], size_t n, const uint8_t tilemap[][2]) |
MSX Construct a set of 8x8 pixels 1bpp tile images from tileset and tilemap. | |
void | im_copy_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Copy an 16x16 pixels 1bpp sprite pattern. | |
void | im_copy_v_SP16x16 (const SP16x16 *src) |
MSX Copy an 16x16 pixels 1bpp sprite pattern. | |
void | im_hflip_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Flip an 16x16 pixels 1bpp sprite pattern horizontally. | |
void | im_hflip_v_SP16x16 (const SP16x16 *src) |
MSX Flip an 16x16 pixels 1bpp sprite pattern horizontally. | |
void | im_vflip_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Flip an 16x16 pixels 1bpp sprite pattern vertically. | |
void | im_vflip_v_SP16x16 (const SP16x16 *src) |
MSX Flip an 16x16 pixels 1bpp sprite pattern vertically. | |
void | im_tr_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Transpose an 16x16 pixels 1bpp sprite pattern around the main diagonal. | |
void | im_tr_v_SP16x16 (const SP16x16 *src) |
MSX Transpose an 16x16 pixels 1bpp sprite pattern around the main diagonal. | |
void | im_adtr_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Transpose an 16x16 pixels 1bpp sprite pattern around the antidiagonal. | |
void | im_adtr_v_SP16x16 (const SP16x16 *src) |
MSX Transpose an 16x16 pixels 1bpp sprite pattern around the antidiagonal. | |
void | im_rot90_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 90 degrees clockwise. | |
void | im_rot90_v_SP16x16 (const SP16x16 *src) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 90 degrees clockwise. | |
void | im_rot180_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 180 degrees. | |
void | im_rot180_v_SP16x16 (const SP16x16 *src) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 180 degrees. | |
void | im_rot270_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 270 degrees clockwise. | |
void | im_rot270_v_SP16x16 (const SP16x16 *src) |
MSX Rotate an 16x16 pixels 1bpp sprite pattern 270 degrees clockwise. | |
void | im_cmpl_SP16x16 (const SP16x16 *src, SP16x16 *dst) |
MSX Bitwise NOT (complement) of an 16x16 pixels 1bpp sprite pattern. | |
void | im_cmpl_v_SP16x16 (const SP16x16 *src) |
MSX Bitwise NOT (complement) of an 16x16 pixels 1bpp sprite pattern. | |
void | im_diff_SP16x16 (const SP16x16 *src1, const SP16x16 *src2, SP16x16 *dst) |
MSX Bitwise SET-DIFFERENCE of two 16x16 pixels 1bpp sprite patterns. | |
void | im_diff_v_SP16x16 (const SP16x16 *src1, const SP16x16 *src2) |
MSX Bitwise SET-DIFFERENCE of two 16x16 pixels 1bpp sprite patterns. | |
void | im_and_SP16x16 (const SP16x16 *src1, const SP16x16 *src2, SP16x16 *dst) |
MSX Bitwise AND of two 16x16 pixel 1bpp sprite patterns. | |
void | im_and_v_SP16x16 (const SP16x16 *src1, const SP16x16 *src2) |
MSX Bitwise AND of two 16x16 pixel 1bpp sprite patterns. | |
void | im_or_SP16x16 (const SP16x16 *src1, const SP16x16 *src2, SP16x16 *dst) |
MSX Bitwise OR of two 16x16 pixel 1bpp sprite patterns. | |
void | im_or_v_SP16x16 (const SP16x16 *src1, const SP16x16 *src2) |
MSX Bitwise OR of two 16x16 pixel 1bpp sprite patterns. | |
void | im_xor_SP16x16 (const SP16x16 *src1, const SP16x16 *src2, SP16x16 *dst) |
MSX Bitwise XOR of two 16x16 pixel 1bpp sprite patterns. | |
void | im_xor_v_SP16x16 (const SP16x16 *src1, const SP16x16 *src2) |
MSX Bitwise XOR of two 16x16 pixel 1bpp sprite patterns. | |
void | im_shift_u_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Shift an 16x16 pixel 1bpp sprite pattern upward. | |
void | im_shift_u_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Shift an 16x16 pixel 1bpp sprite pattern upward. | |
void | im_shift_d_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Shift an 16x16 pixel 1bpp sprite pattern downward. | |
void | im_shift_d_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Shift an 16x16 pixel 1bpp sprite pattern downward. | |
void | im_shift_l_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Shift an 16x16 pixel 1bpp sprite pattern to the left. | |
void | im_shift_l_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Shift an 16x16 pixel 1bpp sprite pattern to the left. | |
void | im_shift_r_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Shift an 16x16 pixel 1bpp sprite pattern to the right. | |
void | im_shift_r_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Shift an 16x16 pixel 1bpp sprite pattern to the right. | |
void | im_rotate_u_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern upward. | |
void | im_rotate_u_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern upward. | |
void | im_rotate_d_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern downward. | |
void | im_rotate_d_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern downward. | |
void | im_rotate_l_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern to the left. | |
void | im_rotate_l_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern to the left. | |
void | im_rotate_r_SP16x16 (uint8_t sft, const SP16x16 *src, SP16x16 *dst) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern to the right. | |
void | im_rotate_r_v_SP16x16 (uint8_t sft, const SP16x16 *src) |
MSX Rotate (scroll) an 16x16 pixel 1bpp sprite pattern to the right. | |
void | im_trim_SP16x16 (uint8_t tblr[4], const SP16x16 *src, SP16x16 *dst) |
MSX Trim 16x16 pixels 1bpp sprite pattern. | |
8x8px, 16x16px bitmap image processing.
Definition in file im.h.