Merge branch 'master' into infrastructure_sharing
Conflicts: src/aircraft_cmd.cpp src/economy.cpp src/lang/english.txt src/order_gui.cpp src/roadveh_cmd.cpp src/saveload/saveload.cpp src/settings.cpp src/settings_gui.cpp src/train_cmd.cpppull/3/head
commit
a4ad4130a6
@ -0,0 +1,10 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
AILog.Info("1.4 API compatibility in effect.");
|
@ -0,0 +1,10 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
AILog.Info("1.5 API compatibility in effect.");
|
@ -0,0 +1,8 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
@ -0,0 +1,216 @@
|
||||
/* $Id$ */
|
||||
|
||||
class Regression extends AIController {
|
||||
function Start();
|
||||
};
|
||||
|
||||
|
||||
function Regression::StationList()
|
||||
{
|
||||
local list = AIStationList(AIStation.STATION_BUS_STOP + AIStation.STATION_TRUCK_STOP);
|
||||
|
||||
print("");
|
||||
print("--StationList--");
|
||||
print(" Count(): " + list.Count());
|
||||
list.Valuate(AIStation.GetLocation);
|
||||
print(" Location ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetCargoWaiting, 0);
|
||||
print(" CargoWaiting(0) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetCargoWaiting, 1);
|
||||
print(" CargoWaiting(1) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_Cargo()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_Cargo--");
|
||||
|
||||
for (local mode = AIStationList_Cargo.CM_WAITING; mode <= AIStationList_Cargo.CM_PLANNED; ++mode) {
|
||||
print(" " + mode);
|
||||
for (local selector = AIStationList_Cargo.CS_BY_FROM; selector <= AIStationList_Cargo.CS_FROM_BY_VIA ; ++selector) {
|
||||
print(" " + selector);
|
||||
local list = AIStationList_Cargo(mode, selector, 6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoPlanned()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoPlanned--");
|
||||
|
||||
for (local selector = AIStationList_Cargo.CS_BY_FROM; selector <= AIStationList_Cargo.CS_FROM_BY_VIA; ++selector) {
|
||||
print(" " + selector);
|
||||
local list = AIStationList_CargoPlanned(selector, 6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoPlannedByFrom()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoPlannedByFrom--");
|
||||
local list = AIStationList_CargoPlannedByFrom(2, 0);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoPlannedByVia()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoPlannedByVia--");
|
||||
local list = AIStationList_CargoPlannedByVia(2, 0);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoPlannedViaByFrom()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoPlannedViaByFrom--");
|
||||
local list = AIStationList_CargoPlannedViaByFrom(6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoPlannedFromByVia()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoPlannedFromByVia--");
|
||||
local list = AIStationList_CargoPlannedFromByVia(6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoWaiting()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoWaiting--");
|
||||
|
||||
for (local selector = AIStationList_Cargo.CS_BY_FROM; selector <= AIStationList_Cargo.CS_FROM_BY_VIA; ++selector) {
|
||||
print(" " + selector);
|
||||
local list = AIStationList_CargoWaiting(selector, 6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoWaitingByFrom()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoWaitingByFrom--");
|
||||
local list = AIStationList_CargoWaitingByFrom(2, 0);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoWaitingByVia()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoWaitingByVia--");
|
||||
local list = AIStationList_CargoWaitingByVia(2, 0);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoWaitingViaByFrom()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoWaitingViaByFrom--");
|
||||
local list = AIStationList_CargoWaitingViaByFrom(6, 0, 7);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_CargoWaitingFromByVia()
|
||||
{
|
||||
print("");
|
||||
print("--StationList_CargoWaitingFromByVia--");
|
||||
local list = AIStationList_CargoWaitingFromByVia(2, 0, 2);
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
};
|
||||
|
||||
function Regression::StationList_Vehicle()
|
||||
{
|
||||
local list = AIStationList_Vehicle(12);
|
||||
|
||||
print("");
|
||||
print("--StationList_Vehicle--");
|
||||
print(" Count(): " + list.Count());
|
||||
list.Valuate(AIStation.GetLocation);
|
||||
print(" Location ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetCargoWaiting, 0);
|
||||
print(" CargoWaiting(0) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetCargoWaiting, 1);
|
||||
print(" CargoWaiting(1) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetCargoRating, 1);
|
||||
print(" CargoRating(1) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetDistanceManhattanToTile, 30000);
|
||||
print(" DistanceManhattanToTile(30000) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.GetDistanceSquareToTile, 30000);
|
||||
print(" DistanceSquareToTile(30000) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
list.Valuate(AIStation.IsWithinTownInfluence, 0);
|
||||
print(" IsWithinTownInfluence(0) ListDump:");
|
||||
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
}
|
||||
}
|
||||
|
||||
function Regression::Start()
|
||||
{
|
||||
StationList();
|
||||
StationList_Cargo();
|
||||
StationList_CargoPlanned();
|
||||
StationList_CargoPlannedByFrom();
|
||||
StationList_CargoPlannedByVia();
|
||||
StationList_CargoPlannedViaByFrom();
|
||||
StationList_CargoPlannedFromByVia();
|
||||
StationList_CargoWaiting();
|
||||
StationList_CargoWaitingByFrom();
|
||||
StationList_CargoWaitingByVia();
|
||||
StationList_CargoWaitingViaByFrom();
|
||||
StationList_CargoWaitingFromByVia();
|
||||
StationList_Vehicle();
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
|
||||
--StationList--
|
||||
Count(): 5
|
||||
Location ListDump:
|
||||
6 => 42341
|
||||
2 => 41831
|
||||
7 => 41825
|
||||
5 => 33421
|
||||
4 => 33411
|
||||
CargoWaiting(0) ListDump:
|
||||
7 => 6
|
||||
6 => 6
|
||||
2 => 3
|
||||
5 => 0
|
||||
4 => 0
|
||||
CargoWaiting(1) ListDump:
|
||||
7 => 0
|
||||
6 => 0
|
||||
5 => 0
|
||||
4 => 0
|
||||
2 => 0
|
||||
|
||||
--StationList_Cargo--
|
||||
0
|
||||
0
|
||||
6 => 6
|
||||
1
|
||||
6 => 2
|
||||
2
|
||||
2 => 4
|
||||
7 => 2
|
||||
3
|
||||
1
|
||||
0
|
||||
7 => 18
|
||||
6 => 16
|
||||
2 => 7
|
||||
1
|
||||
6 => 8
|
||||
2 => 3
|
||||
2
|
||||
2 => 16
|
||||
6 => 14
|
||||
7 => 11
|
||||
3
|
||||
6 => 10
|
||||
2 => 8
|
||||
|
||||
--StationList_CargoPlanned--
|
||||
0
|
||||
7 => 18
|
||||
6 => 16
|
||||
2 => 7
|
||||
1
|
||||
6 => 8
|
||||
2 => 3
|
||||
2
|
||||
2 => 16
|
||||
6 => 14
|
||||
7 => 11
|
||||
3
|
||||
6 => 10
|
||||
2 => 8
|
||||
|
||||
--StationList_CargoPlannedByFrom--
|
||||
7 => 8
|
||||
6 => 8
|
||||
2 => 7
|
||||
|
||||
--StationList_CargoPlannedByVia--
|
||||
2 => 16
|
||||
6 => 7
|
||||
|
||||
--StationList_CargoPlannedViaByFrom--
|
||||
6 => 8
|
||||
2 => 3
|
||||
|
||||
--StationList_CargoPlannedFromByVia--
|
||||
6 => 10
|
||||
2 => 8
|
||||
|
||||
--StationList_CargoWaiting--
|
||||
0
|
||||
6 => 6
|
||||
1
|
||||
6 => 2
|
||||
2
|
||||
2 => 4
|
||||
7 => 2
|
||||
3
|
||||
|
||||
--StationList_CargoWaitingByFrom--
|
||||
2 => 3
|
||||
|
||||
--StationList_CargoWaitingByVia--
|
||||
6 => 3
|
||||
|
||||
--StationList_CargoWaitingViaByFrom--
|
||||
6 => 2
|
||||
|
||||
--StationList_CargoWaitingFromByVia--
|
||||
6 => 3
|
||||
|
||||
--StationList_Vehicle--
|
||||
Count(): 2
|
||||
Location ListDump:
|
||||
5 => 33421
|
||||
4 => 33411
|
||||
CargoWaiting(0) ListDump:
|
||||
5 => 0
|
||||
4 => 0
|
||||
CargoWaiting(1) ListDump:
|
||||
5 => 0
|
||||
4 => 0
|
||||
CargoRating(1) ListDump:
|
||||
5 => -1
|
||||
4 => -1
|
||||
DistanceManhattanToTile(30000) ListDump:
|
||||
5 => 106
|
||||
4 => 96
|
||||
DistanceSquareToTile(30000) ListDump:
|
||||
5 => 8818
|
||||
4 => 7058
|
||||
IsWithinTownInfluence(0) ListDump:
|
||||
5 => 0
|
||||
4 => 0
|
||||
ERROR: The script died unexpectedly.
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,25 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.2 API compatibility in effect.");
|
||||
|
||||
GSTown._SetGrowthRate <- GSTown.SetGrowthRate;
|
||||
GSTown.SetGrowthRate <- function(town_id, days_between_town_growth)
|
||||
{
|
||||
/* Growth rate 0 caused resetting the custom growth rate. While this was undocumented, it was used nevertheless (ofc). */
|
||||
if (days_between_town_growth == 0) days_between_town_growth = GSTown.TOWN_GROWTH_NORMAL;
|
||||
return GSTown._SetGrowthRate(town_id, days_between_town_growth);
|
||||
}
|
||||
|
||||
/* 1.5 adds a game element reference to the news. */
|
||||
GSNews._Create <- GSNews.Create;
|
||||
GSNews.Create <- function(type, text, company)
|
||||
{
|
||||
return GSNews._Create(type, text, company, GSNews.NR_NONE, 0);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.3 API compatibility in effect.");
|
||||
|
||||
GSTown._SetGrowthRate <- GSTown.SetGrowthRate;
|
||||
GSTown.SetGrowthRate <- function(town_id, days_between_town_growth)
|
||||
{
|
||||
/* Growth rate 0 caused resetting the custom growth rate. While this was undocumented, it was used nevertheless (ofc). */
|
||||
if (days_between_town_growth == 0) days_between_town_growth = GSTown.TOWN_GROWTH_NORMAL;
|
||||
return GSTown._SetGrowthRate(town_id, days_between_town_growth);
|
||||
}
|
||||
|
||||
/* 1.5 adds a game element reference to the news. */
|
||||
GSNews._Create <- GSNews.Create;
|
||||
GSNews.Create <- function(type, text, company)
|
||||
{
|
||||
return GSNews._Create(type, text, company, GSNews.NR_NONE, 0);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.4 API compatibility in effect.");
|
||||
|
||||
/* 1.5 adds a game element reference to the news. */
|
||||
GSNews._Create <- GSNews.Create;
|
||||
GSNews.Create <- function(type, text, company)
|
||||
{
|
||||
return GSNews._Create(type, text, company, GSNews.NR_NONE, 0);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.5 API compatibility in effect.");
|
@ -0,0 +1,8 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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 diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
||||
32bpp and OpenTTD
|
||||
Last updated: 2007-06-13
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) About
|
||||
2.0) The format
|
||||
|
||||
|
||||
1.0) About
|
||||
---- -----
|
||||
OpenTTD has 32bpp support. This means: OpenTTD still is 8bpp, but it has the
|
||||
posibility to override the graphics with 32bpp. This means that it isn't a
|
||||
replacement of grf or newgrf, but simply an addition. If you want to use 32bpp
|
||||
graphics of a newgrf, you do need the newgrf itself too (with 8bpp graphics).
|
||||
|
||||
|
||||
2.0) The format
|
||||
---- ----------
|
||||
32bpp images are stored in PNG. They should go in:
|
||||
data/sprites/<grfname>/<SpriteID>.png
|
||||
|
||||
For example, a grfname would be 'openttd' (without .grf, lowercase), and the
|
||||
SpriteID 3, to override the 3rd sprite in openttd.grf with a 32bpp version.
|
||||
|
||||
The format of this PNG can be almost anything, but we advise to use RGBA
|
||||
format. Alpha-channel is fully supported.
|
||||
|
||||
As the core of OpenTTD is 8bpp, and because you of course want company colours
|
||||
in your images, you will need to add a mask for every sprite that needs colour
|
||||
remapping. The name is simular as above, only you have to put a 'm' behind the
|
||||
SpriteID. This image should be a 8bpp palette image, where the palette is the
|
||||
OpenTTD palette. Upon load of the PNG, the mask is loaded too, and overrides
|
||||
the RGB (not the Alpha) of the original PNG image, and replacing it with a
|
||||
8bpp color remapped and converted to 32bpp.
|
||||
|
||||
Another thing that OpenTTD needs in your png, is 2 tEXt chunks: x_offs and
|
||||
y_offs. This to define the x- and y-offset, of course. Use the tool we supply
|
||||
to add this information. Sadly enough most graphical editors trashes those
|
||||
chunks upon save, so you have to readd it every time you save your image.
|
||||
|
||||
Your images should be the same as the grf, in size.
|
@ -0,0 +1,268 @@
|
||||
Some explanations about Desyncs
|
||||
Last updated: 2014-02-23
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) Desync theory
|
||||
* 1.1) OpenTTD multiplayer architecture
|
||||
* 1.2) What is a Desync and how is it detected
|
||||
* 1.3) Typical causes of Desyncs
|
||||
2.0) What to do in case of a Desync
|
||||
* 2.1) Cache debugging
|
||||
* 2.2) Desync recording
|
||||
3.0) Evaluating the Desync records
|
||||
* 3.1) Replaying
|
||||
* 3.2) Evaluation the replay
|
||||
* 3.3) Comparing savegames
|
||||
|
||||
|
||||
1.1) OpenTTD multiplayer architecture
|
||||
---- --------------------------------
|
||||
OpenTTD has a huge gamestate, which changes all of the time.
|
||||
The savegame contains the complete gamestate at a specific point
|
||||
in time. But this state changes completely each tick: Vehicles move
|
||||
and trees grow.
|
||||
|
||||
However, most of these changes in the gamestate are deterministic:
|
||||
Without a player interfering a vehicle follows its orders always
|
||||
in the same way, and trees always grow the same.
|
||||
|
||||
In OpenTTD multiplayer synchronisation works by creating a savegame
|
||||
when clients join, and then transfering that savegame to the client,
|
||||
so it has the complete gamestate at a fixed point in time.
|
||||
|
||||
Afterwards clients only receive 'commands', that is: Stuff which is
|
||||
not predictable, like
|
||||
- player actions
|
||||
- AI actions
|
||||
- GameScript actions
|
||||
- Admin Port command
|
||||
- rcon commands
|
||||
- ...
|
||||
|
||||
These commands contain the information on how to execute the command,
|
||||
and when to execute it. Time is measured in 'network frames'.
|
||||
Mind that network frames to not match ingame time. Network frames
|
||||
also run while the game is paused, to give a defined behaviour to
|
||||
stuff that is executing while the game is paused.
|
||||
|
||||
The deterministic part of the gamestate is run by the clients on
|
||||
their own. All they get from the server is the instruction to
|
||||
run the gamestate up to a certain network time, which basically
|
||||
says that there are no commands scheduled in that time.
|
||||
|
||||
When a client (which includes the server itself) wants to execute
|
||||
a command (i.e. a non-predictable action), it does this by
|
||||
- calling DoCommandP resp. DoCommandPInternal
|
||||
- These functions first do a local test-run of the command to
|
||||
check simple preconditions. (Just to give the client an
|
||||
immediate response without bothering the server and waiting for
|
||||
the response.) The test-run may not actually change the
|
||||
gamestate, all changes must be discarded.
|
||||
- If the local test-run succeeds the command is sent to the server.
|
||||
- The server inserts the command into the command queue, which
|
||||
assigns a network frame to the commands, i.e. when it shall be
|
||||
executed on all clients.
|
||||
- Enhanced with this specific timestamp, the command is send to all
|
||||
clients, which execute the command simultaneously in the same
|
||||
network frame in the same order.
|
||||
|
||||
1.2) What is a Desync and how is it detected
|
||||
---- ---------------------------------------
|
||||
In the ideal case all clients have the same gamestate as the server
|
||||
and run in sync. That is, vehicle movement is the same on all
|
||||
clients, and commands are executed the same everywhere and
|
||||
have the same results.
|
||||
|
||||
When a Desync happens, it means that the gamestates on the clients
|
||||
(including the server) are no longer the same. Just imagine
|
||||
that a vehicle picks the left line instead of the right line at
|
||||
a junction on one client.
|
||||
|
||||
The important thing here is, that noone notices when a Desync
|
||||
occurs. The desync client will continue to simulate the gamestate
|
||||
and execute commands from the server. Once the gamestate differs
|
||||
it will increasingly spiral out of control: If a vehicle picks a
|
||||
different route, it will arrive at a different time at a station,
|
||||
which will load different cargo, which causes other vehicles to
|
||||
load other stuff, which causes industries to notice different
|
||||
servicing, which causes industries to change production, ...
|
||||
the client could run all day in a different universe.
|
||||
|
||||
To limit how long a Desync can remain unnoticed, the server
|
||||
transfers some checksums every now and then for the gamestate.
|
||||
Currently this checksum is the state of the random number
|
||||
generator of the game logic. A lot of things in OpenTTD depend
|
||||
on the RNG, and if the gamestate differs, it is likely that the
|
||||
RNG is called at different times, and the state differs when
|
||||
checked.
|
||||
|
||||
The clients compare this 'checksum' with the checksum of their
|
||||
own gamestate at the specific network frame. If they differ,
|
||||
the client disconnects with a Desync error.
|
||||
|
||||
The important thing here is: The detection of the Desync is
|
||||
only an ultimate failure detection. It does not give any
|
||||
indication on when the Desync happened. The Desync may after
|
||||
all have occurred long ago, and just did not affect the checksum
|
||||
up to now. The checksum may have matched 10 times or more
|
||||
since the Desync happend, and only now the Desync has spiraled
|
||||
enough to finally affect the checksum. (There was once a desync
|
||||
which was only noticed by the checksum after 20 game years.)
|
||||
|
||||
1.3) Typical causes of Desyncs
|
||||
---- -------------------------
|
||||
Desyncs can be caused by the following scenarios:
|
||||
- The savegame does not describe the complete gamestate.
|
||||
- Some information which affects the progression of the
|
||||
gamestate is not saved in the savegame.
|
||||
- Some information which affects the progression of the
|
||||
gamestate is not loaded from the savegame.
|
||||
This includes the case that something is not completely
|
||||
reset before loading the savegame, so data from the
|
||||
previous game is carried over to the new one.
|
||||
- The gamestate does not behave deterministic.
|
||||
- Cache mismatch: The game logic depends on some cached
|
||||
values, which are not invalidated properly. This is
|
||||
the usual case for NewGRF-specific Desyncs.
|
||||
- Undefined behaviour: The game logic performs multiple
|
||||
things in an undefined order or with an undefined
|
||||
result. E.g. when sorting something with a key while
|
||||
some keys are equal. Or some computation that depends
|
||||
on the CPU architecture (32/64 bit, little/big endian).
|
||||
- The gamestate is modified when it shall not be modified.
|
||||
- The test-run of a command alters the gamestate.
|
||||
- The gamestate is altered by a player or script without
|
||||
using commands.
|
||||
|
||||
|
||||
2.1) Cache debugging
|
||||
---- ---------------
|
||||
Desyncs which are caused by inproper cache validation can
|
||||
often be found by enabling cache validation:
|
||||
- Start OpenTTD with '-d desync=2'.
|
||||
- This will enable validation of caches every tick.
|
||||
That is, cached values are recomputed every tick and compared
|
||||
to the cached value.
|
||||
- Differences are logged to 'commands-out.log' in the autosave
|
||||
folder.
|
||||
|
||||
Mind that this type of debugging can also be done in singleplayer.
|
||||
|
||||
2.2) Desync recording
|
||||
---- ----------------
|
||||
If you have a server, which happens to encounter Desyncs often,
|
||||
you can enable recording of the gamestate alterations. This
|
||||
will later allow the replay the gamestate and locate the Desync
|
||||
cause.
|
||||
|
||||
There are two levels of Desync recording, which are enabled
|
||||
via '-d desync=2' resp. '-d desync=3'. Both will record all
|
||||
commands to a file 'commands-out.log' in the autosave folder.
|
||||
|
||||
If you have the savegame from the start of the server, and
|
||||
this command log you can replay the whole game. (see Section 3.1)
|
||||
|
||||
If you do not start the server from a savegame, there will
|
||||
also be a savegame created just after a map has been generated.
|
||||
The savegame will be named 'dmp_cmds_*.sav' and be put into
|
||||
the autosave folder.
|
||||
|
||||
In addition to that '-d desync=3' also creates regular savegames
|
||||
at defined spots in network time. (more defined than regular
|
||||
autosaves). These will be created in the autosave folder
|
||||
and will also be named 'dmp_cmds_*.sav'.
|
||||
|
||||
These saves allow comparing the gamestate with the original
|
||||
gamestate during replaying, and thus greatly help debugging.
|
||||
However, they also take a lot of disk space.
|
||||
|
||||
|
||||
3.1) Replaying
|
||||
---- ---------
|
||||
To replay a Desync recording, you need these files:
|
||||
- The savegame from when the server was started, resp.
|
||||
the automatically created savegame from when the map
|
||||
was generated.
|
||||
- The 'commands-out.log' file.
|
||||
- Optionally the 'dmp_cmds_*.sav'.
|
||||
Put these files into a safe spot. (Not your autosave folder!)
|
||||
|
||||
Next, prepare your OpenTTD for replaying:
|
||||
- Get the same version of OpenTTD as the original server was running.
|
||||
- Uncomment/enable the define 'DEBUG_DUMP_COMMANDS' in
|
||||
'src/network/network_func.h'.
|
||||
(DEBUG_FAILED_DUMP_COMMANDS is explained later)
|
||||
- Put the 'commands-out.log' into the root save folder, and rename
|
||||
it to 'commands.log'.
|
||||
- Run 'openttd -D -d desync=3 -g startsavegame.sav'.
|
||||
This replays the server log and creates new 'commands-out.log'
|
||||
and 'dmp_cmds_*.sav' in your autosave folder.
|
||||
|
||||
3.2) Evaluation the replay
|
||||
---- ---------------------
|
||||
The replaying will also compare the checksums which are part of
|
||||
the 'commands-out.log' with the replayed gamestate.
|
||||
If they differ, it will trigger a 'NOT_REACHED'.
|
||||
|
||||
If the replay succeeds without mismatch, that is the replay reproduces
|
||||
the original server state:
|
||||
- Repeat the replay starting from incrementally later 'dmp_cmds_*.sav'
|
||||
while truncating the 'commands.log' at the beginning appropriately.
|
||||
The 'dmp_cmds_*.sav' can be your own ones from the first reply, or
|
||||
the ones from the original server (if you have them).
|
||||
(This simulates the view of joining clients during the game.)
|
||||
- If one of those replays fails, you have located the Desync between
|
||||
the last dmp_cmds that reproduces the replay and the first one
|
||||
that fails.
|
||||
|
||||
If the replay does not succeed without mismatch, you can check the logs
|
||||
whether there were failed commands. Then you may try to replay with
|
||||
DEBUG_FAILED_DUMP_COMMANDS enabled. If the replay then fails, the
|
||||
command test-run of the failed command modified the game state.
|
||||
|
||||
If you have the original 'dmp_cmds_*.sav', you can also compare those
|
||||
savegames with your own ones from the replay. You can also comment/disable
|
||||
the 'NOT_REACHED' mentioned above, to get another 'dmp_cmds_*.sav' from
|
||||
the replay after the mismatch has already been detected.
|
||||
See Section 3.2 on how to compare savegames.
|
||||
If the saves differ you have located the Desync between the last dmp_cmds
|
||||
that match and the first one that does not. The difference of the saves
|
||||
may point you in the direction of what causes it.
|
||||
|
||||
If the replay succeeds without mismatch, and you do not have any
|
||||
'dmp_cmd_*.sav' from the original server, it is a lost case.
|
||||
Enable creation of the 'dmp_cmd_*.sav' on the server, and wait for the
|
||||
next Desync.
|
||||
|
||||
Finally, you can also compare the 'commands-out.log' from the original
|
||||
server with the one from the replay. They will differ in stuff like
|
||||
dates, and the original log will contain the chat, but otherwise they
|
||||
should match.
|
||||
|
||||
3.2) Comparing savegames
|
||||
---- -------------------
|
||||
The binary form of the savegames from the original server and from
|
||||
your replay will always differ:
|
||||
- The savegame contains paths to used NewGRF files.
|
||||
- The gamelog will log your loading of the savegame.
|
||||
- The savegame data of AIs and the Gamescript will differ.
|
||||
Scripts are not run during the replay, only their recorded commands
|
||||
are replayed. Their internal state will thus not change in the
|
||||
replay and will differ.
|
||||
|
||||
To compare savegame more semantically, there exist some ugly hackish
|
||||
tools at:
|
||||
http://devs.openttd.org/~frosch/texts/zpipe.c
|
||||
http://devs.openttd.org/~frosch/texts/printhunk.c
|
||||
|
||||
The first one decompresses OpenTTD savegames. The second one creates
|
||||
a textual representation of an uncompressed savegame, by parsing hunks
|
||||
and arrays and such. With both tools you need to be a bit careful
|
||||
since they work on stdin and stdout, which may not deal well with
|
||||
binary data.
|
||||
|
||||
If you have the textual representation of the savegames, you can
|
||||
compare them with regular diff tools.
|
@ -0,0 +1,30 @@
|
||||
Some clarifications about the link graph
|
||||
----------------------------------------
|
||||
|
||||
InitializeLinkGraphs joins all threads, so if the game is abandoned
|
||||
with some threads still running, they're joined as soon as the next game
|
||||
(possibly the title game) is started. See also InitializeGame.
|
||||
|
||||
The MCF (multi-commodity flow) algorithm can be quite CPU-hungry as it's
|
||||
NP-hard and takes exponential time (though with a very small constant
|
||||
factor) in the number of nodes.
|
||||
This is why it is run in a separate thread where possible. However after
|
||||
some time the thread is joined and if it hasn't finished by then the game
|
||||
will hang. This problem gets worse if we are running on a platform without
|
||||
threads. However, as those are usually the ones with less CPU power I
|
||||
assume the contention for the CPU would make the game hard to play even
|
||||
with threads or even without cargodist (autosave ...). I might be wrong,
|
||||
but I won't put any work into this before someone shows me some problem.
|
||||
|
||||
You can configure the link graph recalculation time. A link graph
|
||||
recalculation time of X days means that each link graph job has X days
|
||||
to run before it is joined. The downside is that the flow stats won't be
|
||||
updated before the job is finished and thus a high value means less
|
||||
updates and longer times until changes in capacities are accounted for.
|
||||
If you play a very large map with a complicated link graph you may want to
|
||||
raise the time setting to avoid lags. The same holds for systems with slow
|
||||
CPUs.
|
||||
|
||||
Another option to avoid excessive lags is to reduce the accuracy of link
|
||||
graph calculations. Generally the accuracy is inversely correlated to the
|
||||
CPU requirements of the MCF algorithm.
|
@ -0,0 +1,50 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents more or less nothingness
|
||||
;
|
||||
[metadata]
|
||||
name = NoMusic
|
||||
shortname = NULL
|
||||
version = 0
|
||||
fallback = true
|
||||
!! description STR_BASEMUSIC_NONE_DESCRIPTION
|
||||
|
||||
[files]
|
||||
theme =
|
||||
old_0 =
|
||||
old_1 =
|
||||
old_2 =
|
||||
old_3 =
|
||||
old_4 =
|
||||
old_5 =
|
||||
old_6 =
|
||||
old_7 =
|
||||
old_8 =
|
||||
old_9 =
|
||||
new_0 =
|
||||
new_1 =
|
||||
new_2 =
|
||||
new_3 =
|
||||
new_4 =
|
||||
new_5 =
|
||||
new_6 =
|
||||
new_7 =
|
||||
new_8 =
|
||||
new_9 =
|
||||
ezy_0 =
|
||||
ezy_1 =
|
||||
ezy_2 =
|
||||
ezy_3 =
|
||||
ezy_4 =
|
||||
ezy_5 =
|
||||
ezy_6 =
|
||||
ezy_7 =
|
||||
ezy_8 =
|
||||
ezy_9 =
|
||||
|
||||
[md5s]
|
||||
|
||||
[names]
|
||||
|
||||
[origin]
|
||||
default = This file was part of your OpenTTD installation.
|
@ -0,0 +1,18 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents more or less nothingness
|
||||
;
|
||||
[metadata]
|
||||
name = NoSound
|
||||
shortname = NULL
|
||||
version = 2
|
||||
fallback = true
|
||||
!! description STR_BASESOUNDS_NONE_DESCRIPTION
|
||||
|
||||
[files]
|
||||
samples =
|
||||
|
||||
[md5s]
|
||||
|
||||
[origin]
|
||||
default = This file was part of your OpenTTD installation.
|
@ -0,0 +1,31 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original graphics as on the non-German Transport
|
||||
; Tycoon Deluxe DOS CD.
|
||||
;
|
||||
[metadata]
|
||||
name = original_dos
|
||||
shortname = TTDD
|
||||
version = 1
|
||||
palette = DOS
|
||||
!! description STR_BASEGRAPHICS_DOS_DESCRIPTION
|
||||
|
||||
[files]
|
||||
base = TRG1.GRF
|
||||
logos = TRGI.GRF
|
||||
arctic = TRGC.GRF
|
||||
tropical = TRGH.GRF
|
||||
toyland = TRGT.GRF
|
||||
extra = OPENTTD.GRF
|
||||
|
||||
[md5s]
|
||||
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
|
||||
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
|
||||
TRGC.GRF = ed446637e034104c5559b32c18afe78d
|
||||
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
|
||||
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
|
||||
OPENTTD.GRF =
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
OPENTTD.GRF = This file was part of your OpenTTD installation.
|
@ -0,0 +1,19 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original sounds as on the Transport
|
||||
; Tycoon Deluxe DOS CD.
|
||||
;
|
||||
[metadata]
|
||||
name = original_dos
|
||||
shortname = TTDO
|
||||
version = 0
|
||||
!! description STR_BASESOUNDS_DOS_DESCRIPTION
|
||||
|
||||
[files]
|
||||
samples = SAMPLE.CAT
|
||||
|
||||
[md5s]
|
||||
SAMPLE.CAT = 422ea3dd074d2859bb51639a6e0e85da
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
@ -0,0 +1,31 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original graphics as on the German Transport
|
||||
; Tycoon Deluxe DOS CD. It contains one broken sprite.
|
||||
;
|
||||
[metadata]
|
||||
name = original_dos_de
|
||||
shortname = TTDD
|
||||
version = 0
|
||||
palette = DOS
|
||||
!! description STR_BASEGRAPHICS_DOS_DE_DESCRIPTION
|
||||
|
||||
[files]
|
||||
base = TRG1.GRF
|
||||
logos = TRGI.GRF
|
||||
arctic = TRGC.GRF
|
||||
tropical = TRGH.GRF
|
||||
toyland = TRGT.GRF
|
||||
extra = OPENTTD.GRF
|
||||
|
||||
[md5s]
|
||||
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
|
||||
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
|
||||
TRGC.GRF = ed446637e034104c5559b32c18afe78d
|
||||
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
|
||||
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
|
||||
OPENTTD.GRF =
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
OPENTTD.GRF = This file was part of your OpenTTD installation.
|
@ -0,0 +1,31 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original graphics as on the Transport
|
||||
; Tycoon Deluxe for Windows CD.
|
||||
;
|
||||
[metadata]
|
||||
name = original_windows
|
||||
shortname = TTDW
|
||||
version = 0
|
||||
palette = Windows
|
||||
!! description STR_BASEGRAPHICS_WIN_DESCRIPTION
|
||||
|
||||
[files]
|
||||
base = TRG1R.GRF
|
||||
logos = TRGIR.GRF
|
||||
arctic = TRGCR.GRF
|
||||
tropical = TRGHR.GRF
|
||||
toyland = TRGTR.GRF
|
||||
extra = OPENTTD.GRF
|
||||
|
||||
[md5s]
|
||||
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
|
||||
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
|
||||
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
|
||||
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
|
||||
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
|
||||
OPENTTD.GRF =
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
OPENTTD.GRF = This file was part of your OpenTTD installation.
|
@ -0,0 +1,94 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original music as on the Transport
|
||||
; Tycoon Deluxe for Windows CD.
|
||||
;
|
||||
[metadata]
|
||||
name = original_windows
|
||||
shortname = TTDW
|
||||
version = 1
|
||||
!! description STR_BASEMUSIC_WIN_DESCRIPTION
|
||||
|
||||
[files]
|
||||
theme = GM_TT00.GM
|
||||
old_0 = GM_TT02.GM
|
||||
old_1 = GM_TT06.GM
|
||||
old_2 = GM_TT03.GM
|
||||
old_3 = GM_TT12.GM
|
||||
old_4 = GM_TT08.GM
|
||||
old_5 = GM_TT13.GM
|
||||
old_6 = GM_TT14.GM
|
||||
old_7 = GM_TT10.GM
|
||||
old_8 =
|
||||
old_9 =
|
||||
new_0 = GM_TT04.GM
|
||||
new_1 = GM_TT01.GM
|
||||
new_2 = GM_TT05.GM
|
||||
new_3 = GM_TT15.GM
|
||||
new_4 = GM_TT11.GM
|
||||
new_5 = GM_TT16.GM
|
||||
new_6 = GM_TT09.GM
|
||||
new_7 =
|
||||
new_8 =
|
||||
new_9 =
|
||||
ezy_0 = GM_TT18.GM
|
||||
ezy_1 = GM_TT19.GM
|
||||
ezy_2 = GM_TT21.GM
|
||||
ezy_3 = GM_TT17.GM
|
||||
ezy_4 = GM_TT20.GM
|
||||
ezy_5 = GM_TT07.GM
|
||||
ezy_6 =
|
||||
ezy_7 =
|
||||
ezy_8 =
|
||||
ezy_9 =
|
||||
|
||||
[md5s]
|
||||
GM_TT00.GM = 45cfec1b9d8c7a0ad45e755833cbf221
|
||||
GM_TT01.GM = ab14ed3392d848abd2a2e90a9d75d121
|
||||
GM_TT02.GM = dd4f696e4be5987ce738257b08b50171
|
||||
GM_TT03.GM = a1bfde23343df9e4063419bf29c166b8
|
||||
GM_TT04.GM = 4e6943aa0c455203d76c79389054747d
|
||||
GM_TT05.GM = cee281cb85a2e2343552d97640545a47
|
||||
GM_TT06.GM = 26d1de5efa8675f94065784e9d539e49
|
||||
GM_TT07.GM = 6f2691e17558f552ec4c565e4ab7139c
|
||||
GM_TT08.GM = a42bf2cb3340a822f1a69646fc7a487d
|
||||
GM_TT09.GM = eb35761a58a8df3c59ed8929cce13916
|
||||
GM_TT10.GM = 42fecd686720a785d20a78590c466a82
|
||||
GM_TT11.GM = 50ef1ef02e49d2112786dd45e69dc3ee
|
||||
GM_TT12.GM = 4ce707a0e0e72419f0681dd9bd95271b
|
||||
GM_TT13.GM = e765753be29d889ec818f38009103619
|
||||
GM_TT14.GM = 270e2d63bd32b95a4d007ce15a6ce45f
|
||||
GM_TT15.GM = 89e116a1c0c69f1845cc903a9bfbe460
|
||||
GM_TT16.GM = f824e2371b3bedfe61aad4b9c62dd6be
|
||||
GM_TT17.GM = 1b23eebb0796c1ab99cd97fa7082cf7b
|
||||
GM_TT18.GM = 15650de3bad645d0e88c4f5c7a2df92a
|
||||
GM_TT19.GM = 7aec079e15bd09588660b85545ac4dfc
|
||||
GM_TT20.GM = 1509097889dee617aa1e9a1738a5a930
|
||||
GM_TT21.GM = a8d0aaad02e1a762d8d54cf81da56bab
|
||||
|
||||
[names]
|
||||
GM_TT00.GM = Tycoon DELUXE Theme
|
||||
GM_TT01.GM = Snarl Up
|
||||
GM_TT02.GM = Easy Driver
|
||||
GM_TT03.GM = Little Red Diesel
|
||||
GM_TT04.GM = City Groove
|
||||
GM_TT05.GM = Aliens Ate My Railway
|
||||
GM_TT06.GM = Stoke It
|
||||
GM_TT07.GM = Don't Walk!
|
||||
GM_TT08.GM = Sawyer's Tune
|
||||
GM_TT09.GM = Fell Apart On Me
|
||||
GM_TT10.GM = Can't Get There From Here
|
||||
GM_TT11.GM = Hard Drivin'
|
||||
GM_TT12.GM = Road Hog
|
||||
GM_TT13.GM = Hold That Train!
|
||||
GM_TT14.GM = Broomer's Oil Rag
|
||||
GM_TT15.GM = Goss Groove
|
||||
GM_TT16.GM = Small Town
|
||||
GM_TT17.GM = Cruise Control
|
||||
GM_TT18.GM = Stroll On
|
||||
GM_TT19.GM = Funk Central
|
||||
GM_TT20.GM = Jammit
|
||||
GM_TT21.GM = Movin' On
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
@ -0,0 +1,19 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original sounds as on the Transport
|
||||
; Tycoon Deluxe for Windows CD.
|
||||
;
|
||||
[metadata]
|
||||
name = original_windows
|
||||
shortname = TTDO
|
||||
version = 0
|
||||
!! description STR_BASESOUNDS_WIN_DESCRIPTION
|
||||
|
||||
[files]
|
||||
samples = SAMPLE.CAT
|
||||
|
||||
[md5s]
|
||||
SAMPLE.CAT = 9212e81e72badd4bbe1eaeae66458e10
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
@ -0,0 +1,69 @@
|
||||
# $Id: openttd.desktop.translation.awk 24100 2012-04-08 14:29:31Z rubidium $
|
||||
|
||||
# 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/>.
|
||||
|
||||
#
|
||||
# Awk script to extract translations for baseset descriptions
|
||||
# from lang files for insertion into .obg/obs/obm files.
|
||||
# If there is no translation, there is no output.
|
||||
#
|
||||
# The input file is scanned for the pattern
|
||||
# !! <ini-key> <STR_id>
|
||||
#
|
||||
# The lang files (passed as variable 'langfiles') are scanned for <STR_id> and
|
||||
# the translations are added to the output file:
|
||||
# <ini-key>.<iso-code> = <translation>
|
||||
#
|
||||
|
||||
# Simple insertion sort since not all AWKs have a sort implementation
|
||||
function isort(A) {
|
||||
n = 0
|
||||
for (val in A) {
|
||||
n++;
|
||||
}
|
||||
|
||||
for (i = 2; i <= n; i++) {
|
||||
j = i;
|
||||
hold = A[j]
|
||||
while (A[j - 1] > hold) {
|
||||
j--;
|
||||
A[j + 1] = A[j]
|
||||
}
|
||||
A[j] = hold
|
||||
}
|
||||
|
||||
return n
|
||||
}
|
||||
|
||||
/^!!/ {
|
||||
ini_key = $2;
|
||||
str_id = $3;
|
||||
|
||||
file = langfiles
|
||||
while ((getline < file) > 0) {
|
||||
if (match($0, "##isocode") > 0) {
|
||||
lang = $2;
|
||||
} else if (match($0, "^" str_id " *:") > 0) {
|
||||
sub("^[^:]*:", "", $0)
|
||||
i++;
|
||||
if (lang == "en_GB") {
|
||||
texts[i] = ini_key " = "$0;
|
||||
} else {
|
||||
texts[i] = ini_key "." lang " = "$0;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(file);
|
||||
|
||||
count = isort(texts);
|
||||
for (i = 1; i <= count; i++) {
|
||||
print texts[i]
|
||||
}
|
||||
|
||||
next
|
||||
}
|
||||
|
||||
{ print }
|
@ -0,0 +1,32 @@
|
||||
# $Id$
|
||||
|
||||
# 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/>.
|
||||
|
||||
BEGIN {
|
||||
# Very basic variant function; barely any error checking.
|
||||
# Just use the first argument as the file to start from when assembling everything
|
||||
path = ARGV[1];
|
||||
gsub("[^/\\\\]*$", "", path);
|
||||
assemble(ARGV[1]);
|
||||
}
|
||||
|
||||
# Recursive function for assembling by means of resolving the #includes.
|
||||
function assemble(filename) {
|
||||
while ((getline < filename) > 0) {
|
||||
if (NF == 2 && $1 == "#include" ) {
|
||||
# Remove the quotes.
|
||||
gsub("[\"'<>]", "", $2);
|
||||
assemble(path $2);
|
||||
} else {
|
||||
print $0;
|
||||
}
|
||||
}
|
||||
|
||||
if (close(filename) < 0) {
|
||||
print "Could not open " filename > "/dev/stderr";
|
||||
exit -1;
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
@ -0,0 +1,20 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
-1 * 0 0C "All black palette"
|
||||
-1 * 0 05 18 01
|
||||
-1 * 0 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
|
||||
01
|
@ -1,77 +1,106 @@
|
||||
This package was debianized by Matthijs Kooijman <matthijs@stdin.nl>
|
||||
on Wed, 15 Sep 2004 00:24:01 +0200.
|
||||
|
||||
Upstream author: Ludvig Strigeus (ludde) and many others.
|
||||
Upstream homepage: http://www.openttd.org
|
||||
|
||||
Copyright © 2004-2009 Ludvig Strigeous and others.
|
||||
|
||||
OpenTTD License:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2.0 as
|
||||
published by the Free Software Foundation;
|
||||
|
||||
This program 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 this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
This package contains an embedded version of the "Squirrel" programming
|
||||
language, which is shipped under the following license:
|
||||
|
||||
Copyright (c) 2003-2009 Alberto Demichelis
|
||||
|
||||
This software is provided 'as-is', without any
|
||||
express or implied warranty. In no event will the
|
||||
authors be held liable for any damages arising from
|
||||
the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software
|
||||
for any purpose, including commercial applications,
|
||||
and to alter it and redistribute it freely, subject
|
||||
to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be
|
||||
misrepresented; you must not claim that
|
||||
you wrote the original software. If you
|
||||
use this software in a product, an
|
||||
acknowledgment in the product
|
||||
documentation would be appreciated but is
|
||||
not required.
|
||||
|
||||
2. Altered source versions must be plainly
|
||||
marked as such, and must not be
|
||||
misrepresented as being the original
|
||||
software.
|
||||
|
||||
3. This notice may not be removed or
|
||||
altered from any source distribution.
|
||||
|
||||
This package contains an implementation of the md5 hash algorithm, which
|
||||
is shipped under the following license:
|
||||
|
||||
Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: OpenTTD
|
||||
Upstream-Contact: info@openttd.org, #openttd on irc.oftc.net
|
||||
Source: http://www.openttd.org
|
||||
|
||||
|
||||
Files: *
|
||||
Copyright: © 2004-2012 Ludvig Strigeous and others.
|
||||
License: GPL-2.0
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2.0 as
|
||||
published by the Free Software Foundation;
|
||||
.
|
||||
This program 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 this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: src/3rdparty/squirrel/*
|
||||
Copyright: © 2003-2009 Alberto Demichelis
|
||||
License: Zlib
|
||||
|
||||
Files: src/3rdparty/md5/*
|
||||
Copyright: © 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
|
||||
License: Zlib
|
||||
|
||||
|
||||
License: Zlib
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
.
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software in
|
||||
a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
.
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
.
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
Files: os/dos/exe2coff/*
|
||||
Copyright: © 1998 DJ Delorie
|
||||
License: GPL-2.0 with additional restrictions
|
||||
This document is Copyright (C) DJ Delorie and may be distributed
|
||||
verbatim, but changing it is not allowed.
|
||||
.
|
||||
Source code copyright DJ Delorie is distributed under the terms of the
|
||||
GNU General Public Licence, with the following exceptions:
|
||||
.
|
||||
* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
|
||||
libemu.a are distributed under the terms of the GNU Library General
|
||||
Public License, rather than the GNU GPL.
|
||||
.
|
||||
* Any existing copyright or authorship information in any given source
|
||||
file must remain intact. If you modify a source file, a notice to that
|
||||
effect must be added to the authorship information in the source file.
|
||||
.
|
||||
* Runtime binaries, as provided by DJ in DJGPP, may be distributed
|
||||
without sources ONLY if the recipient is given sufficient information
|
||||
to obtain a copy of djgpp themselves. This primarily applies to
|
||||
go32-v2.exe, emu387.dxe, and stubedit.exe.
|
||||
.
|
||||
* Runtime objects and libraries, as provided by DJ in DJGPP, when
|
||||
linked into an application, may be distributed without sources ONLY
|
||||
if the recipient is given sufficient information to obtain a copy of
|
||||
djgpp themselves. This primarily applies to crt0.o and libc.a.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
Comment:
|
||||
Given only the exe2coff.c file is distributed in the source distribution (and
|
||||
nothing in Debian binary distribution), it seems only the 2nd condition
|
||||
applies.
|
||||
|
||||
Files: os/dos/cwsdpmi/*
|
||||
Source: http://homer.rice.edu/~sandmann/cwsdpmi/index.html
|
||||
Copyright: © 1995-2000 Charles W Sandmann (sandmann@clio.rice.edu)
|
||||
License: Custom binary-only license
|
||||
This is release 5. The files in this binary distribution may be redistributed
|
||||
under the GPL (with source) or without the source code provided:
|
||||
.
|
||||
* CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM.
|
||||
.
|
||||
* CWSDSTUB.EXE internal contents are not modified in any way except via
|
||||
CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it.
|
||||
.
|
||||
* Notice to users that they have the right to receive the source code and/or
|
||||
binary updates for CWSDPMI. Distributors should indicate a site for the
|
||||
source in their documentation.
|
||||
Comment:
|
||||
Files are distributed as binary only, so the second option in the license
|
||||
("without source code provided: ...") is applicable.
|
||||
|
@ -1,2 +1,2 @@
|
||||
?package(openttd):needs="X11" section="Games/Simulation" title="OpenTTD"\
|
||||
command="/usr/share/games/openttd/openttd-wrapper" icon="/usr/share/pixmaps/openttd.32.xpm"
|
||||
command="/usr/games/openttd" icon="/usr/share/pixmaps/openttd.32.xpm"
|
||||
|
@ -0,0 +1,3 @@
|
||||
The files in this directory are not licensed under the same terms as the
|
||||
rest of OpenTTD. Licensing details can be found in OpenTTD's readme.txt
|
||||
and in this directory or subdirectories as well.
|
@ -0,0 +1,3 @@
|
||||
The files in this directory are not licensed under the same terms as the
|
||||
rest of OpenTTD. Licensing details can be found in OpenTTD's readme.txt
|
||||
and in this directory or subdirectories as well.
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue