]> Chaos Git - corbenik/corbenik.git/commitdiff
Commit some changes
authorchaoskagami <chaos.kagami@gmail.com>
Tue, 26 Apr 2016 10:37:18 +0000 (06:37 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Tue, 26 Apr 2016 10:37:18 +0000 (06:37 -0400)
Makefile
source/config.h
source/main.c

index eda87a6d48c4c588beda90c89642cfd4d2fb955b..f0a71963a84cf4f54f5dbd6167c9288ba0e5311b 100644 (file)
--- 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
 
index 59bd197bcc3193a697762fc00a755a231c9807e9..7420fdbd14719a001f845a48829b1b208c51660a 100644 (file)
@@ -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();
 
index 8247a1b1253549757babccebd6067158f8af7910..7239aa3575268a5e510e6b14f108d52613110360 100644 (file)
@@ -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;
 }