Subversion Repositories Kolibri OS

Rev

Rev 4225 | Rev 5441 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4225 Rev 5435
Line 1... Line -...
1
//Leency 2008-2013
-
 
2
 
-
 
3
 
-
 
4
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
-
 
5
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
-
 
6
 
-
 
7
 
-
 
8
void ShowMessage(dword message, pause_duration)
-
 
9
{
-
 
10
	int form_x=files.w-220/2+files.x;
-
 
11
	int form_y=160;
-
 
12
	DrawPopup(form_x,form_y,220,80,1,sc.work,sc.work_graph);
-
 
13
	WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,sc.work_text,message);
-
 
14
	pause(pause_duration);
-
 
15
	if (pause_duration) List_ReDraw();
-
 
16
}
-
 
17
 
-
 
18
inline fastcall signed int _strrchr( ESI,BL)
-
 
19
{
-
 
20
	int jj=0, last=strlen(ESI);
-
 
21
	do{
-
 
22
		jj++;
-
 
23
		$lodsb
-
 
24
		IF(AL==BL) last=jj;
-
 
25
	} while(AL!=0);
-
 
26
	return last;
-
 
27
}
-
 
28
 
-
 
Line 29... Line 1...
29
 
1
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,
30
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,
2
0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
Line 31... Line 3...
31
0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
3
 
Line 74... Line 46...
74
	if (h <= 14) fill_h = h; else fill_h = 14;
46
	for (i=0; i
75
	for (i=0; i
47
	DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);		
76
	DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);		
48
}
77
}
49
 
Line 78... Line -...
78
 
-
 
79
 
-
 
80
 
-
 
81
 
-
 
82
 
-
 
83
 
-
 
84
struct rd_info
-
 
85
{
50
void ShowMessage(dword message, pause_duration)
86
	dword function_number, reserved[4];
-
 
87
	char path[4];
-
 
88
} rd_info;
-
 
89
 
-
 
90
#define ALL_RD_CLUSTERS 2847
-
 
91
int GetFreeRamDiskClusters()
-
 
92
{
-
 
93
	dword free_size;
-
 
94
	static dword old_free_size;
-
 
95
 
-
 
96
	rd_info.function_number = 15;
-
 
97
	strcpy(#rd_info.path, "/rd");
-
 
98
	$mov eax,58
-
 
99
	$mov ebx, #rd_info;
-
 
100
	$int 0x40
-
 
101
	if (EAX==0)
-
 
102
	{
-
 
103
		free_size=ECX;
-
 
104
		old_free_size = ECX;
-
 
105
	}
-
 
106
	else
51
{
-
 
52
	int form_x=files.w-220/2+files.x;
107
	{
53
	int form_y=160;
-
 
54
	DrawPopup(form_x,form_y,220,80,1,sc.work,sc.work_graph);
-
 
55
	WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,sc.work_text,message);
108
		debugi(EAX);
56
	pause(pause_duration);
109
		free_size = old_free_size;
-
 
110
	}
57
	if (pause_duration) List_ReDraw();
111
	return free_size;
58
}
112
}
59
>