Changeset 128


Ignore:
Timestamp:
04/17/07 19:18:29 (6 years ago)
Author:
GrAnd
Message:
  • s3is: buttons mask

+ Prediction of target dir for saving RAW
+ Battery indicator in TextReader? and Games
+ Pause for autoscroll in TextReader? - [disp] button

Location:
branches/grand
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/grand/core/gui_batt.c

    r91 r128  
    2727 
    2828//------------------------------------------------------------------- 
    29 static unsigned long get_batt_perc() { 
     29unsigned long get_batt_perc() { 
    3030    unsigned long v; 
    3131 
  • branches/grand/core/gui_batt.h

    r51 r128  
    55 
    66//------------------------------------------------------------------- 
     7unsigned long get_batt_perc(); 
    78extern void gui_batt_draw_osd(); 
    89 
  • branches/grand/core/gui_fselect.c

    r109 r128  
    349349            break; 
    350350        case KEY_ERASE: 
    351             gui_mbox_init("*** Delete file ***", "Are you SURE to delete\nselected file?", 
    352                            MBOX_TEXT_CENTER|MBOX_BTN_YES_NO|MBOX_DEF_BTN2, fselect_delete_cb); 
     351            if (selected && selected->attr != 0xFF && !(selected->attr & DOS_ATTR_DIRECTORY)) { 
     352                gui_mbox_init("*** Delete file ***", "Are you SURE to delete\nselected file?", 
     353                               MBOX_TEXT_CENTER|MBOX_BTN_YES_NO|MBOX_DEF_BTN2, fselect_delete_cb); 
     354            } 
    353355            break; 
    354356        case KEY_MENU: 
  • branches/grand/core/gui_read.c

    r120 r128  
    77#include "font.h" 
    88#include "gui_draw.h" 
     9#include "gui_batt.h" 
    910#include "gui_read.h" 
    1011 
     
    2021static long last_time; 
    2122static int xx, yy; 
     23static int pause; 
     24 
     25//------------------------------------------------------------------- 
     26static void gui_read_draw_batt() { 
     27    sprintf(buffer, "Batt:%3d%%", get_batt_perc()); 
     28    draw_txt_string(screen_width/FONT_WIDTH-2-1-3-9, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
     29} 
     30 
     31//------------------------------------------------------------------- 
     32static void gui_read_draw_scroll_indicator() { 
     33    draw_txt_char(screen_width/FONT_WIDTH-2, 0, (conf.reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     34} 
    2235 
    2336//------------------------------------------------------------------- 
     
    3447        conf.reader_pos = 0; 
    3548    } 
     49    pause = 0; 
    3650    read_to_draw = 1; 
    3751    x=6;  
     
    4155    last_time = get_tick_count(); 
    4256     
     57    draw_filled_rect(0, 0, screen_width-1, y-1, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); 
    4358    draw_filled_rect(0, y, screen_width-1, screen_height-1, MAKE_COLOR((conf.reader_color>>8)&0xFF, (conf.reader_color>>8)&0xFF)); 
     59 
     60    gui_read_draw_scroll_indicator(); 
     61    gui_read_draw_batt(); 
    4462 
    4563    return (read_file >= 0); 
     
    5775    return (xx+rbf_char_width(ch) < x+w); 
    5876} 
     77 
    5978//------------------------------------------------------------------- 
    6079void gui_read_draw() { 
    61     if (conf.reader_autoscroll && get_tick_count()-last_time >= conf.reader_autoscroll_delay*1000 && (conf.reader_pos+read_on_screen)<read_file_size) { 
     80    if (conf.reader_autoscroll && !pause && get_tick_count()-last_time >= conf.reader_autoscroll_delay*1000 && (conf.reader_pos+read_on_screen)<read_file_size) { 
    6281        conf.reader_pos += read_on_screen; 
    6382        read_to_draw = 1; 
     
    107126        } 
    108127     
    109         sprintf(buffer, "(%3d%%) %d/%d%45s", (read_file_size)?(conf.reader_pos*100/read_file_size):0, conf.reader_pos, read_file_size, ""); 
     128        sprintf(buffer, "(%3d%%) %d/%d  ", (read_file_size)?(conf.reader_pos*100/read_file_size):0, conf.reader_pos, read_file_size); 
    110129        buffer[screen_width/FONT_WIDTH]=0; 
    111130        draw_txt_string(0, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     
    128147        last_time = get_tick_count(); 
    129148    } 
     149    gui_read_draw_batt(); 
    130150} 
    131151 
     
    152172        case KEY_SET: 
    153173            break; 
     174        case KEY_DISPLAY: 
     175            pause = !pause; 
     176            gui_read_draw_scroll_indicator(); 
     177            last_time = get_tick_count(); 
     178            break; 
    154179        case KEY_MENU: 
    155180            if (read_file >= 0) { 
  • branches/grand/core/gui_reversi.c

    r57 r128  
    55#include "gui.h" 
    66#include "gui_draw.h" 
     7#include "gui_batt.h" 
    78#include "gui_mbox.h" 
    89#include "gui_reversi.h" 
     
    401402        redrawstatus(); 
    402403    } 
     404 
     405    sprintf(buf, "Batt:%3d%%", get_batt_perc()); 
     406    draw_txt_string(screen_width/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     407 
    403408    Timer(); 
    404409} 
  • branches/grand/core/gui_sokoban.c

    r97 r128  
    66#include "gui.h" 
    77#include "gui_draw.h" 
     8#include "gui_batt.h" 
    89#include "gui_mbox.h" 
    910#include "gui_sokoban.h" 
     
    229230        } 
    230231    } 
    231 } 
    232  
     232 
     233    sprintf(str, "Batt:%3d%%", get_batt_perc()); 
     234    draw_txt_string(screen_width/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     235} 
     236 
  • branches/grand/core/raw.c

    r109 r128  
    3333 
    3434        t.actime = t.modtime = time(NULL); 
    35         v=get_file_next_counter(); 
    3635 
    37         sprintf(dir, RAW_TARGET_DIRECTORY, (conf.raw_in_dir)?((v>>18)&0x3FF):100); 
     36        sprintf(dir, RAW_TARGET_DIRECTORY, (conf.raw_in_dir)?get_target_dir_num():100); 
    3837        mkdir(dir); 
    3938 
    4039        sprintf(fn, "%s/", dir); 
    41         sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, prefixes[conf.raw_prefix], (v>>4)&0x3FFF, exts[conf.raw_ext]); 
     40        sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, prefixes[conf.raw_prefix], get_target_file_num(), exts[conf.raw_ext]); 
    4241 
    4342        fd = open(fn, O_WRONLY|O_CREAT, 0777); 
  • branches/grand/include/platform.h

    r126 r128  
    7575 
    7676long get_file_counter(); 
    77 long get_file_next_counter(); 
    78 long get_next_photo_dirfile_num(); 
     77long get_target_dir_num(); 
     78long get_target_file_num(); 
    7979 
    8080/******************************************************************/ 
  • branches/grand/lib/font/font_8x16_def.h

    r91 r128  
    5959        0x00, /* 00000000 */ 
    6060        0x00, /* 00000000 */ 
    61         0x6c, /* 01101100 */ 
    62         0xfe, /* 11111110 */ 
    63         0xfe, /* 11111110 */ 
    64         0xfe, /* 11111110 */ 
    65         0xfe, /* 11111110 */ 
    66         0x7c, /* 01111100 */ 
    67         0x38, /* 00111000 */ 
    68         0x10, /* 00010000 */ 
     61        0xff, /* 11111111 */ 
     62        0xff, /* 11111111 */ 
     63        0xff, /* 11111111 */ 
     64        0xff, /* 11111111 */ 
     65        0xff, /* 11111111 */ 
     66        0xff, /* 11111111 */ 
     67        0xff, /* 11111111 */ 
     68        0xff, /* 11111111 */ 
    6969        0x00, /* 00000000 */ 
    7070        0x00, /* 00000000 */ 
     
    7676        0x00, /* 00000000 */ 
    7777        0x00, /* 00000000 */ 
    78         0x00, /* 00000000 */ 
    79         0x10, /* 00010000 */ 
    80         0x38, /* 00111000 */ 
    81         0x7c, /* 01111100 */ 
    82         0xfe, /* 11111110 */ 
    83         0x7c, /* 01111100 */ 
    84         0x38, /* 00111000 */ 
    85         0x10, /* 00010000 */ 
    86         0x00, /* 00000000 */ 
     78        0x80, /* 10000000 */ 
     79        0xc0, /* 11000000 */ 
     80        0xf0, /* 11110000 */ 
     81        0xfc, /* 11111100 */ 
     82        0xff, /* 11111111 */ 
     83        0xfc, /* 11111100 */ 
     84        0xf0, /* 11110000 */ 
     85        0xc0, /* 11000000 */ 
     86        0x80, /* 10000000 */ 
    8787        0x00, /* 00000000 */ 
    8888        0x00, /* 00000000 */ 
     
    9494        0x00, /* 00000000 */ 
    9595        0x00, /* 00000000 */ 
    96         0x18, /* 00011000 */ 
    97         0x3c, /* 00111100 */ 
    98         0x3c, /* 00111100 */ 
     96        0x00, /* 00000000 */ 
    9997        0xe7, /* 11100111 */ 
    10098        0xe7, /* 11100111 */ 
    10199        0xe7, /* 11100111 */ 
    102         0x18, /* 00011000 */ 
    103         0x18, /* 00011000 */ 
    104         0x3c, /* 00111100 */ 
     100        0xe7, /* 11100111 */ 
     101        0xe7, /* 11100111 */ 
     102        0xe7, /* 11100111 */ 
     103        0xe7, /* 11100111 */ 
     104        0xe7, /* 11100111 */ 
    105105        0x00, /* 00000000 */ 
    106106        0x00, /* 00000000 */ 
  • branches/grand/lib/font/font_8x16_kbr.h

    r74 r128  
    5454    0x00, /* 00000000 */ 
    5555 
    56     /*   3  0x03  ' ' */ 
    57     0x00, /* 00000000 */ 
    58     0x00, /* 00000000 */ 
    59     0x6C, /* 01101100 */ 
    60     0xFE, /* 11111110 */ 
    61     0xFE, /* 11111110 */ 
    62     0xFE, /* 11111110 */ 
    63     0xFE, /* 11111110 */ 
    64     0xFE, /* 11111110 */ 
    65     0xFE, /* 11111110 */ 
    66     0x7C, /* 01111100 */ 
    67     0x38, /* 00111000 */ 
    68     0x10, /* 00010000 */ 
    69     0x00, /* 00000000 */ 
    70     0x00, /* 00000000 */ 
    71     0x00, /* 00000000 */ 
    72     0x00, /* 00000000 */ 
    73  
    74     /*   4  0x04  ' ' */ 
    75     0x00, /* 00000000 */ 
    76     0x00, /* 00000000 */ 
    77     0x00, /* 00000000 */ 
    78     0x00, /* 00000000 */ 
    79     0x10, /* 00010000 */ 
    80     0x38, /* 00111000 */ 
    81     0x7C, /* 01111100 */ 
    82     0xFE, /* 11111110 */ 
    83     0x7C, /* 01111100 */ 
    84     0x38, /* 00111000 */ 
    85     0x10, /* 00010000 */ 
    86     0x00, /* 00000000 */ 
    87     0x00, /* 00000000 */ 
    88     0x00, /* 00000000 */ 
    89     0x00, /* 00000000 */ 
    90     0x00, /* 00000000 */ 
    91  
    92     /*   5  0x05  ' ' */ 
    93     0x00, /* 00000000 */ 
    94     0x00, /* 00000000 */ 
    95     0x00, /* 00000000 */ 
    96     0x18, /* 00011000 */ 
    97     0x3C, /* 00111100 */ 
    98     0x3C, /* 00111100 */ 
    99     0xE7, /* 11100111 */ 
    100     0xE7, /* 11100111 */ 
    101     0xE7, /* 11100111 */ 
    102     0x18, /* 00011000 */ 
    103     0x18, /* 00011000 */ 
    104     0x3C, /* 00111100 */ 
     56    /* 3 0x03 '^C' */ 
     57    0x00, /* 00000000 */ 
     58    0x00, /* 00000000 */ 
     59    0x00, /* 00000000 */ 
     60    0x00, /* 00000000 */ 
     61    0xff, /* 11111111 */ 
     62    0xff, /* 11111111 */ 
     63    0xff, /* 11111111 */ 
     64    0xff, /* 11111111 */ 
     65    0xff, /* 11111111 */ 
     66    0xff, /* 11111111 */ 
     67    0xff, /* 11111111 */ 
     68    0xff, /* 11111111 */ 
     69    0x00, /* 00000000 */ 
     70    0x00, /* 00000000 */ 
     71    0x00, /* 00000000 */ 
     72    0x00, /* 00000000 */ 
     73 
     74    /* 4 0x04 '^D' */ 
     75    0x00, /* 00000000 */ 
     76    0x00, /* 00000000 */ 
     77    0x00, /* 00000000 */ 
     78    0x80, /* 10000000 */ 
     79    0xc0, /* 11000000 */ 
     80    0xf0, /* 11110000 */ 
     81    0xfc, /* 11111100 */ 
     82    0xff, /* 11111111 */ 
     83    0xfc, /* 11111100 */ 
     84    0xf0, /* 11110000 */ 
     85    0xc0, /* 11000000 */ 
     86    0x80, /* 10000000 */ 
     87    0x00, /* 00000000 */ 
     88    0x00, /* 00000000 */ 
     89    0x00, /* 00000000 */ 
     90    0x00, /* 00000000 */ 
     91 
     92    /* 5 0x05 '^E' */ 
     93    0x00, /* 00000000 */ 
     94    0x00, /* 00000000 */ 
     95    0x00, /* 00000000 */ 
     96    0x00, /* 00000000 */ 
     97    0xe7, /* 11100111 */ 
     98    0xe7, /* 11100111 */ 
     99    0xe7, /* 11100111 */ 
     100    0xe7, /* 11100111 */ 
     101    0xe7, /* 11100111 */ 
     102    0xe7, /* 11100111 */ 
     103    0xe7, /* 11100111 */ 
     104    0xe7, /* 11100111 */ 
    105105    0x00, /* 00000000 */ 
    106106    0x00, /* 00000000 */ 
  • branches/grand/lib/font/font_8x16_rus.h

    r92 r128  
    5454    0x00, /* 00000000 */ 
    5555 
    56     /*   3  0x03  ' ' */ 
    57     0x00, /* 00000000 */ 
    58     0x00, /* 00000000 */ 
    59     0x00, /* 00000000 */ 
    60     0x00, /* 00000000 */ 
    61     0x00, /* 00000000 */ 
    62     0x44, /* 01000100 */ 
    63     0xEE, /* 11101110 */ 
    64     0xFE, /* 11111110 */ 
    65     0xFE, /* 11111110 */ 
    66     0x7C, /* 01111100 */ 
    67     0x38, /* 00111000 */ 
    68     0x10, /* 00010000 */ 
    69     0x00, /* 00000000 */ 
    70     0x00, /* 00000000 */ 
    71     0x00, /* 00000000 */ 
    72     0x00, /* 00000000 */ 
    73  
    74     /*   4  0x04  ' ' */ 
    75     0x00, /* 00000000 */ 
    76     0x00, /* 00000000 */ 
    77     0x00, /* 00000000 */ 
    78     0x00, /* 00000000 */ 
    79     0x00, /* 00000000 */ 
    80     0x10, /* 00010000 */ 
    81     0x38, /* 00111000 */ 
    82     0x7C, /* 01111100 */ 
    83     0xFE, /* 11111110 */ 
    84     0x7C, /* 01111100 */ 
    85     0x38, /* 00111000 */ 
    86     0x10, /* 00010000 */ 
    87     0x00, /* 00000000 */ 
    88     0x00, /* 00000000 */ 
    89     0x00, /* 00000000 */ 
    90     0x00, /* 00000000 */ 
    91  
    92     /*   5  0x05  ' ' */ 
    93     0x00, /* 00000000 */ 
    94     0x00, /* 00000000 */ 
    95     0x00, /* 00000000 */ 
    96     0x00, /* 00000000 */ 
    97     0x18, /* 00011000 */ 
    98     0x3C, /* 00111100 */ 
    99     0x3C, /* 00111100 */ 
    100     0xE7, /* 11100111 */ 
    101     0xE7, /* 11100111 */ 
    102     0xE7, /* 11100111 */ 
    103     0x3C, /* 00111100 */ 
    104     0x18, /* 00011000 */ 
    105     0x3C, /* 00111100 */ 
     56    /* 3 0x03 '^C' */ 
     57    0x00, /* 00000000 */ 
     58    0x00, /* 00000000 */ 
     59    0x00, /* 00000000 */ 
     60    0x00, /* 00000000 */ 
     61    0xff, /* 11111111 */ 
     62    0xff, /* 11111111 */ 
     63    0xff, /* 11111111 */ 
     64    0xff, /* 11111111 */ 
     65    0xff, /* 11111111 */ 
     66    0xff, /* 11111111 */ 
     67    0xff, /* 11111111 */ 
     68    0xff, /* 11111111 */ 
     69    0x00, /* 00000000 */ 
     70    0x00, /* 00000000 */ 
     71    0x00, /* 00000000 */ 
     72    0x00, /* 00000000 */ 
     73 
     74    /* 4 0x04 '^D' */ 
     75    0x00, /* 00000000 */ 
     76    0x00, /* 00000000 */ 
     77    0x00, /* 00000000 */ 
     78    0x80, /* 10000000 */ 
     79    0xc0, /* 11000000 */ 
     80    0xf0, /* 11110000 */ 
     81    0xfc, /* 11111100 */ 
     82    0xff, /* 11111111 */ 
     83    0xfc, /* 11111100 */ 
     84    0xf0, /* 11110000 */ 
     85    0xc0, /* 11000000 */ 
     86    0x80, /* 10000000 */ 
     87    0x00, /* 00000000 */ 
     88    0x00, /* 00000000 */ 
     89    0x00, /* 00000000 */ 
     90    0x00, /* 00000000 */ 
     91 
     92    /* 5 0x05 '^E' */ 
     93    0x00, /* 00000000 */ 
     94    0x00, /* 00000000 */ 
     95    0x00, /* 00000000 */ 
     96    0x00, /* 00000000 */ 
     97    0xe7, /* 11100111 */ 
     98    0xe7, /* 11100111 */ 
     99    0xe7, /* 11100111 */ 
     100    0xe7, /* 11100111 */ 
     101    0xe7, /* 11100111 */ 
     102    0xe7, /* 11100111 */ 
     103    0xe7, /* 11100111 */ 
     104    0xe7, /* 11100111 */ 
     105    0x00, /* 00000000 */ 
    106106    0x00, /* 00000000 */ 
    107107    0x00, /* 00000000 */ 
  • branches/grand/lib/font/font_8x16_uni.h

    r74 r128  
    5454    0x00, /* 00000000 */ 
    5555 
    56     /*   3  0x03  ' ' */ 
    57     0x00, /* 00000000 */ 
    58     0x00, /* 00000000 */ 
    59     0x66, /* 01100110 */ 
    60     0xFF, /* 11111111 */ 
    61     0xFF, /* 11111111 */ 
    62     0xFF, /* 11111111 */ 
    63     0xFF, /* 11111111 */ 
    64     0x7E, /* 01111110 */ 
    65     0x7E, /* 01111110 */ 
    66     0x3C, /* 00111100 */ 
    67     0x18, /* 00011000 */ 
    68     0x18, /* 00011000 */ 
    69     0x00, /* 00000000 */ 
    70     0x00, /* 00000000 */ 
    71     0x00, /* 00000000 */ 
    72     0x00, /* 00000000 */ 
    73  
    74     /*   4  0x04  ' ' */ 
    75     0x00, /* 00000000 */ 
    76     0x00, /* 00000000 */ 
    77     0x00, /* 00000000 */ 
    78     0x00, /* 00000000 */ 
    79     0x18, /* 00011000 */ 
    80     0x3C, /* 00111100 */ 
    81     0x7E, /* 01111110 */ 
    82     0xFF, /* 11111111 */ 
    83     0x7E, /* 01111110 */ 
    84     0x3C, /* 00111100 */ 
    85     0x18, /* 00011000 */ 
    86     0x00, /* 00000000 */ 
    87     0x00, /* 00000000 */ 
    88     0x00, /* 00000000 */ 
    89     0x00, /* 00000000 */ 
    90     0x00, /* 00000000 */ 
    91  
    92     /*   5  0x05  ' ' */ 
    93     0x00, /* 00000000 */ 
    94     0x00, /* 00000000 */ 
    95     0x3C, /* 00111100 */ 
    96     0x3C, /* 00111100 */ 
    97     0x18, /* 00011000 */ 
    98     0xFF, /* 11111111 */ 
    99     0xFF, /* 11111111 */ 
    100     0xDB, /* 11011011 */ 
    101     0x18, /* 00011000 */ 
    102     0x18, /* 00011000 */ 
    103     0x3C, /* 00111100 */ 
    104     0x3C, /* 00111100 */ 
     56    /* 3 0x03 '^C' */ 
     57    0x00, /* 00000000 */ 
     58    0x00, /* 00000000 */ 
     59    0x00, /* 00000000 */ 
     60    0x00, /* 00000000 */ 
     61    0xff, /* 11111111 */ 
     62    0xff, /* 11111111 */ 
     63    0xff, /* 11111111 */ 
     64    0xff, /* 11111111 */ 
     65    0xff, /* 11111111 */ 
     66    0xff, /* 11111111 */ 
     67    0xff, /* 11111111 */ 
     68    0xff, /* 11111111 */ 
     69    0x00, /* 00000000 */ 
     70    0x00, /* 00000000 */ 
     71    0x00, /* 00000000 */ 
     72    0x00, /* 00000000 */ 
     73 
     74    /* 4 0x04 '^D' */ 
     75    0x00, /* 00000000 */ 
     76    0x00, /* 00000000 */ 
     77    0x00, /* 00000000 */ 
     78    0x80, /* 10000000 */ 
     79    0xc0, /* 11000000 */ 
     80    0xf0, /* 11110000 */ 
     81    0xfc, /* 11111100 */ 
     82    0xff, /* 11111111 */ 
     83    0xfc, /* 11111100 */ 
     84    0xf0, /* 11110000 */ 
     85    0xc0, /* 11000000 */ 
     86    0x80, /* 10000000 */ 
     87    0x00, /* 00000000 */ 
     88    0x00, /* 00000000 */ 
     89    0x00, /* 00000000 */ 
     90    0x00, /* 00000000 */ 
     91 
     92    /* 5 0x05 '^E' */ 
     93    0x00, /* 00000000 */ 
     94    0x00, /* 00000000 */ 
     95    0x00, /* 00000000 */ 
     96    0x00, /* 00000000 */ 
     97    0xe7, /* 11100111 */ 
     98    0xe7, /* 11100111 */ 
     99    0xe7, /* 11100111 */ 
     100    0xe7, /* 11100111 */ 
     101    0xe7, /* 11100111 */ 
     102    0xe7, /* 11100111 */ 
     103    0xe7, /* 11100111 */ 
     104    0xe7, /* 11100111 */ 
    105105    0x00, /* 00000000 */ 
    106106    0x00, /* 00000000 */ 
  • branches/grand/platform/a610/shooting.c

    r109 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return ((get_file_counter()>>4)+1)<<4; 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return ((get_file_counter()>>4)+1)<<4; 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    if (get_target_file_num()%100 == 1) ++n; 
     23    return n; 
     24} 
  • branches/grand/platform/a610/sub/100f/stubs_entry.S

    r109 r128  
    1515NSTUB(GetCurrentAvValue, 0xffe7169c) 
    1616// ALT: NSTUB(GetCurrentAvValue, 0xffe73a9c) // 13/0 
     17NSTUB(GetCurrentTargetDistance, 0xffe73a44) 
    1718NSTUB(GetFocusLensSubjectDistance, 0xffe66b78) 
    1819NSTUB(GetParameterData, 0xffd4e684) 
  • branches/grand/platform/a620/shooting.c

    r109 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return ((get_file_counter()>>4)+1)<<4; 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return ((get_file_counter()>>4)+1)<<4; 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    if (get_target_file_num()%100 == 1) ++n; 
     23    return n; 
     24} 
  • branches/grand/platform/a620/sub/100f/stubs_entry.S

    r109 r128  
    1515NSTUB(GetCurrentAvValue, 0xffe77ff0) 
    1616// ALT: NSTUB(GetCurrentAvValue, 0xffe7a3f0) // 13/0 
     17NSTUB(GetCurrentTargetDistance, 0xffe7a398) 
    1718// Best match: 96% 
    1819NSTUB(GetFocusLensSubjectDistance, 0xffe6d4ac) 
  • branches/grand/platform/a630/shooting.c

    r109 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return get_file_counter(); 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return get_file_counter(); 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    return n; 
     23} 
  • branches/grand/platform/a630/sub/100c/stubs_entry.S

    r109 r128  
    1717// ALT: NSTUB(GetCurrentAvValue, 0xffea70f4) // 13/0 
    1818// ALT: NSTUB(GetCurrentAvValue, 0xffea9528) // 13/0 
     19NSTUB(GetCurrentTargetDistance, 0xffea94d0) 
    1920// Best match: 96% 
    2021NSTUB(GetFocusLensSubjectDistance, 0xffe9b4fc) 
  • branches/grand/platform/a640/shooting.c

    r109 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return get_file_counter(); 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return get_file_counter(); 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    return n; 
     23} 
  • branches/grand/platform/a640/sub/100b/stubs_entry.S

    r109 r128  
    1616// ALT: NSTUB(GetCurrentAvValue, 0xffeb0ac0) // 13/0 
    1717// ALT: NSTUB(GetCurrentAvValue, 0xffeb2f20) // 13/0 
     18NSTUB(GetCurrentTargetDistance, 0xffeb2ec8) 
    1819// Best match: 96% 
    1920NSTUB(GetFocusLensSubjectDistance, 0xffea4e74) 
  • branches/grand/platform/a710/shooting.c

    r109 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return get_file_counter(); 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return get_file_counter(); 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    return n; 
     23} 
  • branches/grand/platform/a710/sub/100a/stubs_entry.S

    r109 r128  
    1616// ALT: NSTUB(GetCurrentAvValue, 0xffeb3e48) // 13/0 
    1717// ALT: NSTUB(GetCurrentAvValue, 0xffeb628c) // 13/0 
     18NSTUB(GetCurrentTargetDistance, 0xffeb6234) 
    1819NSTUB(GetFocusLensSubjectDistance, 0xffea2f3c) 
    1920NSTUB(GetParameterData, 0xffd76090) 
  • branches/grand/platform/s3is/kbd.c

    r125 r128  
    215215        { 0, KEY_SHOOT_HALF     , 0x00000001 }, 
    216216        { 1, KEY_ZOOM_IN        , 0x10000000 }, 
    217         { 1, KEY_ZOOM_IN        , 0x08000000 }, 
     217        { 1, KEY_ZOOM_IN        , 0x18000000 }, 
    218218        { 1, KEY_ZOOM_OUT       , 0x01000000 }, 
    219219        { 1, KEY_ZOOM_OUT       , 0x05000000 }, 
     
    221221        { 1, KEY_DISPLAY        , 0x00002000 }, 
    222222        { 1, KEY_PRINT          , 0x00004000 }, 
    223         { 1, KEY_ERASE          , 0x04000000 }, 
     223        { 1, KEY_ERASE          , 0x00400000 }, 
    224224        { 0, 0, 0 } 
    225225}; 
  • branches/grand/platform/s3is/shooting.c

    r125 r128  
    33#include "../generic/shooting.c" 
    44 
    5 long get_next_photo_dirfile_num() 
    6 { 
    7     long tmp; 
    8     long dirnum, filenum; 
    9  
    10     tmp = get_file_next_counter(); 
    11  
    12     dirnum = (tmp>>18)&0x3FF; 
    13     filenum = ((tmp>>4)&0x3FFF); 
    14  
    15     if ((filenum % 100) == 0){ 
    16         dirnum++; 
    17     } 
    18  
    19     return (dirnum << 16) | (filenum); 
     5static long get_file_next_counter() { 
     6    return get_file_counter(); 
    207} 
    218 
    22 long get_file_next_counter() 
    23 { 
    24     return get_file_counter(); 
     9long get_target_file_num() { 
     10    long n; 
     11     
     12    n = get_file_next_counter(); 
     13    n = (n>>4)&0x3FFF; 
     14    return n; 
    2515} 
     16 
     17long get_target_dir_num() { 
     18    long n; 
     19     
     20    n = get_file_next_counter(); 
     21    n = (n>>18)&0x3FF; 
     22    return n; 
     23} 
Note: See TracChangeset for help on using the changeset viewer.