mirror of https://github.com/OpenRCT2/OpenRCT2.git
Show uses of raw palette indices
This commit is contained in:
parent
bd7bf49c8d
commit
53b023612d
|
@ -165,7 +165,7 @@ void chat_draw(rct_drawpixelinfo * dpi)
|
|||
sint32 caretX = x + gfx_get_string_width(lineBuffer);
|
||||
sint32 caretY = y + 14;
|
||||
|
||||
gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, 0x38);
|
||||
gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, PALETTE_INDEX_56);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,48 @@ enum {
|
|||
COLOUR_LIGHT_WATER = 10
|
||||
};
|
||||
|
||||
enum {
|
||||
PALETTE_INDEX_0 = 0, //
|
||||
PALETTE_INDEX_10 = 10, // Black (0-dark), Dark gray (0)
|
||||
PALETTE_INDEX_11 = 11, // Black (middark)
|
||||
PALETTE_INDEX_12 = 12, // Black (midlight), Dark gray (1-darkest)
|
||||
PALETTE_INDEX_14 = 14, // Black (lighter), Dark gray (dark)
|
||||
PALETTE_INDEX_13 = 13, //
|
||||
PALETTE_INDEX_16 = 16, //
|
||||
PALETTE_INDEX_17 = 17, // Black (11), Dark gray (light), White (dark)
|
||||
PALETTE_INDEX_20 = 20, // Dark gray (10), White (light)
|
||||
PALETTE_INDEX_21 = 21, // Dark gray (11), White (lighter-11)
|
||||
PALETTE_INDEX_40 = 40, //
|
||||
PALETTE_INDEX_42 = 42, // Light Brown (lighter), Saturated brown (11)
|
||||
PALETTE_INDEX_54 = 54, //
|
||||
PALETTE_INDEX_55 = 55, // Bright Yellow (light), Yellow (lightest)
|
||||
PALETTE_INDEX_56 = 56, // Bright Yellow (lighter, lightest), Yellow (10)
|
||||
PALETTE_INDEX_61 = 61, // Bordeaux Red (darker)
|
||||
PALETTE_INDEX_62 = 62, //
|
||||
PALETTE_INDEX_68 = 68, //
|
||||
PALETTE_INDEX_73 = 73, //
|
||||
PALETTE_INDEX_99 = 99, //
|
||||
PALETTE_INDEX_102 = 102, // Bright green (lighter)
|
||||
PALETTE_INDEX_108 = 108, //
|
||||
PALETTE_INDEX_111 = 111, //
|
||||
PALETTE_INDEX_129 = 129, // Light Purple (11)
|
||||
PALETTE_INDEX_135 = 135, //
|
||||
PALETTE_INDEX_136 = 136, // Dark Blue (10-11), Light Blue (midlight), Icy Blue (darker)
|
||||
PALETTE_INDEX_138 = 138, // Light Blue (lighter), Icy Blue (middark)
|
||||
PALETTE_INDEX_141 = 141, //
|
||||
PALETTE_INDEX_144 = 144, // Dark Green (1-darkest,
|
||||
PALETTE_INDEX_161 = 161, // Bright Purple (light)
|
||||
PALETTE_INDEX_162 = 162, //
|
||||
PALETTE_INDEX_171 = 171, // Saturated Red (lightest) Bright Red (middark)
|
||||
PALETTE_INDEX_172 = 172, // Saturated Red (10-11), Bright Red (midlight)
|
||||
PALETTE_INDEX_186 = 186, //
|
||||
PALETTE_INDEX_194 = 194, //
|
||||
PALETTE_INDEX_195 = 195, //
|
||||
PALETTE_INDEX_209 = 209, // Bright Pink (light)
|
||||
PALETTE_INDEX_222 = 222, //
|
||||
PALETTE_INDEX_245 = 245, //
|
||||
};
|
||||
|
||||
#define TEXT_COLOUR_254 (254)
|
||||
#define TEXT_COLOUR_255 (255)
|
||||
|
||||
|
|
|
@ -240,13 +240,13 @@ void console_draw(rct_drawpixelinfo *dpi)
|
|||
sint32 caretX = x + gfx_get_string_width(lineBuffer);
|
||||
sint32 caretY = y + lineHeight;
|
||||
|
||||
gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, FORMAT_WHITE);
|
||||
gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, PALETTE_INDEX_144);
|
||||
}
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 21, _consoleRight, _consoleBottom - 21, 14);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 20, _consoleRight, _consoleBottom - 20, 11);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 21, _consoleRight, _consoleBottom - 21, PALETTE_INDEX_14);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 20, _consoleRight, _consoleBottom - 20, PALETTE_INDEX_11);
|
||||
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 1, _consoleRight, _consoleBottom - 1, 14);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 0, _consoleRight, _consoleBottom - 0, 12);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 1, _consoleRight, _consoleBottom - 1, PALETTE_INDEX_14);
|
||||
gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - 0, _consoleRight, _consoleBottom - 0, PALETTE_INDEX_12);
|
||||
}
|
||||
|
||||
void console_input(sint32 c)
|
||||
|
|
|
@ -34,7 +34,7 @@ static void graph_draw_months_uint8(rct_drawpixelinfo *dpi, uint8 *history, sint
|
|||
gfx_draw_string_centred(dpi, STR_GRAPH_LABEL, x, y - 10, COLOUR_BLACK, gCommonFormatArgs);
|
||||
|
||||
// Draw month mark
|
||||
gfx_fill_rect(dpi, x, y, x, y + 3, 10);
|
||||
gfx_fill_rect(dpi, x, y, x, y + 3, PALETTE_INDEX_10);
|
||||
}
|
||||
|
||||
yearOver32 = (yearOver32 + 1) % 32;
|
||||
|
@ -53,11 +53,11 @@ static void graph_draw_line_a_uint8(rct_drawpixelinfo *dpi, uint8 *history, sint
|
|||
y = baseY + ((255 - history[i]) * 100) / 256;
|
||||
|
||||
if (lastX != -1) {
|
||||
gfx_draw_line(dpi, lastX + 1, lastY + 1, x + 1, y + 1, 10);
|
||||
gfx_draw_line(dpi, lastX, lastY + 1, x, y + 1, 10);
|
||||
gfx_draw_line(dpi, lastX + 1, lastY + 1, x + 1, y + 1, PALETTE_INDEX_10);
|
||||
gfx_draw_line(dpi, lastX, lastY + 1, x, y + 1, PALETTE_INDEX_10);
|
||||
}
|
||||
if (i == 0)
|
||||
gfx_fill_rect(dpi, x, y, x + 2, y + 2, 10);
|
||||
gfx_fill_rect(dpi, x, y, x + 2, y + 2, PALETTE_INDEX_10);
|
||||
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
|
@ -78,9 +78,9 @@ static void graph_draw_line_b_uint8(rct_drawpixelinfo *dpi, uint8 *history, sint
|
|||
y = baseY + ((255 - history[i]) * 100) / 256;
|
||||
|
||||
if (lastX != -1)
|
||||
gfx_draw_line(dpi, lastX, lastY, x, y, 21);
|
||||
gfx_draw_line(dpi, lastX, lastY, x, y, PALETTE_INDEX_21);
|
||||
if (i == 0)
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + 1, y + 1, 21);
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + 1, y + 1, PALETTE_INDEX_21);
|
||||
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
|
@ -112,7 +112,7 @@ static void graph_draw_months_money32(rct_drawpixelinfo *dpi, money32 *history,
|
|||
gfx_draw_string_centred(dpi, STR_GRAPH_LABEL, x, y - 10, COLOUR_BLACK, &monthFormat);
|
||||
|
||||
// Draw month mark
|
||||
gfx_fill_rect(dpi, x, y, x, y + 3, 10);
|
||||
gfx_fill_rect(dpi, x, y, x, y + 3, PALETTE_INDEX_10);
|
||||
}
|
||||
|
||||
yearOver32 = (yearOver32 + 1) % 32;
|
||||
|
@ -131,11 +131,11 @@ static void graph_draw_line_a_money32(rct_drawpixelinfo *dpi, money32 *history,
|
|||
y = baseY + 170 - 6 - ((((history[i] >> modifier) + offset) * 170) / 256);
|
||||
|
||||
if (lastX != -1) {
|
||||
gfx_draw_line(dpi, lastX + 1, lastY + 1, x + 1, y + 1, 10);
|
||||
gfx_draw_line(dpi, lastX, lastY + 1, x, y + 1, 10);
|
||||
gfx_draw_line(dpi, lastX + 1, lastY + 1, x + 1, y + 1, PALETTE_INDEX_10);
|
||||
gfx_draw_line(dpi, lastX, lastY + 1, x, y + 1, PALETTE_INDEX_10);
|
||||
}
|
||||
if (i == 0)
|
||||
gfx_fill_rect(dpi, x, y, x + 2, y + 2, 10);
|
||||
gfx_fill_rect(dpi, x, y, x + 2, y + 2, PALETTE_INDEX_10);
|
||||
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
|
@ -156,9 +156,9 @@ static void graph_draw_line_b_money32(rct_drawpixelinfo *dpi, money32 *history,
|
|||
y = baseY + 170 - 6 - ((((history[i] >> modifier) + offset) * 170) / 256);
|
||||
|
||||
if (lastX != -1)
|
||||
gfx_draw_line(dpi, lastX, lastY, x, y, 21);
|
||||
gfx_draw_line(dpi, lastX, lastY, x, y, PALETTE_INDEX_21);
|
||||
if (i == 0)
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + 1, y + 1, 21);
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + 1, y + 1, PALETTE_INDEX_21);
|
||||
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#include "rct2.h"
|
||||
#include "sprites.h"
|
||||
|
||||
#define BACKROUND_COLOUR_DARK 10
|
||||
#define BACKROUND_COLOUR_LOGO 245
|
||||
#define BORDER_COLOUR_PUBLISHER 129
|
||||
#define BACKROUND_COLOUR_DARK PALETTE_INDEX_10
|
||||
#define BACKROUND_COLOUR_LOGO PALETTE_INDEX_245
|
||||
#define BORDER_COLOUR_PUBLISHER PALETTE_INDEX_129
|
||||
|
||||
#define PALETTE_G1_IDX_DEVELOPER 23217
|
||||
#define PALETTE_G1_IDX_LOGO 23224
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
enum {
|
||||
SPR_NONE = -1,
|
||||
SPR_TEMP = 0,
|
||||
|
||||
SPR_SCROLLING_TEXT_START = 1542,
|
||||
SPR_SCROLLING_TEXT_DEFAULT = 1574,
|
||||
|
@ -530,6 +531,8 @@ enum {
|
|||
SPR_CONSTRUCTION_FOOTPATH_LAND = 5639,
|
||||
SPR_CONSTRUCTION_FOOTPATH_BRIDGE = 5640,
|
||||
|
||||
SPR_6410 = 6410,
|
||||
|
||||
SPR_RIDE_DESIGN_PREVIEW_SPIRAL_ROLLER_COASTER_TRACK = 14222,
|
||||
SPR_RIDE_DESIGN_PREVIEW_SPIRAL_ROLLER_COASTER_SUPPORTS = 14223,
|
||||
SPR_RIDE_DESIGN_PREVIEW_STAND_UP_ROLLER_COASTER_TRACK = 14224,
|
||||
|
|
|
@ -732,7 +732,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
x + 80,
|
||||
y - 1
|
||||
);
|
||||
gfx_fill_rect(dpi, x + 10, y - 2, x + 10 + 70, y - 2, 10);
|
||||
gfx_fill_rect(dpi, x + 10, y - 2, x + 10 + 70, y - 2, PALETTE_INDEX_10);
|
||||
|
||||
x += 80;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
sint32 colour = ColourMapA[w->colours[0]].darkest;
|
||||
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
|
||||
|
||||
rct_g1_element *substituteElement = &g1Elements[0];
|
||||
rct_g1_element *substituteElement = &g1Elements[SPR_TEMP];
|
||||
rct_g1_element tmpElement = *substituteElement;
|
||||
substituteElement->offset = _trackDesignPreviewPixels + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE);
|
||||
substituteElement->width = 370;
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
#define MINIMUM_MAP_SIZE_PRACTICAL MINIMUM_MAP_SIZE_TECHNICAL-2
|
||||
#define MAXIMUM_MAP_SIZE_PRACTICAL MAXIMUM_MAP_SIZE_TECHNICAL-2
|
||||
|
||||
#define MAP_COLOUR_2(colourA, colourB) ((colourA << 8) | colourB)
|
||||
#define MAP_COLOUR(colour) MAP_COLOUR_2(colour, colour)
|
||||
#define FALLBACK_COLOUR(colour) ((colour << 24) || colour << 16)
|
||||
|
||||
enum {
|
||||
PAGE_PEEPS,
|
||||
PAGE_RIDES
|
||||
|
@ -107,14 +111,14 @@ const rct_xy16 MiniMapOffsets[] = {
|
|||
|
||||
/** rct2: 0x00981BCC */
|
||||
static const uint16 RideKeyColours[] = {
|
||||
0x3D3D, // COLOUR_KEY_RIDE
|
||||
0x2A2A, // COLOUR_KEY_FOOD
|
||||
0x1414, // COLOUR_KEY_DRINK
|
||||
0xD1D1, // COLOUR_KEY_SOUVENIR
|
||||
0x8888, // COLOUR_KEY_KIOSK
|
||||
0x6666, // COLOUR_KEY_FIRST_AID
|
||||
0x3737, // COLOUR_KEY_CASH_MACHINE
|
||||
0xA1A1, // COLOUR_KEY_TOILETS
|
||||
MAP_COLOUR(PALETTE_INDEX_61), // COLOUR_KEY_RIDE
|
||||
MAP_COLOUR(PALETTE_INDEX_42), // COLOUR_KEY_FOOD
|
||||
MAP_COLOUR(PALETTE_INDEX_20), // COLOUR_KEY_DRINK
|
||||
MAP_COLOUR(PALETTE_INDEX_209), // COLOUR_KEY_SOUVENIR
|
||||
MAP_COLOUR(PALETTE_INDEX_136), // COLOUR_KEY_KIOSK
|
||||
MAP_COLOUR(PALETTE_INDEX_102), // COLOUR_KEY_FIRST_AID
|
||||
MAP_COLOUR(PALETTE_INDEX_55), // COLOUR_KEY_CASH_MACHINE
|
||||
MAP_COLOUR(PALETTE_INDEX_161), // COLOUR_KEY_TOILETS
|
||||
};
|
||||
|
||||
static void window_map_close(rct_window *w);
|
||||
|
@ -835,7 +839,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
if (w->widgets[WIDX_PEOPLE_STARTING_POSITION].type != WWT_EMPTY) {
|
||||
x = w->x + w->widgets[WIDX_PEOPLE_STARTING_POSITION].left + 12;
|
||||
y = w->y + w->widgets[WIDX_PEOPLE_STARTING_POSITION].top + 18;
|
||||
gfx_draw_sprite(dpi, 0x0B6E0190A, x, y, 0);
|
||||
gfx_draw_sprite(dpi, 0xA0000000 | (COLOUR_LIGHT_BROWN << 24) | (COLOUR_BRIGHT_RED << 19) | SPR_6410, x, y, 0);
|
||||
}
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
|
@ -878,9 +882,9 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32
|
|||
{
|
||||
rct_g1_element *g1_element, pushed_g1_element;
|
||||
|
||||
gfx_clear(dpi, 10);
|
||||
gfx_clear(dpi, PALETTE_INDEX_10);
|
||||
|
||||
g1_element = &g1Elements[0];
|
||||
g1_element = &g1Elements[SPR_TEMP];
|
||||
pushed_g1_element = *g1_element;
|
||||
|
||||
g1_element->offset = (uint8 *) _mapImageData;
|
||||
|
@ -890,7 +894,7 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32
|
|||
g1_element->y_offset = -8;
|
||||
g1_element->flags = 0;
|
||||
|
||||
gfx_draw_sprite(dpi, 0, 0, 0, 0);
|
||||
gfx_draw_sprite(dpi, SPR_TEMP, 0, 0, 0);
|
||||
|
||||
*g1_element = pushed_g1_element;
|
||||
|
||||
|
@ -908,7 +912,7 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32
|
|||
*/
|
||||
static void window_map_init_map()
|
||||
{
|
||||
memset(_mapImageData, 0x0A, sizeof(*_mapImageData));
|
||||
memset(_mapImageData, PALETTE_INDEX_10, sizeof(*_mapImageData));
|
||||
_currentLine = 0;
|
||||
}
|
||||
|
||||
|
@ -1076,22 +1080,22 @@ static void window_map_paint_peep_overlay(rct_drawpixelinfo *dpi)
|
|||
right = left;
|
||||
bottom = top;
|
||||
|
||||
colour = 0x14;
|
||||
colour = PALETTE_INDEX_20;
|
||||
|
||||
if ((peep->flags & SPRITE_FLAGS_PEEP_FLASHING) != 0) {
|
||||
if (peep->type == PEEP_TYPE_STAFF) {
|
||||
if ((gWindowMapFlashingFlags & (1 << 3)) != 0) {
|
||||
colour = 0x8A;
|
||||
colour = PALETTE_INDEX_138;
|
||||
left--;
|
||||
if ((gWindowMapFlashingFlags & (1 << 15)) == 0)
|
||||
colour = 0xA;
|
||||
colour = PALETTE_INDEX_10;
|
||||
}
|
||||
} else {
|
||||
if ((gWindowMapFlashingFlags & (1 << 1)) != 0) {
|
||||
colour = 0xAC;
|
||||
colour = PALETTE_INDEX_172;
|
||||
left--;
|
||||
if ((gWindowMapFlashingFlags & (1 << 15)) == 0)
|
||||
colour = 0x15;
|
||||
colour = PALETTE_INDEX_21;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1126,7 +1130,7 @@ static void window_map_paint_train_overlay(rct_drawpixelinfo *dpi)
|
|||
right = left;
|
||||
bottom = top;
|
||||
|
||||
gfx_fill_rect(dpi, left, top, right, bottom, 0xAB);
|
||||
gfx_fill_rect(dpi, left, top, right, bottom, PALETTE_INDEX_171);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1154,20 +1158,20 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi)
|
|||
sint16 bottom = ((viewport->view_y + viewport->view_height) >> 4) + offset.y;
|
||||
|
||||
// top horizontal lines
|
||||
gfx_fill_rect(dpi, left, top, left + 3, top, 0x38);
|
||||
gfx_fill_rect(dpi, right - 3, top, right, top, 0x38);
|
||||
gfx_fill_rect(dpi, left, top, left + 3, top, PALETTE_INDEX_56);
|
||||
gfx_fill_rect(dpi, right - 3, top, right, top, PALETTE_INDEX_56);
|
||||
|
||||
// left vertical lines
|
||||
gfx_fill_rect(dpi, left, top, left, top + 3, 0x38);
|
||||
gfx_fill_rect(dpi, left, bottom - 3, left, bottom, 0x38);
|
||||
gfx_fill_rect(dpi, left, top, left, top + 3, PALETTE_INDEX_56);
|
||||
gfx_fill_rect(dpi, left, bottom - 3, left, bottom, PALETTE_INDEX_56);
|
||||
|
||||
// bottom horizontal lines
|
||||
gfx_fill_rect(dpi, left, bottom, left + 3, bottom, 0x38);
|
||||
gfx_fill_rect(dpi, right - 3, bottom, right, bottom, 0x38);
|
||||
gfx_fill_rect(dpi, left, bottom, left + 3, bottom, PALETTE_INDEX_56);
|
||||
gfx_fill_rect(dpi, right - 3, bottom, right, bottom, PALETTE_INDEX_56);
|
||||
|
||||
// right vertical lines
|
||||
gfx_fill_rect(dpi, right, top, right, top + 3, 0x38);
|
||||
gfx_fill_rect(dpi, right, bottom - 3, right, bottom, 0x38);
|
||||
gfx_fill_rect(dpi, right, top, right, top + 3, PALETTE_INDEX_56);
|
||||
gfx_fill_rect(dpi, right, bottom - 3, right, bottom, PALETTE_INDEX_56);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1429,22 +1433,22 @@ static void map_window_decrease_map_size()
|
|||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
static const uint16 WaterColour = 0xC3C3;
|
||||
static const uint16 WaterColour = MAP_COLOUR(PALETTE_INDEX_195);
|
||||
static const uint16 TerrainColour[] = {
|
||||
0x4949, // TERRAIN_GRASS
|
||||
0x2828, // TERRAIN_SAND
|
||||
0x6C6C, // TERRAIN_DIRT
|
||||
0x0C0C, // TERRAIN_ROCK
|
||||
0x3E3E, // TERRAIN_MARTIAN
|
||||
0x0A10, // TERRAIN_CHECKERBOARD
|
||||
0x496C, // TERRAIN_GRASS_CLUMPS
|
||||
0x8D8D, // TERRAIN_ICE
|
||||
0xAC0A, // TERRAIN_GRID_RED
|
||||
0x360A, // TERRAIN_GRID_YELLOW
|
||||
0xA20A, // TERRAIN_GRID_BLUE
|
||||
0x660A, // TERRAIN_GRID_GREEN
|
||||
0x6F6F, // TERRAIN_SAND_DARK
|
||||
0xDEDE, // TERRAIN_SAND_LIGHT
|
||||
MAP_COLOUR(PALETTE_INDEX_73), // TERRAIN_GRASS
|
||||
MAP_COLOUR(PALETTE_INDEX_40), // TERRAIN_SAND
|
||||
MAP_COLOUR(PALETTE_INDEX_108), // TERRAIN_DIRT
|
||||
MAP_COLOUR(PALETTE_INDEX_12), // TERRAIN_ROCK
|
||||
MAP_COLOUR(PALETTE_INDEX_62), // TERRAIN_MARTIAN
|
||||
MAP_COLOUR_2(PALETTE_INDEX_10, PALETTE_INDEX_16), // TERRAIN_CHECKERBOARD
|
||||
MAP_COLOUR_2(PALETTE_INDEX_73, PALETTE_INDEX_108), // TERRAIN_GRASS_CLUMPS
|
||||
MAP_COLOUR(PALETTE_INDEX_141), // TERRAIN_ICE
|
||||
MAP_COLOUR_2(PALETTE_INDEX_172, PALETTE_INDEX_10), // TERRAIN_GRID_RED
|
||||
MAP_COLOUR_2(PALETTE_INDEX_54, PALETTE_INDEX_10), // TERRAIN_GRID_YELLOW
|
||||
MAP_COLOUR_2(PALETTE_INDEX_162, PALETTE_INDEX_10), // TERRAIN_GRID_BLUE
|
||||
MAP_COLOUR_2(PALETTE_INDEX_102, PALETTE_INDEX_10), // TERRAIN_GRID_GREEN
|
||||
MAP_COLOUR(PALETTE_INDEX_111), // TERRAIN_SAND_DARK
|
||||
MAP_COLOUR(PALETTE_INDEX_222), // TERRAIN_SAND_LIGHT
|
||||
};
|
||||
|
||||
static const uint16 ElementTypeMaskColour[] = {
|
||||
|
@ -1460,15 +1464,15 @@ static const uint16 ElementTypeMaskColour[] = {
|
|||
};
|
||||
|
||||
static const uint16 ElementTypeAddColour[] = {
|
||||
0x0000, // MAP_ELEMENT_TYPE_SURFACE
|
||||
0x1111, // MAP_ELEMENT_TYPE_PATH
|
||||
0xB700, // MAP_ELEMENT_TYPE_TRACK
|
||||
0x0063, // MAP_ELEMENT_TYPE_SCENERY
|
||||
0xBABA, // MAP_ELEMENT_TYPE_ENTRANCE
|
||||
0x0000, // MAP_ELEMENT_TYPE_WALL
|
||||
0x6363, // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
|
||||
0x0000, // MAP_ELEMENT_TYPE_BANNER
|
||||
0x4444, // MAP_ELEMENT_TYPE_CORRUPT
|
||||
MAP_COLOUR(PALETTE_INDEX_0), // MAP_ELEMENT_TYPE_SURFACE
|
||||
MAP_COLOUR(PALETTE_INDEX_17), // MAP_ELEMENT_TYPE_PATH
|
||||
MAP_COLOUR_2(PALETTE_INDEX_135, PALETTE_INDEX_0), // MAP_ELEMENT_TYPE_TRACK
|
||||
MAP_COLOUR_2(PALETTE_INDEX_0, PALETTE_INDEX_99), // MAP_ELEMENT_TYPE_SCENERY
|
||||
MAP_COLOUR(PALETTE_INDEX_186), // MAP_ELEMENT_TYPE_ENTRANCE
|
||||
MAP_COLOUR(PALETTE_INDEX_0), // MAP_ELEMENT_TYPE_WALL
|
||||
MAP_COLOUR(PALETTE_INDEX_99), // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
|
||||
MAP_COLOUR(PALETTE_INDEX_0), // MAP_ELEMENT_TYPE_BANNER
|
||||
MAP_COLOUR(PALETTE_INDEX_68), // MAP_ELEMENT_TYPE_CORRUPT
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -1590,7 +1594,7 @@ static uint16 map_window_get_pixel_colour_peep(sint32 x, sint32 y)
|
|||
colour = WaterColour;
|
||||
|
||||
if (!(mapElement->properties.surface.ownership & OWNERSHIP_OWNED))
|
||||
colour = 10 | (colour & 0xFF00);
|
||||
colour = PALETTE_INDEX_10 | (colour & 0xFF00);
|
||||
|
||||
const sint32 maxSupportedMapElementType = (sint32)countof(ElementTypeAddColour);
|
||||
while (!map_element_is_last_for_tile(mapElement++)) {
|
||||
|
@ -1611,22 +1615,22 @@ static uint16 map_window_get_pixel_colour_ride(sint32 x, sint32 y)
|
|||
rct_ride *ride;
|
||||
uint32 colour;
|
||||
|
||||
colour = 0x0D0D0000;
|
||||
colour = FALLBACK_COLOUR(PALETTE_INDEX_13);
|
||||
mapElement = map_get_surface_element_at(x >> 5, y >> 5);
|
||||
do {
|
||||
switch (map_element_get_type(mapElement)) {
|
||||
case MAP_ELEMENT_TYPE_SURFACE:
|
||||
if (mapElement->properties.surface.terrain & 0x1F) {
|
||||
colour &= 0xFFFF;
|
||||
colour |= 0xC2C20000;
|
||||
colour |= FALLBACK_COLOUR(PALETTE_INDEX_194);
|
||||
}
|
||||
if (!(mapElement->properties.surface.ownership & OWNERSHIP_OWNED)) {
|
||||
colour &= 0xFF00FFFF;
|
||||
colour |= 0x000A0000;
|
||||
colour |= PALETTE_INDEX_10 << 16;
|
||||
}
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_PATH:
|
||||
colour = 0x0E0E;
|
||||
colour = MAP_COLOUR(PALETTE_INDEX_14);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
if (mapElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||
|
|
|
@ -2968,7 +2968,7 @@ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dp
|
|||
rct_ride_entry *rideEntry = get_ride_entry_by_ride(ride);
|
||||
|
||||
// Background
|
||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height, 12);
|
||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height, PALETTE_INDEX_12);
|
||||
|
||||
rct_widget *widget = &window_ride_vehicle_widgets[WIDX_VEHICLE_TRAINS_PREVIEW];
|
||||
sint32 startX = max(2, ((widget->right - widget->left) - ((ride->num_vehicles - 1) * 36)) / 2 - 25);
|
||||
|
@ -4581,7 +4581,7 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
// Track / shop item preview
|
||||
widget = &window_ride_colour_widgets[WIDX_TRACK_PREVIEW];
|
||||
if (widget->type != WWT_EMPTY)
|
||||
gfx_fill_rect(dpi, w->x + widget->left + 1, w->y + widget->top + 1, w->x + widget->right - 1, w->y + widget->bottom - 1, 12);
|
||||
gfx_fill_rect(dpi, w->x + widget->left + 1, w->y + widget->top + 1, w->x + widget->right - 1, w->y + widget->bottom - 1, PALETTE_INDEX_12);
|
||||
|
||||
track_colour trackColour = ride_get_track_colour(ride, w->ride_colour);
|
||||
|
||||
|
@ -4634,7 +4634,7 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
widget->right - widget->left,
|
||||
widget->bottom - widget->top
|
||||
)) {
|
||||
gfx_clear(&clippedDpi, 12);
|
||||
gfx_clear(&clippedDpi, PALETTE_INDEX_12);
|
||||
|
||||
if (ride->entrance_style != RIDE_ENTRANCE_STYLE_NONE) {
|
||||
const rct_ride_entrance_definition *entranceStyle = &RideEntranceDefinitions[ride->entrance_style];
|
||||
|
@ -4680,7 +4680,7 @@ static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
|
|||
vehicleColour = ride_get_vehicle_colour(ride, w->var_48C);
|
||||
|
||||
// Background colour
|
||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, 12);
|
||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, PALETTE_INDEX_12);
|
||||
|
||||
// ?
|
||||
x = (vehiclePreviewWidget->right - vehiclePreviewWidget->left) / 2;
|
||||
|
@ -5720,7 +5720,7 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
|
|||
top = bottom;
|
||||
bottom = tmp;
|
||||
}
|
||||
gfx_fill_rect(dpi, x, top, x, bottom, x > measurement->current_item ? 17 : 21);
|
||||
gfx_fill_rect(dpi, x, top, x, bottom, x > measurement->current_item ? PALETTE_INDEX_17 : PALETTE_INDEX_21);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -304,6 +304,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
if (w->frame_no > 15){
|
||||
uint8 colour = ColourMapA[w->colours[1]].mid_light;
|
||||
// TODO: palette index addition
|
||||
gfx_fill_rect(dpi, cursorX, y + 9, cursorX + width, y + 9, colour + 5);
|
||||
}
|
||||
|
||||
|
@ -406,7 +407,7 @@ static void draw_ime_composition(rct_drawpixelinfo * dpi, int cursorX, int curso
|
|||
int width = compositionWidth;
|
||||
int height = 10;
|
||||
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, 12);
|
||||
gfx_fill_rect(dpi, x, y, x + width, y + height, 0);
|
||||
gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, PALETTE_INDEX_12);
|
||||
gfx_fill_rect(dpi, x, y, x + width, y + height, PALETTE_INDEX_0);
|
||||
gfx_draw_string(dpi, gTextInputComposition, COLOUR_DARK_GREEN, x, y);
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
return;
|
||||
}
|
||||
|
||||
rct_g1_element *substituteElement = &g1Elements[0];
|
||||
rct_g1_element *substituteElement = &g1Elements[SPR_TEMP];
|
||||
rct_g1_element tmpElement = *substituteElement;
|
||||
substituteElement->offset = _trackDesignPreviewPixels + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE);
|
||||
substituteElement->width = 370;
|
||||
|
|
|
@ -455,7 +455,7 @@ static void window_track_place_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
// Draw mini tile preview
|
||||
rct_drawpixelinfo clippedDpi;
|
||||
if (clip_drawpixelinfo(&clippedDpi, dpi, w->x + 4, w->y + 18, 168, 78)) {
|
||||
rct_g1_element *substituteElement = &g1Elements[0];
|
||||
rct_g1_element *substituteElement = &g1Elements[SPR_TEMP];
|
||||
rct_g1_element tmpElement = *substituteElement;
|
||||
substituteElement->offset = _window_track_place_mini_preview;
|
||||
substituteElement->width = TRACK_MINI_PREVIEW_WIDTH;
|
||||
|
|
Loading…
Reference in New Issue