112 changes: 81 additions & 31 deletions data/languages/japanese.txt
Expand Up @@ -307,6 +307,7 @@ Ping
Pistol
== ピストル

[Demo browser]
Play
== プレイ

Expand Down Expand Up @@ -573,9 +574,6 @@ Created:
Record demo
== デモを録画

%d of %d servers, %d players
== %d of %d サーバー, %d プレイヤー

Miscellaneous
== その他

Expand Down Expand Up @@ -618,18 +616,12 @@ Map:
Lht.
== 明るさ

Host address
== IPアドレス:ポート

Alpha
== 透明度

Length:
== 長さ:

Current version: %s
== クライアントのバージョン: %s

Name plates size
== 名前表示の大きさ

Expand All @@ -645,6 +637,9 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Game paused
==

Expand All @@ -654,9 +649,6 @@ Server best:
Personal best:
==

Learn
==

Browser
==

Expand Down Expand Up @@ -720,6 +712,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -729,43 +724,46 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -810,6 +808,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand Down Expand Up @@ -837,6 +841,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -855,6 +862,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -867,12 +877,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1128,9 +1132,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1140,6 +1150,46 @@ Check now
New random timeout code
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
112 changes: 81 additions & 31 deletions data/languages/korean.txt
Expand Up @@ -303,6 +303,7 @@ Ping
Pistol
== 권총

[Demo browser]
Play
== 플레이

Expand Down Expand Up @@ -575,9 +576,6 @@ Created:
Record demo
== 데모 녹화

%d of %d servers, %d players
== %d/%d 서버, %d 플레이어

Miscellaneous
== 여러가지

Expand Down Expand Up @@ -620,18 +618,12 @@ Map:
Lht.
== 명도

Host address
== 호스트 주소

Alpha
== 알파

Length:
== 길이:

Current version: %s
== 현재 버전: %s

Name plates size
== 이름 글꼴 크기

Expand All @@ -647,13 +639,13 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Server best:
Warning
==

Personal best:
Server best:
==

Learn
Personal best:
==

Browser
Expand Down Expand Up @@ -719,6 +711,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -728,43 +723,46 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -812,6 +810,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand All @@ -836,6 +840,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -854,6 +861,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -866,12 +876,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1127,9 +1131,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1139,6 +1149,46 @@ Check now
New random timeout code
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
112 changes: 81 additions & 31 deletions data/languages/kyrgyz.txt
@@ -1,8 +1,5 @@
##### translated strings #####

%d of %d servers, %d players
== %d / %d сервер, %d оюнчу

%ds left
== %d сек. калды

Expand Down Expand Up @@ -114,9 +111,6 @@ Created:
Current
== Кезектегиси

Current version: %s
== Кезектеги версиясы: %s

Custom colors
== Өз түстөрүңүз

Expand Down Expand Up @@ -234,9 +228,6 @@ High Detail
Hook
== Илмек

Host address
== Сервер дареги

Hue
== Түсү

Expand Down Expand Up @@ -369,6 +360,7 @@ Ping
Pistol
== Тапанча

[Demo browser]
Play
== Көрүү

Expand Down Expand Up @@ -642,13 +634,13 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Server best:
Warning
==

Personal best:
Server best:
==

Learn
Personal best:
==

Browser
Expand Down Expand Up @@ -714,6 +706,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -723,43 +718,46 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -804,6 +802,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand All @@ -828,6 +832,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -846,6 +853,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -858,12 +868,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1119,9 +1123,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1131,6 +1141,46 @@ Check now
New random timeout code
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
68 changes: 59 additions & 9 deletions data/languages/norwegian.txt
Expand Up @@ -308,6 +308,7 @@ Ping
Pistol
== Pistol

[Demo browser]
Play
== Spill

Expand Down Expand Up @@ -556,9 +557,6 @@ Join game
FSAA samples
== FSAA-sampler

%d of %d servers, %d players
== %d av %d servere, %d spillere

Sound volume
== Lydvolum

Expand Down Expand Up @@ -616,18 +614,12 @@ Lht.
UI Color
== Menyfarge

Host address
== Serveradresse

Crc:
== Crc:

Alpha
== Synlighet

Current version: %s
== Nåværende versjon: %s

LAN
== LAN

Expand Down Expand Up @@ -1186,11 +1178,69 @@ Grabs
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Use k key to kill (restart), q to pause and watch other players. See settings for other key binds.
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

Client message
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
1,434 changes: 885 additions & 549 deletions data/languages/persian.txt

Large diffs are not rendered by default.

68 changes: 59 additions & 9 deletions data/languages/polish.txt
Expand Up @@ -312,6 +312,7 @@ Ping
Pistol
== Pistolet

[Demo browser]
Play
== Graj

Expand Down Expand Up @@ -578,9 +579,6 @@ Join game
FSAA samples
== Próbkowanie FSAA (Antyaliasing)

%d of %d servers, %d players
== %d z %d serwerów, %d graczy

Sound volume
== Głośność

Expand Down Expand Up @@ -635,18 +633,12 @@ Lht.
UI Color
== Kolor menu

Host address
== Adres serwera

Crc:
== Crc:

Alpha
== Alfa

Current version: %s
== Aktualna wersja: %s

LAN
== LAN

Expand Down Expand Up @@ -1190,11 +1182,69 @@ Show others (own team only)
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Use k key to kill (restart), q to pause and watch other players. See settings for other key binds.
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

Client message
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
98 changes: 74 additions & 24 deletions data/languages/portuguese.txt
Expand Up @@ -322,6 +322,7 @@ Ping
Pistol
== Pistola

[Demo browser]
Play
== Ver

Expand Down Expand Up @@ -571,9 +572,6 @@ Join game
New name:
== Novo nome:

%d of %d servers, %d players
== %d de %d servidores, %d jogadores

Sound volume
== Volume de som

Expand Down Expand Up @@ -631,9 +629,6 @@ Round
UI Color
== Cor do menu

Host address
== Endereço do Host

Hue
== Matiz

Expand All @@ -643,9 +638,6 @@ Crc:
Alpha
== Alpha

Current version: %s
== Versão atual: %s

LAN
== LAN

Expand Down Expand Up @@ -898,13 +890,13 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Server best:
Warning
==

Personal best:
Server best:
==

Learn
Personal best:
==

Reconnect in %d sec
Expand Down Expand Up @@ -958,6 +950,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -967,22 +962,34 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Filter connecting players
Search:
==

Indicate map finish
Exclude:
==

Unfinished map
Search servers:
==

DDNet %s is out!
%d of %d servers
==

Downloading %s:
%d of %d server
==

Update failed! Check log...
%d players
==

%d player
==

Filter connecting players
==

Indicate map finish
==

Unfinished map
==

Markers:
Expand Down Expand Up @@ -1012,6 +1019,12 @@ Render
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand All @@ -1027,22 +1040,22 @@ Save
Reset wanted weapon on death
==

Vanilla skins only
Skip the main menu
==

Fat skins (DDFat)
Download skins
==

Skin prefix
Vanilla skins only
==

Hook collisions
Fat skins (DDFat)
==

Pause
Skin prefix
==

Kill
Hook collisions
==

Zoom in
Expand Down Expand Up @@ -1153,6 +1166,43 @@ Show tiles layers from BG map
Try fast HTTP map download first
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Time
==

Expand Down
112 changes: 81 additions & 31 deletions data/languages/romanian.txt
Expand Up @@ -316,6 +316,7 @@ Ping
Pistol
== Pistol

[Demo browser]
Play
== Redă

Expand Down Expand Up @@ -567,9 +568,6 @@ Join game
FSAA samples
== Eșantioane FSAA

%d of %d servers, %d players
== %d/%d servere, %d jucători

Sound volume
== Volum sunet

Expand Down Expand Up @@ -627,18 +625,12 @@ Lht.
UI Color
== Culoare meniu

Host address
== Adresa gazdei

Crc:
== Suma de control:

Alpha
== Alfa

Current version: %s
== Versiunea actuală: %s

LAN
== Rețea

Expand All @@ -657,13 +649,13 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Server best:
Warning
==

Personal best:
Server best:
==

Learn
Personal best:
==

Browser
Expand Down Expand Up @@ -729,6 +721,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -738,43 +733,46 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -819,6 +817,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand All @@ -843,6 +847,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -861,6 +868,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -873,12 +883,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1134,9 +1138,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1146,6 +1156,46 @@ Check now
New random timeout code
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
169 changes: 114 additions & 55 deletions data/languages/russian.txt

Large diffs are not rendered by default.

106 changes: 78 additions & 28 deletions data/languages/serbian.txt
Expand Up @@ -310,6 +310,7 @@ Ping
Pistol
== Pištolj

[Demo browser]
Play
== Pokreni

Expand Down Expand Up @@ -556,9 +557,6 @@ Join game
FSAA samples
== FSAA samples

%d of %d servers, %d players
== %d od %d server(a), %d igrač(a)

Sound volume
== Jačina zvuka

Expand Down Expand Up @@ -616,18 +614,12 @@ Lht.
UI Color
== Boja menija

Host address
== Adresa servera

Crc:
== Crc:

Alpha
== Provid.

Current version: %s
== Trenutna verzija: %s

LAN
== LAN

Expand Down Expand Up @@ -667,6 +659,9 @@ Use k key to kill (restart), q to pause and watch other players. See settings fo
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Server best:
==

Expand Down Expand Up @@ -724,49 +719,55 @@ Country / Region
Destination file already exist
==

Speed
==

Show DDNet map finishes in server browser
==

transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -811,6 +812,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand Down Expand Up @@ -838,6 +845,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -856,6 +866,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -868,12 +881,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1129,9 +1136,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1141,6 +1154,43 @@ Check now
New random timeout code
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
70 changes: 60 additions & 10 deletions data/languages/simplified_chinese.txt
Expand Up @@ -341,8 +341,9 @@ Ping
Pistol
== 手枪

[Demo browser]
Play
== 播放
== 编辑器

Play background music
== 播放背景音乐
Expand Down Expand Up @@ -617,9 +618,6 @@ Join game
FSAA samples
== 全屏抗锯齿(FSAA)采样倍数

%d of %d servers, %d players
== %d / %d 个服务器,%d 位玩家

Sound volume
== 音量

Expand Down Expand Up @@ -689,18 +687,12 @@ Automatically take statboard screenshot
UI Color
== 界面颜色

Host address
== 主机地址

Crc:
== Crc:

Alpha
== 透明度

Current version: %s
== 当前版本:%s

LAN
== 局域网

Expand Down Expand Up @@ -1202,5 +1194,63 @@ Use k key to kill (restart), q to pause and watch other players. See settings fo
Country / Region
== 国家 / 地区

https://wiki.ddnet.tw/
== https://docs.qq.com/doc/DWGFrV0xPRmVWVkla

The width or height of texture %s is not divisible by 16, which might cause visual bugs.
== 宽和高无法被16整除,这可能会导致画面异常

Warning
== 警告

Speed
== 速度

Skip the main menu
== 跳过主菜单

Website
== 网站

Settings
== 设置

[Start menu]
Play
== 开始游戏

Stop server
== 停止服务器

Run server
== 运行服务器

Server executable not found, can't run server
== 找不到服务器的可执行文件,无法运行

Editor
== 编辑器

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Download skins
==
112 changes: 81 additions & 31 deletions data/languages/slovak.txt
Expand Up @@ -307,6 +307,7 @@ Ping
Pistol
== Pištoľ

[Demo browser]
Play
== Prehrať

Expand Down Expand Up @@ -555,9 +556,6 @@ Join game
FSAA samples
== Anti-aliasing

%d of %d servers, %d players
== %d z %d serverov, %d hráčov online

Sound volume
== Hlasitosť

Expand Down Expand Up @@ -615,18 +613,12 @@ Lht.
UI Color
== Farba prostredia

Host address
== Hostiteľ

Crc:
== Crc:

Alpha
== Alpha

Current version: %s
== Aktuálna verzia: %s

LAN
== LAN

Expand All @@ -645,6 +637,9 @@ Replay feature is disabled!
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Game paused
==

Expand All @@ -654,9 +649,6 @@ Server best:
Personal best:
==

Learn
==

Browser
==

Expand Down Expand Up @@ -720,6 +712,9 @@ Country / Region
Destination file already exist
==

Speed
==

Video name:
==

Expand All @@ -729,43 +724,46 @@ Show DDNet map finishes in server browser
transmits your player name to info2.ddnet.tw
==

Search
Search:
==

Exclude
Exclude:
==

Filter connecting players
Search servers:
==

Indicate map finish
Search
==

Unfinished map
Exclude
==

Countries
%d of %d servers
==

Types
%d of %d server
==

DDNet %s is out!
%d players
==

Downloading %s:
%d player
==

Update failed! Check log...
Filter connecting players
==

DDNet Client updated!
Indicate map finish
==

Update now
Unfinished map
==

Restart
Countries
==

Types
==

Select a name
Expand Down Expand Up @@ -810,6 +808,12 @@ Connecting dummy
Connect Dummy
==

Kill
==

Pause
==

Reload
==

Expand Down Expand Up @@ -837,6 +841,9 @@ Show clan above name plates
Clan plates size
==

Skip the main menu
==

Refresh Rate
==

Expand All @@ -855,6 +862,9 @@ Max CSVs
Dummy settings
==

Download skins
==

Vanilla skins only
==

Expand All @@ -867,12 +877,6 @@ Skin prefix
Hook collisions
==

Pause
==

Kill
==

Zoom in
==

Expand Down Expand Up @@ -1128,9 +1132,15 @@ Try fast HTTP map download first
DDNet %s is available:
==

Update now
==

Updating...
==

DDNet Client updated!
==

No updates available
==

Expand All @@ -1140,6 +1150,46 @@ Check now
New random timeout code
==

Learn
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==

DDNet %s is out!
==

Downloading %s:
==

Update failed! Check log...
==

Restart
==

Time
==

Expand Down
68 changes: 59 additions & 9 deletions data/languages/spanish.txt
Expand Up @@ -316,6 +316,7 @@ Ping
Pistol
== Pistola

[Demo browser]
Play
== Reproducir

Expand Down Expand Up @@ -567,9 +568,6 @@ Join game
FSAA samples
== Muestras FSAA

%d of %d servers, %d players
== %d de %d servidores, %d jugadores

Sound volume
== Volumen de sonido

Expand Down Expand Up @@ -627,18 +625,12 @@ Lht.
UI Color
== Color de menú

Host address
== Dirección del host

Crc:
== Crc:

Alpha
== Alpha

Current version: %s
== Versión actual: %s

LAN
== LAN

Expand Down Expand Up @@ -1191,11 +1183,69 @@ Grabs
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Use k key to kill (restart), q to pause and watch other players. See settings for other key binds.
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

Client message
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
68 changes: 59 additions & 9 deletions data/languages/swedish.txt
Expand Up @@ -309,6 +309,7 @@ Ping
Pistol
== Pistol

[Demo browser]
Play
== Spela

Expand Down Expand Up @@ -557,9 +558,6 @@ Join game
FSAA samples
== FSAA-samplingar

%d of %d servers, %d players
== %d av %d servrar, %d spelare

Sound volume
== Volym

Expand Down Expand Up @@ -617,18 +615,12 @@ Lht.
UI Color
== Gränssnittfärg

Host address
== Serveraddress

Crc:
== Crc:

Alpha
== Alpha

Current version: %s
== Nuvarande version: %s

LAN
== LAN

Expand Down Expand Up @@ -1187,11 +1179,69 @@ Show others (own team only)
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Use k key to kill (restart), q to pause and watch other players. See settings for other key binds.
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

Client message
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
68 changes: 59 additions & 9 deletions data/languages/traditional_chinese.txt
Expand Up @@ -335,6 +335,7 @@ Ping
Pistol
== 手槍

[Demo browser]
Play
== 播放

Expand Down Expand Up @@ -611,9 +612,6 @@ Join game
FSAA samples
== 全屏抗鋸齒(FSAA)取樣倍數

%d of %d servers, %d players
== %d / %d 個伺服器,%d 位玩家

Sound volume
== 音量

Expand Down Expand Up @@ -683,18 +681,12 @@ Automatically take statboard screenshot
UI Color
== 介面顏色

Host address
== 主機地址

Crc:
== Crc:

Alpha
== 透明度

Current version: %s
== 當前版本:%s

LAN
== 區域網

Expand Down Expand Up @@ -1196,5 +1188,63 @@ Auto %3d:%02d
Replay %3d:%02d
== 回放 %3d:%02d

https://wiki.ddnet.tw/
== https://docs.qq.com/doc/DWGFrV0xPRmVWVkla

The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
68 changes: 59 additions & 9 deletions data/languages/turkish.txt
Expand Up @@ -312,6 +312,7 @@ Ping
Pistol
== Tabanca

[Demo browser]
Play
== Oynat

Expand Down Expand Up @@ -555,9 +556,6 @@ Join game
FSAA samples
== FSAA örnekleri

%d of %d servers, %d players
== %d/%d sunucu, %d oyuncu

Sound volume
== Ses seviyesi

Expand Down Expand Up @@ -617,18 +615,12 @@ Lht.
UI Color
== Menü rengi

Host address
== Sunucu adresi

Crc:
== Crc:

Alpha
== Şeffaflık

Current version: %s
== Mevcut versiyon: %s

LAN
== LAN

Expand Down Expand Up @@ -1196,5 +1188,63 @@ Grabs
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Skip the main menu
==

Download skins
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
68 changes: 59 additions & 9 deletions data/languages/ukrainian.txt
Expand Up @@ -238,6 +238,7 @@ Ping
Pistol
== Пістолет

[Demo browser]
Play
== Перегляд

Expand Down Expand Up @@ -408,9 +409,6 @@ Laser
Join game
== Приєднатись до гри

%d of %d servers, %d players
== %d/%d серверів, %d гравців

Sound volume
== Гучність звуку

Expand Down Expand Up @@ -444,15 +442,9 @@ Lht.
UI Color
== Колір інтерфейсу

Host address
== Адреса сервера

Alpha
== Прозор..

Current version: %s
== Поточна версія: %s

LAN
== LAN

Expand Down Expand Up @@ -1185,11 +1177,69 @@ Grabs
The width or height of texture %s is not divisible by 16, which might cause visual bugs.
==

Warning
==

Use k key to kill (restart), q to pause and watch other players. See settings for other key binds.
==

Country / Region
==

Speed
==

Search:
==

Exclude:
==

Search servers:
==

%d of %d servers
==

%d of %d server
==

%d players
==

%d player
==

Markers
==

Skip the main menu
==

Download skins
==

https://wiki.ddnet.tw/
==

Website
==

Settings
==

Stop server
==

Run server
==

Server executable not found, can't run server
==

Editor
==

[Start menu]
Play
==
Binary file modified data/mapres/desert_main.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/mapres/grass_main.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/mapres/jungle_main.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/mapres/winter_main.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/menuimages/demos.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/menuimages/editor.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/menuimages/local_server.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/menuimages/play_game.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/menuimages/settings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/skins/bunny.png
Binary file not shown.
Binary file removed data/skins/caesar.png
Binary file not shown.
Binary file removed data/skins/emo.png
Binary file not shown.
Binary file removed data/skins/hedgehog.png
Binary file not shown.
4 changes: 0 additions & 4 deletions data/skins/license.txt
Expand Up @@ -31,10 +31,6 @@ kitty_warpaint, kitty_x_ninja:
Copyright Ravie
CC0 license

lightbulb, tank, emo, bunny, hedgehog, napoleon, roman, caesar, nosey, savage:
Copyright Lappi
CC-BY-NC-SA license

demonlimekitty, nanas, nersif:
Copyright Miper
CC-BY-SA license
Expand Down
Binary file removed data/skins/lightbulb.png
Binary file not shown.
Binary file removed data/skins/napoleon.png
Binary file not shown.
Binary file removed data/skins/nosey.png
Binary file not shown.
Binary file removed data/skins/roman.png
Binary file not shown.
Binary file removed data/skins/savage.png
Binary file not shown.
Binary file removed data/skins/tank.png
Binary file not shown.
2 changes: 1 addition & 1 deletion ddnet-libs
Submodule ddnet-libs updated 86 files
+630 −0 websockets/include/libwebsockets.h
+138 −0 websockets/include/libwebsockets/abstract/abstract.h
+88 −0 websockets/include/libwebsockets/abstract/protocols.h
+115 −0 websockets/include/libwebsockets/abstract/protocols/smtp.h
+65 −0 websockets/include/libwebsockets/abstract/transports.h
+29 −0 websockets/include/libwebsockets/abstract/transports/raw-skt.h
+81 −0 websockets/include/libwebsockets/abstract/transports/unit-test.h
+233 −0 websockets/include/libwebsockets/lws-adopt.h
+87 −0 websockets/include/libwebsockets/lws-async-dns.h
+66 −0 websockets/include/libwebsockets/lws-bb-i2c.h
+62 −0 websockets/include/libwebsockets/lws-bb-spi.h
+120 −0 websockets/include/libwebsockets/lws-button.h
+910 −0 websockets/include/libwebsockets/lws-callbacks.h
+104 −0 websockets/include/libwebsockets/lws-cgi.h
+343 −0 websockets/include/libwebsockets/lws-client.h
+1,215 −0 websockets/include/libwebsockets/lws-context-vhost.h
+94 −0 websockets/include/libwebsockets/lws-dbus.h
+140 −0 websockets/include/libwebsockets/lws-detailed-latency.h
+187 −0 websockets/include/libwebsockets/lws-diskcache.h
+158 −0 websockets/include/libwebsockets/lws-display.h
+298 −0 websockets/include/libwebsockets/lws-dll2.h
+145 −0 websockets/include/libwebsockets/lws-dsh.h
+61 −0 websockets/include/libwebsockets/lws-eventlib-exports.h
+87 −0 websockets/include/libwebsockets/lws-freertos.h
+215 −0 websockets/include/libwebsockets/lws-fts.h
+170 −0 websockets/include/libwebsockets/lws-genaes.h
+130 −0 websockets/include/libwebsockets/lws-gencrypto.h
+211 −0 websockets/include/libwebsockets/lws-genec.h
+187 −0 websockets/include/libwebsockets/lws-genhash.h
+254 −0 websockets/include/libwebsockets/lws-genrsa.h
+60 −0 websockets/include/libwebsockets/lws-gpio.h
+928 −0 websockets/include/libwebsockets/lws-http.h
+54 −0 websockets/include/libwebsockets/lws-i2c.h
+54 −0 websockets/include/libwebsockets/lws-ili9341-spi.h
+212 −0 websockets/include/libwebsockets/lws-jose.h
+164 −0 websockets/include/libwebsockets/lws-jwe.h
+218 −0 websockets/include/libwebsockets/lws-jwk.h
+559 −0 websockets/include/libwebsockets/lws-jws.h
+146 −0 websockets/include/libwebsockets/lws-led.h
+301 −0 websockets/include/libwebsockets/lws-lejp.h
+302 −0 websockets/include/libwebsockets/lws-logs.h
+290 −0 websockets/include/libwebsockets/lws-lwsac.h
+1,036 −0 websockets/include/libwebsockets/lws-misc.h
+330 −0 websockets/include/libwebsockets/lws-mqtt.h
+283 −0 websockets/include/libwebsockets/lws-netdev.h
+193 −0 websockets/include/libwebsockets/lws-network-helper.h
+77 −0 websockets/include/libwebsockets/lws-optee.h
+309 −0 websockets/include/libwebsockets/lws-protocols-plugins.h
+105 −0 websockets/include/libwebsockets/lws-purify.h
+67 −0 websockets/include/libwebsockets/lws-pwm.h
+95 −0 websockets/include/libwebsockets/lws-retry.h
+306 −0 websockets/include/libwebsockets/lws-ring.h
+218 −0 websockets/include/libwebsockets/lws-secure-streams-client.h
+317 −0 websockets/include/libwebsockets/lws-secure-streams-policy.h
+645 −0 websockets/include/libwebsockets/lws-secure-streams.h
+243 −0 websockets/include/libwebsockets/lws-sequencer.h
+201 −0 websockets/include/libwebsockets/lws-service.h
+112 −0 websockets/include/libwebsockets/lws-settings.h
+109 −0 websockets/include/libwebsockets/lws-sha1-base64.h
+175 −0 websockets/include/libwebsockets/lws-smd.h
+176 −0 websockets/include/libwebsockets/lws-spa.h
+73 −0 websockets/include/libwebsockets/lws-spi.h
+64 −0 websockets/include/libwebsockets/lws-ssd1306-i2c.h
+119 −0 websockets/include/libwebsockets/lws-state.h
+81 −0 websockets/include/libwebsockets/lws-stats.h
+284 −0 websockets/include/libwebsockets/lws-struct.h
+336 −0 websockets/include/libwebsockets/lws-system.h
+61 −0 websockets/include/libwebsockets/lws-test-sequencer.h
+280 −0 websockets/include/libwebsockets/lws-threadpool.h
+362 −0 websockets/include/libwebsockets/lws-timeout-timer.h
+253 −0 websockets/include/libwebsockets/lws-tokenize.h
+273 −0 websockets/include/libwebsockets/lws-vfs.h
+264 −0 websockets/include/libwebsockets/lws-write.h
+246 −0 websockets/include/libwebsockets/lws-writeable.h
+125 −0 websockets/include/libwebsockets/lws-ws-close.h
+198 −0 websockets/include/libwebsockets/lws-ws-ext.h
+93 −0 websockets/include/libwebsockets/lws-ws-state.h
+279 −0 websockets/include/libwebsockets/lws-x509.h
+197 −0 websockets/include/lws_config.h
+ websockets/linux/lib32/libwebsockets.a
+ websockets/linux/lib64/libwebsockets.a
+ websockets/mac/lib64/libwebsockets.17.dylib
+ websockets/windows/lib32/libwebsockets.dll
+ websockets/windows/lib32/websockets.lib
+ websockets/windows/lib64/libwebsockets.dll
+ websockets/windows/lib64/websockets.lib
6 changes: 6 additions & 0 deletions other/ddnet.appdata.xml
Expand Up @@ -37,6 +37,12 @@
<content_attribute id="social-chat">intense</content_attribute>
</content_rating>
<releases>
<release date="2020-09-23" version="15.0.5"/>
<release date="2020-09-20" version="15.0.4"/>
<release date="2020-09-18" version="15.0.3"/>
<release date="2020-09-17" version="15.0.2"/>
<release date="2020-09-17" version="15.0.1"/>
<release date="2020-09-17" version="15.0"/>
<release date="2020-09-08" version="14.7.1"/>
<release date="2020-09-07" version="14.7"/>
<release date="2020-09-05" version="14.6.2"/>
Expand Down
70 changes: 70 additions & 0 deletions scripts/fix_style.py
@@ -0,0 +1,70 @@
#!/usr/bin/env python3

from collections import defaultdict
import re
import subprocess
import sys

RE_POSITION=re.compile(rb"^@@ -[0-9]+,[0-9]+ \+(?P<start>[0-9]+),(?P<len>[0-9]+) @@")
def get_line_ranges(git_diff):
new_filename = None
result = defaultdict(list)
for line in git_diff.splitlines():
if line.startswith(b"+++ "):
new_filename = line[6:].decode()
continue
match = RE_POSITION.match(line)
if match:
start = int(match.group("start").decode())
end = start + int(match.group("len").decode()) - 1
result[new_filename].append((start, end))
continue
return dict(result)

def git_get_changed_lines(margin, base):
return get_line_ranges(subprocess.check_output([
"git",
"diff",
base,
"--unified={}".format(margin),
]))

def filter_cpp(changed_lines):
return {filename: changed_lines[filename] for filename in changed_lines
if any(filename.endswith(ext) for ext in ".c .cpp .h".split())}

def reformat(changed_lines):
for filename in changed_lines:
subprocess.check_call(["clang-format", "-i"] + ["--lines={}:{}".format(start, end) for start, end in changed_lines[filename]] + [filename])

def warn(changed_lines):
result = 0
for filename in changed_lines:
result = subprocess.call(["clang-format", "-Werror", "--dry-run"] + ["--lines={}:{}".format(start, end) for start, end in changed_lines[filename]] + [filename]) or result
return result

def get_common_base(base):
return subprocess.check_output(["git", "merge-base", "HEAD", base]).decode().strip()

def main():
import argparse
p = argparse.ArgumentParser(description="Check and fix style of changed lines")
p.add_argument("--base", default="HEAD", help="Revision to compare to")
p.add_argument("-n", "--dry-run", action="store_true", help="Don't fix, only warn")
args = p.parse_args()
if not args.dry_run:
last_ranges = None
ranges = filter_cpp(git_get_changed_lines(1, base=args.base))
i = 0
while last_ranges != ranges:
print("Iteration {}".format(i))
reformat(ranges)
last_ranges = ranges
ranges = filter_cpp(git_get_changed_lines(1, base=args.base))
i += 1
print("Done after {} iterations".format(i))
else:
sys.exit(warn(filter_cpp(git_get_changed_lines(1, base=args.base))))

if __name__ == "__main__":
main()
4 changes: 3 additions & 1 deletion scripts/languages/copy_fix.py
Expand Up @@ -48,7 +48,9 @@
if content[-1] != "\n":
content.append("\n")
for i, miss in enumerate(missing):
content.append(local[miss]+"\n== \n\n")
if local[miss][1] != "":
content.append("["+local[miss][1]+"]\n")
content.append(local[miss][0]+"\n== \n\n")
content[-1] = content[-1][:-1]

open(outfile, "w").write("".join(content))
Expand Down
16 changes: 12 additions & 4 deletions scripts/languages/twlang.py
Expand Up @@ -10,15 +10,23 @@ def __init__(self, message, filename, line):

def decode(fileobj, elements_per_key):
data = {}
current_context = ""
current_key = None
for index, line in enumerate(fileobj):
line = line.encode("utf-8").decode("utf-8-sig")
line = line[:-1]
context = ""
if line and line[-1] == "\r":
line = line[:-1]
if not line or line[:1] == "#":
current_context = ""
continue
if line[:3] == "== ":

if line[0] == "[":
if line[-1] != "]":
raise LanguageDecodeError("Invalid context string", fileobj.name, index)
current_context = line[1:-1]
elif line[:3] == "== ":
if len(data[current_key]) >= 1+elements_per_key:
raise LanguageDecodeError("Wrong number of elements per key", fileobj.name, index)
if current_key:
Expand All @@ -32,8 +40,8 @@ def decode(fileobj, elements_per_key):
data[current_key].append(index)
if line in data:
raise LanguageDecodeError("Key defined multiple times: " + line, fileobj.name, index)
data[line] = [index]
current_key = line
data[(line, current_context)] = [index]
current_key = (line, current_context)
if len(data[current_key]) != 1+elements_per_key:
raise LanguageDecodeError("Wrong number of elements per key", fileobj.name, index)
data[current_key].append(index+1)
Expand All @@ -42,7 +50,7 @@ def decode(fileobj, elements_per_key):

def check_file(path):
with open(path) as fileobj:
matches = re.findall("Localize\s*\(\s*\"([^\"]+)\"\s*\)", fileobj.read())
matches = re.findall("Localize\s*\(\s*\"([^\"]+)\"(?:\s*,\s*\"([^\"]+)\")?\s*\)", fileobj.read())
return matches


Expand Down
114 changes: 84 additions & 30 deletions src/base/system.c
Expand Up @@ -17,31 +17,33 @@
#endif

#if defined(CONF_FAMILY_UNIX)
#include <sys/time.h>
#include <unistd.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>

/* unix net includes */
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <pthread.h>
#include <sys/ioctl.h>
#include <sys/socket.h>

#include <dirent.h>

/* unix net includes */
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <pthread.h>
#include <arpa/inet.h>

#include <dirent.h>

#if defined(CONF_PLATFORM_MACOSX)
// some lock and pthread functions are already defined in headers
// included from Carbon.h
// this prevents having duplicate definitions of those
#define _lock_set_user_
#define _task_user_
#if defined(CONF_PLATFORM_MACOSX)
// some lock and pthread functions are already defined in headers
// included from Carbon.h
// this prevents having duplicate definitions of those
#define _lock_set_user_
#define _task_user_

#include <Carbon/Carbon.h>
#include <mach/mach_time.h>
#endif
#include <Carbon/Carbon.h>
#include <mach/mach_time.h>
#endif

#elif defined(CONF_FAMILY_WINDOWS)
#define WIN32_LEAN_AND_MEAN
Expand Down Expand Up @@ -1146,6 +1148,10 @@ int net_host_lookup(const char *hostname, NETADDR *addr, int types)
hints.ai_family = AF_INET;
else if(types == NETTYPE_IPV6)
hints.ai_family = AF_INET6;
#if defined(CONF_WEBSOCKETS)
if(types & NETTYPE_WEBSOCKET_IPV4)
hints.ai_family = AF_INET;
#endif

e = getaddrinfo(host, NULL, &hints, &result);

Expand Down Expand Up @@ -1499,10 +1505,15 @@ int net_udp_send(NETSOCKET sock, const NETADDR *addr, const void *data, int size
}

#if defined(CONF_WEBSOCKETS)
if(addr->type&NETTYPE_WEBSOCKET_IPV4)
if(addr->type & NETTYPE_WEBSOCKET_IPV4)
{
if(sock.web_ipv4sock >= 0)
d = websocket_send(sock.web_ipv4sock, (const unsigned char*)data, size, addr->port);
{
char addr_str[NETADDR_MAXSTRSIZE];
str_format(addr_str, sizeof(addr_str), "%d.%d.%d.%d", addr->ip[0], addr->ip[1], addr->ip[2], addr->ip[3]);
d = websocket_send(sock.web_ipv4sock, (const unsigned char *)data, size, addr_str, addr->port);
}

else
dbg_msg("net", "can't send websocket_ipv4 traffic to this socket");
}
Expand Down Expand Up @@ -2225,8 +2236,11 @@ int net_socket_read_wait(NETSOCKET sock, int time)
if(sock.web_ipv4sock >= 0)
{
int maxfd = websocket_fd_set(sock.web_ipv4sock, &readfds);
if (maxfd > sockid)
if(maxfd > sockid)
{
sockid = maxfd;
FD_SET(sockid, &readfds);
}
}
#endif

Expand All @@ -2238,7 +2252,10 @@ int net_socket_read_wait(NETSOCKET sock, int time)

if(sock.ipv4sock >= 0 && FD_ISSET(sock.ipv4sock, &readfds))
return 1;

#if defined(CONF_WEBSOCKETS)
if(sock.web_ipv4sock >= 0 && FD_ISSET(sockid, &readfds))
return 1;
#endif
if(sock.ipv6sock >= 0 && FD_ISSET(sock.ipv6sock, &readfds))
return 1;

Expand Down Expand Up @@ -2286,6 +2303,16 @@ void str_utf8_truncate(char *dst, int dst_size, const char *src, int truncation_
str_copy(dst, src, size+1);
}

void str_truncate(char *dst, int dst_size, const char *src, int truncation_len)
{
int size = dst_size;
if(truncation_len < size)
{
size = truncation_len + 1;
}
str_copy(dst, src, size);
}

int str_length(const char *str)
{
return (int)strlen(str);
Expand Down Expand Up @@ -3202,18 +3229,45 @@ int pid(void)
#endif
}

void shell_execute(const char *file)
PROCESS shell_execute(const char *file)
{
#if defined(CONF_FAMILY_WINDOWS)
ShellExecute(NULL, NULL, file, NULL, NULL, SW_SHOWDEFAULT);
SHELLEXECUTEINFOA info;
mem_zero(&info, sizeof(SHELLEXECUTEINFOA));
info.cbSize = sizeof(SHELLEXECUTEINFOA);
info.lpVerb = "open";
info.lpFile = file;
info.nShow = SW_SHOWDEFAULT;
info.fMask = SEE_MASK_NOCLOSEPROCESS;
ShellExecuteEx(&info);
return info.hProcess;
#elif defined(CONF_FAMILY_UNIX)
char *argv[2];
pid_t pid;
argv[0] = (char*) file;
argv[1] = NULL;
pid = fork();
if(!pid)
if(pid == -1)
{
return 0;
}
if(pid == 0)
{
execv(file, argv);
_exit(1);
}
return pid;
#endif
}

int kill_process(PROCESS process)
{
#if defined(CONF_FAMILY_WINDOWS)
return TerminateProcess(process, 0);
#elif defined(CONF_FAMILY_UNIX)
int status;
kill(process, SIGTERM);
return !waitpid(process, &status, 0);
#endif
}

Expand Down
49 changes: 47 additions & 2 deletions src/base/system.h
Expand Up @@ -1012,6 +1012,23 @@ void str_copy(char *dst, const char *src, int dst_size);
*/
void str_utf8_truncate(char *dst, int dst_size, const char *src, int truncation_len);

/*
Function: str_truncate
Truncates a string to a given length.
Parameters:
dst - Pointer to a buffer that shall receive the string.
dst_size - Size of the buffer dst.
src - String to be truncated.
truncation_len - Maximum length of the returned string (not
counting the zero termination).
Remarks:
- The strings are treated as zero-terminated strings.
- Garantees that dst string will contain zero-termination.
*/
void str_truncate(char *dst, int dst_size, const char *src, int truncation_len);

/*
Function: str_length
Returns the length of a zero terminated string.
Expand Down Expand Up @@ -1964,13 +1981,42 @@ const char *str_next_token(const char *str, const char *delim, char *buffer, int
*/
int str_in_list(const char *list, const char *delim, const char *needle);

/*
Function: pid
Returns the pid of the current process.
Returns:
pid of the current process
*/
int pid(void);

#if defined(CONF_FAMILY_WINDOWS)
typedef void *PROCESS;
#else
typedef pid_t PROCESS;
#endif

/*
Function: shell_execute
Executes a given file.
Returns:
handle/pid of the new process
*/
PROCESS shell_execute(const char *file);

/*
Function: kill_process
Sends kill signal to a process.
Parameters:
process - handle/pid of the process
Returns:
0 - Error
1 - Success
*/
void shell_execute(const char *file);
int kill_process(PROCESS process);

/*
Function: os_is_winxp_or_lower
Expand All @@ -1987,7 +2033,6 @@ int os_is_winxp_or_lower(void);
Generates a null-terminated password of length `2 *
random_length`.
Parameters:
buffer - Pointer to the start of the output buffer.
length - Length of the buffer.
Expand Down
60 changes: 18 additions & 42 deletions src/engine/client/backend_sdl.cpp
Expand Up @@ -207,15 +207,6 @@ int CCommandProcessorFragment_OpenGL::TexFormatToImageColorChannelCount(int TexF
return 4;
}

unsigned char CCommandProcessorFragment_OpenGL::Sample(int w, int h, const unsigned char *pData, int u, int v, int Offset, int ScaleW, int ScaleH, int Bpp)
{
int Value = 0;
for(int x = 0; x < ScaleW; x++)
for(int y = 0; y < ScaleH; y++)
Value += pData[((v+y)*w+(u+x))*Bpp+Offset];
return Value/(ScaleW*ScaleH);
}

static float CubicHermite(float A, float B, float C, float D, float t)
{
float a = -A / 2.0f + (3.0f * B) / 2.0f - (3.0f * C) / 2.0f + D / 2.0f;
Expand Down Expand Up @@ -324,28 +315,6 @@ static void ResizeImage(uint8_t *pSourceImage, uint32_t SW, uint32_t SH, uint8_t
}
}

void *CCommandProcessorFragment_OpenGL::Rescale(int Width, int Height, int NewWidth, int NewHeight, int Format, const unsigned char *pData)
{
unsigned char *pTmpData;
int ScaleW = Width / NewWidth;
int ScaleH = Height / NewHeight;

int Bpp = TexFormatToImageColorChannelCount(Format);

pTmpData = (unsigned char *)malloc(NewWidth * NewHeight * Bpp);

int c = 0;
for(int y = 0; y < NewHeight; y++)
for(int x = 0; x < NewWidth; x++, c++)
{
for(int i = 0; i < Bpp; ++i) {
pTmpData[c*Bpp + i] = Sample(Width, Height, pData, x*ScaleW, y*ScaleH, i, ScaleW, ScaleH, Bpp);
}
}

return pTmpData;
}

void *CCommandProcessorFragment_OpenGL::Resize(int Width, int Height, int NewWidth, int NewHeight, int Format, const unsigned char *pData)
{
unsigned char *pTmpData;
Expand Down Expand Up @@ -504,7 +473,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Update(const CCommandBuffer::
int ResizedW = (int)(Width * ResizeW);
int ResizedH = (int)(Height * ResizeH);

void *pTmpData = Resize(Width, Height, ResizedW, ResizedH, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(Width, Height, ResizedW, ResizedH, pCommand->m_Format, static_cast<const unsigned char *>(pTexData));
free(pTexData);
pTexData = pTmpData;

Expand All @@ -515,6 +484,8 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Update(const CCommandBuffer::

if(m_aTextures[pCommand->m_Slot].m_RescaleCount > 0)
{
int OldWidth = Width;
int OldHeight = Height;
for(int i = 0; i < m_aTextures[pCommand->m_Slot].m_RescaleCount; ++i)
{
Width >>= 1;
Expand All @@ -524,7 +495,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Update(const CCommandBuffer::
Y /= 2;
}

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(OldWidth, OldHeight, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pTexData));
free(pTexData);
pTexData = pTmpData;
}
Expand Down Expand Up @@ -594,7 +565,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
int PowerOfTwoHeight = HighestBit(Height);
if(Width != PowerOfTwoWidth || Height != PowerOfTwoHeight)
{
void *pTmpData = Resize(Width, Height, PowerOfTwoWidth, PowerOfTwoHeight, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(Width, Height, PowerOfTwoWidth, PowerOfTwoHeight, pCommand->m_Format, static_cast<const unsigned char *>(pTexData));
free(pTexData);
pTexData = pTmpData;

Expand All @@ -609,6 +580,10 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
int RescaleCount = 0;
if(pCommand->m_Format == CCommandBuffer::TEXFORMAT_RGBA || pCommand->m_Format == CCommandBuffer::TEXFORMAT_RGB || pCommand->m_Format == CCommandBuffer::TEXFORMAT_ALPHA)
{
int OldWidth = Width;
int OldHeight = Height;
bool NeedsResize = false;

if(Width > m_MaxTexSize || Height > m_MaxTexSize)
{
do
Expand All @@ -617,18 +592,19 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
Height >>= 1;
++RescaleCount;
} while(Width > m_MaxTexSize || Height > m_MaxTexSize);

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
free(pTexData);
pTexData = pTmpData;
NeedsResize = true;
}
else if(pCommand->m_Format != CCommandBuffer::TEXFORMAT_ALPHA && (Width > 16 && Height > 16 && (pCommand->m_Flags&CCommandBuffer::TEXFLAG_QUALITY) == 0))
{
Width >>= 1;
Height >>= 1;
++RescaleCount;
NeedsResize = true;
}

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
if(NeedsResize)
{
void *pTmpData = Resize(OldWidth, OldHeight, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pTexData));
free(pTexData);
pTexData = pTmpData;
}
Expand Down Expand Up @@ -2538,7 +2514,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Update(const CCommandBuffe
Y /= 2;
}

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
free(pTexData);
pTexData = pTmpData;
}
Expand Down Expand Up @@ -2584,7 +2560,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe
}
while(Width > m_MaxTexSize || Height > m_MaxTexSize);

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
free(pTexData);
pTexData = pTmpData;
}
Expand All @@ -2594,7 +2570,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe
Height>>=1;
++RescaleCount;

void *pTmpData = Rescale(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
void *pTmpData = Resize(pCommand->m_Width, pCommand->m_Height, Width, Height, pCommand->m_Format, static_cast<const unsigned char *>(pCommand->m_pData));
free(pTexData);
pTexData = pTmpData;
}
Expand Down
2 changes: 0 additions & 2 deletions src/engine/client/backend_sdl.h
Expand Up @@ -168,8 +168,6 @@ class CCommandProcessorFragment_OpenGL

static int TexFormatToOpenGLFormat(int TexFormat);
static int TexFormatToImageColorChannelCount(int TexFormat);
static unsigned char Sample(int w, int h, const unsigned char *pData, int u, int v, int Offset, int ScaleW, int ScaleH, int Bpp);
static void *Rescale(int Width, int Height, int NewWidth, int NewHeight, int Format, const unsigned char *pData);
static void *Resize(int Width, int Height, int NewWidth, int NewHeight, int Format, const unsigned char *pData);

virtual void Cmd_Init(const SCommand_Init *pCommand);
Expand Down