mirror of https://github.com/OpenRCT2/OpenRCT2.git
refactor colour maps
This commit is contained in:
parent
442cfef887
commit
48e3d70e57
|
@ -0,0 +1 @@
|
||||||
|
#include "coloru"
|
|
@ -49,6 +49,7 @@
|
||||||
<ClCompile Include="..\src\hook.c" />
|
<ClCompile Include="..\src\hook.c" />
|
||||||
<ClCompile Include="..\src\input.c" />
|
<ClCompile Include="..\src\input.c" />
|
||||||
<ClCompile Include="..\src\interface\chat.c" />
|
<ClCompile Include="..\src\interface\chat.c" />
|
||||||
|
<ClCompile Include="..\src\interface\colour.c" />
|
||||||
<ClCompile Include="..\src\interface\themes.c" />
|
<ClCompile Include="..\src\interface\themes.c" />
|
||||||
<ClCompile Include="..\src\interface\console.c" />
|
<ClCompile Include="..\src\interface\console.c" />
|
||||||
<ClCompile Include="..\src\interface\graph.c" />
|
<ClCompile Include="..\src\interface\graph.c" />
|
||||||
|
|
|
@ -549,6 +549,9 @@
|
||||||
<ClCompile Include="..\src\windows\server_start.c">
|
<ClCompile Include="..\src\windows\server_start.c">
|
||||||
<Filter>Source\Windows</Filter>
|
<Filter>Source\Windows</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\interface\colour.c">
|
||||||
|
<Filter>Source\Interface</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\src\management\award.h">
|
<ClInclude Include="..\src\management\award.h">
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "../addresses.h"
|
#include "../addresses.h"
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "drawing.h"
|
#include "../interface/colour.h"
|
||||||
#include "../platform/platform.h"
|
#include "../platform/platform.h"
|
||||||
|
#include "drawing.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -283,13 +284,13 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (flags & 0x80) {
|
if (flags & 0x80) {
|
||||||
shadow = RCT2_ADDRESS(0x0141FC46, uint8)[colour * 8];
|
shadow = ColourMapA[colour].dark;
|
||||||
fill = RCT2_ADDRESS(0x0141FC48, uint8)[colour * 8];
|
fill = ColourMapA[colour].mid_light;
|
||||||
hilight = RCT2_ADDRESS(0x0141FC4A, uint8)[colour * 8];
|
hilight = ColourMapA[colour].lighter;
|
||||||
} else {
|
} else {
|
||||||
shadow = RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8];
|
shadow = ColourMapA[colour].mid_dark;
|
||||||
fill = RCT2_ADDRESS(0x0141FC49, uint8)[colour * 8];
|
fill = ColourMapA[colour].light;
|
||||||
hilight = RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8];
|
hilight = ColourMapA[colour].lighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & no_border) {
|
if (flags & no_border) {
|
||||||
|
@ -304,9 +305,9 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
|
||||||
if (!(flags & no_fill)) {
|
if (!(flags & no_fill)) {
|
||||||
if (!(flags & 0x40)) {
|
if (!(flags & 0x40)) {
|
||||||
if (flags & 0x04) {
|
if (flags & 0x04) {
|
||||||
fill = RCT2_ADDRESS(0x0141FC49, uint8)[0];
|
fill = ColourMapA[COLOUR_BLACK].light;
|
||||||
} else {
|
} else {
|
||||||
fill = RCT2_ADDRESS(0x0141FC4A, uint8)[colour * 8];
|
fill = ColourMapA[colour].lighter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, fill);
|
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, fill);
|
||||||
|
@ -320,7 +321,7 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
|
||||||
|
|
||||||
if (!(flags & no_fill)) {
|
if (!(flags & no_fill)) {
|
||||||
if (flags & 0x04) {
|
if (flags & 0x04) {
|
||||||
fill = RCT2_ADDRESS(0x0141FC49, uint8)[0];
|
fill = ColourMapA[COLOUR_BLACK].light;
|
||||||
}
|
}
|
||||||
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, fill);
|
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, fill);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "../addresses.h"
|
#include "../addresses.h"
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
|
#include "../interface/colour.h"
|
||||||
#include "../localisation/localisation.h"
|
#include "../localisation/localisation.h"
|
||||||
#include "drawing.h"
|
#include "drawing.h"
|
||||||
|
|
||||||
|
@ -88,10 +89,12 @@ static int scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint16
|
||||||
|
|
||||||
static uint8 scrolling_text_get_colour(uint32 character)
|
static uint8 scrolling_text_get_colour(uint32 character)
|
||||||
{
|
{
|
||||||
int edi = character & 0x7F;
|
int colour = character & 0x7F;
|
||||||
int offset = 0;
|
if (colour & (1 << 7)) {
|
||||||
if (character >= 0x80) offset = 2;
|
return ColourMapA[colour].light;
|
||||||
return RCT2_ADDRESS(0x0141FC47, uint8)[offset + (edi * 8)];
|
} else {
|
||||||
|
return ColourMapA[colour].mid_dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scrolling_text_format(utf8 *dst, rct_draw_scroll_text *scrollText)
|
static void scrolling_text_format(utf8 *dst, rct_draw_scroll_text *scrollText)
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../addresses.h"
|
#include "../addresses.h"
|
||||||
|
#include "../interface/colour.h"
|
||||||
#include "../localisation/localisation.h"
|
#include "../localisation/localisation.h"
|
||||||
#include "../sprites.h"
|
#include "../sprites.h"
|
||||||
#include "../world/map.h"
|
#include "../world/map.h"
|
||||||
|
@ -509,7 +510,7 @@ void colour_char_window(uint8 colour, uint16* current_font_flags,uint8* palette_
|
||||||
|
|
||||||
int eax;
|
int eax;
|
||||||
|
|
||||||
eax = RCT2_ADDRESS(0x0141FD45, uint8)[colour * 8];
|
eax = ColourMapB[colour].b;
|
||||||
if (*current_font_flags & 2) {
|
if (*current_font_flags & 2) {
|
||||||
eax |= 0x0A0A00;
|
eax |= 0x0A0A00;
|
||||||
}
|
}
|
||||||
|
@ -1246,18 +1247,18 @@ static void ttf_process_initial_colour(int colour, text_draw_info *info)
|
||||||
uint32 eax;
|
uint32 eax;
|
||||||
if (info->flags & 4) {
|
if (info->flags & 4) {
|
||||||
if (info->flags & 8) {
|
if (info->flags & 8) {
|
||||||
eax = RCT2_ADDRESS(0x0141FC48, uint8)[colour * 8];
|
eax = ColourMapA[colour].mid_light;
|
||||||
eax = eax << 16;
|
eax = eax << 16;
|
||||||
eax = eax | RCT2_ADDRESS(0x0141FC46, uint8)[colour * 8];
|
eax = eax | ColourMapA[colour].dark;
|
||||||
} else {
|
} else {
|
||||||
eax = RCT2_ADDRESS(0x0141FC49, uint8)[colour * 8];
|
eax = ColourMapA[colour].light;
|
||||||
eax = eax << 16;
|
eax = eax << 16;
|
||||||
eax = eax | RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8];
|
eax = eax | ColourMapA[colour].mid_dark;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eax = RCT2_ADDRESS(0x0141FC4A, uint8)[colour * 8];
|
eax = ColourMapA[colour].lighter;
|
||||||
eax = eax << 16;
|
eax = eax << 16;
|
||||||
eax = eax | RCT2_ADDRESS(0x0141FC48, uint8)[colour * 8];
|
eax = eax | ColourMapA[colour].mid_light;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust text palette. Store current colour? ;
|
// Adjust text palette. Store current colour? ;
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include "../drawing/drawing.h"
|
||||||
|
#include "colour.h"
|
||||||
|
|
||||||
|
rct_colour_map_a *ColourMapA = (rct_colour_map_a*)0x0141FC44;
|
||||||
|
rct_colour_map_b *ColourMapB = (rct_colour_map_b*)0x0141FD44;
|
||||||
|
|
||||||
|
void colours_init_maps()
|
||||||
|
{
|
||||||
|
// Get colour maps from g1
|
||||||
|
for (int i = 0; i < 32; i++) {
|
||||||
|
rct_g1_element *g1Element = &g1Elements[4915 + i];
|
||||||
|
|
||||||
|
uint8 *dstA = (uint8*)&ColourMapA[i];
|
||||||
|
uint8 *dstB = (uint8*)&ColourMapB[i];
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
dstA[j] = g1Element->offset[0xF5 + j];
|
||||||
|
}
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
dstA[j + 4] = g1Element->offset[0xF9 + j];
|
||||||
|
}
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
dstB[j] = g1Element->offset[0xFD + j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef _COLOUR_H_
|
#ifndef _COLOUR_H_
|
||||||
#define _COLOUR_H_
|
#define _COLOUR_H_
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Colour IDs as used by the colour dropdown, NOT palette indices.
|
* Colour IDs as used by the colour dropdown, NOT palette indices.
|
||||||
*/
|
*/
|
||||||
|
@ -50,4 +52,33 @@ enum {
|
||||||
#define COLOUR_FLAG_TRANSLUCENT (1 << 7)
|
#define COLOUR_FLAG_TRANSLUCENT (1 << 7)
|
||||||
#define TRANSLUCENT(x) ((x) | COLOUR_FLAG_TRANSLUCENT)
|
#define TRANSLUCENT(x) ((x) | COLOUR_FLAG_TRANSLUCENT)
|
||||||
|
|
||||||
|
#define NUM_COLOURS 32
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8 darkest;
|
||||||
|
uint8 darker;
|
||||||
|
uint8 dark;
|
||||||
|
uint8 mid_dark;
|
||||||
|
uint8 mid_light;
|
||||||
|
uint8 light;
|
||||||
|
uint8 lighter;
|
||||||
|
uint8 lightest;
|
||||||
|
} rct_colour_map_a;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8 a;
|
||||||
|
uint8 b;
|
||||||
|
uint8 c;
|
||||||
|
uint8 d;
|
||||||
|
uint8 e;
|
||||||
|
uint8 f;
|
||||||
|
uint8 g;
|
||||||
|
uint8 h;
|
||||||
|
} rct_colour_map_b;
|
||||||
|
|
||||||
|
extern rct_colour_map_a *ColourMapA;
|
||||||
|
extern rct_colour_map_b *ColourMapB;
|
||||||
|
|
||||||
|
void colours_init_maps();
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -32,6 +32,7 @@
|
||||||
#include "../world/entrance.h"
|
#include "../world/entrance.h"
|
||||||
#include "../world/footpath.h"
|
#include "../world/footpath.h"
|
||||||
#include "../world/scenery.h"
|
#include "../world/scenery.h"
|
||||||
|
#include "colour.h"
|
||||||
#include "viewport.h"
|
#include "viewport.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
|
@ -87,26 +88,16 @@ struct paint_struct{
|
||||||
*/
|
*/
|
||||||
void viewport_init_all()
|
void viewport_init_all()
|
||||||
{
|
{
|
||||||
int i, d;
|
colours_init_maps();
|
||||||
rct_g1_element *g1_element;
|
|
||||||
|
|
||||||
// Palette from sprites?
|
|
||||||
d = 0;
|
|
||||||
for (i = 4915; i < 4947; i++) {
|
|
||||||
g1_element = &g1Elements[i];
|
|
||||||
*((int*)(0x0141FC44 + d)) = *((int*)(&g1_element->offset[0xF5]));
|
|
||||||
*((int*)(0x0141FC48 + d)) = *((int*)(&g1_element->offset[0xF9]));
|
|
||||||
*((int*)(0x0141FD44 + d)) = *((int*)(&g1_element->offset[0xFD]));
|
|
||||||
d += 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setting up windows
|
// Setting up windows
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_NEW_WINDOW_PTR, rct_window*) = g_window_list;
|
RCT2_GLOBAL(RCT2_ADDRESS_NEW_WINDOW_PTR, rct_window*) = g_window_list;
|
||||||
RCT2_GLOBAL(0x01423604, sint32) = 0;
|
RCT2_GLOBAL(0x01423604, sint32) = 0;
|
||||||
|
|
||||||
// Setting up viewports
|
// Setting up viewports
|
||||||
for (i = 0; i < 9; i++)
|
for (int i = 0; i < 9; i++) {
|
||||||
g_viewport_list[i].width = 0;
|
g_viewport_list[i].width = 0;
|
||||||
|
}
|
||||||
RCT2_NEW_VIEWPORT = NULL;
|
RCT2_NEW_VIEWPORT = NULL;
|
||||||
|
|
||||||
// ?
|
// ?
|
||||||
|
|
|
@ -591,24 +591,24 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
|
||||||
colour = w->colours[widget->colour] & 0x7F;
|
colour = w->colours[widget->colour] & 0x7F;
|
||||||
|
|
||||||
// Border left of text
|
// Border left of text
|
||||||
gfx_fill_rect(dpi, l, t, l + 4, t, RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l, t, l + 4, t, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 1, t + 1, l + 4, t + 1, RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l + 1, t + 1, l + 4, t + 1, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Border right of text
|
// Border right of text
|
||||||
gfx_fill_rect(dpi, textRight, t, r - 1, t, RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, textRight, t, r - 1, t, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, textRight, t + 1, r - 2, t + 1, RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, textRight, t + 1, r - 2, t + 1, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Border right
|
// Border right
|
||||||
gfx_fill_rect(dpi, r - 1, t + 1, r - 1, b - 1, RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, r - 1, t + 1, r - 1, b - 1, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, r, t, r, b, RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, r, t, r, b, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Border bottom
|
// Border bottom
|
||||||
gfx_fill_rect(dpi, l, b - 1, r - 2, b - 1, RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l, b - 1, r - 2, b - 1, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l, b, r - 1, b, RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l, b, r - 1, b, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Border left
|
// Border left
|
||||||
gfx_fill_rect(dpi, l, t + 1, l, b - 2, RCT2_ADDRESS(0x0141FC47, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l, t + 1, l, b - 2, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 1, t + 2, l + 1, b - 2, RCT2_ADDRESS(0x0141FC4B, uint8)[colour * 8]);
|
gfx_fill_rect(dpi, l + 1, t + 2, l + 1, b - 2, ColourMapA[colour].lighter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -650,7 +650,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge
|
||||||
press |= 0x80;
|
press |= 0x80;
|
||||||
|
|
||||||
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press);
|
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press);
|
||||||
gfx_fill_rect(dpi, r + 1, t, r + 1, b, *((char*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, r + 1, t, r + 1, b, ColourMapA[colour].mid_dark);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
press = 0x60;
|
press = 0x60;
|
||||||
|
@ -661,7 +661,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge
|
||||||
|
|
||||||
// Black caption bars look slightly green, this fixes that
|
// Black caption bars look slightly green, this fixes that
|
||||||
if (colour == 0)
|
if (colour == 0)
|
||||||
gfx_fill_rect(dpi, l + 1, t + 1, r - 1, b - 1, *((char*)(0x0141FC46 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 1, t + 1, r - 1, b - 1, ColourMapA[colour].dark);
|
||||||
else
|
else
|
||||||
gfx_fill_rect(dpi, l + 1, t + 1, r - 1, b - 1, 0x2000000 | 47);
|
gfx_fill_rect(dpi, l + 1, t + 1, r - 1, b - 1, 0x2000000 | 47);
|
||||||
}
|
}
|
||||||
|
@ -853,12 +853,12 @@ static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i
|
||||||
{
|
{
|
||||||
colour &= 0x7F;
|
colour &= 0x7F;
|
||||||
// Trough
|
// Trough
|
||||||
gfx_fill_rect(dpi, l + 10, t, r - 10, b, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t, r - 10, b, ColourMapA[colour].lighter);
|
||||||
gfx_fill_rect(dpi, l + 10, t, r - 10, b, 0x1000000 | *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t, r - 10, b, 0x1000000 | ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 10, t + 2, r - 10, t + 2, *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t + 2, r - 10, t + 2, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 10, t + 3, r - 10, t + 3, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t + 3, r - 10, t + 3, ColourMapA[colour].lighter);
|
||||||
gfx_fill_rect(dpi, l + 10, t + 7, r - 10, t + 7, *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t + 7, r - 10, t + 7, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 10, t + 8, r - 10, t + 8, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l + 10, t + 8, r - 10, t + 8, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Left button
|
// Left button
|
||||||
gfx_fill_rect_inset(dpi, l, t, l + 9, b, colour, (scroll->flags & HSCROLLBAR_LEFT_PRESSED ? 0x20 : 0));
|
gfx_fill_rect_inset(dpi, l, t, l + 9, b, colour, (scroll->flags & HSCROLLBAR_LEFT_PRESSED ? 0x20 : 0));
|
||||||
|
@ -879,12 +879,12 @@ static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i
|
||||||
{
|
{
|
||||||
colour &= 0x7F;
|
colour &= 0x7F;
|
||||||
// Trough
|
// Trough
|
||||||
gfx_fill_rect(dpi, l, t + 10, r, b - 10, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l, t + 10, r, b - 10, ColourMapA[colour].lighter);
|
||||||
gfx_fill_rect(dpi, l, t + 10, r, b - 10, 0x1000000 | *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l, t + 10, r, b - 10, 0x1000000 | ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 2, t + 10, l + 2, b - 10, *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 2, t + 10, l + 2, b - 10, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 3, t + 10, l + 3, b - 10, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l + 3, t + 10, l + 3, b - 10, ColourMapA[colour].lighter);
|
||||||
gfx_fill_rect(dpi, l + 7, t + 10, l + 7, b - 10, *((uint8*)(0x0141FC47 + (colour * 8))));
|
gfx_fill_rect(dpi, l + 7, t + 10, l + 7, b - 10, ColourMapA[colour].mid_dark);
|
||||||
gfx_fill_rect(dpi, l + 8, t + 10, l + 8, b - 10, *((uint8*)(0x0141FC4B + (colour * 8))));
|
gfx_fill_rect(dpi, l + 8, t + 10, l + 8, b - 10, ColourMapA[colour].lighter);
|
||||||
|
|
||||||
// Up button
|
// Up button
|
||||||
gfx_fill_rect_inset(dpi, l, t, r, t + 9, colour, (scroll->flags & VSCROLLBAR_UP_PRESSED ? 0x20 : 0));
|
gfx_fill_rect_inset(dpi, l, t, r, t + 9, colour, (scroll->flags & VSCROLLBAR_UP_PRESSED ? 0x20 : 0));
|
||||||
|
@ -934,7 +934,7 @@ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, int widgetI
|
||||||
if (widget_is_disabled(w, widgetIndex)) {
|
if (widget_is_disabled(w, widgetIndex)) {
|
||||||
// Draw greyed out (light border bottom right shadow)
|
// Draw greyed out (light border bottom right shadow)
|
||||||
colour = w->colours[widget->colour];
|
colour = w->colours[widget->colour];
|
||||||
colour = RCT2_ADDRESS(0x00141FC4A, uint8)[(colour & 0x7F) * 8] & 0xFF;
|
colour = ColourMapA[colour & 0x7F].lighter;
|
||||||
|
|
||||||
uint8 palette[256];
|
uint8 palette[256];
|
||||||
memset(palette, colour, 256);
|
memset(palette, colour, 256);
|
||||||
|
@ -946,7 +946,7 @@ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, int widgetI
|
||||||
|
|
||||||
// Draw greyed out (dark)
|
// Draw greyed out (dark)
|
||||||
colour = w->colours[widget->colour];
|
colour = w->colours[widget->colour];
|
||||||
colour = RCT2_ADDRESS(0x00141FC48, uint8)[(colour & 0x7F) * 8] & 0xFF;
|
colour = ColourMapA[colour & 0x7F].mid_light;
|
||||||
memset(palette, colour, 256);
|
memset(palette, colour, 256);
|
||||||
palette[0] = 0;
|
palette[0] = 0;
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ static void widget_text_box_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTextBoxFrameNo <= 15){
|
if (gTextBoxFrameNo <= 15){
|
||||||
uint8 colour = RCT2_ADDRESS(0x0141FC48, uint8)[w->colours[1] * 8];
|
uint8 colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
gfx_fill_rect(dpi, cur_x, t + 9, cur_x + width, t + 9, colour + 5);
|
gfx_fill_rect(dpi, cur_x, t + 9, cur_x + width, t + 9, colour + 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "../ride/ride.h"
|
#include "../ride/ride.h"
|
||||||
#include "../ride/vehicle.h"
|
#include "../ride/vehicle.h"
|
||||||
#include "../world/park.h"
|
#include "../world/park.h"
|
||||||
|
#include "colour.h"
|
||||||
|
|
||||||
struct rct_window;
|
struct rct_window;
|
||||||
union rct_window_event;
|
union rct_window_event;
|
||||||
|
|
|
@ -308,10 +308,8 @@ static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
gfx_fill_rect(dpi, l, t, r, b, (RCT2_ADDRESS(0x009DEDF4, uint8)[w->colours[0]] | 0x02000000) + 1);
|
gfx_fill_rect(dpi, l, t, r, b, (RCT2_ADDRESS(0x009DEDF4, uint8)[w->colours[0]] | 0x02000000) + 1);
|
||||||
gfx_fill_rect(dpi, l, t + 1, r, b + 1, (RCT2_ADDRESS(0x009DEDF4, uint8)[w->colours[0]] | 0x02000000) + 2);
|
gfx_fill_rect(dpi, l, t + 1, r, b + 1, (RCT2_ADDRESS(0x009DEDF4, uint8)[w->colours[0]] | 0x02000000) + 2);
|
||||||
} else {
|
} else {
|
||||||
gfx_fill_rect(dpi, l, t, r, b,
|
gfx_fill_rect(dpi, l, t, r, b, ColourMapA[w->colours[0]].mid_dark);
|
||||||
*((char*)(0x00141FC47 + (w->colours[0] * 8))));
|
gfx_fill_rect(dpi, l, t + 1, r, b + 1, ColourMapA[w->colours[0]].lightest);
|
||||||
gfx_fill_rect(dpi, l, t + 1, r, b + 1,
|
|
||||||
*((char*)(0x00141FC4B + (w->colours[0] * 8))));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
|
|
@ -760,7 +760,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo
|
||||||
w->y + widget->top + 1,
|
w->y + widget->top + 1,
|
||||||
w->x + widget->right - 1,
|
w->x + widget->right - 1,
|
||||||
w->y + widget->bottom - 1,
|
w->y + widget->bottom - 1,
|
||||||
RCT2_GLOBAL(0x0141FC44 + (w->colours[1] * 8), uint8)
|
ColourMapA[w->colours[1]].darkest
|
||||||
);
|
);
|
||||||
|
|
||||||
researchItem = _editorInventionsListDraggedItem;
|
researchItem = _editorInventionsListDraggedItem;
|
||||||
|
@ -814,7 +814,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix
|
||||||
utf8 buffer[256], *ptr;
|
utf8 buffer[256], *ptr;
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
colour = RCT2_GLOBAL(0x0141FC48 + (w->colours[1] * 8), uint8);
|
colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
||||||
gfx_clear(dpi, colour);
|
gfx_clear(dpi, colour);
|
||||||
|
|
||||||
|
|
|
@ -1269,7 +1269,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf
|
||||||
w->y + widget->top + 1,
|
w->y + widget->top + 1,
|
||||||
w->x + widget->right - 1,
|
w->x + widget->right - 1,
|
||||||
w->y + widget->bottom - 1,
|
w->y + widget->bottom - 1,
|
||||||
RCT2_ADDRESS(0x0141FC44, uint8)[w->colours[1] * 8]
|
ColourMapA[w->colours[1]].darkest
|
||||||
);
|
);
|
||||||
|
|
||||||
// Draw number of selected items
|
// Draw number of selected items
|
||||||
|
@ -1425,7 +1425,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
|
||||||
|
|
||||||
bool ridePage = (w->selected_tab == WINDOW_OBJECT_SELECTION_PAGE_RIDE_VEHICLES_ATTRACTIONS);
|
bool ridePage = (w->selected_tab == WINDOW_OBJECT_SELECTION_PAGE_RIDE_VEHICLES_ATTRACTIONS);
|
||||||
|
|
||||||
colour = RCT2_ADDRESS(0x0141FC48, uint8)[w->colours[1] * 8];
|
colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
||||||
gfx_clear(dpi, colour);
|
gfx_clear(dpi, colour);
|
||||||
|
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct
|
||||||
rct_string_id stringId;
|
rct_string_id stringId;
|
||||||
rct_ride *ride;
|
rct_ride *ride;
|
||||||
|
|
||||||
colour = RCT2_GLOBAL(0x0141FC48 + (w->colours[1] * 8), uint8);
|
colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, colour);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, colour);
|
||||||
|
|
||||||
for (i = 0; i < w->no_list_items; i++) {
|
for (i = 0; i < w->no_list_items; i++) {
|
||||||
|
|
|
@ -665,7 +665,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
for (i = 0; i < 14; i++) {
|
for (i = 0; i < 14; i++) {
|
||||||
// Darken every even row
|
// Darken every even row
|
||||||
if (i % 2 == 0)
|
if (i % 2 == 0)
|
||||||
gfx_fill_rect(dpi, x, y, x + 513 - 2, y + 9, RCT2_GLOBAL(0x0141FC4A + (w->colours[1] * 8), uint8) | 0x1000000);
|
gfx_fill_rect(dpi, x, y, x + 513 - 2, y + 9, ColourMapA[w->colours[1]].lighter | 0x1000000);
|
||||||
|
|
||||||
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_RIDE_CONSTRUCTION + i, NULL, 0, x, y - 1);
|
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_RIDE_CONSTRUCTION + i, NULL, 0, x, y - 1);
|
||||||
y += 10;
|
y += 10;
|
||||||
|
|
|
@ -1669,7 +1669,7 @@ void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, int
|
||||||
// dx
|
// dx
|
||||||
int bottom = dpi->y + dpi->height - 1;
|
int bottom = dpi->y + dpi->height - 1;
|
||||||
|
|
||||||
int colour = RCT2_ADDRESS(0x141FC48, uint8)[w->colours[1] * 8];
|
int colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
gfx_fill_rect(dpi, left, top, right, bottom, colour);
|
gfx_fill_rect(dpi, left, top, right, bottom, colour);
|
||||||
|
|
||||||
for (int list_index = 0; list_index < w->no_list_items; list_index++){
|
for (int list_index = 0; list_index < w->no_list_items; list_index++){
|
||||||
|
|
|
@ -646,7 +646,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
|
||||||
uint32 argument_1, argument_2;
|
uint32 argument_1, argument_2;
|
||||||
|
|
||||||
// Background fill
|
// Background fill
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ((char*)0x0141FC48)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
switch (_window_guest_list_selected_tab) {
|
switch (_window_guest_list_selected_tab) {
|
||||||
case PAGE_INDIVIDUAL:
|
case PAGE_INDIVIDUAL:
|
||||||
|
|
|
@ -302,7 +302,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
widget = &window_install_track_widgets[WIDX_TRACK_PREVIEW];
|
widget = &window_install_track_widgets[WIDX_TRACK_PREVIEW];
|
||||||
x = w->x + widget->left + 1;
|
x = w->x + widget->left + 1;
|
||||||
y = w->y + widget->top + 1;
|
y = w->y + widget->top + 1;
|
||||||
colour = RCT2_GLOBAL(0x0141FC44 + (w->colours[0] * 8), uint8);
|
colour = ColourMapA[w->colours[0]].darkest;
|
||||||
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
|
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
|
||||||
|
|
||||||
//call 6d3993 (load track)
|
//call 6d3993 (load track)
|
||||||
|
|
|
@ -532,7 +532,7 @@ static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i
|
||||||
rct_string_id stringId, templateStringId = 3165;
|
rct_string_id stringId, templateStringId = 3165;
|
||||||
char *templateString;
|
char *templateString;
|
||||||
|
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, RCT2_ADDRESS(0x0141FC48,uint8)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
templateString = (char*)language_get_string(templateStringId);
|
templateString = (char*)language_get_string(templateStringId);
|
||||||
for (i = 0; i < w->no_list_items; i++) {
|
for (i = 0; i < w->no_list_items; i++) {
|
||||||
|
|
|
@ -777,7 +777,7 @@ static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i
|
||||||
if (_window_new_ride_current_tab == WINDOW_NEW_RIDE_PAGE_RESEARCH)
|
if (_window_new_ride_current_tab == WINDOW_NEW_RIDE_PAGE_RESEARCH)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gfx_clear(dpi, RCT2_GLOBAL(0x0141FC48 + (w->colours[1] * 8), uint8) * 0x1010101);
|
gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light * 0x1010101);
|
||||||
|
|
||||||
int x = 1;
|
int x = 1;
|
||||||
int y = 1;
|
int y = 1;
|
||||||
|
|
|
@ -269,7 +269,7 @@ static void window_player_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
|
||||||
{
|
{
|
||||||
int y;
|
int y;
|
||||||
|
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ((char*)0x0141FC48)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
y = 0;
|
y = 0;
|
||||||
for (int i = 0; i < network_get_num_players(); i++) {
|
for (int i = 0; i < network_get_num_players(); i++) {
|
||||||
|
|
|
@ -451,7 +451,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
|
||||||
int i, y, format, formatSecondary, argument;
|
int i, y, format, formatSecondary, argument;
|
||||||
rct_ride *ride;
|
rct_ride *ride;
|
||||||
|
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height, RCT2_GLOBAL(0x0141FC48 + (w->colours[1] * 8), uint8));
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
y = 0;
|
y = 0;
|
||||||
for (i = 0; i < w->no_list_items; i++) {
|
for (i = 0; i < w->no_list_items; i++) {
|
||||||
|
|
|
@ -1046,7 +1046,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
*/
|
*/
|
||||||
void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
||||||
{
|
{
|
||||||
gfx_clear(dpi, ((char*)0x0141FC48)[w->colours[1] * 8] * 0x1010101);
|
gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light * 0x1010101);
|
||||||
|
|
||||||
uint8 tabIndex = window_scenery_active_tab_index;
|
uint8 tabIndex = window_scenery_active_tab_index;
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
|
||||||
{
|
{
|
||||||
uint32 colour;
|
uint32 colour;
|
||||||
|
|
||||||
colour = ((char*)0x0141FC48)[w->colours[1] * 8];
|
colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
||||||
gfx_clear(dpi, colour);
|
gfx_clear(dpi, colour);
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@ static void window_shortcut_scrollmouseover(rct_window *w, int scrollIndex, int
|
||||||
*/
|
*/
|
||||||
static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
||||||
{
|
{
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, RCT2_ADDRESS(0x0141FC48,uint8)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
for (int i = 0; i < w->no_list_items; ++i) {
|
for (int i = 0; i < w->no_list_items; ++i) {
|
||||||
int y = i * 10;
|
int y = i * 10;
|
||||||
|
|
|
@ -621,7 +621,7 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int sc
|
||||||
uint8 selectedTab;
|
uint8 selectedTab;
|
||||||
rct_peep *peep;
|
rct_peep *peep;
|
||||||
|
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ((char*)0x0141FC48)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
y = 0;
|
y = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
|
@ -310,7 +310,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w->frame_no > 15){
|
if (w->frame_no > 15){
|
||||||
uint8 colour = RCT2_ADDRESS(0x0141FC48, uint8)[w->colours[1] * 8];
|
uint8 colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
gfx_fill_rect(dpi, cursorX, y + 9, cursorX + width, y + 9, colour + 5);
|
gfx_fill_rect(dpi, cursorX, y + 9, cursorX + width, y + 9, colour + 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -844,8 +844,8 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scroll
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((w->colours[1] & 0x80) == 0)
|
if ((w->colours[1] & 0x80) == 0)
|
||||||
//gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ((char*)0x0141FC48)[w->colours[1] * 8]);
|
//gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
gfx_clear(dpi, ((char*)0x0141FC48)[w->colours[1] * 8] * 0x1010101);
|
gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light * 0x1010101);
|
||||||
y = 0;
|
y = 0;
|
||||||
for (int i = 0; i < get_colour_scheme_tab_count(); i++) {
|
for (int i = 0; i < get_colour_scheme_tab_count(); i++) {
|
||||||
if (y > dpi->y + dpi->height) {
|
if (y > dpi->y + dpi->height) {
|
||||||
|
@ -862,9 +862,9 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scroll
|
||||||
gfx_fill_rect(dpi, 0, y + _row_height - 1, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 1, colour + 2);
|
gfx_fill_rect(dpi, 0, y + _row_height - 1, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 1, colour + 2);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
colour = RCT2_ADDRESS(0x0141FC47, uint8)[w->colours[1] * 8];
|
colour = ColourMapA[w->colours[1]].mid_dark;
|
||||||
gfx_fill_rect(dpi, 0, y + _row_height - 2, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 2, colour);
|
gfx_fill_rect(dpi, 0, y + _row_height - 2, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 2, colour);
|
||||||
colour = RCT2_ADDRESS(0x0141FC4B, uint8)[w->colours[1] * 8];
|
colour = ColourMapA[w->colours[1]].lightest;
|
||||||
gfx_fill_rect(dpi, 0, y + _row_height - 1, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 1, colour);
|
gfx_fill_rect(dpi, 0, y + _row_height - 1, window_themes_widgets[WIDX_THEMES_LIST].right, y + _row_height - 1, colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,7 @@ static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *
|
||||||
int clearance_height = element->clearance_height;
|
int clearance_height = element->clearance_height;
|
||||||
|
|
||||||
if ((i & 1) != 0)
|
if ((i & 1) != 0)
|
||||||
gfx_fill_rect(dpi, x - 15, y, x + WW - 20, y + 11, RCT2_GLOBAL(0x0141FC4A + (w->colours[1] * 8), uint8) | 0x1000000);
|
gfx_fill_rect(dpi, x - 15, y, x + WW - 20, y + 11, ColourMapA[w->colours[1]].lighter | 0x1000000);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case MAP_ELEMENT_TYPE_SURFACE:
|
case MAP_ELEMENT_TYPE_SURFACE:
|
||||||
|
|
|
@ -887,7 +887,7 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int
|
||||||
bool selected, hover, error, inTitle;
|
bool selected, hover, error, inTitle;
|
||||||
int y, x, x2, width;
|
int y, x, x2, width;
|
||||||
|
|
||||||
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ((char*)0x0141FC48)[w->colours[1] * 8]);
|
gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light);
|
||||||
|
|
||||||
title_sequence *title = &gConfigTitleSequences.presets[gCurrentTitleSequence];
|
title_sequence *title = &gConfigTitleSequences.presets[gCurrentTitleSequence];
|
||||||
|
|
||||||
|
@ -901,14 +901,14 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int
|
||||||
hover = false;
|
hover = false;
|
||||||
if (i == w->selected_list_item) {
|
if (i == w->selected_list_item) {
|
||||||
selected = true;
|
selected = true;
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC46 + (w->colours[1] * 8), uint8));
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].dark);
|
||||||
}
|
}
|
||||||
else if (i == _window_title_editor_highlighted_index || (i == gTitleScriptSave && inTitle && gCurrentTitleSequence == gCurrentPreviewTitleSequence)) {
|
else if (i == _window_title_editor_highlighted_index || (i == gTitleScriptSave && inTitle && gCurrentTitleSequence == gCurrentPreviewTitleSequence)) {
|
||||||
hover = true;
|
hover = true;
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC47 + (w->colours[1] * 8), uint8));
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].mid_dark);
|
||||||
}
|
}
|
||||||
else if (i & 1) {
|
else if (i & 1) {
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC4A + (w->colours[1] * 8), uint8) | 0x1000000);
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].lighter | 0x1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = (uint32)&title->saves[i];
|
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = (uint32)&title->saves[i];
|
||||||
|
@ -933,14 +933,14 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int
|
||||||
error = false;
|
error = false;
|
||||||
if (i == w->selected_list_item) {
|
if (i == w->selected_list_item) {
|
||||||
selected = true;
|
selected = true;
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC46 + (w->colours[1] * 8), uint8));
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].dark);
|
||||||
}
|
}
|
||||||
else if (i == (int)_window_title_editor_highlighted_index || (i == gTitleScriptCommand && inTitle && gCurrentTitleSequence == gCurrentPreviewTitleSequence)) {
|
else if (i == (int)_window_title_editor_highlighted_index || (i == gTitleScriptCommand && inTitle && gCurrentTitleSequence == gCurrentPreviewTitleSequence)) {
|
||||||
hover = true;
|
hover = true;
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC47 + (w->colours[1] * 8), uint8));
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].mid_dark);
|
||||||
}
|
}
|
||||||
else if (i & 1) {
|
else if (i & 1) {
|
||||||
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC4A + (w->colours[1] * 8), uint8) | 0x1000000);
|
gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].lighter | 0x1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
rct_string_id commandName;
|
rct_string_id commandName;
|
||||||
|
|
|
@ -317,7 +317,7 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *
|
||||||
int i, y, colour, highlighted, highlighted_format, unhighlighted_format;
|
int i, y, colour, highlighted, highlighted_format, unhighlighted_format;
|
||||||
rct_scenario_basic *scenario;
|
rct_scenario_basic *scenario;
|
||||||
|
|
||||||
colour = ((char*)0x0141FC48)[w->colours[1] * 8];
|
colour = ColourMapA[w->colours[1]].mid_light;
|
||||||
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
||||||
gfx_clear(dpi, colour);
|
gfx_clear(dpi, colour);
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
widget = &window_track_list_widgets[WIDX_TRACK_PREVIEW];
|
widget = &window_track_list_widgets[WIDX_TRACK_PREVIEW];
|
||||||
x = w->x + widget->left + 1;
|
x = w->x + widget->left + 1;
|
||||||
y = w->y + widget->top + 1;
|
y = w->y + widget->top + 1;
|
||||||
colour = RCT2_GLOBAL(0x0141FC44 + (w->colours[0] * 8), uint8);
|
colour = ColourMapA[w->colours[0]].darkest;
|
||||||
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
|
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
|
||||||
|
|
||||||
trackDesign = track_get_info(trackIndex, &image);
|
trackDesign = track_get_info(trackIndex, &image);
|
||||||
|
@ -562,7 +562,7 @@ static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
|
||||||
int i, x, y, colour;
|
int i, x, y, colour;
|
||||||
utf8 *trackDesignItem, *trackDesignList = RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, utf8);
|
utf8 *trackDesignItem, *trackDesignList = RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, utf8);
|
||||||
|
|
||||||
colour = RCT2_GLOBAL(0x00141FC48 + (w->colours[0] * 8), uint8);
|
colour = ColourMapA[w->colours[0]].mid_light;
|
||||||
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
colour = (colour << 24) | (colour << 16) | (colour << 8) | colour;
|
||||||
gfx_clear(dpi, colour);
|
gfx_clear(dpi, colour);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue