1 | /* |
1 | /* |
2 | * static char *rcsid_png_c = |
2 | * static char *rcsid_png_c = |
3 | * "$Id: png.c,v 1.1.1.1 2006/02/03 07:11:45 root Exp $"; |
3 | * "$Id: png.c,v 1.3 2006/08/13 17:16:01 elmex dead $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | Crossfire client, a client program for the crossfire program. |
6 | Crossfire client, a client program for the crossfire program. |
7 | |
7 | |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
… | |
… | |
71 | * and try to find a match against that. The reason for this is that |
71 | * and try to find a match against that. The reason for this is that |
72 | * XAllocColor is a very slow routine. Before my optimizations, |
72 | * XAllocColor is a very slow routine. Before my optimizations, |
73 | * png loading took about 140 seconds, of which 60 seconds of that |
73 | * png loading took about 140 seconds, of which 60 seconds of that |
74 | * was in XAllocColor calls. |
74 | * was in XAllocColor calls. |
75 | */ |
75 | */ |
76 | long pngx_find_color(Display *display, Colormap *cmap, int red, int green, int blue) |
76 | static long pngx_find_color(Display *display, Colormap *cmap, int red, int green, int blue) |
77 | { |
77 | { |
78 | |
78 | |
79 | int i, closeness=0xffffff, close_entry=-1, tmpclose; |
79 | int i, closeness=0xffffff, close_entry=-1, tmpclose; |
80 | XColor scolor; |
80 | XColor scolor; |
81 | |
81 | |