Rev 1287 | Rev 1312 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1287 | Rev 1298 | ||
---|---|---|---|
Line 83... | Line 83... | ||
83 | /** Put pixel - 24-bit depth */ |
83 | /** Put pixel - 24-bit depth */ |
84 | static void putpixel_3byte(unsigned int x, unsigned int y, int color) |
84 | static void putpixel_3byte(unsigned int x, unsigned int y, int color) |
85 | { |
85 | { |
86 | unsigned int startbyte = POINTPOS(x, y); |
86 | unsigned int startbyte = POINTPOS(x, y); |
87 | 87 | ||
- | 88 | #ifdef BIG_ENDIAN |
|
88 | fbaddress[startbyte] = RED(color, 8); |
89 | fbaddress[startbyte] = RED(color, 8); |
89 | fbaddress[startbyte + 1] = GREEN(color, 8); |
90 | fbaddress[startbyte + 1] = GREEN(color, 8); |
90 | fbaddress[startbyte + 2] = BLUE(color, 8); |
91 | fbaddress[startbyte + 2] = BLUE(color, 8); |
- | 92 | #else |
|
- | 93 | fbaddress[startbyte + 2] = RED(color, 8); |
|
- | 94 | fbaddress[startbyte + 1] = GREEN(color, 8); |
|
- | 95 | fbaddress[startbyte + 0] = BLUE(color, 8); |
|
- | 96 | #endif |
|
91 | } |
97 | } |
92 | 98 | ||
93 | /** Return pixel color - 24-bit depth */ |
99 | /** Return pixel color - 24-bit depth */ |
94 | static int getpixel_3byte(unsigned int x, unsigned int y) |
100 | static int getpixel_3byte(unsigned int x, unsigned int y) |
95 | { |
101 | { |
96 | unsigned int startbyte = POINTPOS(x, y); |
102 | unsigned int startbyte = POINTPOS(x, y); |
97 | 103 | ||
- | 104 | #ifdef BIG_ENDIAN |
|
98 | return fbaddress[startbyte] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 2]; |
105 | return fbaddress[startbyte] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 2]; |
- | 106 | #else |
|
- | 107 | return fbaddress[startbyte + 2] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 0]; |
|
- | 108 | #endif |
|
99 | } |
109 | } |
100 | 110 | ||
101 | /** Put pixel - 16-bit depth (5:6:6) */ |
111 | /** Put pixel - 16-bit depth (5:6:6) */ |
102 | static void putpixel_2byte(unsigned int x, unsigned int y, int color) |
112 | static void putpixel_2byte(unsigned int x, unsigned int y, int color) |
103 | { |
113 | { |