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
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();
}
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; }
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]);
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;
}