cammy/include/cammy/photo.h

60 lines
1.5 KiB
C
Raw Normal View History

2016-05-14 23:40:28 -05:00
#ifndef _CAMMY_PHOTO_H
#define _CAMMY_PHOTO_H
#include <stdint.h>
#include <cammy/tile.h>
#define CAMMY_PHOTO_TILES_WIDTH 16
#define CAMMY_PHOTO_TILES_HEIGHT 14
#define CAMMY_PHOTO_SIZE \
(CAMMY_TILE_SIZE * CAMMY_PHOTO_TILES_WIDTH * CAMMY_PHOTO_TILES_HEIGHT)
2016-05-14 23:40:28 -05:00
#define CAMMY_PHOTO_WIDTH \
(CAMMY_TILE_WIDTH * CAMMY_PHOTO_TILES_WIDTH)
#define CAMMY_PHOTO_HEIGHT \
(CAMMY_TILE_HEIGHT * CAMMY_PHOTO_TILES_HEIGHT)
#define CAMMY_PHOTO_THUMB_TILES_WIDTH 4
#define CAMMY_PHOTO_THUMB_TILES_HEIGHT 4
#define CAMMY_PHOTO_INFO_SIZE 256
#pragma pack(1)
#pragma pack(push)
typedef struct _cammy_photo {
cammy_tile tiles[CAMMY_PHOTO_TILES_HEIGHT]
[CAMMY_PHOTO_TILES_WIDTH];
cammy_tile thumb[CAMMY_PHOTO_THUMB_TILES_HEIGHT]
[CAMMY_PHOTO_THUMB_TILES_WIDTH];
uint8_t info[CAMMY_PHOTO_INFO_SIZE];
} cammy_photo;
#pragma pack(pop)
2016-05-17 02:23:19 -05:00
void cammy_photo_export(cammy_photo *src,
uint8_t *dest,
int depth,
cammy_tile_palette *palette);
2016-05-14 23:40:28 -05:00
void cammy_photo_merge(cammy_photo *srcr,
cammy_photo *srcg,
cammy_photo *srcb,
uint8_t *dest,
int depth);
2016-05-17 02:23:19 -05:00
void cammy_photo_import(cammy_photo *dest, uint8_t *src, int depth);
2016-05-15 02:37:19 -05:00
void cammy_photo_import_rgb(cammy_photo *destr,
cammy_photo *destg,
cammy_photo *destb,
uint8_t *src,
int depth);
2016-05-14 23:40:28 -05:00
#endif /* _CAMMY_PHOTO_H */