replace pointer table to textures by huge texture table
optimization
This commit is contained in:
parent
8b8b2665bd
commit
bf07238dc7
|
@ -4,10 +4,12 @@ static unsigned char const blanc[8]={0,0,0,0,0,0,0,0};
|
|||
static unsigned char const noir[8]={255,255,255,255,255,255,255,255};
|
||||
|
||||
// textures address
|
||||
unsigned char const * const FE_textures[2]={blanc,noir};
|
||||
|
||||
bool FE_get_pixel(int texture_num,int x, int y)
|
||||
unsigned char const * const FE_textures[2][8]=
|
||||
{
|
||||
unsigned char* texture=FE_textures[texture_num];
|
||||
return (1<<(7-x)&texture[y]);
|
||||
}
|
||||
{0,0,0,0,0,0,0,0}, // full white
|
||||
{255,255,255,255,255,255,255,255}, // full black
|
||||
};
|
||||
|
||||
|
||||
bool FE_get_pixel(int num,int x, int y)
|
||||
{return (1<<(7-x)FE_textures[num][y]);}
|
Loading…
Reference in New Issue