hwoarang69 11 Newbie Poster

for some reason iam not getting the right map. i think the problem is

x += 130;
y += 130;





#include "DarkGDK.h"

const int ROWS = 10;
const int COLS = 13;
int level[ROWS][COLS] =    {
    {1,1,1,1,1,1,1,1,1,1,1,1,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,0,0,0,0,0,0,0,1},
    {1,0,0,0,0,1,1,0,0,0,0,0,1},
    {1,0,0,0,0,1,1,0,0,0,0,0,1},
    {1,1,1,1,1,1,1,1,1,1,1,1,1}
};

void DarkGDK(void)
{
    dbSyncOn();
    dbSyncRate(60);
    dbDisableEscapeKey();

    dbLoadImage("rock.bmp", 1);


        int x = 0; 
        int y = 0;
        for(int r = 0; r < ROWS; r++)
        {
            x = 0;
            for(int c = 0; c < COLS; c++)
            {
                dbPasteImage(level[r][c], x, y);
                x += 130;
            }
            y += 130;
        }


    while(LoopGDK())
    {
        if(dbEscapeKey() == 1)
        {
            break;
        }

        dbSync();
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.