Rev 7995 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7995 | Rev 8008 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | struct s_image |
1 | struct img |
2 | { |
2 | { |
3 | dword *image; |
3 | collection src; |
4 | char path[4096]; |
4 | collection_img data; |
- | 5 | collection_int xywh; |
|
- | 6 | drop(); |
|
5 | }; |
7 | }; |
Line 6... | Line -... | ||
6 | - | ||
7 | s_image pics[100]; //pics = mem_Alloc( 100*sizeof(s_image) ); |
- | |
8 | - | ||
9 | struct ImageCache { |
- | |
10 | int pics_count; |
- | |
11 | void Free(); |
- | |
12 | int GetImage(); |
- | |
13 | void Images(); |
- | |
14 | }; |
- | |
15 | 8 | ||
16 | void ImageCache::Free() |
- | |
17 | { |
- | |
18 | for ( ; pics_count>0; pics_count--) |
- | |
19 | { |
- | |
20 | if (pics[pics_count].image) img_destroy stdcall (pics[pics_count].image); |
- | |
21 | pics[pics_count].path = NULL; |
- | |
22 | } |
- | |
23 | } |
- | |
24 | - | ||
25 | int ImageCache::GetImage(dword i_path) |
9 | void img::drop() |
26 | { |
- | |
27 | int i; |
10 | { |
28 | return 0; |
- | |
29 | for (i=0; i<=pics_count; i++) if (!strcmp(#pics[i].path, i_path)) return i; //image exists |
- | |
30 | // Load image and add it to Cache |
11 | src.drop(); |
31 | pics_count++; |
- | |
32 | //pics[pics_count].image = load_EEERRRR_image(i_path); |
- | |
33 | //strcpy(#pics[pics_count].path, i_path); |
- | |
34 | return pics_count; |
12 | data.drop(); |
Line 35... | Line 13... | ||
35 | } |
13 | } |
36 | 14 |