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:
@@ -11,6 +11,7 @@
|
||||
#define LIVERY_H
|
||||
|
||||
#include "company_type.h"
|
||||
#include "gfx_type.h"
|
||||
|
||||
static const byte LIT_NONE = 0; ///< Don't show the liveries at all
|
||||
static const byte LIT_COMPANY = 1; ///< Show the liveries of your own company
|
||||
@@ -76,8 +77,8 @@ DECLARE_ENUM_AS_ADDABLE(LiveryClass)
|
||||
/** Information about a particular livery. */
|
||||
struct Livery {
|
||||
byte in_use; ///< Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour.
|
||||
byte colour1; ///< First colour, for all vehicles.
|
||||
byte colour2; ///< Second colour, for vehicles with 2CC support.
|
||||
Colours colour1; ///< First colour, for all vehicles.
|
||||
Colours colour2; ///< Second colour, for vehicles with 2CC support.
|
||||
};
|
||||
|
||||
void ResetCompanyLivery(Company *c);
|
||||
|
||||
Reference in New Issue
Block a user