--- deliantra/server/utils/cfhq2xa.C 2009/10/12 14:01:00 1.6 +++ deliantra/server/utils/cfhq2xa.C 2010/03/26 00:59:22 1.9 @@ -2,7 +2,7 @@ * This file is part of Deliantra, the Roguelike Realtime MMORPG. * * Copyright (©) 2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team - * Copyright (©) 2003,2007 MaxSt + * Copyright (©) 2003 MaxSt * * 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 @@ -68,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) @@ -76,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); } @@ -160,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; @@ -177,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); @@ -188,7 +188,7 @@ (abs (((YUV1 >> Ashift) & Cmask) - ((YUV2 >> Ashift) & Cmask)) > trA) ); } -void +static void hq2x_32 (unsigned char *pIn, unsigned char *pOut, int Xres, int Yres, int BpL, bool wrap) { int i, j, k;