De-duplicate number of menu text bytes

I've moved this to a define that gets declared in Game.h. I could've
made it a const int, but that's only legal in C++ mode.
This commit is contained in:
Misa
2021-03-06 18:14:44 -08:00
committed by Ethan Lee
parent 40c6a01917
commit 22d71affba
3 changed files with 7 additions and 6 deletions

View File

@@ -1420,10 +1420,10 @@ void Graphics::drawmenu( int cr, int cg, int cb, bool levelmenu /*= false*/ )
}
}
char tempstring[Game::menutextbytes];
char tempstring[MENU_TEXT_BYTES];
SDL_strlcpy(tempstring, opt.text, sizeof(tempstring));
char buffer[Game::menutextbytes];
char buffer[MENU_TEXT_BYTES];
if ((int) i == game.currentmenuoption)
{
if (opt.active)