Hello forum.
I am new here but first let me say i have searched around a bit but i think i am lacking some keywords to find what i am looking for.
I have a loop that draws a dbBox() on the screen in the places that correspond to a 2d array called map. so if any given slot on a map = 1 then i draw a box in its corresponding place.
This drawing function is called within the while (loopGDK) thing from the example/wizard thing.
My problem is nothing is showing up at all. i have tried calling the drawing function outside of the loop and the same thing happens. at one point before i got the drawing loop done i had managed to make it draw then entire designated map space RED, this happened because i forgot to make it only draw when the array entry = 1. however i cannot replicate this either.
this is my code to draw it:
int CurX = 1;
int CurY = 1;
dbInk( dbRGB(255, 0, 0), dbRGB(0, 0, 0) );
for ( int y = 1; y < 11; y++) {
for ( int x = 1; x < 11; x++) {
if (map[CurX][CurY] == 1) {
dbBox( CurX - 1 * tileS, CurY - 1 * tileS, CurX * tileS, CurY * tileS);
}
CurX++;
}
CurX = 1;
CurY++;
}
it is pretty simple and i have done something practically the same as this a few times before in java script (yes i understand the differences) however i just cannot seem to get it to work.
NOTE: possible unrelated as i am not sure when it started happening (ie. before or after i started doing the dbBox draw loop) but i now cannot close the program by pressing escape or even by pressing the X on the top right of the window any more it just throws an un-handled exception. maybe completely unrelated and just something else i broke but thought it may help.
Thank you in advance and if you need more code to help me sort this out just ask.
thank you very much guys,
Nekroze
I swear to the programmers bible that I shall not harm the FPS.