Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9439 leency 1
 
2
	static dword bg;
3
	static dword shared;
4
	static dword icon32mem;
5
	dword size;
6
	if (!shared) || (bg!=_bg) {
7
		if (shared = memopen("ICONS32", NULL, SHM_READ))
8
		{
9
			size = EDX;
10
			if (!icon32mem) icon32mem = malloc(size);
11
			memmov(icon32mem, shared, size);
12
			EDX = icon32mem + size;
13
			EAX = bg = _bg;
14
			for (ESI = icon32mem; ESI < EDX; ESI += 4) {
15
				if (DSDWORD[ESI]==0x00000000) DSDWORD[ESI] = EAX;
16
			}
17
		}
18
	}
19
	if (icon32mem) {
20
		PutPaletteImage(32*32*4*_icon_n + icon32mem, 32, 32,_x, _y, 32, 0);
21
		return true;
22
	}
23
	return false;
24
}
25
26
 
27
	static dword shared_i16;
28
	if (!shared_i16) shared_i16 = memopen("ICONS18", NULL, SHM_READ);
29
	if (shared_i16) {
30
		PutPaletteImage(18*18*4*_icon_n + shared_i16, 18, 18,_x, _y, 32, 0);
31
		return true;
32
	}
33
	return false;
34
}
35
36
 
37
	static dword shared_i16w;
38
	if (!shared_i16w) shared_i16w = memopen("ICONS18W", NULL, SHM_READ);
39
	if (shared_i16w) {
40
		PutPaletteImage(18*18*4*_icon_n + shared_i16w, 18, 18,_x, _y, 32, 0);
41
		return true;
42
	}
43
	return false;
44
}
45