Merge branch 'master' into jgrpp-nrt

# Conflicts:
#	config.lib
#	src/core/bitmath_func.hpp
#	src/lang/korean.txt
#	src/main_gui.cpp
#	src/order_gui.cpp
#	src/script/api/script_object.cpp
#	src/station_cmd.cpp
#	src/video/cocoa/wnd_quartz.mm
pull/104/head
Jonathan G Rennison 5 years ago
commit 1f535915d1

@ -1,13 +1,14 @@
notifications:
push:
global:
irc:
- openttd
- openttd.notice
push:
only:
- master
only-by:
- DorpsGek
commit-comment:
pull-request:
irc:
- openttd
- openttd.notice
issue:
irc:
- openttd
- openttd.notice

@ -0,0 +1 @@
custom: https://www.openttd.org/donate.html

@ -1089,20 +1089,10 @@ check_params() {
fi
fi
if [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
if { [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; } && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then
log 1 "checking revision... source release version"
elif [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
log 1 "checking revision... svn detection"
elif [ -d "$ROOT_DIR/../.svn" ] && [ -n "`svn help 2>/dev/null`" ] && [ -n "`LC_ALL=C svn info $ROOT_DIR/.. | grep '^URL:.*tags$'`" ]; then
# subversion changed its behaviour; now not all folders have a .svn folder,
# but only the root folder. Since making tags requires a (sparse) checkout
# of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection"
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
log 1 "checking revision... source tarball"
else

@ -59,7 +59,7 @@ ROOT_DIR=`pwd`
# Determine if we are using a modified version
# Assume the dir is not modified
MODIFIED="0"
if [ -d "$ROOT_DIR/.git" ]; then
if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then
# We are a git checkout
# Refresh the index to make sure file stat info is in sync, then look for modifications
git update-index --refresh >/dev/null

@ -251,8 +251,9 @@ ScriptInfo *AIInstance::FindLibrary(const char *library, int version)
* @param tile The tile on which the command was executed.
* @param p1 p1 as given to DoCommandPInternal.
* @param p2 p2 as given to DoCommandPInternal.
* @param cmd cmd as given to DoCommandPInternal.
*/
void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
/*
* The company might not exist anymore. Check for this.
@ -263,8 +264,9 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
const Company *c = Company::GetIfValid(_current_company);
if (c == nullptr || c->ai_instance == nullptr) return;
c->ai_instance->DoCommandCallback(result, tile, p1, p2);
c->ai_instance->Continue();
if (c->ai_instance->DoCommandCallback(result, tile, p1, p2, cmd)) {
c->ai_instance->Continue();
}
}
CommandCallback *AIInstance::GetDoCommandCallback()

@ -42,7 +42,7 @@ static void ShowBuildAirportPicker(Window *parent);
SpriteID GetCustomAirportSprite(const AirportSpec *as, byte layout);
void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -46,7 +46,7 @@ public:
/** Factory for the SSE4 32 bpp blitter (with palette animation). */
class FBlitter_32bppSSE4_Anim: public BlitterFactory {
public:
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "32bpp SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
Blitter *CreateInstance() override { return new Blitter_32bppSSE4_Anim(); }
};

@ -59,8 +59,9 @@ typedef GUIList<BuildBridgeData> GUIBridgeList; ///< List of bridges, used in #B
* - p2 = (bit 0- 7) - bridge type (hi bh)
* - p2 = (bit 8-13) - rail type or road types.
* - p2 = (bit 15-16) - transport type.
* @param cmd unused
*/
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2)
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
if (_settings_client.sound.confirm) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, end_tile);

@ -1662,7 +1662,7 @@ struct BuildVehicleWindow : Window {
}
};
void CcAddVirtualEngine(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcAddVirtualEngine(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -277,7 +277,7 @@ static const Command _command_proc_table[] = {
DEF_CMD(CmdRemoveRailroadTrack, CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_REMOVE_RAILROAD_TRACK
DEF_CMD(CmdBuildSingleRail, CMD_NO_WATER | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_SINGLE_RAIL
DEF_CMD(CmdRemoveSingleRail, CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_REMOVE_SINGLE_RAIL
DEF_CMD(CmdLandscapeClear, 0, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_LANDSCAPE_CLEAR
DEF_CMD(CmdLandscapeClear, CMD_DEITY, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_LANDSCAPE_CLEAR
DEF_CMD(CmdBuildBridge, CMD_DEITY | CMD_NO_WATER | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_BRIDGE
DEF_CMD(CmdBuildRailStation, CMD_NO_WATER | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_RAIL_STATION
DEF_CMD(CmdBuildTrainDepot, CMD_NO_WATER | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_TRAIN_DEPOT
@ -837,7 +837,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
}
if (!estimate_only && !only_sending && callback != nullptr) {
callback(res, tile, p1, p2);
callback(res, tile, p1, p2, cmd);
}
return res.Succeeded();

@ -582,7 +582,7 @@ struct Command {
* @param p1 Additional data of the command
* @see CommandProc
*/
typedef void CommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2);
typedef void CommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd);
#define MAX_CMD_TEXT_LENGTH 32000

@ -106,15 +106,18 @@ void SetLocalCompany(CompanyID new_company)
/* company could also be COMPANY_SPECTATOR or OWNER_NONE */
assert(Company::IsValidID(new_company) || new_company == COMPANY_SPECTATOR || new_company == OWNER_NONE);
/* If actually changing to another company, several windows need closing */
bool switching_company = _local_company != new_company;
/* Delete the chat window, if you were team chatting. */
InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
if (switching_company) InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
assert(IsLocalCompany());
_current_company = _local_company = new_company;
/* Delete any construction windows... */
DeleteConstructionWindows();
if (switching_company) DeleteConstructionWindows();
/* ... and redraw the whole screen. */
MarkWholeScreenDirty();

@ -115,7 +115,7 @@ template <typename T>
static inline T *AlignPtr(T *x, uint n)
{
assert_compile(sizeof(size_t) == sizeof(void *));
return (T *)Align((size_t)x, n);
return reinterpret_cast<T *>(Align((size_t)x, n));
}
/**
@ -225,7 +225,7 @@ static inline uint ClampU(const uint a, const uint min, const uint max)
*/
static inline int32 ClampToI32(const int64 a)
{
return (int32)Clamp<int64>(a, INT32_MIN, INT32_MAX);
return static_cast<int32>(Clamp<int64>(a, INT32_MIN, INT32_MAX));
}
/**
@ -241,7 +241,7 @@ static inline uint16 ClampToU16(const uint64 a)
* match for min(uint64, uint) than uint64 min(uint64, uint64). As such we
* need to cast the UINT16_MAX to prevent MSVC from displaying its
* infinite loads of warnings. */
return (uint16)min<uint64>(a, (uint64)UINT16_MAX);
return static_cast<uint16>(min<uint64>(a, static_cast<uint64>(UINT16_MAX)));
}
/**
@ -386,10 +386,10 @@ static inline int RoundDivSU(int a, uint b)
{
if (a > 0) {
/* 0.5 is rounded to 1 */
return (a + (int)b / 2) / (int)b;
return (a + static_cast<int>(b) / 2) / static_cast<int>(b);
} else {
/* -0.5 is rounded to 0 */
return (a - ((int)b - 1) / 2) / (int)b;
return (a - (static_cast<int>(b) - 1) / 2) / static_cast<int>(b);
}
}

@ -119,8 +119,9 @@ extern void DepotSortList(VehicleList *list);
* @param tile unused
* @param p1 unused
* @param p2 unused
* @param cmd unused
*/
void CcCloneVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcCloneVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -40,7 +40,7 @@ static void ShowBuildDocksDepotPicker(Window *parent);
static Axis _ship_depot_direction;
void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -48,7 +48,7 @@ void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
}

@ -57,7 +57,7 @@ bool FiosItem::operator< (const FiosItem &other) const
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && (*this).mtime != other.mtime) {
r = (*this).mtime - other.mtime;
} else {
r = strcasecmp((*this).title, other.title);
r = strnatcmp((*this).title, other.title);
}
if (r == 0) return false;
return (_savegame_sort_order & SORT_DESCENDING) ? r > 0 : r < 0;
@ -300,13 +300,29 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
FiosItem *fios = file_list.Append();
#ifdef _WIN32
struct _stat sb;
if (_tstat(OTTD2FS(filename), &sb) == 0) {
// Retrieve the file modified date using GetFileTime rather than stat to work around an obscure MSVC bug that affects Windows XP
HANDLE fh = CreateFile(OTTD2FS(filename), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);
if (fh != INVALID_HANDLE_VALUE) {
FILETIME ft;
ULARGE_INTEGER ft_int64;
if (GetFileTime(fh, nullptr, nullptr, &ft) != 0) {
ft_int64.HighPart = ft.dwHighDateTime;
ft_int64.LowPart = ft.dwLowDateTime;
// Convert from hectonanoseconds since 01/01/1601 to seconds since 01/01/1970
fios->mtime = ft_int64.QuadPart / 10000000ULL - 11644473600ULL;
} else {
fios->mtime = 0;
}
CloseHandle(fh);
#else
struct stat sb;
if (stat(filename, &sb) == 0) {
#endif
fios->mtime = sb.st_mtime;
#endif
} else {
fios->mtime = 0;
}

@ -257,11 +257,13 @@ void GameInstance::Died()
* @param tile The tile on which the command was executed.
* @param p1 p1 as given to DoCommandPInternal.
* @param p2 p2 as given to DoCommandPInternal.
* @param cmd cmd as given to DoCommandPInternal.
*/
void CcGame(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcGame(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
Game::GetGameInstance()->DoCommandCallback(result, tile, p1, p2);
Game::GetGameInstance()->Continue();
if (Game::GetGameInstance()->DoCommandCallback(result, tile, p1, p2, cmd)) {
Game::GetGameInstance()->Continue();
}
}
CommandCallback *GameInstance::GetDoCommandCallback()

@ -1132,9 +1132,10 @@ static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner o
* @param tile Unused.
* @param p1 Vehicle type.
* @param p2 Unused.
* @param cmd Unused.
* @see CmdCreateGroup
*/
void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
assert(p1 <= VEH_AIRCRAFT);
@ -1149,13 +1150,14 @@ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32
* @param tile Unused.
* @param p1 Unused.
* @param p2 Bit 0-19: Vehicle ID.
* @param cmd Unused.
*/
void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
assert(Vehicle::IsValidID(GB(p2, 0, 20)));
CcCreateGroup(result, 0, Vehicle::Get(GB(p2, 0, 20))->type, 0);
CcCreateGroup(result, 0, Vehicle::Get(GB(p2, 0, 20))->type, 0, cmd);
}
/**

@ -22,6 +22,7 @@
#include "company_base.h"
#include "strings_func.h"
#include "hotkeys.h"
#include "zoom_func.h"
#include "widgets/highscore_widget.h"
@ -132,7 +133,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
void OnPaint() override
{
this->SetupHighScoreEndWindow();
Point pt = this->GetTopLeft(640, 480);
Point pt = this->GetTopLeft(ScaleGUITrad(640), ScaleGUITrad(480));
const Company *c = Company::GetIfValid(_local_company);
if (c == nullptr) return;
@ -143,11 +144,11 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
SetDParam(0, c->index);
SetDParam(1, c->index);
SetDParam(2, EndGameGetPerformanceTitleFromValue(c->old_economy[0].performance_history));
DrawStringMultiLine(pt.x + 15, pt.x + 640 - 25, pt.y + 90, pt.y + 160, STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS, TC_FROMSTRING, SA_CENTER);
DrawStringMultiLine(pt.x + ScaleGUITrad(15), pt.x + ScaleGUITrad(640) - ScaleGUITrad(25), pt.y + ScaleGUITrad(90), pt.y + ScaleGUITrad(160), STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS, TC_FROMSTRING, SA_CENTER);
} else {
SetDParam(0, c->index);
SetDParam(1, EndGameGetPerformanceTitleFromValue(c->old_economy[0].performance_history));
DrawStringMultiLine(pt.x + 36, pt.x + 640, pt.y + 140, pt.y + 206, STR_HIGHSCORE_COMPANY_ACHIEVES_STATUS, TC_FROMSTRING, SA_CENTER);
DrawStringMultiLine(pt.x + ScaleGUITrad(36), pt.x + ScaleGUITrad(640), pt.y + ScaleGUITrad(140), pt.y + ScaleGUITrad(206), STR_HIGHSCORE_COMPANY_ACHIEVES_STATUS, TC_FROMSTRING, SA_CENTER);
}
}
};
@ -182,24 +183,24 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
const HighScore *hs = _highscore_table[this->window_number];
this->SetupHighScoreEndWindow();
Point pt = this->GetTopLeft(640, 480);
Point pt = this->GetTopLeft(ScaleGUITrad(640), ScaleGUITrad(480));
SetDParam(0, ORIGINAL_END_YEAR);
DrawStringMultiLine(pt.x + 70, pt.x + 570, pt.y, pt.y + 140, !_networking ? STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED : STR_HIGHSCORE_TOP_COMPANIES_NETWORK_GAME, TC_FROMSTRING, SA_CENTER);
DrawStringMultiLine(pt.x + ScaleGUITrad(70), pt.x + ScaleGUITrad(570), pt.y, pt.y + ScaleGUITrad(140), !_networking ? STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED : STR_HIGHSCORE_TOP_COMPANIES_NETWORK_GAME, TC_FROMSTRING, SA_CENTER);
/* Draw Highscore peepz */
for (uint8 i = 0; i < lengthof(_highscore_table[0]); i++) {
SetDParam(0, i + 1);
DrawString(pt.x + 40, pt.x + 600, pt.y + 140 + (i * 55), STR_HIGHSCORE_POSITION);
DrawString(pt.x + ScaleGUITrad(40), pt.x + ScaleGUITrad(600), pt.y + ScaleGUITrad(140 + i * 55), STR_HIGHSCORE_POSITION);
if (hs[i].company[0] != '\0') {
TextColour colour = (this->rank == i) ? TC_RED : TC_BLACK; // draw new highscore in red
SetDParamStr(0, hs[i].company);
DrawString(pt.x + 71, pt.x + 569, pt.y + 140 + (i * 55), STR_JUST_BIG_RAW_STRING, colour);
DrawString(pt.x + ScaleGUITrad(71), pt.x + ScaleGUITrad(569), pt.y + ScaleGUITrad(140 + i * 55), STR_JUST_BIG_RAW_STRING, colour);
SetDParam(0, hs[i].title);
SetDParam(1, hs[i].score);
DrawString(pt.x + 71, pt.x + 569, pt.y + 140 + FONT_HEIGHT_LARGE + (i * 55), STR_HIGHSCORE_STATS, colour);
DrawString(pt.x + ScaleGUITrad(71), pt.x + ScaleGUITrad(569), pt.y + ScaleGUITrad(140) + FONT_HEIGHT_LARGE + ScaleGUITrad(i * 55), STR_HIGHSCORE_STATS, colour);
}
}
}

@ -222,8 +222,9 @@ void SortIndustryTypes()
* @param tile Tile where the industry is placed.
* @param p1 Additional data of the #CMD_BUILD_INDUSTRY command.
* @param p2 Additional data of the #CMD_BUILD_INDUSTRY command.
* @param cmd Unused.
*/
void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) return;

@ -1327,8 +1327,8 @@ STR_CONFIG_SETTING_TERRAIN_TYPE :Type de terrain
STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(TerraGenesis only) Vallonnement du paysage
STR_CONFIG_SETTING_INDUSTRY_DENSITY :Densité des industries{NBSP}: {STRING}
STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Définit combien d'industries doivent être générée et quel niveau doit être maintenu pendant la partie
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Distance maximum depuis les bords pour les raffineries{NBSP}: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Les raffineries pétrolières ne sont construites que près du bord de la carte, ou sur la côte pour les cartes d'îles.
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Distance maximum depuis les bords pour les industries pétrolières{NBSP}: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Limite de distance par rapport au bord de la carte où les raffineries et les plateformes pétrolières peuvent être construites. Sur les cartes d'îles cela assure qu'elles sont près de la côte. Sur les cartes plus large que 256 tuiles, cette valeur est mise à l'échelle.
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Altitude d'enneigement{NBSP}: {STRING}
STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Contrôle à quelle altitude la neige commence dans le climat sub-arctique.La neige affecte aussi la génération des industries et les exigences pour la croissance des villes
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Rugosité du terrain{NBSP}: {STRING}
@ -3120,6 +3120,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Renommer la vil
# Town local authority window
STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Municipalité de {TOWN}
STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zone
STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Affiche la zone dans les limites de la municipalité
STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Qualité de service des compagnies{NBSP}:
STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}{NBSP}: {ORANGE}{STRING}
STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Actions disponibles{NBSP}:

@ -1350,8 +1350,8 @@ STR_CONFIG_SETTING_TERRAIN_TYPE :Tipo di terreno
STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Solo TerraGenesis) Tipo di dislivelli presenti nel paesaggio
STR_CONFIG_SETTING_INDUSTRY_DENSITY :Densità delle industrie: {STRING}
STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Determina quante industrie sono generate e attorno a quale livello sono mantenute nel corso della partita
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Massima distanza delle raffinerie dal bordo della mappa: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Le raffinerie sono costruite solo vicino ai bordi della mappa, ovvero sulla costa nel caso di mappe insulari
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Massima distanza delle industrie petrolifere dal bordo della mappa: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Limita la distanza dal bordo della mappa entro cui possono essere costruite raffinerie e piattaforme petrolifere. Nelle mappe insulari sono comunque sempre vicino alla costa. Su mappe più grandi di 256 riquadri il valore è aumentato in proporzione.
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Altezza delle nevi perenni: {STRING}
STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Determina la quota alla quale appare la neve nei paesaggi sub-artici. La neve ha anche l'effetto di influenzare la generazione delle industrie e i requisiti per la crescita delle città
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Irregolarità del terreno: {STRING}
@ -3149,6 +3149,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Rinomina città
# Town local authority window
STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Autorità locale di {TOWN}
STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zona
STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Mostra la zona di competenza dall'autorità locale
STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Valutazione delle compagnie di trasporto:
STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING}
STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Azioni disponibili:

@ -1040,26 +1040,26 @@ STR_ERROR_FULLSCREEN_FAILED :{WHITE}전체
STR_CURRENCY_WINDOW :{WHITE}사용자 화폐 단위
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}환율: {ORANGE}{CURRENCY_LONG} = {COMMA}파운드
STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}(1 파운드(£)에 대한) 사용자 화폐 단위양을 감소시킵니다.
STR_CURRENCY_INCREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}(1 파운드(£)에 대한) 사용자 화폐 단위양을 증가시킵니다.
STR_CURRENCY_SET_EXCHANGE_RATE_TOOLTIP :{BLACK}1 파운드(£)에 해당하는 사용자 화폐 단위의 환율을 설정하십시오.
STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}(1 파운드(£)에 대한) 사용자 화폐 단위 양을 감소시킵니다
STR_CURRENCY_INCREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}(1 파운드(£)에 대한) 사용자 화폐 단위 양을 증가시킵니다
STR_CURRENCY_SET_EXCHANGE_RATE_TOOLTIP :{BLACK}1 파운드(£)에 해당하는 사용자 화폐 단위의 환율을 설정하십시오
STR_CURRENCY_SEPARATOR :{LTBLUE}단위 구분: {ORANGE}{STRING}
STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP :{BLACK}사용자 화폐 단위의 단위 구분자를 설정하십시오.
STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP :{BLACK}사용자 화폐 단위의 단위 구분자를 설정하십시오
STR_CURRENCY_PREFIX :{LTBLUE}접두어: {ORANGE}{STRING}
STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP :{BLACK}사용자 화폐 단위 앞에 붙는 문구를 설정하십시오.
STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP :{BLACK}사용자 화폐 단위 앞에 붙는 문구를 설정하십시오
STR_CURRENCY_SUFFIX :{LTBLUE}접미어: {ORANGE}{STRING}
STR_CURRENCY_SET_CUSTOM_CURRENCY_SUFFIX_TOOLTIP :{BLACK}사용자 화폐 단위 뒤에 붙는 문구를 설정하십시오.
STR_CURRENCY_SET_CUSTOM_CURRENCY_SUFFIX_TOOLTIP :{BLACK}사용자 화폐 단위 뒤에 붙는 문구를 설정하십시오
STR_CURRENCY_SWITCH_TO_EURO :{LTBLUE}유로화로 전환: {ORANGE}{NUM}
STR_CURRENCY_SWITCH_TO_EURO_NEVER :{LTBLUE}유로화로 전환: {ORANGE}전환하지 않음
STR_CURRENCY_SET_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}유로화(€) 전환 연도를 설정하십시오.
STR_CURRENCY_SET_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}유로화(€) 전환 연도를 설정하십시오
STR_CURRENCY_DECREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}유로화(€) 전환 연도를 앞으로 당깁니다.
STR_CURRENCY_INCREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}유로화(€) 전환 연도를 늦춥니다.
STR_CURRENCY_INCREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}유로화(€) 전환 연도를 늦춥니다
STR_CURRENCY_PREVIEW :{LTBLUE}미리보기: {ORANGE}{CURRENCY_LONG}
STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP :{BLACK}10000 파운드(£)에 해당하는 사용자 화폐 단위입니다.
STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP :{BLACK}10000 파운드(£)에 해당하는 사용자 화폐 단위입니다
STR_CURRENCY_CHANGE_PARAMETER :{BLACK}사용자 화폐 변수 변경
STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS :{LTBLUE}최대 경쟁자수: {ORANGE}{COMMA}
@ -1176,7 +1176,7 @@ STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :한 회사가
STR_CONFIG_SETTING_INTEREST_RATE :대출 금리: {STRING}
STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :대출 금리입니다. 인플레이션 설정이 켜져있는 경우 인플레이션의 영향을 받습니다.
STR_CONFIG_SETTING_RUNNING_COSTS :유지비: {STRING}
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :차량과 기반시설의 유지비 수준을 설정하십시오.
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :차량과 기반시설의 유지비 수준을 설정하십시오
STR_CONFIG_SETTING_CONSTRUCTION_SPEED :건설 속도: {STRING}
STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :인공지능의 건설 행동량을 제한하여 건설 속도를 조절할 수 있습니다.
STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :차량 고장 빈도수: {STRING}
@ -1383,8 +1383,8 @@ STR_CONFIG_SETTING_TERRAIN_TYPE :지형 종류:
STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(천지창조 전용) 지형의 언덕 모양을 결정합니다.
STR_CONFIG_SETTING_INDUSTRY_DENSITY :산업시설 수: {STRING}
STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :게임을 플레이하는 동안 얼마나 많은 산업시설이 생성되고 유지되어야 할 지를 설정합니다.
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :정유 공장의 최대 건설 범위: 지도 맨 끝에서부터 {STRING} 이내
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :정유 공장은 지도의 동서남북 끝 경계 근처에만 건설할 수 있습니다.
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :석유 관련 산업 시설의 최대 건설 범위: 지도 맨 끝에서부터 {STRING} 이내
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :정유 공장과 유전이 맵 가장자리에서 얼마나 멀리 떨어진 곳까지 건설될 수 있는지를 나타냅니다. 섬 맵에서는 이 설정을 이용해서 해당 산업 시설이 해안에 가까이 있도록 조정할 수 있습니다. 256칸보다 큰 맵의 경우에는 이 값은 더 크게 조정됩니다.
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :설선 고도: {STRING}
STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :아한대 기후의 설선 고도를 조절합니다. 눈은 산업시설의 생성과 도시 성장에 영향을 미칩니다.
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :지형의 거친 정도: {STRING}
@ -1433,7 +1433,7 @@ STR_CONFIG_SETTING_SCROLLMODE_LMB :왼쪽 마우
STR_CONFIG_SETTING_SMOOTH_SCROLLING :게임 화면을 이동시킬 때 부드럽게 이동: {STRING}
STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :소형 지도를 클릭하여 특정 지역으로 스크롤되거나 지도 상의 특정 장소로 이동하는 경우에 주 화면이 어떻게 스크롤 되는지를 설정합니다. 이 설정을 켜면, 화면이 목표 지점까지 부드럽게 이동하고, 설정을 끄면 목표 지점으로 곧바로 넘어가게 됩니다.
STR_CONFIG_SETTING_MEASURE_TOOLTIP :건설도구 사용시 거리 도움말 표시: {STRING}
STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :철도/도로 등의 기반시설을 건설할 때 거리와 높이 차이 등을 표시합니다.
STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :철도/도로 등의 기반시설을 건설할 때 거리와 높이 차이 등을 표시합니다
STR_CONFIG_SETTING_LIVERIES :차량 종류에 따라 회사의 색상을 구분하여 표시: {STRING}
STR_CONFIG_SETTING_LIVERIES_HELPTEXT :회사 고유 색상을 따르지 않고 차량 종류에 따라 다른 차량 색상을 사용하는 것을 허용합니다.
STR_CONFIG_SETTING_LIVERIES_NONE :없음
@ -2462,18 +2462,18 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}서버
# Content downloading window
STR_CONTENT_TITLE :{WHITE}콘텐츠 다운로드
STR_CONTENT_TYPE_CAPTION :{BLACK}종류
STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}콘텐츠의 종류
STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}콘텐츠의 종류입니다
STR_CONTENT_NAME_CAPTION :{BLACK}이름
STR_CONTENT_NAME_CAPTION_TOOLTIP :{BLACK}콘텐츠의 이름
STR_CONTENT_MATRIX_TOOLTIP :{BLACK}항목을 클릭하면 자세히 볼 수 있습니다{}다운로드할 항목을 누르세요
STR_CONTENT_SELECT_ALL_CAPTION :{BLACK}모두 선택
STR_CONTENT_SELECT_ALL_CAPTION_TOOLTIP :{BLACK}모든 콘텐츠를 선택합니다
STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}업데이트 선택
STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}업데이트 항목이 있는 컨텐츠를 선택합니다.
STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}업데이트 항목이 있는 컨텐츠를 선택합니다
STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}모두 선택 해제
STR_CONTENT_UNSELECT_ALL_CAPTION_TOOLTIP :{BLACK}모든 콘텐츠의 선택을 해제합니다.
STR_CONTENT_SEARCH_EXTERNAL :{BLACK}외부 사이트에서 검색
STR_CONTENT_SEARCH_EXTERNAL_TOOLTIP :{BLACK}OpenTTD의 온라인 콘텐츠 서비스에서 다운로드할 수 없는 콘텐츠를 OpenTTD와 관련이 없는 외부 사이트에서 검색합니다.
STR_CONTENT_SEARCH_EXTERNAL_TOOLTIP :{BLACK}OpenTTD의 온라인 콘텐츠 서비스에서 다운로드할 수 없는 콘텐츠를 OpenTTD와 관련이 없는 외부 사이트에서 검색합니다
STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER_CAPTION :{WHITE}OpenTTD를 종료하는 중입니다!
STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER :{WHITE}외부 웹사이트에서 콘텐츠를 다운로드할 때에는 그에 대한 약관과 조건이 다양합니다.{}이 콘텐츠를 OpenTTD에 설치하는 방법은 외부 사이트에서 찾아보아야 합니다.{}계속하시겠습니까?
STR_CONTENT_FILTER_TITLE :{BLACK}태그/이름 검색:
@ -2624,24 +2624,24 @@ STR_STATION_CLASS_WAYP :경유지
# Signal window
STR_BUILD_SIGNAL_CAPTION :{WHITE}신호기 선택
STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}폐색 신호기 (구식){}가장 기본적인 신호기 형식입니다. 단 한 대의 열차만이 이 폐색 구간을 통과할 수 있습니다.
STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}입구 신호기 (구식){}다음 폐색 구간에 있는 출구 신호기가 하나라도 파란불이면 파란불이 되며, 그렇지 않은 경우에는 빨간불이 됩니다.
STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}출구 신호기 (구식){}일반 신호기와 기능이 똑같지만, 입구 & 복합 신호기와 올바르게 연계되어야 합니다.
STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}복합 신호기 (구식){}복합 신호기는 입구 신호기와 출구 신호기의 역할을 동시에 합니다. 이 신호기는 사전 신호기의 거대한 "나뭇가지 구조"를 건설할 수 있도록 도와줍니다.
STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}폐색 신호기 (구식){}가장 기본적인 신호기 형식입니다. 단 한 대의 열차만이 이 폐색 구간을 통과할 수 있습니다
STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}입구 신호기 (구식){}다음 폐색 구간에 있는 출구 신호기가 하나라도 파란불이면 파란불이 되며, 그렇지 않은 경우에는 빨간불이 됩니다
STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}출구 신호기 (구식){}일반 신호기와 기능이 똑같지만, 입구 & 복합 신호기와 올바르게 연계되어야 합니다
STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}복합 신호기 (구식){}복합 신호기는 입구 신호기와 출구 신호기의 역할을 동시에 합니다. 이 신호기는 사전 신호기의 거대한 "나뭇가지 구조"를 건설할 수 있도록 도와줍니다
STR_BUILD_SIGNAL_SEMAPHORE_PROG_TOOLTIP :{BLACK}프로그램 신호기 (구식){}프로그램 신호기는 복잡한 기능을 할 수 있도록 프로그래밍 가능한 복합 신호기입니다.
STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}경로 신호기 (구식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 경로 신호기는 반대편에서 통과가 가능합니다.
STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}단방향 경로 신호기 (구식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 단방향 경로 신호기는 반대편에서 통과가 불가능합니다.
STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}폐색 신호기 (전자식){}가장 기본적인 신호기 형식입니다. 단 한 대의 열차만이 이 폐색 구간을 통과할 수 있습니다.
STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}입구 신호기 (전자식){}다음 폐색 구간에 있는 출구 신호기가 하나라도 파란불이면 파란불이 되며, 그렇지 않은 경우에는 빨간불이 됩니다.
STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}출구 신호기 (전자식){}일반 신호기와 기능이 똑같지만, 입구 & 복합 신호기와 올바르게 연계되어야 합니다.
STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}복합 신호기 (전자식){}복합 신호기는 입구 신호기와 출구 신호기의 역할을 동시에 합니다. 이 신호기는 사전 신호기의 거대한 "나뭇가지식 구조"를 건설할 수 있도록 도와줍니다.
STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}경로 신호기 (구식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 경로 신호기는 반대편에서 통과가 가능합니다
STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}단방향 경로 신호기 (구식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 단방향 경로 신호기는 반대편에서 통과가 불가능합니다
STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}폐색 신호기 (전자식){}가장 기본적인 신호기 형식입니다. 단 한 대의 열차만이 이 폐색 구간을 통과할 수 있습니다
STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}입구 신호기 (전자식){}다음 폐색 구간에 있는 출구 신호기가 하나라도 파란불이면 파란불이 되며, 그렇지 않은 경우에는 빨간불이 됩니다
STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}출구 신호기 (전자식){}일반 신호기와 기능이 똑같지만, 입구 & 복합 신호기와 올바르게 연계되어야 합니다
STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}복합 신호기 (전자식){}복합 신호기는 입구 신호기와 출구 신호기의 역할을 동시에 합니다. 이 신호기는 사전 신호기의 거대한 "나뭇가지식 구조"를 건설할 수 있도록 도와줍니다
STR_BUILD_SIGNAL_ELECTRIC_PROG_TOOLTIP :{BLACK}프로그램 신호기 (전자식){}프로그램 신호기는 복잡한 기능을 할 수 있도록 프로그래밍 가능한 복합 신호기입니다.
STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}경로 신호기 (전자식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 경로 신호기는 반대편에서 통과가 가능합니다.
STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}단방향 경로 신호기 (전자식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 단방향 경로 신호기는 반대편에서 통과가 불가능합니다.
STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}경로 신호기 (전자식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 경로 신호기는 반대편에서 통과가 가능합니다
STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}단방향 경로 신호기 (전자식){}경로 신호기는 경로가 겹치지 않는 경우에 한 대 이상의 열차가 한 폐색 구간에 동시에 들어갈 수 있게 해줍니다. 단방향 경로 신호기는 반대편에서 통과가 불가능합니다
STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}신호기 변환{}이 버튼을 선택한 뒤 이미 설치된 신호기를 클릭하면, 신호기의 종류(일반/입구/출구/복합/경로)와 형식(구식↔전자식)을 변경하고, CTRL+클릭하면 신호기의 형식을 변경합니다. SHIFT+클릭을 사용하면 예상 비용을 볼 수 있습니다
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}드래그로 신호기를 설치하는 간격
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}드래그로 신호기를 설치하는 간격 감소
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}드래그로 신호기를 설치하는 간격 증가
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}드래그로 설치할 때 신호기 사이의 간격입니다
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}드래그로 설치할 신호기 간격을 줄입니다
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}드래그로 설치할 신호기 간격을 늘입니다
# Tracerestrict GUI
STR_TRACE_RESTRICT_CONDITIONAL_COMPARATOR_EQUALS :=
@ -3675,6 +3675,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :도시 이름
# Town local authority window
STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} 지역 당국
STR_LOCAL_AUTHORITY_ZONE :{BLACK}구역
STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}지역 당국의 범위 안에 있는 구역을 보여줍니다
STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}회사에 대한 이 도시의 평판:
STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING}
STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}가능한 행동:
@ -5014,7 +5016,7 @@ STR_AI_LIST_VERSION :{LTBLUE}버전:
STR_AI_LIST_URL :{LTBLUE}주소: {ORANGE}{STRING}
STR_AI_LIST_ACCEPT :{BLACK}적용
STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}선택한 스크립트를 적용합니다.
STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}선택한 스크립트를 적용합니다
STR_AI_LIST_CANCEL :{BLACK}취소
STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}인공지능 스크립트를 바꾸지 않습니다
@ -5213,7 +5215,7 @@ STR_ERROR_BUILDING_NOT_ALLOWED :{WHITE}... 허
STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... 산업시설이 너무 많습니다
STR_ERROR_CAN_T_GENERATE_INDUSTRIES :{WHITE}산업시설을 생성할 수 없습니다...
STR_ERROR_CAN_T_BUILD_HERE :{WHITE}여기에 {STRING}{G 0 "을" "를"} 건설할 수 없습니다...
STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY :{WHITE}여기는 산업시설을 건설할 수 없는 곳입니다...
STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY :{WHITE}여기에 산업시설을 건설할 수 없습니다...
STR_ERROR_INDUSTRY_TOO_CLOSE :{WHITE}... 다른 산업시설과 너무 가깝습니다
STR_ERROR_MUST_FOUND_TOWN_FIRST :{WHITE}... 도시를 먼저 만들어야 합니다
STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN :{WHITE}... 한 도시에 하나만 지을 수 있습니다

@ -963,6 +963,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC
STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Direktor)
STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} sponzorirana gradnja novega mesta {TOWN}!
STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Novo mesto z imenom {TOWN} je bilo zgrajeno!
STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Na novo se gradi {STRING} blizu mesta {TOWN}!
STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Postavlja se {STRING} blizu mesta {TOWN}!
@ -1951,6 +1952,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Spremeni
STR_CHEAT_SETUP_PROD :{LTBLUE}Omogoči spreminjanje proizvodnih vrednosti: {ORANGE}{STRING}
# Livery window
STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Barvna shema
STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Prikaz glavnih barvnih shem
STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Prikaz barvnih shem vlakov
@ -3927,6 +3929,7 @@ STR_ORDER_CONDITIONAL_AGE :Starost (leta)
STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Potrebuje servis
STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Vedno
STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Preostala življenjska doba (let)
STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Največja zanesljivost
STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Kako primerjati podatke vozila na podano vrednost
STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :je enaka
@ -4610,6 +4613,7 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Originalni zvok
STR_BASESOUNDS_WIN_DESCRIPTION :Originalni zvoki Transport Tycoon Deluxe različice oken(windows).
STR_BASESOUNDS_NONE_DESCRIPTION :Zvočni paket brez zvoka.
STR_BASEMUSIC_WIN_DESCRIPTION :Originalna glasba Transport Tycoon Deluxe različice oken(windows).
STR_BASEMUSIC_DOS_DESCRIPTION :Originalna glasba Transport Tycoon Deluxe DOS različice
STR_BASEMUSIC_NONE_DESCRIPTION :Glasbeni paket z vključeno glasbo.
##id 0x2000

@ -3120,6 +3120,7 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Renombrar Munic
# Town local authority window
STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} autoridad local
STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zona
STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Calificación de empresas de transporte:
STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING}
STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Acciones disponibles:

@ -48,7 +48,7 @@
#include "safeguards.h"
void CcGiveMoney(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcGiveMoney(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed() || !_settings_game.economy.give_money || !_networking) return;
@ -98,7 +98,7 @@ bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyl
}
void CcPlaySound_EXPLOSION(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_EXPLOSION(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_12_EXPLOSION, tile);
}

@ -374,6 +374,26 @@ const char *MusicDriver_Win32::Start(const char * const *parm)
int resolution = GetDriverParamInt(parm, "resolution", 5);
int port = GetDriverParamInt(parm, "port", -1);
const char *portname = GetDriverParam(parm, "portname");
/* Enumerate ports either for selecting port by name, or for debug output */
if (portname != nullptr || _debug_driver_level > 0) {
uint numports = midiOutGetNumDevs();
DEBUG(driver, 1, "Win32-MIDI: Found %d output devices:", numports);
for (uint tryport = 0; tryport < numports; tryport++) {
MIDIOUTCAPS moc{};
if (midiOutGetDevCaps(tryport, &moc, sizeof(moc)) == MMSYSERR_NOERROR) {
char tryportname[128];
convert_from_fs(moc.szPname, tryportname, lengthof(tryportname));
/* Compare requested and detected port name.
* If multiple ports have the same name, this will select the last matching port, and the debug output will be confusing. */
if (portname != nullptr && strncmp(tryportname, portname, lengthof(tryportname)) == 0) port = tryport;
DEBUG(driver, 1, "MIDI port %2d: %s%s", tryport, tryportname, (tryport == port) ? " [selected]" : "");
}
}
}
UINT devid;
if (port < 0) {

@ -678,6 +678,7 @@ static void MoveToNextNewsItem()
ShowNewspaper(ni);
break;
}
return;
}
}

@ -24,6 +24,7 @@
#include "tilehighlight_func.h"
#include "network/network.h"
#include "station_base.h"
#include "industry.h"
#include "waypoint_base.h"
#include "core/geometry_func.hpp"
#include "infrastructure_func.h"
@ -983,11 +984,17 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
return order;
}
if (IsTileType(tile, MP_STATION)) {
StationID st_index = GetStationIndex(tile);
const Station *st = Station::Get(st_index);
/* check for station or industry with neutral station */
if (IsTileType(tile, MP_STATION) || IsTileType(tile, MP_INDUSTRY)) {
const Station *st = nullptr;
if (IsInfraUsageAllowed(v->type, v->owner, st->owner)) {
if (IsTileType(tile, MP_STATION)) {
st = Station::GetByTile(tile);
} else {
const Industry *in = Industry::GetByTile(tile);
st = in->neutral_station;
}
if (st != nullptr && IsInfraUsageAllowed(v->type, v->owner, st->owner)) {
byte facil;
switch (v->type) {
case VEH_SHIP: facil = FACIL_DOCK; break;
@ -997,6 +1004,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
default: NOT_REACHED();
}
if (st->facilities & facil) {
StationID st_index = GetStationIndex(st->xy);
order.MakeGoToStation(st_index);
if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY);
if ((_settings_client.gui.new_nonstop || _settings_game.order.nonstop_only) && v->IsGroundVehicle()) order.SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);

@ -317,6 +317,13 @@ int MacOSStringCompare(const char *s1, const char *s2)
CFRelease(cf2);
});
/* If any CFString could not be created (e.g., due to UTF8 invalid chars), return OS unsupported functionality */
if (cf1 == nullptr || cf2 == nullptr) {
if (cf1 != nullptr) CFRelease(cf1);
if (cf2 != nullptr) CFRelease(cf2);
return 0;
}
CFComparisonResult res = CFStringCompareWithOptionsAndLocale(cf1, cf2, CFRangeMake(0, CFStringGetLength(cf1)), flags, _osx_locale);
return (int)res + 2;

@ -409,7 +409,7 @@ void ShowPlansWindow()
* Only the creator of a plan executes this function.
* The other players should not be bothered with these changes.
*/
void CcAddPlan(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcAddPlan(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -96,7 +96,7 @@ static bool IsStationAvailable(const StationSpec *statspec)
return Convert8bitBooleanCallback(statspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
}
void CcPlaySound_SPLAT_RAIL(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_SPLAT_RAIL(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
}
@ -147,7 +147,7 @@ static const DiagDirection _place_depot_extra_dir[12] = {
DIAGDIR_NW, DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_NE,
};
void CcRailDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcRailDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -188,7 +188,7 @@ static void PlaceRail_Waypoint(TileIndex tile)
}
}
void CcStation(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcStation(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -308,7 +308,7 @@ static void PlaceRail_Bridge(TileIndex tile, Window *w)
}
/** Command callback for building a tunnel */
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) {
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);

@ -68,7 +68,7 @@ static RoadType _cur_roadtype;
static DiagDirection _road_depot_orientation;
static DiagDirection _road_station_picker_orientation;
void CcPlaySound_SPLAT_OTHER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_SPLAT_OTHER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
}
@ -96,8 +96,9 @@ static void PlaceRoad_Bridge(TileIndex tile, Window *w)
* @param p1 bit 0-3 railtype or roadtypes
* bit 8-9 transport type
* @param p2 unused
* @param cmd unused
*/
void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2)
void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) {
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, start_tile);
@ -130,7 +131,7 @@ void ConnectRoadToStructure(TileIndex tile, DiagDirection direction)
}
}
void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -153,9 +154,10 @@ void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2
* bit 3: #Axis of the road for drive-through stops.
* bit 5..9: The roadtype.
* bit 16..31: Station ID to join (NEW_STATION if build new one).
* @param cmd Unused.
* @see CmdBuildRoadStop
*/
void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -35,6 +35,9 @@
* \li AIEngine::HasPowerOnRoad
* \li AIRoadTypeList::RoadTypeList
*
* Other changes:
* \li AITile::DemolishTile works without a selected company
*
* \b 1.9.0
*
* API additions:

@ -1263,6 +1263,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SCROLLBAR, "WID_TD_SCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_WORLD_POPULATION, "WID_TD_WORLD_POPULATION");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_CAPTION, "WID_TA_CAPTION");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_ZONE_BUTTON, "WID_TA_ZONE_BUTTON");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_RATING_INFO, "WID_TA_RATING_INFO");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_COMMAND_LIST, "WID_TA_COMMAND_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_SCROLLBAR, "WID_TA_SCROLLBAR");

@ -25,6 +25,7 @@
#include "../script_instance.hpp"
#include "../script_fatalerror.hpp"
#include "script_error.hpp"
#include "../../debug.h"
#include "../../safeguards.h"
@ -85,6 +86,27 @@ ScriptObject::ActiveInstance::~ActiveInstance()
return GetStorage()->mode_instance;
}
/* static */ void ScriptObject::SetLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
ScriptStorage *s = GetStorage();
DEBUG(script, 6, "SetLastCommand company=%02d tile=%06x p1=%08x p2=%08x cmd=%d", s->root_company, tile, p1, p2, cmd);
s->last_tile = tile;
s->last_p1 = p1;
s->last_p2 = p2;
s->last_cmd = cmd & CMD_ID_MASK;
}
/* static */ bool ScriptObject::CheckLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
ScriptStorage *s = GetStorage();
DEBUG(script, 6, "CheckLastCommand company=%02d tile=%06x p1=%08x p2=%08x cmd=%d", s->root_company, tile, p1, p2, cmd);
if (s->last_tile != tile) return false;
if (s->last_p1 != p1) return false;
if (s->last_p2 != p2) return false;
if (s->last_cmd != (cmd & CMD_ID_MASK)) return false;
return true;
}
/* static */ void ScriptObject::SetDoCommandCosts(Money value)
{
GetStorage()->costs = CommandCost(value);
@ -309,6 +331,9 @@ ScriptObject::ActiveInstance::~ActiveInstance()
SCOPE_INFO_FMT([=], "ScriptObject::DoCommand: tile: %X (%d x %d), p1: 0x%X, p2: 0x%X, company: %s, cmd: 0x%X (%s), estimate_only: %d",
tile, TileX(tile), TileY(tile), p1, p2, scope_dumper().CompanyInfo(_current_company), cmd, GetCommandName(cmd), estimate_only);
/* Store the command for command callback validation. */
if (!estimate_only && _networking && !_generating_world) SetLastCommand(tile, p1, p2, cmd);
/* Try to perform the command. */
CommandCost res = ::DoCommandPScript(tile, p1, p2, cmd, (_networking && !_generating_world) ? ScriptObject::GetActiveInstance()->GetDoCommandCallback() : nullptr, text, false, estimate_only, 0);

@ -73,6 +73,16 @@ protected:
*/
static bool DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const char *text = nullptr, Script_SuspendCallbackProc *callback = nullptr);
/**
* Store the latest command executed by the script.
*/
static void SetLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd);
/**
* Check if it's the latest command executed by the script.
*/
static bool CheckLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd);
/**
* Sets the DoCommand costs counter to a value.
*/

@ -262,7 +262,6 @@
/* static */ bool ScriptTile::DemolishTile(TileIndex tile)
{
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
EnforcePrecondition(false, ::IsValidTile(tile));
return ScriptObject::DoCommand(tile, 0, 0, CMD_LANDSCAPE_CLEAR);

@ -445,7 +445,6 @@ public:
* Destroy everything on the given tile.
* @param tile The tile to demolish.
* @pre ScriptMap::IsValidTile(tile).
* @game @pre Valid ScriptCompanyMode active in scope.
* @exception ScriptError::ERR_AREA_NOT_CLEAR
* @return True if and only if the tile was demolished.
*/

@ -680,10 +680,15 @@ SQInteger ScriptInstance::GetOpsTillSuspend()
return this->engine->GetOpsTillSuspend();
}
void ScriptInstance::DoCommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
bool ScriptInstance::DoCommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
ScriptObject::ActiveInstance active(this);
if (!ScriptObject::CheckLastCommand(tile, p1, p2, cmd)) {
DEBUG(script, 1, "DoCommandCallback terminating a script, last command does not match expected command");
return false;
}
ScriptObject::SetLastCommandRes(result.Succeeded());
if (result.Failed()) {
@ -692,6 +697,10 @@ void ScriptInstance::DoCommandCallback(const CommandCost &result, TileIndex tile
ScriptObject::IncreaseDoCommandCosts(result.GetCost());
ScriptObject::SetLastCost(result.GetCost());
}
ScriptObject::SetLastCommand(INVALID_TILE, 0, 0, CMD_END);
return true;
}
void ScriptInstance::InsertEvent(class ScriptEvent *event)

@ -182,8 +182,10 @@ public:
* @param tile The tile on which the command was executed.
* @param p1 p1 as given to DoCommandPInternal.
* @param p2 p2 as given to DoCommandPInternal.
* @param cmd cmd as given to DoCommandPInternal.
* @return true if we handled result.
*/
void DoCommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2);
bool DoCommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd);
/**
* Insert an event for this script.

@ -46,6 +46,11 @@ private:
uint last_error; ///< The last error of the command.
bool last_command_res; ///< The last result of the command.
TileIndex last_tile; ///< The last tile passed to a command.
uint32 last_p1; ///< The last p1 passed to a command.
uint32 last_p2; ///< The last p2 passed to a command.
uint32 last_cmd; ///< The last cmd passed to a command.
VehicleID new_vehicle_id; ///< The ID of the new Vehicle.
SignID new_sign_id; ///< The ID of the new Sign.
GroupID new_group_id; ///< The ID of the new Group.
@ -73,6 +78,10 @@ public:
last_cost (0),
last_error (STR_NULL),
last_command_res (true),
last_tile (INVALID_TILE),
last_p1 (0),
last_p2 (0),
last_cmd (CMD_END),
new_vehicle_id (0),
new_sign_id (0),
new_group_id (0),

@ -117,8 +117,9 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
* @param tile unused
* @param p1 unused
* @param p2 unused
* @param cmd unused
*/
void CcPlaceSign(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaceSign(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -1058,8 +1058,8 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags
if (RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return_cmd_error(STR_ERROR_NO_SUITABLE_ROAD);
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) {
CommandCost ret = CheckOwnership(road_owner, cur_tile);
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE && road_owner != OWNER_TOWN) {
CommandCost ret = CheckOwnership(road_owner);
if (ret.Failed()) return ret;
}

@ -571,7 +571,7 @@ void ShowTemplateCreateWindow(TemplateVehicle *to_edit, bool *create_window_open
new TemplateCreateWindow(&_template_create_window_desc, to_edit, create_window_open);
}
void CcSetVirtualTrain(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcSetVirtualTrain(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -583,7 +583,7 @@ void CcSetVirtualTrain(const CommandCost &result, TileIndex tile, uint32 p1, uin
}
}
void CcVirtualTrainWagonsMoved(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcVirtualTrainWagonsMoved(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -594,7 +594,7 @@ void CcVirtualTrainWagonsMoved(const CommandCost &result, TileIndex tile, uint32
}
}
void CcDeleteVirtualTrain(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcDeleteVirtualTrain(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -41,7 +41,7 @@
#include "safeguards.h"
void CcTerraform(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcTerraform(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) {
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);

@ -1051,7 +1051,7 @@ void ShowTownDirectory()
new TownDirectoryWindow(&_town_directory_desc);
}
void CcFoundTown(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcFoundTown(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -1059,7 +1059,7 @@ void CcFoundTown(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
void CcFoundRandomTown(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcFoundRandomTown(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded()) ScrollMainWindowToTile(Town::Get(_new_town_id)->xy);
}

@ -29,8 +29,9 @@ uint16 GetTrainVehicleMaxSpeed(const Train *u, const RailVehicleInfo *rvi_u, con
* @param tile The tile the command was executed on.
* @param p1 Additional data for the command (for the #CommandProc)
* @param p2 Additional data for the command (for the #CommandProc)
* @param cmd Unused.
*/
void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -3039,7 +3039,7 @@ static const uint32 _vehicle_command_translation_table[][4] = {
* @param p1 vehicle ID
* @param p2 unused
*/
void CcStartStopVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcStartStopVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
@ -3664,8 +3664,9 @@ void StopGlobalFollowVehicle(const Vehicle *v)
* @param tile unused
* @param p1 unused
* @param p2 unused
* @param cmd unused
*/
void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;

@ -271,6 +271,7 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i
- (BOOL)windowShouldClose:(id)sender;
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification;
@end

@ -1360,6 +1360,11 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count)
[ e release ];
}
}
/** The colour profile of the screen the window is on changed. */
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification
{
if (!driver->setup) driver->WindowResized();
}
@end

@ -106,35 +106,6 @@ public:
};
static CGColorSpaceRef QZ_GetCorrectColorSpace()
{
static CGColorSpaceRef colorSpace = nullptr;
if (colorSpace == nullptr) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (MacOSVersionIsAtLeast(10, 5, 0)) {
colorSpace = CGDisplayCopyColorSpace(CGMainDisplayID());
} else
#endif
{
#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !defined(HAVE_OSX_1011_SDK)
CMProfileRef sysProfile;
if (CMGetSystemProfile(&sysProfile) == noErr) {
colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysProfile);
CMCloseProfile(sysProfile);
}
#endif
}
if (colorSpace == nullptr) colorSpace = CGColorSpaceCreateDeviceRGB();
if (colorSpace == nullptr) error("Could not get system colour space. You might need to recalibrate your monitor.");
}
return colorSpace;
}
@implementation OTTD_QuartzView
- (void)setDriver:(WindowQuartzSubdriver*)drv
@ -596,20 +567,36 @@ bool WindowQuartzSubdriver::WindowResized()
this->window_width = (int)newframe.size.width;
this->window_height = (int)newframe.size.height;
/* Get screen colour space. */
CGColorSpaceRef color_space = NULL;
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if ([ this->window respondsToSelector:@selector(colorSpace) ]) {
color_space = [ [ this->window colorSpace ] CGColorSpace ];
CGColorSpaceRetain(color_space);
}
#endif
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (color_space == NULL && MacOSVersionIsAtLeast(10, 5, 0)) color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
#endif
if (color_space == NULL) color_space = CGColorSpaceCreateDeviceRGB();
if (color_space == NULL) error("Could not get system colour space. You might need to recalibrate your monitor.");
/* Create Core Graphics Context */
free(this->window_buffer);
this->window_buffer = (uint32*)malloc(this->window_width * this->window_height * 4);
CGContextRelease(this->cgcontext);
this->cgcontext = CGBitmapContextCreate(
this->window_buffer, // data
this->window_buffer, // data
this->window_width, // width
this->window_height, // height
8, // bits per component
this->window_width * 4, // bytes per row
QZ_GetCorrectColorSpace(), // color space
color_space, // color space
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host
);
CGColorSpaceRelease(color_space);
assert(this->cgcontext != nullptr);
CGContextSetShouldAntialias(this->cgcontext, FALSE);

@ -2494,7 +2494,7 @@ void NWidgetLeaf::Draw(const Window *w)
case WWT_RESIZEBOX:
assert(this->widget_data == 0);
DrawResizeBox(r, this->colour, this->pos_x < (uint)(w->width / 2), !!(w->flags & WF_SIZING));
DrawResizeBox(r, this->colour, this->pos_x < (w->width / 2), !!(w->flags & WF_SIZING));
break;
case WWT_CLOSEBOX:

@ -174,8 +174,8 @@ public:
uint current_x; ///< Current horizontal size (after resizing).
uint current_y; ///< Current vertical size (after resizing).
uint pos_x; ///< Horizontal position of top-left corner of the widget in the window.
uint pos_y; ///< Vertical position of top-left corner of the widget in the window.
int pos_x; ///< Horizontal position of top-left corner of the widget in the window.
int pos_y; ///< Vertical position of top-left corner of the widget in the window.
NWidgetBase *next; ///< Pointer to next widget in container. Managed by parent container widget.
NWidgetBase *prev; ///< Pointer to previous widget in container. Managed by parent container widget.

Loading…
Cancel
Save