SDL CSprite.draw segfault. Very confusing.
Map is a struct containing the CSprite (the csprite class can be found at the cone3d.gamedev.net SDL tutorials).
if (map->used[i][a] == 1)
cout << "Used tile!\n";
int x = (i * tile_width) - CamOffX;
int y = (a * tile_height) - CamOffY;
cout << "Set tile!\nX/Y: " << x << '/' << y << endl;
cout << "Drawn Tile!\n";
It sets just fine, but when i try to draw it, SDL parachute gets deployed on a segfault.
Will post entire code if needed. Thanks in advance.