ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/util/enlarge/filla.C
(Generate patch)

Comparing deliantra/util/enlarge/filla.C (file contents):
Revision 1.1 by root, Sun Mar 4 00:53:45 2007 UTC vs.
Revision 1.2 by root, Sun Mar 4 01:45:42 2007 UTC

26#include <endian.h> 26#include <endian.h>
27 27
28using namespace std; 28using namespace std;
29 29
30#if __BYTE_ORDER == __BIG_ENDIAN 30#if __BYTE_ORDER == __BIG_ENDIAN
31# define Rmask 0xff000000UL
32# define Gmask 0x00ff0000UL
33# define Bmask 0x0000ff00UL
34# define Amask 0x000000ffUL
35# define Rshift 24 31# define Rshift 24
36# define Gshift 16 32# define Gshift 16
37# define Bshift 8 33# define Bshift 8
38# define Ashift 0 34# define Ashift 0
39#else 35#else
40# define Rmask 0x000000ffUL
41# define Gmask 0x0000ff00UL
42# define Bmask 0x00ff0000UL
43# define Amask 0xff000000UL
44# define Rshift 0 36# define Rshift 0
45# define Gshift 8 37# define Gshift 8
46# define Bshift 16 38# define Bshift 16
47# define Ashift 24 39# define Ashift 24
48#endif 40#endif
49 41
50#define Cmask 0xffUL 42#define Cmask 0xffUL
43#define Amask (Cmask << Ashift)
51 44
52typedef uint32_t pixel; 45typedef uint32_t pixel;
53 46
54inline void gather (pixel *img, char *flag, int x, int y, int w, int h, int &c, int &r, int &g, int &b) 47inline void gather (pixel *img, char *flag, int x, int y, int w, int h, int &c, int &r, int &g, int &b)
55{ 48{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines