1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-18 13:32:32 +01:00

add zoom button images to viewport window

This commit is contained in:
IntelOrca
2015-05-31 00:20:42 +01:00
parent 9f74eecb50
commit 1fdf1f57f7
9 changed files with 148 additions and 116 deletions

BIN
resources/g2/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

BIN
resources/g2/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

BIN
resources/g2/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
resources/g2/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

BIN
resources/g2/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

View File

@@ -178,7 +178,7 @@ int get_palette_index(uint32 colour)
if (rgba[3] < 128)
return -1;
for (int i = 10; i < 246; i++) {
for (int i = 0; i < 256; i++) {
if (spriteFilePalette[i].r != rgba[0]) continue;
if (spriteFilePalette[i].g != rgba[1]) continue;
if (spriteFilePalette[i].b != rgba[2]) continue;
@@ -489,6 +489,10 @@ int cmdline_for_sprite(const char **argv, int argc)
}
static rct_sprite_file_palette_entry _standardPalette[256] = {
// 0 (unused)
{ 0, 0, 0, 255 },
// 1 - 9 (misc. e.g. font and water)
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
@@ -498,7 +502,8 @@ static rct_sprite_file_palette_entry _standardPalette[256] = {
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
//
{ 35, 35, 23, 255 },
{ 51, 51, 35, 255 },
{ 67, 67, 47, 255 },
@@ -691,6 +696,8 @@ static rct_sprite_file_palette_entry _standardPalette[256] = {
{ 207, 207, 131, 255 },
{ 231, 231, 171, 255 },
{ 255, 255, 207, 255 },
// 203 - 214 (Secondary remap)
{ 27, 0, 63, 255 },
{ 51, 0, 103, 255 },
{ 63, 11, 123, 255 },
@@ -703,6 +710,8 @@ static rct_sprite_file_palette_entry _standardPalette[256] = {
{ 203, 151, 247, 255 },
{ 223, 183, 251, 255 },
{ 239, 215, 255, 255 },
// 214 - 225 (Brown)
{ 0, 19, 39, 255 },
{ 7, 31, 55, 255 },
{ 15, 47, 71, 255 },
@@ -715,10 +724,16 @@ static rct_sprite_file_palette_entry _standardPalette[256] = {
{ 171, 195, 207, 255 },
{ 195, 219, 231, 255 },
{ 223, 243, 255, 255 },
// 226 (unknown)
{ 75, 75, 55, 255 },
// 227 - 229 (tertiary remap)
{ 0, 183, 255, 255 },
{ 0, 219, 255, 255 },
{ 0, 255, 255, 255 },
// 230 - 239 (water)
{ 99, 107, 7, 255 },
{ 99, 107, 7, 255 },
{ 135, 143, 39, 255 },
@@ -729,20 +744,31 @@ static rct_sprite_file_palette_entry _standardPalette[256] = {
{ 227, 227, 155, 255 },
{ 203, 203, 115, 255 },
{ 151, 155, 55, 255 },
// 240 - 242 (chain lift)
{ 91, 91, 67, 255 },
{ 107, 107, 83, 255 },
{ 123, 123, 99, 255 },
{ 47, 47, 47, 255 },
{ 47, 47, 47, 255 },
{ 47, 71, 87, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
{ 0, 0, 0, 255 },
// Old 243 - 245, changed to nice shade remap below
// { 47, 47, 47, 255 },
// { 47, 47, 47, 255 },
// { 47, 71, 87, 255 },
// 243 to 254 (primary remap)
{ 47, 51, 111, 255 },
{ 47, 55, 131, 255 },
{ 51, 63, 151, 255 },
{ 51, 67, 171, 255 },
{ 47, 75, 191, 255 },
{ 43, 79, 211, 255 },
{ 35, 87, 231, 255 },
{ 31, 95, 255, 255 },
{ 39, 127, 255, 255 },
{ 51, 155, 255, 255 },
{ 63, 183, 255, 255 },
{ 75, 207, 255, 255 },
// 255 (unused?)
{ 0, 0, 0, 255 }
};

View File

@@ -353,7 +353,14 @@ SPR_G2_FASTFORWARD = SPR_G2_BEGIN + 2,
SPR_G2_SPEED_ARROW = SPR_G2_BEGIN + 3,
SPR_G2_HYPER_ARROW = SPR_G2_BEGIN + 4,
SPR_G2_TAB_TWITCH = SPR_G2_BEGIN + 5,
SPR_G2_TAB_LAND = SPR_G2_BEGIN + 6
SPR_G2_TAB_LAND = SPR_G2_BEGIN + 6,
SPR_G2_PLACEHOLDER = SPR_G2_BEGIN + 7,
SPR_G2_ZOOM_IN = SPR_G2_BEGIN + 8,
SPR_G2_ZOOM_IN_DISABLED = SPR_G2_BEGIN + 9,
SPR_G2_ZOOM_OUT = SPR_G2_BEGIN + 10,
SPR_G2_ZOOM_OUT_DISABLED = SPR_G2_BEGIN + 11,
};
#endif

View File

@@ -980,7 +980,6 @@ static void window_options_paint()
{
rct_window *w;
rct_drawpixelinfo *dpi;
char buffer[256];
window_paint_get_registers(w, dpi);

View File

@@ -51,8 +51,8 @@ static rct_widget window_viewport_widgets[] = {
{ WWT_RESIZE, 1, 0, 0, 14, 0, 0xFFFFFFFF, STR_NONE }, // resize
{ WWT_VIEWPORT, 0, 3, 0, 17, 0, 0xFFFFFFFF, STR_NONE }, // viewport
{ WWT_FLATBTN, 0, 0, 0, 17, 40, 0xFFFFFFFF, STR_ZOOM_IN_TIP }, // zoom in
{ WWT_FLATBTN, 0, 0, 0, 41, 64, 0xFFFFFFFF, STR_ZOOM_OUT_TIP }, // zoom out
{ WWT_FLATBTN, 0, 0, 0, 17, 40, SPR_G2_ZOOM_IN, STR_ZOOM_IN_TIP }, // zoom in
{ WWT_FLATBTN, 0, 0, 0, 41, 64, SPR_G2_ZOOM_OUT, STR_ZOOM_OUT_TIP }, // zoom out
{ WWT_FLATBTN, 0, 0, 0, 65, 88, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP }, // locate
{ WIDGETS_END },
};