1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00
This commit is contained in:
hexdec
2014-08-19 22:41:13 +02:00
9 changed files with 3492 additions and 29 deletions

3452
data/language/hungarian.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -141,6 +141,8 @@
<Text Include="..\data\language\english_uk.txt" />
<Text Include="..\data\language\english_us.txt" />
<Text Include="..\data\language\french.txt" />
<Text Include="..\data\language\hungarian.txt" />
<Text Include="..\data\language\polish.txt" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D24D94F6-2A74-480C-B512-629C306CE92F}</ProjectGuid>

View File

@@ -390,5 +390,11 @@
<Text Include="..\data\language\french.txt">
<Filter>Data\Language</Filter>
</Text>
<Text Include="..\data\language\hungarian.txt">
<Filter>Data\Language</Filter>
</Text>
<Text Include="..\data\language\polish.txt">
<Filter>Data\Language</Filter>
</Text>
</ItemGroup>
</Project>

View File

@@ -918,20 +918,18 @@ static void game_handle_input_mouse(int x, int y, int state)
}
}
else if ((ebx & 0xFF) == 3){
//Don't think it is a map element.
rct_map_element_properties* map_element = (rct_map_element_properties*)spr;
uint32 edx = (uint32)spr;
if (!((map_element->track.type & 0x3C) == 16)){
eax = RCT2_ADDRESS(0x0099BA64, uint8)[16 * (*(uint8*)(edx + 4))];
if (!(eax & 0x10)){
eax = *((uint8*)(edx + 7));
RCT2_CALLPROC_X(0x6ACC28, eax, ebx, ecx, edx, esi, edi, ebp);
rct_map_element* map_element = (rct_map_element*)spr;
if (!((map_element->type & MAP_ELEMENT_TYPE_MASK) == MAP_ELEMENT_TYPE_ENTRANCE)){
eax = RCT2_ADDRESS(0x0099BA64, uint8)[16 * map_element->properties.track.type];
if (!(eax & 0x10)){//If not station track
//Open ride window in overview mode.
RCT2_CALLPROC_X(0x6ACC28, map_element->properties.track.ride_index, ebx, ecx, (int)map_element, esi, edi, ebp);
break;
}
}
//Open ride window
RCT2_CALLPROC_X(0x6ACCCE, *(uint8*)(edx + 7), ((*(uint8*)(edx + 5)) & 0x70) >> 4, ecx, edx, esi, edi, ebp);
//Open ride window in station view
RCT2_CALLPROC_X(0x6ACCCE, map_element->properties.track.ride_index, (map_element->properties.track.sequence & 0x70) >> 4, ecx, (int)map_element, esi, edi, ebp);
}
else if ((ebx & 0xFF) == 8){
window_park_entrance_open();

View File

@@ -30,6 +30,7 @@ const char *language_names[LANGUAGE_COUNT] = {
"English (US)", // LANGUAGE_ENGLISH_US
"Nederlands", // LANGUAGE_DUTCH
"Fran\u00e7ais", // LANGUAGE_FRENCH
"Magyar", // LANGUAGE_HUNGARIAN
"Polski" // LANGUAGE_POLISH
};
@@ -39,6 +40,7 @@ const char *language_filenames[LANGUAGE_COUNT] = {
"english_us", // LANGUAGE_ENGLISH_US
"dutch", // LANGUAGE_DUTCH
"french", // LANGUAGE_FRENCH
"hungarian" // LANGUAGE_HUNGARIAN
"polish" // LANGUAGE_POLISH
};

View File

@@ -31,6 +31,7 @@ enum {
LANGUAGE_DUTCH,
LANGUAGE_FRENCH,
LANGUAGE_POLISH,
LANGUAGE_HUNGARIAN,
LANGUAGE_COUNT
};

View File

@@ -260,27 +260,25 @@ void ride_entrance_exit_connected(rct_ride* ride, int ride_idx)
void ride_shop_connected(rct_ride* ride, int ride_idx)
{
rct_ride* ride_back = ride;
uint16 coordinate = ride->station_starts[0];
if (coordinate == 0xFFFF)
return;
int x = ((coordinate >> 8) & 0xFF) << 5, // cx
y = (coordinate & 0xFF) << 5; // ax
uint16 entrance_directions = 0;
int tile_idx = ((x << 8) | y) >> 5, count = 0;
rct_map_element* tile = RCT2_ADDRESS(RCT2_ADDRESS_TILE_MAP_ELEMENT_POINTERS, rct_map_element*)[tile_idx];
while (1) {
rct_map_element* tile = RCT2_ADDRESS(RCT2_ADDRESS_TILE_MAP_ELEMENT_POINTERS, rct_map_element*)[coordinate];
for (; ; tile++){
uint8 element_type = tile->type & MAP_ELEMENT_TYPE_MASK;
if(element_type == MAP_ELEMENT_TYPE_TRACK && tile->properties.track.ride_index == ride_idx)
break;
if(tile->flags & MAP_ELEMENT_FLAG_LAST_TILE)
return;
tile++;
}
uint16 entrance_directions = 0;
uint8 track_type = tile->properties.track.type;
ride = &g_ride_list[tile->properties.track.ride_index];
if (RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride->type * 8, uint32) & 0x80000) {
@@ -306,9 +304,9 @@ void ride_shop_connected(rct_ride* ride, int ride_idx)
entrance_directions >>= 1;
uint8 face_direction = count ^ 2; // flip direction north<->south, east<->west
y -= RCT2_ADDRESS(0x00993CCC, sint16)[face_direction * 2];
x -= RCT2_ADDRESS(0x00993CCE, sint16)[face_direction * 2];
tile_idx = ((x << 8) | y) >> 5;
int y2 = y - RCT2_ADDRESS(0x00993CCC, sint16)[face_direction * 2];
int x2 = x - RCT2_ADDRESS(0x00993CCE, sint16)[face_direction * 2];
int tile_idx = ((x2 << 8) | y2) >> 5;
if (map_coord_is_connected(tile_idx, tile->base_height, face_direction))
return;

View File

@@ -121,6 +121,6 @@ void window_new_ride_open()
w->var_482 = RCT2_GLOBAL(0x00F43523, sint16);
w->width = 1;
RCT2_CALLPROC_EBPSAFE(0x006B3DF1); // initialise window size and widgets
RCT2_CALLPROC_EBPSAFE(0x006B7220);
RCT2_CALLPROC_X(0x006B3DF1, 0, 0, 0, 0, (int)w, 0, 0); // initialise window size and widgets
RCT2_CALLPROC_X(0x006B7220, 0, 0, 0, 0, (int)w, 0, 0);
}

View File

@@ -378,19 +378,23 @@ static void window_research_development_paint()
y = w->y + window_research_development_widgets[WIDX_LAST_DEVELOPMENT_GROUP].top + 12;
uint32 typeId = RCT2_GLOBAL(0x01357CF4, uint32);
int lastDevelopmentFormat;
if (typeId != 0xFFFFFFFF) {
if (typeId >= 0x10000) {
uint8 *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, uint8*);
if (RCT2_GLOBAL(rideEntry + 8, uint32) & 0x1000)
stringId = RCT2_GLOBAL(rideEntry, uint16);
else
stringId = (typeId & 0xFF00) + 2;
if (RCT2_GLOBAL(rideEntry + 8, uint32) & 0x1000)
stringId = RCT2_GLOBAL(rideEntry, uint16);
else
stringId = (typeId & 0xFF00) + 2;
lastDevelopmentFormat = STR_RESEARCH_RIDE_LABEL;
} else {
uint8 *sceneryEntry = RCT2_GLOBAL(0x009ADA90 + (typeId & 0xFFFF) * 4, uint8*);
stringId = RCT2_GLOBAL(sceneryEntry, uint16);
lastDevelopmentFormat = STR_RESEARCH_SCENERY_LABEL;
}
gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, STR_RESEARCH_RIDE_LABEL, 0);
}
gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, lastDevelopmentFormat, 0);
}
}
#pragma endregion