Added info on Grow/Shrink to docs. More playing with hq4x before bedtime.

This commit is contained in:
William Kendrick 2003-12-21 01:23:42 +00:00
parent 8ab8165e6b
commit e65e4799f9
6 changed files with 31 additions and 11 deletions

View file

@ -36,7 +36,7 @@
#define PIXEL00_80 Interp8(dest, x * 4 + 0, y * 4 + 0, w[5], w[1], a)
#define PIXEL00_81 Interp8(dest, x * 4 + 0, y * 4 + 0, w[5], w[4], a)
#define PIXEL00_82 Interp8(dest, x * 4 + 0, y * 4 + 0, w[5], w[2], a)
#define PIXEL01_0 Interp0(dest, x * 4 + 0, y * 4 + 0, w[5], a)
#define PIXEL01_0 Interp0(dest, x * 4 + 1, y * 4 + 0, w[5], a)
#define PIXEL01_10 Interp1(dest, x * 4 + 1, y * 4 + 0, w[5], w[1], a)
#define PIXEL01_12 Interp1(dest, x * 4 + 1, y * 4 + 0, w[5], w[2], a)
#define PIXEL01_14 Interp1(dest, x * 4 + 1, y * 4 + 0, w[2], w[5], a)

View file

@ -89,6 +89,9 @@ Uint16 hqxx_getpixel(SDL_Surface * surface, int x, int y, Uint8 * alpha)
SDL_GetRGBA(pixel, surface->format, &r, &g, &b, alpha);
/* (Perhaps reducing the number of colors by chopping off the bottoms of
R, G and B will help?) */
pixel16 = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
return pixel16;

View file

@ -35,9 +35,9 @@
//trU in 32 = 0x00000700
//trV in 32 = 0x00000006
#define trY 0x3000
#define trU 0x00C0
#define trV 0x0006
#define trY ((0x30 & 0xF8) << 8)
#define trU ((0x07 & 0x7E) << 3)
#define trV ((0x06 & 0x1F))
Uint16 hqxx_getpixel(SDL_Surface * surface, int x, int y, Uint8 * alpha);