shithub: riscv

ref: 8a4a2dea70aa77475a50968f4c5bd6cdab5d2fb1
dir: /sys/src/games/doom/pal.c/

View raw version
#include <u.h>
#include <libc.h>

void
pal2xrgb(u32int *pal, u8int *s, u32int *d, int n, int scale)
{
	int i;
	u32int c;

	while(n-- > 0){
		c = pal[*s++];
		for(i = 0; i < scale; i++)
			*d++ = c;
	}
}