Okay, so I have this code which just iterates through my object array blitting what needs to be blitted:
void Render()
{
for(int Index = 0; Index < MAX_OBJECT_INSTANCES; Index++)
{
if(Game::ObjectArray[Index].IsActive() == false){}
else
{
if(Game::ObjectArray[Index].IsHidden() == false)
{
SDL_BlitSurface(Game::ObjectArray[Index].CurrentSprite, NULL, Buffer::Screen, &Game::ObjectArray[Index].Position);
}
}
}
}
I had a look in the call stack and I found this:
0x681247d8 SDL_UpperBlit
I have no idea how to fix this. I should also note I am using SDL mixer and SDL image.
SDL_BlitSurface()call.I would suspect that one or more of the arguments is wrong/invalid.