Rename MAX_SERVER_DESCRIPTION_LENGTH to kMaxServerDescriptionLength

This commit is contained in:
Harry-Hopkinson 2024-04-26 16:28:58 +00:00 committed by Harry Hopkinson
parent 7aed4d18f2
commit 74513374d1
2 changed files with 5 additions and 3 deletions

View File

@ -101,7 +101,7 @@ static Widget _windowServerStartWidgets[] = {
WindowStartTextbox(*this, widgetIndex, _name, 64); WindowStartTextbox(*this, widgetIndex, _name, 64);
break; break;
case WIDX_DESCRIPTION_INPUT: case WIDX_DESCRIPTION_INPUT:
WindowStartTextbox(*this, widgetIndex, _description, MAX_SERVER_DESCRIPTION_LENGTH); WindowStartTextbox(*this, widgetIndex, _description, kMaxServerDescriptionLength);
break; break;
case WIDX_GREETING_INPUT: case WIDX_GREETING_INPUT:
WindowStartTextbox(*this, widgetIndex, _greeting, kChatInputSize); WindowStartTextbox(*this, widgetIndex, _greeting, kChatInputSize);
@ -258,7 +258,7 @@ static Widget _windowServerStartWidgets[] = {
private: private:
char _port[7]; char _port[7];
char _name[65]; char _name[65];
char _description[MAX_SERVER_DESCRIPTION_LENGTH]; char _description[kMaxServerDescriptionLength];
char _greeting[kChatInputSize]; char _greeting[kChatInputSize];
char _password[33]; char _password[33];
static void ScenarioSelectCallback(const utf8* path) static void ScenarioSelectCallback(const utf8* path)

View File

@ -9,10 +9,12 @@
#pragma once #pragma once
#include <cstdint>
constexpr uint16_t kNetworkDefaultPort = 11753; constexpr uint16_t kNetworkDefaultPort = 11753;
constexpr uint16_t kNetworkLanBroadcastPort = 11754; constexpr uint16_t kNetworkLanBroadcastPort = 11754;
constexpr const char* kNetworkLanBroadcastMsg = "openrct2.server.query"; constexpr const char* kNetworkLanBroadcastMsg = "openrct2.server.query";
#define MAX_SERVER_DESCRIPTION_LENGTH 256 constexpr uint16_t kMaxServerDescriptionLength = 256;
#include "../Game.h" #include "../Game.h"
#include "../common.h" #include "../common.h"