2016-05-04 19:24:41 +02:00
|
|
|
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
|
2014-04-28 03:35:37 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
|
|
|
*
|
2016-05-04 19:24:41 +02:00
|
|
|
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
|
|
|
|
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
|
2014-04-28 03:35:37 +02:00
|
|
|
*
|
|
|
|
* OpenRCT2 is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-05-04 19:24:41 +02:00
|
|
|
*
|
|
|
|
* A full copy of the GNU General Public License can be found in licence.txt
|
2014-04-28 03:35:37 +02:00
|
|
|
*****************************************************************************/
|
2016-05-04 19:24:41 +02:00
|
|
|
#pragma endregion
|
2014-04-28 03:35:37 +02:00
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../localisation/localisation.h"
|
|
|
|
#include "../sprites.h"
|
2016-09-10 23:40:08 +02:00
|
|
|
#include "../interface/themes.h"
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../interface/widget.h"
|
|
|
|
#include "../interface/window.h"
|
2014-04-28 03:35:37 +02:00
|
|
|
|
2014-05-19 21:10:32 +02:00
|
|
|
enum WINDOW_ABOUT_WIDGET_IDX {
|
2014-04-28 03:35:37 +02:00
|
|
|
WIDX_BACKGROUND,
|
|
|
|
WIDX_TITLE,
|
|
|
|
WIDX_CLOSE,
|
|
|
|
WIDX_MUSIC_CREDITS,
|
|
|
|
WIDX_PUBLISHER_CREDITS
|
|
|
|
};
|
|
|
|
|
2014-05-19 21:10:32 +02:00
|
|
|
rct_widget window_about_widgets[] = {
|
2016-07-14 14:07:49 +02:00
|
|
|
{ WWT_FRAME, 0, 0, 399, 0, 329, 0xFFFFFFFF, STR_NONE }, // panel / background
|
2014-04-28 03:35:37 +02:00
|
|
|
{ WWT_CAPTION, 0, 1, 398, 1, 14, STR_ROLLERCOASTER_TYCOON_2, STR_WINDOW_TITLE_TIP }, // title bar
|
|
|
|
{ WWT_CLOSEBOX, 0, 387, 397, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button
|
|
|
|
{ WWT_DROPDOWN_BUTTON, 1, 100, 299, 230, 241, STR_MUSIC_ACKNOWLEDGEMENTS_ELLIPSIS, STR_NONE }, // music credits button
|
|
|
|
{ WWT_DROPDOWN_BUTTON, 1, 157, 356, 307, 318, STR_INFOGRAMES_INTERACTIVE_CREDITS, STR_NONE }, // infogrames credits button
|
|
|
|
{ WIDGETS_END },
|
|
|
|
};
|
|
|
|
|
2015-07-10 02:39:16 +02:00
|
|
|
static void window_about_mouseup(rct_window *w, int widgetIndex);
|
|
|
|
static void window_about_paint(rct_window *w, rct_drawpixelinfo *dpi);
|
2014-04-28 03:35:37 +02:00
|
|
|
|
2015-07-10 02:39:16 +02:00
|
|
|
static rct_window_event_list window_about_events = {
|
|
|
|
NULL,
|
2014-04-28 03:35:37 +02:00
|
|
|
window_about_mouseup,
|
2015-07-10 02:39:16 +02:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2014-04-28 03:35:37 +02:00
|
|
|
window_about_paint,
|
2015-07-10 02:39:16 +02:00
|
|
|
NULL
|
2014-04-28 03:35:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-10-20 20:16:30 +02:00
|
|
|
*
|
2014-04-28 03:35:37 +02:00
|
|
|
* rct2: 0x0066D2AC
|
|
|
|
*/
|
|
|
|
void window_about_open()
|
|
|
|
{
|
|
|
|
rct_window* window;
|
|
|
|
|
|
|
|
// Check if window is already open
|
2014-10-16 03:02:43 +02:00
|
|
|
window = window_bring_to_front_by_class(WC_ABOUT);
|
2014-04-28 03:35:37 +02:00
|
|
|
if (window != NULL)
|
|
|
|
return;
|
|
|
|
|
2015-02-14 19:26:59 +01:00
|
|
|
window = window_create_centred(
|
2014-04-28 03:35:37 +02:00
|
|
|
400,
|
|
|
|
330,
|
2015-07-10 02:39:16 +02:00
|
|
|
&window_about_events,
|
2014-04-28 03:35:37 +02:00
|
|
|
WC_ABOUT,
|
|
|
|
0
|
|
|
|
);
|
|
|
|
window->widgets = window_about_widgets;
|
|
|
|
window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_MUSIC_CREDITS) | (1 << WIDX_PUBLISHER_CREDITS);
|
|
|
|
|
|
|
|
window_init_scroll_widgets(window);
|
2016-08-06 19:47:55 +02:00
|
|
|
window->colours[0] = COLOUR_LIGHT_BLUE;
|
|
|
|
window->colours[1] = COLOUR_LIGHT_BLUE;
|
|
|
|
window->colours[2] = COLOUR_LIGHT_BLUE;
|
2014-04-28 03:35:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-10-20 20:16:30 +02:00
|
|
|
*
|
2014-04-28 03:35:37 +02:00
|
|
|
* rct2: 0x0066D4D5
|
|
|
|
*/
|
2015-07-10 02:39:16 +02:00
|
|
|
static void window_about_mouseup(rct_window *w, int widgetIndex)
|
2014-04-28 03:35:37 +02:00
|
|
|
{
|
|
|
|
switch (widgetIndex) {
|
|
|
|
case WIDX_CLOSE:
|
|
|
|
window_close(w);
|
|
|
|
break;
|
|
|
|
case WIDX_MUSIC_CREDITS:
|
2014-09-11 17:44:23 +02:00
|
|
|
window_music_credits_open();
|
2014-04-28 03:35:37 +02:00
|
|
|
break;
|
|
|
|
case WIDX_PUBLISHER_CREDITS:
|
2014-09-26 22:19:48 +02:00
|
|
|
window_publisher_credits_open();
|
2014-04-28 03:35:37 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-10-20 20:16:30 +02:00
|
|
|
*
|
2014-04-28 03:35:37 +02:00
|
|
|
* rct2: 0x0066D321
|
|
|
|
*/
|
2015-07-10 02:39:16 +02:00
|
|
|
static void window_about_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
2014-04-28 03:35:37 +02:00
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
window_draw_widgets(w, dpi);
|
|
|
|
|
|
|
|
x = w->x + 200;
|
|
|
|
y = w->y + 17;
|
|
|
|
|
|
|
|
// Version
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_VERSION_X, x, y, 0, NULL);
|
2015-10-20 20:16:30 +02:00
|
|
|
|
2014-04-28 03:35:37 +02:00
|
|
|
// Credits
|
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_COPYRIGHT_CS, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 79;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_DESIGNED_AND_PROGRAMMED_BY_CS, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_GRAPHICS_BY_SF, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_SOUND_AND_MUSIC_BY_AB, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 13;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_REPRESENTATION_BY_JL, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 25;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_THANKS_TO, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_THANKS_TO_PEOPLE, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_1, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_2, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_3, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_4, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_5, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_6, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
y += 10;
|
2016-09-10 23:40:08 +02:00
|
|
|
gfx_draw_string_centred(dpi, STR_CREDIT_SPARE_7, x, y, 0, NULL);
|
2014-04-28 03:35:37 +02:00
|
|
|
|
|
|
|
// Images
|
2014-08-08 20:16:57 +02:00
|
|
|
gfx_draw_sprite(dpi, SPR_CREDITS_CHRIS_SAWYER_SMALL, w->x + 92, w->y + 40, 0);
|
|
|
|
gfx_draw_sprite(dpi, SPR_CREDITS_INFOGRAMES, w->x + 50, w->y + 247, 0);
|
2014-04-28 03:35:37 +02:00
|
|
|
|
|
|
|
// Licence
|
|
|
|
gfx_draw_string_left(dpi, STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC, 0, 0, w->x + 157, w->y + 257);
|
2014-08-30 06:17:01 +02:00
|
|
|
}
|