Codechange: Store Colours in Colours type. (#11625)

This reduces casts, some magic numbers, and introduces a bit of type-safety.
This commit is contained in:
Peter Nelson
2024-01-21 13:23:04 +00:00
committed by GitHub
parent 0841978304
commit c0ab436077
21 changed files with 50 additions and 41 deletions

View File

@@ -11,6 +11,7 @@
#define NEWS_TYPE_H
#include "core/enum_type.hpp"
#include "gfx_type.h"
#include "timer/timer_game_calendar.h"
#include "strings_type.h"
#include "sound_type.h"
@@ -161,7 +162,7 @@ struct CompanyNewsInformation : NewsAllocatedData {
std::string other_company_name; ///< The name of the company taking over this one
uint32_t face; ///< The face of the president
byte colour; ///< The colour related to the company
Colours colour; ///< The colour related to the company
CompanyNewsInformation(const struct Company *c, const struct Company *other = nullptr);
};