Changeset 1333

Show
Ignore:
Timestamp:
09/11/11 11:27:58 (21 months ago)
Author:
philmoz
Message:

Updated development branch.

Location:
branches/philmoz
Files:
27 removed
103 modified
117 copied

Legend:

Unmodified
Added
Removed
  • branches/philmoz

  • branches/philmoz/Makefile

    r1321 r1333  
    1515 
    1616distclean: distclean-recursive 
     17 
     18# Define the lists of cameras / firmware versions with a BETA status 
     19# This is a list of cameras for which ALL firmware versions are BETA 
     20BETA_CAMERA="sx1 a1100 a2000 ixus90_sd790 g11 s90 ixus100_sd780 ixus120_sd940 ixus200_sd980 ixus85_sd770 d10 ixus95_sd1200 a430 s95 a490 a495 ixus300_sd4000 sx220hs sx230hs sx130is ixus310_elph500hs" 
     21# If specific firmware version(s) for a camera are BETA; but others are not 
     22# then define the BETA versions here - e.g. g12-100c 
     23BETA_CAMERA_FW="ixus750_sd550-100h" 
     24 
     25# Set the BETA status for the current camera/firmware being built 
     26STATE= 
     27ifneq (,$(findstring $(PLATFORM),$(BETA_CAMERA))) 
     28        STATE=_BETA 
     29endif 
     30ifneq (,$(findstring $(PLATFORM)-$(PLATFORMSUB),$(BETA_CAMERA_FW))) 
     31        STATE=_BETA 
     32endif 
    1733 
    1834.PHONY: fir 
     
    90106  endif 
    91107endif 
    92 # if COPY_TO is defined the copy this camera/firmware version to the copied firmware version 
     108# if COPY_TO is defined then copy this camera/firmware version to the copied firmware version 
    93109ifdef COPY_TO 
    94110        cp $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)$(STATE).zip $(topdir)bin/$(VER)-$(PLATFORM)-$(COPY_TO)-$(BUILD_NUMBER)$(STATE).zip 
     
    145161  endif 
    146162endif 
    147 # if COPY_TO is defined the copy this camera/firmware version to the copied firmware version 
     163# if COPY_TO is defined then copy this camera/firmware version to the copied firmware version 
    148164ifdef COPY_TO 
    149165        cp $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full$(STATE).zip $(topdir)bin/$(PLATFORM)-$(COPY_TO)-$(BUILD_NUMBER)-full$(STATE).zip 
  • branches/philmoz/core/dng.c

    r1320 r1333  
    5151 {0x8298, T_ASCII,     1,  0}, // Copyright 
    5252 {0x8769, T_LONG,      1,  0}, //EXIF_IFD offset 
     53#if defined(OPT_GPS) 
     54 {0x8825, T_LONG,      1,  0}, //GPS_IFD offset 
     55#endif 
    5356 {0x9216, T_BYTE,      4,  0x00000001},  // TIFF/EPStandardID: 1.0.0.0 
    5457 {0xC612, T_BYTE,      4,  0x00000101}, //DNGVersion: 1.1.0.0 
     
    111114 
    112115 
     116#if defined(OPT_GPS) 
     117struct dir_entry GPS_IFD[]={ 
     118// {0x0000, T_BYTE,      4,  0x00000302}, //GPSVersionID: 2 3 0 0 
     119 {0x0001, T_ASCII,     2,  0}, //North or South Latitude "N\0" or "S\0" 
     120 {0x0002, T_RATIONAL,  3,  0}, //Latitude 
     121 {0x0003, T_ASCII,     2,  0}, //East or West Latitude "E\0" or "W\0" 
     122 {0x0004, T_RATIONAL,  3,  0}, //Longitude 
     123 {0x0005, T_ASCII,     2,  0}, //AltitudeRef 
     124 {0x0006, T_RATIONAL,  3,  0}, //Altitude 
     125 {0x0007, T_RATIONAL,  3,  0}, //TimeStamp 
     126 {0x0009, T_ASCII,     2,  0}, //Status 
     127// {0x000A, T_ASCII,     1,  0}, //MeasureMode 
     128 {0x0012, T_ASCII,     8,  0}, //MapDatum 7 + 1 pad byte 
     129 {0x001D, T_ASCII,    12,  0}, //DateStamp 11 + 1 pad byte 
     130 {0} 
     131}; 
     132#endif 
     133 
     134 
    113135int get_type_size(int type){ 
    114136 switch(type){ 
     
    129151} 
    130152 
     153#if defined(OPT_GPS) 
     154struct {struct dir_entry* entry; int count;} IFD_LIST[]={{IFD0,0}, {IFD1,0}, {EXIF_IFD,0}, {GPS_IFD, 0}}; 
     155#else 
    131156struct {struct dir_entry* entry; int count;} IFD_LIST[]={{IFD0,0}, {IFD1,0}, {EXIF_IFD,0}}; 
     157#endif 
    132158 
    133159#define IFDs (sizeof(IFD_LIST)/sizeof(IFD_LIST[0])) 
     
    150176 
    151177 // filling EXIF fields 
     178   
     179#if defined(OPT_GPS) 
     180typedef struct { 
     181    int latitudeRef; 
     182    int latitude[6]; 
     183    int longitudeRef; 
     184    int longitude[6]; 
     185    int heightRef; 
     186    int height[2]; 
     187    int timeStamp[6]; 
     188    short status; 
     189    char mapDatum[7]; 
     190    char dateStamp[11]; 
     191    char unknown2[260]; 
     192} tGPS; 
     193tGPS gps; 
     194 
     195get_property_case(PROPCASE_GPS, &gps, sizeof(tGPS)); 
     196#endif 
    152197 
    153198 for (j=0;j<IFDs;j++) { 
     
    169214     case 0x9201: IFD_LIST[j].entry[i].offset=(int)get_shutter_speed_for_exif(exif_data->tv); break; // ShutterSpeedValue 
    170215     case 0x9202: IFD_LIST[j].entry[i].offset=(int)get_aperture_for_exif(exif_data->av); break; // ApertureValue 
     216#if defined(OPT_GPS) 
     217     case 0x0001: IFD_LIST[j].entry[i].offset=gps.latitudeRef; break; 
     218     case 0x0002: IFD_LIST[j].entry[i].offset=(int)&(gps.latitude); break; 
     219     case 0x0003: IFD_LIST[j].entry[i].offset=gps.longitudeRef; break; 
     220     case 0x0004: IFD_LIST[j].entry[i].offset=(int)&(gps.longitude); break; 
     221     case 0x0005: IFD_LIST[j].entry[i].offset=gps.heightRef; break; 
     222     case 0x0006: IFD_LIST[j].entry[i].offset=(int)&(gps.height); break; 
     223     case 0x0007: IFD_LIST[j].entry[i].offset=(int)&(gps.timeStamp); break; 
     224     case 0x0009: IFD_LIST[j].entry[i].offset=(int)gps.status; break; 
     225     case 0x0012: IFD_LIST[j].entry[i].offset=(int)&(gps.mapDatum); break; 
     226     case 0x001D: IFD_LIST[j].entry[i].offset=(int)&(gps.dateStamp); break; 
     227#endif 
    171228    } 
    172229  } 
     
    204261  for(i=0; IFD_LIST[j].entry[i].tag; i++) { 
    205262   if (IFD_LIST[j].entry[i].tag==0x8769) IFD_LIST[j].entry[i].offset=TIFF_HDR_SIZE+(IFD_LIST[0].count+IFD_LIST[1].count)*12+6+6;  // EXIF IFD offset 
     263#if defined(OPT_GPS) 
     264   if (IFD_LIST[j].entry[i].tag==0x8825) IFD_LIST[j].entry[i].offset=TIFF_HDR_SIZE+(IFD_LIST[0].count+IFD_LIST[1].count+IFD_LIST[2].count)*12+6+6+6;  // GPS IFD offset 
     265#endif 
    206266   if (IFD_LIST[j].entry[i].tag==0x14A)  IFD_LIST[j].entry[i].offset=TIFF_HDR_SIZE+IFD_LIST[0].count*12+6; // SubIFDs offset 
    207267   if (IFD_LIST[j].entry[i].tag==0x111)  { 
  • branches/philmoz/core/gui.c

    r1321 r1333  
    14001400    static const char* names[]={ "Print", "Display"}; 
    14011401    static const int keys[] = {KEY_PRINT, KEY_DISPLAY}; 
    1402 #elif defined(CAMERA_sx220hs) 
     1402#elif defined(CAMERA_sx220hs) || defined(CAMERA_sx230hs) 
    14031403    static const char* names[]={ "Disp+Set", "Display", "Playback", "Video"}; 
    14041404    static const int keys[] = {KEY_PRINT, KEY_DISPLAY, KEY_PLAYBACK, KEY_VIDEO}; 
  • branches/philmoz/core/gui_4wins.c

    r674 r1333  
    1 //Conect4: Kettmeister, CHDKLover german forum (www.wirklemms.de) 
     1//Conect4: Kettmeister, CHDKLover german forum (forum.chdk-treff.de) 
    22#include "stdlib.h" 
    33#include "keyboard.h" 
     
    1515 
    1616#define BORDER           20 
     17#define XBORDER          (CAM_TS_BUTTON_BORDER+BORDER) 
    1718#define RECT_SIZE        30 
    1819#define BORDER_TOP       RECT_SIZE 
    1920#define FIELD_HEIGHT 7 
    2021#define FIELD_WIDTH      7 
    21 #define P1_COLOR         MAKE_COLOR(0x23,0x23) 
    22 #define P2_COLOR         MAKE_COLOR(0x16,0x16) 
    23 #define BG_COLOR         MAKE_COLOR(0xDE,0xDE) 
    24 #define FIELD_COLOR      MAKE_COLOR(0xAA,0xAA)//(f�llfarbe,rand) 
     22#define P1_COLOR         MAKE_COLOR(COLOR_HISTO_B_PLAY,COLOR_HISTO_B_PLAY) 
     23#define P2_COLOR         MAKE_COLOR(COLOR_HISTO_G_PLAY,COLOR_HISTO_G_PLAY) 
     24#define BG_COLOR         MAKE_COLOR(COLOR_GREY,COLOR_GREY) 
     25#define FIELD_COLOR      MAKE_COLOR(COLOR_SPLASH_GREY,COLOR_SPLASH_GREY)//(f�llfarbe,rand) 
    2526#define TEXT_COLOR   MAKE_COLOR(BG_COLOR, COLOR_WHITE) 
    26 #define INFO_COLOR   MAKE_COLOR(0xEF, 0xEF) 
     27#define INFO_COLOR   MAKE_COLOR(COLOR_SPLASH_GREY, COLOR_SPLASH_GREY) 
    2728#define INFO_TEXT_COLOR   MAKE_COLOR(INFO_COLOR, COLOR_WHITE) 
    2829 
     
    5253                for(i=1;field[column-1][i];i++);                        //1 ist wichtig (0=Fundament) 
    5354                if (visible) { 
    54                         draw_filled_ellipse((BORDER+((column-1)*RECT_SIZE))+15, (BORDER+((6-i)*RECT_SIZE))+15+BORDER_TOP, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
     55                        draw_filled_ellipse((XBORDER+((column-1)*RECT_SIZE))+15, (BORDER+((6-i)*RECT_SIZE))+15+BORDER_TOP, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
    5556                } 
    5657                field[column-1][i]=player; 
     
    7273 
    7374char ki_3(char player) { 
    74   int i,j,a; 
     75  int i,j; 
    7576  //waagerecht und Diagonal (�ber Anstieg) 
    7677  for(i=0;i<=3;i++){            // column 
     
    106107 
    107108char ki_2(char player) { 
    108   int i,j,a; 
     109  int i,j; 
    109110  //waagerecht und Diagonal �ber Anstieg 
    110111  for(i=0;i<=3;i++){            //column 
     
    140141char ki_findColumn(char mode, char player) {                                                    //player = 1|2 
    141142  char erg=0, cam=player, otherplayer, i, counter=0; 
    142   static char str[64]; 
    143143  otherplayer=(player==1)?2:1; 
    144144  switch(mode) { 
     
    154154                unset_stone(i); 
    155155              } else badColumns[i-1]=9;                                                         //9=full 
    156 //              sprintf(str,"%d %d %d %d %d %d %d",badColumns[0],badColumns[1],badColumns[2],badColumns[3],badColumns[4],badColumns[5],badColumns[6]); 
    157 //              draw_txt_string(30, 3, str, TEXT_COLOR); 
    158156            } 
    159157          } else break; 
    160158          erg=ki_2(cam);                                                                                                //ich2 (f�r passivere Methode vertauschen) 
    161159          if(!erg) erg=ki_2(otherplayer); else break;                                   //du2 
    162           if(!erg) erg=(!isFull(4)&&!ki_isBadColumn(4))?4:0; else break;        //mitte 
     160          if(!erg) erg=(!isFull(4)&&!ki_isBadColumn(4))?4:0; else break;//mitte 
    163161          if(!erg) do erg=(rand()%7)+1; while((isFull(erg)||erg==0||ki_isBadColumn(erg))&&counter++<100);       //zufall 
    164162          if(counter>100) for(i=1;i<=7;i++) if(!isFull(i)) erg=i; 
     
    175173    w=l*FONT_WIDTH+10; 
    176174 
    177     x = (screen_width-w)>>1; y = ((screen_height)>>1); 
     175    x = (screen_width-CAM_TS_BUTTON_BORDER-w)>>1; y = ((screen_height)>>1); 
    178176    draw_filled_round_rect(x, y, x+w, y+FONT_HEIGHT+6, MAKE_COLOR(COLOR_RED, COLOR_RED)); 
    179177    draw_string(x+((w-strlen(text)*FONT_WIDTH)>>1), y+4, text, cl); 
     
    183181{ 
    184182        if (cur_player==1) cur_player=2; else cur_player=1; 
    185         draw_filled_ellipse((BORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
     183        draw_filled_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
    186184} 
    187185//------------------------------------------------------------------- 
     
    240238void draw_mode() 
    241239{ 
    242         draw_txt_string(30, 4, "            ", TEXT_COLOR); 
     240    int x = (CAM_TS_BUTTON_BORDER/FONT_WIDTH) + 30; 
     241        draw_txt_string(x, 4, "            ", TEXT_COLOR); 
    243242        if (mode_rival==1) 
    244                 draw_txt_string(30, 4, lang_str(LANG_CONNECT4_HUMAN), TEXT_COLOR); 
     243                draw_txt_string(x, 4, lang_str(LANG_CONNECT4_HUMAN), TEXT_COLOR); 
    245244        else 
    246                 draw_txt_string(30, 4, PLATFORM, TEXT_COLOR); 
     245                draw_txt_string(x, 4, PLATFORM, TEXT_COLOR); 
    247246} 
    248247//------------------------------------------------------------------- 
     
    276275static void move_cursor(int in_x_pos) 
    277276{ 
    278         draw_filled_ellipse((BORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10,BG_COLOR); 
     277        draw_filled_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10,BG_COLOR); 
    279278        if(in_game) 
    280279        { 
     
    291290                        cursor_position=(cursor_position+in_x_pos)%8; 
    292291        } 
    293         draw_filled_ellipse((BORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
     292        draw_filled_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR); 
    294293} 
    295294//------------------------------------------------------------------- 
     
    303302        srand(time(NULL)); 
    304303         
    305         draw_filled_rect(0, 0, 360, 240, BG_COLOR);             // draw backgraund 
    306         draw_filled_rect(BORDER, BORDER+BORDER_TOP, BORDER+(7*RECT_SIZE), BORDER+(6*RECT_SIZE)+BORDER_TOP, FIELD_COLOR); 
    307         draw_filled_round_rect(240, 90, 360-BORDER, 240-10, INFO_COLOR); 
    308     draw_txt_string(12, 0, lang_str(LANG_MENU_GAMES_CONNECT4), TEXT_COLOR); 
    309     draw_line(0,15,360,15,0xEF); 
     304        draw_filled_rect(0, 0, screen_width, screen_height, BG_COLOR);          // draw backgraund 
     305        draw_filled_rect(XBORDER, BORDER+BORDER_TOP, XBORDER+(7*RECT_SIZE), BORDER+(6*RECT_SIZE)+BORDER_TOP, FIELD_COLOR); 
     306        draw_filled_round_rect(CAM_TS_BUTTON_BORDER+240, 90, CAM_TS_BUTTON_BORDER+360-BORDER, 240-10, INFO_COLOR); 
     307    draw_txt_string((CAM_TS_BUTTON_BORDER/FONT_WIDTH)+12, 0, lang_str(LANG_MENU_GAMES_CONNECT4), TEXT_COLOR); 
     308    draw_line(CAM_TS_BUTTON_BORDER,15,CAM_TS_BUTTON_BORDER+360,15,COLOR_SPLASH_GREY); 
    310309 
    311310        for(i=0;i<7;i++) 
     
    314313                { 
    315314                        field[i][j+1]=0; 
    316                         draw_filled_ellipse(BORDER+(i*RECT_SIZE)+(RECT_SIZE/2), BORDER+(j*RECT_SIZE)+(RECT_SIZE/2)+BORDER_TOP, 10, 10, BG_COLOR); 
     315                        draw_filled_ellipse(XBORDER+(i*RECT_SIZE)+(RECT_SIZE/2), BORDER+(j*RECT_SIZE)+(RECT_SIZE/2)+BORDER_TOP, 10, 10, BG_COLOR); 
    317316                } 
    318317        } 
     
    323322 
    324323        move_cursor(0); 
    325         draw_txt_string(30, 3, lang_str(LANG_CONNECT4_RIVAL), TEXT_COLOR); 
     324        draw_txt_string((CAM_TS_BUTTON_BORDER/FONT_WIDTH)+30, 3, lang_str(LANG_CONNECT4_RIVAL), TEXT_COLOR); 
    326325    sprintf(str, "%d",count_win[0]); 
    327         draw_txt_string(screen_width/FONT_WIDTH-2-10, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P1_COLOR)); 
     326        draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-10, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P1_COLOR)); 
    328327    sprintf(str, ":"); 
    329         draw_txt_string(screen_width/FONT_WIDTH-2-7, screen_height/FONT_HEIGHT-9, str, INFO_TEXT_COLOR); 
     328        draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-7, screen_height/FONT_HEIGHT-9, str, INFO_TEXT_COLOR); 
    330329    sprintf(str, "%d",count_win[1]); 
    331         draw_txt_string(screen_width/FONT_WIDTH-2-4, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P2_COLOR)); 
     330        draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-4, screen_height/FONT_HEIGHT-9, str, MAKE_COLOR(INFO_COLOR, P2_COLOR)); 
    332331        draw_mode(); 
    333332        if(cur_player==2&&!mode_rival) set(); 
  • branches/philmoz/core/gui_calendar.c

    r1024 r1333  
    6363 
    6464    draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    65     draw_txt_string(1, 0, lang_str(LANG_CALENDAR_TODAY), MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     65    draw_txt_string((CAM_TS_BUTTON_BORDER/FONT_WIDTH)+1, 0, lang_str(LANG_CALENDAR_TODAY), MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    6666    draw_rect(cal_x-3, cal_y-3, cal_x+cal_w+2, cal_y+cal_h+2, CALENDAR_COLOR); 
    6767    draw_filled_rect(cal_x-1, cal_y-1, cal_x+cal_w, cal_y+FONT_HEIGHT+8, TITLE_COLOR); 
     
    132132    ttm = localtime(&t); 
    133133    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); 
    134     draw_txt_string(8, 0, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     134    draw_txt_string((CAM_TS_BUTTON_BORDER/FONT_WIDTH)+8, 0, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    135135 
    136136    if (need_redraw) { 
  • branches/philmoz/core/gui_draw.h

    r1321 r1333  
    208208#define COLOR_BLUE_LT       0x10 
    209209#define COLOR_BLUE          0x14 
    210 #define COLOR_YELLOW        0x16 
     210#define COLOR_YELLOW        0x60 
    211211#define COLOR_BLACK         0xFF 
    212212#define COLOR_BG            0x62 
     
    229229#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB 
    230230#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT 
    231 #define COLOR_HISTO_RG_PLAY COLOR_YELLOW 
     231#define COLOR_HISTO_RG_PLAY 0x80 
    232232#undef SCREEN_COLOR 
    233233#define SCREEN_COLOR            0x1D 
     
    374374#define COLOR_BLUE_LT       0x10 
    375375#define COLOR_BLUE          0x14 
    376 #define COLOR_YELLOW        0x16 
     376#define COLOR_YELLOW        0x74 
    377377#define COLOR_BLACK         0xFF 
    378378#define COLOR_BG            0x1b 
     
    395395#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB 
    396396#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT 
    397 #define COLOR_HISTO_RG_PLAY COLOR_YELLOW 
     397#define COLOR_HISTO_RG_PLAY 0x85 
    398398#undef SCREEN_COLOR 
    399399#define SCREEN_COLOR            0x1D 
  • branches/philmoz/core/gui_mastermind.c

    r670 r1333  
    1414#define BORDER                          20 
    1515#define RECT_SIZE                       10 
    16 #define COLOR0_LIGHT_GRAY       MAKE_COLOR(0xEE,0xEE) 
    17 #define BG_COLOR                        MAKE_COLOR(0xDD,0xDD) 
     16#define COLOR_LIGHT_GRAY        MAKE_COLOR(COLOR_SPLASH_GREY,COLOR_SPLASH_GREY) 
     17#define BG_COLOR                        MAKE_COLOR(COLOR_GREY,COLOR_GREY) 
     18#define TEXT_COLOR          MAKE_COLOR(BG_COLOR,COLOR_BLACK) 
    1819 
    1920int curr_x; 
    2021int curr_y; 
    2122int answer[4]; 
    22 char colors[6]; 
     23char colors[6] = { COLOR_HISTO_R_PLAY, COLOR_HISTO_G_PLAY, COLOR_HISTO_B_PLAY, COLOR_YELLOW, COLOR_WHITE, COLOR_BLACK }; 
    2324int curr_color[4]; 
    2425int GameGo; 
    2526static char buf[128]; 
    2627 
     28static void guess_box(int pos, color col) 
     29{ 
     30        draw_filled_rect(CAM_TS_BUTTON_BORDER+100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, CAM_TS_BUTTON_BORDER+100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(col,col)); 
     31} 
     32 
    2733char WinQuary(){ 
    2834        char pos=0; 
    29         int i=0; 
    30          
    31         for(i=0;i<4;i++){ 
    32                 if(answer[i]==curr_color[i]){ 
    33                         draw_filled_rect(100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, 100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(0xFF,0xFF)); 
     35        int i, j; 
     36         
     37        for (i=0; i<4; i++) 
     38    { 
     39                if (answer[i] == curr_color[i]) 
     40        { 
     41            guess_box(pos,COLOR_BLACK); 
    3442                        pos++; 
    3543                } 
    3644        } 
    3745         
    38         if(pos==4){ 
    39                 GameGo=0; 
     46        if (pos == 4) 
     47    { 
     48                GameGo = 0; 
    4049                return 1; 
    4150        } 
    4251         
    43         if(answer[0]==curr_color[1] || answer[0]==curr_color[2] || answer[0]==curr_color[3]){ 
    44                 draw_filled_rect(100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, 100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(0x11,0x11)); 
    45                 pos++; 
    46         } 
    47         if(answer[1]==curr_color[0] || answer[1]==curr_color[2] || answer[1]==curr_color[3]){ 
    48                 draw_filled_rect(100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, 100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(0x11,0x11)); 
    49                 pos++; 
    50         } 
    51         if(answer[2]==curr_color[0] || answer[2]==curr_color[1] || answer[2]==curr_color[3]){ 
    52                 draw_filled_rect(100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, 100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(0x11,0x11)); 
    53                 pos++; 
    54         } 
    55         if(answer[3]==curr_color[0] || answer[3]==curr_color[1] || answer[3]==curr_color[2]){ 
    56                 draw_filled_rect(100+(pos*10), BORDER+(2*curr_y*10)+2+2*curr_y, 100+(pos*10)+6, BORDER+(2*curr_y*10)+8+2*curr_y , MAKE_COLOR(0x11,0x11)); 
    57                 pos++; 
    58         } 
    59  
    60         if(curr_y==0){ 
    61                 GameGo=0; 
     52        for (i=0; i<4; i++) 
     53    { 
     54        for (j=0; j<4; j++) 
     55        { 
     56                    if ((answer[i] == curr_color[j]) && (i != j)) 
     57            { 
     58                guess_box(pos,COLOR_WHITE); 
     59                            pos++; 
     60            } 
     61                } 
     62        } 
     63 
     64        if(curr_y==0) 
     65    { 
     66                GameGo = 0; 
    6267                return 2; 
    6368        } 
     69 
    6470        return 0; 
    6571} 
    6672 
    6773char CanNext(){ 
    68         if(curr_color[0]==99 || curr_color[1]==99 || curr_color[2]==99 || curr_color[3]==99) 
     74        if (curr_color[0]==99 || curr_color[1]==99 || curr_color[2]==99 || curr_color[3]==99) 
    6975                return 0; 
    70         else if(curr_color[0]==curr_color[1] || curr_color[0]==curr_color[2] || curr_color[0]==curr_color[3] || 
    71                 curr_color[1]==curr_color[2] || curr_color[1]==curr_color[3] || curr_color[2]==curr_color[3]){ 
    72                 draw_string(167, 130 , lang_str(LANG_MENU_GAMES_DCOLOR), MAKE_COLOR(0xDD,0x11)); 
     76        else if (curr_color[0]==curr_color[1] || curr_color[0]==curr_color[2] || curr_color[0]==curr_color[3] || 
     77                     curr_color[1]==curr_color[2] || curr_color[1]==curr_color[3] || curr_color[2]==curr_color[3]) 
     78    { 
     79                draw_string(CAM_TS_BUTTON_BORDER+167, 130, lang_str(LANG_MENU_GAMES_DCOLOR), TEXT_COLOR); 
    7380                return 0; 
    7481        } 
     
    8087        int i=0; 
    8188         
    82         for(i=0;i<4;i++)answer[i]=99; 
    83         i=0; 
    84         while(i<4){ 
    85                 tmp=rand()%6; 
    86                 if(answer[0]!=tmp && answer[1]!=tmp && answer[2]!=tmp && answer[3]!=tmp){ 
    87                         answer[i]=tmp; 
     89        for (i=0; i<4; i++) answer[i] = 99; 
     90        i = 0; 
     91        while (i<4) 
     92    { 
     93                tmp = rand() % 6; 
     94                if (answer[0]!=tmp && answer[1]!=tmp && answer[2]!=tmp && answer[3]!=tmp) 
     95        { 
     96                        answer[i] = tmp; 
    8897                        i++; 
    8998                } 
    9099        } 
    91          
    92         //for (i=0; i<4;i++) 
    93         //      draw_filled_rect(BORDER+(2*i*10), 213, BORDER+(2*i*10)+10,223, MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
    94  
    95100} 
    96101 
    97102int gui_mastermind_init() { 
    98103        int i,j; 
    99         colors[0]=0xAA; 
    100         colors[1]=0x55; 
    101         colors[2]=0x22; 
    102         colors[3]=0x66; 
    103         colors[4]=0x88; 
    104         colors[5]=0xD2; 
    105         curr_color[0]=0; 
    106         curr_color[1]=0; 
    107         curr_color[2]=0; 
    108         curr_color[3]=0; 
    109104 
    110105        curr_x=0; 
    111106        curr_y=7; 
    112107         
    113         draw_filled_rect( 0, 0, 360, 240, BG_COLOR); 
    114  
    115         for (i=0;i<4;i++){ 
    116                 for (j=0;j<8;j++){ 
    117                         draw_filled_rect(BORDER+(2*i*10), BORDER+(2*j*10)+2*j, BORDER+(2*i*10)+10, BORDER+(2*j*10)+2*j+10 , COLOR0_LIGHT_GRAY); 
    118                 } 
    119         } 
    120  
    121         draw_filled_rect(10, BORDER+(2*j*10)+2*j, 150,BORDER+(2*j*10)+2*j+1, MAKE_COLOR(0x11,0x11)); 
    122         draw_filled_rect(148, 10, 149,230, MAKE_COLOR(0x11,0x11)); 
    123         draw_filled_rect(151, 10, 152,230, MAKE_COLOR(0x11,0x11)); 
    124          
    125         //for (i=0; i<4;i++) 
    126         //      draw_filled_rect(BORDER+(2*i*10), 213, BORDER+(2*i*10)+10,223, COLOR0_LIGHT_GRAY); 
     108        draw_filled_rect( 0, 0, screen_width-1, screen_height-1, BG_COLOR); 
     109 
     110        for (i=0;i<4;i++) 
     111                for (j=0;j<8;j++) 
     112                        draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*i*10), BORDER+(2*j*10)+2*j, CAM_TS_BUTTON_BORDER+BORDER+(2*i*10)+10, BORDER+(2*j*10)+2*j+10 , COLOR_LIGHT_GRAY); 
     113 
     114        draw_filled_rect(CAM_TS_BUTTON_BORDER+10, BORDER+(2*j*10)+2*j, CAM_TS_BUTTON_BORDER+150,BORDER+(2*j*10)+2*j+1, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
     115        draw_filled_rect(CAM_TS_BUTTON_BORDER+148, 10, CAM_TS_BUTTON_BORDER+149,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
     116        draw_filled_rect(CAM_TS_BUTTON_BORDER+151, 10, CAM_TS_BUTTON_BORDER+152,230, MAKE_COLOR(BG_COLOR,COLOR_WHITE)); 
    127117         
    128118        for (i=0; i<6;i++) 
    129                 draw_filled_rect(BORDER+(2*(i+7)*10)+20, 40, BORDER+(2*(i+7)*10)+35,55, MAKE_COLOR(colors[i],colors[i])); 
     119                draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*(i+7)*10)+20, 40, CAM_TS_BUTTON_BORDER+BORDER+(2*(i+7)*10)+35,55, MAKE_COLOR(colors[i],colors[i])); 
    130120                 
    131         draw_filled_rect(BORDER+(2*7*10)+20, 65, BORDER+(2*7*10)+35,80, MAKE_COLOR(0xFF,0xFF)); 
    132         draw_string(BORDER+(2*7*10)+50, 65 , lang_str(LANG_MENU_GAMES_RIGHT_PLACE), MAKE_COLOR(0xDD,0x11)); 
    133          
    134         draw_filled_rect(BORDER+(2*7*10)+20, 90, BORDER+(2*7*10)+35,105, MAKE_COLOR(0x11,0x11)); 
    135         draw_string(BORDER+(2*7*10)+50, 90 , lang_str(LANG_MENU_GAMES_C_IN_ANSWER), MAKE_COLOR(0xDD,0x11)); 
    136  
     121        draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+20, 65, CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+35,80, MAKE_COLOR(COLOR_BLACK,COLOR_BLACK)); 
     122        draw_string(CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+50, 65 , lang_str(LANG_MENU_GAMES_RIGHT_PLACE), TEXT_COLOR); 
     123         
     124        draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+20, 90, CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+35,105, MAKE_COLOR(COLOR_WHITE,COLOR_WHITE)); 
     125        draw_string(CAM_TS_BUTTON_BORDER+BORDER+(2*7*10)+50, 90 , lang_str(LANG_MENU_GAMES_C_IN_ANSWER), TEXT_COLOR); 
    137126                                         
    138         draw_string(173, 20 , lang_str(LANG_MENU_GAMES_AC_COLORS), MAKE_COLOR(0xDD,0x11)); 
     127        draw_string(CAM_TS_BUTTON_BORDER+173, 20 , lang_str(LANG_MENU_GAMES_AC_COLORS), TEXT_COLOR); 
    139128                 
    140         draw_string(167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), MAKE_COLOR(0xDD,0x11)); 
    141         draw_string(167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), MAKE_COLOR(0xDD,0x11)); 
    142         draw_string(167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), MAKE_COLOR(0xDD,0x11)); 
     129        draw_string(CAM_TS_BUTTON_BORDER+167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), TEXT_COLOR); 
     130        draw_string(CAM_TS_BUTTON_BORDER+167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), TEXT_COLOR); 
     131        draw_string(CAM_TS_BUTTON_BORDER+167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), TEXT_COLOR); 
    143132 
    144133        for(i=0;i<4;i++) curr_color[i]=99; 
     
    147136} 
    148137//------------------------------------------------------------------- 
     138static void draw_box(color border) 
     139{ 
     140    if (curr_color[curr_x] == 99) curr_color[curr_x] = 0; 
     141    draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, CAM_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)); 
     142} 
     143 
     144static void end_game(int msg) 
     145{ 
     146    int i; 
     147    draw_string(CAM_TS_BUTTON_BORDER+198, 130 , lang_str(msg), TEXT_COLOR); 
     148        for (i=0; i<4;i++) 
     149            draw_filled_rect(CAM_TS_BUTTON_BORDER+BORDER+(2*i*10), 213, CAM_TS_BUTTON_BORDER+BORDER+(2*i*10)+10,223,  MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
     150} 
     151 
     152static void chg_box(int inc_box, int inc_val) 
     153{ 
     154    draw_box(colors[curr_color[curr_x]]); 
     155    curr_x = (curr_x + inc_box) & 3; 
     156    if (curr_color[curr_x] == 99) curr_color[curr_x] = 0; 
     157    curr_color[curr_x] = (curr_color[curr_x] + inc_val); 
     158    if (curr_color[curr_x] < 0) curr_color[curr_x] = 5; 
     159    else if (curr_color[curr_x] > 5) curr_color[curr_x] = 0; 
     160    draw_box(COLOR_BLACK); 
     161} 
     162 
    149163void gui_mastermind_kbd_process() { 
    150164        int i=0; 
    151165        rand(); 
    152         switch (kbd_get_autoclicked_key())  
    153         { 
    154                 case KEY_SET: 
    155                         if(GameGo==1){ 
    156                                 if(CanNext()){ 
    157                                         if(WinQuary()==1){ 
    158                                                 draw_string(198, 130 , lang_str(LANG_MENU_GAMES_RIGHT), MAKE_COLOR(0xDD,0x11)); 
    159                                                 draw_string(167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), MAKE_COLOR(0xDD,0x11)); 
    160                                                 draw_string(167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), MAKE_COLOR(0xDD,0x11)); 
    161                                                 draw_string(167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), MAKE_COLOR(0xDD,0x11)); 
    162                                                 for (i=0; i<4;i++) 
    163                                                         draw_filled_rect(BORDER+(2*i*10), 213, BORDER+(2*i*10)+10,223,  MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
    164                                         } 
    165                                         else if(WinQuary()==2){ 
    166                                                 draw_string(198, 130 , lang_str(LANG_MENU_GAMES_GAME_OVER), MAKE_COLOR(0xDD,0x11)); 
    167                                                 draw_string(167, 200 , lang_str(LANG_MENU_GAMES_CURSOR1), MAKE_COLOR(0xDD,0x11)); 
    168                                                 draw_string(167, 185 , lang_str(LANG_MENU_GAMES_CURSOR2), MAKE_COLOR(0xDD,0x11)); 
    169                                                 draw_string(167, 170 , lang_str(LANG_MENU_GAMES_CURSOR3), MAKE_COLOR(0xDD,0x11)); 
    170                                                 for (i=0; i<4;i++) 
    171                                                         draw_filled_rect(BORDER+(2*i*10), 213, BORDER+(2*i*10)+10,223,  MAKE_COLOR(colors[answer[i]],colors[answer[i]])); 
    172                                         } 
    173                                         else{ 
    174                                                 draw_filled_rect(BORDER+(2*(curr_x)*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*(curr_x)*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],colors[curr_color[curr_x]])); 
    175                                                 for(i=0;i<4;i++) curr_color[i]=99; 
    176                                                 curr_y--; 
    177                                                 curr_x=0; 
    178                                                 if(curr_color[curr_x]==99) curr_color[curr_x]=0; 
    179                                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    180                                         } 
    181                                 } 
    182                         } 
    183                         else{ 
    184                                 gui_mastermind_init(); 
    185                                 CreateColorCombo(); 
    186                                 for (i=0; i<4;i++)draw_filled_rect(BORDER+(2*i*10), 213, BORDER+(2*i*10)+10,223, BG_COLOR); // overwrite anwser 
    187                                 curr_x=0; 
    188                                 if(curr_color[curr_x]==99) curr_color[curr_x]=0; 
    189                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    190                                 GameGo=1; 
    191                                 draw_string(198, 130 , "            ", MAKE_COLOR(0xDD,0x11)); 
    192                         } 
    193                         break; 
    194                 case KEY_LEFT: 
    195                         if(GameGo==1){ 
    196                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],colors[curr_color[curr_x]])); 
    197                                 (curr_x==0)?curr_x=3:curr_x--; 
    198                                 if(curr_color[curr_x]==99) curr_color[curr_x]=0; 
    199                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    200                         } 
    201                         break; 
    202                 case KEY_RIGHT: 
    203                         if(GameGo==1){ 
    204                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],colors[curr_color[curr_x]])); 
    205                                 curr_x=(curr_x+1)%4; 
    206                                 if(curr_color[curr_x]==99) curr_color[curr_x]=0; 
    207                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    208                         } 
    209                         break; 
    210                 case KEY_UP: 
    211                         if(GameGo==1){ 
    212                                 draw_string(167, 130 , "                       ", MAKE_COLOR(0xDD,0x11)); 
    213                                 curr_color[curr_x]=(curr_color[curr_x]+1)%6; 
    214                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    215                         } 
    216                         break; 
    217                 case KEY_DOWN: 
    218                         if(GameGo==1){ 
    219                                 draw_string(167, 130 , "                       ", MAKE_COLOR(0xDD,0x11)); 
    220                                 (curr_color[curr_x]-1<0)?curr_color[curr_x]=5:curr_color[curr_x]--; 
    221                                 draw_filled_rect(BORDER+(2*curr_x*10), BORDER+(2*curr_y*10)+2*curr_y, BORDER+(2*curr_x*10)+10, BORDER+(2*curr_y*10)+2*curr_y+10 , MAKE_COLOR(colors[curr_color[curr_x]],0xff)); 
    222                         } 
    223                         break; 
    224         } 
     166    long key = kbd_get_autoclicked_key(); 
     167    if (key) 
     168    { 
     169        if (GameGo == 1) 
     170        { 
     171            draw_string(CAM_TS_BUTTON_BORDER+167, 130 , "                       ", TEXT_COLOR); 
     172                switch (kbd_get_autoclicked_key())  
     173                { 
     174                        case KEY_SET: 
     175                                if(CanNext()) 
     176                    { 
     177                                        if(WinQuary() == 1) 
     178                        { 
     179                            end_game(LANG_MENU_GAMES_RIGHT); 
     180                                        } 
     181                                        else if(WinQuary() == 2) 
     182                        { 
     183                            end_game(LANG_MENU_GAMES_GAME_OVER); 
     184                                        } 
     185                                        else 
     186                        { 
     187                            draw_box(colors[curr_color[curr_x]]); 
     188                                                for(i=0;i<4;i++) curr_color[i]=99; 
     189                                                curr_y--; 
     190                                                curr_x=0; 
     191                            draw_box(COLOR_BLACK); 
     192                                        } 
     193                                } 
     194                                break; 
     195                        case KEY_LEFT: 
     196                    chg_box(-1,0); 
     197                                break; 
     198                        case KEY_RIGHT: 
     199                    chg_box(1,0); 
     200                                break; 
     201                        case KEY_UP: 
     202                    chg_box(0,1); 
     203                                break; 
     204                        case KEY_DOWN: 
     205                    chg_box(0,-1); 
     206                                break; 
     207                } 
     208        } 
     209        else if (key == KEY_SET) 
     210        { 
     211                        gui_mastermind_init(); 
     212                        CreateColorCombo(); 
     213            draw_box(COLOR_BLACK); 
     214                        GameGo=1; 
     215        } 
     216    } 
    225217} 
    226218//------------------------------------------------------------------- 
     
    229221    static struct tm *ttm; 
    230222 
    231     draw_txt_string(15, 0, lang_str(LANG_MENU_GAMES_MASTERMIND), MAKE_COLOR(BG_COLOR, COLOR_WHITE)); 
     223    draw_txt_string(CAM_TS_BUTTON_BORDER/FONT_WIDTH+15, 0, lang_str(LANG_MENU_GAMES_MASTERMIND), MAKE_COLOR(BG_COLOR, COLOR_WHITE)); 
    232224 
    233225    t = time(NULL); 
    234226    ttm = localtime(&t); 
    235     sprintf(buf, "Time: %2u:%02u", ttm->tm_hour, ttm->tm_min); 
    236     draw_txt_string(screen_width/FONT_WIDTH-2-1-1-9-2-5-4, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(0xDD, 0x11));    
    237          
    238         sprintf(buf, "Batt:%3d%%", get_batt_perc()); 
    239     draw_txt_string(screen_width/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(0xDD, 0x11)); 
    240 } 
     227    sprintf(buf, "Time: %2u:%02u  Batt:%3d%%", ttm->tm_hour, ttm->tm_min, get_batt_perc()); 
     228    draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-1-1-9-2-5-4, screen_height/FONT_HEIGHT-1, buf, TEXT_COLOR); 
     229} 
  • branches/philmoz/core/gui_read.c

    r547 r1333  
    2626static void gui_read_draw_batt() { 
    2727    sprintf(buffer, "Batt:%3d%%", get_batt_perc()); 
    28     draw_txt_string(screen_width/FONT_WIDTH-2-1-1-9, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
     28    draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-1-1-9, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
    2929} 
    3030 
     
    3737    ttm = localtime(&t); 
    3838    sprintf(buffer, "%2u:%02u", ttm->tm_hour, ttm->tm_min); 
    39     draw_txt_string(screen_width/FONT_WIDTH-2-1-1-9-2-5, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
     39    draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-1-1-9-2-5, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); 
    4040} 
    4141 
    4242//------------------------------------------------------------------- 
    4343static void gui_read_draw_scroll_indicator() { 
    44     draw_txt_char(screen_width/FONT_WIDTH-2, 0, (conf.reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     44    draw_txt_char((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2, 0, (conf.reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
    4545} 
    4646 
     
    6060    pause = 0; 
    6161    read_to_draw = 1; 
    62     x=6;  
     62    x=CAM_TS_BUTTON_BORDER+6;  
    6363    y=FONT_HEIGHT; 
    64     w=screen_width-6-6-8; 
     64    w=screen_width-CAM_TS_BUTTON_BORDER*2-6-6-8; 
    6565    h=screen_height-y; 
    6666    last_time = get_tick_count(); 
     
    167167        sprintf(buffer, "(%3d%%) %d/%d  ", (read_file_size)?(conf.reader_pos*100/read_file_size):0, conf.reader_pos, read_file_size); 
    168168        buffer[screen_width/FONT_WIDTH]=0; 
    169         draw_txt_string(0, 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
     169        draw_txt_string((CAM_TS_BUTTON_BORDER/FONT_WIDTH), 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 
    170170 
    171171        // scrollbar 
  • branches/philmoz/core/gui_reversi.c

    r1024 r1333  
    1818 
    1919 
    20 #define FIELD_COLOR_WHITE       0xF3 
    21 #define FIELD_COLOR_BLACK       0xFE 
    22 #define MARKER_COLOR_WHITE      0x33 
    23 #define MARKER_COLOR_BLACK      0xFF 
    24 #define SELECTED_COLOR          0x9B 
     20#define FIELD_COLOR_WHITE       COLOR_YELLOW 
     21#define FIELD_COLOR_BLACK       COLOR_GREY 
     22#define MARKER_COLOR_WHITE      COLOR_WHITE 
     23#define MARKER_COLOR_BLACK      COLOR_BLACK 
     24#define SELECTED_COLOR          COLOR_RED 
    2525 
    2626 
     
    3030//------------------------------------------------------------------- 
    3131static uchar Field[8][8]; 
    32 static uchar Plr; 
    3332static uchar CurrPlayer, Computer, InGame=0, NumPl1, NumPl2; 
    3433 
     
    221220 
    222221    field_size = (screen_height-2*FONT_HEIGHT-4)&0xFFF8; 
    223     field_x = FONT_WIDTH+8; 
     222    field_x = CAM_TS_BUTTON_BORDER+FONT_WIDTH+8; 
    224223    field_y = (screen_height-field_size)>>1; 
    225224    cell_size = field_size >> 3; 
     
    323322//------------------------------------------------------------------- 
    324323static void redrawstatus() { 
    325     uchar x=field_size+FONT_WIDTH*2+23, y = 25; 
     324    int x=CAM_TS_BUTTON_BORDER+field_size+FONT_WIDTH*2+23, y = 25; 
    326325    if (InGame) {  
    327326        if (CurrPlayer==FIELD_PLAYER1) {  
     
    411410 
    412411    sprintf(buf, "Batt:%3d%%", get_batt_perc()); 
    413     draw_txt_string(screen_width/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     412    draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, buf, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    414413 
    415414    Timer(); 
  • branches/philmoz/core/gui_sokoban.c

    r1024 r1333  
    1818#define WALL_COLOR_1            COLOR_GREY 
    1919#define WALL_COLOR_2            COLOR_BLACK 
    20 #define BOX_COLOR_1             0x26 
     20#define BOX_COLOR_1             COLOR_RED 
    2121#define BOX_COLOR_2             COLOR_BLACK 
    22 #define BOX_COLOR_3             0x66 
    23 #define PLACE_COLOR_1           0x99 
     22#define BOX_COLOR_3             COLOR_YELLOW 
     23#define PLACE_COLOR_1           COLOR_BLUE 
    2424#define PLACE_COLOR_2           COLOR_BLACK 
    2525#define PLAYER_COLOR_1          COLOR_GREEN 
     
    4848 
    4949static int need_redraw; 
     50static int need_redraw_all; 
    5051static int  moves; 
    5152static char field[FIELD_HEIGHT][FIELD_WIDTH]; 
     
    216217    if (++conf.sokoban_level >= num_levels) conf.sokoban_level = 0; 
    217218    sokoban_set_level(conf.sokoban_level); 
    218     need_redraw = 1; 
     219    need_redraw_all = 1; 
    219220} 
    220221 
     
    249250//------------------------------------------------------------------- 
    250251static void sokoban_draw_box(int x, int y, color cl) { 
    251     draw_filled_rect(x*cell_size, y*cell_size, x*cell_size+cell_size-1, y*cell_size+cell_size-1, cl); 
    252     draw_line(x*cell_size+2, y*cell_size, x*cell_size+2, y*cell_size+cell_size-1, cl); 
    253     draw_line(x*cell_size+cell_size-1-2, y*cell_size, x*cell_size+cell_size-1-2, y*cell_size+cell_size-1, cl); 
    254     draw_line(x*cell_size+2, y*cell_size+2, x*cell_size+cell_size-1-2, y*cell_size+2, cl); 
    255     draw_line(x*cell_size+2, y*cell_size+cell_size-1-2, x*cell_size+cell_size-1-2, y*cell_size+cell_size-1-2, cl); 
     252    draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1, y*cell_size+cell_size-1, cl); 
     253    draw_line(CAM_TS_BUTTON_BORDER+x*cell_size+2, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+2, y*cell_size+cell_size-1, cl); 
     254    draw_line(CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1-2, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1, cl); 
     255    draw_line(CAM_TS_BUTTON_BORDER+x*cell_size+2, y*cell_size+2, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1-2, y*cell_size+2, cl); 
     256    draw_line(CAM_TS_BUTTON_BORDER+x*cell_size+2, y*cell_size+cell_size-1-2, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1-2, y*cell_size+cell_size-1-2, cl); 
    256257} 
    257258 
     
    263264     unfortunately, gui_mode gets set all over the place */ 
    264265    if(!num_levels) { 
    265         char *buf,*p,*p_start; 
     266        char *buf,*p; 
    266267        FILE *fd;     
    267268        struct stat st; 
    268         int prev_index = 0; 
    269269 
    270270        if (stat((char *)level_file_name,&st) != 0 || st.st_size==0)  
     
    322322        return 0; 
    323323    } 
    324     need_redraw = 1; 
     324    need_redraw_all = 1; 
    325325    return 1; 
    326326} 
     
    364364      #endif 
    365365            sokoban_set_level(conf.sokoban_level); 
    366             need_redraw = 1; 
     366            need_redraw_all = 1; 
    367367            break; 
    368368      #if CAM_HAS_ERASE_BUTTON 
     
    379379    int y, x; 
    380380    static char str[16]; 
     381 
     382    if (need_redraw_all) { 
     383        draw_filled_rect(0, 0, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     384        need_redraw_all = 0; 
     385        need_redraw = 1; 
     386    } 
    381387 
    382388    if (need_redraw) { 
     
    386392                switch (field[y][x]) { 
    387393                    case MARKER_WALL: 
    388                         draw_filled_rect(x*cell_size, y*cell_size, x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(WALL_COLOR_1, WALL_COLOR_2)); 
     394                        draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(WALL_COLOR_1, WALL_COLOR_2)); 
    389395                        break; 
    390396                    case MARKER_BOX: 
     
    392398                        break; 
    393399                    case MARKER_PLACE: 
    394                         draw_filled_rect(x*cell_size, y*cell_size, x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    395                         draw_filled_rect(x*cell_size+4, y*cell_size+4, x*cell_size+cell_size-1-4, y*cell_size+cell_size-1-4, MAKE_COLOR(PLACE_COLOR_1, PLACE_COLOR_2)); 
     400                        draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     401                        draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size+4, y*cell_size+4, CAM_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)); 
    396402                        break; 
    397403                    case MARKER_BOX_PLACE: 
     
    400406                    case MARKER_PLAYER: 
    401407                    case MARKER_PLAYER_PLACE: 
    402                         draw_filled_rect(x*cell_size, y*cell_size, x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    403                         draw_filled_ellipse(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)); 
     408                        draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     409                        draw_filled_ellipse(CAM_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)); 
    404410                        break; 
    405411                    case MARKER_EMPTY: 
    406412                    default: 
    407                         draw_filled_rect(x*cell_size, y*cell_size, x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     413                        draw_filled_rect(CAM_TS_BUTTON_BORDER+x*cell_size, y*cell_size, CAM_TS_BUTTON_BORDER+x*cell_size+cell_size-1, y*cell_size+cell_size-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    408414                        break; 
    409415                } 
     
    411417        } 
    412418 
    413         draw_line(cell_size*FIELD_WIDTH, 0, cell_size*FIELD_WIDTH, screen_height-1, COLOR_WHITE); 
    414         draw_line(cell_size*FIELD_WIDTH+1, 0, cell_size*FIELD_WIDTH+1, screen_height-1, COLOR_BLACK); 
    415  
    416         draw_filled_rect(cell_size*FIELD_WIDTH+2, 0, screen_width-1, 7, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     419        draw_line(CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH, 0, CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH, screen_height-1, COLOR_WHITE); 
     420        draw_line(CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH+1, 0, CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH+1, screen_height-1, COLOR_BLACK); 
    417421 
    418422        sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_LEVEL), conf.sokoban_level+1); 
    419         draw_string(cell_size*FIELD_WIDTH+2, 8, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     423        draw_string(CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH+2, 8, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    420424        sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_MOVES), moves); 
    421         draw_string(cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    422  
    423         draw_filled_rect(cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT*2, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
     425        draw_string(CAM_TS_BUTTON_BORDER+cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     426 
     427        //draw_filled_rect(cell_size*FIELD_WIDTH+2, 8+FONT_HEIGHT*2, screen_width-1, screen_height-1, MAKE_COLOR(SCREEN_COLOR, SCREEN_COLOR)); 
    424428 
    425429        if (sokoban_finished()) { 
     
    430434 
    431435    sprintf(str, "Batt:%3d%%", get_batt_perc()); 
    432     draw_txt_string(screen_width/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
    433 } 
    434  
     436    draw_txt_string((screen_width-CAM_TS_BUTTON_BORDER)/FONT_WIDTH-2-9, screen_height/FONT_HEIGHT-1, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 
     437} 
     438 
  • branches/philmoz/core/kbd.c

    r1321 r1333  
    103103#endif 
    104104 
    105 #if defined(CAMERA_sx200is) || defined(CAMERA_sx130is) || defined(CAMERA_sx220hs) 
     105#if defined(CAMERA_sx200is) || defined(CAMERA_sx130is) || defined(CAMERA_sx220hs) || defined(CAMERA_sx230hs) 
    106106#define ZSTEP_TABLE_SIZE 7 
    107107static int nTxtbl[]={0,16,32,62,78,102,125}; 
    108108#endif 
    109109 
    110 #if defined(CAMERA_g11) || defined(CAMERA_g12) 
     110#if defined(CAMERA_g10) || defined(CAMERA_g11) || defined(CAMERA_g12) 
    111111#define ZSTEP_TABLE_SIZE 14 
    112112static int nTxtbl[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13}; 
  • branches/philmoz/include/propset4.h

    r1245 r1333  
    5151#define PROPCASE_SV_MARKET                       250 
    5252#define PROPCASE_SV                              347     // (philmoz, May 2011) - this value causes overrides to be saved in JPEG and shown on Canon OSD 
    53 #define PROPCASE_TV                              265     // (philmoz, May 2011) - this value causes overrides to be saved in JPEG and shown on Canon OSD 
     53#define PROPCASE_TV2                             265     // (philmoz, May 2011) - this value causes overrides to be saved in JPEG and shown on Canon OSD 
     54#define PROPCASE_TV                              266     // Need to set this value for overrides to work correctly 
    5455#define PROPCASE_USER_TV                         268 
    5556#define PROPCASE_WB_ADJ                          273 
    5657#define PROPCASE_ASPECT_RATIO                    300 
    5758 
     59#define PROPCASE_GPS                                                     359    //for sx230hs 
     60 
    5861#endif 
  • branches/philmoz/loader/ixus100_sd780/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/loader/ixus100_sd780/blobs.S

    • Property svn:eol-style set to native
  • branches/philmoz/loader/ixus100_sd780/entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/loader/ixus100_sd780/main.c

    • Property svn:eol-style set to native
  • branches/philmoz/loader/ixus100_sd780/resetcode/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/loader/ixus100_sd780/resetcode/entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/loader/ixus100_sd780/resetcode/main.c

    • Property svn:eol-style set to native
  • branches/philmoz/makefile.cam

    r1321 r1333  
     1 
     2# Define the list of cameras that are not included in the 'autobuild' 
     3# If only a specific firmware for a version should be excluded define 
     4# this in makefile.fw 
     5SKIP_AUTOBUILD="s80 ixusW_sd430 a430 a410" 
    16 
    27# Read list of camera directories under platform 
     
    1015 
    1116# Build target for each entry found in platform 
    12 # If it's a directory, it's not called 'generic' and the directory doesn't contain a file called NO_AUTOBUILD 
     17# If it's a directory, it's not called 'generic' 
    1318# then use makefile.fw to build all the firmware versions for the camera 
    1419# Pass the final target $(ACTION) to the next level 
    1520$(CAMS): 
    16         if [ -d platform/$@ ] && [ $@ != "generic" ] && [ ! -e platform/$@/NO_AUTOBUILD ]; then \ 
     21        if [ -d platform/$@ ] && [ $@ != "generic" ] && [ $@ != "$(findstring $@,$(SKIP_AUTOBUILD))" ]; then \ 
    1722                $(MAKE) -f makefile.fw VER=$(VER) CAM=$@ ACTION=$(ACTION) all; \ 
    1823        fi 
  • branches/philmoz/makefile.fw

    r1321 r1333  
     1 
     2# Define the list of camera/firmware vresions that are not included in the 'autobuild' 
     3# Entries here should be in the form CAMERA-FIRMWARE - e.g. g12-100c 
     4# Do exclude all firmware versions for a specific camera add the camera 
     5# to the list in makefile.cam 
     6SKIP_AUTOBUILD="" 
    17 
    28# Read list of camera firmware directories under platform/$(CAM)/sub 
     
    915 
    1016# Build target for each entry found in platform/$(CAM)/sub 
    11 # If it's a directory, and the directory doesn't contain a file called NO_AUTOBUILD 
    12 # then use the main Makefile to build using the supplied $(ACTION) 
     17# If it's a directory then use the main Makefile to build using the supplied $(ACTION) 
    1318$(FW): 
    14         if [ -d platform/$(CAM)/sub/$@ ] && [ ! -e platform/$(CAM)/sub/$@/NO_AUTOBUILD ]; then \ 
     19        if [ -d platform/$(CAM)/sub/$@ ] && [ $(CAM)-$@ != "$(findstring $(CAM)-$@,$(SKIP_AUTOBUILD))" ]; then \ 
    1520                $(MAKE) -s --no-print-directory PLATFORM=$(CAM) PLATFORMSUB=$@ NO_INC_BUILD=1 $(ACTION); \ 
    1621        fi 
  • branches/philmoz/makefile.inc

    r1321 r1333  
    188188#PLATFORMSUB=100c 
    189189 
     190#PLATFORM=a580 
     191#PLATFORMSUB=101b 
     192 
    190193#PLATFORM=a590 
    191194#PLATFORMSUB=100e 
     
    263266#PLATFORMSUB=101b 
    264267 
     268#PLATFORM=g10 
     269#PLATFORMSUB=102a 
     270 
     271#PLATFORM=g10 
     272#PLATFORMSUB=103b 
     273 
     274#PLATFORM=g10 
     275#PLATFORMSUB=104a 
     276 
    265277#PLATFORM=a1100 
    266278#PLATFORMSUB=100c 
     
    344356#PLATFORMSUB=100f 
    345357 
     358#PLATFORM=g12 
     359#PLATFORMSUB=100g 
     360 
     361#PLATFORM=ixus310_elph500hs 
     362#PLATFORMSUB=100a 
     363 
     364#PLATFORM=ixus310_elph500hs 
     365#PLATFORMSUB=101a 
     366 
    346367#PLATFORM=a430 
    347368#PLATFORMSUB=100b 
     
    372393 
    373394#PLATFORM=sx220hs 
     395#PLATFORMSUB=101b 
     396 
     397#PLATFORM=sx230hs 
     398#PLATFORMSUB=100c 
     399 
     400#PLATFORM=sx230hs 
     401#PLATFORMSUB=101a 
     402 
     403#PLATFORM=sx230hs 
    374404#PLATFORMSUB=101b 
    375405 
     
    384414-include $(topdir)localbuildconf.inc 
    385415include $(topdir)version.inc 
    386 -include $(topdir)platform/$(PLATFORM)/platform_conf.inc 
    387416include $(topdir)platform/$(PLATFORM)/sub/$(PLATFORMSUB)/makefile.inc 
    388417 
  • branches/philmoz/platform/a410/sub/100f/focushack.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/a580/notes.txt

    r1320 r1333  
    3232Extra long exposure feature supported. 
    3333------- 
     34EXMEM supported. 
     35------- 
    3436Firmware update from menu works! (With GCC compiler generated file YES, with fi2encdec generated filed NO!) 
    3537 
     
    4143 
    4244PLEASE TEST: 
    43 These Manual Focus adjustments can also be achieved with shortcut keys.  
    44 In <ALT> mode, using the LEFT / RIGHT keys to adjust the Value Factor and the Zoom lever to adjust the Subject Distance. 
    45 Seems it works, please test!!! 
    4645------- 
    4746Curves: Seems it works, please test!!! 
  • branches/philmoz/platform/a580/sub/101b/boot.c

    r1320 r1333  
    130130              "STR     R0, [SP,#0x74-0x70]\n" 
    131131#if defined(OPT_CHDK_IN_EXMEM) 
    132               //"LDR     R0, =0xA47E0\n" // use original heap offset since CHDK is loaded in high memory 
    133               "LDR     R0, =0xE47E0\n" // 0xa47e0 + 0x40000, note: 0x20000 *should* have been enough, but our code was overwritten... 
     132              "LDR     R0, =0xA47E0\n" // use original heap offset since CHDK is loaded in high memory 
     133              //"LDR     R0, =0xE47E0\n" // 0xa47e0 + 0x40000, note: 0x20000 *should* have been enough, but our code was overwritten... 
    134134                                       // ...thus we push the memory pool a little more up (0x30000 = 192k) 
    135135#else 
  • branches/philmoz/platform/a580/sub/101b/makefile.inc

    r1320 r1333  
    88RESTARTSTART=0x63000 
    99 
    10 MEMISOSTART=0xA47E0 
     10MAXRAMADDR=0x1FFFFFF # 32MB RAM 
     11EXMEM_BUFFER_SIZE=0x400000 # Amount of EXMEM memory to allocate for CHDK = 4MB, on change update MEMISOSTART 
     12EXMEM_HEAP_SKIP=0x0 # no skipping needed 
     13 
     14ifdef OPT_CHDK_IN_EXMEM 
     15MEMISOSTART=0x1BFFFE0  # MAXRAMADDR+1 - EXMEM_HEAP_SKIP - EXMEM_BUFFER_SIZE -32 
     16else 
     17MEMISOSTART=0xA47E0  # original non-exmem value  
     18endif 
    1119 
    1220PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE) 
  • branches/philmoz/platform/a580/sub/101b/stubs_entry.S

    r1320 r1333  
    135135NSTUB(SetAutoShutdownTime                     ,0xffc5c87c) //103 
    136136NSTUB(SetCurrentCaptureModeType               ,0xffc62ac4) //101 
    137 NSTUB(SetFileAttributes                       ,0xffc13ea8) //  1 
    138137NSTUB(SetFileTimeStamp                        ,0xffc13e58) //  1 
    139138NSTUB(SetLogicalEventActive                   ,0xffc5c5a4) //  1 
     
    183182NSTUB(rand                                    ,0xffc0da14) //  1 
    184183NSTUB(read                                    ,0xffc0a15c) //101 
     184NSTUB(readfastdir                             ,0xffdce860) //  1 
    185185NSTUB(reboot_fw_update                        ,0xffdd3134) //  5 
    186186NSTUB(rename                                  ,0xffc133d4) //  1 
  • branches/philmoz/platform/g12/sub/100c/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100c/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/g12/sub/100f/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/g12/sub/100f/boot.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/capt_seq.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/makefile.inc

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/g12/sub/100f/movie_rec.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/stubs_auto.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/stubs_entry_2.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/g12/sub/100f/stubs_min.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/generic/shooting.c

    r1320 r1333  
    598598        if(is_now) { 
    599599           _SetPropertyCase(PROPCASE_TV, &v, sizeof(v)); 
     600#ifdef PROPCASE_TV2 
     601       _SetPropertyCase(PROPCASE_TV2, &v, sizeof(v));   // Save override to property that will update JPEG header & Canon OSD 
     602#endif 
    600603        } 
    601604        else photo_param_put_off.tv96=v; 
  • branches/philmoz/platform/ixus100_sd780

    • Property svn:ignore set to
      .dep
      *.a
      *.o
  • branches/philmoz/platform/ixus100_sd780/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/ixus100_sd780/kbd.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/main.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/shooting.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/ixus100_sd780/sub/100b/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/ixus100_sd780/sub/100b/boot.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/capt_seq.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/makefile.inc

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/ixus100_sd780/sub/100b/movie_rec.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/stubs_auto.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/stubs_entry_2.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100b/stubs_min.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus100_sd780/sub/100c

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/ixus100_sd780/sub/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/ixus100_sd780/wrappers.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/ixus310_elph500hs/platform_camera.h

    r1321 r1333  
    7878 
    7979    #undef CAM_USES_ASPECT_CORRECTION 
    80     #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     80    #define CAM_USES_ASPECT_CORRECTION  1       //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 
     81    #undef GAMES_SCREEN_WIDTH 
     82    #define GAMES_SCREEN_WIDTH          480     // Logical screen width for games 
    8183 
    8284    #undef EDGE_HMARGIN 
  • branches/philmoz/platform/sx220hs/sub/101b

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/sx220hs/sub/101b/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx220hs/sub/101b/boot.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/capt_seq.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/makefile.inc

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx220hs/sub/101b/movie_rec.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/stubs_auto.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/stubs_entry_2.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx220hs/sub/101b/stubs_min.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/sx30/sub/100n/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx30/sub/100n/boot.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/capt_seq.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/makefile.inc

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx30/sub/100n/movie_rec.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_auto.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_entry_2.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_entry_ida.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100n/stubs_min.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p

    • Property svn:ignore set to
      .dep
      *.o
      *.a
      PRIMARY.BIN
  • branches/philmoz/platform/sx30/sub/100p/Makefile

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx30/sub/100p/boot.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/capt_seq.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/lib.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/makefile.inc

    • Property svn:eol-style set to LF
  • branches/philmoz/platform/sx30/sub/100p/movie_rec.c

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/stubs_asm.h

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/stubs_auto.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/stubs_entry.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/stubs_entry_2.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/100p/stubs_min.S

    • Property svn:eol-style set to native
  • branches/philmoz/platform/sx30/sub/Makefile

    • Property svn:eol-style set to LF