Changeset 656


Ignore:
Timestamp:
12/29/08 06:11:21 (4 years ago)
Author:
reyalp
Message:
Location:
trunk
Files:
2 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHDK/SCRIPTS/TEST/badpixel.lua

    r629 r656  
    4141 end 
    4242 os.remove("A/CHDK/bad_tmp.bin") 
    43  else 
    44   print("Try this script again...") 
    45  end 
     43else 
     44 print("Try this script again...") 
     45end 
  • trunk/Makefile

    r632 r656  
    9696        zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/BOOKS/*  > $(DEVNULL) 
    9797        zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/CURVES/*  > $(DEVNULL) 
     98        zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/DATA/*  > $(DEVNULL) 
    9899        zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/FONTS/*  > $(DEVNULL) 
    99100        zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/GAMES/*   > $(DEVNULL) 
  • trunk/buildconf.inc

    r649 r656  
    66OPT_GAME_CONNECT4=1 
    77OPT_GAME_MASTERMIND=1 
    8 OPT_BOOTLOGO=1 
    98OPT_CURVES=1 
    109OPT_TEXTREADER=1 
  • trunk/core/Makefile

    r649 r656  
    2828CFLAGS+=-DOPT_GAME_MASTERMIND 
    2929OPT_OBJS+=gui_mastermind.o 
    30 endif 
    31 ifdef OPT_BOOTLOGO 
    32 CFLAGS+=-DOPT_BOOTLOGO 
    3330endif 
    3431ifdef OPT_CURVES 
  • trunk/core/gui.c

    r655 r656  
    4242#ifdef OPT_CURVES 
    4343        #include "curves.h" 
    44 #endif 
    45 #ifdef OPT_BOOTLOGO 
    46         #include "gui_logo.h" 
    4744#endif 
    4845#include "edgeoverlay.h" 
     
    120117static void gui_draw_osd(); 
    121118 
    122  
    123 static void gui_draw_splash(); 
    124  
     119static void gui_draw_splash(char* logo, int logo_size); 
    125120 
    126121void user_menu_save(); 
     
    20302025} 
    20312026 
    2032 //------------------------------------------------------------------- 
    2033 void gui_redraw() 
    2034 { 
    2035     enum Gui_Mode gui_mode_old; 
    2036     static int show_script_console=0; 
    2037  
    2038  
     2027static void gui_handle_splash(void) { 
     2028        static char *logo = NULL; 
     2029    static int logo_size; 
    20392030    if (gui_splash) { 
     2031                static int need_logo=1; // don't use logo ptr, since we don't want to keep re-trying 
     2032                if(need_logo) { 
     2033                const char *logo_name="A/CHDK/DATA/logo.dat"; 
     2034            FILE *fd; 
     2035            struct stat st; 
     2036                        need_logo=0; 
     2037            if (stat(logo_name,&st) == 0) { 
     2038                                logo_size=st.st_size; 
     2039                                logo=malloc(logo_size); 
     2040                                if(logo) { 
     2041                                        fd = fopen(logo_name, "rb"); 
     2042                                        if(fd){ 
     2043                                                fread(logo,1,logo_size,fd); 
     2044                                                fclose(fd); 
     2045                                        } 
     2046                                        else { 
     2047                                                free(logo); 
     2048                                                logo=NULL; 
     2049                                        } 
     2050                } 
     2051                        } 
     2052                } 
    20402053        if (gui_splash>(SPLASH_TIME-4)) { 
    2041             gui_draw_splash(); 
     2054            gui_draw_splash(logo,logo_size); 
    20422055           //   conf.show_osd = 0; 
    20432056        } else if (gui_splash==1 && (mode_get()&MODE_MASK) == gui_splash_mode && (gui_mode==GUI_MODE_NONE || gui_mode==GUI_MODE_ALT)) { 
     
    20462059        } 
    20472060        --gui_splash; 
    2048     } 
    2049  
     2061                if(!gui_splash) { 
     2062                        free(logo); 
     2063                } 
     2064    } 
     2065} 
     2066 
     2067//------------------------------------------------------------------- 
     2068void gui_redraw() 
     2069{ 
     2070    enum Gui_Mode gui_mode_old; 
     2071    static int show_script_console=0; 
     2072 
     2073        gui_handle_splash(); 
    20502074 
    20512075    gui_in_redraw = 1; 
     
    29132937//------------------------------------------------------------------- 
    29142938 
    2915 void gui_draw_splash() { 
     2939void gui_draw_splash(char* logo, int logo_size) { 
    29162940    coord w, h, x, y; 
    29172941    static const char *text[] = { 
     
    29202944        "Camera: " PLATFORM " - " PLATFORMSUB }; 
    29212945    int i, l; 
    2922    // color cl = MAKE_COLOR((gui_splash_mode==MODE_REC)?0xDA:0xD9, COLOR_WHITE); 
    29232946    color cl = MAKE_COLOR(COLOR_RED, COLOR_WHITE); 
    29242947 
    2925  
    29262948    gui_splash_mode = (mode_get()&MODE_MASK); 
    2927  
     2949     
    29282950    h=sizeof(text)/sizeof(text[0])*FONT_HEIGHT+8; 
    29292951    w=0; 
     
    29392961        draw_string(x+((w-strlen(text[i])*FONT_WIDTH)>>1), y+i*FONT_HEIGHT+4, text[i], cl); 
    29402962    } 
    2941 #ifdef OPT_BOOTLOGO 
    2942     int pos; 
    2943     int mx=0; 
    2944     int my=0; 
    2945     int offset_x = (screen_width-150)>>1; 
    2946     int offset_y = ((screen_height-84)>>1) - 42; 
    2947     const color color_lookup[8] = {0xFF, 0x2E, 0x22, 0x3D, 0x1F,  0x21, 0x00, 0x11}; 
     2963    if(logo){ 
     2964      int pos; 
     2965      int mx=0; 
     2966      int my=0; 
     2967      int offset_x = (screen_width-150)>>1; 
     2968      int offset_y = ((screen_height-84)>>1) - 42; 
     2969      const color color_lookup[8] = {0xFF, 0x2E, 0x22, 0x3D, 0x1F,  0x21, 0x00, 0x11}; 
    29482970     
    2949     for(pos=0; pos<HEADER_DATA_LEN; pos++){ 
    2950         char data = header_data[pos]; 
    2951         color c = color_lookup[(data>>5) & 0x07]; 
    2952         for(i=0; i<(data&0x1F)+1; i++){ 
    2953             if (c!=0x00){ 
    2954                 draw_pixel(offset_x+mx,offset_y+my,c); 
    2955             } 
    2956             if (mx==149){ 
    2957                 mx=0; 
    2958                 my++; 
    2959             }else{ 
    2960                 mx++; 
    2961             } 
    2962              
    2963         } 
    2964     } 
    2965 #endif 
     2971      for(pos=0; pos<logo_size; pos++){ 
     2972          char data = logo[pos]; 
     2973          color c = color_lookup[(data>>5) & 0x07]; 
     2974          for(i=0; i<(data&0x1F)+1; i++){ 
     2975              if (c!=0x00){ 
     2976                  draw_pixel(offset_x+mx,offset_y+my,c); 
     2977              } 
     2978              if (mx==149){ 
     2979                  mx=0; 
     2980                  my++; 
     2981              }else{ 
     2982                  mx++; 
     2983              }      
     2984          } 
     2985      } 
     2986    } 
    29662987} 
    29672988 
Note: See TracChangeset for help on using the changeset viewer.