Changeset 1697 for branches/release-1_0

Show
Ignore:
Timestamp:
02/25/12 07:35:51 (15 months ago)
Author:
philmoz
Message:

Re-align CHDK and CHDK-DE code base (part 10) -  http://chdk.setepontos.com/index.php?topic=7601.0
- Remove CAM_USE_COLORED_ICONS (use CHDK-DE colored icons for all cameras)

Location:
branches/release-1_0
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • branches/release-1_0/core/gui_batt.c

    r1678 r1697  
    4646    int perc = get_batt_perc(); 
    4747 
    48 #if defined(CAM_USE_COLORED_ICONS) 
    49  
    5048    draw_get_icon_colors(); 
    5149 
     
    6765    draw_filled_rect(xx+29-(25*perc/100),    yy+6,     xx+29,   yy+9,  MAKE_COLOR(cl2, cl2)); 
    6866    draw_filled_rect(xx+29-(25*perc/100),    yy+3,     xx+29,   yy+5,  MAKE_COLOR(cl3, cl3)); 
    69  
    70 #else 
    71  
    72     color cl = (perc<=20)?conf.osd_color_warn:(conf.batt_icon_color&0xFF); 
    73  
    74     // battery icon 
    75     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);  // l 
    78     draw_hline(xx+3-2,    yy+1-1,   29,  COLOR_BLACK);  // t 
    79     draw_hline(xx+3-2,    yy+1+11,  29,  COLOR_BLACK);  // b 
    80     draw_vline(xx+3+25+2, yy+1-1,   11,  COLOR_BLACK);  // r 
    81  
    82     // battery fill 
    83     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 #endif 
    9067} 
    9168 
  • branches/release-1_0/core/gui_draw.c

    r1678 r1697  
    454454} 
    455455//------------------------------------------------------------------- 
    456      
    457 #if defined(CAM_USE_COLORED_ICONS) 
    458456 
    459457// Colors for icons 
     
    479477    } 
    480478} 
    481  
    482 #endif 
  • branches/release-1_0/core/gui_draw.h

    r1680 r1697  
    924924extern void draw_filled_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl); 
    925925     
    926 #if defined(CAM_USE_COLORED_ICONS) 
    927926extern void draw_get_icon_colors(); 
    928927extern color icon_green[3], icon_red[3], icon_yellow[3], icon_grey[3]; 
    929 #endif 
    930928 
    931929//------------------------------------------------------------------- 
  • branches/release-1_0/core/gui_space.c

    r1678 r1697  
    9898 
    9999    space_color(); 
    100      
    101 #if defined(CAM_USE_COLORED_ICONS) 
    102100 
    103101    draw_get_icon_colors(); 
     
    136134    draw_rect(xx+9,         yy+4,   xx+28,   yy+13,  cl1); 
    137135    draw_filled_rect(xx+27-(17*perc/100),      yy+5,       xx+27,     yy+12,   MAKE_COLOR(cl2, cl2)); 
    138  
    139 #else 
    140  
    141 #define LE  23 
    142 #define WI  15 
    143  
    144     draw_hline(xx+5,     yy,      LE-5,     COLOR_BLACK);          // outer top 
    145     draw_hline(xx+6,     yy+1,    LE-7,     cl);                   // inner top 
    146     draw_vline(xx,       yy+5,    WI-5,     COLOR_BLACK);          // outer left 
    147     draw_vline(xx+1,     yy+6,    WI-7,     cl);                   // inner left 
    148     draw_hline(xx,       yy+WI,   LE,       COLOR_BLACK);          // outer bottom 
    149     draw_hline(xx+1,     yy+WI-1, LE-2,     cl);                   // inner bottom 
    150     draw_vline(xx+LE,    yy,      WI,       COLOR_BLACK);          // outer right 
    151     draw_vline(xx+LE-1,  yy+1,    WI-2,     cl);                   // inner right 
    152     draw_line(xx+5,      yy,      xx,       yy+5,  COLOR_BLACK);   // edge 
    153     draw_line(xx+5,      yy+1,    xx+1,     yy+5,  cl);            // edge 
    154     draw_line(xx+6,      yy+1,    xx+1,     yy+6,  cl);            // edge 
    155  
    156     // memory fill 
    157     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 #endif 
    175136} 
    176137 
  • branches/release-1_0/core/luascript.c

    r1687 r1697  
    885885unsigned char script_colors[][2]  = { 
    886886 
    887 #ifdef CAM_USE_COLORED_ICONS 
    888887                                        {COLOR_TRANSPARENT,         COLOR_TRANSPARENT},         //  1   trans 
    889888                                        {COLOR_BLACK,               COLOR_BLACK},               //  2   black 
     
    907906                                        {COLOR_ICON_PLY_YELLOW_DK,  COLOR_ICON_REC_YELLOW_DK},  //  17  yellow_dark 
    908907                                        {COLOR_ICON_PLY_YELLOW_LT,  COLOR_ICON_REC_YELLOW_LT}   //  18  yellow_light 
    909 #else 
    910                                         {COLOR_TRANSPARENT,         COLOR_TRANSPARENT},         //  1   trans 
    911                                         {COLOR_BLACK,               COLOR_BLACK},               //  2   black 
    912                                         {COLOR_WHITE,               COLOR_WHITE},               //  3   white 
    913                                          
    914                                         {COLOR_HISTO_R_PLAY,        COLOR_HISTO_R},             //  4   red 
    915                                         {COLOR_HISTO_R_PLAY,        COLOR_HISTO_R},             //  5   red_dark    - placeholder 
    916                                         {COLOR_HISTO_R_PLAY,        COLOR_HISTO_R},             //  6   red_light   - placeholder 
    917                                         {COLOR_HISTO_G_PLAY,        COLOR_HISTO_G},             //  7   green 
    918                                         {COLOR_HISTO_G_PLAY,        COLOR_HISTO_G},             //  8   green_dark  - placeholder 
    919                                         {COLOR_HISTO_G_PLAY,        COLOR_HISTO_G},             //  9   green_light - placeholder 
    920                                         {COLOR_HISTO_B_PLAY,        COLOR_HISTO_B},             //  10  blue 
    921                                         {COLOR_HISTO_B_PLAY,        COLOR_HISTO_B},             //  11  blue_dark   - placeholder 
    922                                         {COLOR_HISTO_B_PLAY,        COLOR_HISTO_B},             //  12  blue_light  - placeholder 
    923  
    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      - placeholder 
    929                                         {COLOR_WHITE,               COLOR_WHITE},               //  17  yellow_dark - placeholder 
    930                                         {COLOR_WHITE,               COLOR_WHITE}                //  18  yellow_light- placeholder 
    931 #endif 
    932908                                    }; 
    933909 
  • branches/release-1_0/include/camera.h

    r1671 r1697  
    186186                                                // requires load_chdk_palette() and vid_get_bitmap_active_palette() to be defined 
    187187                                                // correctly for the camera along with 
    188     #undef  CAM_USE_COLORED_ICONS               // If the color palette contains enough shades of red, green, yellow and grey 
    189                                                 // defined then enable this use the better icons (from CHDK-DE). See gui_batt.c 
    190                                                 // and gui_space.c. 
    191188 
    192189    #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  
    8585 
    8686    #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  
    6161    #undef  CAMERA_MAX_DIST 
    6262    #define CAMERA_MAX_DIST                 58686   // Override max subject distance 
    63  
    64     #define CAM_USE_COLORED_ICONS           1   // Enable using the CHDK-DE colored icons. 
    6563//---------------------------------------------------------- 
    6664 
  • branches/release-1_0/platform/g10/platform_camera.h

    r1673 r1697  
    103103 
    104104    #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. 
    107105//---------------------------------------------------------- 
    108106 
  • branches/release-1_0/platform/g12/platform_camera.h

    r1680 r1697  
    117117    #define CAM_LOAD_CUSTOM_COLORS          1   // Enable loading CHDK colors into the camera palette memory/hardware 
    118118    #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. 
    120119 
    121120    #undef  CAMERA_MIN_DIST 
  • branches/release-1_0/platform/ixus120_sd940/platform_camera.h

    r1695 r1697  
    9393                                                // Used to enabled bracketing in custom timer, required on many recent cameras 
    9494                                                // see http://chdk.setepontos.com/index.php/topic,3994.405.html 
     95//---------------------------------------------------------- 
    9596 
    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  
    110110#define CAM_DNG_LENS_INFO       { 50,10, 400,10, 30,10, 59,10 } // See comments in camera.h // 5.0 - 40.0 
    111111 
    112  
    113 #define CAM_USE_COLORED_ICONS           1       // Enable using the CHDK-DE colored icons. 
    114  
    115112 #define CAM_HAS_CMOS                   1 
    116113 
  • branches/release-1_0/platform/ixus310_elph500hs/platform_camera.h

    r1680 r1697  
    124124    #define CAM_LOAD_CUSTOM_COLORS          1   // Enable loading CHDK colors into the camera palette memory/hardware 
    125125    #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. 
    127126 
    128127    #undef  CAMERA_MIN_DIST 
  • branches/release-1_0/platform/sx130is/platform_camera.h

    r1695 r1697  
    9393                                                // Used to enabled bracketing in custom timer, required on many recent cameras 
    9494                                                // 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  
    104104    #undef  CAMERA_MAX_DIST 
    105105    #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. 
    108106//---------------------------------------------------------- 
  • branches/release-1_0/platform/sx230hs/platform_camera.h

    r1695 r1697  
    109109    #define OVEREXP_COMPENSATE_OVERALL      1 
    110110 
    111     #define CAM_USE_COLORED_ICONS           1   // Enable using the CHDK-DE colored icons. 
    112111//---------------------------------------------------------- 
  • branches/release-1_0/platform/sx30/platform_camera.h

    r1695 r1697  
    117117    #define CAM_LOAD_CUSTOM_COLORS          1   // Enable loading CHDK colors into the camera palette memory/hardware 
    118118    #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. 
    120119 
    121120    #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  
    122122    #define CAM_LOAD_CUSTOM_COLORS              1       // Enable loading CHDK colors into the camera palette memory/hardware 
    123123    #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. 
    125124 
    126125    #undef  CAM_USB_EVENTID