#include "blue-dream.h"

t_dword unpack_dword(t_byte *u, t_qword v)
{
	t_dword w, x, y, z;

	w = u[v + 0] << 24;
	x = u[v + 1] << 16;
	y = u[v + 2] << 8;
	z = u[v + 3];

	return w | x | y | z;
}

t_word unpack_word(t_byte *u, t_qword v)
{
	t_word x, y;

	x = u[v + 0] << 8;
	y = u[v + 1];

	return x | y;
}