forked from rosebudai/OpenRCT2-Web
Merge pull request #1055 from Gymnasiast/develop
Add config-file option for a RCT1-like colour scheme
This commit is contained in:
commit
e673a8ab80
15 files changed
+193
-45
No files matched your search
@@ -166,6 +166,7 @@ config_property_definition _interfaceDefinitions[] = {
|
||||
{ offsetof(interface_configuration, toolbar_show_finances), "toolbar_show_finances", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||
{ offsetof(interface_configuration, toolbar_show_research), "toolbar_show_research", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
|
||||
{ offsetof(interface_configuration, allow_subtype_switching), "allow_subtype_switching", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||
{ offsetof(interface_configuration, rct1_colour_scheme), "rct1_colour_scheme", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||
};
|
||||
|
||||
config_property_definition _soundDefinitions[] = {
|
||||
|
||||
@@ -135,6 +135,7 @@ typedef struct {
|
||||
uint8 toolbar_show_finances;
|
||||
uint8 toolbar_show_research;
|
||||
uint8 allow_subtype_switching;
|
||||
uint8 rct1_colour_scheme;
|
||||
} interface_configuration;
|
||||
|
||||
typedef struct {
|
||||
|
||||
+15
-4
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../interface/graph.h"
|
||||
#include "../interface/widget.h"
|
||||
@@ -540,9 +541,19 @@ void window_finances_open()
|
||||
w = window_create_auto_pos(530, 257, window_finances_page_events[0], WC_FINANCES, WF_10);
|
||||
w->number = 0;
|
||||
w->frame_no = 0;
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 19;
|
||||
w->colours[2] = 19;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 19;
|
||||
w->colours[2] = 19;
|
||||
}
|
||||
else
|
||||
{
|
||||
w->colours[0] = 4;
|
||||
w->colours[1] = 1;
|
||||
w->colours[2] = 1;
|
||||
}
|
||||
research_update_uncompleted_types();
|
||||
}
|
||||
|
||||
@@ -1554,4 +1565,4 @@ static void window_finances_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *
|
||||
window_finances_draw_tab_image(dpi, w, WINDOW_FINANCES_PAGE_RESEARCH, SPR_TAB_FINANCES_RESEARCH_0);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma endregion
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../localisation/date.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../interface/widget.h"
|
||||
@@ -148,9 +149,19 @@ void window_game_bottom_toolbar_open()
|
||||
|
||||
window->frame_no = 0;
|
||||
window_init_scroll_widgets(window);
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 0;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 129;
|
||||
window->colours[1] = 129;
|
||||
window->colours[2] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -429,10 +440,12 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r
|
||||
);
|
||||
|
||||
// Draw park rating
|
||||
int park_rating_bar_colour=!gConfigInterface.rct1_colour_scheme ? 14 : 18;
|
||||
|
||||
window_game_bottom_toolbar_draw_park_rating(
|
||||
dpi,
|
||||
w,
|
||||
14,
|
||||
park_rating_bar_colour,
|
||||
w->x + window_game_bottom_toolbar_widgets[WIDX_PARK_RATING].left + 11,
|
||||
w->y + window_game_bottom_toolbar_widgets[WIDX_PARK_RATING].top,
|
||||
max(10, ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, sint16) / 4) * 263) / 256)
|
||||
|
||||
+15
-3
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../world/map.h"
|
||||
#include "../management/marketing.h"
|
||||
@@ -507,9 +508,20 @@ void window_guest_open(rct_peep* peep){
|
||||
window->flags = WF_RESIZABLE;
|
||||
window->no_list_items = 0;
|
||||
window->selected_list_item = -1;
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 15;
|
||||
window->colours[2] = 15;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 15;
|
||||
window->colours[2] = 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 22;
|
||||
window->colours[1] = 26;
|
||||
window->colours[2] = 26;
|
||||
}
|
||||
|
||||
window->viewport_focus_coordinates.y = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../interface/widget.h"
|
||||
#include "../interface/window.h"
|
||||
@@ -173,9 +174,19 @@ void window_guest_list_open()
|
||||
window->max_width = 500;
|
||||
window->max_height = 450;
|
||||
window->flags |= WF_RESIZABLE;
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 15;
|
||||
window->colours[2] = 15;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 15;
|
||||
window->colours[2] = 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 22;
|
||||
window->colours[1] = 26;
|
||||
window->colours[2] = 26;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -956,4 +967,4 @@ static void window_guest_list_find_groups()
|
||||
nextPeep:
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
-3
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../game.h"
|
||||
#include "../management/news_item.h"
|
||||
@@ -410,9 +411,20 @@ rct_window *window_new_ride_open()
|
||||
window_init_scroll_widgets(w);
|
||||
|
||||
w->frame_no = 0;
|
||||
w->colours[0] = 24;
|
||||
w->colours[1] = 26;
|
||||
w->colours[2] = 26;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
w->colours[0] = 24;
|
||||
w->colours[1] = 26;
|
||||
w->colours[2] = 26;
|
||||
}
|
||||
else
|
||||
{
|
||||
w->colours[0] = 26;
|
||||
w->colours[1] = 1;
|
||||
w->colours[2] = 1;
|
||||
}
|
||||
|
||||
w->new_ride.selected_ride_id = -1;
|
||||
w->new_ride.highlighted_ride_id = -1;
|
||||
_lastTrackDesignCountRideType.type = 255;
|
||||
|
||||
+13
-3
@@ -1172,9 +1172,19 @@ rct_window *window_ride_open(int rideIndex)
|
||||
w->max_width = 500;
|
||||
w->max_height = 450;
|
||||
w->flags |= WF_RESIZABLE;
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 26;
|
||||
w->colours[2] = 11;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 26;
|
||||
w->colours[2] = 11;
|
||||
}
|
||||
else
|
||||
{
|
||||
w->colours[0] = 26;
|
||||
w->colours[1] = 1;
|
||||
w->colours[2] = 11;
|
||||
}
|
||||
|
||||
ride = GET_RIDE(rideIndex);
|
||||
numSubTypes = 0;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../ride/ride.h"
|
||||
#include "../localisation/localisation.h"
|
||||
@@ -161,9 +162,20 @@ void window_ride_list_open()
|
||||
window->max_width = 400;
|
||||
window->max_height = 450;
|
||||
window->flags |= WF_RESIZABLE;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 26;
|
||||
window->colours[2] = 26;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 26;
|
||||
window->colours[1] = 1;
|
||||
window->colours[2] = 1;
|
||||
}
|
||||
|
||||
}
|
||||
_window_ride_list_information_type = INFORMATION_TYPE_STATUS;
|
||||
window->list_information_type = 0;
|
||||
|
||||
+14
-4
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../interface/widget.h"
|
||||
@@ -319,9 +320,18 @@ void window_staff_open(rct_peep* peep)
|
||||
|
||||
w->flags = 1 << 8;
|
||||
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 4;
|
||||
w->colours[2] = 4;
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
w->colours[0] = 1;
|
||||
w->colours[1] = 4;
|
||||
w->colours[2] = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
w->colours[0] = 12;
|
||||
w->colours[1] = 4;
|
||||
w->colours[2] = 4;
|
||||
}
|
||||
}
|
||||
w->page = 0;
|
||||
window_invalidate(w);
|
||||
@@ -1382,4 +1392,4 @@ void window_staff_options_dropdown()
|
||||
int costume = (RCT2_ADDRESS(0xF4391B, uint8)[dropdownIndex] - 4) | 0x80;
|
||||
|
||||
game_do_command(peep->x, (costume << 8) | 1, peep->y, w->number, GAME_COMMAND_SET_STAFF_ORDER, (int)peep, 0);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../input.h"
|
||||
@@ -167,9 +168,19 @@ void window_staff_list_open()
|
||||
window->max_width = 500;
|
||||
window->max_height = 450;
|
||||
window->flags |= WF_RESIZABLE;
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 4;
|
||||
window->colours[2] = 4;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 4;
|
||||
window->colours[2] = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 12;
|
||||
window->colours[1] = 4;
|
||||
window->colours[2] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
void window_staff_list_cancel_tools(rct_window *w) {
|
||||
@@ -651,4 +662,4 @@ void window_staff_list_scrollpaint()
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../sprites.h"
|
||||
#include "../localisation/localisation.h"
|
||||
@@ -84,9 +85,19 @@ void window_title_exit_open()
|
||||
window->enabled_widgets |= 1;
|
||||
window_init_scroll_widgets(window);
|
||||
window->flags |= 16;
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 129;
|
||||
window->colours[1] = 129;
|
||||
window->colours[2] = 129;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,4 +131,4 @@ static void window_title_exit_paint()
|
||||
window_paint_get_registers(w, dpi);
|
||||
|
||||
window_draw_widgets(w, dpi);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../editor.h"
|
||||
#include "../game.h"
|
||||
#include "../interface/widget.h"
|
||||
@@ -100,9 +101,19 @@ void window_title_menu_open()
|
||||
window->enabled_widgets |= (8 | 4 | 2 | 1);
|
||||
window_init_scroll_widgets(window);
|
||||
window->flags |= 16;
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 129;
|
||||
window->colours[1] = 129;
|
||||
window->colours[2] = 129;
|
||||
}
|
||||
}
|
||||
|
||||
static void window_title_menu_mouseup()
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../interface/widget.h"
|
||||
@@ -82,9 +83,19 @@ void window_title_options_open()
|
||||
window->enabled_widgets |= 1;
|
||||
window_init_scroll_widgets(window);
|
||||
window->flags |= 16;
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 140;
|
||||
window->colours[1] = 140;
|
||||
window->colours[2] = 140;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 129;
|
||||
window->colours[1] = 129;
|
||||
window->colours[2] = 129;
|
||||
}
|
||||
}
|
||||
|
||||
static void window_title_options_mouseup()
|
||||
@@ -109,4 +120,4 @@ static void window_title_options_paint()
|
||||
window_paint_get_registers(w, dpi);
|
||||
|
||||
window_draw_widgets(w, dpi);
|
||||
}
|
||||
}
|
||||
@@ -216,10 +216,21 @@ void window_top_toolbar_open()
|
||||
window->widgets = window_top_toolbar_widgets;
|
||||
|
||||
window_init_scroll_widgets(window);
|
||||
window->colours[0] = 7;
|
||||
window->colours[1] = 12;
|
||||
window->colours[2] = 24;
|
||||
window->colours[3] = 1;
|
||||
|
||||
if(!gConfigInterface.rct1_colour_scheme)
|
||||
{
|
||||
window->colours[0] = 7;
|
||||
window->colours[1] = 12;
|
||||
window->colours[2] = 24;
|
||||
window->colours[3] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 1;
|
||||
window->colours[2] = 1;
|
||||
window->colours[3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1927,4 +1938,4 @@ void toggle_water_window(rct_window *topToolbar, int widgetIndex)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = 1;
|
||||
window_water_open();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user