More common things moved out from the GFX plugins. No visible changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@27 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-07-18 19:33:55 +00:00
parent ca13c54855
commit b3c55018a6
36 changed files with 857 additions and 924 deletions

View File

@ -0,0 +1,27 @@
#include "LookUpTables.h"
int lut3to8[8];
int lut4to8[16];
int lut5to8[32];
int lut6to8[64];
float lutu8tosfloat[256];
float lutu8toufloat[256];
float luts8tosfloat[256];
void InitLUTs()
{
for (int i = 0; i < 8; i++)
lut3to8[i] = (i*255) / 7;
for (int i = 0; i < 16; i++)
lut4to8[i] = (i*255) / 15;
for (int i = 0; i < 32; i++)
lut5to8[i] = (i*255) / 31;
for (int i = 0; i < 64; i++)
lut6to8[i] = (i*255) / 63;
for (int i = 0; i < 256; i++)
{
lutu8tosfloat[i] = (float)(i-128) / 127.0f;
lutu8toufloat[i] = (float)(i) / 255.0f;
luts8tosfloat[i] = ((float)(signed char)(char)i) / 127.0f;
}
}