I'd like to add an enum for player colors so I don't have to search the forums or trial/error test whenever I want to select a different player color. I'm guessing since the rest of the code uses unscoped enums, we should stick with an unscoped enum.
NonExportedEnums.h
// Color of structures and units belonging to a given player
enum PlayerColor
{
PlayerBlue = 0, //Standard Eden color
PlayerRed, //Standard Plymouth color
PlayerGreen, //Standard third party color during campaign scenarios
PlayerYellow,
PlayerCyan,
PlayerMagenta,
PlayerBlack //Not selectable as a player color from the multiplayer game initialization screen
};
I think a scoped enum would be cleaner to use and wouldn't add all the color names directly into the main namespace (or lack of namespace I guess?), but it would have to be cast whenever used with the SetColorNumber function. It would also be the only one in the project. So probably just stick with a traditional unscoped enum.
// Color of structures and units belonging to a given player
enum class PlayerColor
{
Blue = 0, //Standard Eden color
Red, //Standard Plymouth color
Green, //Standard third party color during campaign scenarios.
Yellow,
Cyan,
Magenta,
Black //Not selectable as a player color from the multiplayer game initialization screen.
};