14 lines
390 B
C++
14 lines
390 B
C++
#include "texture.h"
|
|
|
|
static unsigned char black[1]={255};
|
|
|
|
static unsigned char* textures[]={black};
|
|
static unsigned char sizes[2][]={{8,8}};
|
|
|
|
int FE_getPixelColor(int num, float x, float y)
|
|
{
|
|
if (y>1 || y<0 || x>1 || x<0) return -1;
|
|
unsigned char texture=textures[num];
|
|
int ix=x*sizes[0][num], iy=y*sizes[1][num];
|
|
return (7-x%8 >>texture[(ix/8+iy*sizes[0][num])/8])&1); // à revoir
|
|
} |