--- deliantra/server/utils/cfhq2xa.C 2007/11/08 19:43:30 1.5 +++ deliantra/server/utils/cfhq2xa.C 2009/11/06 12:27:06 1.7 @@ -4,18 +4,19 @@ * Copyright (©) 2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2003,2007 MaxSt * - * Deliantra is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Deliantra is free software: you can redistribute it and/or modify it under + * the terms of the Affero GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the Affero GNU General Public License + * and the GNU General Public License along with this program. If not, see + * . * * The authors can be reached via e-mail to */ @@ -67,7 +68,7 @@ return ((((c1 >> shift) & Cmask) * w1 + ((c2 >> shift) & Cmask) * w2 + ((c3 >> shift) & Cmask) * w3 + w / 2) / w) << shift; } -inline void lerp (unsigned char *pc, pixel c1, int w1, pixel c2, int w2, pixel c3 = 0, int w3 = 0) +static inline void lerp (unsigned char *pc, pixel c1, int w1, pixel c2, int w2, pixel c3 = 0, int w3 = 0) { *(pixel *)pc = lerp (c1, w1, c2, w2, c3, w3, Rshift) | lerp (c1, w1, c2, w2, c3, w3, Gshift) @@ -75,37 +76,37 @@ | lerp (c1, w1, c2, w2, c3, w3, Ashift); } -inline void Interp1 (unsigned char *pc, pixel c1, pixel c2) +static inline void Interp1 (unsigned char *pc, pixel c1, pixel c2) { lerp (pc, c1, 3, c2, 1); } -inline void Interp2 (unsigned char *pc, pixel c1, pixel c2, pixel c3) +static inline void Interp2 (unsigned char *pc, pixel c1, pixel c2, pixel c3) { lerp (pc, c1, 2, c2, 1, c3, 1); } -inline void Interp5 (unsigned char *pc, pixel c1, pixel c2) +static inline void Interp5 (unsigned char *pc, pixel c1, pixel c2) { lerp (pc, c1, 1, c2, 1); } -inline void Interp6 (unsigned char *pc, pixel c1, pixel c2, pixel c3) +static inline void Interp6 (unsigned char *pc, pixel c1, pixel c2, pixel c3) { lerp (pc, c1, 5, c2, 2, c3, 1); } -inline void Interp7 (unsigned char *pc, pixel c1, pixel c2, pixel c3) +static inline void Interp7 (unsigned char *pc, pixel c1, pixel c2, pixel c3) { lerp (pc, c1, 6, c2, 1, c3, 1); } -inline void Interp9 (unsigned char *pc, pixel c1, pixel c2, pixel c3) +static inline void Interp9 (unsigned char *pc, pixel c1, pixel c2, pixel c3) { lerp (pc, c1, 2, c2, 3, c2, 3); } -inline void Interp10 (unsigned char *pc, pixel c1, pixel c2, pixel c3) +static inline void Interp10 (unsigned char *pc, pixel c1, pixel c2, pixel c3) { lerp (pc, c1, 14, c2, 1, c3, 1); } @@ -159,7 +160,7 @@ #define PIXEL11_90 Interp9(pOut+BpL + sizeof (pixel), w[5], w[6], w[8]); #define PIXEL11_100 Interp10(pOut+BpL + sizeof (pixel), w[5], w[6], w[8]); -inline pixel RGBAtoYUVA (pixel w) +static inline pixel RGBAtoYUVA (pixel w) { int r = (w >> Rshift) & Cmask; int g = (w >> Gshift) & Cmask; @@ -176,7 +177,7 @@ | (a << Ashift); } -inline bool Diff (pixel w1, pixel w2) +static inline bool Diff (pixel w1, pixel w2) { pixel YUV1 = RGBAtoYUVA (w1); pixel YUV2 = RGBAtoYUVA (w2);