📄 graph.h
字号:
#ifndef __GRAPH_H
#define __GRAPH_H
#include "osdfont.h"
#define MAP_COLOR_WHITE 0xeb8080
#define MAP_COLOR_YELLOW 0xa28e2c
#define MAP_COLOR_CYAN 0x832c9c
#define MAP_COLOR_GREEN 0x703a48
#define MAP_COLOR_MAGENTA 0x54c6b8
#define MAP_COLOR_RED 0x41d464
#define MAP_COLOR_BLUE 0x2372d4
#define MAP_COLOR_BLACK 0x108080
#define MAP_COLOR_GRAY 0x508080
#define MAP_COLOR_LIGHT_GRAY 0xb08080
#define MAP_COLOR_LIGHT_BLUE 0x8372d4
#if 0
// GPS COLOR BLOCK'S COLOR
#define GPS_BLOCK_COLOR_1 0xf96584 // light blue (bottom)
#define GPS_BLOCK_COLOR_2 0xea7c70 // yellow
#define GPS_BLOCK_COLOR_3 0xd3097b // grass green
#define GPS_BLOCK_COLOR_4 0xd58c84 // pink
#define GPS_BLOCK_COLOR_5 0xd98195 // purple
#define GPS_BLOCK_COLOR_6 0xaf9668 // earth yellow
#define GPS_BLOCK_COLOR_7 0x108080 // not defined
#define GPS_BLOCK_COLOR_8 0xd2689c // blue (lake)
#define GPS_BLOCK_COLOR_9 0xdf8b77
#define GPS_BLOCK_COLOR_10 0xd3097b
#else
// GPS COLOR BLOCK'S COLOR have adusted
#define GPS_BLOCK_COLOR_1 0xed876e // 0xf96584 // light blue (bottom)
#define GPS_BLOCK_COLOR_2 0xf44e88 // 0xea7c70 // yellow
#define GPS_BLOCK_COLOR_3 0xd3097b // 0xd3097b // grass green
#define GPS_BLOCK_COLOR_4 0xd58c84 // 0xd58c84 // pink
#define GPS_BLOCK_COLOR_5 0xc29286 // 0xd98195 // purple
#define GPS_BLOCK_COLOR_6 0xaf9668 // 0xaf9668 // earth yellow
#define GPS_BLOCK_COLOR_7 0x108080 // 0x108080 // not defined
#define GPS_BLOCK_COLOR_8 0xc24dac // 0xd2689c // blue (lake)
#define GPS_BLOCK_COLOR_9 0xdf8b77
#define GPS_BLOCK_COLOR_10 0xd3097b
#endif
#define BIGA 0
#define NUM0 26
#define ARROW 0
#define HAND 1
#define DOT 36
#define SPACE 37
#define NEXT 38
#define PREV 39
#define QUESTION 40
#define PERCENT 41
#define LEFTB 42
#define RIGHTB 43
#define COLON 44
#define BLINE 45
#define CURV 46
#define swap_luma(x) (((x) & 0xffe7) | (((x) & 0x0008) << 1) | (((x) & 0x0010) >> 1))
#define swap_chroma(x) (((x) & 0xffe6) | (((x) & 0x0008) << 1) | (((x) & 0x0010) >> 1))
#include "memmap.h"
#if CONFIG==CONFIG_COMBO_SVCD
#define BASE_LUMA (0)
#ifdef SUPPORT_JPG_DOUBLE_BUFFER
#define BASE_LUMA_1 (MP3_REF1_LUMA_DEF)
#endif
#else
#define BASE_LUMA (regs0->ref0_luma)
#endif
#define BASE_CHROMA (regs0->ref0_chroma)
#ifdef SUPPORT_JPG_DOUBLE_BUFFER
#define BASE_CHROMA_1 (regs0->ref1_chroma)
#endif
#define OFFSET_LUMA (BASE_LUMA * 1024)
#define OFFSET_CHROMA (BASE_CHROMA * 1024)
#define OFFSET_Y(Y) (OFFSET_LUMA + ( Y ) * LINE_OFFSET)
#define OFFSET_C(Y) (OFFSET_CHROMA + ((Y) / 2) * LINE_OFFSET)
#if CONFIG==CONFIG_COMBO_SVCD
#define LINE_OFFSET 1024 /* for LUMA */
#ifdef SUPPORT_ESP
#ifdef SUPPORT_ESP_VIDEO_ON
#define Y_XY(X,Y) ((BYTE *) (SDRAM_BASE | OFFSET_Y(Y) | swap_luma(X)))
#define C_XY(X,Y) ((UINT16 *)(SDRAM_BASE | OFFSET_C(Y) | swap_chroma(X)))
#else /* NOT SUPPORT_ESP_VIDEO_ON */
#define Y_XY(X,Y) (BYTE *)(SDRAM_BASE)
#define C_XY(X,Y) (UINT16 *)(SDRAM_BASE)
#endif /* SUPPORT_ESP_VIDEO_ON */
#else /* NOT SUPPORT_ESP */
#define Y_XY(X,Y) ((BYTE *) (SDRAM_BASE | OFFSET_Y(Y) | swap_luma(X)))
#define C_XY(X,Y) ((UINT16 *)(SDRAM_BASE | OFFSET_C(Y) | swap_chroma(X)))
#endif /* SUPPORT_ESP */
#else
#define LINE_OFFSET 352 /* for LUMA */
#define Y_XY(X,Y) ((BYTE *) (SDRAM_BASE + OFFSET_Y(Y) + (X) ))
#define C_XY(X,Y) ((UINT16 *)(SDRAM_BASE + OFFSET_C(Y) + ((X)&0xfffe)))
#endif
#endif __GRAPH_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -