1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

Compare commits

..

92 Commits

Author SHA1 Message Date
Charles Pigott
e5021a0587 Update: Translations 2019-09-07 23:22:58 +01:00
Niels Martin Hansen
fb51a18357 Update: Changelog for 1.9.3-RC1 and prepare for release 2019-09-07 23:22:58 +01:00
Andy
9f1d80e93b Fix: change Quartz driver colorSpace handling to address certain macOS performance issues (#7644) 2019-09-07 23:22:58 +01:00
glx22
6369e0693d Fix #7188: check the validity of command callback for scripts (#7701) 2019-09-07 23:22:58 +01:00
Daniel Lee
da086a3fde Fix #7626: Allow building drive-through stops over one-way/blocked roads owned by towns (instead of crashing). 2019-09-07 23:22:58 +01:00
Niels Martin Hansen
83f1839e71 Fix #7702: Scaling for highscore screen 2019-09-07 23:22:58 +01:00
JMcKiern
8afc1a7253 Fix #7692: Added industry tile to GetOrderCmdFromTile() (#7709)
Sending order command to an industry tile now checks if a neutral_station is available and sends the order to that station
2019-09-07 23:22:58 +01:00
uvealonso
c70d12ee38 Fix #7704: [OSX] Handle malformed UTF8 strings 2019-09-07 23:22:58 +01:00
TTrebron
ee7ca008c9 Fix #7655: Decrease buttons in cheat window do not work properly 2019-09-07 23:22:58 +01:00
Juriy Petrochenkov
b18c2d140c Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be. 2019-09-07 23:22:58 +01:00
nikolas
a76e5e1970 Fix: Typo in running costs help text 2019-09-07 23:22:58 +01:00
Niels Martin Hansen
59e4ccd7dc Fix: Narrowing cast in one storybook command
CompanyID is 8 bit wide, so this incorrect cast would make it impossible to create story page elements for pages past 255.
2019-09-07 23:22:58 +01:00
Michael Lutz
a82f21f24d Update: Changelog for 1.9.2 and prepare for release 2019-07-07 22:54:44 +02:00
Niels Martin Hansen
46908fb63a Fix: Various reliability and correctness improvements to MIDI on Windows. (#7620) 2019-07-07 22:54:44 +02:00
pnda
8efa99f445 Fix #6666: Mismatched parentheses in RTL languages. (#7480) 2019-07-07 22:54:44 +02:00
dP
c6251426d9 Fix: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**16 (#7560) 2019-07-07 22:54:44 +02:00
unknown
9026736cc1 Fix #5685: Check for free wagons in ScriptVehicleList (#7617) 2019-07-07 22:54:44 +02:00
Niels Martin Hansen
b7a2166962 Fix #7633: Allow zero-cost track conversion to succeed. (#7634) 2019-07-07 22:54:44 +02:00
Michael Lutz
8ea68421b1 Fix #7463: Promote scroll mode setting to basic category. 2019-07-07 22:54:44 +02:00
afc5962881 Fix #7577: Check if linkgraph station index is valid before dereferencing. (#7583) 2019-07-07 22:54:44 +02:00
stormcone
9239381d56 Fix #7224: Drag and drop vehicle group creation does not work correctly.
When drag and drop a vehicle into an empty slot in the vehicle group window it tries to create the new group as the subgroup of the first group (GroupID = 0). This is failing if the dragged vehicle's type is different than the first group's vehicle type.
2019-07-07 22:54:44 +02:00
9dded61af9 Cleanup: Remove unused string. 2019-07-07 22:54:44 +02:00
8fbc5c090b Change: Allow building road stops over self-owned one-way/blocked road. (#7547) 2019-07-07 22:54:44 +02:00
Transportman
00bdd316d7 Fix #7570: Show Github URL in the crashlog window 2019-07-07 22:54:44 +02:00
Corns McGowan
f34284f1a0 Change: Set default setting in server browser of "Advertised" to "Yes". (#7568) 2019-07-07 22:54:44 +02:00
c77659c995 Fix: Clicking on scrollbar 'thumb' moved position up instantly. (#7549) 2019-07-07 22:54:44 +02:00
Charles Pigott
e6877d0823 Fix #7255: Prevent crashlog corruption by only printing the 32 most recent news messages. (#7542) 2019-07-07 22:54:44 +02:00
glx22
beba12f9d6 Fix: vcpkg used to patch lzma.h to define LZMA_API_STATIC for static builds (#7614) 2019-07-07 22:54:44 +02:00
glx22
95fd4ec649 Fix 8fc2b48db: [AzurePipeline] copy/paste error (#7557) 2019-05-28 10:20:32 +01:00
0fa41c7493 Fix #7491: Send company update admin message when bankruptcy counter changes. 2019-05-28 10:20:32 +01:00
60cbcf0742 Fix: Bounds check access to railtype_map. (#7529) 2019-05-28 10:20:32 +01:00
Niels Martin Hansen
e38a4e1e57 Change: Zoom title game by UI zoom level 2019-05-28 10:20:32 +01:00
Niels Martin Hansen
5965f184c2 Fix: Manager name in company news was being clipped 2019-05-28 10:20:32 +01:00
Niels Martin Hansen
db20c7f461 Fix: Scale news ticker scroll speed by UI scale 2019-05-28 10:20:32 +01:00
Niels Martin Hansen
e2e8872e82 Fix: Scale all min size and padding by UI scale 2019-05-28 10:20:32 +01:00
SamuXarick
4750d2836c Fix 50e08f333a: Creating a cargo subsidy with town as source did not consider min population. (#7493) 2019-05-28 10:20:32 +01:00
stormcone
b1c31f9500 Fix: Typos. (#7517) 2019-05-28 10:20:32 +01:00
Charles Pigott
a6879e9180 Fix 5db883f: Railtype bits were moved too late, leading to rails under bridges losing their type 2019-05-28 10:20:32 +01:00
Charles Pigott
5eb7d49024 Fix #6507: Don't try to load invalid depots from older savegames 2019-05-28 10:20:32 +01:00
Charles Pigott
69c0332813 Cleanup: Delete GetSavegameType function since it's been commented out since 2005 2019-05-28 10:20:32 +01:00
Charles Pigott
b11942cf44 Fix: Crash when attempting to load old save game with GRFs set
GroupStatistics pool was not initialised before trying to delete vehicles (specifically, trams with no tram track)
2019-05-28 10:20:32 +01:00
glx22
ef6995e8d4 Fix 2bb80d2: really increase the maximum number of GameScript texts to 64k (#7555) 2019-05-28 10:20:32 +01:00
glx22
c0fd2b969b Fix #7553: check bounds when loading strings (#7554) 2019-05-28 10:20:32 +01:00
683778fd7a Codechange: Use std::underlying_type for DECLARE_POSTFIX_INCREMENT. 2019-05-28 10:20:32 +01:00
63eeadef17 Fix: Replace int with std::underlying_type in DECLARE_ENUM_AS_BIT_SET.
This fixes 64 bit uses of this macro.
2019-05-28 10:20:32 +01:00
glx22
e526b2ccd3 Fix: [AzurePipeline] ${Agent.JobName} content changed (#7556)
* Fix: [AzurePipeline] ${Agent.JobName} content changed

* Fix: [AzurePipeline] also update commit-checker condition
2019-05-28 10:20:32 +01:00
b61ef7e0d2 Update: Changelog for 1.9.1 and prepare for release 2019-04-08 20:37:59 +01:00
120d76c5c1 Fix #7478: Don't remove NewGRF objects on company take-over. (#7483) 2019-04-08 20:06:02 +01:00
Patric Stout
316ecb07ee Fix: update AI/Game changelog to indicate 1.9.0 is released 2019-04-08 20:06:02 +01:00
Patric Stout
2c21f52e1d Update: translations backported from master 2019-04-08 20:06:02 +01:00
kiwitreekor
0a8e9e9757 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 2019-04-08 20:06:02 +01:00
glx22
6bfec89fcf Fix #6564: enforce types of arguments for station name strings (#7419) 2019-04-08 20:06:02 +01:00
glx22
1f39a31eb7 Fix: [Windows] OpenTTD window may be inactive when an error happens (#7482) 2019-04-08 20:06:02 +01:00
glx22
abc0325ef1 Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465) 2019-04-08 20:06:02 +01:00
frosch
54451a18c6 Fix #7447, 3357cac847: Action 4 has feature 48 'original strings'. (#7449) 2019-04-08 20:06:02 +01:00
glx22
d3e9e8c2ce Fix #7433: don't use AirportSpec substitute if it's not set (#7435) 2019-04-08 20:06:02 +01:00
Patric Stout
0b340fd376 Update: prepare for stable release (disable assert) 2019-04-01 19:26:10 +02:00
Patric Stout
05b3467021 Update: Changelog for 1.9.0 and prepare for release 2019-04-01 19:26:10 +02:00
Patric Stout
88f2084646 Update: translations backported from master 2019-04-01 19:26:10 +02:00
Patric Stout
1303aba5ea Update: translations backported from master 2019-03-30 10:55:29 +01:00
124650c554 Fix #7411: Use industry production callback (if used) on initial industry cargo generation. (#7412) 2019-03-30 10:55:29 +01:00
Ingo von Borstel
685af3629e Add: Titlegame for 1.9 branch. Savegame by JGR (#7443) 2019-03-30 10:21:08 +01:00
Patric Stout
9ae1726eed Update: Changelog for 1.9.0-RC2 and prepare for release 2019-03-24 17:16:15 +01:00
Patric Stout
3f0268b4b3 Update: translations backported from master 2019-03-24 17:16:15 +01:00
Patric Stout
cf7a1fc8c6 Revert: "Change: Allow AI companies to start immediately."
This reverts commit 011257dc88.

This commit was not working properly. Attempts are made to fix it,
but so close to 1.9, it sounds a lot better to revert it from the
1.9 branch, and keep developing it further in 1.10.
2019-03-24 17:16:15 +01:00
Patric Stout
7a9782e6f4 Revert: "Fix #7151: Hang when concurrently starting AIs in multiplayer, or with shift pressed."
This reverts commit b1e40b6b56.

This is a fix for a patch that will be reverted in the next commit.
2019-03-24 17:16:15 +01:00
6a1f217d30 Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally
update the map array for tree tiles.
2019-03-24 17:16:15 +01:00
174b0da90f Fix: Filtered file list did not scroll properly. (#7402) 2019-03-24 15:24:21 +01:00
Patric Stout
a2c4f9314d Update: translations backported from master 2019-03-24 15:24:21 +01:00
Patric Stout
652289972e Codechange: fix Intel C++ Compiler linking issues.
GetAircraftFlightLevel<Aircraft> is only used in static functions
inside aircraft_cmd.cpp. With GCC, Clang and MSVC this is not an
issue, but on ICC fails linking, because it doesn't find this
version of this template. Possibly these two pieces of information
are linked.
Explicit defining the function fixes the issue.
2019-03-24 15:24:21 +01:00
Patric Stout
0a5b3b955c Fix: [AzurePipelines] vcpkg is now preinstalled on Windows images
So instead of integrating our own, we only copy our precompiled
binaries into the right folder.
2019-03-24 15:24:21 +01:00
79d2acff24 Fix 4da83d2f66: Remove measurement tooltips when completed. 2019-03-24 15:24:21 +01:00
Michael Lutz
e3a082ce7c Fix #7391, 9b99b95: Don't invalidate go to depot orders of non-aircraft when invalidating hangar orders that happen to share IDs.
This was caused because hangars are referred to by station ID, which is not unique with respect to depot IDs.
2019-03-24 15:24:21 +01:00
213c490e73 Fix #7384: Industry Chain tooltips did not display on right-click.
This is fixed by handling the new Window::OnTooltip() event instead of OnHover()
2019-03-24 15:24:21 +01:00
4e17e2bc6e Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
2019-03-24 15:24:21 +01:00
56a69f1de7 Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.
Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
2019-03-24 15:24:21 +01:00
64726d5213 Fix: Bounds check NewGRF feature. 2019-03-24 15:24:21 +01:00
712936745a Codechange: NewGRF features are documented in hex, so display as hex. 2019-03-24 15:24:21 +01:00
stormcone
2fb4575f5f Fix f58fa80e: Wrong company performance rating when money exceeds INT_MAX. (#7382)
Company performance rating calculation does not take into account the companies' money when those exceeds INT_MAX.
2019-03-24 15:24:21 +01:00
Jonathan G Rennison
5e9d39e8bc Change: Include _current_company in crashlog AI config line
_current_company is not currently logged anywhere in the crashlog.
_local_company is logged, despite being much less useful than
_current_company.
This change logs _current_company alongside _local_company.
2019-03-24 15:24:21 +01:00
490d6ad51f Cleanup: Update changed string in language files. 2019-03-24 15:24:21 +01:00
38e93182c5 Fix e66cec8f86: Permit loading of industry production callback with invalid cargo type.
It is only an error if the invalid result is actually used. This will be silently ignored at the moment.
It is still an error if a duplicate cargo type is returned.
2019-03-24 15:24:21 +01:00
glx
3a97b541af Fix: [AzurePipelines] run commit checker only for PRs 2019-03-24 15:24:21 +01:00
nikolas
80dd397ce4 Fix: spelling for a few real town names (#7338)
Added special characters to mostly Slovak towns, a few Spanish, and one Turkish.
2019-03-24 15:24:21 +01:00
47596d3eda Fix: Runway too short for large aircraft message should not depend on plane crashes setting. (#7325) 2019-03-24 15:24:21 +01:00
glx22
f7f1efc84f Fix: [AzurePipelines] Run commit checker only for PRs and pass it the target branch (#7356) 2019-03-10 13:44:45 +01:00
glx
383e2d1082 Fix e4cc06f67: [AzurePipelines] rebase only for PRs 2019-03-10 13:44:45 +01:00
glx
aefe44e67e Fix: [AzurePipelines] don't assume master as target branch when rebasing PRs 2019-03-10 13:44:45 +01:00
glx22
1de8e1b801 Fix 13962a847, 00d28a500: forgotten squirrel_export run (#7345) 2019-03-10 13:44:45 +01:00
54c5bac8f7 Fix #7334: Ship lost after crossing bridge due to path cache not being consumed while on final bridge end. 2019-03-10 13:44:45 +01:00
SamuXarick
948de16255 Cleanup: Remove repeated network error message on connection timeout. (#7327) 2019-03-10 13:44:45 +01:00
Patric Stout
88c5122b39 Update: Changelog for 1.9.0-RC1 and prepare for release 2019-03-03 20:53:40 +01:00
943 changed files with 19821 additions and 25355 deletions

View File

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

1
.github/FUNDING.yml vendored
View File

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

3
.gitignore vendored
View File

@@ -13,9 +13,6 @@ bin/baseset/*
!bin/baseset/no_sound.obs
!bin/baseset/no_music.obm
!bin/baseset/orig_*.obm
!bin/game
bin/game/*
!bin/game/compat*.nut
!bin/scripts
bin/scripts/*
!bin/scripts/*.example

View File

@@ -1,141 +0,0 @@
# Compiling OpenTTD
## Required/optional libraries
The following libraries are used by OpenTTD for:
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
heightmaps
- liblzo2: (de)compressing of old (pre 0.3.0) savegames
- liblzma: (de)compressing of savegames (1.1.0 and later)
- libpng: making screenshots and loading heightmaps
- libfreetype: loading generic fonts and rendering them
- libfontconfig: searching for fonts, resolving font names to actual fonts
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and
natural sorting of strings (Linux only)
- libSDL2: hardware access (video, sound, mouse) (not required for Windows or macOS)
OpenTTD does not require any of the libraries to be present, but without
liblzma you cannot open most recent savegames and without zlib you cannot
open most older savegames or use the content downloading system.
Without libSDL/liballegro on non-Windows and non-macOS machines you have
no graphical user interface; you would be building a dedicated server.
## Windows:
You need Microsoft Visual Studio 2015 Update 3 or newer.
You can download the free Visual Studio Community Edition from Microsoft at
https://visualstudio.microsoft.com/vs/community/.
OpenTTD needs the Platform SDK, if it isn't installed already. This can be
done during installing Visual Studio, by selecting
`Visual C++ MFC for x86 and x64` (and possibly
`Visual C++ ATL for x86 and x64` depending on your version). If not, you
can get download it as [MS Windows Platform SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk).
Install the SDK by following the instructions as given.
Dependencies for OpenTTD on Windows are handled via
[vcpkg](https://github.com/Microsoft/vcpkg/). First you need to install vcpkg
by following the `Quick Start` instructions of their
[README](https://github.com/Microsoft/vcpkg/blob/master/README.md).
After this, you can install the dependencies OpenTTD needs. We advise to use
the `static` versions, and OpenTTD currently needs the following dependencies:
- liblzma
- libpng
- lzo
- zlib
To install both the x64 (64bit) and x86 (32bit) variants (though only one is necessary), you can use:
```ps
.\vcpkg install liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
.\vcpkg install liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
```
Open the relevant project file and it should build automatically.
- VS 2015: projects/openttd_vs140.sln
- VS 2017: projects/openttd_vs141.sln
- VS 2019: projects/openttd_vs142.sln
Set the build mode to `Release` in
`Build > Configuration manager > Active solution configuration`.
You can now compile.
If everything works well the binary should be in `objs\Win[32|64]\Release\openttd.exe`
and in `bin\openttd.exe`
The OpenTTD wiki may provide additional help with [compiling for Windows](https://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C%2B%2B_2015).
You can also build OpenTTD with MSYS2/MinGW-w64 or Cygwin/MinGW using the Makefile. The OpenTTD wiki may provide additional help with [MSYS2](https://wiki.openttd.org/Compiling_on_Windows_using_MSYS2)
## Linux, Unix, Solaris:
OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'.
However, for the first build one has to do a '`./configure`' first.
The OpenTTD wiki may provide additional help with:
- [compiling for Linux and *BSD](https://wiki.openttd.org/Compiling_on_%28GNU/%29Linux_and_*BSD)
- [compiling for Solaris](https://wiki.openttd.org/Compiling_on_Solaris)
## macOS:
Use '`make`' or Xcode (which will then call make for you)
This will give you a binary for your CPU type (PPC/Intel)
However, for the first build one has to do a '`./configure`' first.
To make a universal binary type '`./configure --enable-universal`'
instead of '`./configure`'.
The OpenTTD wiki may provide additional help with [compiling for macOS](https://wiki.openttd.org/Compiling_on_Mac_OS_X).
## Haiku:
Use '`make`', but do a '`./configure`' before the first build.
The OpenTTD wiki may provide additional help with [compiling for Haiku](https://wiki.openttd.org/Compiling_on_Haiku).
## OS/2:
A comprehensive GNU build environment is required to build the OS/2 version.
The OpenTTD wiki may provide additional help with [compiling for OS/2](https://wiki.openttd.org/Compiling_on_OS/2).
## Supported compilers
The following compilers are tested with and known to compile OpenTTD:
- Microsoft Visual C++ (MSVC) 2015, 2017 and 2019.
- GNU Compiler Collection (GCC) 4.8 - 9.
- Clang/LLVM 3.9 - 8
The following compilers are known not to compile OpenTTD:
In general, this is because these old versions do not (fully) support modern
C++11 language features.
- Microsoft Visual C++ (MSVC) 2013 and earlier.
- GNU Compiler Collection (GCC) 4.7 and earlier.
- Clang/LLVM 3.8 and earlier.
If any of these, or any other, compilers can compile OpenTTD, let us know.
Pull requests to support more compilers are welcome.
## Compilation of base sets
To recompile the extra graphics needed to play with the original Transport
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
GRFCodec can be found at https://www.openttd.org/download-grfcodec.
The compilation of these extra graphics does generally not happen, unless
you remove the graphics file using '`make maintainer-clean`'.
Re-compilation of the base sets, thus also use of '`--maintainer-clean`' can
leave the repository in a modified state as different grfcodec versions can
cause binary differences in the resulting grf. Also translations might have
been added for the base sets which are not yet included in the base set
information files. Use the configure option '`--without-grfcodec`' to avoid
modification of the base set files by the build process.

View File

@@ -5,26 +5,21 @@ Looking to contribute something to OpenTTD? **Here's how you can help.**
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project.
In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
## Using the issue tracker
The [issue tracker](https://github.com/OpenTTD/OpenTTD/issues) is the preferred channel for [bug reports](#bug-reports), but please respect the following restrictions:
* Please **do not** use the issue tracker for help playing or using OpenTTD.
Please try [irc](https://wiki.openttd.org/IRC_channel), or the [forums](https://www.tt-forums.net/)
* Please **do not** use the issue tracker for help playing or using OpenTTD. Please try [irc](https://wiki.openttd.org/IRC_channel), or the [forums](https://www.tt-forums.net/)
* Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
* Please **do not** post comments consisting solely of "+1" or ":thumbsup:".
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.
We reserve the right to delete comments which violate this rule.
* Please **do not** open issues or pull requests regarding add-on content in NewGRF, GameScripts, AIs, etc.
These are created by third-parties. Please try [irc](https://wiki.openttd.org/IRC_channel) or the [forums](https://www.tt-forums.net/) to discuss these.
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. We reserve the right to delete comments which violate this rule.
* Please **do not** open issues or pull requests regarding add-on content in NewGRF, GameScripts, AIs, etc. These are created by third-parties. Please try [irc](https://wiki.openttd.org/IRC_channel) or the [forums](https://www.tt-forums.net/) to discuss these.
## Bug reports
@@ -74,15 +69,13 @@ Example:
> causing the bug, and potential solutions (and your opinions on their
> merits).
## Feature requests
Before opening a feature request, please take a moment to find out whether your idea fits with the [scope and goals](./CONTRIBUTING.md#project-goals) of the project.
Before opening a feature request, please take a moment to find out whether your idea fits with the scope and aims of the project.
It's up to *you* to make a strong case to convince the project's developers of the merits of this feature.
Please provide as much detail and context as possible.
This means don't request for a solution, but describe the problem you see and how/why you think it should be fixed.
Please provide as much detail and context as possible. This means don't request for a solution, but describe the problem you see and how/why you think it should be fixed.
For feature request we have a strict policy.
@@ -95,18 +88,14 @@ Many of those ideas etc do have a place on the [forums](https://www.tt-forums.ne
It's usually best discuss in [irc](https://wiki.openttd.org/IRC_channel) before opening a feature request or working on a large feature in a fork.
Discussion in irc can take time, but it can be productive and avoid disappointment :)
## Pull requests
Good pull requests—patches, improvements, new features—are a fantastic help.
They should remain focused in scope and avoid containing unrelated commits.
Pull requests should fit with the [goals of the project](./CONTRIBUTING.md#project-goals).
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
**Please do ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
Every pull request should have a clear scope, with no unrelated commits.
[Code style](https://wiki.openttd.org/Coding_style) must be complied with for pull requests to be accepted; this also includes [commit message format](https://wiki.openttd.org/Coding_style#Commit_message).
Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage).
Adhering to the following process is the best way to get your work included in the project:
@@ -158,8 +147,17 @@ git push
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `master` branch.
**IMPORTANT**: By submitting a pull request or patch, you agree to the [License](#license) and the [Privacy Notice](CONTRIBUTING.md#privacy-notice).
**IMPORTANT**: By submitting a patch, you agree to the [License](#license).
### Privacy Notice
We would like to make you aware that contributing to OpenTTD via git will permanently store the name and email address you provide as well as the actual changes and the time and date you made it inside git's version history.
This is inevitable, because it is a main feature of git. If you are concerned about your privacy, we strongly recommend to use "Anonymous &lt;anonymous@openttd.org&gt;" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made. As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
Please also note that your commit is public and as such will potentially be processed by many third-parties. Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed. If you would not like to accept this risk, please do either commit anonymously or refrain from contributing to the OpenTTD project.
### Pull request validation
@@ -167,99 +165,15 @@ Continuous integration (CI) tools monitor pull requests, and help us identify bu
The results of the CI tests will show on your pull request.
By clicking on Details you can further zoom in; in case of a failure it will show you why it failed.
In case of success it will report how awesome you were.
By clicking on Details you can further zoom in; in case of a failure it will show you why it failed. In case of success it will report how awesome you were.
Tip: [commit message format](https://wiki.openttd.org/Coding_style#Commit_message) is a common reason for pull requests to fail validation.
## Code guidelines
[Code style](https://wiki.openttd.org/Coding_style) must be adhered to for pull requests to be accepted
### Are there any development docs?
There is no single source for OpenTTD development docs. It's a complex project with a long history, and multiple APIs.
A good entry point is [Development](https://wiki.openttd.org/Development) on the OpenTTD wiki; this provides links to wiki documentation and other sources.
The GitHub repo also includes some non-comprehensive documentation in [/docs](./docs).
You may also want the guide to [compiling OpenTTD](./COMPILING.md).
## Project goals
### What are the goals of the official branch?
The main goals of the official branch are:
- Stay faithful to the original gameplay from Transport Tycoon Deluxe
- Improve the user interface
- Allow extending the gameplay with add-ons / mods via supported content APIs
- Provide a (relatively) stable core for both players of the official branch, and for authors of add-ons and maintainers of patchpacks
In contrast, extending or altering the gameplay of the base game is not encouraged.
The rationale behind these goals is that people have different opinions about what OpenTTD is and what it should be.
When it comes to gameplay, there are at least these groups of people:
- *Model railway (mostly singleplayer)*: build "realistic" landscapes, roleplay a world, or even replicate historical scenarios
- *Economical challenge (mostly singleplayer)*: run a business with economical challenges
- *Transport challenge (singleplayer or cooperative multiplayer)*: build efficient track layouts with high cargo throughput and tons of vehicles
- *Competitive speed run (competitive multiplayer)*: maximize some goal in some limited amount of time
When it comes to gameplay features there are at least these groups of interests:
- *Control freak:* micromanagement like conditional orders, refitting and loading etc.
- *Casual:* automatisation like cargodist, path based signalling etc.
To please everyone, the official branch tries to stay close to the original gameplay; after all, that is what everyone brought here.
The preferred method to alter and extent the gameplay is via add-ons like NewGRF and GameScripts.
For a long time, the official branch was also open to features which could be enabled/disabled, but the corner-cases that came with some configurations have rendered some parts of the code very complicated.
Today, new features have to work with all the already existing features, which is not only challenging in corner cases, but also requires spending considerable more work than just "making it work in the game mode that I play".
The preferred method to introduce new gameplay features is to extend the content APIs, supporting ever more add-on content / mods.
This moves conflict-solving away from the codebase to content authors / players.
It is more accepted for add-ons not working together than the base game not working with certain setting combinations.
In general the game should allow anything that doesn't violate basic rules, but it should warn players if they take potentially dangerous or "stupid" actions.
For example, players are not prevented from starting vehicles without orders, but will receive a warning about vehicles having too few orders.
This lack of limitation has led to players challenging themselves to create networks where all vehicles have no orders, increasing gameplay possibilities.
### I do not agree with the goals of the official branch, what can I do instead?
Fork! There is a rich history of experimental patches for OpenTTD.
Many of these will never be accepted for core, but are creative and interesting ways to modify OpenTTD.
Sometimes patches are combined into long-running patchpacks, modified OpenTTD versions which can be downloaded by anyone, or modified OpenTTD clients for dedicated multiplayer servers.
One of the reasons to keep core relatively stable is to make life easier for patch authors and patchpack maintainers where possible.
Patchpack discussions and related topics may be found in community sites such as [TT-Forums development section](https://www.tt-forums.net/viewforum.php?f=33).
## Legal stuff
### License
By contributing your code, you agree to license your contribution under the [GPL v2](https://github.com/OpenTTD/OpenTTD/blob/master/COPYING.md).
### Privacy Notice
We would like to make you aware that contributing to OpenTTD via git will permanently store the name and email address you provide as well as the actual changes and the time and date you made it inside git's version history.
This is inevitable, because it is a main feature of git.
If you are concerned about your privacy, we strongly recommend to use "Anonymous &lt;anonymous@openttd.org&gt;" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made.
As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
Please also note that your commit is public and as such will potentially be processed by many third-parties.
Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed.
If you would not like to accept this risk, please do either commit anonymously or refrain from contributing to the OpenTTD project.
## License
By contributing your code, you agree to license your contribution under the [GPL v2](https://github.com/OpenTTD/OpenTTD/blob/master/COPYING).
### Attribution of this Contributing Guide

View File

@@ -1,19 +1,18 @@
This is the license which applies to OpenTTD with the exception of some
3rd party modules. See [./README.md](./README.md) for details
3rd party modules. See README.md for details
GNU General Public License
==========================
_Version 2, June 1991_
_Copyright © 1989, 1991 Free Software Foundation, Inc.,_
_51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA_
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
Preamble
The licenses for most software are designed to take away your
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
@@ -23,47 +22,48 @@ using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: **(1)** copyright the software, and
**(2)** offer you this license which gives you legal permission to copy,
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
**0.** This License applies to any program or other work which contains
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
@@ -80,7 +80,7 @@ is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
@@ -91,27 +91,29 @@ along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
**2.** You may modify your copy or copies of the Program or any portion
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
* **a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
* **b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
* **c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
@@ -133,24 +135,26 @@ with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
**3.** You may copy and distribute the Program (or a work based on it,
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
* **a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
* **b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
* **c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
@@ -169,7 +173,7 @@ access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
@@ -177,7 +181,7 @@ However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
**5.** You are not required to accept this License, since you have not
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
@@ -186,7 +190,7 @@ Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on the
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
@@ -194,7 +198,7 @@ restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
**7.** If, as a consequence of a court judgment or allegation of patent
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
@@ -226,7 +230,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
@@ -234,7 +238,7 @@ those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
**9.** The Free Software Foundation may publish revised and/or new versions
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
@@ -247,7 +251,7 @@ Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
**10.** If you wish to incorporate parts of the Program into other free
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
@@ -255,9 +259,9 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
### NO WARRANTY
NO WARRANTY
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
@@ -267,7 +271,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
@@ -277,15 +281,15 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
@@ -317,20 +321,20 @@ when it starts in an interactive mode:
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w` and `show c` should show the appropriate
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w` and `show c`; they could even be
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may

View File

@@ -289,15 +289,16 @@ EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = WITH_ZLIB \
PREDEFINED = ENABLE_NETWORK \
WITH_ZLIB \
WITH_LZO \
WITH_LIBLZMA \
WITH_LZMA \
WITH_SDL \
WITH_PNG \
WITH_FONTCONFIG \
WITH_FREETYPE \
WITH_ICU_I18N \
WITH_ICU_LX \
WITH_ICU_SORT \
WITH_ICU_LAYOUT \
UNICODE \
_UNICODE \
_GNU_SOURCE \

View File

@@ -69,10 +69,10 @@ endif
$(Q)cp "$(BIN_DIR)/baseset/opntitle.dat" "$(BASESET_DIR)/"
$(Q)cp "$(BIN_DIR)/baseset/"*.obm "$(BASESET_DIR)/"
$(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/"
$(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/COPYING.md" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.md" "$(BUNDLE_DIR)/docs/"
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
$(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/"
ifdef MAN_DIR
$(Q)mkdir -p "$(BUNDLE_DIR)/man/"
@@ -88,7 +88,13 @@ ifdef MENU_DIR
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
endif
ifeq ($(TTD), openttd.exe)
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/COPYING.md" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
ifeq ($(OS), DOS)
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/"
ifndef STRIP
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.exe" "$(TTD_DIR)/"
endif
endif
endif
### Packing the current bundle into several compressed file formats ###
@@ -153,7 +159,7 @@ bundle_dmg: bundle
bundle_exe: all
@echo '[BUNDLE] Creating $(BUNDLE_NAME).exe'
$(Q)mkdir -p "$(BUNDLES_DIR)"
$(Q)unix2dos "$(ROOT_DIR)/docs/"* "$(ROOT_DIR)/README.md" "$(ROOT_DIR)/COPYING.md" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
$(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/README.md" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
$(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
$(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
@@ -190,7 +196,7 @@ ifndef DO_NOT_INSTALL_CHANGELOG
endif
ifndef DO_NOT_INSTALL_LICENSE
$(Q)install -d "$(INSTALL_DOC_DIR)"
$(Q)install -m 644 "$(BUNDLE_DIR)/COPYING.md" "$(INSTALL_DOC_DIR)"
$(Q)install -m 644 "$(BUNDLE_DIR)/COPYING" "$(INSTALL_DOC_DIR)"
endif
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm"
ifdef ICON_THEME_DIR

View File

@@ -50,7 +50,7 @@ RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CA
all: config.pwd config.cache
ifdef DISTCC
@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN parameter"; echo; fi
@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
endif
@for dir in $(DIRS); do \
$(MAKE) -C $$dir all || exit 1; \

View File

@@ -139,7 +139,7 @@ $(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP)
$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.rc=%.rc)'
@@ -249,7 +249,7 @@ $(filter %sse4.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
$(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP)
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)'
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $<
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $<
$(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP)
$(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)'
@@ -270,6 +270,10 @@ $(TTD): $(OBJS) $(CONFIG_CACHE_LINKER)
ifdef STRIP
$(Q)$(STRIP) $@
endif
ifeq ($(OS), DOS)
$(E) '$(STAGE) Adding CWSDPMI stub to $@'
$(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@
endif
# Revision files

180
README.md
View File

@@ -3,8 +3,6 @@
## Table of contents
- 1.0) [About](#10-about)
- 1.1) [Compiling OpenTTD](#11-compiling-openttd)
- 1.2) [Contributing to OpenTTD](#12-contributing-to-openttd)
- 2.0) [Contacting](#20-contacting)
- 2.1) [Reporting bugs](#21-reporting-bugs)
- 2.2) [Reporting desyncs](#22-reporting-desyncs)
@@ -18,11 +16,15 @@
- 5.1) [Logging of potentially dangerous actions](#51-logging-of-potentially-dangerous-actions)
- 5.2) [Frame rate and performance metrics](#52-frame-rate-and-performance-metrics)
- 6.0) [Configuration file](#60-configuration-file)
- 7.0) [Translating](#70-translating)
- 7.1) [Translation](#71-translation)
- 7.2) [Previewing](#72-previewing)
- 8.0) [Troubleshooting](#80-troubleshooting)
- 9.0) [Licensing](#90-licensing)
- 7.0) [Compiling](#70-compiling)
- 7.1) [Required/optional libraries](#71-requiredoptional-libraries)
- 7.2) [Supported compilers](#72-supported-compilers)
- 7.3) [Compilation of base sets](#73-compilation-of-base-sets)
- 8.0) [Translating](#80-translating)
- 8.1) [Translation](#81-translation)
- 8.2) [Previewing](#82-previewing)
- 9.0) [Troubleshooting](#90-troubleshooting)
- 10.0) [Licensing](#100-licensing)
- X.X) [Credits](#xx-credits)
## 1.0) About
@@ -35,14 +37,6 @@ OpenTTD is licensed under the GNU General Public License version 2.0,
but includes some 3rd party software under different licenses. See the
section "Licensing" below for details.
## 1.1) Compiling OpenTTD
Instructions for compiling OpenTTD can be found in [./COMPILING.md](COMPILING.md)
## 1.2) Contributing to OpenTTD
We welcome contributors to OpenTTD. More information for contributors can be found in [./CONTRIBUTING.md](CONTRIBUTING.md)
## 2.0) Contacting
The easiest way to contact the OpenTTD team is by submitting bug reports or
@@ -158,10 +152,12 @@ OpenTTD has been ported to several platforms and operating systems. It should
not be very difficult to port it to a new platform. The currently working
platforms are:
- BeOS (SDL or Allegro)
- DOS (Allegro)
- FreeBSD (SDL)
- Haiku (SDL)
- Linux (SDL or Allegro)
- macOS (universal) (Cocoa video and sound drivers)
- MorphOS (SDL)
- OpenBSD (SDL)
- OS/2 (SDL)
- Windows (Win32 GDI (faster) or SDL or Allegro)
@@ -517,7 +513,136 @@ When you cannot find openttd.cfg you should look in the directories as
described in section 4.2. If you do not have an openttd.cfg OpenTTD will
create one after closing.
## 7.0) Translating
## 7.0) Compiling
### Windows:
You need Microsoft Visual Studio 2015 Update 3 or more recent. Open the project file
and it should build automatically. In case you want to build with SDL support
you need to add WITH_SDL to the project settings.
PNG (WITH_PNG), ZLIB (WITH_ZLIB), LZO (WITH_LZO), Freetype (WITH_FREETYPE) and
LZMA (WITH_LZMA) support is enabled by default. For these to work you need their
development files. To get them just use vcpkg from https://github.com/Microsoft/vcpkg
using x86-windows-static and x64-windows-static triplets.
For more help with VS see docs/Readme_Windows_MSVC.md.
You can also build it using the Makefile with MSYS/MinGW or Cygwin/MinGW.
Please read the Makefile for more information.
### Solaris, FreeBSD, OpenBSD:
Use '`gmake`', but do a '`./configure`' before the first build.
### Linux/Unix:
OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'.
However, for the first build one has to do a '`./configure`' first.
### macOS:
Use '`make`' or Xcode (which will then call make for you)
This will give you a binary for your CPU type (PPC/Intel)
However, for the first build one has to do a '`./configure`' first.
To make a universal binary type '`./configure --enabled-universal`'
instead of '`./configure`'.
### BeOS:
Use '`make`', but do a '`./configure`' before the first build.
### MorphOS:
Use '`make`'. However, for the first build one has to do a '`./configure`'
first. Note that you need the MorphOS SDK, latest libnix updates (else C++
parts of OpenTTD will not build) and the powersdl.library SDK. Optionally libz,
libpng and freetype2 developer files.
### OS/2:
A comprehensive GNU build environment is required to build the OS/2 version.
See the docs/Readme_OS2.txt file for more information.
### DOS:
A build environment with DJGPP is needed as well as libraries such as
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
website. Compilation is straight forward: use '`make`', but do a '`./configure`'
before the first build. The build binary will need cwsdpmi.exe to be in
the same directory as the openttd executable. cwsdpmi.exe can be found in
the os/dos/cwsdpmi subdirectory. If you compile with stripping turned on a
binary will be generated that does not need cwsdpmi.exe by adding the
cswdstub.exe to the created OpenTTD binary.
### 7.1) Required/optional libraries
The following libraries are used by OpenTTD for:
- libSDL/liballegro: hardware access (video, sound, mouse)
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
heightmaps
- liblzo2: (de)compressing of old (pre 0.3.0) savegames
- liblzma: (de)compressing of savegames (1.1.0 and later)
- libpng: making screenshots and loading heightmaps
- libfreetype: loading generic fonts and rendering them
- libfontconfig: searching for fonts, resolving font names to actual fonts
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and
natural sorting of strings.
OpenTTD does not require any of the libraries to be present, but without
liblzma you cannot open most recent savegames and without zlib you cannot
open most older savegames or use the content downloading system.
Without libSDL/liballegro on non-Windows and non-macOS machines you have
no graphical user interface; you would be building a dedicated server.
### 7.2) Supported compilers
The following compilers are known to compile OpenTTD:
- Microsoft Visual C++ (MSVC) 2015, 2017 and 2019.
- GNU Compiler Collection (GCC) 3.3 - 4.4, 4.6 - 4.8.
- Versions 4.1 and earlier give bogus warnings about uninitialised variables.
- Versions 4.4, 4.6 give bogus warnings about freeing non-heap objects.
- Versions 4.6 and later give invalid warnings when lto is enabled.
- Intel C++ Compiler (ICC) 12.0.
- Clang/LLVM 2.9 - 3.0
Version 2.9 gives bogus warnings about code nonconformity.
The following compilers are known not to compile OpenTTD:
- Microsoft Visual C++ (MSVC) 2013 and earlier.
These old versions do not support modern C++ language features.
- GNU Compiler Collection (GCC) 3.2 and earlier.
These old versions fail due to OpenTTD's template usage.
- GNU Compiler Collection (GCC) 4.5. It optimizes enums too aggressively.
See https://github.com/OpenTTD/OpenTTD/issues/5513 and references therein.
- Intel C++ Compiler (ICC) 11.1 and earlier.
- Version 10.0 and earlier fail a configure check and fail with recent
system headers.
- Version 10.1 fails to compile station_gui.cpp.
- Version 11.1 fails with an internal error when compiling network.cpp.
- Clang/LLVM 2.8 and earlier.
- (Open) Watcom.
If any of these compilers can compile OpenTTD again, please let us know.
Patches to support more compilers are welcome.
### 7.3) Compilation of base sets
To recompile the extra graphics needed to play with the original Transport
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
GRFCodec can be found at https://www.openttd.org/download-grfcodec.
The compilation of these extra graphics does generally not happen, unless
you remove the graphics file using '`make maintainer-clean`'.
Re-compilation of the base sets, thus also use of '`--maintainer-clean`' can
leave the repository in a modified state as different grfcodec versions can
cause binary differences in the resulting grf. Also translations might have
been added for the base sets which are not yet included in the base set
information files. Use the configure option '`--without-grfcodec`' to avoid
modification of the base set files by the build process.
## 8.0) Translating
See https://www.openttd.org/development for up-to-date information.
@@ -532,7 +657,7 @@ Please contact the translations manager (https://www.openttd.org/contact)
before beginning the translation process! This avoids double work, as
someone else may have already started translating to the same language.
### 7.1) Translation
### 8.1) Translation
So, now that you have notified the development team about your intention to
translate (You did, right? Of course you did.) you can pick up english.txt
@@ -550,7 +675,7 @@ Note: Do not alter the following parts of the file:
- Lines beginning with ## (such as ##id), other than the first two lines
of the file
### 7.2) Previewing
### 8.2) Previewing
In order to view the translation in the game, you need to compile your language
file with the strgen utility. As this utility is tailored to a specific OpenTTD
@@ -570,7 +695,7 @@ should also be.
That is all! You should now be able to select the language in the game options.
## 8.0) Troubleshooting
## 9.0) Troubleshooting
To see all startup options available to you, start OpenTTD with the
'`./openttd -h`' option. This might help you tweak some of the settings.
@@ -615,10 +740,10 @@ or [GRFCrawler](https://grfcrawler.tt-forums.net). Put the NewGRF files in
OpenTTD's newgrf folder (see section 4.2 'OpenTTD directories') and rescan the
list of available NewGRFs. Once you have all missing files, you are set to go.
## 9.0) Licensing
## 10.0) Licensing
OpenTTD is licensed under the GNU General Public License version 2.0. For
the complete license text, see the file 'COPYING.md'. This license applies
the complete license text, see the file 'COPYING'. This license applies
to all files in this distribution, except as noted below.
The squirrel implementation in src/3rdparty/squirrel is licensed under
@@ -635,6 +760,16 @@ License 2.1, and partly under the (3-clause) BSD license. The exact licensing
terms can be found in src/3rdparty/os2/getaddrinfo.c resp.
src/3rdparty/os2/getnameinfo.c.
The exe2coff implementation in os/dos/exe2coff is available under the
GPL, with a number of additional terms. See os/dos/exe2coff/copying and
os/dos/exe2coff/copying.dj for the exact licensing terms.
The CWSDPMI implementation in os/dos/cwsdpmi is distributed under a
custom binary-only license that prohibits modification. The exact
licensing terms can be found in os/dos/cwsdpmi/cwsdpmi.txt. The sources
for these files can be downloaded at its author site, at
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip.
CONTRIBUTING.md is adapted from
[Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
under the [Creative Commons Attribution 3.0 Unported
@@ -651,7 +786,6 @@ terms for Bootstrap documentation.
- Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3)
- Christoph Elsenhans (frosch) - General coding (since 0.6)
- Loïc Guilloux (glx) - Windows Expert (since 0.4.5)
- Charles Pigott (LordAro) - General / Correctness police (since 1.9)
- Michael Lutz (michi_cc) - Path based signals (since 0.7)
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)

View File

@@ -25,7 +25,6 @@ jobs:
- template: azure-pipelines/templates/windows-build.yml
parameters:
BuildPlatform: $(BuildPlatform)
BuildConfiguration: Debug
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
cd projects
@@ -41,8 +40,8 @@ jobs:
matrix:
commit-checker:
Tag: 'commit-checker'
linux-amd64-clang-3.9:
Tag: 'linux-amd64-clang-3.9'
linux-amd64-clang-3.8:
Tag: 'linux-amd64-clang-3.8'
linux-amd64-gcc-6:
Tag: 'linux-amd64-gcc-6'
linux-i386-gcc-6:

View File

@@ -88,7 +88,6 @@ jobs:
- template: windows-build.yml
parameters:
BuildPlatform: $(BuildPlatform)
BuildConfiguration: Release
- bash: |
set -ex
make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform)
@@ -119,14 +118,14 @@ jobs:
Tag: 'linux-ubuntu-bionic-i386-gcc'
linux-ubuntu-bionic-amd64-gcc:
Tag: 'linux-ubuntu-bionic-amd64-gcc'
linux-debian-jessie-i386-gcc:
Tag: 'linux-debian-jessie-i386-gcc'
linux-debian-jessie-amd64-gcc:
Tag: 'linux-debian-jessie-amd64-gcc'
linux-debian-stretch-i386-gcc:
Tag: 'linux-debian-stretch-i386-gcc'
linux-debian-stretch-amd64-gcc:
Tag: 'linux-debian-stretch-amd64-gcc'
linux-debian-buster-i386-gcc:
Tag: 'linux-debian-buster-i386-gcc'
linux-debian-buster-amd64-gcc:
Tag: 'linux-debian-buster-amd64-gcc'
steps:
- template: release-fetch-source.yml

View File

@@ -7,5 +7,5 @@ steps:
inputs:
solution: 'projects/openttd_vs141.sln'
platform: ${{ parameters.BuildPlatform }}
configuration: ${{ parameters.BuildConfiguration }}
configuration: Release
maximumCpuCount: true

View File

@@ -1,8 +0,0 @@
/* $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/>.
*/

View File

@@ -6,5 +6,3 @@
* 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.9 API compatibility in effect.");

View File

@@ -46,9 +46,9 @@ cat ai/regression/tst_*/main.nut | tr ';' '\n' | awk '
}
}
}
# We want to remove everything before the FIRST occurrence of AI.
# If we do not remove any other occurrences of AI from the string
# we will remove everything before the LAST occurrence of AI, so
# We want to remove everything before the FIRST occurence of AI.
# If we do not remove any other occurences of AI from the string
# we will remove everything before the LAST occurence of AI, so
# do some little magic to make it work the way we want.
sub("AI", "AXXXXY")
gsub("AI", "AXXXXX")

View File

@@ -6,7 +6,7 @@ class Regression extends AIInfo {
function GetShortName() { return "REGR"; }
function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
function GetVersion() { return 1; }
function GetAPIVersion() { return "1.10"; }
function GetAPIVersion() { return "1.9"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}

View File

@@ -1704,19 +1704,6 @@ function Regression::Vehicle()
print(" GetWagonEngineType(): " + AIVehicle.GetWagonEngineType(17 3));
print(" GetWagonAge(): " + AIVehicle.GetWagonAge(17, 3));
print(" --Refit--");
print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 255));
print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 0));
print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 9));
print(" BuildVehicleWithRefit(): " + AIVehicle.BuildVehicleWithRefit(28479, 211, 9));
print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 9));
print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 5));
print(" GetRefitCapacity(): " + AIVehicle.GetRefitCapacity(20, 5));
print(" RefitVehicle(): " + AIVehicle.RefitVehicle(20, 5));
print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 9));
print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 5));
print(" SellVehicle(): " + AIVehicle.SellVehicle(20));
print(" --Errors--");
print(" RefitVehicle(): " + AIVehicle.RefitVehicle(12, 0));
print(" GetLastErrorString(): " + AIError.GetLastErrorString());

View File

@@ -8534,8 +8534,9 @@ ERROR: IsEnd() is invalid as Begin() is never called
19693 => 8
--TileList_IndustryProducing--
Count(): 90
Count(): 92
Location ListDump:
46920 => 1
46919 => 1
46918 => 1
46917 => 1
@@ -8544,6 +8545,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
46914 => 1
46913 => 1
46912 => 1
46911 => 1
46664 => 1
46663 => 1
46662 => 1
@@ -9126,18 +9128,6 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetWagonAge(): 0
GetWagonEngineType(): 65535
GetWagonAge(): -1
--Refit--
GetBuildWithRefitCapacity(): -1
GetBuildWithRefitCapacity(): 0
GetBuildWithRefitCapacity(): 160
BuildVehicleWithRefit(): 20
GetCapacity(): 160
GetCapacity(): 0
GetRefitCapacity(): 160
RefitVehicle(): true
GetCapacity(): 0
GetCapacity(): 160
SellVehicle(): true
--Errors--
RefitVehicle(): false
GetLastErrorString(): ERR_VEHICLE_NOT_IN_DEPOT
@@ -9185,7 +9175,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
13 => 5489
12 => 5489
CurrentSpeed ListDump:
12 => 27
12 => 21
17 => 0
16 => 0
14 => 0

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +0,0 @@
/* $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/>.
*/

View File

@@ -6,5 +6,3 @@
* 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.9 API compatibility in effect.");

View File

@@ -1,59 +1,3 @@
1.10.0-beta1 (2019-10-29)
------------------------------------------------------------------------
- Feature: Configurable minimum age for companies before allowing share trading (#7780)
- Feature: Filter on town list window (#7621)
- Feature: Ability to show Newspaper and Ticker messages in parallel (#7612)
- Feature: Show coverage area for stations and towns (#7446)
- Feature: Collapsible vehicle groups (#7417)
- Feature: More flexible docks - can now have multiple per station, ships can use any part of dock (#7380)
- Feature: [NewGRF] Railtype flags to allow/disallow 90 degree curves (#7352)
- Feature/Change: Non-rectangular catchment area for sparse stations (#7235)
- Feature: Improved performance for road vehicle pathfinding (#7261)
- Feature: Option to show local authority boundary of towns (#7025)
- Feature: Experimental method of town cargo generation that scales linearly with population (#6965)
- Feature: [NewGRF] Houses and industries can accept/produce up to 16 different cargo types (#6867, #6872)
- Feature: [NewGRF] RoadTypes (NRT) (#6811)
- Add: [Win32] Select MIDI device by port name (#7666)
- Add: 'getsysdate' console command (#7658)
- Add: Currencies NTD, CNY, HKD (#7596)
- Add: Icons to vehicle construction drop down lists (#7358, #7485)
- Add: Security warning to players that company passwords are not truly secure (#7351)
- Add: [Script] Various API functions for managing vehicle groups (#7225, #7336, #7716)
- Add: SDL2 video driver (#7086)
- Change: Inactive industries do not make sound effects (#7752)
- Change: [Win32] Use native GDI engine for rendering fonts (#7572)
- Change: Scale oil refinery edge distance limit by map size (#7514)
- Change: Do not display a news message about old vehicles when a replacement for it is activated (#7401)
- Change: When filtering purchase list by cargo type, buy button now performs a refit if required (#7301)
- Change: Don't apply forbid 90 deg turn settings to ships, and make penalties for turns configurable (#7289, #7372)
- Change: Make the chance of an aeroplane crashing at an airport with a short runway independent of plane crash setting (#7302)
- Change: Keep town growth rate in sync with house count (#6777)
- Fix #6219: Improve helicopter's ability to takeoff from commuter and international airports (#7710)
- Fix #6407: Show snowy ground sprites for train depots (#7671)
- Fix: Power/running cost sorting algorithm was not correct when power was higher than running cost (#7561)
- Fix: Tweaks to small-map colours to make dark blue company more visible (#7436, #7450)
- Fix: [SDL] Do not offer video smaller than 640x480 (#7442)
- Fix: Incorrect display of industry production around tiles (#7426)
- Fix: Show industry name in Land Area Information window for industries with neutral stations instead of just 'Oil Rig' (#7349)
- Fix: Remove redundant and broken file lookups when loading base sets (#7348)
- Fix: Always report error when ordering a road vehicle to wrong type of road stop (#7316)
- Fix #7043, #7274: Improve performance when creating towns during world creation (#7284)
- Fix #7062: Remove ship max order distance (#7279)
- Fix #7189: Fluidsynth volume gain too high (#7253)
- Fix: Add setting for whether industries with neutral stations (e.g. Oil rigs) accept and supply cargo to/from surrounding stations to fix exploit as old as TTO (#7234)
- Fix: Properly reset dropdown menu windows after changing AI/GS settings (#7092)
- Remove: DOS, MorphOS, AmigaOS & BeOS support (#7326, #7388)
- Remove: Original Path Finder (#7245)
1.9.3 (2019-09-16)
------------------------------------------------------------------------
- Change: Use natural sort when sorting the file list (#7727)
- Fix #7479: Don't close construction windows when changing client name (#7728)
- Fix #7731: Files sorting by modification time on Windows XP (#7731)
- Fix #7644: [OSX] Better solution for colourspace/performance issues (#7741)
1.9.3-RC1 (2019-09-07)
------------------------------------------------------------------------
- Add: Can now click industries to make orders to their neutral station (e.g. oil rig) (#7709)
@@ -293,7 +237,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: [Win32] Right mouse scrolling didn't work properly with the Windows 10 Fall Creators Update [FS#6629] (r27935)
- Fix: Forest, candyfloss forest and battery farm skipped the first animation frame [FS#6639] (r27932)
- Fix: Glyphs in range U+0020 to U+00FF may only be defined in orig_extra.grf, not in openttd.grf [FS#6620] (r27915)
- Fix: 'unban' console command was not handling IPv6 addresses properly (r27914, r27913)
- Fix: 'unban' console command was not handling IPv6 adresses properly (r27914, r27913)
- Fix: Keep the 'link' between industry chain and smallmap windows whenever possible [FS#6585] (r27905)
- Fix: When the last vehicle is removed from a shared orders group, hide the 'Stop sharing' button in the vehicle orders window [FS#6593] (r27904)
- Fix: Tooltip of 'increase service interval' said 'decrease' [FS#6606] (r27895)
@@ -399,7 +343,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: [Build] Force sorting to be locale independent, so files are always ordered the same and by that token better diff-able (r27562, r27558)
- Fix: Typos in comments and string (r27561, r27560)
- Fix: [Build] bashism that caused different CFLAGS with bash vs dash (r27557)
- Fix: Use a more appropriate sound effect for convert-rail (r27547)
- Fix: Use a more appropiate sound effect for convert-rail (r27547)
- Fix: Remove SetFill from vehicle GUI buttons, so that the viewport is resized instead of them in case of long window titles (r27546)
- Fix: [Script] Generation of API wrappers (r27545, r27544, r27543)
- Fix: [Windows] ICU got disabled for Windows builds, breaking RTL support [FS#6427] (r27542)
@@ -3290,7 +3234,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: Improve corner case order handling: mark order as done only when actually done, obey non-stop orders, do only stop/refit at the depot in the order (r16240, r16228, r16199, r16198, r16187)
- Fix: [NoAI] Use the stop/non-stop intermediate orderflags AIs can give for goto-depot orders (r16239)
- Fix: [NewGRF] ActionB should use the online parameters from GRFFile instead of the initial user-specified values from GRFConfig. Also use the values as they were set when the ActionB was executed, not as they are set when the message is shown (r16223)
- Fix: Possible crashes when quitting OpenTTD or forcing resizes/redraws of the screen during map generation [FS#2862] (r16220)
- Fix: Possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation [FS#2862] (r16220)
- Fix: Shared orders without orders were not properly converted causing corrupt/invalid orders when loading pre 0.7 savegames [FS#2878] (r16214)
- Fix: Hardcoded (old sized) MAX_COMPANIES constant (r16182)
- Fix: [Squirrel] The traps variable was not restored, causing try/catch blocks to be 'forgotten' during a suspend (r16181)
@@ -3298,7 +3242,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: Forbid joining AI companies via the 'move' and 'join' console commands/multiplayer lobby (r16176, r16175)
- Fix: [NoAI] AIOrder::GetOrderDestination and AIOrder::GetOrderFlags did not work on ORDER_CURRENT when the vehicle was loading/leaving in a station (r16165)
- Fix: [NoAI] Change WAYPOINT_INVALID to 0xFFFF from -1 as that is the value the AIs got (due to casting) (r16150)
- Fix: The overflowsafe type did not like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomalies when drawing graphs [FS#2855] (r16130)
- Fix: The overflowsafe type did not like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomolies when drawing graphs [FS#2855] (r16130)
- Fix: Road was removed when both the Remove button was active and Ctrl was pressed [FS#2582] (r16119)
- Fix: [NoAI] Make sure AIOrder::GetDestination always returns a tile belonging to the station (16109)
- Fix: [NoAI] When giving an aircraft a goto-hangar order do not let it be a normal goto-station order (r16108)
@@ -3754,7 +3698,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: Inconsistent use of 8/15-bitness of NewGRF callback results with respect to TTDP's implementation of the specification (r12819, r12818, r12759)
- Fix: Possible out of bounds array access (r12809)
- Fix: Enforce autorenew values range in command (r12808)
- Fix: Vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefore break downs now do not happen when loading [FS#1938] (r12795)
- Fix: Vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading [FS#1938] (r12795)
- Fix: [OSX] In some rare cases when using an uncalibrated monitor the system colour space could not be retrieved. Show an error when this happens instead of just trying an assertion (r12776)
- Fix: Slope checking for NewGRFs failed (r12759)
- Fix: Check the TILE_NOT_SLOPED flag of the _north_ tile of multi-tile houses to decide if autoslope is allowed (r12717)
@@ -3862,7 +3806,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Feature: Separate catenary transparency settings from building transparency settings (r12103)
- Feature: Allow locking individual transparency settings so they will not be changed by pressing 'x' (r12102)
- Feature: Add some missing VarAction2 variables (r12124)
- Feature: Make snow appear on rail tiles dependent on track height, not on height of the lowest part of the tile (r12098)
- Feature: Make snow appear on rail tiles dependant on track height, not on height of the lowest part of the tile (r12098)
- Feature: [NewGRF] Specify the purchase, rail and road description of a bridge (r12069)
- Feature: [NewGRF] Add support for var 12, Variational Action 2 (r12045)
- Feature: Allow trees on shore (r12029)
@@ -4143,7 +4087,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Feature: Add support for variable snow lines in the arctic climate, supplied by NewGRF files (r9371)
- Feature: [NewGRF] Add support for newhouses (r9315)
- Feature: [NewGRF] Add support for Action 13, which allows you to translate GRF-specific texts. The translations will only be shown if you are using a language with a GRF language id and if a string has not already been set specifically for the language you are using (r9037)
- Feature: Translation dependent formatting of dates (r8906)
- Feature: Translation dependant formatting of dates (r8906)
- Feature: If an action 7/9 leads to skipping the rest of the file, disable the NewGRF if an action 8 has not been encountered yet (r8831)
- Feature: Stop loading and disable the current NewGRF if a fatal error message in Action B is encountered. Also be more strict on the values accepted (r8830)
- Feature: Build aircraft windows will no longer show aircraft that cannot use the airport in question (r8771)
@@ -4264,7 +4208,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: Do not display income/expenses when they do not belong to a 'valid' tile, like the money cheat and giving money [FS#1175] (r11021)
- Fix: One could not give money when (s)he had too much money [FS#1174] (r11020)
- Fix: Disallow buying/selling shares in your own company or a bankrupt company [FS#1169] (r11018)
- Fix: Crash when quitting the game in one of the end score windows [FS#1218] (r11071)
- Fix: Crash when quiting the game in one of the end score windows [FS#1218] (r11071)
0.5.3-RC3 (2007-08-30)
@@ -4396,7 +4340,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
0.5.1-RC1 (2007-03-20)
------------------------------------------------------------------------
- Feature: Translation dependent formatting of dates (r8906)
- Feature: Translation dependant formatting of dates (r8906)
- Feature: Kick inactive initial network connections after some time [FS#115] (r9038, r9061)
- Feature: Add an extra news group for opening and closing of industries (r9097)
- Codechange: Disable shares by default and increase the default maximum distance from edge for oil refineries (r9339)
@@ -5359,7 +5303,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
- Fix: Wrong pathfinding when northern station tile is missing
- Fix: You cannot take ownership of an oilrig by building right next to it
- Fix: [Makefile] Fixed issue where sdl-config was needed even on systems without SDL
- Fix: [SDL] Performance fix for palette animation and mouse jumping
- Fix: [SDL] Performance fix fo palette animation and mouse jumping
- Fix: [SDL] Same resolution was displayed more than once in game options
- Fix: [SDL] Smoother mouse and performance fix, like in the Windows video driver
- Fix: Wrong trains you can buy with scenarios [SF#963056]

View File

@@ -52,12 +52,13 @@ set_default() {
enable_profiling="0"
enable_lto="0"
enable_dedicated="0"
enable_network="1"
enable_static="1"
enable_translator="0"
enable_unicode="1"
enable_console="1";
enable_assert="1"
enable_strip="0"
enable_assert="0"
enable_strip="1"
enable_universal="0"
enable_osx_g5="0"
enable_cocoa_quartz="1"
@@ -81,6 +82,7 @@ set_default() {
with_iconv="1"
with_midi=""
with_midi_arg=""
with_libtimidity="1"
with_fluidsynth="1"
with_freetype="1"
with_fontconfig="1"
@@ -129,6 +131,7 @@ set_default() {
enable_profiling
enable_lto
enable_dedicated
enable_network
enable_static
enable_translator
enable_unicode
@@ -157,6 +160,7 @@ set_default() {
with_iconv
with_midi
with_midi_arg
with_libtimidity
with_fluidsynth
with_freetype
with_fontconfig
@@ -287,6 +291,9 @@ detect_params() {
--enable-ipo=*) enable_lto="$optarg";;
--enable-dedicated) enable_dedicated="1";;
--enable-dedicated=*) enable_dedicated="$optarg";;
--enable-network) enable_network="2";;
--enable-network=*) enable_network="$optarg";;
--disable-network) enable_network="0";;
--disable-static) enable_static="0";;
--enable-static) enable_static="2";;
--enable-static=*) enable_static="$optarg";;
@@ -363,6 +370,10 @@ detect_params() {
--without-libpng) with_png="0";;
--with-libpng=*) with_png="$optarg";;
--with-libtimidity) with_libtimidity="2";;
--without-libtimidity) with_libtimidity="0";;
--with-libtimidity=*) with_libtimidity="$optarg";;
--with-fluidsynth) with_fluidsynth="2";;
--without-fluidsynth) with_fluidsynth="0";;
--with-fluidsynth=*) with_fluidsynth="$optarg";;
@@ -538,8 +549,8 @@ check_params() {
# Export some variables to be used by pkg-config
#
# PKG_CONFIG_LIBDIR variable mustn't be set if we are not willing to
# override the default pkg-config search path, it mustn't be an empty
# PKG_CONFIG_LIBDIR variable musn't be set if we are not willing to
# override the default pkg-config search path, it musn't be an empty
# string. If the variable is empty (e.g. when an empty string comes
# from config.cache) then unset it. This way the "don't override" state
# will be properly preserved when (re)configuring.
@@ -548,10 +559,10 @@ check_params() {
# Check if all params have valid values
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HAIKU, SUNOS, CYGWIN, MINGW, and OS2
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|HAIKU|SUNOS|CYGWIN|MINGW|OS2)$'`" ]; then
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS)$'`" ]; then
log 1 "configure: error: invalid option --os=$os"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|HAIKU|SUNOS|CYGWIN|MINGW|OS2]"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS]"
exit 1
fi
# cpu_type can be either 32 or 64
@@ -618,7 +629,7 @@ check_params() {
detect_sse_capable_architecture
if [ "$enable_static" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "DOS" ]; then
enable_static="2"
else
enable_static="0"
@@ -628,8 +639,8 @@ check_params() {
if [ "$enable_static" != "0" ]; then
log 1 "checking static... yes"
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ]; then
log 1 "WARNING: static is only known to work on Windows, and MacOSX"
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "DOS" ]; then
log 1 "WARNING: static is only known to work on Windows, DOS, MacOSX and MorphOS"
log 1 "WARNING: use static at your own risk on this platform"
sleep 5
@@ -639,7 +650,7 @@ check_params() {
fi
if [ "$enable_unicode" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then
enable_unicode="2"
else
enable_unicode="0"
@@ -744,6 +755,11 @@ check_params() {
if [ "$enable_dedicated" != "0" ]; then
log 1 "checking GDI video driver... dedicated server, skipping"
log 1 "checking dedicated... found"
if [ "$enable_network" = "0" ]; then
log 1 "configure: error: building a dedicated server without network support is pointless"
exit 1
fi
else
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
log 1 "checking GDI video driver... found"
@@ -751,7 +767,7 @@ check_params() {
log 1 "checking GDI video driver... not Windows, skipping"
fi
if [ -z "$allegro_config" ] && [ -z "$sdl2_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
if [ -z "$allegro_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
log 1 "configure: error: no video driver development files found"
log 1 " If you want a dedicated server use --enable-dedicated as parameter"
exit 1
@@ -774,6 +790,15 @@ check_params() {
log 1 "checking console application... enabled"
fi
if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then
log 1 "checking network... DOS, skipping"
enable_network=0
elif [ "$enable_network" != "0" ]; then
log 1 "checking network... found"
else
log 1 "checking network... disabled"
fi
log 1 "checking squirrel... found"
SCRIPT_SRC_DIR="$ROOT_DIR/src/3rdparty/squirrel/include"
@@ -870,6 +895,7 @@ check_params() {
detect_fontconfig
detect_icu_layout
detect_icu_sort
detect_libtimidity
detect_fluidsynth
if [ "$with_direct_music" != "0" ]; then
@@ -913,7 +939,9 @@ check_params() {
fi
if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ]; then
if [ "$os" = "OSX" ]; then
if [ "$os" = "MORPHOS" ]; then
strip_arg="--strip-all --strip-unneeded --remove-section .comment"
elif [ "$os" = "OSX" ]; then
strip_arg=""
elif [ "$os" = "OS2" ]; then
strip_arg=""
@@ -1004,6 +1032,10 @@ check_params() {
grfcodec=""
fi
if [ "$os" = "DOS" ]; then
with_threads="0"
fi
if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ]; then
if [ "$with_application_bundle" = "1" ]; then
with_application_bundle="0"
@@ -1059,8 +1091,18 @@ check_params() {
fi
fi
if { [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; } && [ -n "`git help 2>/dev/null`" ]; then
if [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
log 1 "checking revision... svn detection"
elif [ -d "$ROOT_DIR/../.svn" ] && [ -n "`svn help 2>/dev/null`" ] && [ -n "`LC_ALL=C svn info $ROOT_DIR/.. | grep '^URL:.*tags$'`" ]; then
# subversion changed its behaviour; now not all folders have a .svn folder,
# but only the root folder. Since making tags requires a (sparse) checkout
# of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)"
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection"
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
log 1 "checking revision... source tarball"
else
@@ -1096,7 +1138,7 @@ check_params() {
fi
if [ "$personal_dir" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "HAIKU" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then
personal_dir="OpenTTD"
elif [ "$os" = "OSX" ]; then
personal_dir="Documents/OpenTTD"
@@ -1311,9 +1353,6 @@ make_compiler_cflags() {
# it happens when using the FOR_ALL_WINDOWS_FROM_BACK_FROM macro
flags="$flags -Wno-self-assign"
# warning: <something> is a C++11 extension
flags="$flags -Wno-c++11-extensions"
if [ "$cc_version" -lt "30" ]; then
# warning: equality comparison with extraneous parentheses
flags="$flags -Wno-parentheses"
@@ -1389,7 +1428,7 @@ make_compiler_cflags() {
if [ $cc_version -ge 402 ]; then
# GCC 4.2+ automatically assumes that signed overflows do
# not occur in signed arithmetic, whereas we are not
# not occur in signed arithmetics, whereas we are not
# sure that they will not happen. It furthermore complains
# about its own optimized code in some places.
flags="$flags -fno-strict-overflow"
@@ -1488,6 +1527,10 @@ make_cflags_and_ldflags() {
if [ "$enable_debug" = "0" ]; then
# No debug, add default stuff
OBJS_SUBDIR="release"
if [ "$os" = "MORPHOS" ]; then
CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
LDFLAGS="$LDFLAGS -noixemul"
fi
if [ "$enable_profiling" = "0" ]; then
# -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible)
@@ -1562,7 +1605,7 @@ make_cflags_and_ldflags() {
LDFLAGS="$LDFLAGS -Wl,--subsystem,windows"
fi
LIBS="$LIBS -lws2_32 -lwinmm -lusp10 -lgdi32 -ldxguid -lole32 -limm32"
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32"
if [ $cc_version -ge 404 ]; then
LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
@@ -1573,14 +1616,19 @@ make_cflags_and_ldflags() {
fi
fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "OSX" ] && [ "$os" != "OS2" ]; then
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then
LIBS="$LIBS -lpthread"
fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ]; then
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "DOS" ]; then
LIBS="$LIBS -lc"
fi
if [ "$os" = "MORPHOS" ]; then
# -Wstrict-prototypes generates much noise because of system headers
CFLAGS="$CFLAGS -Wno-strict-prototypes"
fi
if [ "$os" = "OPENBSD" ]; then
LIBS="$LIBS -pthread"
fi
@@ -1604,12 +1652,12 @@ make_cflags_and_ldflags() {
fi
fi
if [ "$os" = "HAIKU" ]; then
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ]; then
LIBS="$LIBS -lmidi -lbe"
fi
# Most targets act like UNIX, just with some additions
if [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX"
fi
# And others like Windows
@@ -1629,16 +1677,7 @@ make_cflags_and_ldflags() {
fi
fi
if [ -n "$sdl2_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL2"
# SDL must not add _GNU_SOURCE as it breaks many platforms
CFLAGS="$CFLAGS `$sdl2_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$sdl2_config --static --libs`"
else
LIBS="$LIBS `$sdl2_config --libs`"
fi
elif [ -n "$sdl_config" ]; then
if [ -n "$sdl_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL"
# SDL must not add _GNU_SOURCE as it breaks many platforms
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`"
@@ -1673,7 +1712,7 @@ make_cflags_and_ldflags() {
fi
if [ -n "$lzma_config" ]; then
CFLAGS="$CFLAGS -DWITH_LIBLZMA"
CFLAGS="$CFLAGS -DWITH_LZMA"
CFLAGS="$CFLAGS `$lzma_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
@@ -1744,7 +1783,7 @@ make_cflags_and_ldflags() {
fi
if [ -n "$icu_layout_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_LX"
CFLAGS="$CFLAGS -DWITH_ICU_LAYOUT"
CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`"
if [ "$static_icu" != "0" ]; then
@@ -1755,7 +1794,7 @@ make_cflags_and_ldflags() {
fi
if [ -n "$icu_sort_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_I18N"
CFLAGS="$CFLAGS -DWITH_ICU_SORT"
CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`"
if [ "$static_icu" != "0" ]; then
@@ -1784,6 +1823,17 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DWITH_XAUDIO2"
fi
if [ -n "$libtimidity_config" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
fi
fi
if [ -n "$fluidsynth" ]; then
LIBS="$LIBS -lfluidsynth"
CFLAGS="$CFLAGS -DFLUIDSYNTH"
@@ -1819,12 +1869,20 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"
fi
if [ "$os" = "HAIKU" ]; then
LDFLAGS="$LDFLAGS -lnetwork"
fi
if [ "$enable_network" != "0" ]; then
CFLAGS="$CFLAGS -DENABLE_NETWORK"
if [ "$os" = "SUNOS" ]; then
LDFLAGS="$LDFLAGS -lnsl -lsocket"
if [ "$os" = "BEOS" ]; then
LDFLAGS="$LDFLAGS -lbind -lsocket"
fi
if [ "$os" = "HAIKU" ]; then
LDFLAGS="$LDFLAGS -lnetwork"
fi
if [ "$os" = "SUNOS" ]; then
LDFLAGS="$LDFLAGS -lnsl -lsocket"
fi
fi
if [ "$enable_static" != "0" ]; then
@@ -2303,7 +2361,7 @@ detect_awk() {
detect_os() {
if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, SUNOS, CYGWIN, MINGW, and OS2
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and DOS
# Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
@@ -2314,12 +2372,15 @@ detect_os() {
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/solaris/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
/dos/ { print "DOS"; exit}
'`
if [ -z "$os" ]; then
@@ -2331,6 +2392,8 @@ detect_os() {
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
@@ -2343,7 +2406,7 @@ detect_os() {
if [ -z "$os" ]; then
log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, HAIKU, SUNOS, CYGWIN, MINGW, and OS2"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS"
exit 1
fi
@@ -2435,13 +2498,7 @@ detect_sdl() {
sleep 5
fi
if [ $with_sdl = "sdl1" ]; then
detect_pkg_config "2" "sdl" "sdl_config" "1.2"
elif [ $with_sdl = "sdl2" ] || [ -x `which sdl2-config` ]; then
detect_pkg_config "2" "sdl2" "sdl2_config" "2.0"
else
detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
fi
detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
}
detect_osx_sdk() {
@@ -2714,6 +2771,10 @@ detect_lzo2() {
detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
}
detect_libtimidity() {
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
}
detect_fluidsynth() {
detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h"
}
@@ -2791,12 +2852,6 @@ detect_png() {
}
detect_freetype() {
if [ "$with_freetype" = "1" ] && ([ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]); then
log 1 "checking freetype2... WIN32, skipping"
freetype_config=""
return 0
fi
detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1"
}
@@ -3136,7 +3191,7 @@ detect_sse_capable_architecture() {
else
# It was forced, so it should be found.
if [ "$with_sse" != "1" ]; then
log 1 "configure: error: SSE couldn't be found"
log 1 "configure: error: SSE couln't be found"
log 1 "configure: error: you force enabled SSE, but it seems unavailable"
exit 1
fi
@@ -3438,8 +3493,8 @@ showhelp() {
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
echo " NETBSD/HPUX/SUNOS/CYGWIN/"
echo " MINGW/OS2/HAIKU"
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
echo " MINGW/OS2/DOS/HAIKU"
echo ""
echo "Paths:"
echo " --prefix-dir=dir specifies the prefix for all installed"
@@ -3493,6 +3548,7 @@ showhelp() {
echo " --enable-console compile as a console application instead of as a GUI application."
echo " If this setting is active, debug output will appear in the same"
echo " console instead of opening a new window. (Win32 ONLY)"
echo " --disable-network disable network support"
echo " --disable-assert disable asserts (continue on errors)"
echo " --enable-strip enable any possible stripping"
echo " --without-osx-sysroot disable the automatic adding of sysroot "
@@ -3507,11 +3563,13 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player"
echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
echo " enables libtimidity support"
echo " --with-fluidsynth enables fluidsynth support"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
echo " --with-sdl[=\"sdl1|sdl2\"] enables SDL video driver support"
echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support"
echo " --with-zlib[=\"pkg-config zlib\"]"
echo " enables zlib support"
echo " --with-liblzma[=\"pkg-config liblzma\"]"

14
configure vendored
View File

@@ -75,7 +75,7 @@ save_params
make_cflags_and_ldflags
EXE=""
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ]; then
EXE=".exe"
fi
@@ -110,22 +110,24 @@ AWKCOMMAND='
if ($0 == "ALLEGRO" && "'$allegro_config'" == "") { next; }
if ($0 == "SDL" && "'$sdl_config'" == "") { next; }
if ($0 == "SDL2" && "'$sdl2_config'" == "") { next; }
if ($0 == "PNG" && "'$png_config'" == "") { next; }
if ($0 == "OSX" && "'$os'" != "OSX") { next; }
if ($0 == "OS2" && "'$os'" != "OS2") { next; }
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; }
if ($0 == "DOS" && "'$os'" != "DOS") { next; }
if ($0 == "BEOS" && "'$os'" != "BEOS" &&
"'$os'" != "HAIKU") { next; }
if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; }
if ($0 == "MORPHOS" && "'$os'" != "MORPHOS") { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; }
if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; }
if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; }
if ($0 == "USE_SSE" && "'$with_sse'" != "1") { next; }
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
if ($0 == "SSE" && "'$with_sse'" != "1") { next; }
skip += 1;

View File

@@ -0,0 +1,72 @@
OpenTTD and strgen
Last updated: 2009-06-30
------------------------------------------------------------------------
Table of contents
-----------------
1.0) strgen usage
* 1.1) Examples
* 1.2) strgen command switches
1.0) strgen usage
---- ------------
This guide is only interesting for people who want to alter something
themselves without access to translator.openttd.org. Please note that
your compiled language file will only be compatible with the OpenTTD version
you have downloaded english.txt, the master language file, for. While this is
not always true, namely when changes in the code have not touched language
files, your safest bet is to assume this 'limitation'.
As a first step you need to compile strgen. This is as easy as typing
'make strgen'. You can download the precompile strgen from:
http://www.openttd.org/download-strgen
strgen takes as argument a txt file and translates it to a lng file, allowing
it to be used inside OpenTTD. strgen needs the master language file
english.txt to work. Below are some examples of strgen usage.
1.1) Examples
---- --------
Example 1:
if you are in the root of your working copy (git repository), you should type
strgen/strgen -s lang lang/english.txt
to compile englist.txt into english.lng. It will be placed in the lang dir
Example 2:
you only have the strgen executable (no working copy) and you want to compile
a txt file in the same directory. You should type
./strgen english.txt
and you will get and english.lng in the same dir
Example 3:
you have strgen somewhere, english.txt in /usr/openttd/lang and you want the
resulting language file to go to /tmp. Use
./strgen -s /usr/openttd/lang -d /tmp english.txt
You can interchange english.txt to whichever language you want to generate a
.lng file for.
1.2) strgen command switches
---- -----------------------
-v | --version
strgen will tell what git revision it was last modified
-t | --todo
strgen will add <TODO> to any untranslated/missing strings and use the english
strings while compiling the language file
-w | --warning
strgen will print any missing strings or wrongly translated (bad format)
to standard error output(stderr)
-h | --help | -?
Print out a summarized help message explaining these switches
-s | --source_dir
strgen will search for the master file english.txt in the directory specified
by this switch instead of the current directory
-d | --dest_dir
strgen will put <language>.lng in the directory specified by this switch; if
no dest_dir is given, output is the same as source_dir

139
docs/Readme_OS2.txt Normal file
View File

@@ -0,0 +1,139 @@
OpenTTD: OS/2 version
=====================
OpenTTD has been ported to work on OS/2 4.x or later (including
eComStation). The game should work as well as it does on Windows
or other platforms: the main issues you may encounter are graphics
card problems, but that is really the fault of SDL.
=========================
USING OPENTTD FOR OS/2
=========================
LIBRARIES REQUIRED FOR END USERS
--------------------------------
SDL.DLL (SDL 1.2.7) and FSLib.dll are required to use this program:
these can be downloaded from the Files section at
http://sourceforge.net/projects/openttd/ - see "os2-useful-v1.1.zip".
Version 20051222 of SDL or later is required. This can be found at
http://sdl.netlabs.org/.
Please note that earlier SDL releases will probably NOT work with
OpenTTD. If you experience problems with OpenTTD, please check
your SDL and FSLib.dll versions (both must match).
Note that to actually play the game, I have found in my own
experience that a version of the Scitech Display Drivers or its later
incarnation (see www.scitech.com) are necessary for it to work. If
you have trouble with your native drivers, try the Scitech drivers
and see if they help the problem.
KNOWN ISSUES
------------
- If an error occurs during loading, the OS/2 error message window
is not always displayed.
A NOTE ABOUT MUSIC
------------------
OpenTTD includes a music driver which uses the MCI MIDI system. Unfortunately,
due to the lack of proper MIDI hardware myself, I have been unable to test it,
but during testing, I found that when MIDI was enabled, I got no sound
effects. I therefore decided to DISABLE music by default.
To enable music, start OpenTTD with the command line:
openttd -m os2
If I hear enough responses that both music and sound work together (it might
just be my system), I'll have the defaults changed.
Please note also that the GCC version does not currently support the MCI MIDI
system.
A NOTE ABOUT DEDICATED MULTIPLAYER SERVERS
------------------------------------------
To start a dedicated multiplayer server, you should run the dedicated.cmd
file. This enables OpenTTD to open up a VIO console window to display
its output and gather any necessary input. Running "openttd -D"
directly will result in the console not being displayed. You may
still pass any other parameters ('-D' is already passed) to
dedicated.cmd.
You can find the dedicated.cmd file in the os/os2 directory.
=========================
BUILDING THE OS/2 VERSION
=========================
Compiler
--------
Innotek GCC, an OS/2 port of the popular GCC compiler, was used to build OpenTTD.
See www.innotek.de for more information. You WILL need a reasonably UNIX-like
build environment in order to build OpenTTD successfully - the following link
may help to set one up (although some of the links from that page are broken):
http://www.mozilla.org/ports/os2/gccsetup.html
Alternatively, Paul Smedley's ready-to-go GCC build environment has been known to
successfully build the game:
http://www.smedley.info/os2ports/index.php?page=build-environment
To build, you should, if your environment is set up well enough, be able to just
type `./configure' (or `sh configure' if you're using the OS/2 shell) and `make'.
You may have to manually specify `--os OS2' on the configure command line, as
configure cannot always detect OS/2 correctly.
A note on Open Watcom
---------------------
Open Watcom C/C++ was previously used to build OpenTTD (version 0.4.x and earlier).
However, due to advanced C++ features used in the YAPF portion of OpenTTD 0.5
in particular, the compiler is no longer able to build the game at the moment.
Hopefully one day Open Watcom will be able to catch up and we will be able to build
the game once again (it's easier than getting an OS/2 UNIX-like environment set up
in my opinion!), but until then, OpenTTD 0.5 and later can only be built with GCC.
Libraries Required
------------------
The following libraries are required. To build zlib and libpng, I
simply added the required files (watch out for sample programs, etc)
to an IDE project file and built a library. Do not use the makefiles
provided, they are not designed for Watcom (apart from SDL):
- zlib
http://www.zlib.org/
- libpng
http://www.libpng.org/
- SDL for OS/2
ftp://ftp.netlabs.org/pub/sdl/sdl-1.2.7-src-20051222.zip used for
0.4.7
- Freetype
http://freetype.sourceforge.net/
Currently, there are no pre-built libraries available for GCC. If you manage to get
OpenTTD working on Watcom though (do let us know if this is the case!), pre-built
versions can be downloaded from the Files section at
http://sourceforge.net/projects/openttd/ - see "os2-useful-v1.1.zip".
Contact Information
-------------------
If you have any questions regarding OS/2 issues, please contact me
(owen@owenrudge.net) and I'll try to help you out. For general OpenTTD
issues, see the Contacting section of readme.txt.
Thanks to Paul Smedley for his help with getting OpenTTD to compile under GCC on OS/2.
- Owen Rudge, 24th June 2007

View File

@@ -0,0 +1,71 @@
# Compiling OpenTTD using Microsoft Visual C++
Last updated: 2018-12-27
## Supported MSVC compilers
OpenTTD includes projects for Visual Studio 2015 Update 3 or more recent.
You can download the free Visual Studio Community Edition from Microsoft at
https://visualstudio.microsoft.com/vs/community/.
## Required files
### Microsoft platform files
OpenTTD needs the Platform SDK, if it isn't installed already. This can be
done during installing Visual Studio, by selecting
`Visual C++ MFC for x86 and x64` (and possibly
`Visual C++ ATL for x86 and x64` depending on your version). If not, you
can get it at this location:
- [MS Windows Platform SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)
Install the SDK by following the instructions as given.
### OpenTTD dependencies
Dependencies for OpenTTD on Windows are handled via
[vcpkg](https://github.com/Microsoft/vcpkg/). First you need to install vcpkg
by following the `Quick Start` intructions of their
[README](https://github.com/Microsoft/vcpkg/blob/master/README.md).
After this, you can install the dependencies OpenTTD needs. We advise to use
the `static` versions, and OpenTTD currently needs the following dependencies:
- freetype
- liblzma
- libpng
- lzo
- zlib
To install both the x64 (64bit) and x86 (32bit) variants, you can use:
```ps
.\vcpkg install freetype:x64-windows-static liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
.\vcpkg install freetype:x86-windows-static liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
```
## TTD Graphics files
See section 4.1 of README.md for the required 3rdparty files and how to install them.
## Compiling
Open the appropriate `sln` (Solution) file for your version of Visual Studio:
- VS 2015: projects/openttd_vs140.sln
- VS 2017: projects/openttd_vs141.sln
- VS 2019: projects/openttd_vs142.sln
Set the build mode to `Release` in
`Build > Configuration manager > Active solution configuration`.
You can now compile.
If everything works well the binary should be in `objs\Win[32|64]\Release\openttd.exe`
and in `bin\openttd.exe`
## Problems
If compilation fails, double-check that you are using the latest github
source. If it still doesn't work, check in on IRC (irc://irc.oftc.net/openttd),
to ask for help.

View File

@@ -1,23 +1,23 @@
# OpenTTD's admin network
OpenTTD's admin network
Last updated: 2011-01-20
------------------------------------------------------------------------
## Table of contents
- 1.0) [Preface](#10-preface)
- 2.0) [Joining the network](#20-joining-the-network)
- 3.0) [Asking for updates](#30-asking-for-updates)
- 3.1) [Polling manually](#31-polling-manually)
- 4.0) [Sending rcon commands](#40-sending-rcon-commands)
- 5.0) [Sending chat](#50-sending-chat)
- 5.1) [Receiving chat](#51-receiving-chat)
- 6.0) [Disconnecting](#60-disconnecting)
- 7.0) [Certain packet information](#70-certain-packet-information)
Table of contents
-----------------
1.0) Preface
2.0) Joining the network
3.0) Asking for updates
* 3.1) Polling manually
4.0) Sending rcon commands
5.0) Sending chat
* 5.1) Receiving chat
6.0) Disconnecting
7.0) Certain packet information
## 1.0) Preface
1.0) Preface
---- -------
The admin network provides a dedicated network protocol designed for other
applications to communicate with OpenTTD. Connected applications can execute
console commands remotely (rcon commands) with no further authentication.
@@ -28,7 +28,7 @@ Last updated: 2011-01-20
This document describes the admin network and its protocol.
Please refer to the mentioned enums in `src/network/core/tcp_admin.h`
Please refer to the mentioned enums in src/network/core/tcp_admin.h
Please also note that further improvements to the admin protocol can mean that
more packet types will be sent by the server. For forward compatibility it is
@@ -36,106 +36,94 @@ Last updated: 2011-01-20
additional data to packets. This data should be ignored. Data will never be
removed from packets in later versions, except the possibility that complete
packets are dropped in favour of a new packet.
This though will be reflected in the protocol version as announced in the
`ADMIN_PACKET_SERVER_PROTOCOL` in section 2.0).
ADMIN_PACKET_SERVER_PROTOCOL in section 2.0).
A reference implementation in Java for a client connecting to the admin interface
can be found at: [http://dev.openttdcoop.org/projects/joan](http://dev.openttdcoop.org/projects/joan)
can be found at: http://dev.openttdcoop.org/projects/joan
## 2.0) Joining the network
2.0) Joining the network
---- -------------------
Create a TCP connection to the server on port 3977. The application is
expected to authenticate within 10 seconds.
To authenticate send a `ADMIN_PACKET_ADMIN_JOIN` packet.
To authenticate send a ADMIN_PACKET_ADMIN_JOIN packet.
The server will reply with `ADMIN_PACKET_SERVER_PROTOCOL` followed directly by
`ADMIN_PACKET_SERVER_WELCOME`.
The server will reply with ADMIN_PACKET_SERVER_PROTOCOL followed directly by
ADMIN_PACKET_SERVER_WELCOME.
`ADMIN_PACKET_SERVER_PROTOCOL` contains details about the protocol version.
ADMIN_PACKET_SERVER_PROTOCOL contains details about the protocol version.
It is the job of your application to check this number and decide whether
it will remain connected or not.
Furthermore, this packet holds details on every `AdminUpdateType` and the
supported `AdminFrequencyTypes` (bitwise representation).
Furthermore, this packet holds details on every AdminUpdateType and the
supported AdminFrequencyTypes (bitwise representation).
`ADMIN_PACKET_SERVER_WELCOME` contains details on the server and the map,
ADMIN_PACKET_SERVER_WELCOME contains details on the server and the map,
e.g. if the server is dedicated, its NetworkLanguage, size of the Map, etc.
Once you have received `ADMIN_PACKET_SERVER_WELCOME` you are connected and
Once you have received ADMIN_PACKET_SERVER_WELCOME you are connected and
authorized to do your thing.
The server will not provide any game related updates unless you ask for them.
There are four packets the server will none the less send, if applicable:
- ADMIN_PACKET_SERVER_ERROR
- ADMIN_PACKET_SERVER_WELCOME
- ADMIN_PACKET_SERVER_NEWGAME
- ADMIN_PACKET_SERVER_SHUTDOWN
However, `ADMIN_PACKET_SERVER_WELCOME` only after a `ADMIN_PACKET_SERVER_NEWGAME`
However, ADMIN_PACKET_SERVER_WELCOME only after a ADMIN_PACKET_SERVER_NEWGAME
## 3.0) Asking for updates
Asking for updates is done with `ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY`.
3.0) Asking for updates
---- ------------------
Asking for updates is done with ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY.
With this packet you define which update you wish to receive at which
frequency.
Note: not every update type supports every frequency. If in doubt, you can
verify against the data received in `ADMIN_PACKET_SERVER_PROTOCOL`.
verify against the data received in ADMIN_PACKET_SERVER_PROTOCOL.
The server will not confirm your registered update. However, asking for an
invalid `AdminUpdateType` or a not supported `AdminUpdateFrequency` you will be
disconnected from the server with `NETWORK_ERROR_ILLEGAL_PACKET`.
invalid AdminUpdateType or a not supported AdminUpdateFrequency you will be
disconnected from the server with NETWORK_ERROR_ILLEGAL_PACKET.
Additional debug information can be found with a debug level of `net=3`.
`ADMIN_UPDATE_DATE` results in the server sending:
Additional debug information can be found with a debug level of net=3.
ADMIN_UPDATE_DATE results in the server sending:
- ADMIN_PACKET_SERVER_DATE
`ADMIN_UPDATE_CLIENT_INFO` results in the server sending:
ADMIN_UPDATE_CLIENT_INFO results in the server sending:
- ADMIN_PACKET_SERVER_CLIENT_JOIN
- ADMIN_PACKET_SERVER_CLIENT_INFO
- ADMIN_PACKET_SERVER_CLIENT_UPDATE
- ADMIN_PACKET_SERVER_CLIENT_QUIT
- ADMIN_PACKET_SERVER_CLIENT_ERROR
`ADMIN_UPDATE_COMPANY_INFO` results in the server sending:
ADMIN_UPDATE_COMPANY_INFO results in the server sending:
- ADMIN_PACKET_SERVER_COMPANY_NEW
- ADMIN_PACKET_SERVER_COMPANY_INFO
- ADMIN_PACKET_SERVER_COMPANY_UPDATE
- ADMIN_PACKET_SERVER_COMPANY_REMOVE
`ADMIN_UPDATE_COMPANY_ECONOMY` results in the server sending:
ADMIN_UPDATE_COMPANY_ECONOMY results in the server sending:
- ADMIN_PACKET_SERVER_COMPANY_ECONOMY
`ADMIN_UPDATE_COMPANY_STATS` results in the server sending:
ADMIN_UPDATE_COMPANY_STATS results in the server sending:
- ADMIN_PACKET_SERVER_COMPANY_STATS
`ADMIN_UPDATE_CHAT` results in the server sending:
ADMIN_UPDATE_CHAT results in the server sending:
- ADMIN_PACKET_SERVER_CHAT
`ADMIN_UPDATE_CONSOLE` results in the server sending:
ADMIN_UPDATE_CONSOLE results in the server sending:
- ADMIN_PACKET_SERVER_CONSOLE
`ADMIN_UPDATE_CMD_LOGGING` results in the server sending:
ADMIN_UPDATE_CMD_LOGGING results in the server sending:
- ADMIN_PACKET_SERVER_CMD_LOGGING
## 3.1) Polling manually
Certain `AdminUpdateTypes` can also be polled:
3.1) Polling manually
---- ----------------
Certain AdminUpdateTypes can also be polled:
- ADMIN_UPDATE_DATE
- ADMIN_UPDATE_CLIENT_INFO
- ADMIN_UPDATE_COMPANY_INFO
@@ -143,92 +131,88 @@ Last updated: 2011-01-20
- ADMIN_UPDATE_COMPANY_STATS
- ADMIN_UPDATE_CMD_NAMES
`ADMIN_UPDATE_CLIENT_INFO` and `ADMIN_UPDATE_COMPANY_INFO` accept an additional
ADMIN_UPDATE_CLIENT_INFO and ADMIN_UPDATE_COMPANY_INFO accept an additional
parameter. This parameter is used to specify a certain client or company.
Setting this parameter to `UINT32_MAX (0xFFFFFFFF)` will tell the server you
Setting this parameter to UINT32_MAX (0xFFFFFFFF) will tell the server you
want to receive updates for all clients or companies.
Not supported `AdminUpdateType` in the poll will result in the server
disconnecting the application with `NETWORK_ERROR_ILLEGAL_PACKET`.
Not supported AdminUpdateType in the poll will result in the server
disconnecting the application with NETWORK_ERROR_ILLEGAL_PACKET.
Additional debug information can be found with a debug level of `net=3`.
Additional debug information can be found with a debug level of net=3.
## 4.0) Sending rcon commands
Rcon runs separate from the `ADMIN_UPDATE_CONSOLE` `AdminUpdateType`. Requesting
4.0) Sending rcon commands
---- ---------------------
Rcon runs separate from the ADMIN_UPDATE_CONSOLE AdminUpdateType. Requesting
the execution of a remote console command is done with the packet
`ADMIN_PACKET_ADMIN_RCON`.
ADMIN_PACKET_ADMIN_RCON.
Note: No additional authentication is required for rcon commands.
The server will reply with one or more `ADMIN_PACKET_SERVER_RCON` packets.
Finally an `ADMIN_PACKET_ADMIN_RCON_END` packet will be sent. Applications
will not receive the answer twice if they have asked for the `AdminUpdateType`
`ADMIN_UPDATE_CONSOLE`, as the result is not printed on the servers console
The server will reply with one or more ADMIN_PACKET_SERVER_RCON packets.
Finally an ADMIN_PACKET_ADMIN_RCON_END packet will be sent. Applications
will not receive the answer twice if they have asked for the AdminUpdateType
ADMIN_UPDATE_CONSOLE, as the result is not printed on the servers console
(just like clients rcon commands).
Furthermore, sending a `say` command (or any similar command) will not
Furthermore, sending a 'say' command (or any similar command) will not
be sent back into the admin network.
Chat from the server itself will only be sent to the admin network when it
was not sent from the admin network.
Note that when content is queried or updated via rcon, the processing
happens asynchronously. But the `ADMIN_PACKET_ADMIN_RCON_END` packet is sent
happens asynchronously. But the ADMIN_PACKET_ADMIN_RCON_END packet is sent
already right after the content is requested as there's no immediate output.
Thus other packages and the output of content rcon command may be sent at
an arbitrary later time, mixing into the output of other console activity,
e.g. also of possible subsequent other rcon commands sent.
## 5.0) Sending chat
Sending a `ADMIN_PACKET_ADMIN_CHAT` results in chat originating from the server.
5.0) Sending chat
---- ------------
Sending a ADMIN_PACKET_ADMIN_CHAT results in chat originating from the server.
Currently four types of chat are supported:
- NETWORK_ACTION_CHAT
- NETWORK_ACTION_CHAT_CLIENT
- NETWORK_ACTION_CHAT_COMPANY
- NETWORK_ACTION_SERVER_MESSAGE
`NETWORK_ACTION_SERVER_MESSAGE` can be sent to a single client or company
using the respective `DestType` and ID.
This is a message prefixed with the 3 stars, e.g. `*** foo has joined the game`
NETWORK_ACTION_SERVER_MESSAGE can be sent to a single client or company
using the respective DestType and ID.
This is a message prefixed with the 3 stars, e.g. *** foo has joined the game
## 5.1) Receiving chat
Register `ADMIN_UPDATE_CHAT` at `ADMIN_FREQUENCY_AUTOMATIC` to receive chat.
5.1) Receiving chat
---- -------------
Register ADMIN_UPDATE_CHAT at ADMIN_FREQUENCY_AUTOMATIC to receive chat.
The application will be able to receive all chat the server can see.
The configuration option `network.server_admin_chat` specifies whether
The configuration option network.server_admin_chat specifies whether
private chat for to the server is distributed into the admin network.
## 6.0) Disconnecting
6.0) Disconnecting
---- -------------
It is a kind thing to say good bye before leaving. Do this by sending the
`ADMIN_PACKET_ADMIN_QUIT` packet.
ADMIN_PACKET_ADMIN_QUIT packet.
## 7.0) Certain packet information
7.0) Certain packet information
---- --------------------------
All ADMIN_PACKET_SERVER_* packets have an enum value greater 100.
All `ADMIN_PACKET_SERVER_*` packets have an enum value greater 100.
`ADMIN_PACKET_SERVER_WELCOME`
Either directly follows `ADMIN_PACKET_SERVER_PROTOCOL` or is sent
ADMIN_PACKET_SERVER_WELCOME
Either directly follows ADMIN_PACKET_SERVER_PROTOCOL or is sent
after a new game has been started or a map loaded, i.e. also
after ADMIN_PACKET_SERVER_NEWGAME.
`ADMIN_PACKET_SERVER_CLIENT_JOIN` and `ADMIN_PACKET_SERVER_COMPANY_NEW`
ADMIN_PACKET_SERVER_CLIENT_JOIN and ADMIN_PACKET_SERVER_COMPANY_NEW
These packets directly follow their respective INFO packets. If you receive
a CLIENT_JOIN / COMPANY_NEW packet without having received the INFO packet
it may be a good idea to POLL for the specific ID.
`ADMIN_PACKET_SERVER_CMD_NAMES` and `ADMIN_PACKET_SERVER_CMD_LOGGING`
ADMIN_PACKET_SERVER_CMD_NAMES and ADMIN_PACKET_SERVER_CMD_LOGGING
Data provided with these packets is not stable and will not be
treated as such. Do not rely on IDs or names to be constant
across different versions / revisions of OpenTTD.

View File

@@ -1,69 +0,0 @@
# How to compile lang files (OpenTTD and strgen)
Last updated: 2009-06-30
## strgen usage
This guide is only interesting for people who want to alter something
themselves without access to [translator.openttd.org](https://translator.openttd.org/).
Please note that your compiled language file will only be compatible with the OpenTTD version
you have downloaded `english.txt`, the master language file, for. While this is
not always true, namely when changes in the code have not touched language
files, your safest bet is to assume this 'limitation'.
As a first step you need to compile strgen. This is as easy as typing
`'make strgen'`. You can download the precompile strgen from:
[http://www.openttd.org/download-strgen](http://www.openttd.org/download-strgen)
strgen takes as argument a txt file and translates it to a lng file, allowing
it to be used inside OpenTTD. strgen needs the master language file
`english.txt` to work. Below are some examples of strgen usage.
## Examples
### Example 1
If you are in the root of your working copy (git repository), you should type
`./strgen/strgen -s lang lang/english.txt`
to compile `english.txt` into `english.lng`. It will be placed in the lang dir.
### Example 2
You only have the strgen executable (no working copy) and you want to compile
a txt file in the same directory. You should type
`./strgen english.txt`
and you will get and `english.lng` in the same dir.
### Example 3
You have strgen somewhere, `english.txt` in `/usr/openttd/lang` and you want the
resulting language file to go to /tmp. Use
`./strgen -s /usr/openttd/lang -d /tmp english.txt`
You can interchange `english.txt` to whichever language you want to generate a
.lng file for.
## strgen command switches
`-v | --version`
strgen will tell what git revision it was last modified
`-t | --todo`
strgen will add <TODO> to any untranslated/missing strings and use the english
strings while compiling the language file
`-w | --warning`
strgen will print any missing strings or wrongly translated (bad format)
to standard error output(stderr)
`-h | --help | -?`
Print out a summarized help message explaining these switches
`-s | --source_dir`
strgen will search for the master file english.txt in the directory specified
by this switch instead of the current directory
`-d | --dest_dir`
strgen will put <language>.lng in the directory specified by this switch; if
no dest_dir is given, output is the same as source_dir

View File

@@ -1,24 +1,25 @@
# Some explanations about Desyncs
Some explanations about Desyncs
Last updated: 2014-02-23
## Table of contents
- 1.0) Desync theory
- 1.1) [OpenTTD multiplayer architecture](#11-openttd-multiplayer-architecture)
- 1.2) [What is a Desync and how is it detected](#12-what-is-a-desync-and-how-is-it-detected)
- 1.3) [Typical causes of Desyncs](#13-typical-causes-of-desyncs)
- 2.0) What to do in case of a Desync
- 2.1) [Cache debugging](#21-cache-debugging)
- 2.2) [Desync recording](#22-desync-recording)
- 3.0) Evaluating the Desync records
- 3.1) [Replaying](#31-replaying)
- 3.2) [Evaluation of the replay](#32-evaluation-of-the-replay)
- 3.3) [Comparing savegames](#33-comparing-savegames)
------------------------------------------------------------------------
## 1.1) OpenTTD multiplayer architecture
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
@@ -29,7 +30,7 @@ Last updated: 2014-02-23
in the same way, and trees always grow the same.
In OpenTTD multiplayer synchronisation works by creating a savegame
when clients join, and then transferring that savegame to the client,
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
@@ -68,8 +69,8 @@ Last updated: 2014-02-23
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
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
@@ -80,7 +81,7 @@ Last updated: 2014-02-23
that a vehicle picks the left line instead of the right line at
a junction on one client.
The important thing here is, that no one notices when a Desync
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
@@ -107,12 +108,12 @@ Last updated: 2014-02-23
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 happened, and only now the Desync has spiraled
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
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
@@ -137,9 +138,9 @@ Last updated: 2014-02-23
using commands.
## 2.1) Cache debugging
Desyncs which are caused by improper cache validation can
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.
@@ -150,8 +151,8 @@ Last updated: 2014-02-23
Mind that this type of debugging can also be done in singleplayer.
## 2.2) Desync recording
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
@@ -179,8 +180,8 @@ Last updated: 2014-02-23
However, they also take a lot of disk space.
## 3.1) Replaying
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
@@ -200,8 +201,8 @@ Last updated: 2014-02-23
This replays the server log and creates new 'commands-out.log'
and 'dmp_cmds_*.sav' in your autosave folder.
## 3.2) Evaluation of the replay
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'.
@@ -241,8 +242,8 @@ Last updated: 2014-02-23
dates, and the original log will contain the chat, but otherwise they
should match.
## 3.3) Comparing savegames
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.

View File

@@ -16,7 +16,7 @@
<a href="landscape_grid.html">Landscape grid</a> page.
</p>
<p>Nine attributes (counting &quot;<span style="font-weight: bold;">type</span>&quot; and
&quot;<span style="font-weight: bold;">height</span>&quot;) hold the information about a tile.<BR>
&quot;<span style="font-weight: bold;">height</span>&quot;) hold the informations about a tile.<BR>
These attributes are referred to as
&quot;<span style="font-weight: bold;">type</span>",
&quot;<span style="font-weight: bold;">height</span>",
@@ -61,7 +61,7 @@
<a name="tropic_zone"></a>
Bits 1..0:
<table border="1" style="width: 30em;">
<tr bgcolor="#CCCCCC"><td colspan="2">Only meaningful in tropic climate. It contains the definition of the available zones</td></tr>
<tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate. It contains the definition of the available zones</td></tr>
<tr><td style="width: 5em;"><tt>00</tt></td><td>normal</td></tr>
<tr><td><tt>01</tt></td><td>desert</td></tr>
<tr><td><tt>02</tt></td><td>rain forest</td></tr>
@@ -98,32 +98,6 @@
</li>
</ul>
</li>
<li><span style="font-weight: bold;">m4:</span><br>
<a name="RoadType"></a>
Road roadtype. Used for all tiles with road (road, station, tunnelbridge).
<ul>
<li>
Bits 5..0: Road roadtype, 0x3F for no road.
</li>
</ul>
</li>
<li><span style="font-weight: bold;">m8:</span><br>
<a name="TramType"></a>
Tram roadtype. Used for all tiles with road (road, station, tunnelbridge).
<ul>
<li>
Bits 11..6: Tram roadtype, 0x3F for no tram.
</li>
</ul>
</li>
<li><span style="font-weight: bold;">m8:</span><br>
<ul>
<li>
<a name="RailType"></a>
Bits 5..0: Railtype. Used for all tiles with rail (road, rail, station, tunnelbridge).
</li>
</ul>
</li>
<li><span style="font-weight: bold;">m7:</span><br>
Animation frame/state. Used for houses, industries, objects and stations.
</li>
@@ -134,7 +108,7 @@
<table border=1 cellpadding=3>
<tr bgcolor="#0099FF">
<th align=left><font color="#FFFFFF">Class</font></th>
<th align=left><font color="#FFFFFF">Meaning &amp; details of encoding</font></th>
<th align=left><font color="#FFFFFF">Meaning & details of encoding</font></th>
</tr>
<tr bgcolor="#CCCCCC">
<td align=left><strong><a name="Class0"><tt> 0 </tt></a></strong></td>
@@ -249,7 +223,6 @@
<td valign=top nowrap>&nbsp;</td>
<td>
<ul>
<li>m1 bit 7: Ship docking tile status (for half-tile with water)</li>
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the tile</li>
<li>m2: see signals</li>
<li>m3 bits 7..4: see signals</li>
@@ -562,10 +535,21 @@
<td>
<ul>
<li>m2: Index into the array of towns (owning town for town roads; closest town otherwise, INVALID_TOWN if there is no town or we are creating a town)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)
<li>m4 bits 5..0: <a href="#RoadType">Roadtype</a></li>
<li>m7 bit 5 set = on snow or desert</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
<li>m7 bits 7..6: present road types
<table>
<tr>
<td>bit 0&nbsp; </td>
<td>normal road</td>
</tr>
<tr>
<td>bit 1&nbsp; </td>
<td>tram</td>
</tr>
</table>
</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)
<li>m5 bits 7 clear: road or level-crossing
<ul>
<li>m6 bits 5..3:
@@ -760,7 +744,7 @@
</ul>
</li>
</ul>
<small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).<br>
<small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developped by TTDPatch devs (mainly Csaboka).<br>
It allows the replacement of the properties as well as the graphics of houses in the game.<br>
To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.<br>
110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
@@ -872,14 +856,12 @@
<td valign=top nowrap>&nbsp;</td>
<td>
<ul>
<li>m1 bit 7: Ship docking tile status (for buoys)</li>
<li>m1 bits 6..5: water class for buoys, water part of docks and for airport tiles</li>
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the station</li>
<li>m2: index into the array of stations</li>
<li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
<li>m4: custom station id; 0 means standard graphics</li>
<li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
<li>m5: graphics index (range from 0..255 for each station type):
<table>
<tr>
@@ -995,8 +977,8 @@
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
<li>m7 bits 7..6: present road types (road stops)</li>
<li>m7: animation frame (railway stations/waypoints, airports)</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
</ul>
</td>
@@ -1010,7 +992,6 @@
<td valign=top nowrap>&nbsp;</td>
<td>
<ul>
<li>m1 bit 7: Ship docking tile status</li>
<li>m1 bits 6..5 : Water class (sea, canal or river)
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
<li>m2: Depot index (for depots only)</li>
@@ -1462,10 +1443,8 @@
<td valign=top nowrap>&nbsp;</td>
<td>
<ul>
<li>m1 bit 7: Ship docking tile status (for aqueducts)</li>
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a></li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li>
<li>m4: <a href="#RoadType">Roadtype</a></li>
<li>m5 bit 4: pbs reservation state for railway</li>
<li>m5 bits 7 clear: tunnel entrance/exit</li>
<li>m5 bit 7 set: bridge ramp
@@ -1602,7 +1581,7 @@
</li>
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li>
<li>m7 bit 5 set = on snow or desert</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
<li>m7 bits 7..6: present road types for road</li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway</li>
</ul>
</td>

View File

@@ -100,7 +100,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">rail</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">X<span class="free">OO</span>X XXXX</td>
<td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX <span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO</span> XXXX</td>
@@ -143,11 +143,11 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OO</span>X<span class="free">O</span> XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX XX<span class="free">OO OOOO</span></td>
<td class="bits">XXX<span class="free">O</span> XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">level crossing</td>
@@ -159,8 +159,8 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX <span class="free">OOO</span>X</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OO</span>XX XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr>
<tr>
<td class="caption">road depot</td>
@@ -169,11 +169,11 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OO</span>X<span class="free">O</span> XXXX</td>
<td class="bits">-inherit-</td>
<td class="bits">XXX<span class="free">O</span> XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr>
<tr>
<td>3</td>
@@ -208,7 +208,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">rail station</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">O</span>XXX XXXX</td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
<td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits">XXXX XXXX</td>
@@ -237,11 +237,11 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OO</span>XX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="option">~~~~ ~</span>XXX</td>
<td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
<td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX XX<span class="free">OO OOOO</span></td>
<td class="bits">XX<span class="free">O</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">dock</td>
@@ -300,7 +300,7 @@ the array so you can quickly see what is used and what is not.
<td class="caption">sea, shore</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">O</span>XXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
@@ -354,14 +354,14 @@ the array so you can quickly see what is used and what is not.
<td class="caption">tunnel entrance</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">X<span class="free">OO</span>X XXXX</td>
<td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits">XXXX <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OO</span>XX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">X<span class="free">OO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OO</span>XX XXXX</td>
<td class="bits"><span class="free">OOOO</span> XXXX XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO OO</span>XX XXXX</td>
</tr>
<tr>
<td>bridge ramp</td>
@@ -370,7 +370,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
<td class="bits">-inherit-</td>

View File

@@ -1,13 +1,13 @@
# Some clarifications about the link graph
Some clarifications about the link graph
----------------------------------------
`InitializeLinkGraphs` joins all threads, so if the game is abandoned
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`.
(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

View File

@@ -1,28 +1,28 @@
# Multiplayer manual for OpenTTD
Multiplayer manual for OpenTTD
Last updated: 2011-02-16
------------------------------------------------------------------------
## Table of contents
- 1.0) [Starting a server](#10-starting-a-server)
- 2.0) [Connecting to a server](#20-connecting-to-a-server)
- 2.1) [Connecting to a server over the console](#21-connecting-to-a-server-over-the-console)
- 3.0) [Playing internet games](#30-playing-internet-games)
- 4.0) [Tips for servers](#40-tips-for-servers)
- 4.1)[Imposing landscaping limits](#41-imposing-landscaping-limits)
- 5.0) [Some useful things](#50-some-useful-things)
- 6.0) [Troubleshooting](#60-troubleshooting)
Table of contents
-----------------
1.0) Starting a server
2.0) Connecting to a server
* 2.1) Connecting to a server over the console
3.0) Playing internet games
4.0) Tips for servers
* 4.1) Imposing landscaping limits
5.0) Some useful things
6.0) Troubleshooting
## 1.0) Starting a server
1.0) Starting a server
---- -----------------
- Make sure that you have your firewall of the computer as well as possible
routers or modems of the server configured such that:
- port 3979 is free for both UDP and TCP connections in- and outgoing
- port 3978 is free outbound for UDP in order to advertise with the master
* port 3979 is free for both UDP and TCP connections in- and outgoing
* port 3978 is free outbound for UDP in order to advertise with the master
server (if desired). Otherwise you'll have to tell players your IP.
- port 3977 if use of the admin interface is desired (see admin_network.txt)
* port 3977 if use of the admin interface is desired (see admin_network.txt)
- Click "multiplayer" on the startup screen
- Click "start server"
- Type in a game name
@@ -33,36 +33,42 @@ Last updated: 2011-02-16
- Start playing
## 2.0) Connecting to a server
2.0) Connecting to a server
---- ----------------------
- Click "multiplayer" on the startup screen
- If you want to connect to any network game in your LAN click on 'LAN', then
on 'Find Server'
- If you want to see which servers all online on the Internet, click on
'Internet' and 'Find Server'
- If there were more than one server
- select one in the list below the buttons
- click on 'join game'
- select one in the list below the buttons
- click on 'join game'
- If you want to play and you have the ip or hostname of the game server you
want connect to.
- click add server
- type in the ip address or hostname
- if you want to add a port use :<port>
- click add server
- type in the ip address or hostname
- if you want to add a port use :<port>
- Now you can select a company and press: "Join company", to help that company
- Or you can press "Spectate game", to spectate the game
- Or you can press "New company", and start your own company (if there are
- Or you can press "Spectate game", to spectate the game
- Or you can press "New company", and start your own company (if there are
slots free)
- You see a progressbar how far you are with joining the server.
- Happy playing
## 2.1) Connecting to a server over the console
2.1) Connecting to a server over the console
---- ---------------------------------------
- Open the console and type in the following command:
connect `<ip/host>:<port>#<company-no>`
connect <ip/host>:<port>#<company-no>
## 3.0) Playing internet games
3.0) Playing internet games
---- ----------------------
- Servers with a red dot behind it have a different version then you have. You
will not be able to join those servers.
@@ -92,8 +98,8 @@ Last updated: 2011-02-16
NB: changing frame_freq has more effect on the bandwidth then sync_freq.
## 4.0) Tips for servers
4.0) Tips for servers
---- ----------------
- You can launch a dedicated server by adding -D as parameter.
- In UNIX like systems, you can fork your dedicated server by adding -f as
parameter.
@@ -149,8 +155,8 @@ Last updated: 2011-02-16
maximum memory usage for packets is:
#max_clients * #max_clients * bytes_per_frame * 10 KiB.
### 4.1) Imposing landscaping limits
4.1) Imposing landscaping limits
---- ---------------------------
- You can impose limits on companies by the following 4 settings:
- terraform_per_64k_frames
- terraform_frame_burst
@@ -190,8 +196,8 @@ Last updated: 2011-02-16
affected by the above settings.
## 5.0) Some useful things
5.0) Some useful things
---- ------------------
- You can protect your company so nobody else can join uninvited. To do this,
set a password in your Company Screen
@@ -203,8 +209,8 @@ Last updated: 2011-02-16
- Servers can now kick players, so don't make them use it!
## 6.0) Troubleshooting
6.0) Troubleshooting
---- ---------------
- My advertising server does not show up in list at servers.openttd.org
Run openttd with the '-d net=2' parameter. That will show which incoming
communication is received, whether the replies from the master server or

View File

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

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2019-10-29
Release version: 1.10.0-beta1
Last updated: 2019-09-07
Release version: 1.9.3-RC1
------------------------------------------------------------------------
@@ -220,7 +220,7 @@ Entry- and exit signals are not dragged [#4378]:
Station build date is incorrect [#4415]:
The tile query tool will show the date of the last (re)construction
at the station and not the date of the first construction. This is
due to compatibility reasons with NewGRFs and the fact that it is
due to compatability reasons with NewGRFs and the fact that it is
wrong to say that the station is built in a particular year when it
was completely destroyed/rebuilt later on.
The tile query tool can be fixed by changing the "Build date" text
@@ -404,7 +404,7 @@ Some houses and industries are not affected by transparency [#5817]:
Involuntary cargo exchange with cargodist via neutral station [#6114]:
When two players serve a neutral station at an industry, a cross-company
chain for cargo flow can and will be established which can only be
interrupted if one of the players stops competing for the resources of
interrupted if one of the players stops competing for the ressources of
that industry. There is an easy fix for this: If you are loading at the
shared station make the order "no unload" and if you're unloading make
it "no load". Cargodist will then figure out that it should not create

View File

@@ -90,7 +90,7 @@ GM_TT19.GM = Funk Central
GM_TT20.GM = Jammit
GM_TT21.GM = Movin' On
; MIDI timecodes where the playback should attempt to start and stop short.
; MIDI timecodes where the playback should attemp to start and stop short.
; This is to allow fixing undesired silences in original MIDI files.
; However not all music drivers may support this.
[timingtrim]

View File

@@ -7,7 +7,7 @@
// 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 "OpenTTD GUI graphics"
-1 * 3 05 15 \b 184 // OPENTTD_SPRITE_COUNT
-1 * 3 05 15 \b 179 // OPENTTD_SPRITE_COUNT
-1 sprites/openttdgui.png 8bpp 66 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 146 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 226 8 64 31 -31 7 normal
@@ -187,8 +187,3 @@
-1 sprites/openttdgui_group_livery.png 8bpp 21 0 20 20 0 0 normal
-1 sprites/openttdgui_group_livery.png 8bpp 42 0 20 20 0 0 normal
-1 sprites/openttdgui_group_livery.png 8bpp 63 0 20 20 0 0 normal
-1 sprites/openttdgui_build_tram.png 8bpp 0 0 20 20 0 0 normal
-1 sprites/openttdgui_convert_road.png 8bpp 0 0 20 20 0 0 normal
-1 sprites/openttdgui_convert_road.png 8bpp 24 0 32 32 0 0 normal
-1 sprites/openttdgui_convert_tram.png 8bpp 0 0 20 20 0 0 normal
-1 sprites/openttdgui_convert_tram.png 8bpp 24 0 32 32 0 0 normal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -7,7 +7,7 @@
// 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 "Tram track graphics by PikkaBird"
-1 * 3 05 0B 77
-1 * 3 05 0B 71
-1 sprites/tramtracks.png 8bpp 18 8 20 13 0 4 normal
-1 sprites/tramtracks.png 8bpp 50 8 20 13 0 4 normal
-1 sprites/tramtracks.png 8bpp 82 8 64 36 -18 -8 normal
@@ -121,9 +121,3 @@
-1 sprites/tramtracks.png 8bpp 722 696 64 23 -31 0 normal
-1 sprites/tramtracks.png 8bpp 2 776 64 23 -31 0 normal
-1 sprites/tramtracks.png 8bpp 82 776 64 39 -31 -8 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 0 0 64 31 -31 0 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 80 0 62 64 2 -49 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 158 0 64 31 -31 0 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 238 0 62 64 -62 -49 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 318 0 62 64 -62 -49 normal
-1 sprites/tramtracks_bare_depot.png 8bpp 398 0 62 64 2 -49 normal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,18 +1,7 @@
openttd (1.10.0~beta1-0) unstable; urgency=low
* New upstream release 1.10.0-beta1
-- OpenTTD <info@openttd.org> Tue, 29 Oct 2019 00:00:00 +0000
openttd (1.9.3-0) unstable; urgency=low
* New upstream release 1.9.3
-- OpenTTD <info@openttd.org> Mon, 16 Sep 2019 21:00:00 +0200
openttd (1.9.3~RC1-0) unstable; urgency=low
* New upstream release 1.9.3-RC1
-- OpenTTD <info@openttd.org> Sat, 07 Sep 2019 23:30:00 +0200
openttd (1.9.2-0) unstable; urgency=low
@@ -1062,7 +1051,7 @@ openttd (0.4.0-1) unstable; urgency=low
openttd (0.3.6-1) unstable; urgency=low
* New upstream release
* Modified Makefile to install xpm icon and scenarios in /usr/share/games/openttd/
* Modifed Makefile to install xpm icon and scenarios in /usr/share/games/openttd/
* Added openttd.32.xpm, openttd.64.xpm was too big
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 25 Jan 2005 19:21:08 +0100

View File

@@ -3,7 +3,7 @@ Section: games
Priority: optional
Maintainer: Matthijs Kooijman <matthijs@stdin.nl>
Uploaders: Jordi Mallach <jordi@debian.org>
Build-Depends: debhelper (>= 7.0.50), libsdl2-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzma-dev, liblzo2-dev
Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzma-dev, liblzo2-dev
Standards-Version: 3.8.4
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/openttd.git
Vcs-Git: git://anonscm.debian.org/collab-maint/openttd.git

View File

@@ -29,7 +29,7 @@ include /usr/share/dpkg/buildflags.mk
# to be explicit about the dependencies, in case we're not running in a
# clean build root.
override_dh_auto_configure:
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu-sort --with-liblzo2 --with-lzma --without-xdg-basedir --without-iconv --disable-strip CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 --with-lzma --without-xdg-basedir --without-iconv --disable-strip CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
# Do some extra installation
override_dh_auto_install:

View File

@@ -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.

BIN
os/dos/cwsdpmi/cwsdpmi.exe Normal file

Binary file not shown.

173
os/dos/cwsdpmi/cwsdpmi.txt Normal file
View File

@@ -0,0 +1,173 @@
CWSDPMI is Copyright (C) 1995-2000 Charles W Sandmann (sandmann@clio.rice.edu)
1206 Braelinn, Sugar Land, TX 77479
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.
-------------------------------------------------------------------------------
CWSDPMI was written to provide DPMI services for V2 of DJGPP. It currently
does not support 16-bit DPMI applications, or DPMI applications requiring a
built in extender. It does support virtual memory and hardware interrupt
reflection from real mode to protected mode. DJGPP V1.1x and RSX applications
will also run using this server, which can be used to provide enhanced control
over hardware interrupts. Some DPMI 1.0 extensions (0x506, 0x507, 0x508) have
been implemented.
CWSDPR0.EXE is an alternate version which runs at ring 0 with virtual memory
disabled. It may be used if access to ring-0 features are desired. It
currently does not switch stacks on HW interrupts, so some DJGPP features
such as SIGINT and SIGFPE are not supported and will generate a double fault
or stack fault error (to be fixed someday).
CWSDSTUB.EXE is a stub loader image for DJGPP which includes CWSDPMI. This
allows single executable image distributions. You can use the EXE2COFF
program and COPY /B CWSDSTUB.EXE+yourimage yourimage.exe to create a
standalone executable image.
Some of the internal tuning and configuration parameters may be modified
in the image using CWSPARAM.EXE (see CWSPARAM.DOC).
If you want to use CWSDPMI with DJGPP, you expand the distribution into the
DJGPP directory tree. CWSDPMI.EXE will be put in the BIN directory with your
DJGPP images and it will automatically be loaded when they run.
Directions for use (server can be used in either of two different ways):
1) "cwsdpmi" alone with no parameters will terminate and stay resident
FOR A SINGLE DPMI PROCESS. This means it unloads itself when your
DPMI application exits. This mode is useful in software which needs
DPMI services, since CWSDPMI can be exec'ed and then will unload on exit.
2) "cwsdpmi -p" will terminate and stay resident until you remove it.
It can be loaded into UMBs with LH. "cwsdpmi -u" will unload the TSR.
3) The file used for virtual memory swapping, if desired, is controlled
by the "-sc:\cwsdpmi.swp" syntax on the command line. You must specify
either a file with full disk/directory syntax, or "-s-" which disables
virtual memory.
4) The default swap file name is c:\cwsdpmi.swp, but this can be changed
with the CWSPARAM image, as can some other parameters.
5) You can disable the DPMI 1.0 extensions by starting the image with the
"cwsdpmi -x" syntax. This feature allows you to run programs developed
under other DPMI providers which do not behave properly with these
extensions enabled (typically use of NULL pointers).
I would like to give special thanks to DJ Delorie who wrote the original
GO32 code on which CWSDPMI is based. Morten Welinder also provided and
improved much of the code in this program.
-------------------------------------------------------------------------------
This section contains a list of the error messages you might see out of
CWSDPMI and some details on what they mean.
Exceptions are only handled by CWSDPMI if the application does not establish
an exception handler, exceptions nest 5 deep, or the error is particularly bad:
"Page fault" -
1) an illegal page fault happens in a RMCB or HW interrupt, (lock all pages!)
2) all available pages have been locked,
3) the application is using non-committed pages for null pointer protection.
"Double Fault" - multiple exceptions occurred
"Invalid TSS" - typically due to RMCB or HW interrupt being called after the
selectors/memory have been deallocated (remember to reset the mouse)
"General Protection Fault" - bad parameter sent to a DPMI call
"80386 required."
Since 80286 and lesser processors don't have the hardware necessary to
run CWSDPMI. No workaround, upgrade.
"DOS 3 required."
A few interrupts are used which need DOS 3.0 or higher. I don't expect to
ever see this message, since 80386 machines were introduced after DOS 3.0
and that check is made first.
"CWSDPMI V0.90+ (r5) Copyright (C) 2000 CW Sandmann ABSOLUTELY NO WARRANTY"
An informational message displayed if the program is not run in one-pass mode.
"Protected mode not accessible."
This message should only be displayed if running CWSDPMI in a protected
environment with no access to protected mode. In this case, DPMI should
already be available and CWSDPMI would not be needed. This might happen if
a 16-bit DPMI client is loaded and a DJGPP image attempts to load CWSDPMI
to provide 32-bit DPMI services under Windows.
"Warning: cannot open swap file c:\cwsdpmi.swp"
Maybe you are out of file handles, or the swap file name is incorrectly
specified in the image (change the name with cwsparam).
"No swap space!"
This message means you tried to use more paging file than CWSDPMI was
configured to handle. Since this is protected against in the memory
allocation code, you should never see this message.
"Swap disk full!"
This means the paging file could not be expanded when trying to page
memory out to disk. This would normally not be seen, unless you are
writing output to the same disk which holds the paging file. Decrease
the amount of memory your DPMI application is using or free up disk space.
"Interrupt 0x??"
Your application tried to call an interrupt from protected mode which
normally shouldn't be called (something like a data pointer). If the
request was allowed to continue it would likely hang your machine. If you
see this message and think the interrupt should be allowed to continue, let
me know.
"Error: Using XMS switched CPU into V86 mode."
This message might be seen if you have your memory manager in AUTO mode. The
only workaround in this case is to stop using AUTO mode.
"Error: could not allocate page table memory"
The page table memory (a minimum of 16Kb) is allocated from conventional
memory (either in the 640Kb region or UMBs). If CWSDPMI cannot allocate the
minimum necessary memory, you would see this message. Free up some
conventional memory. You may also see this message if a page directory needs
to be faulted in, and there are no available pages. This means too many pages
have been locked for the allocated page tables available. While CWSDPMI
tries to dynamically allocate these if needed, this effort failed. You need
to increase the number of page tables with CWSPARAM, or increase the amount
of free conventional memory if it is low. If the application which calls
CWSDPMI internally manages all the DOS memory, the page tables may need to
be pre-allocated at DPMI startup time (if this is needed, try using the
run option flag 2 in cwsparam).
"16-bit DPMI unsupported."
CWSDPMI is a 32-bit only DPMI server. Ideally, on the request to enter DPMI's
PM with a 16-bit request, we would just fail the call setting the carry bit
like the DPMI specification describes. Some buggy 16-bit compiler tools don't
check the return status and will hang the machine in this case. So, I issue
an error message and exit the image instead.
"Descriptors exhausted."
An attempt to nest a DPMI client failed in the setup phase due to insufficient
free selectors in the LDT.
"CWSDPMI not removed"
When the -u parameter is specified, if DPMI is not detected this message is
printed. Informational.

BIN
os/dos/cwsdpmi/cwsdstub.exe Normal file

Binary file not shown.

View File

@@ -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.

339
os/dos/exe2coff/copying Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program 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; either version 2 of the License, or
(at your option) any later version.
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 program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -0,0 +1,48 @@
This is the file "copying.dj". It does NOT apply to any sources or
binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
any other agency besides DJ Delorie and others who have agreed to
allow their sources to be distributed under these terms.
Copyright Information for sources and executables that are marked
Copyright (C) DJ Delorie
7 Kim Lane
Rochester NH 03867-2954
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.
-----
Changes to source code copyright BSD, FSF, or others, by DJ Delorie
fall under the terms of the original copyright. Such files usually
have multiple copyright notices in them.
A copy of the files "COPYING" and "COPYING.LIB" are included with this
document. If you did not receive a copy of these files, you may
obtain one from whence this document was obtained, or by writing:
Free Software Foundation
59 Temple Place - Suite 330
Boston, MA 02111-1307
USA

481
os/dos/exe2coff/copying.lib Normal file
View File

@@ -0,0 +1,481 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -0,0 +1,94 @@
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
/* Updated 2008 to use fread/fopen and friends instead of read/open so it compiles with GCC on Unix (Rubidium) */
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
static void
exe2aout(char *fname)
{
unsigned short header[3];
FILE *ifile;
FILE *ofile;
char buf[4096];
int rbytes;
char *dot = strrchr(fname, '.');
if (!dot || strlen(dot) != 4
|| tolower(dot[1]) != 'e'
|| tolower(dot[2]) != 'x'
|| tolower(dot[3]) != 'e')
{
fprintf(stderr, "%s: Arguments MUST end with a .exe extension\n", fname);
return;
}
ifile = fopen(fname, "rb");
if (!ifile)
{
perror(fname);
return;
}
fread(header, sizeof(header), 1, ifile);
if (header[0] == 0x5a4d)
{
long header_offset = (long)header[2]*512L;
if (header[1])
header_offset += (long)header[1] - 512L;
fseek(ifile, header_offset, SEEK_SET);
header[0] = 0;
fread(header, sizeof(header), 1, ifile);
if ((header[0] != 0x010b) && (header[0] != 0x014c))
{
fprintf(stderr, "`%s' does not have a COFF/AOUT program appended to it\n", fname);
return;
}
fseek(ifile, header_offset, SEEK_SET);
}
else
{
fprintf(stderr, "`%s' is not an .EXE file\n", fname);
return;
}
*dot = 0;
ofile = fopen(fname, "w+b");
if (!ofile)
{
perror(fname);
return;
}
while ((rbytes=fread(buf, 1, 4096, ifile)) > 0)
{
int wb = fwrite(buf, 1, rbytes, ofile);
if (wb < 0)
{
perror(fname);
break;
}
if (wb < rbytes)
{
fprintf(stderr, "`%s': disk full\n", fname);
exit(1);
}
}
fclose(ifile);
fclose(ofile);
}
int
main(int argc, char **argv)
{
int i;
if (argc == 1) printf("Usage: %s <exename>", argv[0]);
for (i=1; i<argc; i++)
exe2aout(argv[i]);
return 0;
}

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# $Id$
cd `dirname $0`
cc -o exe2coff/exe2coff exe2coff/exe2coff.c || exit
cp $1 binary.exe || exit
./exe2coff/exe2coff binary.exe || exit
cat cwsdpmi/cwsdstub.exe binary > binary.exe || exit
mv binary.exe $1
rm binary exe2coff/exe2coff

View File

@@ -1,6 +1,6 @@
@echo off
set OPENTTD_VERSION=1.10.0
set OPENTTD_VERSION=1.9.3
set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=1.2.0

View File

@@ -71,7 +71,7 @@
<!-- page 1: introductory page -->
<PAGE INDEX="1" TYPE="README">
<NEXTBUTTON TARGET=2>~Next</NEXTBUTTON>
<README EXTRACTFROMPCK="1">README.md</README>
<README EXTRACTFROMPCK="1">README.TXT</README>
<TEXT>Welcome to the OpenTTD installer. This program will install OpenTTD 1.0 on your system. Before we begin the installation process, please take a moment to read the following document.
Select "Next" to continue, or "Cancel" to abort installation.</TEXT>
@@ -80,7 +80,7 @@ Select "Next" to continue, or "Cancel" to abort installation.</TEXT>
<!-- page 2: licence page -->
<PAGE INDEX="2" TYPE="README">
<NEXTBUTTON TARGET=3>~Next</NEXTBUTTON>
<README EXTRACTFROMPCK="1">COPYING.md</README>
<README EXTRACTFROMPCK="1">COPYING</README>
<TEXT>OpenTTD is licenced under the GNU General Public License. The text of the licence is below.
Select "Next" if you agree to this licence.

View File

@@ -46,7 +46,7 @@ Sat May 1 15:59:32 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
Thu Apr 1 08:53:54 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
- upstream update 1.0.0 (finally!)
* completely independent game but still working also
* completely independend game but still working also
with ttd original gaphics, sounds and music
- Add: Recommends openmsx
- requires lzo2
@@ -54,7 +54,7 @@ Thu Apr 1 08:53:54 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
-------------------------------------------------------------------
Fri Dec 18 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.4
- support for different branches
- support for differen branches
- easy support for dedicated branch
- let openttd build system make the dektop file
- split the package to data and gui

View File

@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.10.beta1
Version: 1.9.3-RC1
Release: 0
%define srcver 1.10.0-beta1
%define srcver 1.9.3-RC1
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0
Group: Amusements/Games/Strategy/Other
@@ -61,7 +61,7 @@ BuildRequires: kernel
BuildRequires: pkg-config
%endif
# building openttd.grf is not required as it is a) part of source and
# bulding openttd.grf is not required as it is a) part of source and
# b) required only, if you want to use the original set
%if 0%{?with_grfcodec}
BuildRequires: grfcodec
@@ -81,7 +81,7 @@ the original data from the game or install the recommend subackages OpenGFX for
free graphics, OpenSFX for free sounds and OpenMSX for free music.
OpenTTD is licensed under the GNU General Public License version 2.0. For more
information, see the file 'COPYING.md' included with every release and source
information, see the file 'COPYING' included with every release and source
download of the game.
%package gui
@@ -91,7 +91,7 @@ Group: Amusements/Games/Strategy/Other
Requires: %{name}
Conflicts: %{name}-dedicated
BuildRequires: SDL2-devel
BuildRequires: SDL-devel
BuildRequires: fontconfig-devel
%if 0%{?rhel_version} != 600

View File

@@ -1,9 +1,9 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 10
!define APPV_MAINT 0
!define APPV_MINOR 9
!define APPV_MAINT 3
!define APPV_BUILD 0
!define APPV_EXTRA "-beta1"
!define APPV_EXTRA "-RC1"
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
@@ -63,7 +63,7 @@ Var CDDRIVE
!define MUI_ABORTWARNING
!define MUI_WELCOMEPAGE_TITLE_3LINES
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING.md"
!insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING"
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_COMPONENTS
@@ -143,10 +143,10 @@ Section "!OpenTTD" Section1
Push "$INSTDIR\scripts\README.md"
Call unix2dos
; Copy some documentation files
; Copy some documention files
SetOutPath "$INSTDIR\docs\"
File ${PATH_ROOT}docs\multiplayer.md
Push "$INSTDIR\docs\multiplayer.md"
File ${PATH_ROOT}docs\multiplayer.txt
Push "$INSTDIR\docs\multiplayer.txt"
Call unix2dos
; Copy the rest of the stuff
@@ -156,8 +156,8 @@ Section "!OpenTTD" Section1
File ${PATH_ROOT}changelog.txt
Push "$INSTDIR\changelog.txt"
Call unix2dos
File ${PATH_ROOT}COPYING.md
Push "$INSTDIR\COPYING.md"
File ${PATH_ROOT}COPYING
Push "$INSTDIR\COPYING"
Call unix2dos
File ${PATH_ROOT}README.md
Push "$INSTDIR\README.md"
@@ -218,7 +218,7 @@ Section "!OpenTTD" Section1
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" "$INSTDIR\Changelog.txt"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" "$INSTDIR\known-bugs.txt"
CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Docs"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" "$INSTDIR\docs\multiplayer.md"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" "$INSTDIR\docs\multiplayer.txt"
CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Scripts"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" "$INSTDIR\scripts\README.md"
!insertmacro MUI_STARTMENU_WRITE_END
@@ -392,7 +392,7 @@ Section "Uninstall"
Delete "$INSTDIR\README.md"
Delete "$INSTDIR\known-bugs.txt"
Delete "$INSTDIR\openttd.exe"
Delete "$INSTDIR\COPYING.md"
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\INSTALL.LOG"
Delete "$INSTDIR\crash.log"
Delete "$INSTDIR\crash.dmp"

View File

@@ -132,14 +132,14 @@ load_main_data() {
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; }
if ($0 == "BEOS" && "'$os'" != "BEOS") { next; }
if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; }
if ($0 == "FLUIDSYNTH" && "'$enable_fluidsynth'" != "1") { next; }
if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; }
if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
skip += 1;

View File

@@ -179,9 +179,8 @@ Sub load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files)
line = "MSVC" Or _
line = "DIRECTMUSIC" Or _
line = "AI" Or _
line = "USE_SSE" Or _
line = "USE_XAUDIO2" Or _
line = "USE_THREADS" _
line = "SSE" Or _
line = "HAVE_THREAD" _
) Then skip = skip + 1
deep = deep + 1
Case "#"

View File

@@ -10,6 +10,7 @@
<ProjectName>generate</ProjectName>
<ProjectGuid>{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}</ProjectGuid>
<RootNamespace>generate</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -448,7 +448,6 @@
<ClInclude Include="..\src\base_media_base.h" />
<ClInclude Include="..\src\base_media_func.h" />
<ClInclude Include="..\src\base_station_base.h" />
<ClInclude Include="..\src\bitmap_type.h" />
<ClInclude Include="..\src\bmp.h" />
<ClInclude Include="..\src\bridge.h" />
<ClInclude Include="..\src\cargo_type.h" />
@@ -584,7 +583,6 @@
<ClInclude Include="..\src\newgrf_object.h" />
<ClInclude Include="..\src\newgrf_properties.h" />
<ClInclude Include="..\src\newgrf_railtype.h" />
<ClInclude Include="..\src\newgrf_roadtype.h" />
<ClInclude Include="..\src\newgrf_sound.h" />
<ClInclude Include="..\src\newgrf_spritegroup.h" />
<ClInclude Include="..\src\newgrf_station.h" />
@@ -615,7 +613,6 @@
<ClInclude Include="..\src\rail_gui.h" />
<ClInclude Include="..\src\rail_type.h" />
<ClInclude Include="..\src\rev.h" />
<ClInclude Include="..\src\road.h" />
<ClInclude Include="..\src\road_cmd.h" />
<ClInclude Include="..\src\road_func.h" />
<ClInclude Include="..\src\road_gui.h" />
@@ -648,7 +645,6 @@
<ClInclude Include="..\src\station_base.h" />
<ClInclude Include="..\src\station_func.h" />
<ClInclude Include="..\src\station_gui.h" />
<ClInclude Include="..\src\station_kdtree.h" />
<ClInclude Include="..\src\station_type.h" />
<ClInclude Include="..\src\statusbar_gui.h" />
<ClInclude Include="..\src\stdafx.h" />
@@ -683,7 +679,6 @@
<ClInclude Include="..\src\toolbar_gui.h" />
<ClInclude Include="..\src\town.h" />
<ClInclude Include="..\src\town_type.h" />
<ClInclude Include="..\src\town_kdtree.h" />
<ClInclude Include="..\src\townname_func.h" />
<ClInclude Include="..\src\townname_type.h" />
<ClInclude Include="..\src\track_func.h" />
@@ -700,7 +695,6 @@
<ClInclude Include="..\src\vehicle_type.h" />
<ClInclude Include="..\src\vehiclelist.h" />
<ClInclude Include="..\src\viewport_func.h" />
<ClInclude Include="..\src\viewport_kdtree.h" />
<ClInclude Include="..\src\viewport_sprite_sorter.h" />
<ClInclude Include="..\src\viewport_type.h" />
<ClInclude Include="..\src\water.h" />
@@ -729,7 +723,6 @@
<ClCompile Include="..\src\core\geometry_func.cpp" />
<ClInclude Include="..\src\core\geometry_func.hpp" />
<ClInclude Include="..\src\core\geometry_type.hpp" />
<ClInclude Include="..\src\core\kdtree.hpp" />
<ClCompile Include="..\src\core\math_func.cpp" />
<ClInclude Include="..\src\core\math_func.hpp" />
<ClInclude Include="..\src\core\mem_func.hpp" />
@@ -744,6 +737,7 @@
<ClInclude Include="..\src\core\smallmatrix_type.hpp" />
<ClInclude Include="..\src\core\smallstack_type.hpp" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\core\sort_func.hpp" />
<ClInclude Include="..\src\core\string_compare_type.hpp" />
<ClCompile Include="..\src\aircraft_gui.cpp" />
<ClCompile Include="..\src\airport_gui.cpp" />
@@ -953,7 +947,6 @@
<ClInclude Include="..\src\table\railtypes.h" />
<ClInclude Include="..\src\table\road_land.h" />
<ClInclude Include="..\src\table\roadveh_movement.h" />
<ClInclude Include="..\src\table\roadtypes.h" />
<ClInclude Include="..\src\..\objs\settings\table\settings.h" />
<ClInclude Include="..\src\table\sprites.h" />
<ClInclude Include="..\src\table\station_land.h" />
@@ -1092,7 +1085,6 @@
<ClInclude Include="..\src\script\api\script_rail.hpp" />
<ClInclude Include="..\src\script\api\script_railtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_road.hpp" />
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_sign.hpp" />
<ClInclude Include="..\src\script\api\script_signlist.hpp" />
<ClInclude Include="..\src\script\api\script_station.hpp" />
@@ -1159,7 +1151,6 @@
<ClCompile Include="..\src\script\api\script_rail.cpp" />
<ClCompile Include="..\src\script\api\script_railtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_road.cpp" />
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_sign.cpp" />
<ClCompile Include="..\src\script\api\script_signlist.cpp" />
<ClCompile Include="..\src\script\api\script_station.cpp" />
@@ -1233,7 +1224,6 @@
<ClCompile Include="..\src\newgrf_industrytiles.cpp" />
<ClCompile Include="..\src\newgrf_object.cpp" />
<ClCompile Include="..\src\newgrf_railtype.cpp" />
<ClCompile Include="..\src\newgrf_roadtype.cpp" />
<ClCompile Include="..\src\newgrf_sound.cpp" />
<ClCompile Include="..\src\newgrf_spritegroup.cpp" />
<ClCompile Include="..\src\newgrf_station.cpp" />
@@ -1296,6 +1286,8 @@
<ClCompile Include="..\src\network\core\udp.cpp" />
<ClInclude Include="..\src\network\core\udp.h" />
<ClInclude Include="..\src\pathfinder\follow_track.hpp" />
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
<ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
@@ -1339,7 +1331,8 @@
<ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread.h" />
<ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -432,9 +432,6 @@
<ClInclude Include="..\src\base_station_base.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bitmap_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bmp.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -840,9 +837,6 @@
<ClInclude Include="..\src\newgrf_railtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_roadtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_sound.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -933,9 +927,6 @@
<ClInclude Include="..\src\rev.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road_cmd.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1032,9 +1023,6 @@
<ClInclude Include="..\src\station_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_type.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1137,9 +1125,6 @@
<ClInclude Include="..\src\town_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\town_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\townname_func.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1188,9 +1173,6 @@
<ClInclude Include="..\src\viewport_func.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_sprite_sorter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1275,9 +1257,6 @@
<ClInclude Include="..\src\core\geometry_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\kdtree.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClCompile Include="..\src\core\math_func.cpp">
<Filter>Core Source Code</Filter>
</ClCompile>
@@ -1320,6 +1299,9 @@
<ClInclude Include="..\src\core\smallvec_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\sort_func.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\string_compare_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
@@ -1947,9 +1929,6 @@
<ClInclude Include="..\src\table\roadveh_movement.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\table\roadtypes.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\..\objs\settings\table\settings.h">
<Filter>Tables</Filter>
</ClInclude>
@@ -2364,9 +2343,6 @@
<ClInclude Include="..\src\script\api\script_road.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_sign.hpp">
<Filter>Script API</Filter>
</ClInclude>
@@ -2565,9 +2541,6 @@
<ClCompile Include="..\src\script\api\script_road.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_sign.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
@@ -2787,9 +2760,6 @@
<ClCompile Include="..\src\newgrf_railtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_roadtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_sound.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
@@ -2976,6 +2946,12 @@
<ClInclude Include="..\src\pathfinder\follow_track.hpp">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
<Filter>Pathfinder</Filter>
</ClCompile>
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClInclude Include="..\src\pathfinder\pathfinder_func.h">
<Filter>Pathfinder</Filter>
</ClInclude>
@@ -3105,9 +3081,12 @@
<ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClInclude Include="..\src\thread.h">
<ClInclude Include="..\src\thread\thread.h">
<Filter>Threading</Filter>
</ClInclude>
<ClCompile Include="..\src\thread\thread_win32.cpp">
<Filter>Threading</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>

View File

@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -448,7 +448,6 @@
<ClInclude Include="..\src\base_media_base.h" />
<ClInclude Include="..\src\base_media_func.h" />
<ClInclude Include="..\src\base_station_base.h" />
<ClInclude Include="..\src\bitmap_type.h" />
<ClInclude Include="..\src\bmp.h" />
<ClInclude Include="..\src\bridge.h" />
<ClInclude Include="..\src\cargo_type.h" />
@@ -584,7 +583,6 @@
<ClInclude Include="..\src\newgrf_object.h" />
<ClInclude Include="..\src\newgrf_properties.h" />
<ClInclude Include="..\src\newgrf_railtype.h" />
<ClInclude Include="..\src\newgrf_roadtype.h" />
<ClInclude Include="..\src\newgrf_sound.h" />
<ClInclude Include="..\src\newgrf_spritegroup.h" />
<ClInclude Include="..\src\newgrf_station.h" />
@@ -615,7 +613,6 @@
<ClInclude Include="..\src\rail_gui.h" />
<ClInclude Include="..\src\rail_type.h" />
<ClInclude Include="..\src\rev.h" />
<ClInclude Include="..\src\road.h" />
<ClInclude Include="..\src\road_cmd.h" />
<ClInclude Include="..\src\road_func.h" />
<ClInclude Include="..\src\road_gui.h" />
@@ -648,7 +645,6 @@
<ClInclude Include="..\src\station_base.h" />
<ClInclude Include="..\src\station_func.h" />
<ClInclude Include="..\src\station_gui.h" />
<ClInclude Include="..\src\station_kdtree.h" />
<ClInclude Include="..\src\station_type.h" />
<ClInclude Include="..\src\statusbar_gui.h" />
<ClInclude Include="..\src\stdafx.h" />
@@ -683,7 +679,6 @@
<ClInclude Include="..\src\toolbar_gui.h" />
<ClInclude Include="..\src\town.h" />
<ClInclude Include="..\src\town_type.h" />
<ClInclude Include="..\src\town_kdtree.h" />
<ClInclude Include="..\src\townname_func.h" />
<ClInclude Include="..\src\townname_type.h" />
<ClInclude Include="..\src\track_func.h" />
@@ -700,7 +695,6 @@
<ClInclude Include="..\src\vehicle_type.h" />
<ClInclude Include="..\src\vehiclelist.h" />
<ClInclude Include="..\src\viewport_func.h" />
<ClInclude Include="..\src\viewport_kdtree.h" />
<ClInclude Include="..\src\viewport_sprite_sorter.h" />
<ClInclude Include="..\src\viewport_type.h" />
<ClInclude Include="..\src\water.h" />
@@ -729,7 +723,6 @@
<ClCompile Include="..\src\core\geometry_func.cpp" />
<ClInclude Include="..\src\core\geometry_func.hpp" />
<ClInclude Include="..\src\core\geometry_type.hpp" />
<ClInclude Include="..\src\core\kdtree.hpp" />
<ClCompile Include="..\src\core\math_func.cpp" />
<ClInclude Include="..\src\core\math_func.hpp" />
<ClInclude Include="..\src\core\mem_func.hpp" />
@@ -744,6 +737,7 @@
<ClInclude Include="..\src\core\smallmatrix_type.hpp" />
<ClInclude Include="..\src\core\smallstack_type.hpp" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\core\sort_func.hpp" />
<ClInclude Include="..\src\core\string_compare_type.hpp" />
<ClCompile Include="..\src\aircraft_gui.cpp" />
<ClCompile Include="..\src\airport_gui.cpp" />
@@ -953,7 +947,6 @@
<ClInclude Include="..\src\table\railtypes.h" />
<ClInclude Include="..\src\table\road_land.h" />
<ClInclude Include="..\src\table\roadveh_movement.h" />
<ClInclude Include="..\src\table\roadtypes.h" />
<ClInclude Include="..\src\..\objs\settings\table\settings.h" />
<ClInclude Include="..\src\table\sprites.h" />
<ClInclude Include="..\src\table\station_land.h" />
@@ -1092,7 +1085,6 @@
<ClInclude Include="..\src\script\api\script_rail.hpp" />
<ClInclude Include="..\src\script\api\script_railtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_road.hpp" />
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_sign.hpp" />
<ClInclude Include="..\src\script\api\script_signlist.hpp" />
<ClInclude Include="..\src\script\api\script_station.hpp" />
@@ -1159,7 +1151,6 @@
<ClCompile Include="..\src\script\api\script_rail.cpp" />
<ClCompile Include="..\src\script\api\script_railtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_road.cpp" />
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_sign.cpp" />
<ClCompile Include="..\src\script\api\script_signlist.cpp" />
<ClCompile Include="..\src\script\api\script_station.cpp" />
@@ -1233,7 +1224,6 @@
<ClCompile Include="..\src\newgrf_industrytiles.cpp" />
<ClCompile Include="..\src\newgrf_object.cpp" />
<ClCompile Include="..\src\newgrf_railtype.cpp" />
<ClCompile Include="..\src\newgrf_roadtype.cpp" />
<ClCompile Include="..\src\newgrf_sound.cpp" />
<ClCompile Include="..\src\newgrf_spritegroup.cpp" />
<ClCompile Include="..\src\newgrf_station.cpp" />
@@ -1296,6 +1286,8 @@
<ClCompile Include="..\src\network\core\udp.cpp" />
<ClInclude Include="..\src\network\core\udp.h" />
<ClInclude Include="..\src\pathfinder\follow_track.hpp" />
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
<ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
@@ -1339,7 +1331,8 @@
<ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread.h" />
<ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -432,9 +432,6 @@
<ClInclude Include="..\src\base_station_base.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bitmap_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bmp.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -840,9 +837,6 @@
<ClInclude Include="..\src\newgrf_railtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_roadtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_sound.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -933,9 +927,6 @@
<ClInclude Include="..\src\rev.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road_cmd.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1032,9 +1023,6 @@
<ClInclude Include="..\src\station_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_type.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1137,9 +1125,6 @@
<ClInclude Include="..\src\town_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\town_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\townname_func.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1188,9 +1173,6 @@
<ClInclude Include="..\src\viewport_func.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_sprite_sorter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1275,9 +1257,6 @@
<ClInclude Include="..\src\core\geometry_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\kdtree.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClCompile Include="..\src\core\math_func.cpp">
<Filter>Core Source Code</Filter>
</ClCompile>
@@ -1320,6 +1299,9 @@
<ClInclude Include="..\src\core\smallvec_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\sort_func.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\string_compare_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
@@ -1947,9 +1929,6 @@
<ClInclude Include="..\src\table\roadveh_movement.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\table\roadtypes.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\..\objs\settings\table\settings.h">
<Filter>Tables</Filter>
</ClInclude>
@@ -2364,9 +2343,6 @@
<ClInclude Include="..\src\script\api\script_road.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_sign.hpp">
<Filter>Script API</Filter>
</ClInclude>
@@ -2565,9 +2541,6 @@
<ClCompile Include="..\src\script\api\script_road.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_sign.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
@@ -2787,9 +2760,6 @@
<ClCompile Include="..\src\newgrf_railtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_roadtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_sound.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
@@ -2976,6 +2946,12 @@
<ClInclude Include="..\src\pathfinder\follow_track.hpp">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
<Filter>Pathfinder</Filter>
</ClCompile>
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClInclude Include="..\src\pathfinder\pathfinder_func.h">
<Filter>Pathfinder</Filter>
</ClInclude>
@@ -3105,9 +3081,12 @@
<ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClInclude Include="..\src\thread.h">
<ClInclude Include="..\src\thread\thread.h">
<Filter>Threading</Filter>
</ClInclude>
<ClCompile Include="..\src\thread\thread_win32.cpp">
<Filter>Threading</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>

View File

@@ -78,16 +78,16 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -448,7 +448,6 @@
<ClInclude Include="..\src\base_media_base.h" />
<ClInclude Include="..\src\base_media_func.h" />
<ClInclude Include="..\src\base_station_base.h" />
<ClInclude Include="..\src\bitmap_type.h" />
<ClInclude Include="..\src\bmp.h" />
<ClInclude Include="..\src\bridge.h" />
<ClInclude Include="..\src\cargo_type.h" />
@@ -584,7 +583,6 @@
<ClInclude Include="..\src\newgrf_object.h" />
<ClInclude Include="..\src\newgrf_properties.h" />
<ClInclude Include="..\src\newgrf_railtype.h" />
<ClInclude Include="..\src\newgrf_roadtype.h" />
<ClInclude Include="..\src\newgrf_sound.h" />
<ClInclude Include="..\src\newgrf_spritegroup.h" />
<ClInclude Include="..\src\newgrf_station.h" />
@@ -615,7 +613,6 @@
<ClInclude Include="..\src\rail_gui.h" />
<ClInclude Include="..\src\rail_type.h" />
<ClInclude Include="..\src\rev.h" />
<ClInclude Include="..\src\road.h" />
<ClInclude Include="..\src\road_cmd.h" />
<ClInclude Include="..\src\road_func.h" />
<ClInclude Include="..\src\road_gui.h" />
@@ -648,7 +645,6 @@
<ClInclude Include="..\src\station_base.h" />
<ClInclude Include="..\src\station_func.h" />
<ClInclude Include="..\src\station_gui.h" />
<ClInclude Include="..\src\station_kdtree.h" />
<ClInclude Include="..\src\station_type.h" />
<ClInclude Include="..\src\statusbar_gui.h" />
<ClInclude Include="..\src\stdafx.h" />
@@ -683,7 +679,6 @@
<ClInclude Include="..\src\toolbar_gui.h" />
<ClInclude Include="..\src\town.h" />
<ClInclude Include="..\src\town_type.h" />
<ClInclude Include="..\src\town_kdtree.h" />
<ClInclude Include="..\src\townname_func.h" />
<ClInclude Include="..\src\townname_type.h" />
<ClInclude Include="..\src\track_func.h" />
@@ -700,7 +695,6 @@
<ClInclude Include="..\src\vehicle_type.h" />
<ClInclude Include="..\src\vehiclelist.h" />
<ClInclude Include="..\src\viewport_func.h" />
<ClInclude Include="..\src\viewport_kdtree.h" />
<ClInclude Include="..\src\viewport_sprite_sorter.h" />
<ClInclude Include="..\src\viewport_type.h" />
<ClInclude Include="..\src\water.h" />
@@ -729,7 +723,6 @@
<ClCompile Include="..\src\core\geometry_func.cpp" />
<ClInclude Include="..\src\core\geometry_func.hpp" />
<ClInclude Include="..\src\core\geometry_type.hpp" />
<ClInclude Include="..\src\core\kdtree.hpp" />
<ClCompile Include="..\src\core\math_func.cpp" />
<ClInclude Include="..\src\core\math_func.hpp" />
<ClInclude Include="..\src\core\mem_func.hpp" />
@@ -744,6 +737,7 @@
<ClInclude Include="..\src\core\smallmatrix_type.hpp" />
<ClInclude Include="..\src\core\smallstack_type.hpp" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\core\sort_func.hpp" />
<ClInclude Include="..\src\core\string_compare_type.hpp" />
<ClCompile Include="..\src\aircraft_gui.cpp" />
<ClCompile Include="..\src\airport_gui.cpp" />
@@ -953,7 +947,6 @@
<ClInclude Include="..\src\table\railtypes.h" />
<ClInclude Include="..\src\table\road_land.h" />
<ClInclude Include="..\src\table\roadveh_movement.h" />
<ClInclude Include="..\src\table\roadtypes.h" />
<ClInclude Include="..\src\..\objs\settings\table\settings.h" />
<ClInclude Include="..\src\table\sprites.h" />
<ClInclude Include="..\src\table\station_land.h" />
@@ -1092,7 +1085,6 @@
<ClInclude Include="..\src\script\api\script_rail.hpp" />
<ClInclude Include="..\src\script\api\script_railtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_road.hpp" />
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp" />
<ClInclude Include="..\src\script\api\script_sign.hpp" />
<ClInclude Include="..\src\script\api\script_signlist.hpp" />
<ClInclude Include="..\src\script\api\script_station.hpp" />
@@ -1159,7 +1151,6 @@
<ClCompile Include="..\src\script\api\script_rail.cpp" />
<ClCompile Include="..\src\script\api\script_railtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_road.cpp" />
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp" />
<ClCompile Include="..\src\script\api\script_sign.cpp" />
<ClCompile Include="..\src\script\api\script_signlist.cpp" />
<ClCompile Include="..\src\script\api\script_station.cpp" />
@@ -1233,7 +1224,6 @@
<ClCompile Include="..\src\newgrf_industrytiles.cpp" />
<ClCompile Include="..\src\newgrf_object.cpp" />
<ClCompile Include="..\src\newgrf_railtype.cpp" />
<ClCompile Include="..\src\newgrf_roadtype.cpp" />
<ClCompile Include="..\src\newgrf_sound.cpp" />
<ClCompile Include="..\src\newgrf_spritegroup.cpp" />
<ClCompile Include="..\src\newgrf_station.cpp" />
@@ -1296,6 +1286,8 @@
<ClCompile Include="..\src\network\core\udp.cpp" />
<ClInclude Include="..\src\network\core\udp.h" />
<ClInclude Include="..\src\pathfinder\follow_track.hpp" />
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
<ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
<ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
@@ -1339,7 +1331,8 @@
<ResourceCompile Include="..\src\os\windows\ottdres.rc" />
<ClCompile Include="..\src\os\windows\string_uniscribe.cpp" />
<ClCompile Include="..\src\os\windows\win32.cpp" />
<ClInclude Include="..\src\thread.h" />
<ClInclude Include="..\src\thread\thread.h" />
<ClCompile Include="..\src\thread\thread_win32.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -432,9 +432,6 @@
<ClInclude Include="..\src\base_station_base.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bitmap_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\bmp.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -840,9 +837,6 @@
<ClInclude Include="..\src\newgrf_railtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_roadtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\newgrf_sound.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -933,9 +927,6 @@
<ClInclude Include="..\src\rev.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\road_cmd.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1032,9 +1023,6 @@
<ClInclude Include="..\src\station_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\station_type.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1137,9 +1125,6 @@
<ClInclude Include="..\src\town_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\town_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\townname_func.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1188,9 +1173,6 @@
<ClInclude Include="..\src\viewport_func.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_kdtree.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\viewport_sprite_sorter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1275,9 +1257,6 @@
<ClInclude Include="..\src\core\geometry_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\kdtree.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClCompile Include="..\src\core\math_func.cpp">
<Filter>Core Source Code</Filter>
</ClCompile>
@@ -1320,6 +1299,9 @@
<ClInclude Include="..\src\core\smallvec_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\sort_func.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
<ClInclude Include="..\src\core\string_compare_type.hpp">
<Filter>Core Source Code</Filter>
</ClInclude>
@@ -1947,9 +1929,6 @@
<ClInclude Include="..\src\table\roadveh_movement.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\table\roadtypes.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\..\objs\settings\table\settings.h">
<Filter>Tables</Filter>
</ClInclude>
@@ -2364,9 +2343,6 @@
<ClInclude Include="..\src\script\api\script_road.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_roadtypelist.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_sign.hpp">
<Filter>Script API</Filter>
</ClInclude>
@@ -2565,9 +2541,6 @@
<ClCompile Include="..\src\script\api\script_road.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_roadtypelist.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_sign.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
@@ -2787,9 +2760,6 @@
<ClCompile Include="..\src\newgrf_railtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_roadtype.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
<ClCompile Include="..\src\newgrf_sound.cpp">
<Filter>NewGRF</Filter>
</ClCompile>
@@ -2976,6 +2946,12 @@
<ClInclude Include="..\src\pathfinder\follow_track.hpp">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
<Filter>Pathfinder</Filter>
</ClCompile>
<ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
<Filter>Pathfinder</Filter>
</ClInclude>
<ClInclude Include="..\src\pathfinder\pathfinder_func.h">
<Filter>Pathfinder</Filter>
</ClInclude>
@@ -3105,9 +3081,12 @@
<ClCompile Include="..\src\os\windows\win32.cpp">
<Filter>Windows files</Filter>
</ClCompile>
<ClInclude Include="..\src\thread.h">
<ClInclude Include="..\src\thread\thread.h">
<Filter>Threading</Filter>
</ClInclude>
<ClCompile Include="..\src\thread\thread_win32.cpp">
<Filter>Threading</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />

View File

@@ -78,16 +78,16 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
@@ -107,7 +107,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -172,7 +172,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
@@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -293,7 +293,7 @@
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;WITH_PNG;WITH_FREETYPE;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>

View File

@@ -10,6 +10,7 @@
<ProjectName>settingsgen</ProjectName>
<ProjectGuid>{E9548DE9-F089-49B7-93A6-30BE2CC311C7}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@@ -10,6 +10,7 @@
<ProjectName>strgen</ProjectName>
<ProjectGuid>{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}</ProjectGuid>
<RootNamespace>strgen</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -29,9 +30,9 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet>NativeMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>

View File

@@ -110,8 +110,8 @@ townname.cpp
vehicle.cpp
vehiclelist.cpp
viewport.cpp
#if USE_SSE
viewport_sprite_sorter_sse4.cpp
#if SSE
viewport_sprite_sorter_sse4.cpp
#end
waypoint.cpp
widget.cpp
@@ -135,7 +135,6 @@ autoslope.h
base_media_base.h
base_media_func.h
base_station_base.h
bitmap_type.h
bmp.h
bridge.h
cargo_type.h
@@ -271,7 +270,6 @@ newgrf_industrytiles.h
newgrf_object.h
newgrf_properties.h
newgrf_railtype.h
newgrf_roadtype.h
newgrf_sound.h
newgrf_spritegroup.h
newgrf_station.h
@@ -302,7 +300,6 @@ rail.h
rail_gui.h
rail_type.h
rev.h
road.h
road_cmd.h
road_func.h
road_gui.h
@@ -314,7 +311,6 @@ safeguards.h
screenshot.h
sound/sdl_s.h
video/sdl_v.h
video/sdl2_v.h
settings_func.h
settings_gui.h
settings_internal.h
@@ -336,7 +332,6 @@ spritecache.h
station_base.h
station_func.h
station_gui.h
station_kdtree.h
station_type.h
statusbar_gui.h
stdafx.h
@@ -371,7 +366,6 @@ timetable.h
toolbar_gui.h
town.h
town_type.h
town_kdtree.h
townname_func.h
townname_type.h
track_func.h
@@ -388,7 +382,6 @@ vehicle_gui_base.h
vehicle_type.h
vehiclelist.h
viewport_func.h
viewport_kdtree.h
viewport_sprite_sorter.h
viewport_type.h
water.h
@@ -407,19 +400,20 @@ zoom_func.h
zoom_type.h
#if WIN32
#else
music/bemidi.h
music/cocoa_m.h
music/extmidi.h
music/fluidsynth.h
music/os2_m.h
music/qtmidi.h
os/macosx/macos.h
os/macosx/osx_stdafx.h
os/macosx/splash.h
os/macosx/string_osx.h
sound/cocoa_s.h
video/cocoa/cocoa_keys.h
video/cocoa/cocoa_v.h
music/bemidi.h
music/cocoa_m.h
music/extmidi.h
music/libtimidity.h
music/fluidsynth.h
music/os2_m.h
music/qtmidi.h
os/macosx/macos.h
os/macosx/osx_stdafx.h
os/macosx/splash.h
os/macosx/string_osx.h
sound/cocoa_s.h
video/cocoa/cocoa_keys.h
video/cocoa/cocoa_v.h
#end
# Core Source Code
@@ -435,7 +429,6 @@ core/enum_type.hpp
core/geometry_func.cpp
core/geometry_func.hpp
core/geometry_type.hpp
core/kdtree.hpp
core/math_func.cpp
core/math_func.hpp
core/mem_func.hpp
@@ -450,6 +443,7 @@ core/smallmap_type.hpp
core/smallmatrix_type.hpp
core/smallstack_type.hpp
core/smallvec_type.hpp
core/sort_func.hpp
core/string_compare_type.hpp
# GUI Source Code
@@ -669,7 +663,6 @@ table/pricebase.h
table/railtypes.h
table/road_land.h
table/roadveh_movement.h
table/roadtypes.h
../objs/settings/table/settings.h
table/sprites.h
table/station_land.h
@@ -826,7 +819,6 @@ script/api/script_order.hpp
script/api/script_rail.hpp
script/api/script_railtypelist.hpp
script/api/script_road.hpp
script/api/script_roadtypelist.hpp
script/api/script_sign.hpp
script/api/script_signlist.hpp
script/api/script_station.hpp
@@ -895,7 +887,6 @@ script/api/script_order.cpp
script/api/script_rail.cpp
script/api/script_railtypelist.cpp
script/api/script_road.cpp
script/api/script_roadtypelist.cpp
script/api/script_sign.cpp
script/api/script_signlist.cpp
script/api/script_station.cpp
@@ -922,36 +913,36 @@ script/api/script_window.cpp
# Blitters
#if DEDICATED
#else
blitter/32bpp_anim.cpp
blitter/32bpp_anim.hpp
#if USE_SSE
blitter/32bpp_anim_sse2.cpp
blitter/32bpp_anim_sse2.hpp
blitter/32bpp_anim_sse4.cpp
blitter/32bpp_anim_sse4.hpp
#end
blitter/32bpp_base.cpp
blitter/32bpp_base.hpp
blitter/32bpp_optimized.cpp
blitter/32bpp_optimized.hpp
blitter/32bpp_simple.cpp
blitter/32bpp_simple.hpp
#if USE_SSE
blitter/32bpp_sse_func.hpp
blitter/32bpp_sse_type.h
blitter/32bpp_sse2.cpp
blitter/32bpp_sse2.hpp
blitter/32bpp_sse4.cpp
blitter/32bpp_sse4.hpp
blitter/32bpp_ssse3.cpp
blitter/32bpp_ssse3.hpp
#end
blitter/8bpp_base.cpp
blitter/8bpp_base.hpp
blitter/8bpp_optimized.cpp
blitter/8bpp_optimized.hpp
blitter/8bpp_simple.cpp
blitter/8bpp_simple.hpp
blitter/32bpp_anim.cpp
blitter/32bpp_anim.hpp
#if SSE
blitter/32bpp_anim_sse2.cpp
blitter/32bpp_anim_sse2.hpp
blitter/32bpp_anim_sse4.cpp
blitter/32bpp_anim_sse4.hpp
#end
blitter/32bpp_base.cpp
blitter/32bpp_base.hpp
blitter/32bpp_optimized.cpp
blitter/32bpp_optimized.hpp
blitter/32bpp_simple.cpp
blitter/32bpp_simple.hpp
#if SSE
blitter/32bpp_sse_func.hpp
blitter/32bpp_sse_type.h
blitter/32bpp_sse2.cpp
blitter/32bpp_sse2.hpp
blitter/32bpp_sse4.cpp
blitter/32bpp_sse4.hpp
blitter/32bpp_ssse3.cpp
blitter/32bpp_ssse3.hpp
#end
blitter/8bpp_base.cpp
blitter/8bpp_base.hpp
blitter/8bpp_optimized.cpp
blitter/8bpp_optimized.hpp
blitter/8bpp_simple.cpp
blitter/8bpp_simple.hpp
#end
blitter/base.hpp
blitter/common.hpp
@@ -984,7 +975,6 @@ newgrf_industries.cpp
newgrf_industrytiles.cpp
newgrf_object.cpp
newgrf_railtype.cpp
newgrf_roadtype.cpp
newgrf_sound.cpp
newgrf_spritegroup.cpp
newgrf_station.cpp
@@ -1055,6 +1045,8 @@ network/core/udp.h
# Pathfinder
pathfinder/follow_track.hpp
pathfinder/opf/opf_ship.cpp
pathfinder/opf/opf_ship.h
pathfinder/pathfinder_func.h
pathfinder/pathfinder_type.h
pathfinder/pf_performance_timer.hpp
@@ -1092,66 +1084,67 @@ video/dedicated_v.cpp
video/null_v.cpp
#if DEDICATED
#else
#if ALLEGRO
video/allegro_v.cpp
#end
#if SDL
video/sdl_v.cpp
#end
#if SDL2
video/sdl2_v.cpp
#end
#if WIN32
video/win32_v.cpp
#end
#if ALLEGRO
video/allegro_v.cpp
#end
#if SDL
video/sdl_v.cpp
#end
#if WIN32
video/win32_v.cpp
#end
#end
# Music
#if DEDICATED
#else
#if ALLEGRO
music/allegro_m.cpp
#end
#if DIRECTMUSIC
music/dmusic.cpp
#end
#if ALLEGRO
music/allegro_m.cpp
#end
#if DIRECTMUSIC
music/dmusic.cpp
#end
#end
music/null_m.cpp
music/midifile.cpp
#if DEDICATED
#else
#if WIN32
music/win32_m.cpp
#if WIN32
music/win32_m.cpp
#else
#if DOS
#else
music/extmidi.cpp
#end
#if HAIKU
music/bemidi.cpp
#end
#if FLUIDSYNTH
music/fluidsynth.cpp
#if MORPHOS
#else
music/extmidi.cpp
#end
#end
#end
#if BEOS
music/bemidi.cpp
#end
#if LIBTIMIDITY
music/libtimidity.cpp
#end
#if FLUIDSYNTH
music/fluidsynth.cpp
#end
#end
# Sound
sound/null_s.cpp
#if DEDICATED
#else
#if ALLEGRO
sound/allegro_s.cpp
#end
#if SDL
sound/sdl_s.cpp
#end
#if SDL2
sound/sdl2_s.cpp
#end
#if WIN32
sound/win32_s.cpp
#if USE_XAUDIO2
sound/xaudio2_s.cpp
#end
#end
#if ALLEGRO
sound/allegro_s.cpp
#end
#if SDL
sound/sdl_s.cpp
#end
#if WIN32
sound/win32_s.cpp
sound/xaudio2_s.cpp
#end
#end
#if OSX
@@ -1185,4 +1178,21 @@ sound/null_s.cpp
#end
# Threading
thread.h
thread/thread.h
#if HAVE_THREAD
#if WIN32
thread/thread_win32.cpp
#else
#if OS2
thread/thread_os2.cpp
#else
#if MORPHOS
thread/thread_morphos.cpp
#else
thread/thread_pthread.cpp
#end
#end
#end
#else
thread/thread_none.cpp
#end

View File

@@ -142,7 +142,7 @@ public:
break;
}
Lex();
return std::move(ret);
return ret;
}
bool IsEndOfStatement() { return ((_lex._prevtoken == '\n') || (_token == SQUIRREL_EOB) || (_token == '}') || (_token == ';')); }
void OptionalSemicolon()

View File

@@ -20,6 +20,12 @@ struct SQOuterVar
_src=src;
_type=t;
}
SQOuterVar(const SQOuterVar &ov)
{
_type=ov._type;
_src=ov._src;
_name=ov._name;
}
SQOuterType _type;
SQObjectPtr _name;
SQObjectPtr _src;
@@ -28,6 +34,13 @@ struct SQOuterVar
struct SQLocalVarInfo
{
SQLocalVarInfo():_start_op(0),_end_op(0), _pos(0){}
SQLocalVarInfo(const SQLocalVarInfo &lvi)
{
_name=lvi._name;
_start_op=lvi._start_op;
_end_op=lvi._end_op;
_pos=lvi._pos;
}
SQObjectPtr _name;
SQUnsignedInteger _start_op;
SQUnsignedInteger _end_op;

View File

@@ -502,14 +502,14 @@ SQObject SQFuncState::CreateString(const SQChar *s,SQInteger len)
{
SQObjectPtr ns(SQString::Create(_sharedstate,s,len));
_table(_strings)->NewSlot(ns,(SQInteger)1);
return std::move(ns);
return ns;
}
SQObject SQFuncState::CreateTable()
{
SQObjectPtr nt(SQTable::Create(_sharedstate,0));
_table(_strings)->NewSlot(nt,(SQInteger)1);
return std::move(nt);
return nt;
}
SQFunctionProto *SQFuncState::BuildProto()

View File

@@ -9,10 +9,8 @@
#include "../../../core/alloc_func.hpp"
#include "../../../safeguards.h"
#ifdef SQUIRREL_DEFAULT_ALLOCATOR
void *sq_vm_malloc(SQUnsignedInteger size) { return MallocT<char>((size_t)size); }
void *sq_vm_malloc(SQUnsignedInteger size){ return MallocT<char>((size_t)size); }
void *sq_vm_realloc(void *p, SQUnsignedInteger oldsize, SQUnsignedInteger size) { return ReallocT<char>(static_cast<char*>(p), (size_t)size); }
void *sq_vm_realloc(void *p, SQUnsignedInteger oldsize, SQUnsignedInteger size){ return ReallocT<char>(static_cast<char*>(p), (size_t)size); }
void sq_vm_free(void *p, SQUnsignedInteger size) { free(p); }
#endif
void sq_vm_free(void *p, SQUnsignedInteger size){ free(p); }

View File

@@ -12,8 +12,9 @@
void sq_base_register(HSQUIRRELVM v);
struct SQExceptionTrap{
SQExceptionTrap(SQInteger ss, SQInteger stackbase,SQInstruction *ip, SQInteger ex_target)
: _stackbase(stackbase), _stacksize(ss), _ip(ip), _extarget(ex_target) {}
SQExceptionTrap() {}
SQExceptionTrap(SQInteger ss, SQInteger stackbase,SQInstruction *ip, SQInteger ex_target){ _stacksize = ss; _stackbase = stackbase; _ip = ip; _extarget = ex_target;}
SQExceptionTrap(const SQExceptionTrap &et) { (*this) = et; }
SQInteger _stackbase;
SQInteger _stacksize;
SQInstruction *_ip;

View File

@@ -32,7 +32,7 @@ public:
START_NEXT_EASY = DAYS_IN_YEAR * 2,
START_NEXT_MEDIUM = DAYS_IN_YEAR,
START_NEXT_HARD = DAYS_IN_YEAR / 2,
START_NEXT_MIN = 0,
START_NEXT_MIN = 1,
START_NEXT_MAX = 3600,
START_NEXT_DEVIATION = 60,
};
@@ -164,9 +164,11 @@ public:
/** Gets the ScriptScanner instance that is used to find AI Libraries */
static AIScannerLibrary *GetScannerLibrary();
#if defined(ENABLE_NETWORK)
/** Wrapper function for AIScanner::HasAI */
static bool HasAI(const struct ContentInfo *ci, bool md5sum);
static bool HasAILibrary(const ContentInfo *ci, bool md5sum);
#endif
private:
static uint frame_counter; ///< Tick counter for the AI code
static class AIScannerInfo *scanner_info; ///< ScriptScanner instance that is used to find AIs

View File

@@ -31,7 +31,7 @@ ScriptConfigItem _start_date_config = {
AI::START_NEXT_DEVIATION,
30,
SCRIPTCONFIG_NONE,
nullptr,
NULL,
false
};
@@ -52,7 +52,7 @@ AIConfig::AIConfig(const AIConfig *config) : ScriptConfig(config)
} else {
config = &_settings_game.ai_config[company];
}
if (*config == nullptr) *config = new AIConfig();
if (*config == NULL) *config = new AIConfig();
return *config;
}
@@ -69,7 +69,7 @@ ScriptInfo *AIConfig::FindInfo(const char *name, int version, bool force_exact_m
bool AIConfig::ResetInfo(bool force_exact_match)
{
this->info = (ScriptInfo *)AI::FindInfo(this->name, force_exact_match ? this->version : -1, force_exact_match);
return this->info != nullptr;
return this->info != NULL;
}
void AIConfig::PushExtraConfigList()
@@ -90,7 +90,7 @@ void AIConfig::ClearConfigList()
int AIConfig::GetSetting(const char *name) const
{
if (this->info == nullptr) {
if (this->info == NULL) {
SettingValueList::const_iterator it = this->settings.find(name);
if (it == this->settings.end()) {
assert(strcmp("start_date", name) == 0);
@@ -111,7 +111,7 @@ int AIConfig::GetSetting(const char *name) const
void AIConfig::SetSetting(const char *name, int value)
{
if (this->info == nullptr) {
if (this->info == NULL) {
if (strcmp("start_date", name) != 0) return;
value = Clamp(value, AI::START_NEXT_MIN, AI::START_NEXT_MAX);
@@ -127,14 +127,3 @@ void AIConfig::SetSetting(const char *name, int value)
ScriptConfig::SetSetting(name, value);
}
void AIConfig::AddRandomDeviation()
{
int start_date = this->GetSetting("start_date");
ScriptConfig::AddRandomDeviation();
/* start_date = 0 is a special case, where random deviation does not occur.
* If start_date was not already 0, then a minimum value of 1 must apply. */
this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0);
}

View File

@@ -30,9 +30,8 @@ public:
class AIInfo *GetInfo() const;
int GetSetting(const char *name) const override;
void SetSetting(const char *name, int value) override;
void AddRandomDeviation() override;
/* virtual */ int GetSetting(const char *name) const;
/* virtual */ void SetSetting(const char *name, int value);
/**
* When ever the AI Scanner is reloaded, all infos become invalid. This
@@ -45,9 +44,9 @@ public:
bool ResetInfo(bool force_exact_match);
protected:
void PushExtraConfigList() override;
void ClearConfigList() override;
ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match) override;
/* virtual */ void PushExtraConfigList();
/* virtual */ void ClearConfigList();
/* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
};
#endif /* AI_CONFIG_HPP */

View File

@@ -26,8 +26,8 @@
#include "../safeguards.h"
/* static */ uint AI::frame_counter = 0;
/* static */ AIScannerInfo *AI::scanner_info = nullptr;
/* static */ AIScannerLibrary *AI::scanner_library = nullptr;
/* static */ AIScannerInfo *AI::scanner_info = NULL;
/* static */ AIScannerLibrary *AI::scanner_library = NULL;
/* static */ bool AI::CanStartNew()
{
@@ -44,19 +44,19 @@
AIConfig *config = AIConfig::GetConfig(company, AIConfig::SSS_FORCE_GAME);
AIInfo *info = config->GetInfo();
if (info == nullptr || (rerandomise_ai && config->IsRandom())) {
if (info == NULL || (rerandomise_ai && config->IsRandom())) {
info = AI::scanner_info->SelectRandomAI();
assert(info != nullptr);
assert(info != NULL);
/* Load default data and store the name in the settings */
config->Change(info->GetName(), -1, false, true);
}
config->AnchorUnchangeableSettings();
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company *c = Company::Get(company);
c->ai_info = info;
assert(c->ai_instance == nullptr);
assert(c->ai_instance == NULL);
c->ai_instance = new AIInstance();
c->ai_instance->Initialize(info);
@@ -76,7 +76,7 @@
assert(_settings_game.difficulty.competitor_speed <= 4);
if ((AI::frame_counter & ((1 << (4 - _settings_game.difficulty.competitor_speed)) - 1)) != 0) return;
Backup<CompanyID> cur_company(_current_company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
const Company *c;
FOR_ALL_COMPANIES(c) {
if (c->is_ai) {
@@ -107,12 +107,12 @@
if (_networking && !_network_server) return;
PerformanceMeasurer::SetInactive((PerformanceElement)(PFE_AI0 + company));
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company *c = Company::Get(company);
delete c->ai_instance;
c->ai_instance = nullptr;
c->ai_info = nullptr;
c->ai_instance = NULL;
c->ai_info = NULL;
cur_company.Restore();
@@ -127,7 +127,7 @@
* for the server owner to unpause the script again. */
if (_network_dedicated) return;
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company::Get(company)->ai_instance->Pause();
cur_company.Restore();
@@ -135,7 +135,7 @@
/* static */ void AI::Unpause(CompanyID company)
{
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company::Get(company)->ai_instance->Unpause();
cur_company.Restore();
@@ -143,7 +143,7 @@
/* static */ bool AI::IsPaused(CompanyID company)
{
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
bool paused = Company::Get(company)->ai_instance->IsPaused();
cur_company.Restore();
@@ -164,10 +164,10 @@
/* static */ void AI::Initialize()
{
if (AI::scanner_info != nullptr) AI::Uninitialize(true);
if (AI::scanner_info != NULL) AI::Uninitialize(true);
AI::frame_counter = 0;
if (AI::scanner_info == nullptr) {
if (AI::scanner_info == NULL) {
TarScanner::DoScan(TarScanner::AI);
AI::scanner_info = new AIScannerInfo();
AI::scanner_info->Initialize();
@@ -187,17 +187,17 @@
} else {
delete AI::scanner_info;
delete AI::scanner_library;
AI::scanner_info = nullptr;
AI::scanner_library = nullptr;
AI::scanner_info = NULL;
AI::scanner_library = NULL;
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
if (_settings_game.ai_config[c] != nullptr) {
if (_settings_game.ai_config[c] != NULL) {
delete _settings_game.ai_config[c];
_settings_game.ai_config[c] = nullptr;
_settings_game.ai_config[c] = NULL;
}
if (_settings_newgame.ai_config[c] != nullptr) {
if (_settings_newgame.ai_config[c] != NULL) {
delete _settings_newgame.ai_config[c];
_settings_newgame.ai_config[c] = nullptr;
_settings_newgame.ai_config[c] = NULL;
}
}
}
@@ -209,10 +209,10 @@
* the AIConfig. If not, remove the AI from the list (which will assign
* a random new AI on reload). */
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
if (_settings_game.ai_config[c] != nullptr && _settings_game.ai_config[c]->HasScript()) {
if (_settings_game.ai_config[c] != NULL && _settings_game.ai_config[c]->HasScript()) {
if (!_settings_game.ai_config[c]->ResetInfo(true)) {
DEBUG(script, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName());
_settings_game.ai_config[c]->Change(nullptr);
_settings_game.ai_config[c]->Change(NULL);
if (Company::IsValidAiID(c)) {
/* The code belonging to an already running AI was deleted. We can only do
* one thing here to keep everything sane and that is kill the AI. After
@@ -226,10 +226,10 @@
Company::Get(c)->ai_info = _settings_game.ai_config[c]->GetInfo();
}
}
if (_settings_newgame.ai_config[c] != nullptr && _settings_newgame.ai_config[c]->HasScript()) {
if (_settings_newgame.ai_config[c] != NULL && _settings_newgame.ai_config[c]->HasScript()) {
if (!_settings_newgame.ai_config[c]->ResetInfo(false)) {
DEBUG(script, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName());
_settings_newgame.ai_config[c]->Change(nullptr);
_settings_newgame.ai_config[c]->Change(NULL);
}
}
}
@@ -253,7 +253,7 @@
}
/* Queue the event */
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company::Get(_current_company)->ai_instance->InsertEvent(event);
cur_company.Restore();
@@ -283,9 +283,9 @@
{
if (!_networking || _network_server) {
Company *c = Company::GetIfValid(company);
assert(c != nullptr && c->ai_instance != nullptr);
assert(c != NULL && c->ai_instance != NULL);
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
c->ai_instance->Save();
cur_company.Restore();
} else {
@@ -297,9 +297,9 @@
{
if (!_networking || _network_server) {
Company *c = Company::GetIfValid(company);
assert(c != nullptr && c->ai_instance != nullptr);
assert(c != NULL && c->ai_instance != NULL);
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
c->ai_instance->Load(version);
cur_company.Restore();
} else {
@@ -362,6 +362,8 @@
InvalidateWindowClassesData(WC_AI_SETTINGS);
}
#if defined(ENABLE_NETWORK)
/**
* Check whether we have an AI (library) with the exact characteristics as ci.
* @param ci the characteristics to search on (shortname and md5sum)
@@ -378,6 +380,8 @@
return AI::scanner_library->HasScript(ci, md5sum);
}
#endif /* defined(ENABLE_NETWORK) */
/* static */ AIScannerInfo *AI::GetScannerInfo()
{
return AI::scanner_info;

View File

@@ -98,7 +98,7 @@ struct AIListWindow : public Window {
}
}
void SetStringParameters(int widget) const override
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_AIL_CAPTION:
@@ -107,7 +107,7 @@ struct AIListWindow : public Window {
}
}
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AIL_LIST) {
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
@@ -118,7 +118,7 @@ struct AIListWindow : public Window {
}
}
void DrawWidget(const Rect &r, int widget) const override
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
case WID_AIL_LIST: {
@@ -139,13 +139,13 @@ struct AIListWindow : public Window {
break;
}
case WID_AIL_INFO_BG: {
AIInfo *selected_info = nullptr;
AIInfo *selected_info = NULL;
ScriptInfoList::const_iterator it = this->info_list->begin();
for (int i = 1; selected_info == nullptr && it != this->info_list->end(); i++, it++) {
for (int i = 1; selected_info == NULL && it != this->info_list->end(); i++, it++) {
if (this->selected == i - 1) selected_info = static_cast<AIInfo *>((*it).second);
}
/* Some info about the currently selected AI. */
if (selected_info != nullptr) {
if (selected_info != NULL) {
int y = r.top + WD_FRAMERECT_TOP;
SetDParamStr(0, selected_info->GetAuthor());
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, STR_AI_LIST_AUTHOR);
@@ -153,7 +153,7 @@ struct AIListWindow : public Window {
SetDParam(0, selected_info->GetVersion());
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, STR_AI_LIST_VERSION);
y += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
if (selected_info->GetURL() != nullptr) {
if (selected_info->GetURL() != NULL) {
SetDParamStr(0, selected_info->GetURL());
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, STR_AI_LIST_URL);
y += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
@@ -172,7 +172,7 @@ struct AIListWindow : public Window {
void ChangeAI()
{
if (this->selected == -1) {
GetConfig(slot)->Change(nullptr);
GetConfig(slot)->Change(NULL);
} else {
ScriptInfoList::const_iterator it = this->info_list->begin();
for (int i = 0; i < this->selected; i++) it++;
@@ -183,7 +183,7 @@ struct AIListWindow : public Window {
DeleteWindowByClass(WC_QUERY_STRING);
}
void OnClick(Point pt, int widget, int click_count) override
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_AIL_LIST: { // Select one of the AIs
@@ -211,7 +211,7 @@ struct AIListWindow : public Window {
}
}
void OnResize() override
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_AIL_LIST);
}
@@ -221,7 +221,7 @@ struct AIListWindow : public Window {
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
void OnInvalidateData(int data = 0, bool gui_scope = true) override
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) {
delete this;
@@ -317,7 +317,7 @@ struct AISettingsWindow : public Window {
this->RebuildVisibleSettings();
}
void SetStringParameters(int widget) const override
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_AIS_CAPTION:
@@ -346,7 +346,7 @@ struct AISettingsWindow : public Window {
this->vscroll->SetCount((int)this->visible_settings.size());
}
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AIS_BACKGROUND) {
this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
@@ -357,7 +357,7 @@ struct AISettingsWindow : public Window {
}
}
void DrawWidget(const Rect &r, int widget) const override
virtual void DrawWidget(const Rect &r, int widget) const
{
if (widget != WID_AIS_BACKGROUND) return;
@@ -407,7 +407,7 @@ struct AISettingsWindow : public Window {
} else {
DrawArrowButtons(buttons_left, y + button_y_offset, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + (this->clicked_increase != rtl) : 0, editable && current_value > config_item.min_value, editable && current_value < config_item.max_value);
}
if (config_item.labels != nullptr && config_item.labels->Contains(current_value)) {
if (config_item.labels != NULL && config_item.labels->Contains(current_value)) {
SetDParam(idx++, STR_JUST_RAW_STRING);
SetDParamStr(idx++, config_item.labels->Find(current_value)->second);
} else {
@@ -421,7 +421,7 @@ struct AISettingsWindow : public Window {
}
}
void OnPaint() override
virtual void OnPaint()
{
if (this->closing_dropdown) {
this->closing_dropdown = false;
@@ -430,7 +430,7 @@ struct AISettingsWindow : public Window {
this->DrawWidgets();
}
void OnClick(Point pt, int widget, int click_count) override
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_AIS_BACKGROUND: {
@@ -479,12 +479,12 @@ struct AISettingsWindow : public Window {
this->clicked_dropdown = true;
this->closing_dropdown = false;
DropDownList list;
DropDownList *list = new DropDownList();
for (int i = config_item.min_value; i <= config_item.max_value; i++) {
list.emplace_back(new DropDownListCharStringItem(config_item.labels->Find(i)->second, i, false));
*list->Append() = new DropDownListCharStringItem(config_item.labels->Find(i)->second, i, false);
}
ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE, true);
ShowDropDownListAt(this, list, old_val, -1, wi_rect, COLOUR_ORANGE, true);
}
}
} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
@@ -530,7 +530,7 @@ struct AISettingsWindow : public Window {
}
}
void OnQueryTextFinished(char *str) override
virtual void OnQueryTextFinished(char *str)
{
if (StrEmpty(str)) return;
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
@@ -542,7 +542,7 @@ struct AISettingsWindow : public Window {
this->SetDirty();
}
void OnDropdownSelect(int widget, int index) override
virtual void OnDropdownSelect(int widget, int index)
{
assert(this->clicked_dropdown);
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
@@ -553,7 +553,7 @@ struct AISettingsWindow : public Window {
this->SetDirty();
}
void OnDropdownClose(Point pt, int widget, int index, bool instant_close) override
virtual void OnDropdownClose(Point pt, int widget, int index, bool instant_close)
{
/* We cannot raise the dropdown button just yet. OnClick needs some hint, whether
* the same dropdown button was clicked again, and then not open the dropdown again.
@@ -564,12 +564,12 @@ struct AISettingsWindow : public Window {
this->SetDirty();
}
void OnResize() override
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_AIS_BACKGROUND);
}
void OnRealtimeTick(uint delta_ms) override
virtual void OnRealtimeTick(uint delta_ms)
{
if (this->timeout.Elapsed(delta_ms)) {
this->clicked_button = -1;
@@ -582,7 +582,7 @@ struct AISettingsWindow : public Window {
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
void OnInvalidateData(int data = 0, bool gui_scope = true) override
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
this->RebuildVisibleSettings();
HideDropDownMenu(this);
@@ -646,7 +646,7 @@ struct ScriptTextfileWindow : public TextfileWindow {
this->LoadTextfile(textfile, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR);
}
void SetStringParameters(int widget) const override
/* virtual */ void SetStringParameters(int widget) const
{
if (widget == WID_TF_CAPTION) {
SetDParam(0, (slot == OWNER_DEITY) ? STR_CONTENT_TYPE_GAME_SCRIPT : STR_CONTENT_TYPE_AI);
@@ -743,7 +743,7 @@ struct AIConfigWindow : public Window {
DeleteWindowByClass(WC_AI_SETTINGS);
}
void SetStringParameters(int widget) const override
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_AIC_NUMBER:
@@ -767,7 +767,7 @@ struct AIConfigWindow : public Window {
}
}
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_AIC_GAMELIST:
@@ -805,12 +805,12 @@ struct AIConfigWindow : public Window {
*/
static bool IsEditable(CompanyID slot)
{
if (slot == OWNER_DEITY) return _game_mode != GM_NORMAL || Game::GetInstance() != nullptr;
if (slot == OWNER_DEITY) return _game_mode != GM_NORMAL || Game::GetInstance() != NULL;
if (_game_mode != GM_NORMAL) {
return slot > 0 && slot <= GetGameSettings().difficulty.max_no_competitors;
}
if (Company::IsValidID(slot)) return false;
if (Company::IsValidID(slot) || slot < 0) return false;
int max_slot = GetGameSettings().difficulty.max_no_competitors;
for (CompanyID cid = COMPANY_FIRST; cid < (CompanyID)max_slot && cid < MAX_COMPANIES; cid++) {
@@ -819,13 +819,13 @@ struct AIConfigWindow : public Window {
return slot < max_slot;
}
void DrawWidget(const Rect &r, int widget) const override
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
case WID_AIC_GAMELIST: {
StringID text = STR_AI_CONFIG_NONE;
if (GameConfig::GetConfig()->GetInfo() != nullptr) {
if (GameConfig::GetConfig()->GetInfo() != NULL) {
SetDParamStr(0, GameConfig::GetConfig()->GetInfo()->GetName());
text = STR_JUST_RAW_STRING;
}
@@ -843,7 +843,7 @@ struct AIConfigWindow : public Window {
if ((_game_mode != GM_NORMAL && i == 0) || (_game_mode == GM_NORMAL && Company::IsValidHumanID(i))) {
text = STR_AI_CONFIG_HUMAN_PLAYER;
} else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != nullptr) {
} else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) {
SetDParamStr(0, AIConfig::GetConfig((CompanyID)i)->GetInfo()->GetName());
text = STR_JUST_RAW_STRING;
} else {
@@ -858,10 +858,10 @@ struct AIConfigWindow : public Window {
}
}
void OnClick(Point pt, int widget, int click_count) override
virtual void OnClick(Point pt, int widget, int click_count)
{
if (widget >= WID_AIC_TEXTFILE && widget < WID_AIC_TEXTFILE + TFT_END) {
if (this->selected_slot == INVALID_COMPANY || GetConfig(this->selected_slot) == nullptr) return;
if (this->selected_slot == INVALID_COMPANY || GetConfig(this->selected_slot) == NULL) return;
ShowScriptTextfileWindow((TextfileType)(widget - WID_AIC_TEXTFILE), this->selected_slot);
return;
@@ -928,7 +928,9 @@ struct AIConfigWindow : public Window {
if (!_network_available) {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
ShowNetworkContentListWindow(nullptr, CONTENT_TYPE_AI, CONTENT_TYPE_GAME);
#if defined(ENABLE_NETWORK)
ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI, CONTENT_TYPE_GAME);
#endif
}
break;
}
@@ -939,7 +941,7 @@ struct AIConfigWindow : public Window {
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
void OnInvalidateData(int data = 0, bool gui_scope = true) override
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (!IsEditable(this->selected_slot)) {
this->selected_slot = INVALID_COMPANY;
@@ -955,7 +957,7 @@ struct AIConfigWindow : public Window {
this->SetWidgetDisabledState(WID_AIC_MOVE_DOWN, this->selected_slot == OWNER_DEITY || this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot + 1)));
for (TextfileType tft = TFT_BEGIN; tft < TFT_END; tft++) {
this->SetWidgetDisabledState(WID_AIC_TEXTFILE + tft, this->selected_slot == INVALID_COMPANY || (GetConfig(this->selected_slot)->GetTextfile(tft, this->selected_slot) == nullptr));
this->SetWidgetDisabledState(WID_AIC_TEXTFILE + tft, this->selected_slot == INVALID_COMPANY || (GetConfig(this->selected_slot)->GetTextfile(tft, this->selected_slot) == NULL));
}
}
};
@@ -1024,7 +1026,7 @@ struct AIDebugWindow : public Window {
{
if (ai_debug_company == OWNER_DEITY) {
GameInstance *game = Game::GetInstance();
return game == nullptr || game->IsDead();
return game == NULL || game->IsDead();
}
return !Company::IsValidAiID(ai_debug_company) || Company::Get(ai_debug_company)->ai_instance->IsDead();
}
@@ -1038,7 +1040,7 @@ struct AIDebugWindow : public Window {
{
switch (company) {
case INVALID_COMPANY: return false;
case OWNER_DEITY: return Game::GetInstance() != nullptr;
case OWNER_DEITY: return Game::GetInstance() != NULL;
default: return Company::IsValidAiID(company);
}
}
@@ -1063,7 +1065,7 @@ struct AIDebugWindow : public Window {
}
/* If no AI is available, see if there is a game script. */
if (Game::GetInstance() != nullptr) ChangeToAI(OWNER_DEITY);
if (Game::GetInstance() != NULL) ChangeToAI(OWNER_DEITY);
}
/**
@@ -1096,7 +1098,7 @@ struct AIDebugWindow : public Window {
this->InvalidateData(-1);
}
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AID_LOG_PANEL) {
resize->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
@@ -1104,7 +1106,7 @@ struct AIDebugWindow : public Window {
}
}
void OnPaint() override
virtual void OnPaint()
{
this->SelectValidDebugCompany();
@@ -1140,7 +1142,7 @@ struct AIDebugWindow : public Window {
/* Set button colour for Game Script. */
GameInstance *game = Game::GetInstance();
bool valid = game != nullptr;
bool valid = game != NULL;
bool dead = valid && game->IsDead();
bool paused = valid && game->IsPaused();
@@ -1154,7 +1156,7 @@ struct AIDebugWindow : public Window {
ScriptLog::LogData *log = this->GetLogPointer();
int scroll_count = (log == nullptr) ? 0 : log->used;
int scroll_count = (log == NULL) ? 0 : log->used;
if (this->vscroll->GetCount() != scroll_count) {
this->vscroll->SetCount(scroll_count);
@@ -1162,7 +1164,7 @@ struct AIDebugWindow : public Window {
this->SetWidgetDirty(WID_AID_SCROLLBAR);
}
if (log == nullptr) return;
if (log == NULL) return;
/* Detect when the user scrolls the window. Enable autoscroll when the
* bottom-most line becomes visible. */
@@ -1182,13 +1184,13 @@ struct AIDebugWindow : public Window {
this->last_vscroll_pos = this->vscroll->GetPosition();
}
void SetStringParameters(int widget) const override
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_AID_NAME_TEXT:
if (ai_debug_company == OWNER_DEITY) {
const GameInfo *info = Game::GetInfo();
assert(info != nullptr);
assert(info != NULL);
SetDParam(0, STR_AI_DEBUG_NAME_AND_VERSION);
SetDParamStr(1, info->GetName());
SetDParam(2, info->GetVersion());
@@ -1196,7 +1198,7 @@ struct AIDebugWindow : public Window {
SetDParam(0, STR_EMPTY);
} else {
const AIInfo *info = Company::Get(ai_debug_company)->ai_info;
assert(info != nullptr);
assert(info != NULL);
SetDParam(0, STR_AI_DEBUG_NAME_AND_VERSION);
SetDParamStr(1, info->GetName());
SetDParam(2, info->GetVersion());
@@ -1205,19 +1207,19 @@ struct AIDebugWindow : public Window {
}
}
void DrawWidget(const Rect &r, int widget) const override
virtual void DrawWidget(const Rect &r, int widget) const
{
if (ai_debug_company == INVALID_COMPANY) return;
switch (widget) {
case WID_AID_LOG_PANEL: {
ScriptLog::LogData *log = this->GetLogPointer();
if (log == nullptr) return;
if (log == NULL) return;
int y = this->top_offset;
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < log->used; i++) {
int pos = (i + log->pos + 1 - log->used + log->count) % log->count;
if (log->lines[pos] == nullptr) break;
if (log->lines[pos] == NULL) break;
TextColour colour;
switch (log->type[pos]) {
@@ -1264,7 +1266,7 @@ struct AIDebugWindow : public Window {
this->last_vscroll_pos = this->vscroll->GetPosition();
}
void OnClick(Point pt, int widget, int click_count) override
virtual void OnClick(Point pt, int widget, int click_count)
{
/* Also called for hotkeys, so check for disabledness */
if (this->IsWidgetDisabled(widget)) return;
@@ -1334,7 +1336,7 @@ struct AIDebugWindow : public Window {
}
}
void OnEditboxChanged(int wid) override
virtual void OnEditboxChanged(int wid)
{
if (wid == WID_AID_BREAK_STR_EDIT_BOX) {
/* Save the current string to static member so it can be restored next time the window is opened. */
@@ -1349,7 +1351,7 @@ struct AIDebugWindow : public Window {
* This is the company ID of the AI/GS which wrote a new log message, or -1 in other cases.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
void OnInvalidateData(int data = 0, bool gui_scope = true) override
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
/* If the log message is related to the active company tab, check the break string.
* This needs to be done in gameloop-scope, so the AI is suspended immediately. */
@@ -1357,7 +1359,7 @@ struct AIDebugWindow : public Window {
/* Get the log instance of the active company */
ScriptLog::LogData *log = this->GetLogPointer();
if (log != nullptr) {
if (log != NULL) {
this->break_string_filter.ResetState();
this->break_string_filter.AddLine(log->lines[log->pos]);
if (this->break_string_filter.GetState()) {
@@ -1385,8 +1387,8 @@ struct AIDebugWindow : public Window {
this->SelectValidDebugCompany();
ScriptLog::LogData *log = ai_debug_company != INVALID_COMPANY ? this->GetLogPointer() : nullptr;
this->vscroll->SetCount((log == nullptr) ? 0 : log->used);
ScriptLog::LogData *log = ai_debug_company != INVALID_COMPANY ? this->GetLogPointer() : NULL;
this->vscroll->SetCount((log == NULL) ? 0 : log->used);
/* Update company buttons */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
@@ -1394,7 +1396,7 @@ struct AIDebugWindow : public Window {
this->SetWidgetLoweredState(i + WID_AID_COMPANY_BUTTON_START, ai_debug_company == i);
}
this->SetWidgetDisabledState(WID_AID_SCRIPT_GAME, Game::GetGameInstance() == nullptr);
this->SetWidgetDisabledState(WID_AID_SCRIPT_GAME, Game::GetGameInstance() == NULL);
this->SetWidgetLoweredState(WID_AID_SCRIPT_GAME, ai_debug_company == OWNER_DEITY);
this->SetWidgetLoweredState(WID_AID_BREAK_STR_ON_OFF_BTN, this->break_check_enabled);
@@ -1406,7 +1408,7 @@ struct AIDebugWindow : public Window {
(ai_debug_company == OWNER_DEITY ? !Game::IsPaused() : !AI::IsPaused(ai_debug_company)));
}
void OnResize() override
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_AID_LOG_PANEL);
}
@@ -1437,7 +1439,7 @@ static EventState AIDebugGlobalHotkeys(int hotkey)
{
if (_game_mode != GM_NORMAL) return ES_NOT_HANDLED;
Window *w = ShowAIDebugWindow(INVALID_COMPANY);
if (w == nullptr) return ES_NOT_HANDLED;
if (w == NULL) return ES_NOT_HANDLED;
return w->OnHotkey(hotkey);
}
@@ -1530,14 +1532,14 @@ Window *ShowAIDebugWindow(CompanyID show_company)
{
if (!_networking || _network_server) {
AIDebugWindow *w = (AIDebugWindow *)BringWindowToFrontById(WC_AI_DEBUG, 0);
if (w == nullptr) w = new AIDebugWindow(&_ai_debug_desc, 0);
if (w == NULL) w = new AIDebugWindow(&_ai_debug_desc, 0);
if (show_company != INVALID_COMPANY) w->ChangeToAI(show_company);
return w;
} else {
ShowErrorMessage(STR_ERROR_AI_DEBUG_SERVER_ONLY, INVALID_STRING_ID, WL_INFO);
}
return nullptr;
return NULL;
}
/**
@@ -1563,7 +1565,7 @@ void ShowAIDebugWindowIfAIError()
}
GameInstance *g = Game::GetGameInstance();
if (g != nullptr && g->IsDead()) {
if (g != NULL && g->IsDead()) {
ShowAIDebugWindow(OWNER_DEITY);
}
}

View File

@@ -29,7 +29,7 @@ static bool CheckAPIVersion(const char *api_version)
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 ||
strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0 ||
strcmp(api_version, "1.8") == 0 || strcmp(api_version, "1.9") == 0 || strcmp(api_version, "1.10") == 0;
strcmp(api_version, "1.8") == 0 || strcmp(api_version, "1.9") == 0;
}
#if defined(_WIN32)
@@ -65,8 +65,8 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; }
/* static */ SQInteger AIInfo::Constructor(HSQUIRRELVM vm)
{
/* Get the AIInfo */
SQUserPointer instance = nullptr;
if (SQ_FAILED(sq_getinstanceup(vm, 2, &instance, 0)) || instance == nullptr) return sq_throwerror(vm, "Pass an instance of a child class of AIInfo to RegisterAI");
SQUserPointer instance = NULL;
if (SQ_FAILED(sq_getinstanceup(vm, 2, &instance, 0)) || instance == NULL) return sq_throwerror(vm, "Pass an instance of a child class of AIInfo to RegisterAI");
AIInfo *info = (AIInfo *)instance;
SQInteger res = ScriptInfo::Constructor(vm, info);
@@ -100,7 +100,7 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; }
}
/* Remove the link to the real instance, else it might get deleted by RegisterAI() */
sq_setinstanceup(vm, 2, nullptr);
sq_setinstanceup(vm, 2, NULL);
/* Register the AI to the base system */
info->GetScanner()->RegisterScript(info);
return 0;
@@ -112,7 +112,7 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; }
SQUserPointer instance;
sq_getinstanceup(vm, 2, &instance, 0);
AIInfo *info = (AIInfo *)instance;
info->api_version = nullptr;
info->api_version = NULL;
SQInteger res = ScriptInfo::Constructor(vm, info);
if (res != 0) return res;
@@ -122,7 +122,7 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; }
info->api_version = stredup(buf);
/* Remove the link to the real instance, else it might get deleted by RegisterAI() */
sq_setinstanceup(vm, 2, nullptr);
sq_setinstanceup(vm, 2, NULL);
/* Register the AI to the base system */
static_cast<AIScannerInfo *>(info->GetScanner())->SetDummyAI(info);
return 0;
@@ -131,7 +131,7 @@ template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; }
AIInfo::AIInfo() :
min_loadable_version(0),
use_as_random(false),
api_version(nullptr)
api_version(NULL)
{
}

View File

@@ -59,7 +59,7 @@ private:
/** All static information from an AI library like name, version, etc. */
class AILibrary : public ScriptInfo {
public:
AILibrary() : ScriptInfo(), category(nullptr) {};
AILibrary() : ScriptInfo(), category(NULL) {};
~AILibrary();
/**

View File

@@ -62,7 +62,6 @@
#include "../script/api/ai/ai_rail.hpp.sq"
#include "../script/api/ai/ai_railtypelist.hpp.sq"
#include "../script/api/ai/ai_road.hpp.sq"
#include "../script/api/ai/ai_roadtypelist.hpp.sq"
#include "../script/api/ai/ai_sign.hpp.sq"
#include "../script/api/ai/ai_signlist.hpp.sq"
#include "../script/api/ai/ai_station.hpp.sq"
@@ -146,7 +145,6 @@ void AIInstance::RegisterAPI()
SQAIEventSubsidyOffer_Register(this->engine);
SQAIEventSubsidyOfferExpired_Register(this->engine);
SQAIEventTownFounded_Register(this->engine);
SQAIEventVehicleAutoReplaced_Register(this->engine);
SQAIEventVehicleCrashed_Register(this->engine);
SQAIEventVehicleLost_Register(this->engine);
SQAIEventVehicleUnprofitable_Register(this->engine);
@@ -169,7 +167,6 @@ void AIInstance::RegisterAPI()
SQAIRail_Register(this->engine);
SQAIRailTypeList_Register(this->engine);
SQAIRoad_Register(this->engine);
SQAIRoadTypeList_Register(this->engine);
SQAISign_Register(this->engine);
SQAISignList_Register(this->engine);
SQAIStation_Register(this->engine);
@@ -219,10 +216,10 @@ void AIInstance::Died()
ShowAIDebugWindow(_current_company);
const AIInfo *info = AIConfig::GetConfig(_current_company, AIConfig::SSS_FORCE_GAME)->GetInfo();
if (info != nullptr) {
if (info != NULL) {
ShowErrorMessage(STR_ERROR_AI_PLEASE_REPORT_CRASH, INVALID_STRING_ID, WL_WARNING);
if (info->GetURL() != nullptr) {
if (info->GetURL() != NULL) {
ScriptLog::Info("Please report the error to the following URL:");
ScriptLog::Info(info->GetURL());
}
@@ -231,7 +228,6 @@ void AIInstance::Died()
void AIInstance::LoadDummyScript()
{
ScriptAllocatorScope alloc_scope(this->engine);
extern void Script_CreateDummy(HSQUIRRELVM vm, StringID string, const char *type);
Script_CreateDummy(this->engine->GetVM(), STR_ERROR_AI_NO_AI_FOUND, "AI");
}
@@ -263,7 +259,7 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint3
* when the company does not exist anymore.
*/
const Company *c = Company::GetIfValid(_current_company);
if (c == nullptr || c->ai_instance == nullptr) return;
if (c == NULL || c->ai_instance == NULL) return;
if (c->ai_instance->DoCommandCallback(result, tile, p1, p2, cmd)) {
c->ai_instance->Continue();

View File

@@ -25,14 +25,14 @@ public:
*/
void Initialize(class AIInfo *info);
int GetSetting(const char *name) override;
ScriptInfo *FindLibrary(const char *library, int version) override;
/* virtual */ int GetSetting(const char *name);
/* virtual */ ScriptInfo *FindLibrary(const char *library, int version);
private:
void RegisterAPI() override;
void Died() override;
CommandCallback *GetDoCommandCallback() override;
void LoadDummyScript() override;
/* virtual */ void RegisterAPI();
/* virtual */ void Died();
/* virtual */ CommandCallback *GetDoCommandCallback();
/* virtual */ void LoadDummyScript();
};
#endif /* AI_INSTANCE_HPP */

View File

@@ -23,7 +23,7 @@
AIScannerInfo::AIScannerInfo() :
ScriptScanner(),
info_dummy(nullptr)
info_dummy(NULL)
{
}
@@ -31,8 +31,6 @@ void AIScannerInfo::Initialize()
{
ScriptScanner::Initialize("AIScanner");
ScriptAllocatorScope alloc_scope(this->engine);
/* Create the dummy AI */
free(this->main_script);
this->main_script = stredup("%_dummy");
@@ -96,14 +94,14 @@ AIInfo *AIScannerInfo::SelectRandomAI() const
AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool force_exact_match)
{
if (this->info_list.size() == 0) return nullptr;
if (nameParam == nullptr) return nullptr;
if (this->info_list.size() == 0) return NULL;
if (nameParam == NULL) return NULL;
char ai_name[1024];
strecpy(ai_name, nameParam, lastof(ai_name));
strtolower(ai_name);
AIInfo *info = nullptr;
AIInfo *info = NULL;
int version = -1;
if (versionParam == -1) {
@@ -112,7 +110,7 @@ AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool fo
/* If we didn't find a match AI, maybe the user included a version */
char *e = strrchr(ai_name, '.');
if (e == nullptr) return nullptr;
if (e == NULL) return NULL;
*e = '\0';
e++;
versionParam = atoi(e);
@@ -167,7 +165,7 @@ AILibrary *AIScannerLibrary::FindLibrary(const char *library, int version)
/* Check if the library + version exists */
ScriptInfoList::iterator iter = this->info_list.find(library_name);
if (iter == this->info_list.end()) return nullptr;
if (iter == this->info_list.end()) return NULL;
return static_cast<AILibrary *>((*iter).second);
}

View File

@@ -19,7 +19,7 @@ public:
AIScannerInfo();
~AIScannerInfo();
void Initialize() override;
/* virtual */ void Initialize();
/**
* Select a random AI.
@@ -32,7 +32,7 @@ public:
* @param nameParam The name of the AI.
* @param versionParam The version of the AI, or -1 if you want the latest.
* @param force_exact_match Only match name+version, never latest.
* @return nullptr if no match found, otherwise the AI that matched.
* @return NULL if no match found, otherwise the AI that matched.
*/
class AIInfo *FindInfo(const char *nameParam, int versionParam, bool force_exact_match);
@@ -42,11 +42,11 @@ public:
void SetDummyAI(class AIInfo *info);
protected:
void GetScriptName(ScriptInfo *info, char *name, const char *last) override;
const char *GetFileName() const override { return PATHSEP "info.nut"; }
Subdirectory GetDirectory() const override { return AI_DIR; }
const char *GetScannerName() const override { return "AIs"; }
void RegisterAPI(class Squirrel *engine) override;
/* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
/* virtual */ const char *GetFileName() const { return PATHSEP "info.nut"; }
/* virtual */ Subdirectory GetDirectory() const { return AI_DIR; }
/* virtual */ const char *GetScannerName() const { return "AIs"; }
/* virtual */ void RegisterAPI(class Squirrel *engine);
private:
AIInfo *info_dummy; ///< The dummy AI.
@@ -54,22 +54,22 @@ private:
class AIScannerLibrary : public ScriptScanner {
public:
void Initialize() override;
/* virtual */ void Initialize();
/**
* Find a library in the pool.
* @param library The library name to find.
* @param version The version the library should have.
* @return The library if found, nullptr otherwise.
* @return The library if found, NULL otherwise.
*/
class AILibrary *FindLibrary(const char *library, int version);
protected:
void GetScriptName(ScriptInfo *info, char *name, const char *last) override;
const char *GetFileName() const override { return PATHSEP "library.nut"; }
Subdirectory GetDirectory() const override { return AI_LIBRARY_DIR; }
const char *GetScannerName() const override { return "AI Libraries"; }
void RegisterAPI(class Squirrel *engine) override;
/* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
/* virtual */ const char *GetFileName() const { return PATHSEP "library.nut"; }
/* virtual */ Subdirectory GetDirectory() const { return AI_LIBRARY_DIR; }
/* virtual */ const char *GetScannerName() const { return "AI Libraries"; }
/* virtual */ void RegisterAPI(class Squirrel *engine);
};
#endif /* AI_SCANNER_HPP */

View File

@@ -79,7 +79,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
byte previous_pos; ///< Previous desired position of the aircraft.
StationID targetairport; ///< Airport to go to next.
byte state; ///< State of the airport. @see AirportMovementStates
Direction last_direction;
DirectionByte last_direction;
byte number_consecutive_turns; ///< Protection to prevent the aircraft of making a lot of turns in order to reach a specific point.
byte turn_counter; ///< Ticks between each turn to prevent > 45 degree turns.
byte flags; ///< Aircraft flags. @see AirVehicleFlags

View File

@@ -143,7 +143,7 @@ static StationID FindNearestHangar(const Aircraft *v)
if (v->acache.cached_max_range_sqr != 0) {
/* Check if our current destination can be reached from the depot airport. */
const Station *cur_dest = GetTargetAirportIfValid(v);
if (cur_dest != nullptr && DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
if (cur_dest != NULL && DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
}
if (distance < best || index == INVALID_STATION) {
best = distance;
@@ -295,7 +295,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->cargo_type = e->GetDefaultCargoType();
u->cargo_type = CT_MAIL;
v->name = nullptr;
v->name = NULL;
v->last_station_visited = INVALID_STATION;
v->last_loading_station = INVALID_STATION;
@@ -379,7 +379,7 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination,
{
const Station *st = GetTargetAirportIfValid(this);
/* If the station is not a valid airport or if it has no hangars */
if (st == nullptr || !CanVehicleUseStation(this, st) || !st->airport.HasHangar()) {
if (st == NULL || !CanVehicleUseStation(this, st) || !st->airport.HasHangar()) {
/* the aircraft has to search for a hangar on its own */
StationID station = FindNearestHangar(this);
@@ -388,8 +388,8 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination,
st = Station::Get(station);
}
if (location != nullptr) *location = st->xy;
if (destination != nullptr) *destination = st->index;
if (location != NULL) *location = st->xy;
if (destination != NULL) *destination = st->index;
return true;
}
@@ -408,7 +408,7 @@ static void CheckIfAircraftNeedsService(Aircraft *v)
const Station *st = Station::Get(v->current_order.GetDestination());
assert(st != nullptr);
assert(st != NULL);
/* only goto depot if the target airport has a depot */
if (st->airport.HasHangar() && CanVehicleUseStation(v, st)) {
@@ -531,7 +531,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
u->UpdatePositionAndViewport();
u = u->Next();
if (u != nullptr) {
if (u != NULL) {
u->x_pos = x;
u->y_pos = y;
u->z_pos = z + ROTOR_Z_OFFSET;
@@ -552,7 +552,7 @@ void HandleAircraftEnterHangar(Aircraft *v)
Aircraft *u = v->Next();
u->vehstatus |= VS_HIDDEN;
u = u->Next();
if (u != nullptr) {
if (u != NULL) {
u->vehstatus |= VS_HIDDEN;
u->cur_speed = 0;
}
@@ -725,8 +725,8 @@ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_lev
/* Make faster planes fly higher so that they can overtake slower ones */
base_altitude += min(20 * (v->vcache.cached_max_speed / 200) - 90, 0);
if (min_level != nullptr) *min_level = base_altitude + AIRCRAFT_MIN_FLYING_ALTITUDE;
if (max_level != nullptr) *max_level = base_altitude + AIRCRAFT_MAX_FLYING_ALTITUDE;
if (min_level != NULL) *min_level = base_altitude + AIRCRAFT_MIN_FLYING_ALTITUDE;
if (max_level != NULL) *max_level = base_altitude + AIRCRAFT_MAX_FLYING_ALTITUDE;
}
/**
@@ -801,8 +801,8 @@ template int GetAircraftFlightLevel(Aircraft *v, bool takeoff);
*/
static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc, Direction rotation)
{
assert(v != nullptr);
assert(apc != nullptr);
assert(v != NULL);
assert(apc != NULL);
/* In the case the station doesn't exit anymore, set target tile 0.
* It doesn't hurt much, aircraft will go to next order, nearest hangar
@@ -810,7 +810,7 @@ static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc,
TileIndex tile = 0;
const Station *st = Station::GetIfValid(v->targetairport);
if (st != nullptr) {
if (st != NULL) {
/* Make sure we don't go to INVALID_TILE if the airport has been removed. */
tile = (st->airport.tile != INVALID_TILE) ? st->airport.tile : st->xy;
}
@@ -844,13 +844,13 @@ static bool AircraftController(Aircraft *v)
{
int count;
/* nullptr if station is invalid */
/* NULL if station is invalid */
const Station *st = Station::GetIfValid(v->targetairport);
/* INVALID_TILE if there is no station */
TileIndex tile = INVALID_TILE;
Direction rotation = DIR_N;
uint size_x = 1, size_y = 1;
if (st != nullptr) {
if (st != NULL) {
if (st->airport.tile != INVALID_TILE) {
tile = st->airport.tile;
rotation = st->airport.rotation;
@@ -864,7 +864,7 @@ static bool AircraftController(Aircraft *v)
const AirportFTAClass *afc = tile == INVALID_TILE ? GetAirport(AT_DUMMY) : st->airport.GetFTA();
/* prevent going to INVALID_TILE if airport is deleted. */
if (st == nullptr || st->airport.tile == INVALID_TILE) {
if (st == NULL || st->airport.tile == INVALID_TILE) {
/* Jump into our "holding pattern" state machine if possible */
if (v->pos >= afc->nofelements) {
v->pos = v->previous_pos = AircraftGetEntryPoint(v, afc, DIR_N);
@@ -904,7 +904,7 @@ static bool AircraftController(Aircraft *v)
v->tile = 0;
int z_dest;
GetAircraftFlightLevelBounds(v, &z_dest, nullptr);
GetAircraftFlightLevelBounds(v, &z_dest, NULL);
/* Reached altitude? */
if (v->z_pos >= z_dest) {
@@ -921,7 +921,7 @@ static bool AircraftController(Aircraft *v)
if (amd.flag & AMED_HELI_LOWER) {
SetBit(v->flags, VAF_HELI_DIRECT_DESCENT);
if (st == nullptr) {
if (st == NULL) {
/* FIXME - AircraftController -> if station no longer exists, do not land
* helicopter will circle until sign disappears, then go to next order
* what to do when it is the only order left, right now it just stays in 1 place */
@@ -1127,7 +1127,7 @@ static bool HandleCrashedAircraft(Aircraft *v)
Station *st = GetTargetAirportIfValid(v);
/* make aircraft crash down to the ground */
if (v->crashed_counter < 500 && st == nullptr && ((v->crashed_counter % 3) == 0) ) {
if (v->crashed_counter < 500 && st == NULL && ((v->crashed_counter % 3) == 0) ) {
int z = GetSlopePixelZ(Clamp(v->x_pos, 0, MapMaxX() * TILE_SIZE), Clamp(v->y_pos, 0, MapMaxY() * TILE_SIZE));
v->z_pos -= 1;
if (v->z_pos == z) {
@@ -1158,7 +1158,7 @@ static bool HandleCrashedAircraft(Aircraft *v)
/* clear runway-in on all airports, set by crashing plane
* small airports use AIRPORT_BUSY, city airports use RUNWAY_IN_OUT_block, etc.
* but they all share the same number */
if (st != nullptr) {
if (st != NULL) {
CLRBITS(st->airport.flags, RUNWAY_IN_block);
CLRBITS(st->airport.flags, RUNWAY_IN_OUT_block); // commuter airport
CLRBITS(st->airport.flags, RUNWAY_IN2_block); // intercontinental
@@ -1232,8 +1232,8 @@ void HandleMissingAircraftOrders(Aircraft *v)
* actually stops.
*/
const Station *st = GetTargetAirportIfValid(v);
if (st == nullptr) {
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
if (st == NULL) {
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
CommandCost ret = DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT);
cur_company.Restore();
@@ -1288,17 +1288,17 @@ static void CrashAirplane(Aircraft *v)
v->Next()->cargo.Truncate();
const Station *st = GetTargetAirportIfValid(v);
StringID newsitem;
if (st == nullptr) {
if (st == NULL) {
newsitem = STR_NEWS_PLANE_CRASH_OUT_OF_FUEL;
} else {
SetDParam(1, st->index);
newsitem = STR_NEWS_AIRCRAFT_CRASH;
}
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
AddVehicleNewsItem(newsitem, NT_ACCIDENT, v->index, st != nullptr ? st->index : INVALID_STATION);
AddVehicleNewsItem(newsitem, NT_ACCIDENT, v->index, st != NULL ? st->index : INVALID_STATION);
ModifyStationRatingAround(v->tile, v->owner, -160, 30);
if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v);
@@ -1310,17 +1310,18 @@ static void CrashAirplane(Aircraft *v)
*/
static void MaybeCrashAirplane(Aircraft *v)
{
if (_settings_game.vehicle.plane_crashes == 0) return;
Station *st = Station::Get(v->targetairport);
uint32 prob;
/* FIXME -- MaybeCrashAirplane -> increase crashing chances of very modern airplanes on smaller than AT_METROPOLITAN airports */
uint32 prob = (0x4000 << _settings_game.vehicle.plane_crashes);
if ((st->airport.GetFTA()->flags & AirportFTAClass::SHORT_STRIP) &&
(AircraftVehInfo(v->engine_type)->subtype & AIR_FAST) &&
!_cheats.no_jetcrash.value) {
prob = 3276;
prob /= 20;
} else {
if (_settings_game.vehicle.plane_crashes == 0) return;
prob = (0x4000 << _settings_game.vehicle.plane_crashes) / 1500;
prob /= 1500;
}
if (GB(Random(), 0, 22) > prob) return;
@@ -1392,8 +1393,8 @@ void AircraftNextAirportPos_and_Order(Aircraft *v)
}
const Station *st = GetTargetAirportIfValid(v);
const AirportFTAClass *apc = st == nullptr ? GetAirport(AT_DUMMY) : st->airport.GetFTA();
Direction rotation = st == nullptr ? DIR_N : st->airport.rotation;
const AirportFTAClass *apc = st == NULL ? GetAirport(AT_DUMMY) : st->airport.GetFTA();
Direction rotation = st == NULL ? DIR_N : st->airport.rotation;
v->pos = v->previous_pos = AircraftGetEntryPoint(v, apc, rotation);
}
@@ -1418,7 +1419,7 @@ void AircraftLeaveHangar(Aircraft *v, Direction exit_dir)
/* Rotor blades */
u = u->Next();
if (u != nullptr) {
if (u != NULL) {
u->vehstatus &= ~VS_HIDDEN;
u->cur_speed = 80;
}
@@ -1588,7 +1589,7 @@ static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass
/* Send the helicopter to a hangar if needed for replacement */
if (v->NeedsAutomaticServicing()) {
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
DoCommand(v->tile, v->index | DEPOT_SERVICE | DEPOT_LOCATE_HANGAR, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT);
cur_company.Restore();
}
@@ -1605,7 +1606,7 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc)
* it is possible to choose from multiple landing runways, so loop until a free one is found */
byte landingtype = (v->subtype == AIR_HELICOPTER) ? HELILANDING : LANDING;
const AirportFTA *current = apc->layout[v->pos].next;
while (current != nullptr) {
while (current != NULL) {
if (current->heading == landingtype) {
/* save speed before, since if AirportHasBlock is false, it resets them to 0
* we don't want that for plane in air
@@ -1639,7 +1640,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc
/* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
if (v->NeedsAutomaticServicing()) {
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
DoCommand(v->tile, v->index | DEPOT_SERVICE, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT);
cur_company.Restore();
}
@@ -1761,7 +1762,7 @@ static bool AirportMove(Aircraft *v, const AirportFTAClass *apc)
v->previous_pos = v->pos; // save previous location
/* there is only one choice to move to */
if (current->next == nullptr) {
if (current->next == NULL) {
if (AirportSetBlocks(v, current, apc)) {
v->pos = current->next_position;
UpdateAircraftCache(v);
@@ -1780,7 +1781,7 @@ static bool AirportMove(Aircraft *v, const AirportFTAClass *apc)
return false;
}
current = current->next;
} while (current != nullptr);
} while (current != NULL);
DEBUG(misc, 0, "[Ap] cannot move further on Airport! (pos %d state %d) for vehicle %d", v->pos, v->state, v->index);
NOT_REACHED();
@@ -1815,7 +1816,7 @@ static bool AirportHasBlock(Aircraft *v, const AirportFTA *current_pos, const Ai
* "reserve" a block for the plane
* @param v airplane that requires the operation
* @param current_pos of the vehicle in the list of blocks
* @param apc airport on which block is requested to be set
* @param apc airport on which block is requsted to be set
* @returns true on success. Eg, next block was free and we have occupied it
*/
static bool AirportSetBlocks(Aircraft *v, const AirportFTA *current_pos, const AirportFTAClass *apc)
@@ -1830,7 +1831,7 @@ static bool AirportSetBlocks(Aircraft *v, const AirportFTA *current_pos, const A
* this means more blocks should be checked/set */
const AirportFTA *current = current_pos;
if (current == reference) current = current->next;
while (current != nullptr) {
while (current != NULL) {
if (current->heading == current_pos->heading && current->block != 0) {
airport_flags |= current->block;
break;
@@ -1925,8 +1926,8 @@ static uint GetNumTerminals(const AirportFTAClass *apc)
static bool AirportFindFreeTerminal(Aircraft *v, const AirportFTAClass *apc)
{
/* example of more terminalgroups
* {0,HANGAR,NOTHING_block,1}, {0,TERMGROUP,TERM_GROUP1_block,0}, {0,TERMGROUP,TERM_GROUP2_ENTER_block,1}, {0,0,N,1},
* Heading TERMGROUP denotes a group. We see 2 groups here:
* {0,HANGAR,NOTHING_block,1}, {0,255,TERM_GROUP1_block,0}, {0,255,TERM_GROUP2_ENTER_block,1}, {0,0,N,1},
* Heading 255 denotes a group. We see 2 groups here:
* 1. group 0 -- TERM_GROUP1_block (check block)
* 2. group 1 -- TERM_GROUP2_ENTER_block (check block)
* First in line is checked first, group 0. If the block (TERM_GROUP1_block) is free, it
@@ -1938,8 +1939,8 @@ static bool AirportFindFreeTerminal(Aircraft *v, const AirportFTAClass *apc)
const Station *st = Station::Get(v->targetairport);
const AirportFTA *temp = apc->layout[v->pos].next;
while (temp != nullptr) {
if (temp->heading == TERMGROUP) {
while (temp != NULL) {
if (temp->heading == 255) {
if (!(st->airport.flags & temp->block)) {
/* read which group do we want to go to?
* (the first free group) */
@@ -2037,9 +2038,9 @@ static bool AircraftEventHandler(Aircraft *v, int loop)
/* Check the distance to the next destination. This code works because the target
* airport is only updated after take off and not on the ground. */
Station *cur_st = Station::GetIfValid(v->targetairport);
Station *next_st = v->current_order.IsType(OT_GOTO_STATION) || v->current_order.IsType(OT_GOTO_DEPOT) ? Station::GetIfValid(v->current_order.GetDestination()) : nullptr;
Station *next_st = v->current_order.IsType(OT_GOTO_STATION) || v->current_order.IsType(OT_GOTO_DEPOT) ? Station::GetIfValid(v->current_order.GetDestination()) : NULL;
if (cur_st != nullptr && cur_st->airport.tile != INVALID_TILE && next_st != nullptr && next_st->airport.tile != INVALID_TILE) {
if (cur_st != NULL && cur_st->airport.tile != INVALID_TILE && next_st != NULL && next_st->airport.tile != INVALID_TILE) {
uint dist = DistanceSquare(cur_st->airport.tile, next_st->airport.tile);
AircraftHandleDestTooFar(v, dist > v->acache.cached_max_range_sqr);
}
@@ -2077,16 +2078,16 @@ bool Aircraft::Tick()
* Returns aircraft's target station if v->target_airport
* is a valid station with airport.
* @param v vehicle to get target airport for
* @return pointer to target station, nullptr if invalid
* @return pointer to target station, NULL if invalid
*/
Station *GetTargetAirportIfValid(const Aircraft *v)
{
assert(v->type == VEH_AIRCRAFT);
Station *st = Station::GetIfValid(v->targetairport);
if (st == nullptr) return nullptr;
if (st == NULL) return NULL;
return st->airport.tile == INVALID_TILE ? nullptr : st;
return st->airport.tile == INVALID_TILE ? NULL : st;
}
/**

View File

@@ -36,7 +36,7 @@ void DrawAircraftDetails(const Aircraft *v, int left, int right, int y)
int y_offset = (v->Next()->cargo_cap != 0) ? -(FONT_HEIGHT_NORMAL + 1): 0;
Money feeder_share = 0;
for (const Aircraft *u = v; u != nullptr; u = u->Next()) {
for (const Aircraft *u = v; u != NULL; u = u->Next()) {
if (u->IsNormalAircraft()) {
SetDParam(0, u->engine_type);
SetDParam(1, u->build_year);

View File

@@ -46,7 +46,7 @@
* @param delta_z Height of the airport above the land.
*/
#define HELIPORT(name, num_helipads, delta_z) \
AIRPORT_GENERIC(name, nullptr, num_helipads, AirportFTAClass::HELICOPTERS, delta_z)
AIRPORT_GENERIC(name, NULL, num_helipads, AirportFTAClass::HELICOPTERS, delta_z)
AIRPORT(country, 0, true)
AIRPORT(city, 0, false)
@@ -58,7 +58,7 @@ HELIPORT(helidepot, 1, 0)
AIRPORT(intercontinental, 2, false)
HELIPORT(helistation, 3, 0)
HELIPORT(oilrig, 1, 54)
AIRPORT_GENERIC(dummy, nullptr, 0, AirportFTAClass::ALL, 0)
AIRPORT_GENERIC(dummy, NULL, 0, AirportFTAClass::ALL, 0)
#undef HELIPORT
#undef AIRPORT
@@ -135,7 +135,7 @@ AirportFTAClass::~AirportFTAClass()
{
for (uint i = 0; i < nofelements; i++) {
AirportFTA *current = layout[i].next;
while (current != nullptr) {
while (current != NULL) {
AirportFTA *next = current->next;
free(current);
current = next;
@@ -195,7 +195,7 @@ static AirportFTA *AirportBuildAutomata(uint nofelements, const AirportFTAbuildu
current = current->next;
internalcounter++;
}
current->next = nullptr;
current->next = NULL;
internalcounter++;
}
return FAutomata;

View File

@@ -60,30 +60,29 @@ enum AirportMovingDataFlags {
/** Movement States on Airports (headings target) */
enum AirportMovementStates {
TO_ALL = 0, ///< Go in this direction for every target.
HANGAR = 1, ///< Heading for hangar.
TERM1 = 2, ///< Heading for terminal 1.
TERM2 = 3, ///< Heading for terminal 2.
TERM3 = 4, ///< Heading for terminal 3.
TERM4 = 5, ///< Heading for terminal 4.
TERM5 = 6, ///< Heading for terminal 5.
TERM6 = 7, ///< Heading for terminal 6.
HELIPAD1 = 8, ///< Heading for helipad 1.
HELIPAD2 = 9, ///< Heading for helipad 2.
TAKEOFF = 10, ///< Airplane wants to leave the airport.
STARTTAKEOFF = 11, ///< Airplane has arrived at a runway for take-off.
ENDTAKEOFF = 12, ///< Airplane has reached end-point of the take-off runway.
HELITAKEOFF = 13, ///< Helicopter wants to leave the airport.
FLYING = 14, ///< %Vehicle is flying in the air.
LANDING = 15, ///< Airplane wants to land.
ENDLANDING = 16, ///< Airplane wants to finish landing.
HELILANDING = 17, ///< Helicopter wants to land.
HELIENDLANDING = 18, ///< Helicopter wants to finish landing.
TERM7 = 19, ///< Heading for terminal 7.
TERM8 = 20, ///< Heading for terminal 8.
HELIPAD3 = 21, ///< Heading for helipad 3.
MAX_HEADINGS = 21, ///< Last valid target to head for.
TERMGROUP = 255, ///< Aircraft is looking for a free terminal in a terminalgroup.
TO_ALL = 0, ///< Go in this direction for every target.
HANGAR = 1, ///< Heading for hangar.
TERM1 = 2, ///< Heading for terminal 1.
TERM2 = 3, ///< Heading for terminal 2.
TERM3 = 4, ///< Heading for terminal 3.
TERM4 = 5, ///< Heading for terminal 4.
TERM5 = 6, ///< Heading for terminal 5.
TERM6 = 7, ///< Heading for terminal 6.
HELIPAD1 = 8, ///< Heading for helipad 1.
HELIPAD2 = 9, ///< Heading for helipad 2.
TAKEOFF = 10, ///< Airplane wants to leave the airport.
STARTTAKEOFF = 11, ///< Airplane has arrived at a runway for take-off.
ENDTAKEOFF = 12, ///< Airplane has reached end-point of the take-off runway.
HELITAKEOFF = 13, ///< Helicopter wants to leave the airport.
FLYING = 14, ///< %Vehicle is flying in the air.
LANDING = 15, ///< Airplane wants to land.
ENDLANDING = 16, ///< Airplane wants to finish landing.
HELILANDING = 17, ///< Helicopter wants to land.
HELIENDLANDING = 18, ///< Helicopter wants to finish landing.
TERM7 = 19, ///< Heading for terminal 7.
TERM8 = 20, ///< Heading for terminal 8.
HELIPAD3 = 21, ///< Heading for helipad 3.
MAX_HEADINGS = 21, ///< Last valid target to head for.
};
/** Movement Blocks on Airports blocks (eg_airport_flags). */
@@ -131,10 +130,10 @@ static const uint64
/** A single location on an airport where aircraft can move to. */
struct AirportMovingData {
int16 x; ///< x-coordinate of the destination.
int16 y; ///< y-coordinate of the destination.
uint16 flag; ///< special flags when moving towards the destination.
Direction direction; ///< Direction to turn the aircraft after reaching the destination.
int16 x; ///< x-coordinate of the destination.
int16 y; ///< y-coordinate of the destination.
uint16 flag; ///< special flags when moving towards the destination.
DirectionByte direction; ///< Direction to turn the aircraft after reaching the destination.
};
AirportMovingData RotateAirportMovingData(const AirportMovingData *orig, Direction rotation, uint num_tiles_x, uint num_tiles_y);

Some files were not shown because too many files have changed in this diff Show More