aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2010-09-07 23:47:04 +0200
committerNicolas Schodet2010-09-07 23:48:53 +0200
commit902e86242ea579fbc15f77c5665520404cbbd0ff (patch)
tree0a07bef01a1e79f6c0dff9b30192a756b26271a0
parent2000d99b11d1170a2e1235657a8a92af36bc371b (diff)
add config to include intro
This makes it possible to remove the long introduction animation. It also save some flash space.
-rw-r--r--AT91SAM7S256/Source/c_ui.c8
-rw-r--r--AT91SAM7S256/Source/config.h10
-rw-r--r--AT91SAM7S256/Source/stdconst.h2
3 files changed, 17 insertions, 3 deletions
diff --git a/AT91SAM7S256/Source/c_ui.c b/AT91SAM7S256/Source/c_ui.c
index 95bbe6f..7e39d6f 100644
--- a/AT91SAM7S256/Source/c_ui.c
+++ b/AT91SAM7S256/Source/c_ui.c
@@ -1313,7 +1313,7 @@ void cUiCtrl(void)
VarsUi.State = 0;
VarsUi.Pointer = 0;
- VarsUi.Timer = -INTRO_START_TIME;
+ VarsUi.Timer = CONFIG_INTRO ? -INTRO_START_TIME : 0;
VarsUi.FNOFState = 0;
VarsUi.FBState = 0;
@@ -1325,10 +1325,10 @@ void cUiCtrl(void)
VarsUi.GUSState = 0;
IOMapUi.pMenu = (MENU*)cUiGetMenuPointer(0);
- IOMapUi.State = INIT_INTRO;
+ IOMapUi.State = CONFIG_INTRO ? INIT_INTRO : INIT_WAIT;
pMapDisplay->EraseMask = SCREEN_BIT(SCREEN_BACKGROUND);
- pMapDisplay->pBitmaps[BITMAP_1] = (BMPMAP*)Intro[VarsUi.Pointer];
+ pMapDisplay->pBitmaps[BITMAP_1] = CONFIG_INTRO ? (BMPMAP*)Intro[VarsUi.Pointer] : RCXintro_16;
pMapDisplay->UpdateMask = BITMAP_BIT(BITMAP_1);
pMapDisplay->Flags |= DISPLAY_ON;
@@ -1338,6 +1338,7 @@ void cUiCtrl(void)
}
break;
+#if CONFIG_INTRO
case INIT_LOW_BATTERY :
{
if (++VarsUi.Timer >= (INTRO_LOWBATT_TIME))
@@ -1431,6 +1432,7 @@ void cUiCtrl(void)
}
}
break;
+#endif /* CONFIG_INTRO */
case INIT_WAIT :
{
diff --git a/AT91SAM7S256/Source/config.h b/AT91SAM7S256/Source/config.h
new file mode 100644
index 0000000..d396771
--- /dev/null
+++ b/AT91SAM7S256/Source/config.h
@@ -0,0 +1,10 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+/*
+ * This file defines compilation options.
+ */
+
+/* Include intro code and images. */
+#define CONFIG_INTRO 1
+
+#endif /* CONFIG_H */
diff --git a/AT91SAM7S256/Source/stdconst.h b/AT91SAM7S256/Source/stdconst.h
index bf8f052..6c08175 100644
--- a/AT91SAM7S256/Source/stdconst.h
+++ b/AT91SAM7S256/Source/stdconst.h
@@ -20,6 +20,8 @@
#ifndef STDCONST
#define STDCONST
+#include "config.h"
+
#ifndef NULL
#define NULL ((void *)0)
#endif