hi in this if statment i want to paste image if lever[r][c]==1 else i want to add space.
i dont know how to add space. my think is that i would have to use dbText() or dbPrint() function?
if(level[r][c] == 1)
{
//dbSprite(1, x*32, y*32, 1);
dbPasteImage(level[r][c], x, y);
x+= COLS;
}
else
{
//put space
}
full codde below
dbLoadImage("wall.bmp",1); //wall
//dbSprite(2,0,0,2);
int x = 0;
int y = 0;
for(int r = 0; r < ROWS; r++)
{
x=0;
for(int c = 0; c < COLS; c++)
{
if(level[r][c] == 1)
{
//dbSprite(1, x*32, y*32, 1);
dbPasteImage(level[r][c], x, y);
x+= COLS;
}
else
{
//put space
}
}
y+= ROWS;
}