Code: Select all
std::string tilefile[5] = {"Textures/picket_fence","Textures/picket_fence","Textures/picket_fence","Textures/picket_fence","Textures/picket_fence"};
SDL_Surface *tiles[5]= NULL;
That is the buggy part, but in case you are wondering, I'm going to display them like this:
Code: Select all
for(int i = 0; i < 5; i++){
apply_surface(i*32-32,0,tiles[i],screen);
}
Tilefile is just the file names of the tiles. I have 29 of them, and I'm going to make a tilesheet soon instead, but This is just a test.