diff -r a4fdda89497e src/bmp.h
--- a/src/bmp.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/bmp.h	Wed Nov 09 11:13:08 2011 +0100
@@ -31,6 +31,8 @@
 #include "dryos.h"
 #include "font.h"
 
+uint8_t* read_entire_file(const char * filename, int* buf_size);
+
 extern int bmp_enabled;
 
 /** Returns a pointer to the real BMP vram (or to mirror BMP vram) */
@@ -230,6 +232,7 @@
 void clrscr();
 void bmp_draw(struct bmp_file_t * bmp, int x0, int y0, uint8_t* const mirror, int clear);
 void bmp_draw_scaled(struct bmp_file_t * bmp, int x0, int y0, int xmax, int ymax);
+void bmp_draw_scaled_ex(struct bmp_file_t * bmp, int x0, int y0, int xmax, int ymax, uint8_t* const mirror, int clear);
 uint8_t bmp_getpixel(int x, int y);
 
 #define TOPBAR_BGCOLOR (bmp_getpixel(os.x0,os.y0))
diff -r a4fdda89497e src/config.h
--- a/src/config.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/config.h	Wed Nov 09 11:13:08 2011 +0100
@@ -100,4 +100,6 @@
 //~ void config_flag_file_setting_save(char* file, int setting);
 //~ int config_flag_file_setting_load(char* file);
 
+int read_line( char *buf, size_t size );
+
 #endif
diff -r a4fdda89497e src/debug.c
--- a/src/debug.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/debug.c	Wed Nov 09 11:13:08 2011 +0100
@@ -28,6 +28,8 @@
 void display_off();
 void display_off_force();
 
+void fake_halfshutter_step();
+
 
 //~ CONFIG_INT("halfshutter.fake", fake_halfshutter, 0);
 int fake_halfshutter = 0;
@@ -2354,7 +2356,7 @@
 int get_flash_movie_pressed() { return flash_movie_pressed; }
 
 int halfshutter_pressed = 0;
-int get_halfshutter_pressed() { return halfshutter_pressed && !dofpreview; }
+bool get_halfshutter_pressed() { return halfshutter_pressed && !dofpreview; }
 
 int zoom_in_pressed = 0;
 int zoom_out_pressed = 0;
diff -r a4fdda89497e src/debug.h
--- a/src/debug.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/debug.h	Wed Nov 09 11:13:08 2011 +0100
@@ -1,5 +1,8 @@
 #ifndef _debug_h_
 #define _debug_h_
+
+#include <stdbool.h>
+
 /** \file
  * Debug macros and functions.
  */
@@ -91,6 +94,10 @@
 extern void dumpf( void );
 extern void dm_set_store_level( uint32_t class, uint32_t level );
 
+extern void card_led_on();
+extern void card_led_off();
+extern bool get_halfshutter_pressed();
+
 extern void
 dm_event_dispatch(
 	int			input,
diff -r a4fdda89497e src/focus.c
--- a/src/focus.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/focus.c	Wed Nov 09 11:13:08 2011 +0100
@@ -17,6 +17,8 @@
 #include "disable-this-module.h"
 #endif
 
+void trap_focus_toggle_from_af_dlg();
+
 int override_zoom_buttons; // while focus menu is active and rack focus items are selected
 
 int should_override_zoom_buttons()
diff -r a4fdda89497e src/lens.h
--- a/src/lens.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/lens.h	Wed Nov 09 11:13:08 2011 +0100
@@ -30,6 +30,8 @@
 
 #include "property.h"
 
+int get_htp();
+
 struct lens_info
 {
 volatile	void *			token;
diff -r a4fdda89497e src/menu.c
--- a/src/menu.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/menu.c	Wed Nov 09 11:13:08 2011 +0100
@@ -36,7 +36,7 @@
 //~ static int menu_damage;
 static int menu_hidden;
 static int menu_timeout;
-static int menu_shown = 0;
+static bool menu_shown = false;
 static int show_only_selected; // for ISO, kelvin...
 static int edit_mode = 0;
 static int config_dirty = 0;
@@ -1085,7 +1085,7 @@
 		config_dirty = 0;
 	}
 
-	menu_shown = 0;
+	menu_shown = false;
 
 	if (!PLAY_MODE) {}//redraw_after(300);
 	else draw_livev_for_playback();
@@ -1103,7 +1103,7 @@
 	//~ menu_damage = 1;
 }
 
-int
+bool
 gui_menu_shown( void )
 {
 	return menu_shown;
@@ -1237,7 +1237,7 @@
 		
 		if (recording && !lv) continue;
 		
-		menu_shown = 1;
+		menu_shown = true;
 		
 		#ifdef GUIMODE_ML_MENU
 		if (!PLAY_MODE) SetGUIRequestMode(GUIMODE_ML_MENU);
diff -r a4fdda89497e src/menu.h
--- a/src/menu.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/menu.h	Wed Nov 09 11:13:08 2011 +0100
@@ -33,11 +33,15 @@
 #ifndef _menu_h_
 #define _menu_h_
 
+#include <stdint.h>
+#include <stdbool.h>
 
 #define MENU_FONT	FONT(FONT_LARGE,COLOR_WHITE,COLOR_BLACK)
 #define MENU_FONT_SEL	get_menu_font_sel()
 
 int get_menu_font_sel();
+bool gui_menu_shown();
+void menu_show_only_selected();
 
 struct menu_entry
 {
diff -r a4fdda89497e src/propvalues.h
--- a/src/propvalues.h	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/propvalues.h	Wed Nov 09 11:13:08 2011 +0100
@@ -45,4 +45,6 @@
 
 extern struct bmp_ov_loc_size os;
 
+bool is_movie_mode();
+
 #endif
diff -r a4fdda89497e src/tweaks.c
--- a/src/tweaks.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/tweaks.c	Wed Nov 09 11:13:08 2011 +0100
@@ -1,6 +1,7 @@
 /** \file
  * Tweaks to default UI behavior
  */
+#include "zebra.h"
 #include "dryos.h"
 #include "bmp.h"
 #include "tasks.h"
@@ -13,6 +14,10 @@
 #include "lens.h"
 #include "math.h"
 
+void display_gain_toggle(int dir);
+void clear_lv_affframe();
+
+
 #if defined(CONFIG_1100D)
 #include "disable-this-module.h"
 #endif
diff -r a4fdda89497e src/vram.c
--- a/src/vram.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/vram.c	Wed Nov 09 11:13:08 2011 +0100
@@ -89,6 +89,8 @@
 
 PROP_INT(PROP_VIDEO_SYSTEM, pal);
 
+void update_vram_params_calc();
+
 // these buffer sizes include any black bars
 void update_vram_params()
 {
diff -r a4fdda89497e src/zebra.c
--- a/src/zebra.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/zebra.c	Wed Nov 09 11:13:08 2011 +0100
@@ -23,6 +23,7 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#include "zebra.h"
 #include "dryos.h"
 #include "bmp.h"
 #include "version.h"
@@ -57,6 +58,11 @@
 
 //~ static struct bmp_file_t * cropmarks_array[3] = {0};
 static struct bmp_file_t * cropmarks = 0;
+static bool _bmp_cleared = false;
+static bool bmp_is_on() { return !_bmp_cleared; }
+void bmp_on();
+void bmp_off();
+void bmp_flip();
 
 #define hist_height			64
 #define hist_width			128
@@ -2391,7 +2397,6 @@
 	return 1;
 }
 
-int _bmp_cleared = 0;
 void bmp_on()
 {
 	//~ return;
@@ -2410,12 +2415,12 @@
 			sei_restore();
 		)
 	#endif
-		_bmp_cleared = 0;
+		_bmp_cleared = false;
 	}
 }
 void bmp_on_force()
 {
-	_bmp_cleared = 1;
+	_bmp_cleared = true;
 	bmp_on();
 }
 void bmp_off()
@@ -2426,14 +2431,14 @@
 	if (!_bmp_cleared) //{ BMP_LOCK(GMT_LOCK( if (is_safe_to_mess_with_the_display(0)) { call("MuteOn")); ) }}
 	{
 	#if defined(CONFIG_500D) || defined(CONFIG_50D)// || defined(CONFIG_550D)
-		_bmp_cleared = 1;
+		_bmp_cleared = true;
 		kill_flicker_do();
 	#else
 		BMP_LOCK(
 			cli_save();
 			if (tft_status == 0 && lv && !lv_paused)
 			{
-				_bmp_cleared = 1;
+				_bmp_cleared = true;
 				MuteOn_0();
 			}
 			sei_restore();
@@ -2441,7 +2446,6 @@
 	#endif
 	}
 }
-int bmp_is_on() { return !_bmp_cleared; }
 
 /*
 int _lvimage_cleared = 0;
@@ -2721,7 +2725,7 @@
 //~ void zebra_pause() { zebra_paused = 1; }
 //~ void zebra_resume() { zebra_paused = 0; }
 
-int liveview_display_idle()
+bool liveview_display_idle()
 {
 	return
 		lv && 
@@ -3200,12 +3204,12 @@
 }
 
 
-int should_draw_zoom_overlay()
+bool should_draw_zoom_overlay()
 {
-	if (zoom_overlay_mode == 4 && zebra_should_run() && get_global_draw()) return 1;
-	if (zebra_should_run() && get_global_draw() && zoom_overlay_mode && (zoom_overlay || zoom_overlay_countdown)) return 1;
-	if (lv && get_halfshutter_pressed() && get_global_draw() && zoom_overlay_mode && (zoom_overlay || zoom_overlay_countdown)) return 1;
-	return 0;
+	if (zoom_overlay_mode == 4 && zebra_should_run() && get_global_draw()) return true;
+	if (zebra_should_run() && get_global_draw() && zoom_overlay_mode && (zoom_overlay || zoom_overlay_countdown)) return true;
+	if (lv && get_halfshutter_pressed() && get_global_draw() && zoom_overlay_mode && (zoom_overlay || zoom_overlay_countdown)) return true;
+	return false;
 }
 
 
diff -r a4fdda89497e src/propvalues.c
--- a/src/propvalues.c	Wed Nov 09 09:51:16 2011 +0200
+++ b/src/propvalues.c	Wed Nov 09 11:20:08 2011 +0100
@@ -42,7 +42,7 @@
 
 volatile int lv;
 
-int is_movie_mode()
+bool is_movie_mode()
 {
 	#ifdef CONFIG_50D
 	return lv && lv_movie_select == LVMS_ENABLE_MOVIE;
