Hello, I am new to this site and to C++.

I have been following a tutorial on how to make a Tetris clone in SDL and C++ from the following site :

http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html

When i was finished going through it all and sorting through all the petty errors I had gotten it ran smoothly, or so I thought.

Everything compiles and the window pops up and the text is shown. All of input works, and you can even get the game over message if you wait long enough. but other then the text, nothing is visible, such as the blocks or background.

I thought i maybe skipped out on a piece of the code and decided to try and compile the source code provided on the site which came up with the same result.

Prior to this I followed more beginner tutorials and was able to get an image drawn to the screen blitting with SDL, which to me rules out it being my computer or settings.

Does anyone have any idea to why this would happen?

Any help would be appreciated. Thanks in advanced,
Mason

Did you make sure that SDL_LoadBitmap() has a valid output. In other words, those the bitmap load properly? Because the tutorial gives a Unix-style file path for the image, maybe it is wrong?

Well I just tried to put the BMP into the root directory into the "Data" folder then just use the following code..

g_Bitmap = SDL_LoadBMP("FallingBlocks.bmp");

Ive tried changing the file name, removing the .bmp, different paths, etc. And it is still not working.

Has anyone tried to compile the source from the site? I'm curious to whether its just me or not..

Thanks for the answer!

Ok so I stumbled upon a little bit of information that clears things up a little bit, but I am still not sure how to fix it. Maybe someone else has more experience with this than me.

I ran a test like this :

if (g_Bitmap == NULL) {
    DisplayText("Not Loading Image", 10 , 10, 24, 255, 255, 255, 0,0,0);
	}

And that text did show up, meaning that the image is not even getting loaded. is there anything i can try to get this .BMP file noticed and loaded into SDL?

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.