Hey guys so here's my problem, ive copied more or less what ive seen from Pizzaman's 2d tile guide(dont remember the link) and im trying to get my map to be drawn according to the 2d Array.
This is what it looks like at the moment.
#define a 1 //air tile
#define r 10 //restriction tile
//On display it shows ROTATED 90 DEGREES TO THE RIGHT
int map[ROWS][COLS] =
{
{r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r},
{r, r, a, r, a, r, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, r},
{r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r, r}
};
And this will give me this output
as you can probably tell its reading the array 90 degrees to the right
When this is done in DB Pro with data statements the display is different.
With this code
data 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
data 10, 10, 1, 10, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,10
data 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,10
data 10, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1,10
data 10, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1,10
data 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,10
data 10, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1, 1, 1,11, 1,11, 1, 1,10
data 10, 1, 1,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11, 1, 1, 1, 1, 1, 1,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11, 1, 1,10,
data 10, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1,11, 1,11, 1, 1, 1, 1, 1, 1, 1, 1,11, 10,11, 10, 10,10
data 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,10
data 10, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1,10
data 10, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1,11,11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,11, 1, 1,10
This is the result
Which is what im TRYING to achieve, i dont want to have to write my map at a 90 degree angle as it will be a nightmare.
All im trying to do is to get the array to output those values the same way the data statement does
this is how im currently displaying the array
for ( int y = 0; y <= 15; y++ )
{
for ( int x = 0; x <= 20; x++ )
{
dbPasteImage( map[x + tilenumx][y + tilenumy], ( x * tilesizex ) - tempx, ( y * tilesizey ) - tempy );
}
}
The code is pretty much the same for both versions.
Please help me out