Changeset 656
- Timestamp:
- 12/29/08 06:11:21 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 5 edited
-
CHDK/DATA (added)
-
CHDK/DATA/logo.dat (added)
-
CHDK/SCRIPTS/TEST/badpixel.lua (modified) (1 diff)
-
Makefile (modified) (1 diff)
-
buildconf.inc (modified) (1 diff)
-
core/Makefile (modified) (1 diff)
-
core/gui.c (modified) (7 diffs)
-
core/gui_logo.h (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHDK/SCRIPTS/TEST/badpixel.lua
r629 r656 41 41 end 42 42 os.remove("A/CHDK/bad_tmp.bin") 43 else44 print("Try this script again...")45 end43 else 44 print("Try this script again...") 45 end -
trunk/Makefile
r632 r656 96 96 zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/BOOKS/* > $(DEVNULL) 97 97 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) 98 99 zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/FONTS/* > $(DEVNULL) 99 100 zip -9 $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(topdir)CHDK/GAMES/* > $(DEVNULL) -
trunk/buildconf.inc
r649 r656 6 6 OPT_GAME_CONNECT4=1 7 7 OPT_GAME_MASTERMIND=1 8 OPT_BOOTLOGO=19 8 OPT_CURVES=1 10 9 OPT_TEXTREADER=1 -
trunk/core/Makefile
r649 r656 28 28 CFLAGS+=-DOPT_GAME_MASTERMIND 29 29 OPT_OBJS+=gui_mastermind.o 30 endif31 ifdef OPT_BOOTLOGO32 CFLAGS+=-DOPT_BOOTLOGO33 30 endif 34 31 ifdef OPT_CURVES -
trunk/core/gui.c
r655 r656 42 42 #ifdef OPT_CURVES 43 43 #include "curves.h" 44 #endif45 #ifdef OPT_BOOTLOGO46 #include "gui_logo.h"47 44 #endif 48 45 #include "edgeoverlay.h" … … 120 117 static void gui_draw_osd(); 121 118 122 123 static void gui_draw_splash(); 124 119 static void gui_draw_splash(char* logo, int logo_size); 125 120 126 121 void user_menu_save(); … … 2030 2025 } 2031 2026 2032 //------------------------------------------------------------------- 2033 void gui_redraw() 2034 { 2035 enum Gui_Mode gui_mode_old; 2036 static int show_script_console=0; 2037 2038 2027 static void gui_handle_splash(void) { 2028 static char *logo = NULL; 2029 static int logo_size; 2039 2030 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 } 2040 2053 if (gui_splash>(SPLASH_TIME-4)) { 2041 gui_draw_splash( );2054 gui_draw_splash(logo,logo_size); 2042 2055 // conf.show_osd = 0; 2043 2056 } else if (gui_splash==1 && (mode_get()&MODE_MASK) == gui_splash_mode && (gui_mode==GUI_MODE_NONE || gui_mode==GUI_MODE_ALT)) { … … 2046 2059 } 2047 2060 --gui_splash; 2048 } 2049 2061 if(!gui_splash) { 2062 free(logo); 2063 } 2064 } 2065 } 2066 2067 //------------------------------------------------------------------- 2068 void gui_redraw() 2069 { 2070 enum Gui_Mode gui_mode_old; 2071 static int show_script_console=0; 2072 2073 gui_handle_splash(); 2050 2074 2051 2075 gui_in_redraw = 1; … … 2913 2937 //------------------------------------------------------------------- 2914 2938 2915 void gui_draw_splash( ) {2939 void gui_draw_splash(char* logo, int logo_size) { 2916 2940 coord w, h, x, y; 2917 2941 static const char *text[] = { … … 2920 2944 "Camera: " PLATFORM " - " PLATFORMSUB }; 2921 2945 int i, l; 2922 // color cl = MAKE_COLOR((gui_splash_mode==MODE_REC)?0xDA:0xD9, COLOR_WHITE);2923 2946 color cl = MAKE_COLOR(COLOR_RED, COLOR_WHITE); 2924 2947 2925 2926 2948 gui_splash_mode = (mode_get()&MODE_MASK); 2927 2949 2928 2950 h=sizeof(text)/sizeof(text[0])*FONT_HEIGHT+8; 2929 2951 w=0; … … 2939 2961 draw_string(x+((w-strlen(text[i])*FONT_WIDTH)>>1), y+i*FONT_HEIGHT+4, text[i], cl); 2940 2962 } 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}; 2948 2970 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 } 2966 2987 } 2967 2988
Note: See TracChangeset
for help on using the changeset viewer.