Changeset 1697 for branches/release-1_0
- Timestamp:
- 02/25/12 07:35:51 (15 months ago)
- Location:
- branches/release-1_0
- Files:
-
- 18 modified
-
core/gui_batt.c (modified) (2 diffs)
-
core/gui_draw.c (modified) (2 diffs)
-
core/gui_draw.h (modified) (1 diff)
-
core/gui_space.c (modified) (2 diffs)
-
core/luascript.c (modified) (2 diffs)
-
include/camera.h (modified) (1 diff)
-
platform/a3300/platform_camera.h (modified) (1 diff)
-
platform/a720/platform_camera.h (modified) (1 diff)
-
platform/g10/platform_camera.h (modified) (1 diff)
-
platform/g12/platform_camera.h (modified) (1 diff)
-
platform/ixus120_sd940/platform_camera.h (modified) (1 diff)
-
platform/ixus230_elph310hs/platform_camera.h (modified) (1 diff)
-
platform/ixus310_elph500hs/platform_camera.h (modified) (1 diff)
-
platform/sx130is/platform_camera.h (modified) (1 diff)
-
platform/sx220hs/platform_camera.h (modified) (1 diff)
-
platform/sx230hs/platform_camera.h (modified) (1 diff)
-
platform/sx30/platform_camera.h (modified) (1 diff)
-
platform/sx40hs/platform_camera.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_0/core/gui_batt.c
r1678 r1697 46 46 int perc = get_batt_perc(); 47 47 48 #if defined(CAM_USE_COLORED_ICONS)49 50 48 draw_get_icon_colors(); 51 49 … … 67 65 draw_filled_rect(xx+29-(25*perc/100), yy+6, xx+29, yy+9, MAKE_COLOR(cl2, cl2)); 68 66 draw_filled_rect(xx+29-(25*perc/100), yy+3, xx+29, yy+5, MAKE_COLOR(cl3, cl3)); 69 70 #else71 72 color cl = (perc<=20)?conf.osd_color_warn:(conf.batt_icon_color&0xFF);73 74 // battery icon75 draw_rect(xx+3-1, yy+1, xx+3+25+1, yy+1+10, cl);76 draw_rect(xx+3-3, yy+1+2, xx+3-2, yy+1+8, cl);77 draw_vline(xx+3-4, yy+1+2-1, 8, COLOR_BLACK); // l78 draw_hline(xx+3-2, yy+1-1, 29, COLOR_BLACK); // t79 draw_hline(xx+3-2, yy+1+11, 29, COLOR_BLACK); // b80 draw_vline(xx+3+25+2, yy+1-1, 11, COLOR_BLACK); // r81 82 // battery fill83 x = xx+3+1+25-(perc/4);84 if (x<=xx+3) x=xx+3+1;85 if (x>xx+3+25+1) x=xx+3+25+1;86 draw_filled_rect(xx+3, yy+1+1, x-1, yy+1+9, MAKE_COLOR(COLOR_TRANSPARENT, COLOR_BLACK));87 draw_filled_rect(x, yy+1+1, xx+3+25, yy+1+9, MAKE_COLOR(cl, cl));88 89 #endif90 67 } 91 68 -
branches/release-1_0/core/gui_draw.c
r1678 r1697 454 454 } 455 455 //------------------------------------------------------------------- 456 457 #if defined(CAM_USE_COLORED_ICONS)458 456 459 457 // Colors for icons … … 479 477 } 480 478 } 481 482 #endif -
branches/release-1_0/core/gui_draw.h
r1680 r1697 924 924 extern void draw_filled_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl); 925 925 926 #if defined(CAM_USE_COLORED_ICONS)927 926 extern void draw_get_icon_colors(); 928 927 extern color icon_green[3], icon_red[3], icon_yellow[3], icon_grey[3]; 929 #endif930 928 931 929 //------------------------------------------------------------------- -
branches/release-1_0/core/gui_space.c
r1678 r1697 98 98 99 99 space_color(); 100 101 #if defined(CAM_USE_COLORED_ICONS)102 100 103 101 draw_get_icon_colors(); … … 136 134 draw_rect(xx+9, yy+4, xx+28, yy+13, cl1); 137 135 draw_filled_rect(xx+27-(17*perc/100), yy+5, xx+27, yy+12, MAKE_COLOR(cl2, cl2)); 138 139 #else140 141 #define LE 23142 #define WI 15143 144 draw_hline(xx+5, yy, LE-5, COLOR_BLACK); // outer top145 draw_hline(xx+6, yy+1, LE-7, cl); // inner top146 draw_vline(xx, yy+5, WI-5, COLOR_BLACK); // outer left147 draw_vline(xx+1, yy+6, WI-7, cl); // inner left148 draw_hline(xx, yy+WI, LE, COLOR_BLACK); // outer bottom149 draw_hline(xx+1, yy+WI-1, LE-2, cl); // inner bottom150 draw_vline(xx+LE, yy, WI, COLOR_BLACK); // outer right151 draw_vline(xx+LE-1, yy+1, WI-2, cl); // inner right152 draw_line(xx+5, yy, xx, yy+5, COLOR_BLACK); // edge153 draw_line(xx+5, yy+1, xx+1, yy+5, cl); // edge154 draw_line(xx+6, yy+1, xx+1, yy+6, cl); // edge155 156 // memory fill157 x = LE - (perc*(LE-3)/100) - 2;158 if (x>5) draw_hline(xx+6, yy+2, x-6, COLOR_BLACK);159 if (x>2) draw_hline(xx+x+1, yy+2, LE-x-3, cl);160 else draw_hline(xx+4, yy+2, LE-6, cl);161 for(i=3; i<7; i++) { // /--------------|162 if (x>7-i) draw_pixel(xx+8-i, yy+i, COLOR_BLACK); // / 1st for loop |163 if (x>7-i) draw_pixel(xx+x, yy+i, COLOR_BLACK); // /__________________|164 draw_hline(xx+x+1, yy+i, LE-x-3, cl); // | |165 } // | 2nd for loop |166 for(i=7; i<WI-2; i++) { // | |167 if (x>1) draw_pixel(xx+2, yy+i, COLOR_BLACK); // |-------------------|168 if (x>1) draw_pixel(xx+x, yy+i, COLOR_BLACK);169 draw_hline(xx+x+1, yy+i, LE-x-3, cl);170 }171 if (x>1) draw_hline(xx+2, yy+WI-2, x-2, COLOR_BLACK);172 draw_hline(xx+x+1, yy+WI-2, LE-x-3, cl);173 174 #endif175 136 } 176 137 -
branches/release-1_0/core/luascript.c
r1687 r1697 885 885 unsigned char script_colors[][2] = { 886 886 887 #ifdef CAM_USE_COLORED_ICONS888 887 {COLOR_TRANSPARENT, COLOR_TRANSPARENT}, // 1 trans 889 888 {COLOR_BLACK, COLOR_BLACK}, // 2 black … … 907 906 {COLOR_ICON_PLY_YELLOW_DK, COLOR_ICON_REC_YELLOW_DK}, // 17 yellow_dark 908 907 {COLOR_ICON_PLY_YELLOW_LT, COLOR_ICON_REC_YELLOW_LT} // 18 yellow_light 909 #else910 {COLOR_TRANSPARENT, COLOR_TRANSPARENT}, // 1 trans911 {COLOR_BLACK, COLOR_BLACK}, // 2 black912 {COLOR_WHITE, COLOR_WHITE}, // 3 white913 914 {COLOR_HISTO_R_PLAY, COLOR_HISTO_R}, // 4 red915 {COLOR_HISTO_R_PLAY, COLOR_HISTO_R}, // 5 red_dark - placeholder916 {COLOR_HISTO_R_PLAY, COLOR_HISTO_R}, // 6 red_light - placeholder917 {COLOR_HISTO_G_PLAY, COLOR_HISTO_G}, // 7 green918 {COLOR_HISTO_G_PLAY, COLOR_HISTO_G}, // 8 green_dark - placeholder919 {COLOR_HISTO_G_PLAY, COLOR_HISTO_G}, // 9 green_light - placeholder920 {COLOR_HISTO_B_PLAY, COLOR_HISTO_B}, // 10 blue921 {COLOR_HISTO_B_PLAY, COLOR_HISTO_B}, // 11 blue_dark - placeholder922 {COLOR_HISTO_B_PLAY, COLOR_HISTO_B}, // 12 blue_light - placeholder923 924 {COLOR_BLACK, COLOR_BLACK}, // 13 grey - placeholder (there's no universal grey)925 {COLOR_BLACK, COLOR_BLACK}, // 14 grey_dark - placeholder (there's no universal grey)926 {COLOR_WHITE, COLOR_WHITE}, // 15 grey_light - placeholder (there's no universal grey)927 928 {COLOR_WHITE, COLOR_WHITE}, // 16 yellow - placeholder929 {COLOR_WHITE, COLOR_WHITE}, // 17 yellow_dark - placeholder930 {COLOR_WHITE, COLOR_WHITE} // 18 yellow_light- placeholder931 #endif932 908 }; 933 909 -
branches/release-1_0/include/camera.h
r1671 r1697 186 186 // requires load_chdk_palette() and vid_get_bitmap_active_palette() to be defined 187 187 // correctly for the camera along with 188 #undef CAM_USE_COLORED_ICONS // If the color palette contains enough shades of red, green, yellow and grey189 // defined then enable this use the better icons (from CHDK-DE). See gui_batt.c190 // and gui_space.c.191 188 192 189 #define CAM_USB_EVENTID 0x902 // Levent ID for USB control. Changed to 0x202 in DryOS R49 so needs to be overridable. -
branches/release-1_0/platform/a3300/platform_camera.h
r1680 r1697 85 85 86 86 #define CHDK_COLOR_BASE 0x1D // Start color index for CHDK colors loaded into camera palette. 87 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons. -
branches/release-1_0/platform/a720/platform_camera.h
r1652 r1697 61 61 #undef CAMERA_MAX_DIST 62 62 #define CAMERA_MAX_DIST 58686 // Override max subject distance 63 64 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.65 63 //---------------------------------------------------------- 66 64 -
branches/release-1_0/platform/g10/platform_camera.h
r1673 r1697 103 103 104 104 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size. 105 106 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.107 105 //---------------------------------------------------------- 108 106 -
branches/release-1_0/platform/g12/platform_camera.h
r1680 r1697 117 117 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware 118 118 #define CHDK_COLOR_BASE 0xB3// Start color index for CHDK colors loaded into camera palette. 119 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.120 119 121 120 #undef CAMERA_MIN_DIST -
branches/release-1_0/platform/ixus120_sd940/platform_camera.h
r1695 r1697 93 93 // Used to enabled bracketing in custom timer, required on many recent cameras 94 94 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 95 //---------------------------------------------------------- 95 96 96 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.97 98 //----------------------------------------------------------99 -
branches/release-1_0/platform/ixus230_elph310hs/platform_camera.h
r1680 r1697 110 110 #define CAM_DNG_LENS_INFO { 50,10, 400,10, 30,10, 59,10 } // See comments in camera.h // 5.0 - 40.0 111 111 112 113 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.114 115 112 #define CAM_HAS_CMOS 1 116 113 -
branches/release-1_0/platform/ixus310_elph500hs/platform_camera.h
r1680 r1697 124 124 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware 125 125 #define CHDK_COLOR_BASE 0xA2 // Start color index for CHDK colors loaded into camera palette. 126 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.127 126 128 127 #undef CAMERA_MIN_DIST -
branches/release-1_0/platform/sx130is/platform_camera.h
r1695 r1697 93 93 // Used to enabled bracketing in custom timer, required on many recent cameras 94 94 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 95 96 #define CAM_USE_COLORED_ICONS 1 97 98 //---------------------------------------------------------- 95 //---------------------------------------------------------- -
branches/release-1_0/platform/sx220hs/platform_camera.h
r1680 r1697 104 104 #undef CAMERA_MAX_DIST 105 105 #define CAMERA_MAX_DIST 2000000 // Override max subject distance 1739131 //testscript=1098902 106 107 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.108 106 //---------------------------------------------------------- -
branches/release-1_0/platform/sx230hs/platform_camera.h
r1695 r1697 109 109 #define OVEREXP_COMPENSATE_OVERALL 1 110 110 111 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.112 111 //---------------------------------------------------------- -
branches/release-1_0/platform/sx30/platform_camera.h
r1695 r1697 117 117 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware 118 118 #define CHDK_COLOR_BASE 0xB3// Start color index for CHDK colors loaded into camera palette. 119 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.120 119 121 120 #define CAM_NEED_SET_ZOOM_DELAY 300 // SX30 needs a short delay after setting the zoom before resetting focus in shooting_set_zoom() -
branches/release-1_0/platform/sx40hs/platform_camera.h
r1695 r1697 122 122 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware 123 123 #define CHDK_COLOR_BASE 0xA8 // Start color index for CHDK colors loaded into camera palette. 124 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons.125 124 126 125 #undef CAM_USB_EVENTID