mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
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:
@@ -14,10 +14,12 @@ namespace tinyxml2
|
||||
class XMLElement;
|
||||
}
|
||||
|
||||
/* 40 chars (160 bytes) covers the entire screen, + 1 more for null terminator */
|
||||
#define MENU_TEXT_BYTES 161
|
||||
|
||||
struct MenuOption
|
||||
{
|
||||
char text[161]; // 40 chars (160 bytes) covers the entire screen, + 1 more for null terminator
|
||||
// WARNING: should match Game::menutextbytes below
|
||||
char text[MENU_TEXT_BYTES];
|
||||
bool active;
|
||||
};
|
||||
|
||||
@@ -252,7 +254,6 @@ public:
|
||||
int current_credits_list_index;
|
||||
int menuxoff, menuyoff;
|
||||
int menuspacing;
|
||||
static const int menutextbytes = 161; // this is just sizeof(MenuOption::text), but doing that is non-standard
|
||||
std::vector<MenuStackFrame> menustack;
|
||||
|
||||
void inline option(const char* text, bool active = true)
|
||||
|
||||
Reference in New Issue
Block a user