mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
16 Commits
497d18d987
...
9429a1d7e8
Author | SHA1 | Date |
---|---|---|
|
9429a1d7e8 | |
|
1199ddb417 | |
|
bb536d37e6 | |
|
a8650c6b06 | |
|
7bb4940ebd | |
|
b8e56cd05d | |
|
df5237e721 | |
|
03f5f7145f | |
|
0dc40877fd | |
|
03672ed8eb | |
|
1b01a0636c | |
|
bccbd64037 | |
|
434163aa31 | |
|
55605ae8f2 | |
|
7f792e9c5f | |
|
6b6caa6fa8 |
|
@ -36,3 +36,11 @@ AITown.FoundTown <- function(tile, size, city, layout, name) { return AITown.Fou
|
||||||
|
|
||||||
AIVehicle.SetNameCompat14 <- AIVehicle.SetName;
|
AIVehicle.SetNameCompat14 <- AIVehicle.SetName;
|
||||||
AIVehicle.SetName <- function(id, name) { return AIVehicle.SetNameCompat14(id, AICompat14.Text(name)); }
|
AIVehicle.SetName <- function(id, name) { return AIVehicle.SetNameCompat14(id, AICompat14.Text(name)); }
|
||||||
|
|
||||||
|
AIObject.constructorCompat14 <- AIObject.constructor;
|
||||||
|
foreach(name, object in CompatScriptRootTable) {
|
||||||
|
if (type(object) != "class") continue;
|
||||||
|
if (!object.rawin("constructor")) continue;
|
||||||
|
if (object.constructor != AIObject.constructorCompat14) continue;
|
||||||
|
object.constructor <- function() : (name) { AILog.Error("'" + name + "' is not instantiable"); }
|
||||||
|
}
|
||||||
|
|
|
@ -81,3 +81,11 @@ GSTown.FoundTown <- function(tile, size, city, layout, name) { return GSTown.Fou
|
||||||
|
|
||||||
GSVehicle.SetNameCompat14 <- GSVehicle.SetName;
|
GSVehicle.SetNameCompat14 <- GSVehicle.SetName;
|
||||||
GSVehicle.SetName <- function(id, name) { return GSVehicle.SetNameCompat14(id, GSCompat14.Text(name)); }
|
GSVehicle.SetName <- function(id, name) { return GSVehicle.SetNameCompat14(id, GSCompat14.Text(name)); }
|
||||||
|
|
||||||
|
GSObject.constructorCompat14 <- GSObject.constructor;
|
||||||
|
foreach(name, object in CompatScriptRootTable) {
|
||||||
|
if (type(object) != "class") continue;
|
||||||
|
if (!object.rawin("constructor")) continue;
|
||||||
|
if (object.constructor != GSObject.constructorCompat14) continue;
|
||||||
|
object.constructor <- function() : (name) { GSLog.Error("'" + name + "' is not instantiable"); }
|
||||||
|
}
|
||||||
|
|
|
@ -453,6 +453,7 @@ add_files(
|
||||||
spritecache.cpp
|
spritecache.cpp
|
||||||
spritecache.h
|
spritecache.h
|
||||||
spritecache_internal.h
|
spritecache_internal.h
|
||||||
|
spritecache_type.h
|
||||||
station.cpp
|
station.cpp
|
||||||
station_base.h
|
station_base.h
|
||||||
station_cmd.cpp
|
station_cmd.cpp
|
||||||
|
|
|
@ -83,7 +83,7 @@ void AIInstance::Died()
|
||||||
|
|
||||||
void AIInstance::LoadDummyScript()
|
void AIInstance::LoadDummyScript()
|
||||||
{
|
{
|
||||||
ScriptAllocatorScope alloc_scope(this->engine);
|
ScriptAllocatorScope alloc_scope(this->engine.get());
|
||||||
Script_CreateDummy(this->engine->GetVM(), STR_ERROR_AI_NO_AI_FOUND, "AI");
|
Script_CreateDummy(this->engine->GetVM(), STR_ERROR_AI_NO_AI_FOUND, "AI");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1125,6 +1125,15 @@ static bool AircraftController(Aircraft *v)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amd.flags.Test(AirportMovingDataFlag::Land)) {
|
if (amd.flags.Test(AirportMovingDataFlag::Land)) {
|
||||||
|
if (st->airport.blocks.Test(AirportBlock::Zeppeliner)) {
|
||||||
|
/* Zeppeliner blocked the runway, abort landing */
|
||||||
|
v->state = FLYING;
|
||||||
|
UpdateAircraftCache(v);
|
||||||
|
SetAircraftPosition(v, gp.x, gp.y, GetAircraftFlightLevel(v));
|
||||||
|
v->pos = v->previous_pos;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (st->airport.tile == INVALID_TILE) {
|
if (st->airport.tile == INVALID_TILE) {
|
||||||
/* Airport has been removed, abort the landing procedure */
|
/* Airport has been removed, abort the landing procedure */
|
||||||
v->state = FLYING;
|
v->state = FLYING;
|
||||||
|
@ -1782,6 +1791,11 @@ static void AirportClearBlock(const Aircraft *v, const AirportFTAClass *apc)
|
||||||
if (apc->layout[v->previous_pos].blocks != apc->layout[v->pos].blocks) {
|
if (apc->layout[v->previous_pos].blocks != apc->layout[v->pos].blocks) {
|
||||||
Station *st = Station::Get(v->targetairport);
|
Station *st = Station::Get(v->targetairport);
|
||||||
|
|
||||||
|
if (st->airport.blocks.Test(AirportBlock::Zeppeliner) &&
|
||||||
|
apc->layout[v->previous_pos].blocks == AirportBlock::RunwayIn) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
st->airport.blocks.Reset(apc->layout[v->previous_pos].blocks);
|
st->airport.blocks.Reset(apc->layout[v->previous_pos].blocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ enum class AirportBlock : uint8_t {
|
||||||
/* end of new blocks */
|
/* end of new blocks */
|
||||||
|
|
||||||
Nothing = 30,
|
Nothing = 30,
|
||||||
|
Zeppeliner = 62, ///< Block for the zeppeliner disaster vehicle.
|
||||||
AirportClosed = 63, ///< Dummy block for indicating a closed airport.
|
AirportClosed = 63, ///< Dummy block for indicating a closed airport.
|
||||||
};
|
};
|
||||||
using AirportBlocks = EnumBitSet<AirportBlock, uint64_t>;
|
using AirportBlocks = EnumBitSet<AirportBlock, uint64_t>;
|
||||||
|
|
|
@ -141,6 +141,8 @@ void SetLocalCompany(CompanyID new_company)
|
||||||
MarkWholeScreenDirty();
|
MarkWholeScreenDirty();
|
||||||
InvalidateWindowClassesData(WC_SIGN_LIST, -1);
|
InvalidateWindowClassesData(WC_SIGN_LIST, -1);
|
||||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||||
|
InvalidateWindowClassesData(WC_COMPANY_COLOUR, -1);
|
||||||
|
ResetVehicleColourMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -215,7 +215,7 @@ void DisasterVehicle::UpdatePosition(int x, int y, int z)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zeppeliner handling, v->state states:
|
* Zeppeliner handling, v->state states:
|
||||||
* 0: Zeppeliner initialization has found a small airport, go there and crash
|
* 0: Zeppeliner initialization has found an airport, go there and crash
|
||||||
* 1: Create crash and animate falling down for extra dramatic effect
|
* 1: Create crash and animate falling down for extra dramatic effect
|
||||||
* 2: Create more smoke and leave debris on ground
|
* 2: Create more smoke and leave debris on ground
|
||||||
* 2: Clear the runway after some time and remove crashed zeppeliner
|
* 2: Clear the runway after some time and remove crashed zeppeliner
|
||||||
|
@ -263,7 +263,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v)
|
||||||
|
|
||||||
if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
|
if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
|
||||||
Station *st = Station::GetByTile(v->tile);
|
Station *st = Station::GetByTile(v->tile);
|
||||||
st->airport.blocks.Reset(AirportBlock::RunwayIn);
|
st->airport.blocks.Reset({AirportBlock::Zeppeliner, AirportBlock::RunwayIn});
|
||||||
AI::NewEvent(GetTileOwner(v->tile), new ScriptEventDisasterZeppelinerCleared(st->index));
|
AI::NewEvent(GetTileOwner(v->tile), new ScriptEventDisasterZeppelinerCleared(st->index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
|
if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
|
||||||
Station::GetByTile(v->tile)->airport.blocks.Set(AirportBlock::RunwayIn);
|
Station::GetByTile(v->tile)->airport.blocks.Reset({AirportBlock::Zeppeliner, AirportBlock::RunwayIn});
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -722,14 +722,14 @@ typedef void DisasterInitProc();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zeppeliner which crashes on a small airport if one found,
|
* Zeppeliner which crashes on an airport if one found,
|
||||||
* otherwise crashes on a random tile
|
* otherwise crashes on a random tile
|
||||||
*/
|
*/
|
||||||
static void Disaster_Zeppeliner_Init()
|
static void Disaster_Zeppeliner_Init()
|
||||||
{
|
{
|
||||||
if (!Vehicle::CanAllocateItem(2)) return;
|
if (!Vehicle::CanAllocateItem(2)) return;
|
||||||
|
|
||||||
/* Pick a random place, unless we find a small airport */
|
/* Pick a random place, unless we find an airport */
|
||||||
int x = TileX(RandomTile()) * TILE_SIZE + TILE_SIZE / 2;
|
int x = TileX(RandomTile()) * TILE_SIZE + TILE_SIZE / 2;
|
||||||
|
|
||||||
for (const Station *st : Station::Iterate()) {
|
for (const Station *st : Station::Iterate()) {
|
||||||
|
|
|
@ -84,7 +84,7 @@ struct EnginePreviewWindow : Window {
|
||||||
|
|
||||||
/* Get size of engine sprite, on loan from depot_gui.cpp */
|
/* Get size of engine sprite, on loan from depot_gui.cpp */
|
||||||
EngineID engine = static_cast<EngineID>(this->window_number);
|
EngineID engine = static_cast<EngineID>(this->window_number);
|
||||||
EngineImageType image_type = EIT_PURCHASE;
|
EngineImageType image_type = EIT_PREVIEW;
|
||||||
uint x, y;
|
uint x, y;
|
||||||
int x_offs, y_offs;
|
int x_offs, y_offs;
|
||||||
|
|
||||||
|
|
16
src/gfx.cpp
16
src/gfx.cpp
|
@ -580,7 +580,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||||
|
|
||||||
const uint shadow_offset = ScaleGUITrad(1);
|
const uint shadow_offset = ScaleGUITrad(1);
|
||||||
|
|
||||||
auto draw_line = [&](const ParagraphLayouter::Line &line, bool do_shadow, int left, int min_x, int max_x, bool truncation) {
|
auto draw_line = [&](const ParagraphLayouter::Line &line, bool do_shadow, int left, int min_x, int max_x, bool truncation, TextColour &last_colour) {
|
||||||
const DrawPixelInfo *dpi = _cur_dpi;
|
const DrawPixelInfo *dpi = _cur_dpi;
|
||||||
int dpi_left = dpi->left;
|
int dpi_left = dpi->left;
|
||||||
int dpi_right = dpi->left + dpi->width - 1;
|
int dpi_right = dpi->left + dpi->width - 1;
|
||||||
|
@ -593,10 +593,15 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||||
|
|
||||||
FontCache *fc = f->fc;
|
FontCache *fc = f->fc;
|
||||||
TextColour colour = f->colour;
|
TextColour colour = f->colour;
|
||||||
if (colour == TC_INVALID || HasFlag(default_colour, TC_FORCED)) colour = default_colour;
|
if (colour == TC_INVALID || HasFlag(last_colour, TC_FORCED)) {
|
||||||
|
colour = last_colour;
|
||||||
|
} else {
|
||||||
|
/* Update the last colour for the truncation ellipsis. */
|
||||||
|
last_colour = colour;
|
||||||
|
}
|
||||||
bool colour_has_shadow = (colour & TC_NO_SHADE) == 0 && colour != TC_BLACK;
|
bool colour_has_shadow = (colour & TC_NO_SHADE) == 0 && colour != TC_BLACK;
|
||||||
SetColourRemap(do_shadow ? TC_BLACK : colour); // the last run also sets the colour for the truncation dots
|
|
||||||
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
|
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
|
||||||
|
SetColourRemap(do_shadow ? TC_BLACK : colour);
|
||||||
|
|
||||||
for (int i = 0; i < run.GetGlyphCount(); i++) {
|
for (int i = 0; i < run.GetGlyphCount(); i++) {
|
||||||
GlyphID glyph = glyphs[i];
|
GlyphID glyph = glyphs[i];
|
||||||
|
@ -624,11 +629,12 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||||
|
|
||||||
/* Draw shadow, then foreground */
|
/* Draw shadow, then foreground */
|
||||||
for (bool do_shadow : {true, false}) {
|
for (bool do_shadow : {true, false}) {
|
||||||
draw_line(line, do_shadow, left - offset_x, min_x, max_x, truncation);
|
TextColour last_colour = default_colour;
|
||||||
|
draw_line(line, do_shadow, left - offset_x, min_x, max_x, truncation, last_colour);
|
||||||
|
|
||||||
if (truncation) {
|
if (truncation) {
|
||||||
int x = (_current_text_dir == TD_RTL) ? left : (right - truncation_width);
|
int x = (_current_text_dir == TD_RTL) ? left : (right - truncation_width);
|
||||||
draw_line(*truncation_layout->front(), do_shadow, x, INT32_MIN, INT32_MAX, false);
|
draw_line(*truncation_layout->front(), do_shadow, x, INT32_MIN, INT32_MAX, false, last_colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5002,6 +5002,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}O terren
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreno inclinado na direção errada
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreno inclinado na direção errada
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Não é possível fazer isto...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Não é possível fazer isto...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}A construção precisa ser demolida primeiro
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}A construção precisa ser demolida primeiro
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... construção é protegida
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Não é possível limpar esta área...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Não é possível limpar esta área...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... local não adequado
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... local não adequado
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... já construído
|
STR_ERROR_ALREADY_BUILT :{WHITE}... já construído
|
||||||
|
|
|
@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}any{
|
||||||
STR_UNITS_PERIODS :{NUM}{NBSP}període{P "" s}
|
STR_UNITS_PERIODS :{NUM}{NBSP}període{P "" s}
|
||||||
|
|
||||||
STR_LIST_SEPARATOR :,{SPACE}
|
STR_LIST_SEPARATOR :,{SPACE}
|
||||||
|
STR_TRUNCATION_ELLIPSIS :...
|
||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Filtre:
|
STR_LIST_FILTER_TITLE :{BLACK}Filtre:
|
||||||
|
@ -286,7 +287,7 @@ STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Tanca la
|
||||||
STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Títol de la finestra: arrossegueu el títol per desplaçar la finestra.
|
STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Títol de la finestra: arrossegueu el títol per desplaçar la finestra.
|
||||||
STR_TOOLTIP_SHADE :{BLACK}Ombra de la finestra: mostra només la barra de títol.
|
STR_TOOLTIP_SHADE :{BLACK}Ombra de la finestra: mostra només la barra de títol.
|
||||||
STR_TOOLTIP_DEBUG :{BLACK}Mostra la informació de depuració NewGRF
|
STR_TOOLTIP_DEBUG :{BLACK}Mostra la informació de depuració NewGRF
|
||||||
STR_TOOLTIP_DEFSIZE :{BLACK}Redimensiona la finestra a la mida predeterminada. Ctrl+Clic desa la mida actual com a predeterminada.
|
STR_TOOLTIP_DEFSIZE :{BLACK}Redimensiona la finestra a la mida predeterminada. Amb Ctrl+Clic, es desa la mida actual com a predeterminada. Amb Ctrl+doble clic, es restableix als valors per defecte.
|
||||||
STR_TOOLTIP_STICKY :{BLACK}Marca aquesta finestra com a no eliminable per la tecla «Tanca totes les finestres». Ctrl+Clic per desar també l'estat predeterminat.
|
STR_TOOLTIP_STICKY :{BLACK}Marca aquesta finestra com a no eliminable per la tecla «Tanca totes les finestres». Ctrl+Clic per desar també l'estat predeterminat.
|
||||||
STR_TOOLTIP_RESIZE :{BLACK}Clica i arrossega per redimensionar aquesta finestra
|
STR_TOOLTIP_RESIZE :{BLACK}Clica i arrossega per redimensionar aquesta finestra
|
||||||
STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Commuta entre la mida gran i petita de la finestra
|
STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Commuta entre la mida gran i petita de la finestra
|
||||||
|
@ -1108,7 +1109,7 @@ STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :Informació add
|
||||||
STR_GAME_OPTIONS_ONLINE_CONTENT :Descarrega contingut
|
STR_GAME_OPTIONS_ONLINE_CONTENT :Descarrega contingut
|
||||||
STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Comprova si hi ha continguts nous o actualitzats per a descarregar.
|
STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Comprova si hi ha continguts nous o actualitzats per a descarregar.
|
||||||
|
|
||||||
STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(no s'han instal·lat complements per a interactuar amb plataformes socials)
|
STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :(no s'han instal·lat complements per a interactuar amb plataformes socials)
|
||||||
|
|
||||||
STR_GAME_OPTIONS_SOCIAL_PLUGIN_TITLE :{STRING} ({STRING})
|
STR_GAME_OPTIONS_SOCIAL_PLUGIN_TITLE :{STRING} ({STRING})
|
||||||
STR_GAME_OPTIONS_SOCIAL_PLUGIN_PLATFORM :Plataforma:
|
STR_GAME_OPTIONS_SOCIAL_PLUGIN_PLATFORM :Plataforma:
|
||||||
|
@ -1226,7 +1227,7 @@ STR_CITY_APPROVAL_PERMISSIVE :Permissiva (les
|
||||||
STR_WARNING_NO_SUITABLE_AI :{WHITE}No hi ha cap IA disponible...{}Podeu descarregar-ne a través del «Contingut en línia».
|
STR_WARNING_NO_SUITABLE_AI :{WHITE}No hi ha cap IA disponible...{}Podeu descarregar-ne a través del «Contingut en línia».
|
||||||
|
|
||||||
# Settings tree in the Game Options window
|
# Settings tree in the Game Options window
|
||||||
STR_CONFIG_SETTING_FILTER_TITLE :{G=Masculin}{BLACK}Filtre:
|
STR_CONFIG_SETTING_FILTER_TITLE :{G=Masculin}Filtre:
|
||||||
STR_CONFIG_SETTING_EXPAND_ALL :Desplega-ho tot
|
STR_CONFIG_SETTING_EXPAND_ALL :Desplega-ho tot
|
||||||
STR_CONFIG_SETTING_COLLAPSE_ALL :Plega-ho tot
|
STR_CONFIG_SETTING_COLLAPSE_ALL :Plega-ho tot
|
||||||
STR_CONFIG_SETTING_RESET_ALL :Restableix tots els valors
|
STR_CONFIG_SETTING_RESET_ALL :Restableix tots els valors
|
||||||
|
@ -1302,6 +1303,9 @@ STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :Tipus d'interè
|
||||||
STR_CONFIG_SETTING_RUNNING_COSTS :Costos d'utilització: {STRING}
|
STR_CONFIG_SETTING_RUNNING_COSTS :Costos d'utilització: {STRING}
|
||||||
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Fixa el nivell de manteniment i els costos d'utilització dels vehicles i infraestructures
|
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Fixa el nivell de manteniment i els costos d'utilització dels vehicles i infraestructures
|
||||||
###length 3
|
###length 3
|
||||||
|
STR_CONFIG_SETTING_RUNNING_COSTS_LOW :Baix
|
||||||
|
STR_CONFIG_SETTING_RUNNING_COSTS_MEDIUM :Mitjà
|
||||||
|
STR_CONFIG_SETTING_RUNNING_COSTS_HIGH :Alt
|
||||||
|
|
||||||
STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Ritme de construcció: {STRING}
|
STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Ritme de construcció: {STRING}
|
||||||
STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Limita la quantitat d'accions de construcció per part de les IA
|
STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Limita la quantitat d'accions de construcció per part de les IA
|
||||||
|
@ -1324,6 +1328,9 @@ STR_CONFIG_SETTING_SUBSIDY_DURATION_DISABLED :Sense subsidis
|
||||||
STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Costos de construcció: {STRING}
|
STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Costos de construcció: {STRING}
|
||||||
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Fixa el nivell de construcció i els preus de compra
|
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Fixa el nivell de construcció i els preus de compra
|
||||||
###length 3
|
###length 3
|
||||||
|
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_LOW :Baix
|
||||||
|
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_MEDIUM :Mitjà
|
||||||
|
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HIGH :Alt
|
||||||
|
|
||||||
STR_CONFIG_SETTING_RECESSIONS :Recessions: {STRING}
|
STR_CONFIG_SETTING_RECESSIONS :Recessions: {STRING}
|
||||||
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Si està activat, poden haver recessions periòdicament. Durant una recessió, tota la producció és significativament més baixa, tornant al nivell previ quan s'acabi el període de recessió.
|
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Si està activat, poden haver recessions periòdicament. Durant una recessió, tota la producció és significativament més baixa, tornant al nivell previ quan s'acabi el període de recessió.
|
||||||
|
@ -2079,9 +2086,9 @@ STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :La classe de c
|
||||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Mode de distribució per altres classes de càrrega: {STRING}
|
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Mode de distribució per altres classes de càrrega: {STRING}
|
||||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimètric" vol dir que quantitats arbitràries de càrrega poden ser enviades en qualsevol sentit. "Manual" significa que no s'aplicarà cap distribució automàtica a aquestes càrregues.
|
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimètric" vol dir que quantitats arbitràries de càrrega poden ser enviades en qualsevol sentit. "Manual" significa que no s'aplicarà cap distribució automàtica a aquestes càrregues.
|
||||||
###length 3
|
###length 3
|
||||||
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual
|
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :Manual
|
||||||
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimètric
|
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :Asimètric
|
||||||
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :simètric
|
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :Simètric
|
||||||
|
|
||||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Precisió de la distribució: {STRING}
|
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Precisió de la distribució: {STRING}
|
||||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Com més alt el valor indicat, més temps de processador requerirà el càlcul del graf de distribució. Si requereix massa temps podeu notar ralentització. Si indiqueu un valor baix, però, la distribució serà poc acurada, i us podeu trobar que la càrrega no és enviada als llocs que espereu.
|
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Com més alt el valor indicat, més temps de processador requerirà el càlcul del graf de distribució. Si requereix massa temps podeu notar ralentització. Si indiqueu un valor baix, però, la distribució serà poc acurada, i us podeu trobar que la càrrega no és enviada als llocs que espereu.
|
||||||
|
@ -2331,16 +2338,19 @@ STR_FACE_SIMPLE_TOOLTIP :{BLACK}Selecci
|
||||||
STR_FACE_LOAD :{BLACK}Carrega
|
STR_FACE_LOAD :{BLACK}Carrega
|
||||||
STR_FACE_LOAD_TOOLTIP :{BLACK}Carrega la cara preferida
|
STR_FACE_LOAD_TOOLTIP :{BLACK}Carrega la cara preferida
|
||||||
STR_FACE_LOAD_DONE :{WHITE}S'ha carregat la cara personalitzada des de l'arxiu de configuració de l'OpenTTD.
|
STR_FACE_LOAD_DONE :{WHITE}S'ha carregat la cara personalitzada des de l'arxiu de configuració de l'OpenTTD.
|
||||||
STR_FACE_FACECODE :{BLACK}Número de la cara
|
STR_FACE_FACECODE :{BLACK}Codi de la cara
|
||||||
STR_FACE_FACECODE_TOOLTIP :{BLACK}Veure i/o assigna el número de la cara del president
|
STR_FACE_FACECODE_TOOLTIP :{BLACK}Veure i/o assigna el codi de la cara del president
|
||||||
STR_FACE_FACECODE_CAPTION :{WHITE}Veure i/o assigna el número de la cara del president
|
STR_FACE_FACECODE_CAPTION :{WHITE}Veure i/o assigna el codi de la cara del president
|
||||||
STR_FACE_FACECODE_SET :{WHITE}El número de la nova cara ha estat assignat
|
STR_FACE_FACECODE_SET :{WHITE}S'ha assignat el codi de la nova cara del president.
|
||||||
STR_FACE_FACECODE_ERR :{WHITE}No s'ha pogut assignar el número de cara del president - ha de ser un nombre entre 0 i 4,294,967,295!
|
STR_FACE_FACECODE_ERR :{WHITE}No s'ha pogut assignar el codi de cara del president - ha de ser una etiqueta i nombre vàlids.
|
||||||
STR_FACE_SAVE :{BLACK}Desa
|
STR_FACE_SAVE :{BLACK}Desa
|
||||||
STR_FACE_SAVE_TOOLTIP :{BLACK}Desa la cara preferida
|
STR_FACE_SAVE_TOOLTIP :{BLACK}Desa la cara preferida
|
||||||
STR_FACE_SAVE_DONE :{WHITE}Es desarà aquesta cara personalitzada a l'arxiu de configuració de l'OpenTTD.
|
STR_FACE_SAVE_DONE :{WHITE}Es desarà aquesta cara personalitzada a l'arxiu de configuració de l'OpenTTD.
|
||||||
|
STR_FACE_SETTING_TOGGLE :{STRING} {ORANGE}{STRING}
|
||||||
|
STR_FACE_SETTING_NUMERIC :{STRING} {ORANGE}{NUM} / {NUM}
|
||||||
STR_FACE_YES :Sí
|
STR_FACE_YES :Sí
|
||||||
STR_FACE_NO :No
|
STR_FACE_NO :No
|
||||||
|
STR_FACE_STYLE :Estil:
|
||||||
STR_FACE_HAIR :Cabell:
|
STR_FACE_HAIR :Cabell:
|
||||||
STR_FACE_EYEBROWS :Celles:
|
STR_FACE_EYEBROWS :Celles:
|
||||||
STR_FACE_EYECOLOUR :Color dels ulls:
|
STR_FACE_EYECOLOUR :Color dels ulls:
|
||||||
|
@ -2813,6 +2823,10 @@ STR_PICKER_MODE_USED_TOOLTIP :Commuta entre m
|
||||||
STR_PICKER_MODE_SAVED :Desats
|
STR_PICKER_MODE_SAVED :Desats
|
||||||
STR_PICKER_MODE_SAVED_TOOLTIP :Commuta entre mostrar tots o bé només els elements desats.
|
STR_PICKER_MODE_SAVED_TOOLTIP :Commuta entre mostrar tots o bé només els elements desats.
|
||||||
|
|
||||||
|
STR_PICKER_PREVIEW_SHRINK :‒
|
||||||
|
STR_PICKER_PREVIEW_SHRINK_TOOLTIP :Redueix l'alçària de les vistes prèvies. Amb Ctrl+clic, es redueix fins al mínim.
|
||||||
|
STR_PICKER_PREVIEW_EXPAND :+
|
||||||
|
STR_PICKER_PREVIEW_EXPAND_TOOLTIP :Augmenta l'alçària de les vistes prèvies. Amb Ctrl+clic, s'augmenta fins al màxim.
|
||||||
|
|
||||||
STR_PICKER_STATION_CLASS_TOOLTIP :Trieu quina classe d'estació voleu veure.
|
STR_PICKER_STATION_CLASS_TOOLTIP :Trieu quina classe d'estació voleu veure.
|
||||||
STR_PICKER_STATION_TYPE_TOOLTIP :Trieu quin tipus d'estació voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats.
|
STR_PICKER_STATION_TYPE_TOOLTIP :Trieu quin tipus d'estació voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats.
|
||||||
|
@ -3053,6 +3067,11 @@ STR_FOUND_TOWN_INITIAL_SIZE_TOOLTIP :{BLACK}Seleccio
|
||||||
STR_FOUND_TOWN_CITY :{BLACK}Ciutat
|
STR_FOUND_TOWN_CITY :{BLACK}Ciutat
|
||||||
STR_FOUND_TOWN_CITY_TOOLTIP :{BLACK}Les ciutats creixen més ràpid que els pobles{}Depenent de la configuració, són més grans quan es funden
|
STR_FOUND_TOWN_CITY_TOOLTIP :{BLACK}Les ciutats creixen més ràpid que els pobles{}Depenent de la configuració, són més grans quan es funden
|
||||||
|
|
||||||
|
STR_FOUND_TOWN_EXPAND_MODE :{YELLOW}Expansió de la població:
|
||||||
|
STR_FOUND_TOWN_EXPAND_BUILDINGS :Edificis
|
||||||
|
STR_FOUND_TOWN_EXPAND_BUILDINGS_TOOLTIP :Augmenta el nombre d'edificis de les poblacions.
|
||||||
|
STR_FOUND_TOWN_EXPAND_ROADS :Carreteres
|
||||||
|
STR_FOUND_TOWN_EXPAND_ROADS_TOOLTIP :Augmenta el nombre de carreteres de la població.
|
||||||
|
|
||||||
STR_FOUND_TOWN_ROAD_LAYOUT :{YELLOW}Disposició de les carreteres de la població:
|
STR_FOUND_TOWN_ROAD_LAYOUT :{YELLOW}Disposició de les carreteres de la població:
|
||||||
STR_FOUND_TOWN_SELECT_LAYOUT_TOOLTIP :{BLACK}Selecciona la disposició de les carreteres utilitzades per a aquesta població
|
STR_FOUND_TOWN_SELECT_LAYOUT_TOOLTIP :{BLACK}Selecciona la disposició de les carreteres utilitzades per a aquesta població
|
||||||
|
@ -3677,6 +3696,10 @@ STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Canvia e
|
||||||
|
|
||||||
STR_TOWN_VIEW_EXPAND_BUTTON :{BLACK}Eixampla
|
STR_TOWN_VIEW_EXPAND_BUTTON :{BLACK}Eixampla
|
||||||
STR_TOWN_VIEW_EXPAND_TOOLTIP :{BLACK}Incrementa la mida de la població
|
STR_TOWN_VIEW_EXPAND_TOOLTIP :{BLACK}Incrementa la mida de la població
|
||||||
|
STR_TOWN_VIEW_EXPAND_BUILDINGS_BUTTON :{BLACK}Expandeix els edificis
|
||||||
|
STR_TOWN_VIEW_EXPAND_BUILDINGS_TOOLTIP :{BLACK}Augmenta el nombre d'edificis de la població.
|
||||||
|
STR_TOWN_VIEW_EXPAND_ROADS_BUTTON :{BLACK}Expandeix les carreteres
|
||||||
|
STR_TOWN_VIEW_EXPAND_ROADS_TOOLTIP :{BLACK}Augmenta el nombre de carreteres de la població.
|
||||||
STR_TOWN_VIEW_DELETE_BUTTON :{BLACK}Esborra
|
STR_TOWN_VIEW_DELETE_BUTTON :{BLACK}Esborra
|
||||||
STR_TOWN_VIEW_DELETE_TOOLTIP :{BLACK}Esborra totalment aquesta població
|
STR_TOWN_VIEW_DELETE_TOOLTIP :{BLACK}Esborra totalment aquesta població
|
||||||
|
|
||||||
|
@ -4415,10 +4438,10 @@ STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Mostra l
|
||||||
STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Mostra les ordres de l'avió. Ctrl+Clic per mostrar l'horari de l'avió
|
STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Mostra les ordres de l'avió. Ctrl+Clic per mostrar l'horari de l'avió
|
||||||
|
|
||||||
###length VEHICLE_TYPES
|
###length VEHICLE_TYPES
|
||||||
STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del tren
|
STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del tren. Amb Ctrl+clic, es mostra el grup del tren.
|
||||||
STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del vehicle
|
STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del vehicle. Amb Ctrl+clic, es mostra el grup del vehicle.
|
||||||
STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del vaixell
|
STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls del vaixell. Amb Ctrl+clic, es mostra el grup del vaixell.
|
||||||
STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls de l'avió
|
STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Mostra els detalls de l'aeronau. Amb Ctrl+clic, es mostra el grup de l'aeronau.
|
||||||
|
|
||||||
###length VEHICLE_TYPES
|
###length VEHICLE_TYPES
|
||||||
STR_VEHICLE_VIEW_TRAIN_STATUS_START_STOP_TOOLTIP :{BLACK}Acció actual del tren - Feu clic per parar-lo o engegar-lo.
|
STR_VEHICLE_VIEW_TRAIN_STATUS_START_STOP_TOOLTIP :{BLACK}Acció actual del tren - Feu clic per parar-lo o engegar-lo.
|
||||||
|
@ -4742,14 +4765,15 @@ STR_TIMETABLE_TOOLTIP :{BLACK}Horari -
|
||||||
STR_TIMETABLE_NO_TRAVEL :Sense viatge
|
STR_TIMETABLE_NO_TRAVEL :Sense viatge
|
||||||
STR_TIMETABLE_NOT_TIMETABLEABLE :Viatge (automàtic; programat per la següent ordre manual)
|
STR_TIMETABLE_NOT_TIMETABLEABLE :Viatge (automàtic; programat per la següent ordre manual)
|
||||||
STR_TIMETABLE_TRAVEL_NOT_TIMETABLED :Viatge (fora d'horari)
|
STR_TIMETABLE_TRAVEL_NOT_TIMETABLED :Viatge (fora d'horari)
|
||||||
|
STR_TIMETABLE_TRAVEL_NOT_TIMETABLED_SPEED :Viatja (sense horari) com a molt a {VELOCITY}
|
||||||
STR_TIMETABLE_TRAVEL_FOR :Viatge a {STRING}
|
STR_TIMETABLE_TRAVEL_FOR :Viatge a {STRING}
|
||||||
STR_TIMETABLE_TRAVEL_FOR_SPEED :Viatja durant {STRING} com a molt a {VELOCITY}
|
STR_TIMETABLE_TRAVEL_FOR_SPEED :Viatja durant {STRING} com a molt a {VELOCITY}
|
||||||
STR_TIMETABLE_TRAVEL_FOR_ESTIMATED :Viatja (durant {STRING}, sense horari)
|
STR_TIMETABLE_TRAVEL_FOR_ESTIMATED :Viatja (durant {STRING}, sense horari)
|
||||||
STR_TIMETABLE_TRAVEL_FOR_SPEED_ESTIMATED :Viatja (durant {STRING}, sense horari) com a molt a {VELOCITY}
|
STR_TIMETABLE_TRAVEL_FOR_SPEED_ESTIMATED :Viatja (durant {STRING}, sense horari) com a molt a {VELOCITY}
|
||||||
STR_TIMETABLE_STAY_FOR_ESTIMATED :{SPACE}(quedar-s'hi durant {STRING}, sense horari)
|
STR_TIMETABLE_STAY_FOR_ESTIMATED :{SPACE}(quedar-s'hi durant {STRING}, sense horari)
|
||||||
STR_TIMETABLE_AND_TRAVEL_FOR_ESTIMATED :{SPACE}(viatja durant {STRING}, sense horari)
|
STR_TIMETABLE_AND_TRAVEL_FOR_ESTIMATED :{SPACE}(viatja durant {STRING}, sense horari)
|
||||||
STR_TIMETABLE_STAY_FOR :i estigues {STRING}
|
STR_TIMETABLE_STAY_FOR :{SPACE}i estigues {STRING}
|
||||||
STR_TIMETABLE_AND_TRAVEL_FOR :i viatge per {STRING}
|
STR_TIMETABLE_AND_TRAVEL_FOR :{SPACE}i viatja durant {STRING}
|
||||||
|
|
||||||
STR_TIMETABLE_APPROX_TIME :{BLACK}L'horari trigara aproximadament {STRING} a completar-se.
|
STR_TIMETABLE_APPROX_TIME :{BLACK}L'horari trigara aproximadament {STRING} a completar-se.
|
||||||
STR_TIMETABLE_TOTAL_TIME :{BLACK}L'horari tardarà {STRING} a complir-se
|
STR_TIMETABLE_TOTAL_TIME :{BLACK}L'horari tardarà {STRING} a complir-se
|
||||||
|
@ -4978,6 +5002,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Es neces
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreny inclinat en direcció incorrecta
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreny inclinat en direcció incorrecta
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Això no es pot fer...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Això no es pot fer...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}L'edifici s'ha d'enderrocar primer
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}L'edifici s'ha d'enderrocar primer
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... l'edifici està protegit
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}No es pot netejar aquesta àrea...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}No es pot netejar aquesta àrea...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... lloc inadequat
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... lloc inadequat
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... ja construït
|
STR_ERROR_ALREADY_BUILT :{WHITE}... ja construït
|
||||||
|
@ -5897,3 +5922,11 @@ STR_SHIP :{BLACK}{SHIP}
|
||||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||||
|
|
||||||
STR_BADGE_NAME_LIST :{STRING}: {GOLD}{STRING}
|
STR_BADGE_NAME_LIST :{STRING}: {GOLD}{STRING}
|
||||||
|
STR_BADGE_CONFIG_MENU_TOOLTIP :Obre la configuració d'insígnies
|
||||||
|
STR_BADGE_CONFIG_RESET :Restableix
|
||||||
|
STR_BADGE_CONFIG_ICONS :{WHITE}Icones d'insígnies
|
||||||
|
STR_BADGE_CONFIG_FILTERS :{WHITE}Filtres d'insígnies
|
||||||
|
STR_BADGE_CONFIG_PREVIEW :Imatge de previsualització
|
||||||
|
STR_BADGE_CONFIG_NAME :Nom
|
||||||
|
STR_BADGE_FILTER_ANY_LABEL :Qualsevol {STRING}
|
||||||
|
STR_BADGE_FILTER_IS_LABEL :{STRING} és {STRING}
|
||||||
|
|
|
@ -5001,6 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Flat lan
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Can't do this...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Can't do this...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Building must be demolished first
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Building must be demolished first
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... building is protected
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Can't clear this area...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Can't clear this area...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... site unsuitable
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... site unsuitable
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... already built
|
STR_ERROR_ALREADY_BUILT :{WHITE}... already built
|
||||||
|
|
|
@ -5001,6 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Tarvitaa
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Maa viettää väärään suuntaan.
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Maa viettää väärään suuntaan.
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Ei onnistu...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Ei onnistu...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Rakennus täytyy purkaa ensin.
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Rakennus täytyy purkaa ensin.
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}… rakennus on suojattu
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Aluetta ei voi tyhjentää...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Aluetta ei voi tyhjentää...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... maasto on sopimaton
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... maasto on sopimaton
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... se on jo rakennettu
|
STR_ERROR_ALREADY_BUILT :{WHITE}... se on jo rakennettu
|
||||||
|
|
|
@ -5102,6 +5102,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Απαι
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Το έδαφος έχει λάθος κλίση
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Το έδαφος έχει λάθος κλίση
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Αυτό δεν γίνεται...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Αυτό δεν γίνεται...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Το κτίριο πρέπει πρώτα να κατεδαφιστεί
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Το κτίριο πρέπει πρώτα να κατεδαφιστεί
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... το κτίριο προστατεύεται
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Είναι αδύνατο να καθαριστεί αυτή η περιοχή...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Είναι αδύνατο να καθαριστεί αυτή η περιοχή...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... ακατάλληλη περιοχή
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... ακατάλληλη περιοχή
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... ήδη κατασκευασμένο
|
STR_ERROR_ALREADY_BUILT :{WHITE}... ήδη κατασκευασμένο
|
||||||
|
|
|
@ -330,6 +330,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}év
|
||||||
STR_UNITS_PERIODS :{NUM}{NBSP}időszak
|
STR_UNITS_PERIODS :{NUM}{NBSP}időszak
|
||||||
|
|
||||||
STR_LIST_SEPARATOR :,{SPACE}
|
STR_LIST_SEPARATOR :,{SPACE}
|
||||||
|
STR_TRUNCATION_ELLIPSIS :...
|
||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Szűrő kifejezés:
|
STR_LIST_FILTER_TITLE :{BLACK}Szűrő kifejezés:
|
||||||
|
|
|
@ -5387,6 +5387,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Wymagany
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Teren pochylony w złym kierunku
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Teren pochylony w złym kierunku
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Nie można tego zrobić...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Nie można tego zrobić...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Należy najpierw zburzyć budynek
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Należy najpierw zburzyć budynek
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... budynek jest chroniony
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Nie można wyczyścić terenu...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Nie można wyczyścić terenu...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... nieodpowiednie miejsce
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... nieodpowiednie miejsce
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... już zbudowano
|
STR_ERROR_ALREADY_BUILT :{WHITE}... już zbudowano
|
||||||
|
|
|
@ -647,7 +647,7 @@ STR_GRAPH_KEY_COMPANY_SELECTION_TOOLTIP :{BLACK}Alternar
|
||||||
|
|
||||||
# Company league window
|
# Company league window
|
||||||
STR_COMPANY_LEAGUE_TABLE_CAPTION :{WHITE}Classificação de Empresas
|
STR_COMPANY_LEAGUE_TABLE_CAPTION :{WHITE}Classificação de Empresas
|
||||||
STR_COMPANY_LEAGUE_COMPANY_NAME :{ORANGE}{COMPANY} {BLACK}{COMPANY_NUM} '{STRING}'
|
STR_COMPANY_LEAGUE_COMPANY_NAME :{ORANGE}{COMPANY} {BLACK}{COMPANY_NUM} “{STRING}”
|
||||||
STR_COMPANY_LEAGUE_COMPANY_RANK :{YELLOW}#{NUM}
|
STR_COMPANY_LEAGUE_COMPANY_RANK :{YELLOW}#{NUM}
|
||||||
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER :Engenheiro
|
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER :Engenheiro
|
||||||
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER :Gestor de Tráfego
|
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER :Gestor de Tráfego
|
||||||
|
@ -3441,20 +3441,20 @@ STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT :{WHITE}Mudar al
|
||||||
STR_GENERATION_WORLD :{WHITE}A Gerar Mundo...
|
STR_GENERATION_WORLD :{WHITE}A Gerar Mundo...
|
||||||
STR_GENERATION_ABORT :{BLACK}Cancelar
|
STR_GENERATION_ABORT :{BLACK}Cancelar
|
||||||
STR_GENERATION_ABORT_CAPTION :{WHITE}Cancelar criação do mundo
|
STR_GENERATION_ABORT_CAPTION :{WHITE}Cancelar criação do mundo
|
||||||
STR_GENERATION_ABORT_MESSAGE :{YELLOW}Quer mesmo cancelar a criação?
|
STR_GENERATION_ABORT_MESSAGE :{YELLOW}Quer mesmo cancelar o processo de geração?
|
||||||
STR_GENERATION_PROGRESS :{WHITE}{NUM}% completo
|
STR_GENERATION_PROGRESS :{WHITE}{NUM}% completo
|
||||||
STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM}
|
STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM}
|
||||||
STR_GENERATION_WORLD_GENERATION :{BLACK}A gerar mundo
|
STR_GENERATION_WORLD_GENERATION :{BLACK}A gerar mundo
|
||||||
STR_GENERATION_LANDSCAPE_GENERATION :{BLACK}Geração de paisagem
|
STR_GENERATION_LANDSCAPE_GENERATION :{BLACK}A gerar paisagem
|
||||||
STR_GENERATION_RIVER_GENERATION :{BLACK}A gerar rios
|
STR_GENERATION_RIVER_GENERATION :{BLACK}A gerar rios
|
||||||
STR_GENERATION_CLEARING_TILES :{BLACK}A gerar zonas rochosas e montanhosas
|
STR_GENERATION_CLEARING_TILES :{BLACK}A gerar zonas rochosas e montanhosas
|
||||||
STR_GENERATION_TOWN_GENERATION :{BLACK}Geração de localidades
|
STR_GENERATION_TOWN_GENERATION :{BLACK}A gerar localidades
|
||||||
STR_GENERATION_INDUSTRY_GENERATION :{BLACK}Geração de indústrias
|
STR_GENERATION_INDUSTRY_GENERATION :{BLACK}A gerar indústrias
|
||||||
STR_GENERATION_OBJECT_GENERATION :{BLACK}Geração inamovível
|
STR_GENERATION_OBJECT_GENERATION :{BLACK}A gerar objetos
|
||||||
STR_GENERATION_TREE_GENERATION :{BLACK}A gerar árvores
|
STR_GENERATION_TREE_GENERATION :{BLACK}A gerar árvores
|
||||||
STR_GENERATION_SETTINGUP_GAME :{BLACK}Definindo jogo
|
STR_GENERATION_SETTINGUP_GAME :{BLACK}A configurar jogo
|
||||||
STR_GENERATION_PREPARING_TILELOOP :{BLACK}A preparar o terreno
|
STR_GENERATION_PREPARING_TILELOOP :{BLACK}A preparar o terreno
|
||||||
STR_GENERATION_PREPARING_SCRIPT :{BLACK}Script a correr
|
STR_GENERATION_PREPARING_SCRIPT :{BLACK}A correr script
|
||||||
STR_GENERATION_PREPARING_GAME :{BLACK}A preparar jogo
|
STR_GENERATION_PREPARING_GAME :{BLACK}A preparar jogo
|
||||||
|
|
||||||
STR_TOWN_DATA_ERROR_LOAD_FAILED :{WHITE}Falha ao carregar dados da localidade
|
STR_TOWN_DATA_ERROR_LOAD_FAILED :{WHITE}Falha ao carregar dados da localidade
|
||||||
|
@ -5002,6 +5002,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}É neces
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreno inclinado na direcção incorrecta
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreno inclinado na direcção incorrecta
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Não é possível fazer isto...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Não é possível fazer isto...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}O edifício deve ser demolido primeiro
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}O edifício deve ser demolido primeiro
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... o edifício está protegido
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Não é possível limpar esta área...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Não é possível limpar esta área...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... sítio inadequado
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... sítio inadequado
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... já está construído
|
STR_ERROR_ALREADY_BUILT :{WHITE}... já está construído
|
||||||
|
|
|
@ -5188,6 +5188,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Необ
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Неверный уклон земли
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Неверный уклон земли
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Это невозможно...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}Это невозможно...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Сначала снесите здания
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Сначала снесите здания
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... это здание защищено от изменений
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Невозможно расчистить данный участок...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Невозможно расчистить данный участок...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... неподходящее место
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... неподходящее место
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}... уже построено
|
STR_ERROR_ALREADY_BUILT :{WHITE}... уже построено
|
||||||
|
|
|
@ -5001,6 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}需要
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}土地倾斜的方向不对
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}土地倾斜的方向不对
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能这样做……
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能这样做……
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必须先摧毁建筑
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必须先摧毁建筑
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}……建筑物被保护
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}无法清除这个区域……
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}无法清除这个区域……
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}……地点不合适
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}……地点不合适
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}……已经建成
|
STR_ERROR_ALREADY_BUILT :{WHITE}……已经建成
|
||||||
|
|
|
@ -1356,8 +1356,8 @@ STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :可以在建築
|
||||||
STR_CONFIG_SETTING_CATCHMENT :容許更真實的服務範圍設定:{STRING}
|
STR_CONFIG_SETTING_CATCHMENT :容許更真實的服務範圍設定:{STRING}
|
||||||
STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :使車站和機場的服務範圍根據其種類和大小而改變。
|
STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :使車站和機場的服務範圍根據其種類和大小而改變。
|
||||||
|
|
||||||
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :公司車站可以為自帶車站的工業設施提供服務:{STRING}
|
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :公司車站可以服務附設車站的工業設施:{STRING}
|
||||||
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :啟用後,公司車站可以為附近自帶車站的工業設施(如油井)提供服務。禁用後,這些工業設施只能由其自帶的車站提供服務,並且這些車站不會提供除了該工業設施以外的產品
|
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :啟用後,公司車站可以為附近附設車站的工業(如鑽油平台)提供服務。停用後,這些工業只能由其附設的車站提供服務,並且附設車站不會提供除了該工業設施以外的任何服務
|
||||||
|
|
||||||
STR_CONFIG_SETTING_EXTRADYNAMITE :允許移除更多市鎮擁有的道路、橋樑及隧道:{STRING}
|
STR_CONFIG_SETTING_EXTRADYNAMITE :允許移除更多市鎮擁有的道路、橋樑及隧道:{STRING}
|
||||||
STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :使玩家更容易地移除市鎮擁有的基礎建設和建築物。
|
STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :使玩家更容易地移除市鎮擁有的基礎建設和建築物。
|
||||||
|
@ -5001,6 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}需要
|
||||||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}地面斜坡方向不對
|
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}地面斜坡方向不對
|
||||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能執行以下動作...
|
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能執行以下動作...
|
||||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必須先摧毀建築物
|
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必須先摧毀建築物
|
||||||
|
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}……建築物被保護
|
||||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}不能清除這個地段...
|
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}不能清除這個地段...
|
||||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... 地點不適合
|
STR_ERROR_SITE_UNSUITABLE :{WHITE}... 地點不適合
|
||||||
STR_ERROR_ALREADY_BUILT :{WHITE}……經已建成
|
STR_ERROR_ALREADY_BUILT :{WHITE}……經已建成
|
||||||
|
|
|
@ -476,7 +476,7 @@ CommandCost GetErrorMessageFromLocationCallbackResult(uint16_t cb_res, std::span
|
||||||
/* If this error isn't for the local player then it won't be seen, so don't bother encoding anything. */
|
/* If this error isn't for the local player then it won't be seen, so don't bother encoding anything. */
|
||||||
if (IsLocalCompany()) {
|
if (IsLocalCompany()) {
|
||||||
StringID stringid = GetGRFStringID(grffile->grfid, text_id);
|
StringID stringid = GetGRFStringID(grffile->grfid, text_id);
|
||||||
auto params = GetGRFSringTextStackParameters(grffile, stringid, textstack);
|
auto params = GetGRFStringTextStackParameters(grffile, stringid, textstack);
|
||||||
res.SetEncodedMessage(GetEncodedStringWithArgs(stringid, params));
|
res.SetEncodedMessage(GetEncodedStringWithArgs(stringid, params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -973,7 +973,7 @@ static void HandleNewGRFStringControlCodes(std::string_view str, TextRefStack &s
|
||||||
* @param textstack Text parameter stack.
|
* @param textstack Text parameter stack.
|
||||||
* @returns Parameters for GRF string.
|
* @returns Parameters for GRF string.
|
||||||
*/
|
*/
|
||||||
std::vector<StringParameter> GetGRFSringTextStackParameters(const GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack)
|
std::vector<StringParameter> GetGRFStringTextStackParameters(const GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack)
|
||||||
{
|
{
|
||||||
if (stringid == INVALID_STRING_ID) return {};
|
if (stringid == INVALID_STRING_ID) return {};
|
||||||
|
|
||||||
|
@ -998,6 +998,6 @@ std::vector<StringParameter> GetGRFSringTextStackParameters(const GRFFile *grffi
|
||||||
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack)
|
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack)
|
||||||
{
|
{
|
||||||
StringID stringid = GetGRFStringID(grffile->grfid, grfstringid);
|
StringID stringid = GetGRFStringID(grffile->grfid, grfstringid);
|
||||||
auto params = GetGRFSringTextStackParameters(grffile, stringid, textstack);
|
auto params = GetGRFStringTextStackParameters(grffile, stringid, textstack);
|
||||||
return GetStringWithArgs(stringid, params);
|
return GetStringWithArgs(stringid, params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ void AddGRFTextToList(GRFTextWrapper &list, std::string_view text_to_add);
|
||||||
|
|
||||||
bool CheckGrfLangID(uint8_t lang_id, uint8_t grf_version);
|
bool CheckGrfLangID(uint8_t lang_id, uint8_t grf_version);
|
||||||
|
|
||||||
std::vector<StringParameter> GetGRFSringTextStackParameters(const struct GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack);
|
std::vector<StringParameter> GetGRFStringTextStackParameters(const struct GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack);
|
||||||
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack);
|
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack);
|
||||||
|
|
||||||
#endif /* NEWGRF_TEXT_H */
|
#endif /* NEWGRF_TEXT_H */
|
||||||
|
|
|
@ -53,7 +53,7 @@ static ScriptStorage &GetStorage()
|
||||||
|
|
||||||
/* static */ ScriptInstance *ScriptObject::ActiveInstance::active = nullptr;
|
/* static */ ScriptInstance *ScriptObject::ActiveInstance::active = nullptr;
|
||||||
|
|
||||||
ScriptObject::ActiveInstance::ActiveInstance(ScriptInstance &instance) : alc_scope(instance.engine)
|
ScriptObject::ActiveInstance::ActiveInstance(ScriptInstance &instance) : alc_scope(instance.engine.get())
|
||||||
{
|
{
|
||||||
this->last_active = ScriptObject::ActiveInstance::active;
|
this->last_active = ScriptObject::ActiveInstance::active;
|
||||||
ScriptObject::ActiveInstance::active = &instance;
|
ScriptObject::ActiveInstance::active = &instance;
|
||||||
|
@ -230,8 +230,8 @@ ScriptObject::DisableDoCommandScope::DisableDoCommandScope()
|
||||||
|
|
||||||
/* static */ bool ScriptObject::CanSuspend()
|
/* static */ bool ScriptObject::CanSuspend()
|
||||||
{
|
{
|
||||||
Squirrel *squirrel = ScriptObject::GetActiveInstance().engine;
|
Squirrel &squirrel = *ScriptObject::GetActiveInstance().engine;
|
||||||
return GetStorage().allow_do_command && squirrel->CanSuspend();
|
return GetStorage().allow_do_command && squirrel.CanSuspend();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ ScriptEventQueue &ScriptObject::GetEventQueue()
|
/* static */ ScriptEventQueue &ScriptObject::GetEventQueue()
|
||||||
|
|
|
@ -50,8 +50,8 @@ static void PrintFunc(bool error_msg, std::string_view message)
|
||||||
|
|
||||||
ScriptInstance::ScriptInstance(std::string_view api_name)
|
ScriptInstance::ScriptInstance(std::string_view api_name)
|
||||||
{
|
{
|
||||||
this->storage = new ScriptStorage();
|
this->storage = std::make_unique<ScriptStorage>();
|
||||||
this->engine = new Squirrel(api_name);
|
this->engine = std::make_unique<Squirrel>(api_name);
|
||||||
this->engine->SetPrintFunction(&PrintFunc);
|
this->engine->SetPrintFunction(&PrintFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ void ScriptInstance::Initialize(const std::string &main_script, const std::strin
|
||||||
{
|
{
|
||||||
ScriptObject::ActiveInstance active(*this);
|
ScriptObject::ActiveInstance active(*this);
|
||||||
|
|
||||||
this->controller = new ScriptController(company);
|
this->controller = std::make_unique<ScriptController>(company);
|
||||||
|
|
||||||
/* Register the API functions and classes */
|
/* Register the API functions and classes */
|
||||||
this->engine->SetGlobalPointer(this->engine);
|
this->engine->SetGlobalPointer(this->engine.get());
|
||||||
this->RegisterAPI();
|
this->RegisterAPI();
|
||||||
if (this->IsDead()) {
|
if (this->IsDead()) {
|
||||||
/* Failed to register API; a message has already been logged. */
|
/* Failed to register API; a message has already been logged. */
|
||||||
|
@ -81,12 +81,11 @@ void ScriptInstance::Initialize(const std::string &main_script, const std::strin
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the main-class */
|
/* Create the main-class */
|
||||||
this->instance = new SQObject();
|
this->instance = std::make_unique<SQObject>();
|
||||||
if (!this->engine->CreateClassInstance(instance_name, this->controller, this->instance)) {
|
if (!this->engine->CreateClassInstance(instance_name, this->controller.get(), this->instance.get())) {
|
||||||
/* If CreateClassInstance has returned false instance has not been
|
/* If CreateClassInstance has returned false instance has not been
|
||||||
* registered with squirrel, so avoid trying to Release it by clearing it now */
|
* registered with squirrel, so avoid trying to Release it by clearing it now */
|
||||||
delete this->instance;
|
this->instance.reset();
|
||||||
this->instance = nullptr;
|
|
||||||
this->Died();
|
this->Died();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +129,13 @@ bool ScriptInstance::LoadCompatibilityScripts(Subdirectory dir, std::span<const
|
||||||
|
|
||||||
ScriptLog::Info(fmt::format("Downgrading API to be compatible with version {}", this->api_version));
|
ScriptLog::Info(fmt::format("Downgrading API to be compatible with version {}", this->api_version));
|
||||||
|
|
||||||
|
HSQUIRRELVM vm = this->engine->GetVM();
|
||||||
|
sq_pushroottable(vm);
|
||||||
|
sq_pushstring(vm, "CompatScriptRootTable");
|
||||||
|
sq_pushroottable(vm);
|
||||||
|
sq_newslot(vm, -3, SQFalse);
|
||||||
|
sq_pop(vm, 1);
|
||||||
|
|
||||||
/* Downgrade the API till we are the same version as the script. The last
|
/* Downgrade the API till we are the same version as the script. The last
|
||||||
* entry in the list is always the current version, so skip that one. */
|
* entry in the list is always the current version, so skip that one. */
|
||||||
for (auto it = std::rbegin(api_versions) + 1; it != std::rend(api_versions); ++it) {
|
for (auto it = std::rbegin(api_versions) + 1; it != std::rend(api_versions); ++it) {
|
||||||
|
@ -138,6 +144,11 @@ bool ScriptInstance::LoadCompatibilityScripts(Subdirectory dir, std::span<const
|
||||||
if (*it == this->api_version) break;
|
if (*it == this->api_version) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sq_pushroottable(vm);
|
||||||
|
sq_pushstring(vm, "CompatScriptRootTable");
|
||||||
|
sq_deleteslot(vm, -2, SQFalse);
|
||||||
|
sq_pop(vm, 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,11 +157,10 @@ ScriptInstance::~ScriptInstance()
|
||||||
ScriptObject::ActiveInstance active(*this);
|
ScriptObject::ActiveInstance active(*this);
|
||||||
this->in_shutdown = true;
|
this->in_shutdown = true;
|
||||||
|
|
||||||
if (instance != nullptr) this->engine->ReleaseObject(this->instance);
|
if (instance != nullptr) this->engine->ReleaseObject(this->instance.get());
|
||||||
if (engine != nullptr) delete this->engine;
|
|
||||||
delete this->storage;
|
/* Engine must be reset explicitly in scope of the active instance. */
|
||||||
delete this->controller;
|
this->engine.reset();
|
||||||
delete this->instance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInstance::Continue()
|
void ScriptInstance::Continue()
|
||||||
|
@ -167,11 +177,9 @@ void ScriptInstance::Died()
|
||||||
|
|
||||||
this->last_allocated_memory = this->GetAllocatedMemory(); // Update cache
|
this->last_allocated_memory = this->GetAllocatedMemory(); // Update cache
|
||||||
|
|
||||||
if (this->instance != nullptr) this->engine->ReleaseObject(this->instance);
|
if (this->instance != nullptr) this->engine->ReleaseObject(this->instance.get());
|
||||||
delete this->instance;
|
this->engine.reset();
|
||||||
delete this->engine;
|
this->instance.reset();
|
||||||
this->instance = nullptr;
|
|
||||||
this->engine = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInstance::GameLoop()
|
void ScriptInstance::GameLoop()
|
||||||
|
|
|
@ -256,7 +256,7 @@ public:
|
||||||
void ReleaseSQObject(HSQOBJECT *obj);
|
void ReleaseSQObject(HSQOBJECT *obj);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
class Squirrel *engine = nullptr; ///< A wrapper around the squirrel vm.
|
std::unique_ptr<class Squirrel> engine; ///< A wrapper around the squirrel vm.
|
||||||
std::string api_version{}; ///< Current API used by this script.
|
std::string api_version{}; ///< Current API used by this script.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,9 +288,9 @@ protected:
|
||||||
virtual void LoadDummyScript() = 0;
|
virtual void LoadDummyScript() = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class ScriptController *controller = nullptr; ///< The script main class.
|
std::unique_ptr<class ScriptStorage> storage; ///< Some global information for each running script.
|
||||||
class ScriptStorage *storage = nullptr; ///< Some global information for each running script.
|
std::unique_ptr<class ScriptController> controller; ///< The script main class.
|
||||||
SQObject *instance = nullptr; ///< Squirrel-pointer to the script main class.
|
std::unique_ptr<SQObject> instance; ///< Squirrel-pointer to the script main class.
|
||||||
|
|
||||||
bool is_started = false; ///< Is the scripts constructor executed?
|
bool is_started = false; ///< Is the scripts constructor executed?
|
||||||
bool is_dead = false; ///< True if the script has been stopped.
|
bool is_dead = false; ///< True if the script has been stopped.
|
||||||
|
|
|
@ -535,7 +535,7 @@ static void *ReadSprite(const SpriteCache *sc, SpriteID id, SpriteType sprite_ty
|
||||||
|
|
||||||
struct GrfSpriteOffset {
|
struct GrfSpriteOffset {
|
||||||
size_t file_pos;
|
size_t file_pos;
|
||||||
uint8_t control_flags;
|
SpriteCacheCtrlFlags control_flags{};
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Map from sprite numbers to position in the GRF file. */
|
/** Map from sprite numbers to position in the GRF file. */
|
||||||
|
@ -565,7 +565,7 @@ void ReadGRFSpriteOffsets(SpriteFile &file)
|
||||||
size_t old_pos = file.GetPos();
|
size_t old_pos = file.GetPos();
|
||||||
file.SeekTo(data_offset, SEEK_CUR);
|
file.SeekTo(data_offset, SEEK_CUR);
|
||||||
|
|
||||||
GrfSpriteOffset offset = { 0, 0 };
|
GrfSpriteOffset offset{0};
|
||||||
|
|
||||||
/* Loop over all sprite section entries and store the file
|
/* Loop over all sprite section entries and store the file
|
||||||
* offset for each newly encountered ID. */
|
* offset for each newly encountered ID. */
|
||||||
|
@ -574,7 +574,6 @@ void ReadGRFSpriteOffsets(SpriteFile &file)
|
||||||
if (id != prev_id) {
|
if (id != prev_id) {
|
||||||
_grf_sprite_offsets[prev_id] = offset;
|
_grf_sprite_offsets[prev_id] = offset;
|
||||||
offset.file_pos = file.GetPos() - 4;
|
offset.file_pos = file.GetPos() - 4;
|
||||||
offset.control_flags = 0;
|
|
||||||
}
|
}
|
||||||
prev_id = id;
|
prev_id = id;
|
||||||
uint length = file.ReadDword();
|
uint length = file.ReadDword();
|
||||||
|
@ -585,11 +584,11 @@ void ReadGRFSpriteOffsets(SpriteFile &file)
|
||||||
uint8_t zoom = file.ReadByte();
|
uint8_t zoom = file.ReadByte();
|
||||||
length--;
|
length--;
|
||||||
if (colour.Any() && zoom == 0) { // ZoomLevel::Normal (normal zoom)
|
if (colour.Any() && zoom == 0) { // ZoomLevel::Normal (normal zoom)
|
||||||
SetBit(offset.control_flags, (colour != SpriteComponent::Palette) ? SCCF_ALLOW_ZOOM_MIN_1X_32BPP : SCCF_ALLOW_ZOOM_MIN_1X_PAL);
|
offset.control_flags.Set((colour != SpriteComponent::Palette) ? SpriteCacheCtrlFlag::AllowZoomMin1x32bpp : SpriteCacheCtrlFlag::AllowZoomMin1xPal);
|
||||||
SetBit(offset.control_flags, (colour != SpriteComponent::Palette) ? SCCF_ALLOW_ZOOM_MIN_2X_32BPP : SCCF_ALLOW_ZOOM_MIN_2X_PAL);
|
offset.control_flags.Set((colour != SpriteComponent::Palette) ? SpriteCacheCtrlFlag::AllowZoomMin2x32bpp : SpriteCacheCtrlFlag::AllowZoomMin2xPal);
|
||||||
}
|
}
|
||||||
if (colour.Any() && zoom == 2) { // ZoomLevel::In2x (2x zoomed in)
|
if (colour.Any() && zoom == 2) { // ZoomLevel::In2x (2x zoomed in)
|
||||||
SetBit(offset.control_flags, (colour != SpriteComponent::Palette) ? SCCF_ALLOW_ZOOM_MIN_2X_32BPP : SCCF_ALLOW_ZOOM_MIN_2X_PAL);
|
offset.control_flags.Set((colour != SpriteComponent::Palette) ? SpriteCacheCtrlFlag::AllowZoomMin2x32bpp : SpriteCacheCtrlFlag::AllowZoomMin2xPal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -621,7 +620,7 @@ bool LoadNextSprite(SpriteID load_index, SpriteFile &file, uint file_sprite_id)
|
||||||
uint8_t grf_type = file.ReadByte();
|
uint8_t grf_type = file.ReadByte();
|
||||||
|
|
||||||
SpriteType type;
|
SpriteType type;
|
||||||
uint8_t control_flags = 0;
|
SpriteCacheCtrlFlags control_flags;
|
||||||
if (grf_type == 0xFF) {
|
if (grf_type == 0xFF) {
|
||||||
/* Some NewGRF files have "empty" pseudo-sprites which are 1
|
/* Some NewGRF files have "empty" pseudo-sprites which are 1
|
||||||
* byte long. Catch these so the sprites won't be displayed. */
|
* byte long. Catch these so the sprites won't be displayed. */
|
||||||
|
|
|
@ -11,24 +11,9 @@
|
||||||
#define SPRITECACHE_H
|
#define SPRITECACHE_H
|
||||||
|
|
||||||
#include "gfx_type.h"
|
#include "gfx_type.h"
|
||||||
|
#include "spritecache_type.h"
|
||||||
#include "spriteloader/spriteloader.hpp"
|
#include "spriteloader/spriteloader.hpp"
|
||||||
|
|
||||||
/** Data structure describing a sprite. */
|
|
||||||
struct Sprite {
|
|
||||||
uint16_t height; ///< Height of the sprite.
|
|
||||||
uint16_t width; ///< Width of the sprite.
|
|
||||||
int16_t x_offs; ///< Number of pixels to shift the sprite to the right.
|
|
||||||
int16_t y_offs; ///< Number of pixels to shift the sprite downwards.
|
|
||||||
std::byte data[]; ///< Sprite data.
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SpriteCacheCtrlFlags : uint8_t {
|
|
||||||
SCCF_ALLOW_ZOOM_MIN_1X_PAL = 0, ///< Allow use of sprite min zoom setting at 1x in palette mode.
|
|
||||||
SCCF_ALLOW_ZOOM_MIN_1X_32BPP = 1, ///< Allow use of sprite min zoom setting at 1x in 32bpp mode.
|
|
||||||
SCCF_ALLOW_ZOOM_MIN_2X_PAL = 2, ///< Allow use of sprite min zoom setting at 2x in palette mode.
|
|
||||||
SCCF_ALLOW_ZOOM_MIN_2X_32BPP = 3, ///< Allow use of sprite min zoom setting at 2x in 32bpp mode.
|
|
||||||
};
|
|
||||||
|
|
||||||
extern uint _sprite_cache_size;
|
extern uint _sprite_cache_size;
|
||||||
|
|
||||||
/** SpriteAllocator that allocates memory via a unique_ptr array. */
|
/** SpriteAllocator that allocates memory via a unique_ptr array. */
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "core/math_func.hpp"
|
#include "core/math_func.hpp"
|
||||||
#include "gfx_type.h"
|
#include "gfx_type.h"
|
||||||
|
#include "spritecache_type.h"
|
||||||
#include "spriteloader/spriteloader.hpp"
|
#include "spriteloader/spriteloader.hpp"
|
||||||
|
|
||||||
#include "table/sprites.h"
|
#include "table/sprites.h"
|
||||||
|
@ -27,7 +28,7 @@ struct SpriteCache {
|
||||||
uint32_t lru = 0;
|
uint32_t lru = 0;
|
||||||
SpriteType type = SpriteType::Invalid; ///< In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
|
SpriteType type = SpriteType::Invalid; ///< In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
|
||||||
bool warned = false; ///< True iff the user has been warned about incorrect use of this sprite
|
bool warned = false; ///< True iff the user has been warned about incorrect use of this sprite
|
||||||
uint8_t control_flags = 0; ///< Control flags, see SpriteCacheCtrlFlags
|
SpriteCacheCtrlFlags control_flags{}; ///< Control flags, see SpriteCacheCtrlFlags
|
||||||
|
|
||||||
void ClearSpriteData();
|
void ClearSpriteData();
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* This file is part of OpenTTD.
|
||||||
|
* OpenTTD 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, version 2.
|
||||||
|
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file spritecache_type.h Types related to the sprite cache. */
|
||||||
|
|
||||||
|
#ifndef SPRITECACHE_TYPE_H
|
||||||
|
#define SPRITECACHE_TYPE_H
|
||||||
|
|
||||||
|
#include "core/enum_type.hpp"
|
||||||
|
|
||||||
|
/** Data structure describing a sprite. */
|
||||||
|
struct Sprite {
|
||||||
|
uint16_t height; ///< Height of the sprite.
|
||||||
|
uint16_t width; ///< Width of the sprite.
|
||||||
|
int16_t x_offs; ///< Number of pixels to shift the sprite to the right.
|
||||||
|
int16_t y_offs; ///< Number of pixels to shift the sprite downwards.
|
||||||
|
std::byte data[]; ///< Sprite data.
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class SpriteCacheCtrlFlag : uint8_t {
|
||||||
|
AllowZoomMin1xPal, ///< Allow use of sprite min zoom setting at 1x in palette mode.
|
||||||
|
AllowZoomMin1x32bpp, ///< Allow use of sprite min zoom setting at 1x in 32bpp mode.
|
||||||
|
AllowZoomMin2xPal, ///< Allow use of sprite min zoom setting at 2x in palette mode.
|
||||||
|
AllowZoomMin2x32bpp, ///< Allow use of sprite min zoom setting at 2x in 32bpp mode.
|
||||||
|
};
|
||||||
|
|
||||||
|
using SpriteCacheCtrlFlags = EnumBitSet<SpriteCacheCtrlFlag, uint8_t>;
|
||||||
|
|
||||||
|
#endif /* SPRITECACHE_TYPE_H */
|
|
@ -256,7 +256,7 @@ static ZoomLevels LoadSpriteV1(SpriteLoader::SpriteCollection &sprite, SpriteFil
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static ZoomLevels LoadSpriteV2(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
static ZoomLevels LoadSpriteV2(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
||||||
{
|
{
|
||||||
static const ZoomLevel zoom_lvl_map[6] = {ZoomLevel::Normal, ZoomLevel::In4x, ZoomLevel::In2x, ZoomLevel::Out2x, ZoomLevel::Out4x, ZoomLevel::Out8x};
|
static const ZoomLevel zoom_lvl_map[6] = {ZoomLevel::Normal, ZoomLevel::In4x, ZoomLevel::In2x, ZoomLevel::Out2x, ZoomLevel::Out4x, ZoomLevel::Out8x};
|
||||||
|
|
||||||
|
@ -295,11 +295,11 @@ static ZoomLevels LoadSpriteV2(SpriteLoader::SpriteCollection &sprite, SpriteFil
|
||||||
is_wanted_zoom_lvl = true;
|
is_wanted_zoom_lvl = true;
|
||||||
ZoomLevel zoom_min = sprite_type == SpriteType::Font ? ZoomLevel::Min : _settings_client.gui.sprite_zoom_min;
|
ZoomLevel zoom_min = sprite_type == SpriteType::Font ? ZoomLevel::Min : _settings_client.gui.sprite_zoom_min;
|
||||||
if (zoom_min >= ZoomLevel::In2x &&
|
if (zoom_min >= ZoomLevel::In2x &&
|
||||||
HasBit(control_flags, load_32bpp ? SCCF_ALLOW_ZOOM_MIN_2X_32BPP : SCCF_ALLOW_ZOOM_MIN_2X_PAL) && zoom_lvl < ZoomLevel::In2x) {
|
control_flags.Test(load_32bpp ? SpriteCacheCtrlFlag::AllowZoomMin2x32bpp : SpriteCacheCtrlFlag::AllowZoomMin2xPal) && zoom_lvl < ZoomLevel::In2x) {
|
||||||
is_wanted_zoom_lvl = false;
|
is_wanted_zoom_lvl = false;
|
||||||
}
|
}
|
||||||
if (zoom_min >= ZoomLevel::Normal &&
|
if (zoom_min >= ZoomLevel::Normal &&
|
||||||
HasBit(control_flags, load_32bpp ? SCCF_ALLOW_ZOOM_MIN_1X_32BPP : SCCF_ALLOW_ZOOM_MIN_1X_PAL) && zoom_lvl < ZoomLevel::Normal) {
|
control_flags.Test(load_32bpp ? SpriteCacheCtrlFlag::AllowZoomMin1x32bpp : SpriteCacheCtrlFlag::AllowZoomMin1xPal) && zoom_lvl < ZoomLevel::Normal) {
|
||||||
is_wanted_zoom_lvl = false;
|
is_wanted_zoom_lvl = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -359,7 +359,7 @@ static ZoomLevels LoadSpriteV2(SpriteLoader::SpriteCollection &sprite, SpriteFil
|
||||||
return loaded_sprites;
|
return loaded_sprites;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZoomLevels SpriteLoaderGrf::LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
ZoomLevels SpriteLoaderGrf::LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
||||||
{
|
{
|
||||||
if (this->container_ver >= 2) {
|
if (this->container_ver >= 2) {
|
||||||
return LoadSpriteV2(sprite, file, file_pos, sprite_type, load_32bpp, control_flags, avail_8bpp, avail_32bpp);
|
return LoadSpriteV2(sprite, file, file_pos, sprite_type, load_32bpp, control_flags, avail_8bpp, avail_32bpp);
|
||||||
|
|
|
@ -17,7 +17,7 @@ class SpriteLoaderGrf : public SpriteLoader {
|
||||||
uint8_t container_ver;
|
uint8_t container_ver;
|
||||||
public:
|
public:
|
||||||
SpriteLoaderGrf(uint8_t container_ver) : container_ver(container_ver) {}
|
SpriteLoaderGrf(uint8_t container_ver) : container_ver(container_ver) {}
|
||||||
ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) override;
|
ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SPRITELOADER_GRF_HPP */
|
#endif /* SPRITELOADER_GRF_HPP */
|
||||||
|
|
|
@ -48,7 +48,7 @@ static void Convert32bppTo8bpp(SpriteLoader::Sprite &sprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ZoomLevels SpriteLoaderMakeIndexed::LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
ZoomLevels SpriteLoaderMakeIndexed::LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)
|
||||||
{
|
{
|
||||||
ZoomLevels avail = this->baseloader.LoadSprite(sprite, file, file_pos, sprite_type, true, control_flags, avail_8bpp, avail_32bpp);
|
ZoomLevels avail = this->baseloader.LoadSprite(sprite, file, file_pos, sprite_type, true, control_flags, avail_8bpp, avail_32bpp);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class SpriteLoaderMakeIndexed : public SpriteLoader {
|
||||||
SpriteLoader &baseloader;
|
SpriteLoader &baseloader;
|
||||||
public:
|
public:
|
||||||
SpriteLoaderMakeIndexed(SpriteLoader &baseloader) : baseloader(baseloader) {}
|
SpriteLoaderMakeIndexed(SpriteLoader &baseloader) : baseloader(baseloader) {}
|
||||||
ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) override;
|
ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SPRITELOADER_MAKEINDEXED_H */
|
#endif /* SPRITELOADER_MAKEINDEXED_H */
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "../core/alloc_type.hpp"
|
#include "../core/alloc_type.hpp"
|
||||||
#include "../core/enum_type.hpp"
|
#include "../core/enum_type.hpp"
|
||||||
#include "../gfx_type.h"
|
#include "../gfx_type.h"
|
||||||
|
#include "../spritecache_type.h"
|
||||||
#include "sprite_file_type.hpp"
|
#include "sprite_file_type.hpp"
|
||||||
|
|
||||||
struct Sprite;
|
struct Sprite;
|
||||||
|
@ -94,7 +95,7 @@ public:
|
||||||
* @param[out] avail_32bpp Available 32bpp sprites.
|
* @param[out] avail_32bpp Available 32bpp sprites.
|
||||||
* @return Available sprites matching \a load_32bpp.
|
* @return Available sprites matching \a load_32bpp.
|
||||||
*/
|
*/
|
||||||
virtual ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) = 0;
|
virtual ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, SpriteCacheCtrlFlags control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) = 0;
|
||||||
|
|
||||||
virtual ~SpriteLoader() = default;
|
virtual ~SpriteLoader() = default;
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,7 @@ static bool MockLoadNextSprite(SpriteID load_index)
|
||||||
sc->id = 0;
|
sc->id = 0;
|
||||||
sc->type = is_mapgen ? SpriteType::MapGen : SpriteType::Normal;
|
sc->type = is_mapgen ? SpriteType::MapGen : SpriteType::Normal;
|
||||||
sc->warned = false;
|
sc->warned = false;
|
||||||
sc->control_flags = 0;
|
sc->control_flags = {};
|
||||||
|
|
||||||
/* Fill with empty sprites up until the default sprite count. */
|
/* Fill with empty sprites up until the default sprite count. */
|
||||||
return load_index < SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
return load_index < SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
||||||
|
|
|
@ -118,7 +118,7 @@ std::optional<std::string_view> VideoDriver_SDL_OpenGL::AllocateContext()
|
||||||
}
|
}
|
||||||
|
|
||||||
this->gl_context = SDL_GL_CreateContext(this->sdl_window);
|
this->gl_context = SDL_GL_CreateContext(this->sdl_window);
|
||||||
if (this->gl_context == nullptr) return "SDL2: Can't active GL context";
|
if (this->gl_context == nullptr) return "SDL2: Can't activate GL context";
|
||||||
|
|
||||||
ToggleVsync(_video_vsync);
|
ToggleVsync(_video_vsync);
|
||||||
|
|
||||||
|
|
|
@ -1541,7 +1541,7 @@ std::optional<std::string_view> VideoDriver_Win32OpenGL::AllocateContext()
|
||||||
rc = wglCreateContext(this->dc);
|
rc = wglCreateContext(this->dc);
|
||||||
if (rc == nullptr) return "Can't create OpenGL context";
|
if (rc == nullptr) return "Can't create OpenGL context";
|
||||||
}
|
}
|
||||||
if (!wglMakeCurrent(this->dc, rc)) return "Can't active GL context";
|
if (!wglMakeCurrent(this->dc, rc)) return "Can't activate GL context";
|
||||||
|
|
||||||
this->ToggleVsync(_video_vsync);
|
this->ToggleVsync(_video_vsync);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue