mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #219 from adrian17/master
Improvements for a9091b41b6
This commit is contained in:
commit
e474dfb3e3
|
@ -101,7 +101,7 @@ void pause_sounds() {
|
||||||
RCT2_CALLPROC_EBPSAFE(0x006BCA9F);
|
RCT2_CALLPROC_EBPSAFE(0x006BCA9F);
|
||||||
RCT2_CALLPROC_EBPSAFE(0x006BD07F);
|
RCT2_CALLPROC_EBPSAFE(0x006BD07F);
|
||||||
}
|
}
|
||||||
sounds_is_paused = 1;
|
g_sounds_disabled = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,5 +110,5 @@ void pause_sounds() {
|
||||||
*/
|
*/
|
||||||
void unpause_sounds() {
|
void unpause_sounds() {
|
||||||
RCT2_GLOBAL(0x009AF59C, uint8)--;
|
RCT2_GLOBAL(0x009AF59C, uint8)--;
|
||||||
sounds_is_paused = 0;
|
g_sounds_disabled = 0;
|
||||||
}
|
}
|
|
@ -63,7 +63,9 @@ void sound_stop(rct_sound *sound);
|
||||||
void pause_sounds();
|
void pause_sounds();
|
||||||
void unpause_sounds();
|
void unpause_sounds();
|
||||||
|
|
||||||
int sounds_is_paused;
|
// 0x009AF59C probably does the same job
|
||||||
|
// once it's confirmed and calls in pause_sounds() are reversed, it can be used instead of this
|
||||||
|
int g_sounds_disabled;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SOUND_LIFT_1 = 0,
|
SOUND_LIFT_1 = 0,
|
||||||
|
|
|
@ -85,14 +85,9 @@ void climate_reset(int climate)
|
||||||
|
|
||||||
|
|
||||||
//for cheats
|
//for cheats
|
||||||
void climate_freeze()
|
void toggle_climate_lock()
|
||||||
{
|
{
|
||||||
if (climate_frozen == 1){
|
g_climate_locked = !g_climate_locked;
|
||||||
climate_frozen = 0;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
climate_frozen = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,7 +106,7 @@ void climate_update()
|
||||||
cur_rain = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RAIN_LEVEL, sint8),
|
cur_rain = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RAIN_LEVEL, sint8),
|
||||||
next_rain = _climateNextRainLevel;
|
next_rain = _climateNextRainLevel;
|
||||||
|
|
||||||
if (climate_frozen == 1) //for cheats
|
if (g_climate_locked) //for cheats
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (screen_flags & (~SCREEN_FLAGS_PLAYING)) // only normal play mode gets climate
|
if (screen_flags & (~SCREEN_FLAGS_PLAYING)) // only normal play mode gets climate
|
||||||
|
|
|
@ -41,8 +41,9 @@ typedef struct {
|
||||||
extern int gClimateNextWeather;
|
extern int gClimateNextWeather;
|
||||||
extern const rct_weather climate_weather_data[6];
|
extern const rct_weather climate_weather_data[6];
|
||||||
|
|
||||||
int climate_frozen;
|
// cheats
|
||||||
void climate_freeze();
|
int g_climate_locked;
|
||||||
|
void toggle_climate_lock();
|
||||||
|
|
||||||
int climate_celsius_to_fahrenheit(int celsius);
|
int climate_celsius_to_fahrenheit(int celsius);
|
||||||
void climate_reset(int climate);
|
void climate_reset(int climate);
|
||||||
|
|
18
src/game.c
18
src/game.c
|
@ -1688,20 +1688,22 @@ void handle_shortcut_command(int shortcutIndex)
|
||||||
|
|
||||||
// New
|
// New
|
||||||
case SHORTCUT_REDUCE_GAME_SPEED:
|
case SHORTCUT_REDUCE_GAME_SPEED:
|
||||||
_gameSpeed = max(1, _gameSpeed - 1);
|
game_reduce_game_speed();
|
||||||
break;
|
break;
|
||||||
case SHORTCUT_INCREASE_GAME_SPEED:
|
case SHORTCUT_INCREASE_GAME_SPEED:
|
||||||
_gameSpeed = min(8, _gameSpeed + 1);
|
game_increase_game_speed();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void game_change_game_speed(int amount)
|
|
||||||
|
void game_increase_game_speed()
|
||||||
{
|
{
|
||||||
//Sending 0 will reset to default
|
_gameSpeed = min(8, _gameSpeed + 1);
|
||||||
if (amount == 0)
|
}
|
||||||
_gameSpeed = 1;
|
|
||||||
else
|
void game_reduce_game_speed()
|
||||||
_gameSpeed = max(1, min(8, _gameSpeed + amount));
|
{
|
||||||
|
_gameSpeed = max(1, _gameSpeed - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,7 +29,9 @@ void update_rain_animation();
|
||||||
void update_water_animation();
|
void update_water_animation();
|
||||||
|
|
||||||
int game_do_command(int eax, int ebx, int ecx, int edx, int esi, int edi, int ebp);
|
int game_do_command(int eax, int ebx, int ecx, int edx, int esi, int edi, int ebp);
|
||||||
void game_change_game_speed(int amount); //for cheats
|
|
||||||
|
void game_increase_game_speed();
|
||||||
|
void game_reduce_game_speed();
|
||||||
|
|
||||||
void game_load_or_quit_no_save_prompt();
|
void game_load_or_quit_no_save_prompt();
|
||||||
int game_load_save();
|
int game_load_save();
|
||||||
|
|
|
@ -57,7 +57,6 @@ enum WINDOW_CHEATS_WIDGET_IDX {
|
||||||
WIDX_HAPPY_GUESTS = 7, //Same as HIGH_MONEY as it is also the 7th widget but on a different page
|
WIDX_HAPPY_GUESTS = 7, //Same as HIGH_MONEY as it is also the 7th widget but on a different page
|
||||||
WIDX_TRAM_GUESTS,
|
WIDX_TRAM_GUESTS,
|
||||||
WIDX_FREEZE_CLIMATE = 7,
|
WIDX_FREEZE_CLIMATE = 7,
|
||||||
WIDX_FAST_STAFF,
|
|
||||||
WIDX_OPEN_CLOSE_PARK,
|
WIDX_OPEN_CLOSE_PARK,
|
||||||
WIDX_DECREASE_GAME_SPEED,
|
WIDX_DECREASE_GAME_SPEED,
|
||||||
WIDX_INCREASE_GAME_SPEED,
|
WIDX_INCREASE_GAME_SPEED,
|
||||||
|
@ -67,16 +66,19 @@ enum WINDOW_CHEATS_WIDGET_IDX {
|
||||||
#pragma region MEASUREMENTS
|
#pragma region MEASUREMENTS
|
||||||
#define WW 240
|
#define WW 240
|
||||||
#define WH 240
|
#define WH 240
|
||||||
#define YSPA 4
|
#define TAB_HEIGHT 43
|
||||||
#define XSPA 4
|
#define XSPA 5 //X spacing
|
||||||
#define XOS XSPA
|
#define YSPA 5 //Y spacing
|
||||||
#define YOS 43 + YSPA
|
#define XOS 0 + XSPA //X offset from left
|
||||||
#define BTNW 120 - (XOS * 2)
|
#define YOS TAB_HEIGHT + YSPA //Y offset ofrom top (includes tabs height)
|
||||||
#define BTNH 16
|
#define BTNW 110 //button width
|
||||||
#define YPL(YIND) YOS + ((BTNH + YSPA) * YIND)
|
#define BTNH 16 //button height
|
||||||
#define HPL(YIND) YPL(YIND) + BTNH
|
#define YPL(ROW) YOS + ((BTNH + YSPA) * ROW)
|
||||||
#define XPL(XIND) XOS + ((BTNW + XSPA) * XIND)
|
#define HPL(ROW) YPL(ROW) + BTNH
|
||||||
#define WPL(XIND) XPL(XIND) + BTNW
|
#define XPL(COL) XOS + ((BTNW + XSPA) * COL)
|
||||||
|
#define WPL(COL) XPL(COL) + BTNW
|
||||||
|
|
||||||
|
#define TXTO 3 //text horizontal offset from button left (for button text)
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
static rct_widget window_cheats_money_widgets[] = {
|
static rct_widget window_cheats_money_widgets[] = {
|
||||||
|
@ -116,9 +118,8 @@ static rct_widget window_cheats_misc_widgets[] = {
|
||||||
{ WWT_TAB, 1, 65, 95, 17, 43, 0x2000144E, 2462}, // tab 3
|
{ WWT_TAB, 1, 65, 95, 17, 43, 0x2000144E, 2462}, // tab 3
|
||||||
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(0), HPL(0), STR_NONE, STR_NONE}, // Freeze climate
|
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(0), HPL(0), STR_NONE, STR_NONE}, // Freeze climate
|
||||||
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(1), HPL(1), STR_NONE, STR_NONE}, // open / close park
|
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(1), HPL(1), STR_NONE, STR_NONE}, // open / close park
|
||||||
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(2), HPL(2), STR_NONE, STR_NONE}, // fast staff
|
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(2), HPL(2), STR_NONE, STR_NONE}, // decrease game speed
|
||||||
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(3), HPL(3), STR_NONE, STR_NONE}, // decrease game speed
|
{ WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(2), HPL(2), STR_NONE, STR_NONE}, // increase game speed
|
||||||
{ WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(3), HPL(3), STR_NONE, STR_NONE}, // increase game speed
|
|
||||||
{ WIDGETS_END },
|
{ WIDGETS_END },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -348,7 +349,6 @@ static void window_cheats_guests_mouseup()
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
||||||
break;
|
break;
|
||||||
case WIDX_TRAM_GUESTS:
|
case WIDX_TRAM_GUESTS:
|
||||||
i = 0;
|
|
||||||
for (i = 0; i < CHEATS_TRAM_INCREMENT; i++){
|
for (i = 0; i < CHEATS_TRAM_INCREMENT; i++){
|
||||||
generate_new_guest();
|
generate_new_guest();
|
||||||
}
|
}
|
||||||
|
@ -388,38 +388,19 @@ static void window_cheats_misc_mouseup()
|
||||||
window_cheats_set_page(w, widgetIndex - WIDX_TAB_1);
|
window_cheats_set_page(w, widgetIndex - WIDX_TAB_1);
|
||||||
break;
|
break;
|
||||||
case WIDX_FREEZE_CLIMATE:
|
case WIDX_FREEZE_CLIMATE:
|
||||||
climate_freeze();
|
toggle_climate_lock();
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
|
||||||
break;
|
|
||||||
case WIDX_FAST_STAFF:
|
|
||||||
FOR_ALL_GUESTS(spriteIndex, peep)
|
|
||||||
if (peep->var_2A == 0)
|
|
||||||
peep->happiness = 255;
|
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
||||||
break;
|
break;
|
||||||
case WIDX_OPEN_CLOSE_PARK:
|
case WIDX_OPEN_CLOSE_PARK:
|
||||||
//No clue why the ; needs to be at the beginning, but otherwise it doesn't go through.
|
game_do_command(0, 1, 0, park_is_open() ? 0 : 0x101, 34, 0, 0);
|
||||||
;int dropdownIndex = !park_is_open();
|
|
||||||
if (dropdownIndex == -1)
|
|
||||||
dropdownIndex = RCT2_GLOBAL(0x009DEBA2, sint16);
|
|
||||||
if (dropdownIndex != 0) {
|
|
||||||
dropdownIndex &= 0x00FF;
|
|
||||||
dropdownIndex |= 0x0100;
|
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = 1724;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dropdownIndex &= 0x00FF;
|
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = 1723;
|
|
||||||
}
|
|
||||||
game_do_command(0, 1, 0, dropdownIndex, 34, 0, 0);
|
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
||||||
break;
|
break;
|
||||||
case WIDX_DECREASE_GAME_SPEED:
|
case WIDX_DECREASE_GAME_SPEED:
|
||||||
game_change_game_speed(-1);
|
game_reduce_game_speed();
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
||||||
break;
|
break;
|
||||||
case WIDX_INCREASE_GAME_SPEED:
|
case WIDX_INCREASE_GAME_SPEED:
|
||||||
game_change_game_speed(1);
|
game_increase_game_speed();
|
||||||
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
window_invalidate_by_id(0x40 | WC_BOTTOM_TOOLBAR, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -465,7 +446,6 @@ static void window_cheats_invalidate()
|
||||||
w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page);
|
w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TXTO 3
|
|
||||||
static void window_cheats_paint()
|
static void window_cheats_paint()
|
||||||
{
|
{
|
||||||
rct_window *w;
|
rct_window *w;
|
||||||
|
@ -506,22 +486,20 @@ static void window_cheats_paint()
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + 4, w->y + 50);
|
gfx_draw_string(dpi, buffer, 0, w->x + 4, w->y + 50);
|
||||||
|
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_BLACK, "Large group of peeps arrive");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_BLACK, "Large group of peeps arrive");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(2) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO);
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Large Tram");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Large Tram");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(3) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + TXTO, w->y + YPL(3) + TXTO);
|
||||||
}
|
}
|
||||||
else if (w->page == WINDOW_CHEATS_PAGE_MISC){
|
else if (w->page == WINDOW_CHEATS_PAGE_MISC){
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Freeze climate");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Freeze climate");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(0) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + TXTO, w->y + YPL(0) + TXTO);
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Fast staff");
|
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(1) + 3);
|
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Open/Close Park");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Open/Close Park");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(2) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + TXTO, w->y + YPL(1) + TXTO);
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Slower Gamespeed");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Slower Gamespeed");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + 3, w->y + YPL(3) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO);
|
||||||
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Faster Gamespeed");
|
sprintf(buffer, "%c%c%s", FORMAT_MEDIUMFONT, FORMAT_WINDOW_COLOUR_2, "Faster Gamespeed");
|
||||||
gfx_draw_string(dpi, buffer, 0, w->x + XPL(1) + 3, w->y + YPL(3) + 3);
|
gfx_draw_string(dpi, buffer, 0, w->x + XPL(1) + TXTO, w->y + YPL(2) + TXTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ static rct_widget window_options_widgets[] = {
|
||||||
{ WWT_DROPDOWN, 0, 155, 299, 61, 72, 0x366, STR_NONE }, // sound quality
|
{ WWT_DROPDOWN, 0, 155, 299, 61, 72, 0x366, STR_NONE }, // sound quality
|
||||||
{ WWT_DROPDOWN_BUTTON, 0, 288, 298, 62, 71, 0x36C, STR_NONE },
|
{ WWT_DROPDOWN_BUTTON, 0, 288, 298, 62, 71, 0x36C, STR_NONE },
|
||||||
{ WWT_CHECKBOX, 0, 10, 299, 76, 87, STR_SOUND_FORCED_SOFTWARE_BUFFER_MIXING, STR_SOUND_FORCED_SOFTWARE_BUFFER_MIXING_TIP },
|
{ WWT_CHECKBOX, 0, 10, 299, 76, 87, STR_SOUND_FORCED_SOFTWARE_BUFFER_MIXING, STR_SOUND_FORCED_SOFTWARE_BUFFER_MIXING_TIP },
|
||||||
{ WWT_CHECKBOX, 0, 10, 229, 88, 99, STR_SOUND, STR_NONE }, // pause/unpause sound
|
{ WWT_CHECKBOX, 0, 10, 229, 88, 99, STR_SOUND, STR_NONE }, // enable/disable sound
|
||||||
{ WWT_GROUPBOX, 0, 3, 306, 112, 188, STR_UNITS, STR_NONE },
|
{ WWT_GROUPBOX, 0, 3, 306, 112, 188, STR_UNITS, STR_NONE },
|
||||||
{ WWT_DROPDOWN, 0, 155, 299, 126, 137, 0x367, STR_NONE }, // currency
|
{ WWT_DROPDOWN, 0, 155, 299, 126, 137, 0x367, STR_NONE }, // currency
|
||||||
{ WWT_DROPDOWN_BUTTON, 0, 288, 298, 127, 136, 0x36C, STR_NONE },//
|
{ WWT_DROPDOWN_BUTTON, 0, 288, 298, 127, 136, 0x36C, STR_NONE },//
|
||||||
|
@ -178,7 +178,7 @@ void window_options_open()
|
||||||
(1 << WIDX_TEMPERATURE_DROPDOWN) |
|
(1 << WIDX_TEMPERATURE_DROPDOWN) |
|
||||||
(1 << WIDX_HOTKEY_DROPDOWN) |
|
(1 << WIDX_HOTKEY_DROPDOWN) |
|
||||||
(1 << WIDX_SCREEN_EDGE_SCROLLING) |
|
(1 << WIDX_SCREEN_EDGE_SCROLLING) |
|
||||||
(1 << WIDX_REAL_NAME_CHECKBOX) |
|
(1ULL << WIDX_REAL_NAME_CHECKBOX) |
|
||||||
(1 << WIDX_CONSTRUCTION_MARKER) |
|
(1 << WIDX_CONSTRUCTION_MARKER) |
|
||||||
(1 << WIDX_CONSTRUCTION_MARKER_DROPDOWN) |
|
(1 << WIDX_CONSTRUCTION_MARKER_DROPDOWN) |
|
||||||
(1 << WIDX_HEIGHT_LABELS) |
|
(1 << WIDX_HEIGHT_LABELS) |
|
||||||
|
@ -287,11 +287,11 @@ static void window_options_mouseup()
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_SOUND_PAUSED_CHECKBOX:
|
case WIDX_SOUND_PAUSED_CHECKBOX:
|
||||||
if (sounds_is_paused == 0){
|
if (g_sounds_disabled){
|
||||||
pause_sounds();
|
unpause_sounds();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
unpause_sounds();
|
pause_sounds();
|
||||||
}
|
}
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
|
@ -571,7 +571,7 @@ static void window_options_update(rct_window *w)
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8);
|
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8);
|
||||||
|
|
||||||
//Sound pause checkbox
|
//Sound pause checkbox
|
||||||
if (sounds_is_paused)
|
if (!g_sounds_disabled)
|
||||||
w->pressed_widgets |= (1 << WIDX_SOUND_PAUSED_CHECKBOX);
|
w->pressed_widgets |= (1 << WIDX_SOUND_PAUSED_CHECKBOX);
|
||||||
else
|
else
|
||||||
w->pressed_widgets &= ~(1 << WIDX_SOUND_PAUSED_CHECKBOX);
|
w->pressed_widgets &= ~(1 << WIDX_SOUND_PAUSED_CHECKBOX);
|
||||||
|
@ -590,9 +590,9 @@ static void window_options_update(rct_window *w)
|
||||||
|
|
||||||
// real name checkbox
|
// real name checkbox
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)
|
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)
|
||||||
w->pressed_widgets |= (1 << WIDX_REAL_NAME_CHECKBOX);
|
w->pressed_widgets |= (1ULL << WIDX_REAL_NAME_CHECKBOX);
|
||||||
else
|
else
|
||||||
w->pressed_widgets &= ~(1 << WIDX_REAL_NAME_CHECKBOX);
|
w->pressed_widgets &= ~(1ULL << WIDX_REAL_NAME_CHECKBOX);
|
||||||
|
|
||||||
// landscape tile smoothing checkbox
|
// landscape tile smoothing checkbox
|
||||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE))
|
if ((RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE))
|
||||||
|
@ -614,7 +614,7 @@ static void window_options_update(rct_window *w)
|
||||||
|
|
||||||
// unknown park flag can disable real name checkbox
|
// unknown park flag can disable real name checkbox
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & 0x8000)
|
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & 0x8000)
|
||||||
w->disabled_widgets |= (1 << WIDX_REAL_NAME_CHECKBOX);
|
w->disabled_widgets |= (1ULL << WIDX_REAL_NAME_CHECKBOX);
|
||||||
|
|
||||||
// save plugin data checkbox: visible or not
|
// save plugin data checkbox: visible or not
|
||||||
if (RCT2_GLOBAL(0x00F42BDA, uint8) == 1)
|
if (RCT2_GLOBAL(0x00F42BDA, uint8) == 1)
|
||||||
|
|
|
@ -150,8 +150,7 @@ static void window_water_mouseup()
|
||||||
case WIDX_DECREMENT:
|
case WIDX_DECREMENT:
|
||||||
// Decrement land tool size
|
// Decrement land tool size
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16)--;
|
RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16)--;
|
||||||
//limit = 1;
|
limit = 1;
|
||||||
limit = 0;
|
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) < limit)
|
if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) < limit)
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = limit;
|
RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = limit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue