#ifndef MENU_MAIN_H #define MENU_MAIN_H /****************************************************************************** * NCRS Types * ******************************************************************************/ #define NCRS_ColorPair_XList(X)\ X(WHITE, BLACK) \ X(RED, BLACK) \ X(GREEN, BLACK) \ X(BLUE, BLACK) \ X(YELLOW, BLACK) \ X(MAGENTA, BLACK) \ X(CYAN, BLACK) \ X(BLACK, WHITE) \ X(BLACK, RED) \ X(BLACK, GREEN) \ X(BLACK, BLUE) \ X(BLACK, YELLOW) \ X(BLACK, MAGENTA) \ X(BLACK, CYAN) typedef enum NCRS_ColorPair{ NCRS_ColorPair_NULL = 0, #define X(F,B) NCRS_ColorPair_##F##_##B, NCRS_ColorPair_XList(X) #undef X NCRS_ColorPair_COUNT } NCRS_ColorPair; typedef struct NCRS_Bfr{ U32 w; U32 h; U8 *chr; U8 *color; } NCRS_Bfr; /****************************************************************************** * NCRS Functions * ******************************************************************************/ MR4TH_SYMBOL NCRS_Bfr ncrs_bfr_alloc(Arena *arena, U32 w, U32 h); MR4TH_SYMBOL void ncrs_bfr_fill_rect(NCRS_Bfr *bfr, RectS32 rect, U8 chr, U8 color); MR4TH_SYMBOL void ncrs_bfr_outline_rect(NCRS_Bfr *bfr, RectS32 rect, U8 chr, U8 color); MR4TH_SYMBOL void ncrs_bfr_write(NCRS_Bfr *bfr, S32 x, S32 y, S32 xmax, String8 str, U8 color); MR4TH_SYMBOL void ncrs_bfr_to_window(NCRS_Bfr *bfr, WINDOW *w); #endif //MENU_MAIN_H