alright so i set the number in the array to zero.
int map[30][30] = {
{0, 0 , 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
};
and the for loop i think i did it wrong
i did dbLoadImage("Sprite1.bmp",50);
dbSprite(50,0,0,50);
dbHideSprite(50);
then in the for loop i did dbPasteSprite(50);
here is the full code
#include "DarkGDK.h"
void DarkGDK() {
dbSyncOn();
dbSyncRate(60);
dbLoadImage("Sprite1.bmp",50);
dbSprite(50,0,0,50);
dbHideSprite(50);
int map[30][30] = {
{0, 0 , 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
};
while (LoopGDK())
{
dbCLS();
for (int y = 4; y < 12; ++y)
{
for (int x = 4; x < 12; ++x)
{
if(map[y][x] > 0)
{
dbPasteSprite(50,x * 40,y * 15);
}
//dbSetSpriteFrame(1, map[y][x]);
//dbPasteSprite(1, x * 40, y * 15);
}
}
dbSync();
}
return;
}
i have a feeling that it is totaly wrong what i dind in the for loop