46#define USE_COCMD_SETBITMAP 1
47#define ENABLE_ROTATEAROUND 1
50#define CIRCLE_MAX 65536
53#define ANGLE(x) (x * 100 * CIRCLE_MAX / (MAX_ANGLE * 100))
104#if USE_COCMD_SETBITMAP
114 if (image->
w < image->
h) {
115 frameSize = image->
h * 2;
118 frameW = frameH = frameSize;
126 linestride = atscBlockSize * ((image->
w + formatW - 1) / formatW);
127 lh = (image->
h + formatH - 1) / formatH;
139 uint16_t translateX = 1, translateY = image->
h - image->
w;
141 if (image->
w < image->
h) {
142 translateX = image->
h - image->
w;
145#if ENABLE_ROTATEAROUND
162 if (image->
tag != 0) {
183 if (isRestart == 1) {
192 ramgAddr += image->
size;
200 if (isRestart == 1) {
210 ramgAddr += image->
size;
EVE's co-processor commmands.
static void EVE_CoCmd_setBitmap(EVE_HalContext *phost, uint32_t source, uint16_t fmt, uint16_t w, uint16_t h)
Send CMD_SETBITMAP.
static void EVE_CoCmd_rotate(EVE_HalContext *phost, int32_t a)
Send CMD_ROTATE.
static void EVE_CoCmd_flashRead(EVE_HalContext *phost, uint32_t dest, uint32_t src, uint32_t num)
Read from Flash to RAM_G. Call EVE_Cmd_waitFlush to wait for completion.
static void EVE_CoCmd_loadIdentity(EVE_HalContext *phost)
Send CMD_LOADIDENTITY.
static void EVE_CoCmd_translate(EVE_HalContext *phost, int32_t tx, int32_t ty)
Send CMD_TRANSLATE.
static void EVE_CoCmd_setMatrix(EVE_HalContext *phost)
Send CMD_SETMATRIX.
static void EVE_CoCmd_rotateAround(EVE_HalContext *phost, int32_t x, int32_t y, int32_t a, int32_t s)
Send CMD_ROTATEAROUND.
#define COMPRESSED_RGBA_ASTC_10x5_KHR
#define COMPRESSED_RGBA_ASTC_10x10_KHR
#define COMPRESSED_RGBA_ASTC_12x10_KHR
#define COMPRESSED_RGBA_ASTC_5x4_KHR
#define COMPRESSED_RGBA_ASTC_5x5_KHR
#define BITMAP_LAYOUT(format, linestride, height)
#define COMPRESSED_RGBA_ASTC_8x5_KHR
#define BITMAP_SIZE_H(width, height)
#define COMPRESSED_RGBA_ASTC_10x8_KHR
#define RESTORE_CONTEXT()
#define BITMAP_EXT_FORMAT(format)
#define COMPRESSED_RGBA_ASTC_10x6_KHR
#define BITMAP_SOURCE(addr)
#define COMPRESSED_RGBA_ASTC_8x8_KHR
#define COMPRESSED_RGBA_ASTC_8x6_KHR
#define BITMAP_LAYOUT_H(linestride, height)
#define COMPRESSED_RGBA_ASTC_6x5_KHR
#define BITMAP_SIZE(filter, wrapx, wrapy, width, height)
#define COMPRESSED_RGBA_ASTC_6x6_KHR
#define COMPRESSED_RGBA_ASTC_12x12_KHR
#define COMPRESSED_RGBA_ASTC_4x4_KHR
#define App_WrCoCmd_Buffer(phost, cmd)
int Image_Copy_To_RamG_And_Draw_Image(EVE_HalContext *phost, Img_t *image, uint32_t isRestart)
static void setupBitmap(EVE_HalContext *phost, Img_t *image)
int Image_Draw_From_RAM_G(EVE_HalContext *phost, uint32_t address, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t bitmapLayout, uint32_t extFormat, uint8_t tag)
int Image_Copy_To_RamG(EVE_HalContext *phost, Img_t *image, uint32_t isRestart)
static void rotateBitmap(EVE_HalContext *phost, Img_t *image)
static uint32_t getformatW(uint32_t format)
static void drawBitmap(EVE_HalContext *phost, Img_t *image)
int Image_Draw_From_Flash(EVE_HalContext *phost, uint32_t address, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t bitmapLayout, uint32_t extFormat, uint8_t tag)
int Image_Draw(EVE_HalContext *phost, Img_t *image)
#define ANGLE(x)
Graphics unity.
static uint32_t getformatH(uint32_t format)
int Image_Setup_Rotate(float angle, uint32_t rootx, uint32_t rooty)
static float mangle
Status stores.