From b9b74e88028f81e7b169a5e168102138e8c2c46c Mon Sep 17 00:00:00 2001 From: yzrh Date: Sat, 10 Oct 2020 17:16:14 +0000 Subject: Initial commit. --- src/screen.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/screen.h (limited to 'src/screen.h') diff --git a/src/screen.h b/src/screen.h new file mode 100644 index 0000000..158cdaa --- /dev/null +++ b/src/screen.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2019-2020, yzrh + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 480 +#define SCREEN_UNIT 20 + +#define COLOUR_FOREGROUND_R 51 +#define COLOUR_FOREGROUND_G 255 +#define COLOUR_FOREGROUND_B 51 +#define COLOUR_BACKGROUND_R 40 +#define COLOUR_BACKGROUND_G 40 +#define COLOUR_BACKGROUND_B 40 +#define COLOUR_BACKGROUND_SHADE_R 80 +#define COLOUR_BACKGROUND_SHADE_G 80 +#define COLOUR_BACKGROUND_SHADE_B 80 + +#define COLOUR_RED_R 255 +#define COLOUR_RED_G 0 +#define COLOUR_RED_B 0 +#define COLOUR_GREEN_R 0 +#define COLOUR_GREEN_G 255 +#define COLOUR_GREEN_B 0 +#define COLOUR_BLUE_R 0 +#define COLOUR_BLUE_G 0 +#define COLOUR_BLUE_B 255 + +#define COLOUR_YELLOW_R 255 +#define COLOUR_YELLOW_G 255 +#define COLOUR_YELLOW_B 0 +#define COLOUR_MAGENTA_R 255 +#define COLOUR_MAGENTA_G 0 +#define COLOUR_MAGENTA_B 255 +#define COLOUR_CYAN_R 0 +#define COLOUR_CYAN_G 255 +#define COLOUR_CYAN_B 255 + +#define COLOUR_WHITE_R 255 +#define COLOUR_WHITE_G 255 +#define COLOUR_WHITE_B 255 + +#define COLOUR_BLACK_R 0 +#define COLOUR_BLACK_G 0 +#define COLOUR_BLACK_B 0 + +#define SCREEN_UNIT_X ((SCREEN_WIDTH - SCREEN_HEIGHT) / 8) +#define SCREEN_UNIT_Y (SCREEN_HEIGHT / 8) +#define SCREEN_SIDE (SCREEN_HEIGHT / SCREEN_UNIT - 1) +#define SCREEN_BLOCK (SCREEN_SIDE * SCREEN_SIDE) -- cgit v1.2.3