2013-02-04 13:05:35 -08:00
|
|
|
/*
|
|
|
|
This file is used for everything related to maps/tables including their definition, functions etc
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct table {
|
|
|
|
//All tables must be the same size for simplicity
|
|
|
|
const static int xSize = 8;
|
|
|
|
const static int ySize = 8;
|
|
|
|
|
|
|
|
int values[xSize][ySize];
|
2013-02-05 00:27:06 -08:00
|
|
|
int axisX[xSize];
|
|
|
|
int axisY[ySize];
|
2013-02-04 13:05:35 -08:00
|
|
|
//static boolean useInterp = false; //Whether or not interpolation should be used (Assuming we have enough CPU for it)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-02-05 00:27:06 -08:00
|
|
|
/*
|
|
|
|
Tables have an origin (0,0) in the top left hand corner. Vertical axis is expressed first.
|
|
|
|
Eg: 2x2 table
|
|
|
|
-----
|
|
|
|
|2 7|
|
|
|
|
|1 4|
|
|
|
|
-----
|
|
|
|
|
|
|
|
(0,1) = 7
|
|
|
|
(0,0) = 2
|
|
|
|
(1,0) = 1
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
int getTableValue(struct table fromTable, int Y, int X)
|
2013-02-04 13:05:35 -08:00
|
|
|
{
|
2013-02-05 00:27:06 -08:00
|
|
|
for (int x = 0; x < fromTable.xSize; x++)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
return 1;
|
2013-02-04 13:05:35 -08:00
|
|
|
}
|