mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
Merge branch 'adrian17-master'
This commit is contained in:
@@ -181,8 +181,6 @@
|
||||
#define RCT2_ADDRESS_MECHANIC_COLOUR 0x01357BCE
|
||||
#define RCT2_ADDRESS_SECURITY_COLOUR 0x01357BCF
|
||||
|
||||
#define RCT2_ADDRESS_CURRENT_INTEREST_RATE 0x0135934A
|
||||
|
||||
#define RCT2_ADDRESS_MAP_SIZE 0x01358834
|
||||
#define RCT2_ADDRESS_PARK_SIZE 0x013580EA
|
||||
|
||||
|
||||
20
src/config.c
20
src/config.c
@@ -104,27 +104,27 @@ void config_load()
|
||||
RCT2_GLOBAL(0x009AB4C6, sint8) = 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_TEMPERATURE, sint8) = 1;
|
||||
RCT2_GLOBAL(0x009AACBB, sint8) = 1;
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CURRENCY, sint8) = 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AA00D, sint8) = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x009AAC77, sint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_MEM_TOTAL_PHYSICAL, uint32) > 0x4000000) {
|
||||
RCT2_GLOBAL(0x009AAC77, sint8) = 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = 1;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_MEM_TOTAL_PHYSICAL, uint32) > 0x8000000)
|
||||
RCT2_GLOBAL(0x009AAC77, sint8) = 2;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = 2;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x009AAC75, sint8) = RCT2_ADDRESS(0x009AF601, sint8)[RCT2_GLOBAL(0x009AAC77, sint8)];
|
||||
RCT2_GLOBAL(0x009AAC76, sint8) = RCT2_ADDRESS(0x009AF604, sint8)[RCT2_GLOBAL(0x009AAC77, sint8)];
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = 0;
|
||||
RCT2_GLOBAL(0x009AAC75, sint8) = RCT2_ADDRESS(0x009AF601, sint8)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8)];
|
||||
RCT2_GLOBAL(0x009AAC76, sint8) = RCT2_ADDRESS(0x009AF604, sint8)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8)];
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
||||
RCT2_GLOBAL(0x009AACBD, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||
RCT2_GLOBAL(0x009AA00D, sint8) = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1410,7 +1410,7 @@ static void load_landscape()
|
||||
strcpy(esi, ".SC6");
|
||||
break;
|
||||
}
|
||||
strcpy((char*)0x009ABB37, (char*)0x0141EF68);
|
||||
strcpy((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2, (char*)0x0141EF68);
|
||||
|
||||
RCT2_CALLPROC_EBPSAFE(0x006758C0); // landscape_load
|
||||
if (1) {
|
||||
@@ -1546,7 +1546,7 @@ static void load_game()
|
||||
strcpy(esi, ".SV6");
|
||||
break;
|
||||
}
|
||||
strcpy((char*)0x009ABB37, (char*)0x0141EF68);
|
||||
strcpy((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2, (char*)0x0141EF68);
|
||||
|
||||
if (game_load_save()) {
|
||||
gfx_invalidate_screen();
|
||||
|
||||
@@ -284,7 +284,7 @@ void gfx_transpose_palette(int pal, unsigned char product)
|
||||
uint8* esi, *edi;
|
||||
|
||||
ebx = pal * 16;
|
||||
esi = (uint8*)(*((int*)(0x009EBD28 + ebx)));
|
||||
esi = (uint8*)(*((int*)(RCT2_ADDRESS_G1_ELEMENTS + ebx)));
|
||||
ebp = *((short*)(0x009EBD2C + ebx));
|
||||
eax = *((short*)(0x009EBD30 + ebx)) * 4;
|
||||
edi = (uint8*)0x01424680 + eax;
|
||||
|
||||
@@ -74,7 +74,7 @@ void park_init()
|
||||
RCT2_GLOBAL(0x013573F2, sint16) = -1;
|
||||
RCT2_GLOBAL(0x013573F8, sint16) = -1;
|
||||
RCT2_GLOBAL(0x01357CF2, uint16) = 127;
|
||||
RCT2_GLOBAL(0x013573FF, uint8) = 2;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8) = 2;
|
||||
|
||||
RCT2_GLOBAL(0x013580F4, uint16) = 500;
|
||||
RCT2_GLOBAL(0x013580E9, uint8) = 128;
|
||||
|
||||
@@ -380,7 +380,7 @@ void scenario_load(char *path)
|
||||
sawyercoding_read_chunk(hFile, (uint8*)RCT2_ADDRESS_CURRENT_PARK_VALUE);
|
||||
|
||||
// Read more game data, including research items and rides
|
||||
sawyercoding_read_chunk(hFile, (uint8*)0x01358740);
|
||||
sawyercoding_read_chunk(hFile, (uint8*)RCT2_ADDRESS_COMPLETED_COMPANY_VALUE);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
@@ -468,8 +468,8 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32) = ENCRYPT_MONEY(RCT2_GLOBAL(0x013573DC, sint32));
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E869); // (loan related)
|
||||
|
||||
strcpy((char*)0x0135924A, s6Info->details);
|
||||
strcpy((char*)0x0135920A, s6Info->name);
|
||||
strcpy((char*)RCT2_ADDRESS_SCENARIO_DETAILS, s6Info->details);
|
||||
strcpy((char*)RCT2_ADDRESS_SCENARIO_NAME, s6Info->name);
|
||||
|
||||
if (RCT2_GLOBAL(0x009ADAE4, sint32) != -1) {
|
||||
char *ebp = RCT2_GLOBAL(0x009ADAE4, char*);
|
||||
@@ -495,9 +495,9 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
|
||||
}
|
||||
|
||||
// Set the last saved game path
|
||||
strcpy((char*)0x009ABB37, (char*)0x009AB5DA);
|
||||
format_string((char*)0x009ABB37 + strlen((char*)0x009ABB37), RCT2_GLOBAL(0x0013573D4, uint16), (void*)0x0013573D8);
|
||||
strcat((char*)0x009ABB37, ".SV6");
|
||||
strcpy((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2, (char*)RCT2_ADDRESS_SAVED_GAMES_PATH);
|
||||
format_string((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2 + strlen((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2), RCT2_GLOBAL(0x0013573D4, uint16), (void*)0x0013573D8);
|
||||
strcat((char*)RCT2_ADDRESS_SAVED_GAMES_PATH_2, ".SV6");
|
||||
|
||||
memset((void*)0x001357848, 0, 56);
|
||||
RCT2_GLOBAL(0x0135832C, uint32) = 0;
|
||||
|
||||
@@ -403,7 +403,7 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r
|
||||
STR_NUM_GUESTS + RCT2_GLOBAL(0x013573FE, uint8),
|
||||
x, y,
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WINDOWCLASS, rct_windowclass) == 2 && RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WIDGETINDEX, sint32) == WIDX_GUESTS ? 2 : w->colours[0] & 0x7F),
|
||||
(void*)0x01357844
|
||||
(void*)RCT2_ADDRESS_GUESTS_IN_PARK
|
||||
);
|
||||
|
||||
// Draw park rating
|
||||
|
||||
@@ -361,7 +361,7 @@ static void window_game_top_toolbar_dropdown()
|
||||
src++;
|
||||
} while (*src != '.' && *src != '\0');
|
||||
strcpy(src, ".SV6");
|
||||
strcpy(0x009ABB37, 0x0141EF68);
|
||||
strcpy(RCT2_ADDRESS_SAVED_GAMES_PATH_2, 0x0141EF68);
|
||||
|
||||
eax = 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & 8)
|
||||
@@ -482,6 +482,6 @@ static void window_game_top_toolbar_paint()
|
||||
imgId = 5627;
|
||||
if (widget_is_pressed(w, WIDX_STAFF))
|
||||
imgId++;
|
||||
imgId |= (RCT2_GLOBAL(0x01357BCD, uint8) << 19) | 0xA0000000 | (RCT2_GLOBAL(0x01357BCE, uint8) << 24);
|
||||
imgId |= (RCT2_GLOBAL(RCT2_ADDRESS_HANDYMAN_COLOUR, uint8) << 19) | 0xA0000000 | (RCT2_GLOBAL(RCT2_ADDRESS_MECHANIC_COLOUR, uint8) << 24);
|
||||
gfx_draw_sprite(dpi, imgId, x, y);
|
||||
}
|
||||
|
||||
@@ -216,12 +216,12 @@ static void window_water_paint()
|
||||
x = (window_water_widgets[WIDX_PREVIEW].left + window_water_widgets[WIDX_PREVIEW].right) / 2 + w->x;
|
||||
y = window_water_widgets[WIDX_PREVIEW].bottom + w->y + 5;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) != 0x80000000 && RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) != 0)
|
||||
gfx_draw_string_centred(dpi, 984, x, y, 0, (void*)0x0141F738);
|
||||
gfx_draw_string_centred(dpi, 984, x, y, 0, (void*)RCT2_ADDRESS_WATER_RAISE_COST);
|
||||
y += 10;
|
||||
|
||||
// Draw lower cost amount
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) != 0x80000000 && RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) != 0)
|
||||
gfx_draw_string_centred(dpi, 985, x, y, 0, (void*)0x0141F73C);
|
||||
gfx_draw_string_centred(dpi, 985, x, y, 0, (void*)RCT2_ADDRESS_WATER_LOWER_COST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user