Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7998 → Rev 7997

/programs/cmm/lib/patterns/libimg_load_skin.h
0,0 → 1,73
#ifndef INCLUDE_LIBIMG_LOAD_SKIN_H
#define INCLUDE_LIBIMG_LOAD_SKIN_H
 
#ifndef INCLUDE_LIBIMG_H
#include "../lib/obj/libimg.h"
#endif
 
:struct libimg_image {
dword image, w, h, imgsrc;
void load_as24b();
void load();
void replace_color();
} skin;
 
:void libimg_image::load_as24b(dword file_path)
{
dword image_pointer = load_image(file_path);
if (!image_pointer) notify("'Error: Image not loaded' -E");
 
img_convert stdcall(image_pointer, 0, Image_bpp24, 0, 0);
if (!EAX) {
notify("'Error: Image can not be converted to 24b' -E");
} else {
image = image_pointer = EAX;
w = DSWORD[image_pointer+4];
h = DSWORD[image_pointer+8];
imgsrc = ESDWORD[image_pointer+24];
}
}
 
:void libimg_image::load(dword file_path)
{
dword image_pointer = load_image(file_path);
if (!EAX) {
notify("'Error: Image not loaded' -E");
} else {
image = image_pointer = EAX;
w = DSWORD[image_pointer+4];
h = DSWORD[image_pointer+8];
imgsrc = ESDWORD[image_pointer+24];
}
 
}
 
:void libimg_image::replace_color(dword old_color, new_color)
{
dword i, max_i;
max_i = w * h * 4 + imgsrc;
for (i = imgsrc; i < max_i; i += 4) if (DSDWORD[i]==old_color) DSDWORD[i] = new_color;
}
 
:libimg_image icons32draw;
:void DrawIcon32(dword x,y, bg, icon_n) {
//load_dll(libimg, #libimg_init,1);
if (!icons32draw.image) {
icons32draw.load("/sys/icons32.png");
icons32draw.replace_color(0x00000000, bg);
}
if (icon_n>=0) img_draw stdcall(icons32draw.image, x, y, 32, 32, 0, icon_n*32);
}
 
:libimg_image icons16draw;
:void DrawIcon16(dword x,y, bg, icon_n) {
//load_dll(libimg, #libimg_init,1);
if (!icons16draw.image) {
icons16draw.load("/sys/icons16.png");
icons16draw.replace_color(0xffFFFfff, bg);
icons16draw.replace_color(0xffCACBD6, MixColors(bg, 0, 220));
}
if (icon_n>=0) img_draw stdcall(icons16draw.image, x, y, 16, 16, 0, icon_n*16);
}
 
#endif
/programs/cmm/lib/gui.h
206,7 → 206,7
DrawBar(x,y+8,w,1,0x4E00E7);
}
 
:void PutShadow(dword x,y,w,h,skinned, signed strength)
:void PutShadow(dword x,y,w,h,skinned,strength)
{
proc_info wForm;
dword shadow_buf = mem_Alloc(w*h*3);
260,15 → 260,14
return gray;
}
 
:void ShadowImage(dword color_image, w, h, signed strength)
:void ShadowImage(dword color_image, w, h, strength)
{
byte col;
dword to;
dword col, to;
strength = 10 - strength;
to = w*h*3 + color_image;
for ( ; color_image < to; color_image++)
{
col = math.min(strength * DSBYTE[color_image] / 10, 255);
col = strength * DSBYTE[color_image] / 10;
DSBYTE[color_image] = col;
}
}
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager 4.46"
#define ABOUT_TITLE "EOLITE 4.46"
#define TITLE "Eolite File Manager 4.45"
#define ABOUT_TITLE "EOLITE 4.45"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"
/programs/cmm/eolite/include/copy_and_delete.h
87,19 → 87,8
if (getElementSelectedFlag(i) == true) {
sprintf(copy_buf_offset,"%s/%s",#path,items.get(i)*304+buf+72);
copy_buf_offset += strlen(copy_buf_offset) + 1;
 
setElementSelectedFlag(i, false);
 
if (cut_active) {
if (i>=files.first) && (i<files.first+files.visible)
PutShadow(files.x+4,i-files.first*files.item_h+files.y,16,files.item_h,1,-3);
}
}
}
if (cut_active) {
pause(20);
List_ReDraw();
}
if (selected_count==1) setElementSelectedFlag(files.cur_y, false);
Clipboard__SetSlotData(size_buf, buff_data);
free(buff_data);