mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Use constants and proper formatting in colour.[ch]
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "colour.h"
|
||||
#include "../sprites.h"
|
||||
|
||||
rct_colour_map ColourMapA[32] = { 0 };
|
||||
rct_colour_map ColourMapA[COLOUR_COUNT] = { 0 };
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -38,12 +38,14 @@ enum
|
||||
|
||||
void colours_init_maps()
|
||||
{
|
||||
if (g1Elements == NULL) {
|
||||
if (g1Elements == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get colour maps from g1
|
||||
for (sint32 i = 0; i < 32; i++) {
|
||||
for (sint32 i = 0; i < COLOUR_COUNT; i++)
|
||||
{
|
||||
rct_g1_element *g1Element = &g1Elements[SPR_PALETTE_2_START + i];
|
||||
|
||||
ColourMapA[i].colour_0 = g1Element->offset[INDEX_COLOUR_0];
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
/**
|
||||
* Colour IDs as used by the colour dropdown, NOT palette indices.
|
||||
*/
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
COLOUR_BLACK,
|
||||
COLOUR_GREY,
|
||||
COLOUR_WHITE,
|
||||
@@ -62,12 +63,14 @@ enum {
|
||||
/**
|
||||
* These colours change depending on the current water colours.
|
||||
*/
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
COLOUR_DARK_WATER = 9,
|
||||
COLOUR_LIGHT_WATER = 10
|
||||
};
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PALETTE_INDEX_0 = 0, //
|
||||
PALETTE_INDEX_10 = 10, // Black (0-dark), Dark gray (0)
|
||||
PALETTE_INDEX_11 = 11, // Black (middark)
|
||||
@@ -121,7 +124,8 @@ enum {
|
||||
#define NOT_TRANSLUCENT(x) ((x) & ~COLOUR_FLAG_TRANSLUCENT)
|
||||
#define BASE_COLOUR(x) ((x) & 0x1F)
|
||||
|
||||
typedef struct rct_colour_map {
|
||||
typedef struct rct_colour_map
|
||||
{
|
||||
uint8 colour_0;
|
||||
uint8 colour_1;
|
||||
uint8 darkest;
|
||||
|
||||
Reference in New Issue
Block a user