I am getting a similar problem the straight text is overwriting the high card text the problem is in the if/else statements at the bottom, here is my code
if (player_hand.rank == 0)
{
if (arr[0] == 1 && arr[1] == 2 && arr[2] == 3 && arr[3] == 4 && arr[4] == 5)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 2 && arr[1] == 3 && arr[2] == 4 && arr[3] == 5 && arr[4] == 6)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 3 && arr[1] == 4 && arr[2] == 5 && arr[3] == 6 && arr[4] == 7)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 4 && arr[1] == 5 && arr[2] == 6 && arr[3] == 7 && arr[4] == 8)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 5 && arr[1] == 6 && arr[2] == 7 && arr[3] == 8 && arr[4] == 9)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 6 && arr[1] == 7 && arr[2] == 8 && arr[3] == 9 && arr[4] == 10)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 7 && arr[1] == 8 && arr[2] == 9 && arr[3] == 10 && arr[4] == 11)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 8 && arr[1] == 9 && arr[2] == 10 && arr[3] == 11 && arr[4] == 12)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 9 && arr[1] == 10 && arr[2] == 11 && arr[3] == 12 && arr[4] == 13)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 10 && arr[1] == 11 && arr[2] == 12 && arr[3] == 13 && arr[4] == 1)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (flush_found == false)
{
surface_one = TTF_RenderText_Solid(font, text, textColor);
SDL_BlitSurface(surface_one, NULL, gScreenSurface, &score_one);
}
else
{
surface_thirteen = TTF_RenderText_Solid(font, text_six, textColor);
SDL_BlitSurface(surface_thirteen, NULL, gScreenSurface, &score_one);
}
}