Changeset 1514


Ignore:
Timestamp:
12/30/11 04:07:44 (18 months ago)
Author:
philmoz
Message:

Update for module system for review in reyalp-flt branch

  • renamed camera_info to camera_sensor
  • added camera_screen structure for bitmap details
  • cleanup up unnecessary vid_get_bitmap_??? functions (moved to camera.h / platform_camera.h)
Location:
branches/reyalp-flt
Files:
247 edited

Legend:

Unmodified
Added
Removed
  • branches/reyalp-flt/core/bitvector.c

    • Property svn:eol-style set to native
    r931 r1514  
    143143        } 
    144144        dst[i] = lookup[elem]; 
    145         dst[i+screen_buffer_size] = lookup[elem]; 
     145        dst[i+camera_screen.buffer_size] = lookup[elem]; 
    146146    } 
    147147} 
  • branches/reyalp-flt/core/bitvector.h

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/conf.c

    r1511 r1514  
    527527    def_batt_volts_min = get_vbatt_min(); 
    528528    def_histo_pos.x = 45; 
    529     def_histo_pos.y = vid_get_bitmap_screen_height()-HISTO_HEIGHT-40; 
     529    def_histo_pos.y = camera_screen.height-HISTO_HEIGHT-40; 
    530530    def_dof_pos.x = 90; 
    531531    def_dof_pos.y = 45; 
     
    536536    def_usb_info_pos.x = 95; 
    537537    def_usb_info_pos.y = 0; 
    538     def_space_icon_pos.x = vid_get_bitmap_screen_width()-100; 
     538    def_space_icon_pos.x = camera_screen.width-100; 
    539539    def_space_icon_pos.y = 0; 
    540     def_space_ver_pos.x = vid_get_bitmap_screen_width()-7; 
     540    def_space_ver_pos.x = camera_screen.width-7; 
    541541    def_space_ver_pos.y = 0; 
    542542    def_space_hor_pos.x = 0; 
    543     def_space_hor_pos.y = vid_get_bitmap_screen_height()-7; 
     543    def_space_hor_pos.y = camera_screen.height-7; 
    544544    def_space_txt_pos.x=128; 
    545545    def_space_txt_pos.y=0; 
    546546    def_mode_state_pos.x=35; 
    547547    def_mode_state_pos.y=0; 
    548     def_mode_raw_pos.x=vid_get_bitmap_screen_width()-7*FONT_WIDTH-2; 
    549     def_mode_raw_pos.y=vid_get_bitmap_screen_height()-3*FONT_HEIGHT-2; 
    550     def_mode_video_pos.x=vid_get_bitmap_screen_width()-25*FONT_WIDTH-2; 
    551     def_mode_video_pos.y=vid_get_bitmap_screen_height()-6*FONT_HEIGHT-2; 
    552     def_mode_ev_pos.x=vid_get_bitmap_screen_width()-40*FONT_WIDTH-2; 
    553     def_mode_ev_pos.y=vid_get_bitmap_screen_height()-8*FONT_HEIGHT-2; 
    554     def_values_pos.x=vid_get_bitmap_screen_width()-9*FONT_WIDTH; 
     548    def_mode_raw_pos.x=camera_screen.width-7*FONT_WIDTH-2; 
     549    def_mode_raw_pos.y=camera_screen.height-3*FONT_HEIGHT-2; 
     550    def_mode_video_pos.x=camera_screen.width-25*FONT_WIDTH-2; 
     551    def_mode_video_pos.y=camera_screen.height-6*FONT_HEIGHT-2; 
     552    def_mode_ev_pos.x=camera_screen.width-40*FONT_WIDTH-2; 
     553    def_mode_ev_pos.y=camera_screen.height-8*FONT_HEIGHT-2; 
     554    def_values_pos.x=camera_screen.width-9*FONT_WIDTH; 
    555555    def_values_pos.y=30; 
    556     def_clock_pos.x=vid_get_bitmap_screen_width()-5*FONT_WIDTH-2; 
     556    def_clock_pos.x=camera_screen.width-5*FONT_WIDTH-2; 
    557557    def_clock_pos.y=0; 
    558     def_temp_pos.x=vid_get_bitmap_screen_width()-9*FONT_WIDTH-2; 
     558    def_temp_pos.x=camera_screen.width-9*FONT_WIDTH-2; 
    559559    def_temp_pos.y=1*FONT_HEIGHT; 
    560560    def_ev_video_pos.x=18; 
  • branches/reyalp-flt/core/console.c

    r1512 r1514  
    131131    { 
    132132        int y = (console_y + console_max_lines - console_num_lines) * FONT_HEIGHT; 
    133         int x = console_x * FONT_WIDTH + camera_info.ts_button_border; 
     133        int x = console_x * FONT_WIDTH + camera_screen.ts_button_border; 
    134134 
    135135        for(c = 0; c < console_num_lines; ++c) 
  • branches/reyalp-flt/core/curves.c

    r1512 r1514  
    146146         
    147147        // Loop through picture rows 
    148         for (i=camera_info.raw_rows; i;i-=2){ 
     148        for (i=camera_sensor.raw_rows; i;i-=2){ 
    149149                // Loop through picture columns  
    150                 for (j=camera_info.raw_rows; j; j-=8, src+=10){ 
     150                for (j=camera_sensor.raw_rows; j; j-=8, src+=10){ 
    151151                        pixVal0=((0x3fc&(((unsigned short)(src[1]))<<2)) | (src[0] >> 6)); 
    152152                        pixVal1=((0x3f0&(((unsigned short)(src[0]))<<4)) | (src[3] >> 4)); 
     
    179179            *(src+8) = (unsigned char) ((pixVal0)); //7 (=>0)           } 
    180180                } 
    181                 for (j=camera_info.raw_rows;j; j-=8, src+=10){ 
     181                for (j=camera_sensor.raw_rows;j; j-=8, src+=10){ 
    182182                        pixVal0=((0x3fc&(((unsigned short)(src[1]))<<2)) | (src[0] >> 6)); 
    183183                        pixVal1=((0x3f0&(((unsigned short)(src[0]))<<4)) | (src[3] >> 4)); 
     
    242242         
    243243        // Loop through picture rows 
    244         for (i=camera_info.raw_rows; i;i-=2){ 
     244        for (i=camera_sensor.raw_rows; i;i-=2){ 
    245245                // Loop through picture columns  
    246                 for (j=camera_info.raw_rows; j; j-=8, src+=10){ 
     246                for (j=camera_sensor.raw_rows; j; j-=8, src+=10){ 
    247247                        pixVal0=((0x3fc&(((unsigned short)(src[1]))<<2)) | (src[0] >> 6)); 
    248248                        pixVal1=((0x3f0&(((unsigned short)(src[0]))<<4)) | (src[3] >> 4)); 
     
    307307            *(src+8) = (unsigned char) ((pixVal0)); //7 (=>0) 
    308308                } 
    309                 for (j=camera_info.raw_rows;j; j-=8, src+=10){ 
     309                for (j=camera_sensor.raw_rows;j; j-=8, src+=10){ 
    310310                        pixVal0=((0x3fc&(((unsigned short)(src[1]))<<2)) | (src[0] >> 6)); 
    311311                        pixVal1=((0x3f0&(((unsigned short)(src[0]))<<4)) | (src[3] >> 4)); 
  • branches/reyalp-flt/core/dng.c

    r1513 r1514  
    8787 {0xC612, T_BYTE,       4,  0x00000101},                        //DNGVersion: 1.1.0.0 
    8888 {0xC614, T_ASCII,      32, (int)cam_name},                     //UniqueCameraModel. Filled at header generation. 
    89  {0xC621, T_SRATIONAL,  9,  (int)&camera_info.color_matrix1}, 
     89 {0xC621, T_SRATIONAL,  9,  (int)&camera_sensor.color_matrix1}, 
    9090 {0xC627, T_RATIONAL,   3,  (int)cam_AnalogBalance}, 
    9191 {0xC628, T_RATIONAL,   3,  (int)cam_AsShotNeutral}, 
    92  {0xC62A, T_SRATIONAL,  1,  (int)&camera_info.exposure_bias}, 
     92 {0xC62A, T_SRATIONAL,  1,  (int)&camera_sensor.exposure_bias}, 
    9393 {0xC62B, T_RATIONAL,   1,  (int)cam_BaselineNoise}, 
    9494 {0xC62C, T_RATIONAL,   1,  (int)cam_BaselineSharpness}, 
    9595 {0xC62E, T_RATIONAL,   1,  (int)cam_LinearResponseLimit}, 
    96  {0xC630, T_RATIONAL,   4,  (int)&camera_info.lens_info}, 
    97  {0xC65A, T_SHORT|T_PTR,1,  (int)&camera_info.calibration_illuminant1},  
     96 {0xC630, T_RATIONAL,   4,  (int)&camera_sensor.lens_info}, 
     97 {0xC65A, T_SHORT|T_PTR,1,  (int)&camera_sensor.calibration_illuminant1},  
    9898 {0} 
    9999}; 
     
    102102struct dir_entry IFD1[]={ 
    103103 {0xFE,   T_LONG,       1,  0},                                 // NewSubFileType: Main Image 
    104  {0x100,  T_LONG|T_PTR, 1,  (int)&camera_info.raw_rowpix},      // ImageWidth 
    105  {0x101,  T_LONG|T_PTR, 1,  (int)&camera_info.raw_rows},        // ImageLength 
    106  {0x102,  T_SHORT|T_PTR,1,  (int)&camera_info.bits_per_pixel},  // BitsPerSample 
     104 {0x100,  T_LONG|T_PTR, 1,  (int)&camera_sensor.raw_rowpix},      // ImageWidth 
     105 {0x101,  T_LONG|T_PTR, 1,  (int)&camera_sensor.raw_rows},        // ImageLength 
     106 {0x102,  T_SHORT|T_PTR,1,  (int)&camera_sensor.bits_per_pixel},  // BitsPerSample 
    107107 {0x103,  T_SHORT,      1,  1},                                 // Compression: Uncompressed 
    108108 {0x106,  T_SHORT,      1,  0x8023},                            //PhotometricInterpretation: CFA 
    109109 {0x111,  T_LONG,       1,  0},                                 //StripOffsets: Offset 
    110110 {0x115,  T_SHORT,      1,  1},                                 // SamplesPerPixel: 1 
    111  {0x116,  T_SHORT|T_PTR,1,  (int)&camera_info.raw_rows},        //RowsPerStrip 
    112  {0x117,  T_LONG|T_PTR, 1,  (int)&camera_info.raw_size},        // StripByteCounts = CHDK RAW size 
     111 {0x116,  T_SHORT|T_PTR,1,  (int)&camera_sensor.raw_rows},        //RowsPerStrip 
     112 {0x117,  T_LONG|T_PTR, 1,  (int)&camera_sensor.raw_size},        // StripByteCounts = CHDK RAW size 
    113113 {0x11A,  T_RATIONAL,   1,  (int)cam_Resolution},               // XResolution 
    114114 {0x11B,  T_RATIONAL,   1,  (int)cam_Resolution},               // YResolution 
     
    116116 {0x128,  T_SHORT,      1,  2},                                 // ResolutionUnit: inch 
    117117 {0x828D, T_SHORT,      2,  0x00020002},                        // CFARepeatPatternDim: Rows = 2, Cols = 2 
    118  {0x828E, T_BYTE|T_PTR, 4,  (int)&camera_info.cfa_pattern}, 
    119  {0xC61A, T_LONG|T_PTR, 1,  (int)&camera_info.black_level},     // BlackLevel 
    120  {0xC61D, T_LONG|T_PTR, 1,  (int)&camera_info.white_level},     // WhiteLevel 
    121  {0xC61F, T_LONG,       2,  (int)&camera_info.crop.origin}, 
    122  {0xC620, T_LONG,       2,  (int)&camera_info.crop.size}, 
    123  {0xC68D, T_LONG,       4,  (int)&camera_info.dng_active_area}, 
     118 {0x828E, T_BYTE|T_PTR, 4,  (int)&camera_sensor.cfa_pattern}, 
     119 {0xC61A, T_LONG|T_PTR, 1,  (int)&camera_sensor.black_level},     // BlackLevel 
     120 {0xC61D, T_LONG|T_PTR, 1,  (int)&camera_sensor.white_level},     // WhiteLevel 
     121 {0xC61F, T_LONG,       2,  (int)&camera_sensor.crop.origin}, 
     122 {0xC620, T_LONG,       2,  (int)&camera_sensor.crop.size}, 
     123 {0xC68D, T_LONG,       4,  (int)&camera_sensor.dng_active_area}, 
    124124 {0} 
    125125}; 
     
    229229 // filling EXIF fields 
    230230 
    231  if (camera_info.has_gps) 
    232     get_property_case(PROPCASE_GPS, &gps_data, sizeof(tGPS)); 
     231 if (camera_sensor.gps_propcase) 
     232    get_property_case(camera_sensor.gps_propcase, &gps_data, sizeof(tGPS)); 
    233233 else 
    234      memset(&gps_data, 0, sizeof(tGPS)); 
     234    memset(&gps_data, 0, sizeof(tGPS)); 
    235235 
    236236 for (j=0;j<IFDs;j++) { 
     
    471471 struct utimbuf t; 
    472472 
    473  if (safe_stat(fn, &st) != 0 || st.st_size<=camera_info.raw_size)  return; 
     473 if (safe_stat(fn, &st) != 0 || st.st_size<=camera_sensor.raw_size)  return; 
    474474 buf=malloc(BUF_SIZE); 
    475475 if (buf){ 
     
    483483    raw=fopen(fn,"w+b"); 
    484484    if (raw){ 
    485      fseek(dng, st.st_size-camera_info.raw_size, SEEK_SET); // SEEK_END is not working? 
    486      for (i=0; i<camera_info.raw_size/BUF_SIZE; i++) { 
     485     fseek(dng, st.st_size-camera_sensor.raw_size, SEEK_SET); // SEEK_END is not working? 
     486     for (i=0; i<camera_sensor.raw_size/BUF_SIZE; i++) { 
    487487      fread(buf, 1, BUF_SIZE, dng); 
    488488      reverse_bytes_order((char*)buf, BUF_SIZE); 
    489489      fwrite(buf, 1, BUF_SIZE, raw); 
    490490     } 
    491      fread(buf, 1, camera_info.raw_size%BUF_SIZE, dng); 
    492      reverse_bytes_order((char*)buf, camera_info.raw_size%BUF_SIZE); 
    493      fwrite(buf, 1, camera_info.raw_size%BUF_SIZE, raw); 
     491     fread(buf, 1, camera_sensor.raw_size%BUF_SIZE, dng); 
     492     reverse_bytes_order((char*)buf, camera_sensor.raw_size%BUF_SIZE); 
     493     fwrite(buf, 1, camera_sensor.raw_size%BUF_SIZE, raw); 
    494494     fclose(raw); 
    495495     t.actime = t.modtime = time(NULL); 
     
    520520    register int i, j, x, y, yadj; 
    521521    register char *buf = thumbnail_buf; 
    522     register int shift = camera_info.bits_per_pixel - 8; 
     522    register int shift = camera_sensor.bits_per_pixel - 8; 
    523523 
    524524    // Two patterns are: 
     
    527527    // for the second pattern yadj shifts the thumbnail row down one line 
    528528    // essentially making the patterns the same 
    529     yadj = (camera_info.cfa_pattern == 0x01000201) ? 1 : 0; 
     529    yadj = (camera_sensor.cfa_pattern == 0x01000201) ? 1 : 0; 
    530530 
    531531    for (i=0; i<DNG_TH_HEIGHT; i++) 
    532532        for (j=0; j<DNG_TH_WIDTH; j++) 
    533533        { 
    534             x = (camera_info.jpeg.x + (camera_info.jpeg.width * j) / DNG_TH_WIDTH) & 0xFFFFFFFE; 
    535             y = ((camera_info.jpeg.y + (camera_info.jpeg.height * i) / DNG_TH_HEIGHT) & 0xFFFFFFFE) + yadj; 
     534            x = (camera_sensor.jpeg.x + (camera_sensor.jpeg.width * j) / DNG_TH_WIDTH) & 0xFFFFFFFE; 
     535            y = ((camera_sensor.jpeg.y + (camera_sensor.jpeg.height * i) / DNG_TH_HEIGHT) & 0xFFFFFFFE) + yadj; 
    536536 
    537537            *buf++ = gamma[get_raw_pixel(x,y)>>shift];           // red pixel 
     
    565565    } 
    566566    count = 0; 
    567     for (c[0]=camera_info.active_area.x1; c[0]<camera_info.active_area.x2; c[0]++) 
     567    for (c[0]=camera_sensor.active_area.x1; c[0]<camera_sensor.active_area.x2; c[0]++) 
    568568    { 
    569         for (c[1]=camera_info.active_area.y1; c[1]<camera_info.active_area.y2; c[1]++) 
     569        for (c[1]=camera_sensor.active_area.y1; c[1]<camera_sensor.active_area.y2; c[1]++) 
    570570        { 
    571571            if (get_raw_pixel(c[0],c[1])==0) 
     
    733733        write(fd, thumbnail_buf, DNG_TH_WIDTH*DNG_TH_HEIGHT*3); 
    734734 
    735         reverse_bytes_order2(rawadr, altrawadr, camera_info.raw_size); 
     735        reverse_bytes_order2(rawadr, altrawadr, camera_sensor.raw_size); 
    736736 
    737737        // Write alternate (inactive) buffer that we reversed the bytes into above (if only one buffer then it will be the active buffer instead) 
    738         write(fd, (char*)(((unsigned long)altrawadr)|uncachedbit), camera_info.raw_size); 
     738        write(fd, (char*)(((unsigned long)altrawadr)|uncachedbit), camera_sensor.raw_size); 
    739739 
    740740        if (rawadr == altrawadr)    // If only one RAW buffer then we have to swap the bytes back 
    741             reverse_bytes_order2(rawadr, altrawadr, camera_info.raw_size); 
     741            reverse_bytes_order2(rawadr, altrawadr, camera_sensor.raw_size); 
    742742 
    743743        free_dng_header(); 
  • branches/reyalp-flt/core/edgeoverlay.c

    r1512 r1514  
    4848static void get_viewport_size() 
    4949{ 
    50     viewport_height = vid_get_viewport_height()-camera_info.edge_hmargin*2; //don't trace bottom lines 
     50    viewport_height = vid_get_viewport_height()-camera_screen.edge_hmargin*2; //don't trace bottom lines 
    5151    viewport_width = vid_get_viewport_width(); 
    5252    viewport_byte_width = vid_get_viewport_byte_width(); 
     
    290290    int conv1, conv2; 
    291291 
    292     const int y_min = viewport_yoffset + camera_info.edge_hmargin+ slice   *slice_height; 
    293     const int y_max = viewport_yoffset + camera_info.edge_hmargin+(slice+1)*slice_height; 
     292    const int y_min = viewport_yoffset + camera_screen.edge_hmargin+ slice   *slice_height; 
     293    const int y_max = viewport_yoffset + camera_screen.edge_hmargin+(slice+1)*slice_height; 
    294294    const int x_min = viewport_xoffset*3 + 6; 
    295295    const int x_max = (viewport_width + viewport_xoffset - 2) * 3; 
     
    387387            if (conv1 + conv2 > *conf_edge_overlay_thresh) 
    388388            { 
    389                 bv_set(edgebuf, (y-viewport_yoffset-camera_info.edge_hmargin)*viewport_width + xdiv3, 1); 
     389                bv_set(edgebuf, (y-viewport_yoffset-camera_screen.edge_hmargin)*viewport_width + xdiv3, 1); 
    390390            } 
    391391 
     
    417417            if (conv1 + conv2 > *conf_edge_overlay_thresh) 
    418418            { 
    419                 bv_set(edgebuf, (y-viewport_yoffset-camera_info.edge_hmargin)*viewport_width + xdiv3+1, 1); 
     419                bv_set(edgebuf, (y-viewport_yoffset-camera_screen.edge_hmargin)*viewport_width + xdiv3+1, 1); 
    420420            } 
    421421        }   // for x 
     
    493493 
    494494    const color cl = *conf_edge_overlay_color; 
    495     const int y_slice_min = viewport_yoffset+camera_info.edge_hmargin+ slice   *slice_height; 
    496     const int y_slice_max = viewport_yoffset+camera_info.edge_hmargin+(slice+1)*slice_height; 
    497     const int y_min = viewport_yoffset+camera_info.edge_hmargin; 
    498     const int y_max = viewport_yoffset+camera_info.edge_hmargin+viewport_height; 
     495    const int y_slice_min = viewport_yoffset+camera_screen.edge_hmargin+ slice   *slice_height; 
     496    const int y_slice_max = viewport_yoffset+camera_screen.edge_hmargin+(slice+1)*slice_height; 
     497    const int y_min = viewport_yoffset+camera_screen.edge_hmargin; 
     498    const int y_max = viewport_yoffset+camera_screen.edge_hmargin+viewport_height; 
    499499    const int x_min = viewport_xoffset+2; 
    500500    const int x_max = (viewport_width + viewport_xoffset - 2); 
  • branches/reyalp-flt/core/gui.c

    r1513 r1514  
    16141614    draw_init(); 
    16151615 
    1616     exposition_thresh = screen_size/500; 
     1616    exposition_thresh = camera_screen.size/500; 
    16171617    voltage_step = (conf.batt_step_25)?25:1; 
    16181618    load_from_file( "A/CHDK/badpixel", make_pixel_list ); 
     
    23682368#if CAM_SWIVEL_SCREEN 
    23692369    if (conf.flashlight && (m&MODE_SCREEN_OPENED) && (m&MODE_SCREEN_ROTATED) && (gui_get_mode()==GUI_MODE_NONE /* || gui_get_mode()==GUI_MODE_ALT */)) { 
    2370         draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(COLOR_WHITE, COLOR_WHITE)); 
     2370        draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(COLOR_WHITE, COLOR_WHITE)); 
    23712371        flashlight = 1; 
    23722372    } 
     
    25982598    w=w*FONT_WIDTH+10; 
    25992599 
    2600     x = (screen_width-w)>>1; y = ((screen_height-h)>>1) + 20; 
     2600    x = (camera_screen.width-w)>>1; y = ((camera_screen.height-h)>>1) + 20; 
    26012601    draw_filled_round_rect(x, y, x+w, y+h, MAKE_COLOR(COLOR_RED, COLOR_RED)); 
    26022602    for (i=0; i<sizeof(text)/sizeof(text[0]); ++i) { 
     
    26072607      int mx=0; 
    26082608      int my=0; 
    2609       int offset_x = (screen_width-150)>>1; 
    2610       int offset_y = ((screen_height-84)>>1) - 42; 
     2609      int offset_x = (camera_screen.width-150)>>1; 
     2610      int offset_y = ((camera_screen.height-84)>>1) - 42; 
    26112611      const color color_lookup[8] = {COLOR_BLACK, 
    26122612                                                                        COLOR_SPLASH_RED/*0x2E redish*/, 
  • branches/reyalp-flt/core/gui_4wins.c

    r1513 r1514  
    2525 
    2626#define BORDER           20 
    27 #define XBORDER          (camera_info.ts_button_border+BORDER) 
     27#define XBORDER          (camera_screen.ts_button_border+BORDER) 
    2828#define RECT_SIZE        30 
    2929#define BORDER_TOP       RECT_SIZE 
     
    183183    w=l*FONT_WIDTH+10; 
    184184 
    185     x = (screen_width-camera_info.ts_button_border-w)>>1; y = ((screen_height)>>1); 
     185    x = (camera_screen.width-camera_screen.ts_button_border-w)>>1; y = ((camera_screen.height)>>1); 
    186186    draw_filled_round_rect(x, y, x+w, y+FONT_HEIGHT+6, MAKE_COLOR(COLOR_RED, COLOR_RED)); 
    187187    draw_string(x+((w-strlen(text)*FONT_WIDTH)>>1), y+4, text, cl); 
     
    248248void draw_mode() 
    249249{ 
    250     int x = (camera_info.ts_button_border/FONT_WIDTH) + 30; 
     250    int x = (camera_screen.ts_button_border/FONT_WIDTH) + 30; 
    251251        draw_txt_string(x, 4, "            ", TEXT_COLOR); 
    252252        if (mode_rival==1) 
     
    312312        srand(time(NULL)); 
    313313         
    314         draw_filled_rect(0, 0, screen_width, screen_height, BG_COLOR);          // draw backgraund 
     314        draw_filled_rect(0, 0, camera_screen.width, camera_screen.height, BG_COLOR);            // draw backgraund 
    315315        draw_filled_rect(XBORDER, BORDER+BORDER_TOP, XBORDER+(7*RECT_SIZE), BORDER+(6*RECT_SIZE)+BORDER_TOP, FIELD_COLOR); 
    316         draw_filled_round_rect(camera_info.ts_button_border+240, 90, camera_info.ts_button_border+360-BORDER, 240-10, INFO_COLOR); 
    317     draw_txt_string((camera_info.ts_button_border/FONT_WIDTH)+12, 0, lang_str(LANG_MENU_GAMES_CONNECT4), TEXT_COLOR); 
    318     draw_line(camera_info.ts_button_border,15,camera_info.ts_button_border+360,15,COLOR_SPLASH_GREY); 
     316        draw_filled_round_rect(camera_screen.ts_button_border+240, 90, camera_screen.ts_button_border+360-BORDER, 240-10, INFO_COLOR); 
     317    draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH)+12, 0, lang_str(LANG_MENU_GAMES_CONNECT4), TEXT_COLOR); 
     318    draw_line(camera_screen.ts_button_border,15,camera_screen.ts_button_border+360,15,COLOR_SPLASH_GREY); 
    319319 
    320320        for(i=0;i<7;i++) 
     
    332332 
    333333        move_cursor(0); 
    334         draw_txt_string((camera_info.ts_button_border/FONT_WIDTH)+30, 3, lang_str(LANG_CONNECT4_RIVAL), TEXT_COLOR); 
     334        draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH)+30, 3, lang_str(LANG_CONNECT4_RIVAL), TEXT_COLOR); 
    335335    sprintf(str, "%d",count_win[0]); 
    336         draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-10, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P1_COLOR)); 
     336        draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-10, camera_screen.height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P1_COLOR)); 
    337337    sprintf(str, ":"); 
    338         draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-7, screen_height/FONT_HEIGHT-9, str, INFO_TEXT_COLOR); 
     338        draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-7, camera_screen.height/FONT_HEIGHT-9, str, INFO_TEXT_COLOR); 
    339339    sprintf(str, "%d",count_win[1]); 
    340         draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-4, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P2_COLOR)); 
     340        draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-4, camera_screen.height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P2_COLOR)); 
    341341        draw_mode(); 
    342342        if(cur_player==2&&!mode_rival) set(); 
     
    373373  static char str[16]; 
    374374  sprintf(str, "%3d%%", get_batt_perc()); 
    375   draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-13, screen_height/FONT_HEIGHT-2, str, INFO_TEXT_COLOR); 
    376   gui_osd_draw_clock(camera_info.ts_button_border+290,208,INFO_TEXT_COLOR); 
     375  draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-13, camera_screen.height/FONT_HEIGHT-2, str, INFO_TEXT_COLOR); 
     376  gui_osd_draw_clock(camera_screen.ts_button_border+290,208,INFO_TEXT_COLOR); 
    377377} 
    378378 
  • branches/reyalp-flt/core/gui_bench.c

    r1513 r1514  
    7070    switch (bench_to_draw) { 
    7171        case 1: 
    72             draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     72            draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    7373            draw_txt_string(1, 0,  lang_str(LANG_BENCH_TITLE), MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    7474 
     
    8989            /* no break here */ 
    9090        case 2: 
    91             gui_bench_draw_results_screen(3, bench.screen_output_bps, screen_buffer_size); 
    92             gui_bench_draw_results_screen(4, bench.screen_input_bps, screen_width * vid_get_viewport_height() * 3); 
     91            gui_bench_draw_results_screen(3, bench.screen_output_bps, camera_screen.buffer_size); 
     92            gui_bench_draw_results_screen(4, bench.screen_input_bps, camera_screen.width * vid_get_viewport_height() * 3); 
    9393 
    9494            gui_bench_draw_results(7, bench.memory_write_bps); 
     
    127127    gui_bench_draw(); 
    128128    scr = vid_get_bitmap_fb(); 
    129     s = screen_buffer_size; 
     129    s = camera_screen.buffer_size; 
    130130    t = get_tick_count(); 
    131131    for (c=0; c<64; ++c) 
     
    139139    gui_bench_draw(); 
    140140    scr = vid_get_viewport_fb(); 
    141     s = screen_width * vid_get_viewport_height() * 3; 
     141    s = camera_screen.width * vid_get_viewport_height() * 3; 
    142142    t = get_tick_count(); 
    143143    for (n=0; n<64; ++n) 
  • branches/reyalp-flt/core/gui_calendar.c

    r1513 r1514  
    7171    int x, i; 
    7272 
    73     draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    74     draw_txt_string((camera_info.ts_button_border/FONT_WIDTH)+1, 0, lang_str(LANG_CALENDAR_TODAY), MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     73    draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     74    draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH)+1, 0, lang_str(LANG_CALENDAR_TODAY), MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    7575    draw_rect(cal_x-3, cal_y-3, cal_x+cal_w+2, cal_y+cal_h+2, CALENDAR_COLOR); 
    7676    draw_filled_rect(cal_x-1, cal_y-1, cal_x+cal_w, cal_y+FONT_HEIGHT+8, TITLE_COLOR); 
     
    9191    cal_w = FONT_WIDTH*4*7; 
    9292    cal_h = 4+FONT_HEIGHT+4+4+FONT_HEIGHT+4+(FONT_HEIGHT+4)*6; 
    93     cal_x = (screen_width-cal_w)/2; 
    94     cal_y = FONT_HEIGHT+(screen_height-FONT_HEIGHT-cal_h)/2; 
     93    cal_x = (camera_screen.width-cal_w)/2; 
     94    cal_y = FONT_HEIGHT+(camera_screen.height-FONT_HEIGHT-cal_h)/2; 
    9595    gui_calendar_initial_draw(); 
    9696    need_redraw = 1; 
     
    142142    ttm = localtime(&t); 
    143143    sprintf(str, " %2u %s %04u  %2u:%02u:%02u   ", ttm->tm_mday, lang_str(months[ttm->tm_mon]), 1900+ttm->tm_year, ttm->tm_hour, ttm->tm_min, ttm->tm_sec); 
    144     draw_txt_string((camera_info.ts_button_border/FONT_WIDTH)+8, 0, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     144    draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH)+8, 0, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    145145 
    146146    if (need_redraw) { 
  • branches/reyalp-flt/core/gui_debug.c

    r1513 r1514  
    6767    switch (debug_to_draw) { 
    6868        case 1: 
    69             draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     69            draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    7070            draw_txt_string(1, 0, "Address:", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    7171            draw_txt_string(22, 0, "Incr:", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
  • branches/reyalp-flt/core/gui_draw.c

    r1467 r1514  
    99//------------------------------------------------------------------- 
    1010static char*    frame_buffer[2]; 
    11 unsigned int    screen_width=0, screen_height=0, screen_size=0; 
    12 unsigned int    screen_buffer_width=0, screen_buffer_height=0, screen_buffer_size=0; 
    1311void            (*draw_pixel_proc)(unsigned int offset, color cl); 
    1412 
     
    4442int draw_test_pixel(coord x, coord y, color c) 
    4543{ 
    46     if (x >= screen_width || y >= screen_height) return 0; 
    47     return (frame_buffer[0][y * screen_buffer_width + ASPECT_XCORRECTION(x)] == c) && 
    48            (frame_buffer[1][y * screen_buffer_width + ASPECT_XCORRECTION(x)] == c); 
     44    if (x >= camera_screen.width || y >= camera_screen.height) return 0; 
     45    return (frame_buffer[0][y * camera_screen.buffer_width + ASPECT_XCORRECTION(x)] == c) && 
     46           (frame_buffer[1][y * camera_screen.buffer_width + ASPECT_XCORRECTION(x)] == c); 
    4947} 
    5048 
     
    5553    register int i; 
    5654 
    57     screen_width = vid_get_bitmap_screen_width(); 
    58     screen_height  = vid_get_bitmap_screen_height(); 
    59     screen_size = screen_width * screen_height; 
    60     screen_buffer_width = vid_get_bitmap_buffer_width(); 
    61     screen_buffer_height = vid_get_bitmap_buffer_height(); 
    62     screen_buffer_size = screen_buffer_width * screen_buffer_height; 
    6355    frame_buffer[0] = vid_get_bitmap_fb(); 
    64     frame_buffer[1] = frame_buffer[0] + screen_buffer_size; 
     56    frame_buffer[1] = frame_buffer[0] + camera_screen.buffer_size; 
    6557    draw_set_draw_proc(NULL); 
    6658 
     
    7264//------------------------------------------------------------------- 
    7365void draw_pixel(coord x, coord y, color cl) { 
    74     if (x >= screen_width || y >= screen_height) return; 
     66    if (x >= camera_screen.width || y >= camera_screen.height) return; 
    7567    else { 
    76         register unsigned int offset = y * screen_buffer_width + ASPECT_XCORRECTION(x); 
     68        register unsigned int offset = y * camera_screen.buffer_width + ASPECT_XCORRECTION(x); 
    7769        draw_pixel_proc(offset,   cl); 
    7870#if CAM_USES_ASPECT_CORRECTION 
     
    8476//------------------------------------------------------------------- 
    8577color draw_get_pixel(coord x, coord y) { 
    86     if (x >= screen_width || y >= screen_height) return 0; 
    87     return frame_buffer[0][y * screen_buffer_width + ASPECT_XCORRECTION(x) ]; 
     78    if (x >= camera_screen.width || y >= camera_screen.height) return 0; 
     79    return frame_buffer[0][y * camera_screen.buffer_width + ASPECT_XCORRECTION(x) ]; 
    8880} 
    8981 
     
    120112void draw_hline(coord x, coord y, int len, color cl) 
    121113{ 
    122     if (x >= screen_width || y >= screen_height) return; 
     114    if (x >= camera_screen.width || y >= camera_screen.height) return; 
    123115    if (x < 0) { len += x; x = 0; } 
    124     if ((x + len) > screen_width) len = screen_width - x; 
    125     register unsigned int offset = y * screen_buffer_width + ASPECT_XCORRECTION(x); 
     116    if ((x + len) > camera_screen.width) len = camera_screen.width - x; 
     117    register unsigned int offset = y * camera_screen.buffer_width + ASPECT_XCORRECTION(x); 
    126118    len = ASPECT_XCORRECTION(len);      // Scale the line length if needed 
    127119    for (; len>=0; len--, offset++) 
     
    131123void draw_vline(coord x, coord y, int len, color cl) 
    132124{ 
    133     if ((x < 0) || (x >= screen_width) || (y >= screen_height)) return; 
     125    if ((x < 0) || (x >= camera_screen.width) || (y >= camera_screen.height)) return; 
    134126    if (y < 0) { len += y; y = 0; } 
    135     if ((y + len) > screen_height) len = screen_height - y; 
     127    if ((y + len) > camera_screen.height) len = camera_screen.height - y; 
    136128    for (; len>=0; len--, y++) 
    137129      draw_pixel(x, y, cl); 
     
    156148        yMin=y1; yMax=y2; 
    157149    } 
    158     if (xMax>=screen_width) xMax=screen_width-1; 
    159     if (xMin>=screen_width) xMin=screen_width-1; 
    160     if (yMax>=screen_height) yMax=screen_height-1; 
    161     if (yMin>=screen_height) yMin=screen_height-1; 
     150    if (xMax>=camera_screen.width) xMax=camera_screen.width-1; 
     151    if (xMin>=camera_screen.width) xMin=camera_screen.width-1; 
     152    if (yMax>=camera_screen.height) yMax=camera_screen.height-1; 
     153    if (yMin>=camera_screen.height) yMin=camera_screen.height-1; 
    162154 
    163155    for (y=yMin+(round<<1); y<=yMax-(round<<1); ++y) 
     
    260252            s++; 
    261253            x+=FONT_WIDTH; 
    262             if ((x>=screen_width) && (*s)) 
     254            if ((x>=camera_screen.width) && (*s)) 
    263255        { 
    264256                draw_char(x-FONT_WIDTH,y, '>', cl); 
     
    300292//------------------------------------------------------------------- 
    301293void draw_clear() { 
    302     memset(frame_buffer[0], COLOR_TRANSPARENT, screen_buffer_size*2); 
     294    memset(frame_buffer[0], COLOR_TRANSPARENT, camera_screen.buffer_size*2); 
    303295} 
    304296 
  • branches/reyalp-flt/core/gui_draw.h

    r1513 r1514  
    775775 
    776776//------------------------------------------------------------------- 
    777 extern unsigned int         screen_width, screen_height, screen_size; 
    778 extern unsigned int         screen_buffer_width, screen_buffer_height, screen_buffer_size; 
    779  
    780 //------------------------------------------------------------------- 
    781777extern void draw_init(); 
    782778extern void draw_set_draw_proc(void (*pixel_proc)(unsigned int offset, color cl)); 
  • branches/reyalp-flt/core/gui_fselect.c

    r1513 r1514  
    352352    main_w = SPACING/*N*/+SPACING+TAB_DIVIDER+SPACING/*S*/+SPACING+TAB_DIVIDER+SPACING/*T*/+SPACING+SCROLLBAR+chars_width; 
    353353    main_h = HEAD_FONT_LINES + TAB_DIVIDER + BODY_FONT_LINES + TAB_DIVIDER + FOOT_FONT_LINES; 
    354     main_x = (screen_width - main_w) >> 1; 
    355     main_y = (screen_height - main_h) >> 1; 
     354    main_x = (camera_screen.width - main_w) >> 1; 
     355    main_y = (camera_screen.height - main_h) >> 1; 
    356356     
    357357    head_x = body_x = foot_x = main_x; 
  • branches/reyalp-flt/core/gui_mastermind.c

    r1513 r1514  
    3838static void guess_box(int pos, color col) 
    3939{ 
    40         draw_filled_rect(camera_info.ts_button_border+100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, camera_info.ts_button_border+100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(col,col)); 
     40        draw_filled_rect(camera_screen.ts_button_border+100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, camera_screen.ts_button_border+100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(col,col)); 
    4141} 
    4242 
     
    8787                     curr_color[1]==curr_color[2] || curr_color[1]==curr_color[3] || curr_color[2]==curr_color[3]) 
    8888    { 
    89                 draw_string(camera_info.ts_button_border+167, 130, lang_str(LANG_MENU_GAMES_DCOLOR), TEXT_COLOR); 
     89                draw_string(camera_screen.ts_button_border+167, 130, lang_str(LANG_MENU_GAMES_DCOLOR), TEXT_COLOR); 
    9090                return 0; 
    9191        } 
     
    116116        curr_y=7; 
    117117         
    118         draw_filled_rect( 0, 0, screen_width-1, screen_height-1, BG_COLOR); 
     118        draw_filled_rect( 0, 0, camera_screen.width-1, camera_screen.height-1, BG_COLOR); 
    119119 
    120120        for (i=0;i<4;i++) 
    121121                for (j=0;j<8;j++) 
    122                         draw_filled_rect(camera_info.ts_button_border+BORDER+(2*i*10), BORDER+(2*j*10)+2*j, camera_info.ts_button_border+BORDER+(2*i*10)+10, BORDER+(2*j*10)+2*j+10 , COLOR_LIGHT_GRAY); 
    123  
    124         draw_filled_rect(camera_info.ts_button_border+10, BORDER+(2*j*10)+2*j, camera_info.ts_button_border+150,BORDER+(2*j*10)+2*j+1, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
    125         draw_filled_rect(camera_info.ts_button_border+148, 10, camera_info.ts_button_border+149,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
    126         draw_filled_rect(camera_info.ts_button_border+151, 10, camera_info.ts_button_border+152,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
     122                        draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*i*10), BORDER+(2*j*10)+2*j, camera_screen.ts_button_border+BORDER+(2*i*10)+10, BORDER+(2*j*10)+2*j+10 , COLOR_LIGHT_GRAY); 
     123 
     124        draw_filled_rect(camera_screen.ts_button_border+10, BORDER+(2*j*10)+2*j, camera_screen.ts_button_border+150,BORDER+(2*j*10)+2*j+1, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
     125        draw_filled_rect(camera_screen.ts_button_border+148, 10, camera_screen.ts_button_border+149,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
     126        draw_filled_rect(camera_screen.ts_button_border+151, 10, camera_screen.ts_button_border+152,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
    127127         
    128128        for (i=0; i<6;i++) 
    129                 draw_filled_rect(camera_info.ts_button_border+BORDER+(2*(i+7)*10)+20, 40, camera_info.ts_button_border+BORDER+(2*(i+7)*10)+35,55, MAKE_COLOR(colors[i],colors[i])); 
     129                draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*(i+7)*10)+20, 40, camera_screen.ts_button_border+BORDER+(2*(i+7)*10)+35,55, MAKE_COLOR(colors[i],colors[i])); 
    130130                 
    131         draw_filled_rect(camera_info.ts_button_border+BORDER+(2*7*10)+20, 65, camera_info.ts_button_border+BORDER+(2*7*10)+35,80, MAKE_COLOR(COLOR_BLACK,COLOR_BLACK)); 
    132         draw_string(camera_info.ts_button_border+BORDER+(2*7*10)+50, 65 , lang_str(LANG_MENU_GAMES_RIGHT_PLACE), TEXT_COLOR); 
    133          
    134         draw_filled_rect(camera_info.ts_button_border+BORDER+(2*7*10)+20, 90, camera_info.ts_button_border+BORDER+(2*7*10)+35,105, MAKE_COLOR(COLOR_WHITE,COLOR_WHITE)); 
    135         draw_string(camera_info.ts_button_border+BORDER+(2*7*10)+50, 90 , lang_str(LANG_MENU_GAMES_C_IN_ANSWER), TEXT_COLOR); 
     131        draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*7*10)+20, 65, camera_screen.ts_button_border+BORDER+(2*7*10)+35,80, MAKE_COLOR(COLOR_BLACK,COLOR_BLACK)); 
     132        draw_string(camera_screen.ts_button_border+BORDER+(2*7*10)+50, 65 , lang_str(LANG_MENU_GAMES_RIGHT_PLACE), TEXT_COLOR); 
     133         
     134        draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*7*10)+20, 90, camera_screen.ts_button_border+BORDER+(2*7*10)+35,105, MAKE_COLOR(COLOR_WHITE,COLOR_WHITE)); 
     135        draw_string(camera_screen.ts_button_border+BORDER+(2*7*10)+50, 90 , lang_str(LANG_MENU_GAMES_C_IN_ANSWER), TEXT_COLOR); 
    136136                                         
    137         draw_string(camera_info.ts_button_border+173, 20 , lang_str(LANG_MENU_GAMES_AC_COLORS), TEXT_COLOR); 
     137        draw_string(camera_screen.ts_button_border+173, 20 , lang_str(LANG_MENU_GAMES_AC_COLORS), TEXT_COLOR); 
    138138                 
    139         draw_string(camera_info.ts_button_border+167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), TEXT_COLOR); 
    140         draw_string(camera_info.ts_button_border+167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), TEXT_COLOR); 
    141         draw_string(camera_info.ts_button_border+167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), TEXT_COLOR); 
     139        draw_string(camera_screen.ts_button_border+167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), TEXT_COLOR); 
     140        draw_string(camera_screen.ts_button_border+167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), TEXT_COLOR); 
     141        draw_string(camera_screen.ts_button_border+167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), TEXT_COLOR); 
    142142 
    143143        for(i=0;i<4;i++) curr_color[i]=99; 
     
    151151{ 
    152152    if (curr_color[curr_x] == 99) curr_color[curr_x] = 0; 
    153     draw_filled_rect(camera_info.ts_button_border+BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, camera_info.ts_button_border+BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],border)); 
     153    draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, camera_screen.ts_button_border+BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],border)); 
    154154} 
    155155 
     
    157157{ 
    158158    int i; 
    159     draw_string(camera_info.ts_button_border+198, 130 , lang_str(msg), TEXT_COLOR); 
     159    draw_string(camera_screen.ts_button_border+198, 130 , lang_str(msg), TEXT_COLOR); 
    160160        for (i=0; i<4;i++) 
    161             draw_filled_rect(camera_info.ts_button_border+BORDER+(2*i*10), 213, camera_info.ts_button_border+BORDER+(2*i*10)+10,223,  MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
     161            draw_filled_rect(camera_screen.ts_button_border+BORDER+(2*i*10), 213, camera_screen.ts_button_border+BORDER+(2*i*10)+10,223,  MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
    162162} 
    163163 
     
    181181        if (GameGo == 1) 
    182182        { 
    183             draw_string(camera_info.ts_button_border+167, 130 , "                       ", TEXT_COLOR); 
     183            draw_string(camera_screen.ts_button_border+167, 130 , "                       ", TEXT_COLOR); 
    184184                switch (kbd_get_autoclicked_key())  
    185185                { 
     
    233233    static struct tm *ttm; 
    234234 
    235     draw_txt_string(camera_info.ts_button_border/FONT_WIDTH+15, 0, lang_str(LANG_MENU_GAMES_MASTERMIND), MAKE_COLOR(BG_COLOR, COLOR_WHITE)); 
     235    draw_txt_string(camera_screen.ts_button_border/FONT_WIDTH+15, 0, lang_str(LANG_MENU_GAMES_MASTERMIND), MAKE_COLOR(BG_COLOR, COLOR_WHITE)); 
    236236 
    237237    t = time(NULL); 
    238238    ttm = localtime(&t); 
    239239    sprintf(buf, "Time: %2u:%02u  Batt:%3d%%", ttm->tm_hour, ttm->tm_min, get_batt_perc()); 
    240     draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-1-1-9-2-5-4, screen_height/FONT_HEIGHT-1, buf, TEXT_COLOR); 
     240    draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-1-1-9-2-5-4, camera_screen.height/FONT_HEIGHT-1, buf, TEXT_COLOR); 
    241241} 
    242242 
  • branches/reyalp-flt/core/gui_mbox.c

    r1513 r1514  
    119119            w=(bw+BUTTON_SEP)/FONT_WIDTH+1; 
    120120     
    121         x = (vid_get_bitmap_screen_width() - w * FONT_WIDTH) >> 1; 
    122         y = (vid_get_bitmap_screen_height() - (h+2) * FONT_HEIGHT) >> 1; 
     121        x = (camera_screen.width - w * FONT_WIDTH) >> 1; 
     122        y = (camera_screen.height - (h+2) * FONT_HEIGHT) >> 1; 
    123123        draw_rect_shadow(x-3, y-3, x+w*FONT_WIDTH+5, y+(h+2)*FONT_HEIGHT+SPACING_BTN+2+SPACING_TITLE+8, COLOR_BLACK, 3); //shadow 
    124124        draw_filled_rect_thick(x-4, y-4, x+w*FONT_WIDTH+4, y+(h+2)*FONT_HEIGHT+SPACING_BTN+2+SPACING_TITLE+7, MAKE_COLOR(COLOR_GREY, COLOR_WHITE), 3); // main box 
  • branches/reyalp-flt/core/gui_menu.c

    r1513 r1514  
    5555    } 
    5656 
    57     num_lines = screen_height/rbf_font_height()-1; 
     57    num_lines = camera_screen.height/rbf_font_height()-1; 
    5858    x = CAM_MENU_BORDERWIDTH; 
    59     w = screen_width-x-x; 
     59    w = camera_screen.width-x-x; 
    6060    len_bool = rbf_str_width("\x95"); 
    6161    len_int = rbf_str_width("99999"); 
     
    602602    if (count > num_lines) 
    603603    { 
    604         y = ((screen_height-(num_lines-1)*rbf_font_height())>>1); 
     604        y = ((camera_screen.height-(num_lines-1)*rbf_font_height())>>1); 
    605605        wplus = 8;  
    606606        // scrollbar background  
     
    612612        if (conf.menu_center) 
    613613        { 
    614             y = (screen_height-(count-1)*rbf_font_height())>>1;  
     614            y = (camera_screen.height-(count-1)*rbf_font_height())>>1;  
    615615        } 
    616616        else 
    617617        { 
    618             y = ((screen_height-(num_lines-1)*rbf_font_height())>>1);   
     618            y = ((camera_screen.height-(num_lines-1)*rbf_font_height())>>1);   
    619619        } 
    620620    } 
  • branches/reyalp-flt/core/gui_osd.c

    r1513 r1514  
    140140        } 
    141141        sprintf(osd_buf, " %s:  x:%d y:%d s:%d ", lang_str(osd[curr_item].title), osd[curr_item].pos->x, osd[curr_item].pos->y, step); 
    142         draw_string(0, (osd[curr_item].pos->x<strlen(osd_buf)*FONT_WIDTH+4 && osd[curr_item].pos->y<FONT_HEIGHT+4)?screen_height-FONT_HEIGHT:0, 
     142        draw_string(0, (osd[curr_item].pos->x<strlen(osd_buf)*FONT_WIDTH+4 && osd[curr_item].pos->y<FONT_HEIGHT+4)?camera_screen.height-FONT_HEIGHT:0, 
    143143                    osd_buf, MAKE_COLOR(COLOR_RED, COLOR_WHITE)); 
    144144        osd_to_draw = 0; 
     
    156156        break; 
    157157    case KEY_RIGHT: 
    158         if (osd[curr_item].pos->x < screen_width-osd[curr_item].size.x) { 
    159             osd[curr_item].pos->x+=(screen_width-osd[curr_item].size.x-osd[curr_item].pos->x>step)?step:screen_width-osd[curr_item].size.x-osd[curr_item].pos->x; 
     158        if (osd[curr_item].pos->x < camera_screen.width-osd[curr_item].size.x) { 
     159            osd[curr_item].pos->x+=(camera_screen.width-osd[curr_item].size.x-osd[curr_item].pos->x>step)?step:camera_screen.width-osd[curr_item].size.x-osd[curr_item].pos->x; 
    160160            osd_to_draw = 1; 
    161161        } else 
    162             osd[curr_item].pos->x = screen_width-osd[curr_item].size.x; 
     162            osd[curr_item].pos->x = camera_screen.width-osd[curr_item].size.x; 
    163163        break; 
    164164    case KEY_UP: 
     
    169169        break; 
    170170    case KEY_DOWN: 
    171         if (osd[curr_item].pos->y < screen_height-osd[curr_item].size.y) { 
    172             osd[curr_item].pos->y+=(screen_height-osd[curr_item].size.y-osd[curr_item].pos->y>step)?step:screen_height-osd[curr_item].size.y-osd[curr_item].pos->y; 
     171        if (osd[curr_item].pos->y < camera_screen.height-osd[curr_item].size.y) { 
     172            osd[curr_item].pos->y+=(camera_screen.height-osd[curr_item].size.y-osd[curr_item].pos->y>step)?step:camera_screen.height-osd[curr_item].size.y-osd[curr_item].pos->y; 
    173173            osd_to_draw = 1; 
    174174        } else 
    175             osd[curr_item].pos->y = screen_height-osd[curr_item].size.y; 
     175            osd[curr_item].pos->y = camera_screen.height-osd[curr_item].size.y; 
    176176        break; 
    177177    case KEY_SET: 
     
    267267      timer = 0; 
    268268          #if defined (CAM_ZEBRA_NOBUF) 
    269         buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width; 
     269        buffer_size=camera_screen.buffer_size-ZEBRA_HMARGIN0*camera_screen.buffer_width; 
    270270        buf=vid_get_bitmap_fb(); 
    271271          #elif defined (CAM_ZEBRA_ASPECT_ADJUST) 
    272         buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width; 
     272        buffer_size=camera_screen.buffer_size-ZEBRA_HMARGIN0*camera_screen.buffer_width; 
    273273        buf = malloc(buffer_size); 
    274274        //~ if (!buf) draw_txt_string(0, 14, "Warn: No space to allocate zebra buffer: restart camera", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 
     
    277277        //~ msleep(50); 
    278278      #else 
    279         buf = malloc(screen_buffer_size); 
     279        buf = malloc(camera_screen.buffer_size); 
    280280      #endif 
    281281            scr_buf = vid_get_bitmap_fb(); 
    282282#if ZEBRA_CANONOSD_BORDER_RESTORE 
    283             cur_buf_top = malloc(screen_buffer_width * ZFIX_TOP);  
    284             cur_buf_bot = malloc(screen_buffer_width * ZFIX_BOTTOM);  
     283            cur_buf_top = malloc(camera_screen.buffer_width * ZFIX_TOP);  
     284            cur_buf_bot = malloc(camera_screen.buffer_width * ZFIX_BOTTOM);  
    285285#if defined (CAM_ZEBRA_ASPECT_ADJUST) 
    286             if (cur_buf_top) memset(cur_buf_top,0,screen_buffer_width * ZFIX_TOP); 
    287             if (cur_buf_bot) memset(cur_buf_bot,0,screen_buffer_width * ZFIX_BOTTOM); 
     286            if (cur_buf_top) memset(cur_buf_top,0,camera_screen.buffer_width * ZFIX_TOP); 
     287            if (cur_buf_bot) memset(cur_buf_bot,0,camera_screen.buffer_width * ZFIX_BOTTOM); 
    288288#endif 
    289289#else 
    290             cur_buf = malloc(screen_buffer_size); 
     290            cur_buf = malloc(camera_screen.buffer_size); 
    291291#endif       
    292292                        // cleanup and disable zebra if any mallocs failed 
     
    303303#if CAM_HAS_VARIABLE_ASPECT 
    304304                        else // in variable aspect, the borders would never be cleared 
    305                                 memset(buf,0,screen_buffer_size); 
     305                                memset(buf,0,camera_screen.buffer_size); 
    306306#endif 
    307307        } 
     
    329329//------------------------------------------------------------------- 
    330330int draw_guard_pixel() { 
    331     unsigned char* buffer1 = vid_get_bitmap_fb()+screen_buffer_size/2; 
    332     unsigned char* buffer2 = buffer1+screen_buffer_size; 
     331    unsigned char* buffer1 = vid_get_bitmap_fb()+camera_screen.buffer_size/2; 
     332    unsigned char* buffer2 = buffer1+camera_screen.buffer_size; 
    333333    int has_disappeared=0; 
    334334 
     
    344344    unsigned int a; 
    345345     
    346     a=screen_buffer_size - screen_buffer_width * ZFIX_BOTTOM; 
     346    a=camera_screen.buffer_size - camera_screen.buffer_width * ZFIX_BOTTOM; 
    347347     
    348     if (idx < screen_buffer_width * ZFIX_TOP) return(cur_buf_top[idx]); 
    349     if (idx >= a && idx < screen_buffer_size) return(cur_buf_bot[idx - a]); 
     348    if (idx < camera_screen.buffer_width * ZFIX_TOP) return(cur_buf_top[idx]); 
     349    if (idx >= a && idx < camera_screen.buffer_size) return(cur_buf_bot[idx - a]); 
    350350    return (COLOR_TRANSPARENT); 
    351351} 
     
    485485    if (f) { 
    486486                if (viewport_yoffset > 0) { // clear top & bottom areas of buffer if image height if smaller than viewport 
    487                         memset(buf, COLOR_TRANSPARENT, viewport_yoffset*screen_buffer_width); 
    488                         memset(buf+(viewport_yoffset+viewport_height)*screen_buffer_width, COLOR_TRANSPARENT, viewport_yoffset*screen_buffer_width); 
     487                        memset(buf, COLOR_TRANSPARENT, viewport_yoffset*camera_screen.buffer_width); 
     488                        memset(buf+(viewport_yoffset+viewport_height)*camera_screen.buffer_width, COLOR_TRANSPARENT, viewport_yoffset*camera_screen.buffer_width); 
    489489                } 
    490490        int step_x, step_v, sy, sx; 
     
    492492            if (conf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;} 
    493493            for (y=viewport_yoffset, v=viewport_image_offset; y<viewport_yoffset+viewport_height; ++y) { 
    494                 sy=y*screen_buffer_width; 
     494                sy=y*camera_screen.buffer_width; 
    495495                sx=viewport_xoffset; 
    496496                                if (viewport_xoffset > 0) { // clear left & right areas of buffer if image width if smaller than viewport 
     
    544544//~ #if ZEBRA_CANONOSD_BORDER_RESTORE 
    545545                    //~ // copy rescued Canon OSD to buf[] top/bottom parts and fill center with transparent color: 
    546                     //~ memcpy(buf, cur_buf_top, screen_buffer_width * ZFIX_TOP); 
    547                     //~ memcpy(buf + screen_buffer_size - screen_buffer_width * ZFIX_BOTTOM, cur_buf_bot, screen_buffer_width * ZFIX_BOTTOM); 
    548                     //~ for (s = screen_buffer_width*ZFIX_TOP; s < screen_buffer_size-screen_buffer_width*ZFIX_BOTTOM; s++) { 
     546                    //~ memcpy(buf, cur_buf_top, camera_screen.buffer_width * ZFIX_TOP); 
     547                    //~ memcpy(buf + camera_screen.buffer_size - camera_screen.buffer_width * ZFIX_BOTTOM, cur_buf_bot, camera_screen.buffer_width * ZFIX_BOTTOM); 
     548                    //~ for (s = camera_screen.buffer_width*ZFIX_TOP; s < camera_screen.buffer_size-camera_screen.buffer_width*ZFIX_BOTTOM; s++) { 
    549549                        //~ buf[s]=COLOR_TRANSPARENT; 
    550550                    //~ } 
    551551//~ #else 
    552552                    //~ // copy from a complete Canon OSD rescue screen dump 
    553                     //~ memcpy(buf, cur_buf, screen_buffer_size);  
     553                    //~ memcpy(buf, cur_buf, camera_screen.buffer_size);  
    554554//~ #endif 
    555555                } else { // Not REC mode 
     
    563563                if (buf!=scr_buf) 
    564564                  memcpy(scr_buf, buf, buffer_size); 
    565                   memcpy(scr_buf+screen_buffer_size, buf, buffer_size); 
     565                  memcpy(scr_buf+camera_screen.buffer_size, buf, buffer_size); 
    566566            } 
    567567            need_restore=0; 
     
    575575        if (buf!=scr_buf) 
    576576            memcpy(scr_buf, buf, buffer_size); 
    577             memcpy(scr_buf+screen_buffer_size, buf, buffer_size); 
     577            memcpy(scr_buf+camera_screen.buffer_size, buf, buffer_size); 
    578578 
    579579        need_restore=1; 
     
    609609    { 
    610610        bWide = 0; 
    611         //aspOffset = (screen_width - (screen_width * 12 / 16)) / 2; // = actual calculation, simplified below 
    612         aspOffset = screen_width / 8; // half of the difference in width between equal height 16:9 and 4:3 screens, = black bar width 
     611        //aspOffset = (camera_screen.width - (camera_screen.width * 12 / 16)) / 2; // = actual calculation, simplified below 
     612        aspOffset = camera_screen.width / 8; // half of the difference in width between equal height 16:9 and 4:3 screens, = black bar width 
    613613    } 
    614614#endif 
     
    632632        // rescue Canon OSD from scr_buf to cur_buf_top and _bot: 
    633633        if (n==1) { 
    634             memcpy(cur_buf_top, scr_buf, screen_buffer_width*ZFIX_TOP); 
    635             memcpy(cur_buf_bot, scr_buf + screen_buffer_size - screen_buffer_width*ZFIX_BOTTOM, screen_buffer_width*ZFIX_BOTTOM); 
     634            memcpy(cur_buf_top, scr_buf, camera_screen.buffer_width*ZFIX_TOP); 
     635            memcpy(cur_buf_bot, scr_buf + camera_screen.buffer_size - camera_screen.buffer_width*ZFIX_BOTTOM, camera_screen.buffer_width*ZFIX_BOTTOM); 
    636636        } 
    637637        else { 
    638             memcpy(cur_buf_top, scr_buf + screen_buffer_size, screen_buffer_width*ZFIX_TOP); 
    639             memcpy(cur_buf_bot, scr_buf + 2*screen_buffer_size - screen_buffer_width*ZFIX_BOTTOM, screen_buffer_width*ZFIX_BOTTOM); 
     638            memcpy(cur_buf_top, scr_buf + camera_screen.buffer_size, camera_screen.buffer_width*ZFIX_TOP); 
     639            memcpy(cur_buf_bot, scr_buf + 2*camera_screen.buffer_size - camera_screen.buffer_width*ZFIX_BOTTOM, camera_screen.buffer_width*ZFIX_BOTTOM); 
    640640        } 
    641641#else 
    642642        // rescue Canon OSD from cur_buf 
    643         if(n==1) memcpy(cur_buf, scr_buf, screen_buffer_size); 
    644         else memcpy(cur_buf, scr_buf+screen_buffer_size, screen_buffer_size); 
     643        if(n==1) memcpy(cur_buf, scr_buf, camera_screen.buffer_size); 
     644        else memcpy(cur_buf, scr_buf+camera_screen.buffer_size, camera_screen.buffer_size); 
    645645#endif 
    646646    } 
     
    686686            s = aspOffset; 
    687687            for (y=1, v=0; y<=viewport_height; ++y) { 
    688                 for (x=0; x<screen_width; x+=step_x, s+=step_x, v+=step_v) { 
     688                for (x=0; x<camera_screen.width; x+=step_x, s+=step_x, v+=step_v) { 
    689689                    register int yy, uu, vv; 
    690690                    int sel; 
    691691                                                                                 
    692                     if (!bWide && (x + aspOffset >= screen_width - aspOffset)) continue; // do not draw "outside screen"  
     692                    if (!bWide && (x + aspOffset >= camera_screen.width - aspOffset)) continue; // do not draw "outside screen"  
    693693                                                                                 
    694694                    yy = img_buf[v+1]; 
     
    718718                    } 
    719719                } 
    720                 s+=screen_buffer_width-screen_width; 
    721                 if (y*screen_height/viewport_height == (s+screen_buffer_width)/screen_buffer_width) { 
    722                     memcpy(buf+s, buf+s-screen_buffer_width, screen_buffer_width); 
    723                     s+=screen_buffer_width; 
     720                s+=camera_screen.buffer_width-camera_screen.width; 
     721                if (y*camera_screen.height/viewport_height == (s+camera_screen.buffer_width)/camera_screen.buffer_width) { 
     722                    memcpy(buf+s, buf+s-camera_screen.buffer_width, camera_screen.buffer_width); 
     723                    s+=camera_screen.buffer_width; 
    724724                } 
    725725            } 
     
    736736#if ZEBRA_CANONOSD_BORDER_RESTORE 
    737737                    // copy rescued Canon OSD to buf[] top/bottom parts and fill center with transparent color: 
    738                     memcpy(buf, cur_buf_top, screen_buffer_width * ZFIX_TOP); 
    739                     memcpy(buf + screen_buffer_size - screen_buffer_width * ZFIX_BOTTOM, cur_buf_bot, screen_buffer_width * ZFIX_BOTTOM); 
    740                     for (s = screen_buffer_width*ZFIX_TOP; s < screen_buffer_size-screen_buffer_width*ZFIX_BOTTOM; s++) { 
     738                    memcpy(buf, cur_buf_top, camera_screen.buffer_width * ZFIX_TOP); 
     739                    memcpy(buf + camera_screen.buffer_size - camera_screen.buffer_width * ZFIX_BOTTOM, cur_buf_bot, camera_screen.buffer_width * ZFIX_BOTTOM); 
     740                    for (s = camera_screen.buffer_width*ZFIX_TOP; s < camera_screen.buffer_size-camera_screen.buffer_width*ZFIX_BOTTOM; s++) { 
    741741                        buf[s]=COLOR_TRANSPARENT; 
    742742                    } 
    743743#else 
    744744                    // copy from a complete Canon OSD rescue screen dump 
    745                     memcpy(buf, cur_buf, screen_buffer_size);  
     745                    memcpy(buf, cur_buf, camera_screen.buffer_size);  
    746746#endif 
    747747                } else { // Not REC mode 
    748748                    // No Canon OSD restore, fill buf[] with transparent color: 
    749                     memset(buf, COLOR_TRANSPARENT, screen_buffer_size); 
     749                    memset(buf, COLOR_TRANSPARENT, camera_screen.buffer_size); 
    750750                } 
    751751                // draw CHDK osd and histogram to buf[] (if enabled in config) 
    752752                gui_osd_draw_zebra_osd(); 
    753753                // copy buf[] to both display buffers 
    754                 memcpy(scr_buf, buf, screen_buffer_size); 
    755                 memcpy(scr_buf+screen_buffer_size, buf, screen_buffer_size); 
     754                memcpy(scr_buf, buf, camera_screen.buffer_size); 
     755                memcpy(scr_buf+camera_screen.buffer_size, buf, camera_screen.buffer_size); 
    756756            } 
    757757            need_restore=0; 
     
    763763        gui_osd_draw_zebra_osd(); 
    764764        // copy buf[] to both display buffers           
    765         memcpy(scr_buf, buf, screen_buffer_size); 
    766         memcpy(scr_buf+screen_buffer_size, buf, screen_buffer_size); 
     765        memcpy(scr_buf, buf, camera_screen.buffer_size); 
     766        memcpy(scr_buf+camera_screen.buffer_size, buf, camera_screen.buffer_size); 
    767767 
    768768        need_restore=1; 
  • branches/reyalp-flt/core/gui_palette.c

    r1513 r1514  
    8282    static char buf[64]; 
    8383 
    84     xl = camera_info.ts_button_border; 
    85     xr = screen_width - camera_info.ts_button_border; 
     84    xl = camera_screen.ts_button_border; 
     85    xr = camera_screen.width - camera_screen.ts_button_border; 
    8686 
    8787    if (gui_palette_redraw) 
     
    103103 
    104104        // Draw gray borders 
    105         draw_rect_thick(xl, DISP_TOP-BORDER_SIZE, xr-1, screen_height-1, COLOR_GREY, BORDER_SIZE); // outer border 
     105        draw_rect_thick(xl, DISP_TOP-BORDER_SIZE, xr-1, camera_screen.height-1, COLOR_GREY, BORDER_SIZE); // outer border 
    106106        draw_filled_rect(xl+DISP_RIGHT+1, DISP_TOP, xl+DISP_RIGHT+BORDER_SIZE, DISP_BOTTOM, MAKE_COLOR(COLOR_GREY, COLOR_GREY)); //middle 
    107107 
  • branches/reyalp-flt/core/gui_read.c

    r1513 r1514  
    4747static void gui_read_draw_batt() { 
    4848    sprintf(buffer, "Batt:%3d%%", get_batt_perc()); 
    49     draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-1-1-9, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
     49    draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-1-1-9, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
    5050} 
    5151 
     
    5858    ttm = localtime(&t); 
    5959    sprintf(buffer, "%2u:%02u", ttm->tm_hour, ttm->tm_min); 
    60     draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-1-1-9-2-5, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
     60    draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-1-1-9-2-5, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
    6161} 
    6262 
    6363//------------------------------------------------------------------- 
    6464static void gui_read_draw_scroll_indicator() { 
    65     draw_txt_char((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2, 0, (*conf_reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     65    draw_txt_char((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2, 0, (*conf_reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
    6666} 
    6767 
     
    8181    pause = 0; 
    8282    read_to_draw = 1; 
    83     x=camera_info.ts_button_border+6;  
     83    x=camera_screen.ts_button_border+6;  
    8484    y=FONT_HEIGHT; 
    85     w=screen_width-camera_info.ts_button_border*2-6-6-8; 
    86     h=screen_height-y; 
     85    w=camera_screen.width-camera_screen.ts_button_border*2-6-6-8; 
     86    h=camera_screen.height-y; 
    8787    last_time = get_tick_count(); 
    8888     
     
    9090    gui_set_mode(&GUI_MODE_READ); 
    9191 
    92     draw_filled_rect(0, 0, screen_width-1, y-1, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); 
    93     draw_filled_rect(0, y, screen_width-1, screen_height-1, MAKE_COLOR((*conf_reader_color>>8)&0xFF, (*conf_reader_color>>8)&0xFF)); 
     92    draw_filled_rect(0, 0, camera_screen.width-1, y-1, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); 
     93    draw_filled_rect(0, y, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR((*conf_reader_color>>8)&0xFF, (*conf_reader_color>>8)&0xFF)); 
    9494 
    9595    gui_read_draw_scroll_indicator(); 
     
    190190     
    191191        sprintf(buffer, "(%3d%%) %d/%d  ", (read_file_size)?(*conf_reader_pos*100/read_file_size):0, *conf_reader_pos, read_file_size); 
    192         buffer[screen_width/FONT_WIDTH]=0; 
    193         draw_txt_string((camera_info.ts_button_border/FONT_WIDTH), 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     192        buffer[camera_screen.width/FONT_WIDTH]=0; 
     193        draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH), 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
    194194 
    195195        // scrollbar 
  • branches/reyalp-flt/core/gui_reversi.c

    r1513 r1514  
    205205    uchar x, y; 
    206206 
    207     draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     207    draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    208208    for (y=0; y<8; ++y) { 
    209209        for (x=0; x<8; ++x) { 
     
    229229    InGame=0; 
    230230 
    231     field_size = (screen_height-2*FONT_HEIGHT-4)&0xFFF8; 
    232     field_x = camera_info.ts_button_border+FONT_WIDTH+8; 
    233     field_y = (screen_height-field_size)>>1; 
     231    field_size = (camera_screen.height-2*FONT_HEIGHT-4)&0xFFF8; 
     232    field_x = camera_screen.ts_button_border+FONT_WIDTH+8; 
     233    field_y = (camera_screen.height-field_size)>>1; 
    234234    cell_size = field_size >> 3; 
    235235 
     
    332332//------------------------------------------------------------------- 
    333333static void redrawstatus() { 
    334     int x=camera_info.ts_button_border+field_size+FONT_WIDTH*2+23, y = 25; 
     334    int x=camera_screen.ts_button_border+field_size+FONT_WIDTH*2+23, y = 25; 
    335335    if (InGame) {  
    336336        if (CurrPlayer==FIELD_PLAYER1) {  
     
    413413 
    414414    sprintf(buf, "Batt:%3d%%", get_batt_perc()); 
    415     draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     415    draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-9, camera_screen.height/FONT_HEIGHT-1, buf, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    416416 
    417417    Timer(); 
  • branches/reyalp-flt/core/gui_snake.c

    r1513 r1514  
    295295 
    296296static void game_over(){ 
    297     draw_filled_rect(0,0,screen_width,screen_height, COLOR_WHITE); 
     297    draw_filled_rect(0,0,camera_screen.width,camera_screen.height, COLOR_WHITE); 
    298298    sprintf(str_buf,"Points: %d",points); 
    299299    draw_string(0,0,str_buf, MAKE_COLOR(COLOR_WHITE, COLOR_BLUE)); 
     
    423423 
    424424int gui_snake_init() { 
    425     draw_filled_rect(0,0,screen_width,screen_height, COLOR_WHITE); 
     425    draw_filled_rect(0,0,camera_screen.width,camera_screen.height, COLOR_WHITE); 
    426426    snake_start(); 
    427427        gui_set_mode(&GUI_MODE_SNAKE); 
  • branches/reyalp-flt/core/gui_sokoban.c

    r1513 r1514  
    262262//------------------------------------------------------------------- 
    263263static void sokoban_draw_box(int x, int y, color cl) { 
    264     draw_filled_rect(camera_info.ts_button_border+x*cell_size, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, cl); 
    265     draw_line(camera_info.ts_button_border+x*cell_size+2, y*cell_size, camera_info.ts_button_border+x*cell_size+2, y*cell_size+cell_size-1, cl); 
    266     draw_line(camera_info.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1, cl); 
    267     draw_line(camera_info.ts_button_border+x*cell_size+2, y*cell_size+2, camera_info.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+2, cl); 
    268     draw_line(camera_info.ts_button_border+x*cell_size+2, y*cell_size+cell_size-1-2, camera_info.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1-2, cl); 
     264    draw_filled_rect(camera_screen.ts_button_border+x*cell_size, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, cl); 
     265    draw_line(camera_screen.ts_button_border+x*cell_size+2, y*cell_size, camera_screen.ts_button_border+x*cell_size+2, y*cell_size+cell_size-1, cl); 
     266    draw_line(camera_screen.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1, cl); 
     267    draw_line(camera_screen.ts_button_border+x*cell_size+2, y*cell_size+2, camera_screen.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+2, cl); 
     268    draw_line(camera_screen.ts_button_border+x*cell_size+2, y*cell_size+cell_size-1-2, camera_screen.ts_button_border+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1-2, cl); 
    269269} 
    270270 
     
    328328        *conf_sokoban_level = 0; 
    329329    } 
    330     cell_size = screen_height/FIELD_HEIGHT; 
     330    cell_size = camera_screen.height/FIELD_HEIGHT; 
    331331    sokoban_set_level(*conf_sokoban_level); 
    332332        // if the file is no longer readable, set_level will set this 
     
    386386 
    387387    if (need_redraw_all) { 
    388         draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     388        draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    389389        need_redraw_all = 0; 
    390390        need_redraw = 1; 
     
    397397                switch (field[y][x]) { 
    398398                    case MARKER_WALL: 
    399                         draw_filled_rect(camera_info.ts_button_border+x*cell_size, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(WALL_COLOR_1, WALL_COLOR_2)); 
     399                        draw_filled_rect(camera_screen.ts_button_border+x*cell_size, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(WALL_COLOR_1, WALL_COLOR_2)); 
    400400                        break; 
    401401                    case MARKER_BOX: 
     
    403403                        break; 
    404404                    case MARKER_PLACE: 
    405                         draw_filled_rect(camera_info.ts_button_border+x*cell_size, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    406                         draw_filled_rect(camera_info.ts_button_border+x*cell_size+4, y*cell_size+4, camera_info.ts_button_border+x*cell_size+cell_size-1-4, y*cell_size+cell_size-1-4, MAKE_COLOR(PLACE_COLOR_1, PLACE_COLOR_2)); 
     405                        draw_filled_rect(camera_screen.ts_button_border+x*cell_size, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     406                        draw_filled_rect(camera_screen.ts_button_border+x*cell_size+4, y*cell_size+4, camera_screen.ts_button_border+x*cell_size+cell_size-1-4, y*cell_size+cell_size-1-4, MAKE_COLOR(PLACE_COLOR_1, PLACE_COLOR_2)); 
    407407                        break; 
    408408                    case MARKER_BOX_PLACE: 
     
    411411                    case MARKER_PLAYER: 
    412412                    case MARKER_PLAYER_PLACE: 
    413                         draw_filled_rect(camera_info.ts_button_border+x*cell_size, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    414                         draw_filled_ellipse(camera_info.ts_button_border+x*cell_size+(cell_size>>1)-1, y*cell_size+(cell_size>>1)-1, (cell_size>>1)-3, (cell_size>>1)-3, MAKE_COLOR(PLAYER_COLOR_1, PLAYER_COLOR_2)); 
     413                        draw_filled_rect(camera_screen.ts_button_border+x*cell_size, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     414                        draw_filled_ellipse(camera_screen.ts_button_border+x*cell_size+(cell_size>>1)-1, y*cell_size+(cell_size>>1)-1, (cell_size>>1)-3, (cell_size>>1)-3, MAKE_COLOR(PLAYER_COLOR_1, PLAYER_COLOR_2)); 
    415415                        break; 
    416416                    case MARKER_EMPTY: 
    417417                    default: 
    418                         draw_filled_rect(camera_info.ts_button_border+x*cell_size, y*cell_size, camera_info.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     418                        draw_filled_rect(camera_screen.ts_button_border+x*cell_size, y*cell_size, camera_screen.ts_button_border+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    419419                        break; 
    420420                } 
     
    422422        } 
    423423 
    424         draw_line(camera_info.ts_button_border+cell_size*FIELD_WIDTH, 0, camera_info.ts_button_border+cell_size*FIELD_WIDTH, screen_height-1, COLOR_WHITE); 
    425         draw_line(camera_info.ts_button_border+cell_size*FIELD_WIDTH+1, 0, camera_info.ts_button_border+cell_size*FIELD_WIDTH+1, screen_height-1, COLOR_BLACK); 
     424        draw_line(camera_screen.ts_button_border+cell_size*FIELD_WIDTH, 0, camera_screen.ts_button_border+cell_size*FIELD_WIDTH, camera_screen.height-1, COLOR_WHITE); 
     425        draw_line(camera_screen.ts_button_border+cell_size*FIELD_WIDTH+1, 0, camera_screen.ts_button_border+cell_size*FIELD_WIDTH+1, camera_screen.height-1, COLOR_BLACK); 
    426426 
    427427        sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_LEVEL), *conf_sokoban_level+1); 
    428         draw_string(camera_info.ts_button_border+cell_size*FIELD_WIDTH+2, 8, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     428        draw_string(camera_screen.ts_button_border+cell_size*FIELD_WIDTH+2, 8, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    429429        sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_MOVES), moves); 
    430         draw_string(camera_info.ts_button_border+cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    431  
    432         //draw_filled_rect(cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT*2, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     430        draw_string(camera_screen.ts_button_border+cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     431 
     432        //draw_filled_rect(cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT*2, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    433433 
    434434        if (sokoban_finished()) { 
     
    439439 
    440440    sprintf(str, "Batt:%3d%%", get_batt_perc()); 
    441     draw_txt_string((screen_width-camera_info.ts_button_border)/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     441    draw_txt_string((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2-9, camera_screen.height/FONT_HEIGHT-1, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    442442} 
    443443 
  • branches/reyalp-flt/core/gui_space.c

    r1355 r1514  
    5050 
    5151    // Clamp co-ordinates to keep bar on screen 
    52     if (xx > (screen_width-width-4)) { 
    53         xx = screen_width-width-4; 
    54     } 
    55     if (yy > (screen_height-height-4)) { 
    56         yy = screen_height-height-4; 
     52    if (xx > (camera_screen.width-width-4)) { 
     53        xx = camera_screen.width-width-4; 
     54    } 
     55    if (yy > (camera_screen.height-height-4)) { 
     56        yy = camera_screen.height-height-4; 
    5757    } 
    5858 
     
    6565 
    6666    // Setup and draw outer shape 
    67     spacebar_outer(conf.space_hor_pos, (screen_width / (4 >> conf.space_bar_size)) - 4, conf.space_bar_width); 
     67    spacebar_outer(conf.space_hor_pos, (camera_screen.width / (4 >> conf.space_bar_size)) - 4, conf.space_bar_width); 
    6868 
    6969    // space bar fill 
     
    7979 
    8080    // Setup and draw outer shape 
    81     spacebar_outer(conf.space_ver_pos, conf.space_bar_width, (screen_height / (4 >> conf.space_bar_size)) - 4); 
     81    spacebar_outer(conf.space_ver_pos, conf.space_bar_width, (camera_screen.height / (4 >> conf.space_bar_size)) - 4); 
    8282 
    8383    // space bar fill 
  • branches/reyalp-flt/core/gui_tetris.c

    r1513 r1514  
    158158            for (j = 0; j < 4; ++j) { 
    159159                if (game->nextBlock.cells[i][j] != EMPTY_CELL) { 
    160                     draw_filled_rect(camera_info.ts_button_border+PREVIEW_X + (TILE_SIZE * i), 
     160                    draw_filled_rect(camera_screen.ts_button_border+PREVIEW_X + (TILE_SIZE * i), 
    161161                            PREVIEW_Y + (TILE_SIZE * j), 
    162                             camera_info.ts_button_border+PREVIEW_X + (TILE_SIZE * i)+TILE_SIZE-1, 
     162                            camera_screen.ts_button_border+PREVIEW_X + (TILE_SIZE * i)+TILE_SIZE-1, 
    163163                            PREVIEW_Y + (TILE_SIZE * j)+TILE_SIZE-1, 
    164164                             MAKE_COLOR(game->nextBlock.cells[i][j], game->nextBlock.cells[i][j])); 
    165165                }else{ 
    166                     draw_filled_rect(camera_info.ts_button_border+PREVIEW_X + (TILE_SIZE * i), 
     166                    draw_filled_rect(camera_screen.ts_button_border+PREVIEW_X + (TILE_SIZE * i), 
    167167                            PREVIEW_Y + (TILE_SIZE * j), 
    168                             camera_info.ts_button_border+PREVIEW_X + (TILE_SIZE * i)+TILE_SIZE-1, 
     168                            camera_screen.ts_button_border+PREVIEW_X + (TILE_SIZE * i)+TILE_SIZE-1, 
    169169                            PREVIEW_Y + (TILE_SIZE * j)+TILE_SIZE-1, 
    170170                            TETRIS_COLOR_BG); 
     
    194194        for (j = 0; j < BOARD_HEIGHT; ++j){ 
    195195                    if(tmp[i][j] != EMPTY_CELL){ 
    196                     draw_filled_rect(camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i), 
     196                    draw_filled_rect(camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i), 
    197197                            BOARD_Y + (TILE_SIZE * j), 
    198                             camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
     198                            camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
    199199                            BOARD_Y + (TILE_SIZE * j)+TILE_SIZE-1, 
    200200                             MAKE_COLOR(tmp[i][j], tmp[i][j])); 
    201201                    }else if(tmp2[i][j] != EMPTY_CELL){ 
    202                     draw_filled_rect(camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i), 
     202                    draw_filled_rect(camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i), 
    203203                            BOARD_Y + (TILE_SIZE * j), 
    204                             camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
     204                            camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
    205205                            BOARD_Y + (TILE_SIZE * j)+TILE_SIZE-1, 
    206206                             MAKE_COLOR(tmp2[i][j], tmp2[i][j])); 
    207207                    }else{ 
    208                     draw_filled_rect(camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i), 
     208                    draw_filled_rect(camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i), 
    209209                            BOARD_Y + (TILE_SIZE * j), 
    210                             camera_info.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
     210                            camera_screen.ts_button_border+BOARD_X + (TILE_SIZE * i)+TILE_SIZE-1, 
    211211                            BOARD_Y + (TILE_SIZE * j)+TILE_SIZE-1, 
    212212                             TETRIS_COLOR_BOARD); 
     
    219219    static struct tm *ttm; 
    220220      sprintf(str_buf,"High:    %5d",game->stats.high); 
    221       draw_string(camera_info.ts_button_border+150,35,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     221      draw_string(camera_screen.ts_button_border+150,35,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    222222      sprintf(str_buf,"Points:  %5d",game->stats.score); 
    223       draw_string(camera_info.ts_button_border+150,55,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     223      draw_string(camera_screen.ts_button_border+150,55,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    224224      sprintf(str_buf,"Lines:   %5d",game->stats.lines); 
    225       draw_string(camera_info.ts_button_border+150,75,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     225      draw_string(camera_screen.ts_button_border+150,75,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    226226      sprintf(str_buf,"Level:   %5d",game->stats.level); 
    227       draw_string(camera_info.ts_button_border+150,95,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     227      draw_string(camera_screen.ts_button_border+150,95,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    228228     sprintf(str_buf,"UP  -> Pause"); 
    229      draw_string(camera_info.ts_button_border+150,135,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     229     draw_string(camera_screen.ts_button_border+150,135,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    230230     sprintf(str_buf,"SET -> Rotate"); 
    231      draw_string(camera_info.ts_button_border+150,155,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     231     draw_string(camera_screen.ts_button_border+150,155,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    232232     t = time(NULL); 
    233233      ttm = localtime(&t); 
    234234      sprintf(str_buf,"Time:    %2u:%02u", ttm->tm_hour, ttm->tm_min); 
    235      draw_string(camera_info.ts_button_border+150,195,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     235     draw_string(camera_screen.ts_button_border+150,195,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    236236     sprintf(str_buf,"Batt:     %3d%%", get_batt_perc()); 
    237      draw_string(camera_info.ts_button_border+150,215,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
     237     draw_string(camera_screen.ts_button_border+150,215,str_buf, MAKE_COLOR(TETRIS_COLOR_BG, COLOR_BLACK)); 
    238238} 
    239239 
     
    665665 
    666666void gui_tetris_init(){ 
    667     draw_filled_rect(camera_info.ts_button_border+0,0,screen_width-camera_info.ts_button_border,screen_height, TETRIS_COLOR_BG); 
    668     draw_rect(camera_info.ts_button_border+BOARD_X-1,BOARD_Y-1,camera_info.ts_button_border+BOARD_WIDTH*TILE_SIZE+10,BOARD_HEIGHT*TILE_SIZE+10, COLOR_BLACK); 
     667    draw_filled_rect(camera_screen.ts_button_border+0,0,camera_screen.width-camera_screen.ts_button_border,camera_screen.height, TETRIS_COLOR_BG); 
     668    draw_rect(camera_screen.ts_button_border+BOARD_X-1,BOARD_Y-1,camera_screen.ts_button_border+BOARD_WIDTH*TILE_SIZE+10,BOARD_HEIGHT*TILE_SIZE+10, COLOR_BLACK); 
    669669    game = createGame(); 
    670670    gameInit(game); 
  • branches/reyalp-flt/core/gui_usb.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/gui_usb.h

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/luascript.c

    r1513 r1514  
    17171717    { 
    17181718        vid_info.bm_buffer_start = total_size; 
    1719         vid_info.bm_buffer_size = vid_get_bitmap_buffer_width()*vid_get_bitmap_screen_height(); 
     1719        vid_info.bm_buffer_size = camera_screen.buffer_width*camera_screen.height; 
    17201720        total_size += vid_info.bm_buffer_size; 
    17211721    } 
     
    17751775    details.vp_buffer_width = vid_get_viewport_buffer_width_proper(); 
    17761776#if CAM_USES_ASPECT_CORRECTION 
    1777     details.bm_max_width = ASPECT_XCORRECTION(vid_get_bitmap_screen_width()); 
     1777    details.bm_max_width = ASPECT_XCORRECTION(camera_screen.width); 
    17781778#else 
    1779     details.bm_max_width = vid_get_bitmap_screen_width(); 
     1779    details.bm_max_width = camera_screen.width; 
    17801780#endif 
    1781     details.bm_max_height = vid_get_bitmap_screen_height(); 
    1782     details.bm_buffer_width = vid_get_bitmap_buffer_width(); 
     1781    details.bm_max_height = camera_screen.height; 
     1782    details.bm_buffer_width = camera_screen.buffer_width; 
    17831783    details.lcd_aspect_ratio = vid_get_aspect_ratio(); 
    17841784 
  • branches/reyalp-flt/core/main.c

    r1512 r1514  
    1818// Used by modules to ensure module code is platform independent 
    1919 
    20 _cam_info camera_info = {  
     20_cam_sensor camera_sensor = {  
    2121    CAM_SENSOR_BITS_PER_PIXEL,  
    2222    CAM_BLACK_LEVEL, CAM_WHITE_LEVEL, 
     
    4040    cam_CFAPattern, cam_CalibrationIlluminant1, 
    4141#if defined(OPT_GPS) 
    42     1, 
     42    PROPCASE_GPS, 
    4343#else 
    4444    0, 
    4545#endif 
     46}; 
     47 
     48_cam_screen camera_screen = 
     49{ 
     50    CAM_SCREEN_WIDTH, CAM_SCREEN_HEIGHT, CAM_SCREEN_WIDTH * CAM_SCREEN_HEIGHT, 
     51    CAM_BITMAP_WIDTH, CAM_BITMAP_HEIGHT, CAM_BITMAP_WIDTH * CAM_BITMAP_HEIGHT, 
    4652    EDGE_HMARGIN, CAM_TS_BUTTON_BORDER, 
    4753}; 
  • branches/reyalp-flt/core/module_exportlist.c

    r1513 r1514  
    149149                        gui_default_kbd_process_menu_btn, 
    150150 
    151             &screen_width, 
    152             &screen_height, 
    153             &screen_buffer_size, 
    154151            vid_get_viewport_fb, 
    155152            vid_get_viewport_height, 
     
    300297                        pow_calc_2, 
    301298 
    302             &camera_info, 
     299            &camera_screen, 
     300            &camera_sensor, 
    303301            &altGuiHandler, 
    304302                        0 
  • branches/reyalp-flt/core/module_wrappers.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/modules/module_inspector.c

    r1513 r1514  
    142142    if (modinspect_redraw) { 
    143143 
    144         draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     144        draw_filled_rect(0, 0, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    145145        draw_txt_string(5, 0,  "*** Module Inspector ***", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    146146        draw_txt_string(0, 2,  "Idx Name         Addr       Size", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
  • branches/reyalp-flt/core/modules/module_menu.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/modules/simple_game.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/motion_detector.c

    r1511 r1514  
    333333                fd = open(fn, O_WRONLY|O_CREAT, 0777); 
    334334                if (fd) { 
    335             write(fd, img, screen_width*vid_get_viewport_height()*3); 
     335            write(fd, img, camera_screen.width*vid_get_viewport_height()*3); 
    336336            close(fd); 
    337337                } 
     
    562562        yoffset = vid_get_viewport_yoffset();   // used when image size != viewport size 
    563563 
    564         x_step=(screen_width-xoffset*2)/motion_detector->columns; 
    565         y_step=(screen_height-yoffset*2)/motion_detector->rows; 
     564        x_step=(camera_screen.width-xoffset*2)/motion_detector->columns; 
     565        y_step=(camera_screen.height-yoffset*2)/motion_detector->rows; 
    566566#if 0 
    567567        row_start=1; 
     
    575575        if(motion_detector->clipping_region_mode==0 || motion_detector->clipping_region_mode==2){ 
    576576                for(col=col_start;col<col_stop;col++){ 
    577                         draw_line(col*x_step,0,col*x_step,screen_height, COLOR_GREEN); 
     577                        draw_line(col*x_step,0,col*x_step,camera_screen.height, COLOR_GREEN); 
    578578                } 
    579579                for(row=row_start;row<row_stop;row++){ 
    580                         draw_line(0,row*y_step,screen_width,row*y_step, COLOR_GREEN); 
     580                        draw_line(0,row*y_step,camera_screen.width,row*y_step, COLOR_GREEN); 
    581581                } 
    582582        } else if(motion_detector->clipping_region_mode==1){ 
    583583                for(col=1;col<motion_detector->columns;col++){ 
    584584                        if(col<){ 
    585                                 draw_line(col*x_step,0,col*x_step,screen_height, COLOR_GREEN); 
     585                                draw_line(col*x_step,0,col*x_step,camera_screen.height, COLOR_GREEN); 
    586586                        } 
    587587                } 
  • branches/reyalp-flt/core/ptp.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/ptp.h

    • Property svn:eol-style set to native
  • branches/reyalp-flt/core/raw.c

    r1512 r1514  
    192192 
    193193void set_raw_pixel(unsigned int x, unsigned int y, unsigned short value) { 
    194     unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*camera_info.raw_rowlen+(x/8)*camera_info.bits_per_pixel; 
     194    unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*camera_sensor.raw_rowlen+(x/8)*camera_sensor.bits_per_pixel; 
    195195#if CAM_SENSOR_BITS_PER_PIXEL==10 
    196196    switch (x%8) { 
     
    218218//------------------------------------------------------------------- 
    219219unsigned short get_raw_pixel(unsigned int x,unsigned  int y) { 
    220     unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*camera_info.raw_rowlen+(x/8)*camera_info.bits_per_pixel; 
     220    unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*camera_sensor.raw_rowlen+(x/8)*camera_sensor.bits_per_pixel; 
    221221#if CAM_SENSOR_BITS_PER_PIXEL==10 
    222222    switch (x%8) { 
     
    249249    int i,j; 
    250250    int val; 
    251     if ((x>=2) && (x<camera_info.raw_rowpix-2) && (y>=2) && (y<camera_info.raw_rows-2)) { 
     251    if ((x>=2) && (x<camera_sensor.raw_rowpix-2) && (y>=2) && (y<camera_sensor.raw_rows-2)) { 
    252252        if ((conf.bad_pixel_removal==1) || (conf.save_raw && conf.dng_raw)) {  // interpolation or DNG saving 
    253253            for (i=-2; i<=2; i+=2) 
  • branches/reyalp-flt/core/raw_merge.c

    r1512 r1514  
    3737 int result; 
    3838 if ((from==0) || (sub==0)) return 0; // bad pixel 
    39  result = from - sub + camera_info.black_level; 
    40  if (result<camera_info.black_level) result=camera_info.black_level; 
    41  if (result>camera_info.white_level) result=camera_info.white_level; 
     39 result = from - sub + camera_sensor.black_level; 
     40 if (result<camera_sensor.black_level) result=camera_sensor.black_level; 
     41 if (result>camera_sensor.white_level) result=camera_sensor.white_level; 
    4242 return result; 
    4343 
     
    6464        return 0; 
    6565 
    66      if( (baccum=malloc(camera_info.raw_rowlen)) && 
    67         (bsub=malloc(camera_info.raw_rowlen)) && 
     66     if( (baccum=malloc(camera_sensor.raw_rowlen)) && 
     67        (bsub=malloc(camera_sensor.raw_rowlen)) && 
    6868        (ffrom=fopen(from, "rb")) && 
    6969        (fsub=fopen(sub, "rb")) && 
     
    7272    { 
    7373        started(); 
    74         for (j = 0; j < camera_info.raw_rows; j++) { 
    75             fread(baccum,1, camera_info.raw_rowlen,ffrom); 
    76             fread(bsub,1, camera_info.raw_rowlen,fsub); 
     74        for (j = 0; j < camera_sensor.raw_rows; j++) { 
     75            fread(baccum,1, camera_sensor.raw_rowlen,ffrom); 
     76            fread(bsub,1, camera_sensor.raw_rowlen,fsub); 
    7777 
    7878#if CAM_MODULE_SENSOR_BITS_PER_PIXEL==10 
    7979 
    80             for(i = 0;i<camera_info.raw_rowlen; i+=10) { 
     80            for(i = 0;i<camera_sensor.raw_rowlen; i+=10) { 
    8181                s =((0x3fc&(((unsigned short)bsub[i+1])<<2)) | (bsub[i+0] >> 6)); 
    8282                d =((0x3fc&(((unsigned short)baccum[i+1])<<2)) | (baccum[i+0] >> 6)); 
     
    133133#elif CAM_MODULE_SENSOR_BITS_PER_PIXEL==12 
    134134 
    135             for(i = 0;i<camera_info.raw_rowlen; i+=6) { 
     135            for(i = 0;i<camera_sensor.raw_rowlen; i+=6) { 
    136136 
    137137                s=((0xFF0&(((unsigned short)bsub[i+1])<<4))   | (bsub[i+0] >> 4)); 
     
    164164#endif 
    165165 
    166             fwrite(baccum,1,camera_info.raw_rowlen,fdest); 
     166            fwrite(baccum,1,camera_sensor.raw_rowlen,fdest); 
    167167            if ( (j & 0x1F) == 0 ) { 
    168                 gui_browser_progress_show((char *)dest, j*100/camera_info.raw_rows); 
     168                gui_browser_progress_show((char *)dest, j*100/camera_sensor.raw_rows); 
    169169            } 
    170170        } 
     
    189189int raw_merge_start(int action){ 
    190190  unsigned int req, avail; 
    191   req=((camera_info.raw_rows*camera_info.raw_rows)>>18)+1; 
     191  req=((camera_sensor.raw_rows*camera_sensor.raw_rows)>>18)+1; 
    192192  avail=GetFreeCardSpaceKb()>>10; 
    193193  if (avail<req) { 
     
    198198  raw_action=action; 
    199199  raw_count=0; 
    200   row=malloc(camera_info.raw_rows*sizeof(unsigned short)); 
     200  row=malloc(camera_sensor.raw_rows*sizeof(unsigned short)); 
    201201  if (!row) 
    202202    return 0; 
    203   rawrow=malloc(camera_info.raw_rowlen); 
     203  rawrow=malloc(camera_sensor.raw_rowlen); 
    204204  if (!rawrow) { 
    205205    free(row); 
     
    230230      fbrawout=fopen(TEMP_FILE_NAME_1,"w+b"); 
    231231      if (fbrawout){ 
    232         fread(rawrow, 1, camera_info.raw_rowlen, fcraw); 
     232        fread(rawrow, 1, camera_sensor.raw_rowlen, fcraw); 
    233233        if (raw_count)  
    234           fread(row, 1, camera_info.raw_rows*sizeof(unsigned short), fbrawin);  
     234          fread(row, 1, camera_sensor.raw_rows*sizeof(unsigned short), fbrawin);  
    235235        else 
    236           for (i=0;i<camera_info.raw_rows;i++) 
     236          for (i=0;i<camera_sensor.raw_rows;i++) 
    237237            row[i]=0; 
    238238 
    239         for (nrow=0,j=0;nrow<camera_info.raw_rows;nrow++,j++){ 
     239        for (nrow=0,j=0;nrow<camera_sensor.raw_rows;nrow++,j++){ 
    240240 
    241241#if CAM_MODULE_SENSOR_BITS_PER_PIXEL==10 
    242242 
    243           for (i=0,src=0; i<camera_info.raw_rows; i+=8, src+=10){ 
     243          for (i=0,src=0; i<camera_sensor.raw_rows; i+=8, src+=10){ 
    244244            row[i+0]+=((0x3fc&(((unsigned short)rawrow[src+1])<<2)) | (rawrow[src+0] >> 6)); 
    245245            row[i+1]+=((0x3f0&(((unsigned short)rawrow[src+0])<<4)) | (rawrow[src+3] >> 4)); 
     
    254254#elif CAM_MODULE_SENSOR_BITS_PER_PIXEL==12 
    255255 
    256           for (i=0,src=0; i<camera_info.raw_rows; i+=4, src+=6){ 
     256          for (i=0,src=0; i<camera_sensor.raw_rows; i+=4, src+=6){ 
    257257            row[i+0]+=((0xFF0&(((unsigned short)rawrow[src+1])<<4)) | (rawrow[src+0] >> 4)); 
    258258            row[i+1]+=((0xF00&(((unsigned short)rawrow[src+0])<<8)) | (rawrow[src+3]     )); 
     
    265265#endif 
    266266 
    267           fwrite(row, 1, camera_info.raw_rows*sizeof(unsigned short), fbrawout); 
     267          fwrite(row, 1, camera_sensor.raw_rows*sizeof(unsigned short), fbrawout); 
    268268          if (raw_count) 
    269             fread(row, 1, camera_info.raw_rows*sizeof(unsigned short), fbrawin); 
     269            fread(row, 1, camera_sensor.raw_rows*sizeof(unsigned short), fbrawin); 
    270270          else 
    271             for (i=0;i<camera_info.raw_rows;i++) 
     271            for (i=0;i<camera_sensor.raw_rows;i++) 
    272272              row[i]=0; 
    273           fread(rawrow, 1, camera_info.raw_rowlen, fcraw); 
    274           if (j>=camera_info.raw_rows/10) { 
    275             j-=camera_info.raw_rows/10; 
    276             gui_browser_progress_show(filename, nrow*100/camera_info.raw_rows); 
     273          fread(rawrow, 1, camera_sensor.raw_rowlen, fcraw); 
     274          if (j>=camera_sensor.raw_rows/10) { 
     275            j-=camera_sensor.raw_rows/10; 
     276            gui_browser_progress_show(filename, nrow*100/camera_sensor.raw_rows); 
    277277          } 
    278278        } 
     
    309309    fcraw=fopen(namebuf,"w+b"); 
    310310    if (fcraw) { 
    311       fread(row, 1, camera_info.raw_rows*sizeof(unsigned short), fbraw); 
    312       for (nrow=0,j=0;nrow<camera_info.raw_rows;nrow++,j++) { 
    313         for (i=0;i<camera_info.raw_rows;i++) { 
     311      fread(row, 1, camera_sensor.raw_rows*sizeof(unsigned short), fbraw); 
     312      for (nrow=0,j=0;nrow<camera_sensor.raw_rows;nrow++,j++) { 
     313        for (i=0;i<camera_sensor.raw_rows;i++) { 
    314314          if (raw_action==RAW_OPERATION_AVERAGE) 
    315315            row[i]/=raw_count; 
    316316          else { 
    317             if (row[i]>camera_info.black_level*(raw_count-1)) 
    318               row[i]-=camera_info.black_level*(raw_count-1); 
     317            if (row[i]>camera_sensor.black_level*(raw_count-1)) 
     318              row[i]-=camera_sensor.black_level*(raw_count-1); 
    319319            else 
    320320              row[i]=0; 
    321             if (row[i]>camera_info.white_level) 
    322               row[i]=camera_info.white_level; 
     321            if (row[i]>camera_sensor.white_level) 
     322              row[i]=camera_sensor.white_level; 
    323323          } 
    324324        } 
    325325#if CAM_MODULE_SENSOR_BITS_PER_PIXEL==10 
    326         for (i=0,src=0;i<camera_info.raw_rows;i+=8,src+=10) { 
     326        for (i=0,src=0;i<camera_sensor.raw_rows;i+=8,src+=10) { 
    327327          rawrow[src+0]=(row[i+0]<<6)|(row[i+1]>>4); 
    328328          rawrow[src+1]=(row[i+0]>>2); 
     
    337337        } 
    338338#elif CAM_MODULE_SENSOR_BITS_PER_PIXEL==12 
    339         for (i=0,src=0; i<camera_info.raw_rows; i+=4, src+=6){ 
     339        for (i=0,src=0; i<camera_sensor.raw_rows; i+=4, src+=6){ 
    340340          rawrow[src+0]=(row[i+0]<<4)|(row[i+1]>>8); 
    341341          rawrow[src+1]=(row[i+0]>>4); 
     
    349349#endif 
    350350 
    351         fwrite(rawrow, 1, camera_info.raw_rowlen, fcraw); 
    352         fread(row, 1, camera_info.raw_rows*sizeof(unsigned short), fbraw); 
    353         if (j>=camera_info.raw_rows/5) { 
    354           j-=camera_info.raw_rows/5; 
    355           gui_browser_progress_show(namebuf, nrow*100/camera_info.raw_rows); 
     351        fwrite(rawrow, 1, camera_sensor.raw_rowlen, fcraw); 
     352        fread(row, 1, camera_sensor.raw_rows*sizeof(unsigned short), fbraw); 
     353        if (j>=camera_sensor.raw_rows/5) { 
     354          j-=camera_sensor.raw_rows/5; 
     355          gui_browser_progress_show(namebuf, nrow*100/camera_sensor.raw_rows); 
    356356        } 
    357357      } 
  • branches/reyalp-flt/core/shot_histogram.c

    r1512 r1514  
    5555 memset(shot_histogram,0,SHOT_HISTOGRAM_SIZE); 
    5656  
    57  marginstep= (camera_info.raw_rowpix - 2 * SHOT_HISTOGRAM_MARGIN)/10; 
     57 marginstep= (camera_sensor.raw_rowpix - 2 * SHOT_HISTOGRAM_MARGIN)/10; 
    5858 
    5959 // In future, support definition of a sort of "spot metering"  
    6060 x0 = SHOT_HISTOGRAM_MARGIN + shot_margin_left * marginstep; 
    61  x1 = camera_info.raw_rowpix - SHOT_HISTOGRAM_MARGIN - shot_margin_right * marginstep; 
     61 x1 = camera_sensor.raw_rowpix - SHOT_HISTOGRAM_MARGIN - shot_margin_right * marginstep; 
    6262 y0 = SHOT_HISTOGRAM_MARGIN + shot_margin_top * marginstep; 
    63  y1 = camera_info.raw_rows - SHOT_HISTOGRAM_MARGIN - shot_margin_bottom * marginstep; 
     63 y1 = camera_sensor.raw_rows - SHOT_HISTOGRAM_MARGIN - shot_margin_bottom * marginstep; 
    6464 
    6565 //x0 = SHOT_HISTOGRAM_MARGIN ; 
    66  //x1 = camera_info.raw_rowpix - SHOT_HISTOGRAM_MARGIN ; 
     66 //x1 = camera_sensor.raw_rowpix - SHOT_HISTOGRAM_MARGIN ; 
    6767 //y0 = SHOT_HISTOGRAM_MARGIN; 
    68  //y1 = camera_info.raw_rows - SHOT_HISTOGRAM_MARGIN; 
     68 //y1 = camera_sensor.raw_rows - SHOT_HISTOGRAM_MARGIN; 
    6969 
    7070  
  • branches/reyalp-flt/include/camera.h

    r1512 r1514  
    104104// Define CAM_USES_ASPECT_CORRECTION with a value of 1 to enable this scaled display 
    105105#define CAM_USES_ASPECT_CORRECTION  0 
     106#define CAM_SCREEN_WIDTH            360         // Width of bitmap screen in CHDK co-ordinates (360 or 480) 
     107#define CAM_SCREEN_HEIGHT           240         // Height of bitmap screen in CHDK co-ordinates (always 240 on all cameras so far) 
     108#define CAM_BITMAP_WIDTH            360         // Actual width of bitmap screen in bytes (may be larger than displayed area) 
     109#define CAM_BITMAP_HEIGHT           240         // Actual height of bitmap screen in rows (240 or 270) 
    106110 
    107111#define EDGE_HMARGIN                0           // define sup and inf screen margins on edge overlay without overlay.  Necessary to save memory buffer space. sx200is needs values other than 0 
     
    248252    int color_matrix1[18];      // DNG Color Matrix 
    249253    int cfa_pattern, calibration_illuminant1; 
    250     int has_gps; 
    251     int edge_hmargin, ts_button_border; 
    252 } _cam_info; 
    253  
    254 extern _cam_info camera_info; 
     254    int gps_propcase; 
     255} _cam_sensor; 
     256 
     257extern _cam_sensor camera_sensor; 
     258 
     259typedef struct  
     260{ 
     261    unsigned int    width, height, size;                        // Size of bitmap screen in CHDK co-ordinates 
     262    unsigned int    buffer_width, buffer_height, buffer_size;   // Physical size of bitmap screen 
     263    int             edge_hmargin, ts_button_border;             // margin and touch-screen adjustment values 
     264} _cam_screen; 
     265 
     266extern _cam_screen camera_screen; 
    255267 
    256268//========================================================== 
  • branches/reyalp-flt/include/platform.h

    r1511 r1514  
    211211long vid_is_bitmap_shown(); 
    212212void *vid_get_bitmap_fb(); 
    213 long vid_get_bitmap_screen_width(); 
    214 long vid_get_bitmap_screen_height(); 
    215 long vid_get_bitmap_buffer_width(); 
    216 long vid_get_bitmap_buffer_height(); 
    217213 
    218214void *vid_get_viewport_fb(); 
  • branches/reyalp-flt/loader/sx120is

    • Property svn:ignore set to
      .dep
      *.a
      *.o
      main.bin
      *.elf
      *.elf.syms
      *.dump
  • branches/reyalp-flt/loader/sx120is/Makefile

    • Property svn:eol-style set to LF
  • branches/reyalp-flt/loader/sx120is/blobs.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/loader/sx120is/entry.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/loader/sx120is/main.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/loader/sx120is/resetcode

    • Property svn:ignore set to
      .dep
      *.a
      *.o
      main.bin
      *.elf
      *.elf.syms
      *.dump
  • branches/reyalp-flt/loader/sx120is/resetcode/Makefile

    • Property svn:eol-style set to LF
  • branches/reyalp-flt/loader/sx120is/resetcode/entry.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/loader/sx120is/resetcode/main.c

    • Property svn:eol-style set to native
  • branches/reyalp-flt/platform/a1100/platform_camera.h

    r1418 r1514  
    7878    #undef  CAM_USES_ASPECT_CORRECTION    
    7979    #define CAM_USES_ASPECT_CORRECTION      1   //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     80    #undef CAM_BITMAP_WIDTH 
     81    #define CAM_BITMAP_WIDTH                720 // Actual width of bitmap screen in bytes 
    8082 
    8183    #undef CAM_MENU_BORDERWIDTH 
  • branches/reyalp-flt/platform/a1100/sub/100c/lib.c

    r1233 r1514  
    3535} 
    3636 
    37  
    38 long vid_get_bitmap_screen_width() 
    39 { 
    40         return 360; 
    41 } 
    42  
    43 long vid_get_bitmap_screen_height() 
    44 { 
    45         return 240; 
    46 } 
    47  
    4837long vid_get_viewport_height() 
    4938{ 
     
    5544        return (char*)0x2F4A8;  // "9999"-----fixed 
    5645} 
    57  
    58 long vid_get_bitmap_buffer_width() { return 720; } 
    59  
    60 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/a2000/sub/100c/lib.c

    r831 r1514  
    4444} 
    4545 
    46  
    47 long vid_get_bitmap_screen_width() 
    48 { 
    49         return 360; 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54         return 240; 
    55 } 
    56  
    5746long vid_get_viewport_height() 
    5847{ 
     
    6453        return (char*)0x45100; 
    6554} 
    66  
    67  
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
    71  
    72 //int zoom_status = 0; 
  • branches/reyalp-flt/platform/a3000/sub/100b/lib.c

    r1372 r1514  
    5151} 
    5252 
    53  
    54 long vid_get_bitmap_screen_width() 
    55 { 
    56         return 360; 
    57 } 
    58  
    59 long vid_get_bitmap_screen_height() 
    60 { 
    61         return 240; 
    62 } 
    63  
    64  
    6553int vid_get_viewport_width() 
    6654{ 
     
    7765 return (void*)0x75120;    // found at FFD7BD90 search string: a9999 
    7866} 
    79  
    80 long vid_get_bitmap_buffer_width() { return 360; } 
    81 long vid_get_bitmap_buffer_height() { return 240; } 
    82  
  • branches/reyalp-flt/platform/a3000/sub/100c/lib.c

    r1372 r1514  
    3535} 
    3636 
    37  
    38 long vid_get_bitmap_screen_width() 
    39 { 
    40         return 360; 
    41 } 
    42  
    43 long vid_get_bitmap_screen_height() 
    44 { 
    45         return 240; 
    46 } 
    47  
    48  
    4937int vid_get_viewport_width() 
    5038{ 
     
    6149 return (void*)0x75120; 
    6250} 
    63  
    64 long vid_get_bitmap_buffer_width() { return 360; } 
    65 long vid_get_bitmap_buffer_height() { return 240; } 
    66  
  • branches/reyalp-flt/platform/a3000/sub/100d/lib.c

    r1372 r1514  
    5252} 
    5353 
    54 // found at FFCD5A04                 height 240 
    55 // found at FFCD5A00                     width 720 
    56  
    57 long vid_get_bitmap_screen_width() 
    58 { 
    59         return 360; 
    60 } 
    61  
    62 long vid_get_bitmap_screen_height() 
    63 { 
    64         return 240; 
    65 } 
    66  
    67  
    6854int vid_get_viewport_width() 
    6955{ 
     
    8066 return (void*)0x75120;    // found at FFD7BD90 search string: a9999 
    8167} 
    82  
    83 long vid_get_bitmap_buffer_width() { return 360; } 
    84 long vid_get_bitmap_buffer_height() { return 240; } 
    85  
  • branches/reyalp-flt/platform/a410/sub/100f/lib.c

    r1226 r1514  
    5757} 
    5858 
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     return 360; 
    62 } 
    63  
    64 long vid_get_bitmap_screen_height() 
    65 { 
    66     return 240; 
    67 } 
    68  
    6959long vid_get_viewport_height() 
    7060{ 
     
    7767    return (char*)0x7F9F0; // @ffdd479c 
    7868}  
    79  
    80 long vid_get_bitmap_buffer_width() { return 360; } 
    81  
    82 long vid_get_bitmap_buffer_height() { return 240; } 
    83  
  • branches/reyalp-flt/platform/a430/sub/100b/lib.c

    r1376 r1514  
    5757} 
    5858 
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     return 360; 
    62 } 
    63  
    64 long vid_get_bitmap_screen_height() 
    65 { 
    66     return 240; 
    67 } 
    68  
    6959long vid_get_viewport_height() 
    7060{ 
     
    7767    return (char*)0x7C588; 
    7868}  
    79  
    80 long vid_get_bitmap_buffer_width() { return 360; } 
    81  
    82 long vid_get_bitmap_buffer_height() { return 240; } 
    83  
  • branches/reyalp-flt/platform/a450/sub/100d/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    6151    return (char*)0x10F70; 
    6252}  
    63  
    64 long vid_get_bitmap_buffer_width() { return 360; } 
    65  
    66 long vid_get_bitmap_buffer_height() { return 240; } 
    67  
  • branches/reyalp-flt/platform/a460/sub/100d/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    6151    return (char*)0x10F70; 
    6252}  
    63  
    64 long vid_get_bitmap_buffer_width() { return 360; } 
    65  
    66 long vid_get_bitmap_buffer_height() { return 240; } 
    67  
  • branches/reyalp-flt/platform/a470/sub/100e/lib.c

    r785 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6252    return (char*)0x49A00; // found above a9999 
    6353} 
    64  
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
  • branches/reyalp-flt/platform/a470/sub/101b/lib.c

    r739 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6252    return (char*)0x49A00; // found above a9999 
    6353} 
    64  
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
  • branches/reyalp-flt/platform/a470/sub/102c/lib.c

    r739 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6252    return (char*)0x49A80; // found above a9999 
    6353} 
    64  
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
  • branches/reyalp-flt/platform/a480/sub/100b/lib.c

    r884 r1514  
    3434} 
    3535 
    36  
    37 long vid_get_bitmap_screen_width() 
    38 { 
    39         return 360; 
    40 } 
    41  
    42 long vid_get_bitmap_screen_height() 
    43 { 
    44         return 240; 
    45 } 
    46  
    4736long vid_get_viewport_height() 
    4837{ 
     
    5443        return (char*)0x2CFF8;  // "9999" 
    5544} 
    56  
    57  
    58 long vid_get_bitmap_buffer_width() { return 360; } 
    59  
    60 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/a490/sub/100d/lib.c

    r1353 r1514  
    3939} 
    4040 
    41 long vid_get_bitmap_screen_width() { return 360; } 
    42 long vid_get_bitmap_screen_height() { return 240; } 
    43  
    4441long vid_get_viewport_height() { return 240; } 
    45  
    46 long vid_get_bitmap_buffer_width() { return 360; } 
    47 long vid_get_bitmap_buffer_height() { return 240; } 
    4842 
    4943char *camera_jpeg_count_str() 
  • branches/reyalp-flt/platform/a490/sub/100f/lib.c

    r1205 r1514  
    3939} 
    4040 
    41 long vid_get_bitmap_screen_width() { return 360; } 
    42 long vid_get_bitmap_screen_height() { return 240; } 
    43  
    4441long vid_get_viewport_height() { return 240; } 
    45  
    46 long vid_get_bitmap_buffer_width() { return 360; } 
    47 long vid_get_bitmap_buffer_height() { return 240; } 
    4842 
    4943char *camera_jpeg_count_str() 
  • branches/reyalp-flt/platform/a495/sub/100d/lib.c

    r1376 r1514  
    3939} 
    4040 
    41 long vid_get_bitmap_screen_width() { return 360; } 
    42 long vid_get_bitmap_screen_height() { return 240; } 
    43  
    4441long vid_get_viewport_height() { return 240; } 
    45  
    46 long vid_get_bitmap_buffer_width() { return 360; } 
    47 long vid_get_bitmap_buffer_height() { return 240; } 
    4842 
    4943char *camera_jpeg_count_str() 
  • branches/reyalp-flt/platform/a495/sub/100e/lib.c

    r1376 r1514  
    3939} 
    4040 
    41 long vid_get_bitmap_screen_width() { return 360; } 
    42 long vid_get_bitmap_screen_height() { return 240; } 
    43  
    4441long vid_get_viewport_height() { return 240; } 
    45  
    46 long vid_get_bitmap_buffer_width() { return 360; } 
    47 long vid_get_bitmap_buffer_height() { return 240; } 
    4842 
    4943char *camera_jpeg_count_str() 
  • branches/reyalp-flt/platform/a495/sub/100f/lib.c

    r1376 r1514  
    3939} 
    4040 
    41 long vid_get_bitmap_screen_width() { return 360; } 
    42 long vid_get_bitmap_screen_height() { return 240; } 
    43  
    4441long vid_get_viewport_height() { return 240; } 
    45  
    46 long vid_get_bitmap_buffer_width() { return 360; } 
    47 long vid_get_bitmap_buffer_height() { return 240; } 
    4842 
    4943char *camera_jpeg_count_str() 
  • branches/reyalp-flt/platform/a530/sub/100a/lib.c

    r515 r1514  
    5555} 
    5656 
    57 long vid_get_bitmap_screen_width() 
    58 { 
    59     return 360; 
    60 } 
    61  
    62 long vid_get_bitmap_screen_height() 
    63 { 
    64     return 240; 
    65 } 
    66  
    6757long vid_get_viewport_height() 
    6858{ 
     
    7464    return (char*)0x6E820; 
    7565} 
    76  
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
    80  
  • branches/reyalp-flt/platform/a540/sub/100b/lib.c

    r682 r1514  
    4747// from ewavr  
    4848        return (void*)(*(int*)0x63AD0); // found in sub_FFD25770 
    49 } 
    50  
    51 long vid_get_bitmap_screen_width() 
    52 { 
    53     return 360; 
    54 } 
    55  
    56 long vid_get_bitmap_screen_height() 
    57 { 
    58     return 240; 
    5949} 
    6050 
     
    117107    return (char*)0x6E8D0 ; // from 700 added orig. 0x78688 
    118108} 
    119  
    120 long vid_get_bitmap_buffer_width() { return 360; } 
    121  
    122 long vid_get_bitmap_buffer_height() { return 240; } 
    123  
  • branches/reyalp-flt/platform/a550/sub/100c/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    6252} 
    6353 
    64 long vid_get_bitmap_buffer_width() { return 360; } 
    65  
    66 long vid_get_bitmap_buffer_height() { return 240; } 
    67  
    6854void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    6955void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/a570/sub/100e/lib.c

    r659 r1514  
    5353} 
    5454 
    55 long vid_get_bitmap_screen_width() 
    56 { 
    57     return 360; 
    58 } 
    59  
    60 long vid_get_bitmap_screen_height() 
    61 { 
    62     return 240; 
    63 } 
    64  
    6555long vid_get_viewport_height() 
    6656{ 
    6757    return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:230; 
    6858} 
     59 
    6960char *camera_jpeg_count_str() 
    7061{ 
    7162    return (char*)0x10F28; 
    7263} 
    73  
    74 long vid_get_bitmap_buffer_width() { return 360; } 
    75  
    76 long vid_get_bitmap_buffer_height() { return 240; } 
    77  
  • branches/reyalp-flt/platform/a570/sub/101a/lib.c

    r766 r1514  
    5353} 
    5454 
    55 long vid_get_bitmap_screen_width() 
    56 { 
    57     return 360; 
    58 } 
    59  
    60 long vid_get_bitmap_screen_height() 
    61 { 
    62     return 240; 
    63 } 
    64  
    6555long vid_get_viewport_height() 
    6656{ 
    6757    return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:230; 
    6858} 
     59 
    6960char *camera_jpeg_count_str() 
    7061{ 
    7162    return (char*)0x10F28; 
    7263} 
    73  
    74 long vid_get_bitmap_buffer_width() { return 360; } 
    75  
    76 long vid_get_bitmap_buffer_height() { return 240; } 
    77  
  • branches/reyalp-flt/platform/a580/sub/101b/lib.c

    r1308 r1514  
    5050} 
    5151 
    52  
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
     52long vid_get_viewport_height() 
    5953{ 
    6054    return 240; 
    6155} 
    6256 
    63 long vid_get_viewport_height() 
    64 { 
    65     return 240; 
    66 } 
    6757char *camera_jpeg_count_str() 
    6858{ 
    6959    return (char*)0x00048AE0;           // OK! 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/a590/sub/100e/lib.c

    r675 r1514  
    5757} 
    5858 
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     return 360; 
    62 } 
    63  
    64 long vid_get_bitmap_screen_height() 
    65 { 
    66     return 240; 
    67 } 
    68  
    6959long vid_get_viewport_height() 
    7060{ 
     
    7565    return (char*)0x49344; // ok found at FFD727B0 
    7666} 
    77  
    78 long vid_get_bitmap_buffer_width() { return 360; } 
    79  
    80 long vid_get_bitmap_buffer_height() { return 240; } 
    81  
  • branches/reyalp-flt/platform/a590/sub/101b/lib.c

    r675 r1514  
    5454} 
    5555 
    56  
    57 long vid_get_bitmap_screen_width() 
    58 { 
    59     return 360; 
    60 } 
    61  
    62 long vid_get_bitmap_screen_height() 
    63 { 
    64     return 240; 
    65 } 
    66  
    6756long vid_get_viewport_height() 
    6857{ 
     
    7362    return (char*)0x49344; // same as 100e, found @ FFD727B0 
    7463} 
    75  
    76 long vid_get_bitmap_buffer_width() { return 360; } 
    77  
    78 long vid_get_bitmap_buffer_height() { return 240; } 
    79  
  • branches/reyalp-flt/platform/a610/sub/100e/lib.c

    r515 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    7565} 
    7666 
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
    80  
    8167void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    8268void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/a610/sub/100f/lib.c

    r515 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    7464    return (char*)0x80A90; 
    7565} 
    76  
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
    80  
  • branches/reyalp-flt/platform/a620/sub/100f/lib.c

    r515 r1514  
    4141} 
    4242 
    43 long vid_get_bitmap_screen_width() 
    44 { 
    45     return 360; 
    46 } 
    47  
    48 long vid_get_bitmap_screen_height() 
    49 { 
    50     return 240; 
    51 } 
    52  
    5343long vid_get_viewport_height() 
    5444{ 
     
    5949    return (char*)0x7F6F8; 
    6050} 
    61  
    62 long vid_get_bitmap_buffer_width() { return 360; } 
    63  
    64 long vid_get_bitmap_buffer_height() { return 240; } 
    65  
  • branches/reyalp-flt/platform/a630/sub/100c/lib.c

    r515 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    6858    return (char*)0x70EA0; 
    6959} 
    70  
    71 long vid_get_bitmap_buffer_width() { return 360; } 
    72  
    73 long vid_get_bitmap_buffer_height() { return 240; } 
    74  
  • branches/reyalp-flt/platform/a640/sub/100b/lib.c

    r515 r1514  
    4141} 
    4242 
    43 long vid_get_bitmap_screen_width() 
    44 { 
    45     return 360; 
    46 } 
    47  
    48 long vid_get_bitmap_screen_height() 
    49 { 
    50     return 240; 
    51 } 
    52  
    5343long vid_get_viewport_height() 
    5444{ 
     
    5949    return (char*)0x71200; 
    6050} 
    61  
    62 long vid_get_bitmap_buffer_width() { return 360; } 
    63  
    64 long vid_get_bitmap_buffer_height() { return 240; } 
    65  
  • branches/reyalp-flt/platform/a650/sub/100d/lib.c

    r515 r1514  
    4242} 
    4343 
    44  
    45 long vid_get_bitmap_screen_width() 
    46 { 
    47     return 360; 
    48 } 
    49  
    50 long vid_get_bitmap_screen_height() 
    51 { 
    52     return 240; 
    53 } 
    54  
    5544long vid_get_viewport_height() 
    5645{ 
     
    6251    return (char*)0x5CB38; 
    6352} 
    64  
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
  • branches/reyalp-flt/platform/a700/sub/100b/lib.c

    r773 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    6858    return (char*)0x78688; 
    6959} 
    70  
    71 long vid_get_bitmap_buffer_width() { return 360; } 
    72  
    73 long vid_get_bitmap_buffer_height() { return 240; } 
    74  
  • branches/reyalp-flt/platform/a710/sub/100a/lib.c

    r515 r1514  
    5151} 
    5252 
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6353long vid_get_viewport_height() 
    6454{ 
     
    6959    return (char*)0x7BD98; 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/a720/sub/100c/lib.c

    r515 r1514  
    5050} 
    5151 
    52  
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6352long vid_get_viewport_height() 
    6453{ 
     
    6958    return (char*)0x580CC; 
    7059} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/d10/platform_camera.h

    r1456 r1514  
    9696    #undef CAM_USES_ASPECT_CORRECTION 
    9797    #define CAM_USES_ASPECT_CORRECTION          1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     98    #undef CAM_BITMAP_WIDTH 
     99    #define CAM_BITMAP_WIDTH                720 // Actual width of bitmap screen in bytes 
    98100 
    99101    #define CAM_ZEBRA_ASPECT_ADJUST 1 
  • branches/reyalp-flt/platform/d10/sub/100a/lib.c

    r982 r1514  
    4343} 
    4444 
    45  
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48 //    return 720; 
    49     return 360; // 720 is the real width but we lie for aspect correction ... 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54     return 240; 
    55 } 
    56  
    5745int vid_get_viewport_width() 
    5846{ 
     
    6957    return (char *)0x525E4; // search on "9999" done 
    7058} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 720; } 
    73 long vid_get_bitmap_buffer_height() { return 240; } 
    74  
    75  
    76  
  • branches/reyalp-flt/platform/g10/lib.c

    r1329 r1514  
    7272// Values that may change are in lib.c for each firmware version. 
    7373 
    74 long vid_get_bitmap_screen_width() { return 360; }  //  G10 use 320 for 9/4 mode, 360 otherwise 
    75 long vid_get_bitmap_screen_height() { return 240; } //  G10 
    76  
    77 long vid_get_bitmap_buffer_width() { return 720; }      //  G10 1.00h @ 0xFF8F2FB4 
    78 long vid_get_bitmap_buffer_height() { return 240; } //  G10 1.00h @ 0xFF8F2FB8 
    79  
    8074int vid_get_viewport_width() 
    8175{ 
  • branches/reyalp-flt/platform/g10/platform_camera.h

    r1493 r1514  
    7575    #undef CAM_USES_ASPECT_CORRECTION    
    7676    #define CAM_USES_ASPECT_CORRECTION          1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     77    #undef CAM_BITMAP_WIDTH 
     78    #define CAM_BITMAP_WIDTH                720 // Actual width of bitmap screen in bytes 
    7779 
    7880    #undef EDGE_HMARGIN  
  • branches/reyalp-flt/platform/g11/platform_camera.h

    r1418 r1514  
    5757    #undef CAM_USES_ASPECT_CORRECTION    
    5858    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     59    #undef CAM_BITMAP_WIDTH 
     60    #undef CAM_BITMAP_HEIGHT 
     61    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     62    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    5963 
    6064    #undef CAM_BITMAP_PALETTE 
  • branches/reyalp-flt/platform/g11/sub/100f/lib.c

    r1363 r1514  
    8888} 
    8989 
    90  
    91 long vid_get_bitmap_screen_width() 
    92 { 
    93     return 360; 
    94 } 
    95  
    96 long vid_get_bitmap_screen_height() 
    97 { 
    98         return 240; 
    99 } 
    100  
    10190int vid_get_viewport_width() 
    10291{ 
     
    10998 
    11099} 
    111  
    112 long vid_get_bitmap_buffer_width() { return 960; }  
    113  
    114 long vid_get_bitmap_buffer_height() { return 270; } 
    115  
  • branches/reyalp-flt/platform/g11/sub/100j/lib.c

    r1363 r1514  
    108108} 
    109109 
    110  
    111 long vid_get_bitmap_screen_width() 
    112 { 
    113     return 360; 
    114 } 
    115  
    116 long vid_get_bitmap_screen_height() 
    117 { 
    118         return 240; 
    119 } 
    120  
    121110int vid_get_viewport_width() 
    122111{ 
     
    129118 
    130119} 
    131  
    132 long vid_get_bitmap_buffer_width() { return 960; } // G11 OK @FF916304 (search for aBmpddev_c) 
    133  
    134 long vid_get_bitmap_buffer_height() { return 270; } // G11 OK @FF916300 
    135  
  • branches/reyalp-flt/platform/g11/sub/100l/lib.c

    r1363 r1514  
    108108} 
    109109 
    110  
    111 long vid_get_bitmap_screen_width() 
    112 { 
    113     return 360; 
    114 } 
    115  
    116 long vid_get_bitmap_screen_height() 
    117 { 
    118         return 240; 
    119 } 
    120  
    121110int vid_get_viewport_width() 
    122111{ 
     
    129118 
    130119} 
    131  
    132 long vid_get_bitmap_buffer_width() { return 960; } // G11 OK @FF916304 (search for aBmpddev_c) 
    133  
    134 long vid_get_bitmap_buffer_height() { return 270; } // G11 OK @FF916300 
    135  
  • branches/reyalp-flt/platform/g12/lib.c

    r1511 r1514  
    9191} 
    9292 
    93 long vid_get_bitmap_screen_width() { return 360; } 
    94 long vid_get_bitmap_screen_height() { return 240; } 
    95 long vid_get_bitmap_buffer_width() { return 960; } 
    96 long vid_get_bitmap_buffer_height() { return 270; } 
    97  
    9893// Y multiplier for cameras with 480 pixel high viewports (CHDK code assumes 240) 
    9994int vid_get_viewport_yscale() { 
  • branches/reyalp-flt/platform/g12/platform_camera.h

    r1512 r1514  
    6666    #undef CAM_USES_ASPECT_CORRECTION 
    6767    #define CAM_USES_ASPECT_CORRECTION      1   //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     68    #undef CAM_BITMAP_WIDTH 
     69    #undef CAM_BITMAP_HEIGHT 
     70    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     71    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    6872 
    6973    #undef EDGE_HMARGIN 
  • branches/reyalp-flt/platform/g7/sub/100e/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    7969} 
    8070 
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
    84  
    8571void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    8672void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/g7/sub/100g/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    7868    return (char*)0x82F88; 
    7969} 
    80  
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
    84  
  • branches/reyalp-flt/platform/g7/sub/100i/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    7868    return (char*)0x82F88; 
    7969} 
    80  
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
    84  
  • branches/reyalp-flt/platform/g7/sub/100j/lib.c

    r515 r1514  
    4242} 
    4343 
    44 long vid_get_bitmap_screen_width() 
    45 { 
    46     return 360; 
    47 } 
    48  
    49 long vid_get_bitmap_screen_height() 
    50 { 
    51     return 240; 
    52 } 
    53  
    5444long vid_get_viewport_height() 
    5545{ 
     
    7868    return (char*)0x82F88; 
    7969} 
    80  
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
    84  
  • branches/reyalp-flt/platform/g9/sub/100d/lib.c

    r647 r1514  
    5656} 
    5757 
    58  
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     return 360; 
    62 } 
    63  
    64 long vid_get_bitmap_screen_height() 
    65 { 
    66     return 240; 
    67 } 
    68  
    6958long vid_get_viewport_height() 
    7059{ 
     
    111100    return (char*)0x60354;//OK 
    112101} 
    113  
    114 long vid_get_bitmap_buffer_width() { return 360; } 
    115  
    116 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/g9/sub/100g/lib.c

    r647 r1514  
    5656} 
    5757 
    58  
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     return 360; 
    62 } 
    63  
    64 long vid_get_bitmap_screen_height() 
    65 { 
    66     return 240; 
    67 } 
    68  
    6958long vid_get_viewport_height() 
    7059{ 
     
    111100    return (char*)0x60354;//OK 
    112101} 
    113  
    114 long vid_get_bitmap_buffer_width() { return 360; } 
    115  
    116 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/g9/sub/100i/lib.c

    r821 r1514  
    4646} 
    4747 
    48  
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5948long vid_get_viewport_height() 
    6049{ 
     
    8877    return (char*)0x60354;//OK 
    8978} 
    90  
    91 long vid_get_bitmap_buffer_width() { return 360; } 
    92  
    93 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/generic/wrappers.c

    r1511 r1514  
    11631163// same as bitmap width for most cameras, override in platform/sub/lib.c as needed 
    11641164int __attribute__((weak)) vid_get_viewport_width() { 
    1165         return vid_get_bitmap_screen_width(); 
     1165        return camera_screen.width; 
    11661166} 
    11671167 
  • branches/reyalp-flt/platform/ixus1000_sd4500/platform_camera.h

    r1418 r1514  
    9494    #define  CAM_SHOW_OSD_IN_SHOOT_MENU  1 
    9595 
    96   #define CAM_HAS_VARIABLE_ASPECT 1 
     96    #define CAM_HAS_VARIABLE_ASPECT 1 
    9797 
    98     //nandoide sept-2009 
    9998    #undef CAM_USES_ASPECT_CORRECTION 
    100     #undef CAM_USES_ASPECT_YCORRECTION 
    10199    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
    102     #define CAM_USES_ASPECT_YCORRECTION  0  //only uses mappings on x coordinate 
    103  
    104  
    105         //#undef ASPECT_XCORRECTION 
    106             //#define ASPECT_XCORRECTION(x)  (((x)<<1))   //correction x*screen_buffer_width/screen_width = x*960/480 = x*2/1 
    107  
    108             #undef ASPECT_GRID_XCORRECTION 
    109             #define ASPECT_GRID_XCORRECTION(x)   ( (x)+60  ) 
    110         #undef ASPECT_GRID_YCORRECTION 
    111             #define ASPECT_GRID_YCORRECTION(y)  ( (y) )       //y correction for grids  made on a 360x240 As the buffer is 720x240 we have no correction here. 
    112  
    113  
    114             #undef ASPECT_VIEWPORT_XCORRECTION 
    115             #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay 
    116             #undef ASPECT_VIEWPORT_YCORRECTION 
    117     #define ASPECT_VIEWPORT_YCORRECTION(y) ( (y) ) 
     100    #undef CAM_SCREEN_WIDTH 
     101    #undef CAM_BITMAP_WIDTH 
     102    #undef CAM_BITMAP_HEIGHT 
     103    #define CAM_SCREEN_WIDTH                480 // Width of bitmap screen in CHDK co-ordinates 
     104    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     105    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    118106 
    119107    #undef EDGE_HMARGIN 
    120108    #define EDGE_HMARGIN 10                     //10 fits video mode of sx210 
    121  
    122     //games mappings 
    123    #undef GAMES_SCREEN_WIDTH 
    124    #undef GAMES_SCREEN_HEIGHT 
    125    #define GAMES_SCREEN_WIDTH 360 
    126    #define GAMES_SCREEN_HEIGHT 240 
    127    #undef ASPECT_GAMES_XCORRECTION 
    128    // 720/360=2 same aspect than grids and viewport but another approach: there is a lot of corrections to do in game's code, and we decide to paint directly on display buffer wirh another resolution 
    129    // used by gui.c that configures the draw environment (trhough new draw_gui function) depending on gui_mode: we have then 360x240 for games (but deformed output:circles are not circles) and 320x240 for 
    130    // other modes in perfect aspect ratio 4/3: slightly better visualization: file menus more readable, ... 
    131    #define ASPECT_GAMES_XCORRECTION(x)   ( ((x)<<1) ) 
    132    #undef ASPECT_GAMES_YCORRECTION 
    133    #define ASPECT_GAMES_YCORRECTION(y)   ( (y) )  //none 
    134109 
    135110   //zebra letterbox for saving memory 
     
    141116   #define ZEBRA_HMARGIN0  30 //this 30 rows are not used by the display buffer is 720x240 effective, no 960x270, i.e. (270-240) reduction in widht possible but not done (more difficult to manage it and slower). 
    142117 
    143    //end nandoide sept-2009 
    144118   #define CAM_QUALITY_OVERRIDE 1 
    145119   #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 
  • branches/reyalp-flt/platform/ixus1000_sd4500/sub/100d/lib.c

    r1511 r1514  
    9797} 
    9898 
    99 //ASM1989 
    100 // found at FF9263F0                 LDR     R1, =0x10E     - height 270 
    101 // found at FF9263F4                MOV     R0, #0x3C0   - width 960 
    102  
    103 long vid_get_bitmap_screen_width() 
    104 { 
    105 //    return SCREENX;  // -------------------------------------yes, the buffer is greater, and de 
    106 //      return 320; 
    107  
    108  
    109         //return ((mode_get()&MODE_MASK) == MODE_VIDEO_STD ||(mode_get()&MODE_MASK) == MODE_PLAY)?480:320; 
    110         return 480; // as in sd980 
    111  
    112  
    113 } 
    114  
    115 long vid_get_bitmap_screen_height() 
    116 { 
    117 //    return SCREENY;  // ---- yes, the buffer is also greater, 
    118                      //   seems a 16/9 buffer (i.e. 480x270) but duplicating pixels at x : (480x2)x270 
    119         return 240; 
    120 } 
    121  
    12299// begin 16:9 support 
    123100 
     
    159136 return (void*)0xB7E00;                                      // found at FFA23818 
    160137} 
    161  
    162 long vid_get_bitmap_buffer_width() { return 960; } 
    163  
    164 long vid_get_bitmap_buffer_height() { return 270; } 
    165  
  • branches/reyalp-flt/platform/ixus1000_sd4500/sub/100f/lib.c

    r1511 r1514  
    139139} 
    140140 
    141 //ASM1989 
    142 // found at FF9263F0                 LDR     R1, =0x10E     - height 270 
    143 // found at FF9263F4                MOV     R0, #0x3C0   - width 960 
    144  
    145 long vid_get_bitmap_screen_width() 
    146 { 
    147 //    return SCREENX;  // -------------------------------------yes, the buffer is greater, and de 
    148 //      return 320; 
    149  
    150  
    151         //return ((mode_get()&MODE_MASK) == MODE_VIDEO_STD ||(mode_get()&MODE_MASK) == MODE_PLAY)?480:320; 
    152         return 480; // as in sd980 
    153  
    154  
    155 } 
    156  
    157 long vid_get_bitmap_screen_height() 
    158 { 
    159 //    return SCREENY;  // ---- yes, the buffer is also greater, 
    160                      //   seems a 16/9 buffer (i.e. 480x270) but duplicating pixels at x : (480x2)x270 
    161         return 240; 
    162 } 
    163141 
    164142// begin 16:9 support 
     
    201179 return (void*)0xB7E00;                                      // found at FFA23818 
    202180} 
    203  
    204 long vid_get_bitmap_buffer_width() { return 960; } 
    205  
    206 long vid_get_bitmap_buffer_height() { return 270; } 
    207  
  • branches/reyalp-flt/platform/ixus100_sd780/platform_camera.h

    r1418 r1514  
    100100    #undef CAM_USES_ASPECT_CORRECTION 
    101101    #define CAM_USES_ASPECT_CORRECTION          1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     102    #undef CAM_BITMAP_WIDTH 
     103    #undef CAM_BITMAP_HEIGHT 
     104    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     105    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    102106 
    103107    #define CAM_ZEBRA_ASPECT_ADJUST 1 
  • branches/reyalp-flt/platform/ixus100_sd780/sub/100b/lib.c

    r1328 r1514  
    6666} 
    6767 
    68  
    69 //SD780 - 720px real screen width 
    70 long vid_get_bitmap_screen_width() 
    71 { 
    72     return 360; // half of real for aspect correction 
    73     //720 
    74 } 
    75  
    76 //SD780 - 240px real screen height 
    77 long vid_get_bitmap_screen_height() 
    78 { 
    79     return 240; 
    80     //240 
    81 } 
    82  
    8368//VERIFY_SD780 - - Check resolutions again. 
    8469int vid_get_viewport_width() 
     
    9984    return (char *)0x33110; 
    10085} 
    101  
    102 //VERIFY_SD780 
    103 long vid_get_bitmap_buffer_width() { return 960; } // _sub_FF8EA47C__BmpDDev_c__134... 
    104                                                    // or maybe not, some 360x240 cams have this too ? 
    105 //VERIFY_SD780 
    106 long vid_get_bitmap_buffer_height() { return 270; } 
  • branches/reyalp-flt/platform/ixus100_sd780/sub/100c/lib.c

    r1173 r1514  
    6666} 
    6767 
    68  
    69 //SD780 - 720px real screen width 
    70 long vid_get_bitmap_screen_width() 
    71 { 
    72     return 360; // half of real for aspect correction 
    73     //720 
    74 } 
    75  
    76 //SD780 - 240px real screen height 
    77 long vid_get_bitmap_screen_height() 
    78 { 
    79     return 240; 
    80     //240 
    81 } 
    82  
    8368//VERIFY_SD780 - - Check resolutions again. 
    8469int vid_get_viewport_width() 
     
    9984    return (char *)0x33110; 
    10085} 
    101  
    102 //VERIFY_SD780 
    103 long vid_get_bitmap_buffer_width() { return 960; } // _sub_FF8EA47C__BmpDDev_c__134... 
    104                                                    // or maybe not, some 360x240 cams have this too ? 
    105 //VERIFY_SD780 
    106 long vid_get_bitmap_buffer_height() { return 270; } 
  • branches/reyalp-flt/platform/ixus120_sd940/platform_camera.h

    r1511 r1514  
    8787    #undef CAM_USES_ASPECT_CORRECTION 
    8888    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     89    #undef CAM_BITMAP_WIDTH 
     90    #undef CAM_BITMAP_HEIGHT 
     91    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     92    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    8993 
    9094    #undef EDGE_HMARGIN 
  • branches/reyalp-flt/platform/ixus120_sd940/sub/100e/lib.c

    r1207 r1514  
    22 
    33#include "platform.h" 
    4          
    5 long vid_get_bitmap_screen_width()               
    6 {                
    7         return 360 ;                            // SD940 103c ?  360  103b:  seems to use same number. 
    8 }                
    9                  
    10 long vid_get_bitmap_screen_height()              
    11 {                
    12         return 240;                                     // SD940 103c 103b:  seems to use same number. 
    13 }                
    144                 
    155int vid_get_viewport_width() 
     
    2111{                
    2212        return 240;                                     // SD940 103c 103b:  seems to use same number. 
    23 }                
    24  
    25 long vid_get_bitmap_buffer_width()       
    26 {                
    27         return 960;                                     // SD940 103c 103b:  seems to use same number. 
    28 }                
    29          
    30 long vid_get_bitmap_buffer_height()              
    31 {                
    32         return 270;                                     // SD940 103c 103b:  seems to use same number. 
    3313}                
    3414                 
  • branches/reyalp-flt/platform/ixus120_sd940/sub/101a/lib.c

    r1207 r1514  
    22 
    33#include "platform.h" 
    4          
    5 long vid_get_bitmap_screen_width()               
    6 {                
    7         return 360 ;                            // SD940 103c ?  360  103b:  seems to use same number. 
    8 }                
    9                  
    10 long vid_get_bitmap_screen_height()              
    11 {                
    12         return 240;                                     // SD940 103c 103b:  seems to use same number. 
    13 }                
    144                 
    155int vid_get_viewport_width() 
     
    2111{                
    2212        return 240;                                     // SD940 103c 103b:  seems to use same number. 
    23 }                
    24  
    25 long vid_get_bitmap_buffer_width()       
    26 {                
    27         return 960;                                     // SD940 103c 103b:  seems to use same number. 
    28 }                
    29          
    30 long vid_get_bitmap_buffer_height()              
    31 {                
    32         return 270;                                     // SD940 103c 103b:  seems to use same number. 
    3313}                
    3414                 
  • branches/reyalp-flt/platform/ixus120_sd940/sub/102c/lib.c

    r1207 r1514  
    5656} 
    5757 
    58  
    59 long vid_get_bitmap_screen_width() 
    60 { 
    61     //return 320; 
    62  
    63     return 360; 
    64 } 
    65  
    66  
    67 long vid_get_bitmap_screen_height() 
    68 { 
    69     return 240; 
    70 } 
    71  
    72  
    7358long vid_get_viewport_height() 
    7459{ 
     
    8671    return (char *) 0x700B0; // search on "9999" 
    8772} 
    88  
    89 long vid_get_bitmap_buffer_width() 
    90 { 
    91         return 960; 
    92 } 
    93  
    94  
    95 long vid_get_bitmap_buffer_height() 
    96 { 
    97         //return 240; 
    98  
    99         return 270; 
    100 } 
  • branches/reyalp-flt/platform/ixus120_sd940/sub/103b/lib.c

    r1207 r1514  
    11#include "platform.h" 
    2          
    3 long vid_get_bitmap_screen_width()               
    4 {                
    5         return 360 ;                            // SD940 103c ?  360  103b:  seems to use same number. 
    6 }                
    7                  
    8 long vid_get_bitmap_screen_height()              
    9 {                
    10         return 240;                                     // SD940 103c 103b:  seems to use same number. 
    11 }                
    122                 
    133int vid_get_viewport_width() 
     
    199{                
    2010        return 240;                                     // SD940 103c 103b:  seems to use same number. 
    21 }                
    22  
    23 long vid_get_bitmap_buffer_width()       
    24 {                
    25         return 960;                                     // SD940 103c 103b:  seems to use same number. 
    26 }                
    27          
    28 long vid_get_bitmap_buffer_height()              
    29 {                
    30         return 270;                                     // SD940 103c 103b:  seems to use same number. 
    3111}                
    3212                 
  • branches/reyalp-flt/platform/ixus120_sd940/sub/103c/lib.c

    r1207 r1514  
    11#include "platform.h" 
    2          
    3 long vid_get_bitmap_screen_width()               
    4 {                
    5         return 360 ;                            // SD940 103c ?  360 
    6 }                
    7                  
    8 long vid_get_bitmap_screen_height()              
    9 {                
    10         return 240;                                     // SD940 103c 
    11 }                
    122                 
    133int vid_get_viewport_width() 
     
    199{                
    2010        return 240;                                     // SD940 103c 
    21 }                
    22  
    23 long vid_get_bitmap_buffer_width()       
    24 {                
    25         return 960;                                     // SD940 103c 
    26 }                
    27          
    28 long vid_get_bitmap_buffer_height()              
    29 {                
    30         return 270;                                     // SD940 103c 
    3111}                
    3212                 
  • branches/reyalp-flt/platform/ixus200_sd980/platform_camera.h

    r1418 r1514  
    7575    #undef CAM_USES_ASPECT_CORRECTION 
    7676    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     77    #undef CAM_SCREEN_WIDTH 
     78    #undef CAM_BITMAP_WIDTH 
     79    #undef CAM_BITMAP_HEIGHT 
     80    #define CAM_SCREEN_WIDTH                480 // Width of bitmap screen in CHDK co-ordinates 
     81    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     82    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    7783 
    7884    #undef EDGE_HMARGIN 
  • branches/reyalp-flt/platform/ixus200_sd980/sub/101c/lib.c

    r1511 r1514  
    4141} 
    4242 
    43  
    44 long vid_get_bitmap_screen_width()   { return 480; } 
    45 long vid_get_bitmap_screen_height()  { return 240; } 
    46 long vid_get_bitmap_buffer_width()   { return 960; } 
    47 long vid_get_bitmap_buffer_height()  { return 270; } 
    48  
    49  
    5043long vid_get_viewport_height()       { return 240; } 
    5144 
  • branches/reyalp-flt/platform/ixus200_sd980/sub/101d/lib.c

    r1511 r1514  
    4141} 
    4242 
    43  
    44 long vid_get_bitmap_screen_width()   { return 480; } 
    45 long vid_get_bitmap_screen_height()  { return 240; } 
    46 long vid_get_bitmap_buffer_width()   { return 960; } 
    47 long vid_get_bitmap_buffer_height()  { return 270; } 
    48  
    49  
    5043long vid_get_viewport_height()       { return 240; } 
    5144 
  • branches/reyalp-flt/platform/ixus220_elph300hs/lib.c

    r1511 r1514  
    4848// Values that may change are in lib.c for each firmware version. 
    4949 
    50 long vid_get_bitmap_screen_width() { return 360; } 
    51 long vid_get_bitmap_screen_height() { return 240; } 
    52 long vid_get_bitmap_buffer_width() { return 960; } 
    53 long vid_get_bitmap_buffer_height() { return 270; } 
    54  
    5550int vid_get_viewport_buffer_width() { return 360; } 
    5651 
  • branches/reyalp-flt/platform/ixus220_elph300hs/platform_camera.h

    r1457 r1514  
    7676    #undef CAM_USES_ASPECT_CORRECTION 
    7777    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     78    #undef CAM_BITMAP_WIDTH 
     79    #undef CAM_BITMAP_HEIGHT 
     80    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     81    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    7882 
    7983    #undef EDGE_HMARGIN 
  • branches/reyalp-flt/platform/ixus220_elph300hs/sub/100c/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/platform/ixus220_elph300hs/sub/101a/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/platform/ixus220_elph300hs/sub/101c/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/reyalp-flt/platform/ixus300_sd4000/lib.c

    r1377 r1514  
    156156// Values that may change are in lib.c for each firmware version. 
    157157 
    158 // ROM:FF9013D8 0x2D0 = 720 ?!? 
    159 // SD990 ROM:FF83CFC8 ?!? 
    160 long vid_get_bitmap_screen_width() { 
    161     //return 320; 
    162     //return 360; 
    163     return 480; 
    164     //return 720; 
    165     //return 960; 
    166 } 
    167  
    168 long vid_get_bitmap_screen_height() { 
    169     return 240; 
    170     //return 270; 
    171     //return 360; 
    172 } 
    173  
    174 // if buffer width was to small, CHDK Logo was shown as distorted "row" on Display 
    175 long vid_get_bitmap_buffer_width() { 
    176     //return 360; 
    177     //return 480; 
    178     //return 720; 
    179     return 960;    // working 
    180 } 
    181  
    182 long vid_get_bitmap_buffer_height() { 
    183     //return 240; 
    184     return 270; 
    185     //return 360; 
    186     //return 480; 
    187 } 
    188  
    189158/* 
    190159int vid_get_viewport_width() { 
  • branches/reyalp-flt/platform/ixus300_sd4000/platform_camera.h

    r1418 r1514  
    123123    #undef CAM_USES_ASPECT_CORRECTION 
    124124    #define CAM_USES_ASPECT_CORRECTION  1    // camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     125    #undef CAM_SCREEN_WIDTH 
     126    #undef CAM_BITMAP_WIDTH 
     127    #undef CAM_BITMAP_HEIGHT 
     128    #define CAM_SCREEN_WIDTH                480 // Width of bitmap screen in CHDK co-ordinates 
     129    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     130    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    125131 
    126132    // Not required 
  • branches/reyalp-flt/platform/ixus310_elph500hs/kbd.c

    r1498 r1514  
    345345#endif 
    346346    { 3, KEY_DISPLAY        , 0x00000008, LB(0,4), 0, "Back",  0,    GUI_MODE_MENU,      GUI_MODE_MENU, MODE_REC|MODE_PLAY }, 
    347         { 3, KEY_DISPLAY            , 0x00000008, LB(0,4), 0, "Disp",  0,    GUI_MODE_PALETTE,   100,           MODE_REC|MODE_PLAY }, 
     347        { 3, KEY_DISPLAY            , 0x00000008, LB(0,4), 0, "Disp",  0,    GUI_MODE_MENU+1,    100,           MODE_REC|MODE_PLAY }, 
    348348    { 3, KEY_UP                     , 0x00000010, RB(0,1), 0, "Up",    0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
    349349        { 3, KEY_LEFT               , 0x00000020, RB(0,2), 0, "Left",  0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
  • branches/reyalp-flt/platform/ixus310_elph500hs/lib.c

    r1511 r1514  
    7979    return bitmap_buffer[0]; 
    8080} 
    81  
    82 long vid_get_bitmap_screen_width() { return 480; } 
    83 long vid_get_bitmap_screen_height() { return 240; } 
    84 long vid_get_bitmap_buffer_width() { return 960; } 
    85 long vid_get_bitmap_buffer_height() { return 270; } 
    8681 
    8782// Physical width of viewport row in bytes 
  • branches/reyalp-flt/platform/ixus310_elph500hs/platform_camera.h

    r1512 r1514  
    7878    #undef CAM_USES_ASPECT_CORRECTION 
    7979    #define CAM_USES_ASPECT_CORRECTION      1   //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     80    #undef CAM_SCREEN_WIDTH 
     81    #undef CAM_BITMAP_WIDTH 
     82    #undef CAM_BITMAP_HEIGHT 
     83    #define CAM_SCREEN_WIDTH                480 // Width of bitmap screen in CHDK co-ordinates 
     84    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes 
     85    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows 
    8086 
    8187    #undef EDGE_HMARGIN 
  • branches/reyalp-flt/platform/ixus40_sd300/sub/100j/lib.c

    r718 r1514  
    5959} 
    6060 
    61 long vid_get_bitmap_screen_width() 
    62 { 
    63     return 360; 
    64 } 
    65  
    66 long vid_get_bitmap_screen_height() 
    67 { 
    68     return 240; 
    69 } 
    70  
    7161long vid_get_viewport_height() 
    7262{ 
     
    7868    return (char*)0x75F30; //ok 
    7969} 
    80  
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus40_sd300/sub/100k/lib.c

    r718 r1514  
    5959} 
    6060 
    61 long vid_get_bitmap_screen_width() 
    62 { 
    63     return 360; 
    64 } 
    65  
    66 long vid_get_bitmap_screen_height() 
    67 { 
    68     return 240; 
    69 } 
    70  
    7161long vid_get_viewport_height() 
    7262{ 
     
    7868    return (char*)0x75F30; //ok 
    7969} 
    80  
    81 long vid_get_bitmap_buffer_width() { return 360; } 
    82  
    83 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus50_sd400/sub/101a/lib.c

    r515 r1514  
    6060} 
    6161 
    62 long vid_get_bitmap_screen_width() 
    63 { 
    64     return 360; 
    65 } 
    66  
    67 long vid_get_bitmap_screen_height() 
    68 { 
    69     return 240; 
    70 } 
    71  
    7262long vid_get_viewport_height() 
    7363{ 
     
    7969    return (char*)0x75EC0; 
    8070} 
    81  
    82 long vid_get_bitmap_buffer_width() { return 360; } 
    83  
    84 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus50_sd400/sub/101b/lib.c

    r515 r1514  
    6060} 
    6161 
    62 long vid_get_bitmap_screen_width() 
    63 { 
    64     return 360; 
    65 } 
    66  
    67 long vid_get_bitmap_screen_height() 
    68 { 
    69     return 240; 
    70 } 
    71  
    7262long vid_get_viewport_height() 
    7363{ 
     
    7969    return (char*)0x75EC0; // OK! 
    8070} 
    81  
    82 long vid_get_bitmap_buffer_width() { return 360; } 
    83  
    84 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus55_sd450/sub/100b/lib.c

    r515 r1514  
    4545} 
    4646 
    47 long vid_get_bitmap_screen_width() 
    48 { 
    49     return 360; 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54     return 240; 
    55 } 
    56  
    5747long vid_get_viewport_height() 
    5848{ 
     
    6959    return (char*)0x9B58; 
    7060} 
    71  
    72  
    73 long vid_get_bitmap_buffer_width() { return 360; } 
    74  
    75 long vid_get_bitmap_buffer_height() { return 240; } 
    76  
  • branches/reyalp-flt/platform/ixus55_sd450/sub/100c/lib.c

    r515 r1514  
    4545} 
    4646 
    47 long vid_get_bitmap_screen_width() 
    48 { 
    49     return 360; 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54     return 240; 
    55 } 
    56  
    5747long vid_get_viewport_height() 
    5848{ 
     
    7060} 
    7161 
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
    7662void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7763void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus55_sd450/sub/100d/lib.c

    r515 r1514  
    4545} 
    4646 
    47 long vid_get_bitmap_screen_width() 
    48 { 
    49     return 360; 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54     return 240; 
    55 } 
    56  
    5747long vid_get_viewport_height() 
    5848{ 
     
    6959    return (char*)0x9B58; 
    7060} 
    71   
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/ixus60_sd600/sub/100a/lib.c

    r812 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    7060} 
    7161 
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
    7662void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7763void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus60_sd600/sub/100d/lib.c

    r812 r1514  
    5050} 
    5151 
    52 long vid_get_bitmap_screen_width() 
    53 { 
    54     return 360; 
    55 } 
    56  
    57 long vid_get_bitmap_screen_height() 
    58 { 
    59     return 240; 
    60 } 
    61  
    6252long vid_get_viewport_height() 
    6353{ 
     
    7060} 
    7161 
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
    7662void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7763void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus65_sd630/sub/100a/lib.c

    r955 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6454    return (char*)0x10B80; 
    6555} 
     56 
    6657int movie_status = 0; 
    67  
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
    7158 
    7259void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus700_sd500/sub/101a/lib.c

    r515 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6353} 
    6454 
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
    6955void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7056void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus700_sd500/sub/101b/lib.c

    r515 r1514  
    4444} 
    4545 
    46 long vid_get_bitmap_screen_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_screen_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5646long vid_get_viewport_height() 
    5747{ 
     
    6353} 
    6454 
    65 long vid_get_bitmap_buffer_width() { return 360; } 
    66  
    67 long vid_get_bitmap_buffer_height() { return 240; } 
    68  
    6955void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7056void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus70_sd1000/sub/100c/lib.c

    r515 r1514  
    5151} 
    5252 
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6353long vid_get_viewport_height() 
    6454{ 
     
    6959    return (char*)0x12298; 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/ixus70_sd1000/sub/101b/lib.c

    r515 r1514  
    5151} 
    5252 
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6353long vid_get_viewport_height() 
    6454{ 
     
    6959    return (char*)0x12298; 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/ixus70_sd1000/sub/102a/lib.c

    r515 r1514  
    5151} 
    5252 
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6353long vid_get_viewport_height() 
    6454{ 
     
    6959    return (char*)0x12298; 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
  • branches/reyalp-flt/platform/ixus750_sd550/sub/100f/lib.c

    r515 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6656} 
    6757 
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
    71  
    7258void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7359void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus750_sd550/sub/100g/lib.c

    r515 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6656} 
    6757 
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
    71  
    7258void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7359void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus750_sd550/sub/100h/lib.c

    r1181 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6656} 
    6757 
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
    71  
    7258void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7359void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus75_sd750/sub/100b/lib.c

    r564 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6757    return (char*)0x12600; 
    6858} 
    69  
    70 long vid_get_bitmap_buffer_width() { return 360; } 
    71  
    72 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus75_sd750/sub/101a/lib.c

    r564 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6757    return (char*)0x12600; 
    6858} 
    69  
    70 long vid_get_bitmap_buffer_width() { return 360; } 
    71  
    72 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus75_sd750/sub/102a/lib.c

    r564 r1514  
    4747} 
    4848 
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5949long vid_get_viewport_height() 
    6050{ 
     
    6757    return (char*)0x12600; 
    6858} 
    69  
    70 long vid_get_bitmap_buffer_width() { return 360; } 
    71  
    72 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus800_sd700/sub/100b/lib.c

    r515 r1514  
    4141} 
    4242 
    43 long vid_get_bitmap_screen_width() 
    44 { 
    45     return 360; 
    46 } 
    47  
    48 long vid_get_bitmap_screen_height() 
    49 { 
    50     return 240; 
    51 } 
    52  
    5343long vid_get_viewport_height() 
    5444{ 
     
    6151} 
    6252 
    63  
    64 long vid_get_bitmap_buffer_width() { return 360; } 
    65  
    66 long vid_get_bitmap_buffer_height() { return 240; } 
    67  
    6853void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    6954void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus800_sd700/sub/101b/lib.c

    r515 r1514  
    4141} 
    4242 
    43 long vid_get_bitmap_screen_width() 
    44 { 
    45     return 360; 
    46 } 
    47  
    48 long vid_get_bitmap_screen_height() 
    49 { 
    50     return 240; 
    51 } 
    52  
    5343long vid_get_viewport_height() 
    5444{ 
     
    6151} 
    6252 
    63 long vid_get_bitmap_buffer_width() { return 360; } 
    64  
    65 long vid_get_bitmap_buffer_height() { return 240; } 
    66  
    6753void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    6854void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus80_sd1100/sub/100c/lib.c

    r569 r1514  
    7878} 
    7979 
    80 long vid_get_bitmap_screen_width() 
    81 { 
    82     return 360; 
    83 } 
    84  
    85 long vid_get_bitmap_screen_height() 
     80long vid_get_viewport_height() 
    8681{ 
    8782    return 240; 
    8883} 
    8984 
    90 long vid_get_viewport_height() 
    91 { 
    92     return 240; 
    93 } 
    9485char *camera_jpeg_count_str() 
    9586{ 
    9687    return (char*)0x4c2c4; 
    9788} 
    98  
    99 long vid_get_bitmap_buffer_width() { return 360; } 
    100  
    101 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus80_sd1100/sub/101a/lib.c

    r569 r1514  
    5151} 
    5252 
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6353long vid_get_viewport_height() 
    6454{ 
     
    6959    return (char*)0x4c2c4; 
    7060} 
    71  
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus850_sd800/sub/100e/lib.c

    r702 r1514  
    118118} 
    119119 
    120 long vid_get_bitmap_screen_width() 
    121 { 
    122     return 360; 
    123 } 
    124  
    125 long vid_get_bitmap_screen_height() 
    126 { 
    127     return 240; 
    128 } 
    129  
    130120long vid_get_viewport_height() 
    131121{ 
     
    159149    return (char*)0x96F80; 
    160150} 
    161  
    162 long vid_get_bitmap_buffer_width() { return 360; } 
    163  
    164 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus85_sd770/sub/100a/lib.c

    r1173 r1514  
    7171} 
    7272 
    73 long vid_get_bitmap_screen_width() { return 360; } 
    74  
    75 long vid_get_bitmap_screen_height() { return 240; } 
    76  
    7773long vid_get_viewport_height() { return 240; } 
    78  
    79 long vid_get_bitmap_buffer_width() { return 360; } 
    80  
    81 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus860_sd870/sub/100c/lib.c

    r515 r1514  
    5050} 
    5151 
    52  
    53 long vid_get_bitmap_screen_width() 
    54 { 
    55     return 360; 
    56 } 
    57  
    58 long vid_get_bitmap_screen_height() 
    59 { 
    60     return 240; 
    61 } 
    62  
    6352long vid_get_viewport_height() 
    6453{ 
     
    7059} 
    7160 
    72 long vid_get_bitmap_buffer_width() { return 360; } 
    73  
    74 long vid_get_bitmap_buffer_height() { return 240; } 
    75  
    7661void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    7762void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus870_sd880/sub/100e/lib.c

    r1174 r1514  
    5252} 
    5353 
    54  
    55 long vid_get_bitmap_screen_width() 
    56 { 
    57         return 360; 
    58 } 
    59  
    60 long vid_get_bitmap_screen_height() 
    61 { 
    62         return 240; 
    63 } 
    64  
    6554long vid_get_viewport_height() 
    6655{ 
     
    7362        return (char*)0x4A980; 
    7463} 
    75  
    76  
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus870_sd880/sub/101a/lib.c

    r1174 r1514  
    5252} 
    5353 
    54  
    55 long vid_get_bitmap_screen_width() 
    56 { 
    57         return 360; 
    58 } 
    59  
    60 long vid_get_bitmap_screen_height() 
    61 { 
    62         return 240; 
    63 } 
    64  
    6554long vid_get_viewport_height() 
    6655{ 
     
    7362        return (char*)0x4A980; 
    7463} 
    75  
    76  
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus870_sd880/sub/102b/lib.c

    r1174 r1514  
    5252} 
    5353 
    54  
    55 long vid_get_bitmap_screen_width() 
    56 { 
    57         return 360; 
    58 } 
    59  
    60 long vid_get_bitmap_screen_height() 
    61 { 
    62         return 240; 
    63 } 
    64  
    6554long vid_get_viewport_height() 
    6655{ 
     
    7362        return (char*)0x4A980; 
    7463} 
    75  
    76  
    77 long vid_get_bitmap_buffer_width() { return 360; } 
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus900_sd900/sub/100c/lib.c

    r974 r1514  
    163163} 
    164164 
    165 long vid_get_bitmap_screen_width() { 
    166     return 360; 
    167 } 
    168  
    169 long vid_get_bitmap_screen_height() { 
    170     return 240; 
    171 } 
    172  
    173165long vid_get_viewport_height() { 
    174166    return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:230; 
     
    201193    return (char*)0x818C8;   // ROM:FFAA714C 
    202194} 
    203  
    204 long vid_get_bitmap_buffer_width() { 
    205     return 360; 
    206 } 
    207  
    208 long vid_get_bitmap_buffer_height() { 
    209     return 240; 
    210 } 
  • branches/reyalp-flt/platform/ixus90_sd790/sub/100c/lib.c

    r1376 r1514  
    4444} 
    4545 
    46  
    47 long vid_get_bitmap_screen_width() 
    48 { 
    49     return 360; 
    50 } 
    51  
    52 long vid_get_bitmap_screen_height() 
    53 { 
    54     return 240; 
    55 } 
    56  
    5746long vid_get_viewport_height() 
    5847{ 
     
    6352    return (char*)0x4C97C; // ixus90 
    6453} 
    65  
    66 long vid_get_bitmap_buffer_width() { return 360; } 
    67  
    68 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus90_sd790/sub/100d/lib.c

    r1376 r1514  
    4646} 
    4747 
    48  
    49 long vid_get_bitmap_screen_width() 
    50 { 
    51     return 360; 
    52 } 
    53  
    54 long vid_get_bitmap_screen_height() 
    55 { 
    56     return 240; 
    57 } 
    58  
    5948long vid_get_viewport_height() 
    6049{ 
     
    6554    return (char*)0x4C97C; // ixus90 
    6655} 
    67  
    68 long vid_get_bitmap_buffer_width() { return 360; } 
    69  
    70 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus950_sd850/sub/100c/lib.c

    r515 r1514  
    7272} 
    7373 
    74 long vid_get_bitmap_screen_width() 
    75 { 
    76     return 360; 
    77 } 
    78  
    79 long vid_get_bitmap_screen_height() 
    80 { 
    81     return 240; 
    82 } 
    83  
    8474long vid_get_viewport_height() 
    8575{ 
     
    9282} 
    9383 
    94  
    95 long vid_get_bitmap_buffer_width() { return 360; } 
    96  
    97 long vid_get_bitmap_buffer_height() { return 240; } 
    98  
    9984void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    10085void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus95_sd1200/platform_camera.h

    r1418 r1514  
    9090    #undef CAM_USES_ASPECT_CORRECTION 
    9191    #define CAM_USES_ASPECT_CORRECTION          1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     92    #undef CAM_BITMAP_WIDTH 
     93    #define CAM_BITMAP_WIDTH                720 // Actual width of bitmap screen in bytes 
    9294 
    9395    #define CAM_ZEBRA_ASPECT_ADJUST 1 
  • branches/reyalp-flt/platform/ixus95_sd1200/sub/100c/lib.c

    r1376 r1514  
    8484} 
    8585 
    86  
    87 // note real width is 720, report 360 for aspect adjustment 
    88 long vid_get_bitmap_screen_width() 
    89 { 
    90     return 360; 
    91 } 
    92  
    93 long vid_get_bitmap_screen_height() 
    94 { 
    95     return 240; 
    96 } 
    97  
    9886int vid_get_viewport_width() 
    9987{ 
     
    11199    return (char *)0x2F1D4;  //SD1200 from 0xFFD57DC0 
    112100} 
    113  
    114 /* SD1200: 
    115  * FFCADBF4                 MOV     R0, #0x2D0 ; 0x2D0 == 720 
    116  * FFCADBF8                 MOV     R1, #0xF0  ;  0xF0 == 240 
    117 */ 
    118  
    119 long vid_get_bitmap_buffer_width() { return 720; } 
    120 long vid_get_bitmap_buffer_height() { return 240; } 
    121  
  • branches/reyalp-flt/platform/ixus960_sd950/sub/100d/lib.c

    r668 r1514  
    4343} 
    4444 
    45  
    46 long vid_get_bitmap_width() 
    47 { 
    48     return 360; 
    49 } 
    50  
    51 long vid_get_bitmap_height() 
    52 { 
    53     return 240; 
    54 } 
    55  
    5645long vid_get_viewport_height() 
    5746{ 
     
    6352} 
    6453 
    65 long vid_get_bitmap_screen_width() 
    66 { 
    67     return 360; 
    68 } 
    69  
    70 long vid_get_bitmap_screen_height() 
    71 { 
    72     return 240; 
    73 } 
    74  
    75  
    76 long vid_get_bitmap_buffer_width() { return 360; } 
    77  
    78  
    79 long vid_get_bitmap_buffer_height() { return 240; } 
    80  
    81  
    8254void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
    8355void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. 
  • branches/reyalp-flt/platform/ixus970_sd890/sub/100b/lib.c

    r821 r1514  
    7171} 
    7272 
    73 long vid_get_bitmap_screen_width() { return 360; } 
    74  
    75 long vid_get_bitmap_screen_height() { return 240; } 
    76  
    7773long vid_get_viewport_height() { return 240; } 
    78  
    79 long vid_get_bitmap_buffer_width() { return 360; } 
    80  
    81 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus970_sd890/sub/100c/lib.c

    r821 r1514  
    7171} 
    7272 
    73 long vid_get_bitmap_screen_width() { return 360; } 
    74  
    75 long vid_get_bitmap_screen_height() { return 240; } 
    76  
    7773long vid_get_viewport_height() { return 240; } 
    78  
    79 long vid_get_bitmap_buffer_width() { return 360; } 
    80  
    81 long vid_get_bitmap_buffer_height() { return 240; } 
  • branches/reyalp-flt/platform/ixus970_sd890/sub/100f/lib.c