From: chaoskagami Date: Tue, 26 Apr 2016 10:37:18 +0000 (-0400) Subject: Commit some changes X-Git-Tag: stable-1~86 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=a4e8c3dbd166e61904372da0dd268c3a861bf830;p=corbenik%2Fcorbenik.git Commit some changes --- diff --git a/Makefile b/Makefile index eda87a6..f0a7196 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,10 @@ dir_data := data dir_build := build dir_out := out +REVISION := $(shell git rev-list --count HEAD) + ASFLAGS := -mlittle-endian -mcpu=arm946e-s -march=armv5te -CFLAGS := -Wall -Wextra -MMD -MP -O2 -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main +CFLAGS := -Wall -Wextra -MMD -MP -O2 -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -DVERSION=\"r$(REVISION)\" FLAGS := dir_out=$(abspath $(dir_out)) ICON=$(abspath icon.png) --no-print-directory LDFLAGS := -nostdlib -lgcc diff --git a/source/config.h b/source/config.h index 59bd197..7420fdb 100644 --- a/source/config.h +++ b/source/config.h @@ -17,9 +17,21 @@ struct config_file { static struct config_file config; -#define OPTION_AUTOBOOT 0 -#define OPTION_SILENCE 1 -#define OPTION_TRACE 2 +#define OPTION_AUTOBOOT 0 // Skip menu unless L is held. +#define OPTION_SILENCE 1 // Don't print debug information. +#define OPTION_TRACE 2 // Pause for A key on each step. + +#define OPTION_TRANSP_BG 3 // Background color is not drawn under text. +#define OPTION_NO_CLEAR_BG 4 // Framebuffer is preserved from whatever ran before us. +#define OPTION_READ_ME 5 // Remove Help/Readme from menu. + +#define IGNORE_PATCH_DEPS 6 // Ignore patch UUID dependencies. Not recommended. +#define IGNORE_BROKEN_SHIT 7 // Allow enabling patches which are marked as 'incompatible'. Chances are there's a reason. + +#define HEADER_COLOR 8 // Color of header text. +#define BG_COLOR 9 // Color of background. +#define TEXT_COLOR 10 // Color of most text. +#define ARROW_COLOR 11 // Color of Arrow. void load_config(); diff --git a/source/main.c b/source/main.c index 8247a1b..7239aa3 100644 --- a/source/main.c +++ b/source/main.c @@ -32,7 +32,7 @@ uint32_t wait_key() { } void header() { - cprintf(TOP_SCREEN, "%p[Corbenik - The Rebirth]\n", COLOR(CYAN, BLACK)); + cprintf(TOP_SCREEN, "%p[Corbenik - The Rebirth - %s]\n", COLOR(CYAN, BLACK), VERSION); } int menu_options() { return MENU_MAIN; } @@ -110,7 +110,7 @@ int menu_main() { for(int i=0; i < menu_max; i++) { if (cursor_y == i) - cprintf(TOP_SCREEN, "%p-> ", COLOR(GREEN, BLACK)); + cprintf(TOP_SCREEN, "%p>> ", COLOR(GREEN, BLACK)); else cprintf(TOP_SCREEN, " "); cprintf(TOP_SCREEN, "%s\n", list[i]); @@ -133,10 +133,11 @@ int menu_main() { break; } + // Loop around the cursor. if (cursor_y < 0) - cursor_y = 0; + cursor_y = menu_max -1; if (cursor_y > menu_max - 1) - cursor_y = menu_max - 1; + cursor_y = 0; return 0; }