mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
add other pages to park window
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
<ClInclude Include="..\src\strings.h" />
|
||||
<ClInclude Include="..\src\title.h" />
|
||||
<ClInclude Include="..\src\tutorial.h" />
|
||||
<ClInclude Include="..\src\util.h" />
|
||||
<ClInclude Include="..\src\viewport.h" />
|
||||
<ClInclude Include="..\src\widget.h" />
|
||||
<ClInclude Include="..\src\window.h" />
|
||||
@@ -67,6 +68,7 @@
|
||||
<ClCompile Include="..\src\strings.c" />
|
||||
<ClCompile Include="..\src\title.c" />
|
||||
<ClCompile Include="..\src\tutorial.c" />
|
||||
<ClCompile Include="..\src\util.c" />
|
||||
<ClCompile Include="..\src\viewport.c" />
|
||||
<ClCompile Include="..\src\widget.c" />
|
||||
<ClCompile Include="..\src\window.c" />
|
||||
|
||||
@@ -105,6 +105,9 @@
|
||||
<ClInclude Include="..\src\object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\util.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\game.c">
|
||||
@@ -215,6 +218,9 @@
|
||||
<ClCompile Include="..\src\window_cheats.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\util.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\openrct2.exe">
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#define RCT2_ADDRESS_APP_PATH 0x009AA214
|
||||
|
||||
#define RCT2_ADDRESS_CONFIG_FLAGS 0x009AAC74
|
||||
#define RCT2_ADDRESS_CONFIG_METRIC 0x009AAC78
|
||||
#define RCT2_ADDRESS_CONFIG_FAHRENHEIT 0x009AAC79
|
||||
#define RCT2_ADDRESS_CONFIG_KEYBOARD_SHORTCUTS 0x009AAC7A
|
||||
#define RCT2_ADDRESS_CONFIG_EDGE_SCROLLING 0x009AACBA
|
||||
@@ -120,6 +121,7 @@
|
||||
#define RCT2_ADDRESS_SPRITES_START_LITTER 0x013573C4
|
||||
|
||||
#define RCT2_ADDRESS_CURRENT_LOAN 0x013573E0
|
||||
#define RCT2_ADDRESS_GAME_FLAGS 0x013573E4
|
||||
#define RCT2_ADDRESS_GUESTS_IN_PARK 0x01357844
|
||||
#define RCT2_ADDRESS_CURRENT_PARK_RATING 0x01357CB0
|
||||
#define RCT2_ADDRESS_PARK_RATING_HISTORY 0x01357CB2
|
||||
@@ -131,6 +133,7 @@
|
||||
#define RCT2_ADDRESS_CURRENT_PARK_VALUE 0x0135853C
|
||||
#define RCT2_ADDRESS_COMPLETED_COMPANY_VALUE 0x01358740
|
||||
#define RCT2_ADDRESS_CURRENT_COMPANY_VALUE 0x0135874C
|
||||
#define RCT2_ADDRESS_AWARD_LIST 0x01358760
|
||||
#define RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED 0x013587F8
|
||||
|
||||
#define RCT2_ADDRESS_MAP_SIZE 0x01358834
|
||||
|
||||
@@ -40,12 +40,12 @@ void config_load()
|
||||
if (RCT2_GLOBAL(0x009AB4C6, sint8) == 1)
|
||||
return;
|
||||
RCT2_GLOBAL(0x009AB4C6, sint8) = 1;
|
||||
RCT2_GLOBAL(0x009AAC78, sint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FAHRENHEIT, sint8) = 1;
|
||||
RCT2_GLOBAL(0x009AACBB, sint8) = 1;
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(0x009AAC78, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AA00D, sint8) = 1;
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,6 @@ void config_load()
|
||||
RCT2_GLOBAL(0x009AAC76, sint8) = RCT2_ADDRESS(0x009AF604, sint8)[RCT2_GLOBAL(0x009AAC77, sint8)];
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(0x009AAC78, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AA00D, sint8) = 1;
|
||||
}
|
||||
@@ -24,6 +24,11 @@
|
||||
#include "ride.h"
|
||||
#include "sprite.h"
|
||||
|
||||
int park_is_open()
|
||||
{
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) & GAME_FLAGS_PARK_OPEN) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00667132
|
||||
|
||||
26
src/park.h
26
src/park.h
@@ -26,6 +26,32 @@
|
||||
#define DECRYPT_MONEY(money) rol32((money) ^ 0xF4EC9621, 13)
|
||||
#define ENCRYPT_MONEY(money) (ror32((money), 13) ^ 0xF4EC9621)
|
||||
|
||||
typedef struct {
|
||||
uint16 time;
|
||||
uint16 type;
|
||||
} rct_award;
|
||||
|
||||
enum {
|
||||
PARK_AWARD_MOST_UNTIDY,
|
||||
PARK_AWARD_MOST_TIDY,
|
||||
PARK_AWARD_BEST_ROLLERCOASTERS,
|
||||
PARK_AWARD_BEST_VALUE,
|
||||
PARK_AWARD_MOST_BEAUTIFUL,
|
||||
PARK_AWARD_WORST_VALUE,
|
||||
PARK_AWARD_SAFEST,
|
||||
PARK_AWARD_BEST_STAFF,
|
||||
PARK_AWARD_BEST_FOOD,
|
||||
PARK_AWARD_WORST_FOOD,
|
||||
PARK_AWARD_BEST_RESTROOMS,
|
||||
PARK_AWARD_MOST_DISAPPOINTING,
|
||||
PARK_AWARD_BEST_WATER_RIDES,
|
||||
PARK_AWARD_BEST_CUSTOM_DESIGNED_RIDES,
|
||||
PARK_AWARD_MOST_DAZZLING_RIDE_COLOURS,
|
||||
PARK_AWARD_MOST_CONFUSING_LAYOUT,
|
||||
PARK_AWARD_BEST_GENTLE_RIDES,
|
||||
};
|
||||
|
||||
int park_is_open();
|
||||
void park_init();
|
||||
|
||||
int calculate_park_rating();
|
||||
|
||||
18
src/peep.c
18
src/peep.c
@@ -23,6 +23,24 @@
|
||||
#include "rct2.h"
|
||||
#include "sprite.h"
|
||||
|
||||
int peep_get_staff_count()
|
||||
{
|
||||
uint16 sprite_index;
|
||||
rct_peep *peep;
|
||||
int count = 0;
|
||||
|
||||
sprite_index = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16);
|
||||
while (sprite_index != SPRITE_INDEX_NULL) {
|
||||
peep = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[sprite_index].peep);
|
||||
sprite_index = peep->next;
|
||||
|
||||
if (peep->type == PEEP_TYPE_STAFF)
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0068F0A9
|
||||
|
||||
@@ -88,6 +88,7 @@ typedef struct {
|
||||
uint8 hat_colour; // 0xF8
|
||||
} rct_peep;
|
||||
|
||||
int peep_get_staff_count();
|
||||
void peep_update_all();
|
||||
|
||||
#endif
|
||||
@@ -120,6 +120,11 @@ enum {
|
||||
|
||||
};
|
||||
|
||||
enum {
|
||||
GAME_FLAGS_PARK_OPEN = (1 << 0),
|
||||
GAME_FLAGS_NO_MONEY = (1 << 11)
|
||||
};
|
||||
|
||||
void rct2_endupdate();
|
||||
char *get_file_path(int pathId);
|
||||
void get_system_time();
|
||||
|
||||
14
src/ride.c
14
src/ride.c
@@ -24,6 +24,20 @@
|
||||
#define GET_RIDE(x) (&(RCT2_ADDRESS(RCT2_ADDRESS_RIDE_LIST, rct_ride)[x]))
|
||||
#define GET_RIDE_MEASUREMENT(x) (&(RCT2_ADDRESS(RCT2_ADDRESS_RIDE_MEASUREMENTS, rct_ride_measurement)[x]))
|
||||
|
||||
int ride_get_count()
|
||||
{
|
||||
rct_ride *ride;
|
||||
int i, count = 0;
|
||||
|
||||
for (i = 0; i < MAX_RIDES; i++) {
|
||||
ride = GET_RIDE(i);
|
||||
if (ride->type != RIDE_TYPE_NULL)
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006ACA89
|
||||
|
||||
@@ -163,9 +163,10 @@ enum {
|
||||
RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER
|
||||
};
|
||||
|
||||
#define MAX_RIDES 256
|
||||
#define MAX_RIDES 255
|
||||
#define MAX_RIDE_MEASUREMENTS 8
|
||||
|
||||
int ride_get_count();
|
||||
void ride_init_all();
|
||||
|
||||
#endif
|
||||
@@ -52,6 +52,50 @@ enum {
|
||||
SPR_AWARD = 5194,
|
||||
SPR_GRAPH = 5195,
|
||||
|
||||
SPR_TAB_GRAPH_0 = 5245,
|
||||
SPR_TAB_GRAPH_1 = SPR_TAB_GRAPH_0 + 1,
|
||||
SPR_TAB_GRAPH_2 = SPR_TAB_GRAPH_0 + 2,
|
||||
SPR_TAB_GRAPH_3 = SPR_TAB_GRAPH_0 + 3,
|
||||
SPR_TAB_GRAPH_4 = SPR_TAB_GRAPH_0 + 4,
|
||||
SPR_TAB_GRAPH_5 = SPR_TAB_GRAPH_0 + 5,
|
||||
SPR_TAB_GRAPH_6 = SPR_TAB_GRAPH_0 + 6,
|
||||
SPR_TAB_GRAPH_7 = SPR_TAB_GRAPH_0 + 7,
|
||||
|
||||
SPR_TAB_ADMISSION_0 = 5253,
|
||||
SPR_TAB_ADMISSION_1 = SPR_TAB_ADMISSION_0 + 1,
|
||||
SPR_TAB_ADMISSION_2 = SPR_TAB_ADMISSION_0 + 2,
|
||||
SPR_TAB_ADMISSION_3 = SPR_TAB_ADMISSION_0 + 3,
|
||||
SPR_TAB_ADMISSION_4 = SPR_TAB_ADMISSION_0 + 4,
|
||||
SPR_TAB_ADMISSION_5 = SPR_TAB_ADMISSION_0 + 5,
|
||||
SPR_TAB_ADMISSION_6 = SPR_TAB_ADMISSION_0 + 6,
|
||||
SPR_TAB_ADMISSION_7 = SPR_TAB_ADMISSION_0 + 7,
|
||||
|
||||
SPR_TAB_STATS_0 = 5277,
|
||||
SPR_TAB_STATS_1 = SPR_TAB_STATS_0 + 1,
|
||||
SPR_TAB_STATS_2 = SPR_TAB_STATS_0 + 2,
|
||||
SPR_TAB_STATS_3 = SPR_TAB_STATS_0 + 3,
|
||||
SPR_TAB_STATS_4 = SPR_TAB_STATS_0 + 4,
|
||||
SPR_TAB_STATS_5 = SPR_TAB_STATS_0 + 5,
|
||||
SPR_TAB_STATS_6 = SPR_TAB_STATS_0 + 6,
|
||||
|
||||
SPR_AWARD_MOST_UNTIDY = 5469,
|
||||
SPR_MOST_TIDY = SPR_AWARD_MOST_UNTIDY + 1,
|
||||
SPR_BEST_ROLLERCOASTERS = SPR_AWARD_MOST_UNTIDY + 2,
|
||||
SPR_BEST_VALUE = SPR_AWARD_MOST_UNTIDY + 3,
|
||||
SPR_MOST_BEAUTIFUL = SPR_AWARD_MOST_UNTIDY + 4,
|
||||
SPR_WORST_VALUE = SPR_AWARD_MOST_UNTIDY + 5,
|
||||
SPR_SAFEST = SPR_AWARD_MOST_UNTIDY + 6,
|
||||
SPR_BEST_STAFF = SPR_AWARD_MOST_UNTIDY + 7,
|
||||
SPR_BEST_FOOD = SPR_AWARD_MOST_UNTIDY + 8,
|
||||
SPR_WORST_FOOD = SPR_AWARD_MOST_UNTIDY + 9,
|
||||
SPR_BEST_RESTROOMS = SPR_AWARD_MOST_UNTIDY + 10,
|
||||
SPR_MOST_DISAPPOINTING = SPR_AWARD_MOST_UNTIDY + 11,
|
||||
SPR_BEST_WATER_RIDES = SPR_AWARD_MOST_UNTIDY + 12,
|
||||
SPR_BEST_CUSTOM_DESIGNED_RIDES = SPR_AWARD_MOST_UNTIDY + 13,
|
||||
SPR_MOST_DAZZLING_RIDE_COLOURS = SPR_AWARD_MOST_UNTIDY + 14,
|
||||
SPR_MOST_CONFUSING_LAYOUT = SPR_AWARD_MOST_UNTIDY + 15,
|
||||
SPR_BEST_GENTLE_RIDES = SPR_AWARD_MOST_UNTIDY + 16,
|
||||
|
||||
SPR_LAND_TOOL_DECREASE = 5499,
|
||||
|
||||
SPR_LAND_TOOL_INCREASE = 5501,
|
||||
@@ -82,6 +126,8 @@ enum {
|
||||
SPR_TAB_OBJECTIVE_14 = SPR_TAB_OBJECTIVE_0 + 14,
|
||||
SPR_TAB_OBJECTIVE_15 = SPR_TAB_OBJECTIVE_0 + 15,
|
||||
|
||||
SPR_TAB_AWARDS = 5527,
|
||||
|
||||
SPR_TOOLBAR_PAUSE = 5597,
|
||||
SPR_TOOLBAR_FILE = 5599,
|
||||
SPR_TOOLBAR_ZOOM_OUT = 5601,
|
||||
|
||||
@@ -133,6 +133,8 @@ enum {
|
||||
STR_MONTH_SHORT_NOV = STR_MONTH_SHORT_JAN + 10,
|
||||
STR_MONTH_SHORT_DEC = STR_MONTH_SHORT_JAN + 11,
|
||||
|
||||
STR_CLOSE_X = 824,
|
||||
|
||||
STR_CLOSE_WINDOW_TIP = 828,
|
||||
STR_WINDOW_TITLE_TIP = 829,
|
||||
|
||||
@@ -152,6 +154,8 @@ enum {
|
||||
STR_LOWER_COST_AMOUNT = 985,
|
||||
STR_COST_AMOUNT = 986,
|
||||
|
||||
STR_OPEN_OR_CLOSE_PARK_TIP = 1010,
|
||||
|
||||
STR_LOCATE_SUBJECT_TIP = 1027,
|
||||
|
||||
STR_RIDES_IN_PARK_TIP = 1053,
|
||||
@@ -161,13 +165,21 @@ enum {
|
||||
|
||||
STR_BUILD_FOOTPATH_TIP = 1173,
|
||||
|
||||
STR_NUMERIC_UP = 1218,
|
||||
STR_NUMERIC_DOWN = 1219,
|
||||
|
||||
STR_GUESTS = 1463,
|
||||
|
||||
STR_GUESTS_TIP = 1693,
|
||||
STR_STAFF_TIP = 1694,
|
||||
|
||||
STR_NAME_PARK_TIP = 1720,
|
||||
STR_PARK_CLOSED = 1721,
|
||||
STR_PARK_OPEN = 1722,
|
||||
|
||||
STR_INDIVIDUAL_GUESTS_TIP = 1752,
|
||||
STR_SUMMARISED_GUESTS_TIP = 1753,
|
||||
STR_ADMISSION_PRICE = 1756,
|
||||
|
||||
STR_ACTIONS = 1814,
|
||||
STR_THOUGHTS = STR_ACTIONS + 1,
|
||||
@@ -193,7 +205,17 @@ enum {
|
||||
STR_CELCIUS_VALUE = 2216,
|
||||
STR_FAHRENHEIT_VALUE = 2217,
|
||||
|
||||
STR_PARK_rating_TIP = 2221,
|
||||
STR_PARK_RATING_TIP = 2221,
|
||||
|
||||
STR_GUESTS_IN_PARK_LABEL = 2223,
|
||||
|
||||
STR_NUMBER_OF_RIDES_LABEL = 2321,
|
||||
STR_STAFF_LABEL = 2322,
|
||||
STR_PARK_SIZE_METRIC_LABEL = 2323,
|
||||
STR_PARK_SIZE_IMPERIAL_LABEL = 2324,
|
||||
|
||||
SPR_BUY_LAND_RIGHTS_TIP = 2325,
|
||||
SPR_BUY_CONSTRUCTION_RIGHTS_TIP = 2326,
|
||||
|
||||
STR_PARK_INFORMATION_TIP = 2233,
|
||||
|
||||
@@ -235,13 +257,43 @@ enum {
|
||||
STR_OBJECTIVE_REPLAY_LOAN_AND_PARK_VALUE = STR_OBJECTIVE_NONE + 10,
|
||||
STR_OBJECTIVE_MONTHLY_FOOD_INCOME = STR_OBJECTIVE_NONE + 11,
|
||||
|
||||
STR_PARK_ENTRANCE_TAB_TIP = 2462,
|
||||
STR_PARK_RATING_TAB_TIP = 2463,
|
||||
STR_PARK_GUESTS_TAB_TIP = 2464,
|
||||
STR_PARK_PRICE_TAB_TIP = 2465,
|
||||
STR_PARK_STATS_TAB_TIP = 2466,
|
||||
STR_PARK_OBJECTIVE_TAB_TIP = 2467,
|
||||
STR_PARK_AWARDS_TAB_TIP = 2468,
|
||||
|
||||
STR_PROFIT_PER_WEEK_AND_PARK_VALUE_TIP = 2482,
|
||||
|
||||
STR_ENTER_NAME_INTO_SCENARIO_CHART = 2790,
|
||||
|
||||
STR_COMPLETED_BY_WITH_COMPANY_VALUE = 2794,
|
||||
|
||||
STR_SHOW_GUESTS_ON_MAP_TIP = 2803,
|
||||
STR_SHOW_MAP_TIP = 2805,
|
||||
|
||||
STR_AWARD_MOST_UNTIDY = 2814,
|
||||
STR_MOST_TIDY = STR_AWARD_MOST_UNTIDY + 1,
|
||||
STR_BEST_ROLLERCOASTERS = STR_AWARD_MOST_UNTIDY + 2,
|
||||
STR_BEST_VALUE = STR_AWARD_MOST_UNTIDY + 3,
|
||||
STR_MOST_BEAUTIFUL = STR_AWARD_MOST_UNTIDY + 4,
|
||||
STR_WORST_VALUE = STR_AWARD_MOST_UNTIDY + 5,
|
||||
STR_SAFEST = STR_AWARD_MOST_UNTIDY + 6,
|
||||
STR_BEST_STAFF = STR_AWARD_MOST_UNTIDY + 7,
|
||||
STR_BEST_FOOD = STR_AWARD_MOST_UNTIDY + 8,
|
||||
STR_WORST_FOOD = STR_AWARD_MOST_UNTIDY + 9,
|
||||
STR_BEST_RESTROOMS = STR_AWARD_MOST_UNTIDY + 10,
|
||||
STR_MOST_DISAPPOINTING = STR_AWARD_MOST_UNTIDY + 11,
|
||||
STR_BEST_WATER_RIDES = STR_AWARD_MOST_UNTIDY + 12,
|
||||
STR_BEST_CUSTOM_DESIGNED_RIDES = STR_AWARD_MOST_UNTIDY + 13,
|
||||
STR_MOST_DAZZLING_RIDE_COLOURS = STR_AWARD_MOST_UNTIDY + 14,
|
||||
STR_MOST_CONFUSING_LAYOUT = STR_AWARD_MOST_UNTIDY + 15,
|
||||
STR_BEST_GENTLE_RIDES = STR_AWARD_MOST_UNTIDY + 16,
|
||||
|
||||
STR_NO_RECENT_AWARDS = 2848,
|
||||
|
||||
STR_TUTORIAL = 2856,
|
||||
STR_PRESS_KEY_OR_MOUSE_BUTTON_FOR_CONTROL = 2857,
|
||||
|
||||
|
||||
28
src/util.c
Normal file
28
src/util.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (c) 2014 Ted John
|
||||
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
||||
*
|
||||
* This file is part of OpenRCT2.
|
||||
*
|
||||
* 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.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "util.h"
|
||||
|
||||
int squaredmetres_to_squaredfeet(int squaredMetres)
|
||||
{
|
||||
// 1 metre squared = 10.7639104 feet squared
|
||||
// how its done in RCT2
|
||||
return squaredMetres * 11;
|
||||
}
|
||||
26
src/util.h
Normal file
26
src/util.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (c) 2014 Ted John
|
||||
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
||||
*
|
||||
* This file is part of OpenRCT2.
|
||||
*
|
||||
* 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.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _UTIL_H_
|
||||
#define _UTIL_H_
|
||||
|
||||
int squaredmetres_to_squaredfeet(int squaredMetres);
|
||||
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@ enum {
|
||||
VIEWPORT_FLAG_GRIDLINES = (1 << 7),
|
||||
VIEWPORT_FLAG_LAND_OWNERSHIP = (1 << 8),
|
||||
VIEWPORT_FLAG_9 = (1 << 9),
|
||||
VIEWPORT_FLAG_10 = (1 << 10),
|
||||
VIEWPORT_FLAG_SOUND_ON = (1 << 10),
|
||||
VIEWPORT_FLAG_INVISIBLE_PEEPS = (1 << 11),
|
||||
VIEWPORT_FLAG_HIDE_BASE = (1 << 12),
|
||||
VIEWPORT_FLAG_HIDE_VERTICAL = (1 << 13),
|
||||
|
||||
@@ -162,7 +162,7 @@ rct_window *window_create(int x, int y, int width, int height, uint32 *event_han
|
||||
w->var_484 = 0;
|
||||
w->var_486 = 0;
|
||||
w->var_488 = 0;
|
||||
w->var_48A = 0;
|
||||
w->page = 0;
|
||||
w->var_48C = 0;
|
||||
w->var_48E = 0;
|
||||
w->var_490 = 0;
|
||||
|
||||
@@ -116,7 +116,7 @@ typedef struct rct_window {
|
||||
sint16 var_484;
|
||||
sint16 var_486;
|
||||
sint16 var_488;
|
||||
sint16 var_48A;
|
||||
sint16 page;
|
||||
sint16 var_48C;
|
||||
sint16 var_48E;
|
||||
sint16 var_490;
|
||||
|
||||
@@ -108,7 +108,7 @@ void window_cheats_open()
|
||||
window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_HIGH_MONEY);
|
||||
window_init_scroll_widgets(window);
|
||||
|
||||
window->var_48A = WINDOW_CHEATS_PAGE_MONEY;
|
||||
window->page = WINDOW_CHEATS_PAGE_MONEY;
|
||||
window->colours[0] = 1;
|
||||
window->colours[1] = 19;
|
||||
window->colours[2] = 19;
|
||||
@@ -159,7 +159,7 @@ static void window_cheats_invalidate()
|
||||
// Set correct active tab
|
||||
for (i = 0; i < 7; i++)
|
||||
w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i));
|
||||
w->pressed_widgets |= 1 << (WIDX_TAB_1 + w->var_48A);
|
||||
w->pressed_widgets |= 1 << (WIDX_TAB_1 + w->page);
|
||||
}
|
||||
|
||||
static void window_cheats_paint()
|
||||
@@ -181,7 +181,7 @@ static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)
|
||||
// Money tab
|
||||
if (!(w->disabled_widgets & (1 << WIDX_TAB_1))) {
|
||||
sprite_idx = 5261;
|
||||
if (w->var_48A == WINDOW_CHEATS_PAGE_MONEY)
|
||||
if (w->page == WINDOW_CHEATS_PAGE_MONEY)
|
||||
sprite_idx += (w->var_48E / 2) % 8;
|
||||
gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_1].left, w->y + w->widgets[WIDX_TAB_1].top);
|
||||
}
|
||||
@@ -189,7 +189,7 @@ static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)
|
||||
// Guests tab
|
||||
if (!(w->disabled_widgets & (1 << WIDX_TAB_2))) {
|
||||
sprite_idx = 5568;
|
||||
if (w->var_48A == WINDOW_CHEATS_PAGE_GUESTS)
|
||||
if (w->page == WINDOW_CHEATS_PAGE_GUESTS)
|
||||
sprite_idx += w->var_48E / 4;
|
||||
gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_2].left, w->y + w->widgets[WIDX_TAB_2].top);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ rct_widget window_game_bottom_toolbar_widgets[] = {
|
||||
{ WWT_IMGBTN, 0, 0x0002, 0x0075, 2, 31, 0xFFFFFFFF, STR_NONE }, // Left inset panel
|
||||
{ WWT_FLATBTN, 0, 0x0002, 0x0075, 1, 12, 0xFFFFFFFF, STR_PROFIT_PER_WEEK_AND_PARK_VALUE_TIP }, // Money window
|
||||
{ WWT_FLATBTN, 0, 0x0002, 0x0075, 11, 22, 0xFFFFFFFF, STR_NONE }, // Guests window
|
||||
{ WWT_FLATBTN, 0, 0x0002, 0x0075, 21, 31, 0xFFFFFFFF, STR_PARK_rating_TIP }, // Park rating window
|
||||
{ WWT_FLATBTN, 0, 0x0002, 0x0075, 21, 31, 0xFFFFFFFF, STR_PARK_RATING_TIP }, // Park rating window
|
||||
|
||||
{ WWT_IMGBTN, 2, 0x0078, 0x0207, 0, 33, 0xFFFFFFFF, STR_NONE }, // Middle outset panel
|
||||
{ WWT_25, 2, 0x007A, 0x0205, 2, 31, 0xFFFFFFFF, STR_NONE }, // Middle inset panel
|
||||
|
||||
1297
src/window_park.c
1297
src/window_park.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user