Giter Club home page Giter Club logo

openttd's Introduction

OpenTTD

Table of contents

1.0) About

OpenTTD is a transport simulation game based upon the popular game Transport Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.

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) Downloading OpenTTD

OpenTTD can be downloaded from the official OpenTTD website.

Both 'stable' and 'nightly' versions are available for download:

  • most people should choose the 'stable' version, as this has been more extensively tested
  • the 'nightly' version includes the latest changes and features, but may sometimes be less reliable

OpenTTD is also available for free on Steam, GOG.com, and the Microsoft Store. On some platforms OpenTTD will be available via your OS package manager or a similar service.

1.2) OpenTTD gameplay manual

OpenTTD has a community-maintained wiki, including a gameplay manual and tips.

1.3) Supported platforms

OpenTTD has been ported to several platforms and operating systems.

The currently supported platforms are:

  • Linux (SDL (OpenGL and non-OpenGL))
  • macOS (universal) (Cocoa)
  • Windows (Win32 GDI / OpenGL)

Other platforms may also work (in particular various BSD systems), but we don't actively test or maintain these.

1.3.1) Legacy support

Platforms, languages and compilers change. We'll keep support going on old platforms as long as someone is interested in supporting them, except where it means the project can't move forward to keep up with language and compiler features.

We guarantee that every revision of OpenTTD will be able to load savegames from every older revision (excepting where the savegame is corrupt). Please report a bug if you find a save that doesn't load.

1.4) Installing and running OpenTTD

OpenTTD is usually straightforward to install, but for more help the wiki includes an installation guide.

OpenTTD needs some additional graphics and sound files to run.

For some platforms these will be downloaded during the installation process if required.

For some platforms, you will need to refer to the installation guide.

1.4.1) Free graphics and sound files

The free data files, split into OpenGFX for graphics, OpenSFX for sounds and OpenMSX for music can be found at:

Please follow the readme of these packages about the installation procedure. The Windows installer can optionally download and install these packages.

1.4.2) Original Transport Tycoon Deluxe graphics and sound files

If you want to play with the original Transport Tycoon Deluxe data files you have to copy the data files from the CD-ROM into the baseset/ directory. It does not matter whether you copy them from the DOS or Windows version of Transport Tycoon Deluxe. The Windows install can optionally copy these files.

You need to copy the following files:

  • sample.cat
  • trg1r.grf or TRG1.GRF
  • trgcr.grf or TRGC.GRF
  • trghr.grf or TRGH.GRF
  • trgir.grf or TRGI.GRF
  • trgtr.grf or TRGT.GRF

1.4.3) Original Transport Tycoon Deluxe music

If you want the Transport Tycoon Deluxe music, copy the appropriate files from the original game into the baseset folder.

  • TTD for Windows: All files in the gm/ folder (gm_tt00.gm up to gm_tt21.gm)
  • TTD for DOS: The GM.CAT file
  • Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT

1.5) Add-on content / mods

OpenTTD features multiple types of add-on content, which modify gameplay in different ways.

Most types of add-on content can be downloaded within OpenTTD via the 'Check Online Content' button in the main menu.

Add-on content can also be installed manually, but that's more complicated; the OpenTTD wiki may offer help with that, or the OpenTTD directory structure guide.

1.5.1) Social Integration

OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc.

To enable such integration, the plugin for the specific platform has to be downloaded and stored in the social_integration folder.

See OpenTTD's website, under Downloads, for what plugins are available.

1.6) OpenTTD directories

OpenTTD uses its own directory structure to store game data, add-on content etc.

For more information, see the directory structure guide.

1.7) Compiling OpenTTD

If you want to compile OpenTTD from source, instructions can be found in COMPILING.md.

2.0) Contact and Community

'Official' channels

'Unofficial' channels

2.1) Multiplayer games

You can play OpenTTD with others, either cooperatively or competitively.

See the multiplayer documentation for more details.

2.2) Contributing to OpenTTD

We welcome contributors to OpenTTD. More information for contributors can be found in CONTRIBUTING.md

2.3) Reporting bugs

Good bug reports are very helpful. We have a guide to reporting bugs to help with this.

Desyncs in multiplayer are complex to debug and report (some software development skils are required). Instructions can be found in debugging and reporting desyncs.

2.4) Translating

OpenTTD is translated into many languages. Translations are added and updated via the online translation tool.

3.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 to all files in this distribution, except as noted below.

The squirrel implementation in src/3rdparty/squirrel is licensed under the Zlib license. See src/3rdparty/squirrel/COPYRIGHT for the complete license text.

The md5 implementation in src/3rdparty/md5 is licensed under the Zlib license. See the comments in the source files in src/3rdparty/md5 for the complete license text.

The fmt implementation in src/3rdparty/fmt is licensed under the MIT license. See src/3rdparty/fmt/LICENSE.rst for the complete license text.

The nlohmann json implementation in src/3rdparty/nlohmann is licensed under the MIT license. See src/3rdparty/nlohmann/LICENSE.MIT for the complete license text.

The OpenGL API in src/3rdparty/opengl is licensed under the MIT license. See src/3rdparty/opengl/khrplatform.h for the complete license text.

The catch2 implementation in src/3rdparty/catch2 is licensed under the Boost Software License, Version 1.0. See src/3rdparty/catch2/LICENSE.txt for the complete license text.

The icu scriptrun implementation in src/3rdparty/icu is licensed under the Unicode license. See src/3rdparty/icu/LICENSE for the complete license text.

The monocypher implementation in src/3rdparty/monocypher is licensed under the 2-clause BSD and CC-0 license. See src/3rdparty/monocypher/LICENSE.md for the complete license text.

The OpenTTD Social Integration API in src/3rdparty/openttd_social_integration_api is licensed under the MIT license. See src/3rdparty/openttd_social_integration_api/LICENSE for the complete license text.

4.0 Credits

See CREDITS.md

openttd's People

Contributors

2talltyler avatar alberth289346 avatar andythenorth avatar eddi-z avatar egladil avatar frosch123 avatar glx22 avatar j0anjosep avatar jgrennison avatar kuhnovic avatar ldpl avatar lordaro avatar m3henry avatar matthijskooijman avatar merni-ns avatar michicc avatar milek7 avatar nchappe avatar nielsmh avatar nikolas avatar orudge avatar petern avatar planetmaker avatar rubidium42 avatar samuxarick avatar stormcone avatar techgeeknz avatar truebrain avatar ulfhermann avatar yexo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openttd's Issues

test bug report

Bjarni opened the ticket and wrote:

this is a test newgrf bug report. Just checking if newGRF is set up correctly

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4

MSVC projectfile & documentation update

bociusz opened the ticket and wrote:

MSVC projectfile & documentation update

  1. Removed lithuanian.lng from the MSVC6 & MSVC.NET
    projectfile, because it was moved to unfinished, and
    the compile failed.

  2. Updated the MSVC6 doc to the newest Wiki version,
    too many things changed since the last synch.

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/27

Move ConvertOldMultiheadToNew()

peter1138 opened the ticket and wrote:

The call to this function needs to be moved to after custom graphics have been loaded, during AfterLoadGame, after GfxLoadSprites() is called but before AfterLoadVehicles().

Currently it works fine for games using only the default graphics.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/21

change autoreplace array into a pool

Bjarni opened the ticket and wrote:

changing the autoreplace array into a pool is needed to get rid of the fixed max number of engines

it is important to get into svn before next release as it will invalidate the saved array and clear all replace settings on load. The current replace array have never been in a release and it is coomplex to transfer the data to the pool

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3

Game crash on removing track under bridge

Darkvater opened the ticket and wrote:

The problem is obvious, game crashes.
To reproduce: "bridge_crash.sav": any time any part of the train is under the bridge.
To reproduce: "bridge_crash2.sav" (with patch): only at that exact moment.

The original problem (been there for ages, in 0.4.0.1 as well) is that EnsureNoVehicleProcZ() is called and the tile is released as free-to-demolish when the v->z_pos and ti->z don't match. This is incomplete, as a train on a slope will have z values ranging from the bottom to the top. Eg from 8 to 16 if it goes from level 1 to 2. The patch fixes that.
The second problem (bridge_crash2.sav) still occurs however. This is because at the exact moment the train enters the tile, it's 'Z'-value is still 8; no change made. Currently there is no way to fix this without an overhaul of UP/DOWN detection (which is XXX-d and is crap), as there is not a single variable that tells us if the train is going up/down. These variables are cleared just a few lines before in AfterSetTrainPos:2603 in train_cmd.c.

A note: bridge_crash2.sav, while it does happen, does this VERY sporadically. To reproduce it faithfully I had to breakpoint the game at the exact moment the train enters the tile and pause it programmatically. Nevertheless it can happen.

Any thoughts on the patch? I think it is sufficient for the time (using > instead of >= will break deleting tracks under bridges); any better fixes need a lot more work. Also noted that the hash is totally braindead and doesn't really work as required.

Please test and give thoughs.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/40

OpenTTD.GPMI [1 patch available]

TrueBrain opened the ticket and wrote:

Here I will post all patches that I send to OpenTTD.GPMI, of which I feel OpenTTD will benifit too. You should think about things like bugs fixes, small code rewrites and stuff like that.

  1. http://devs.openttd.org/~truelight/patches/regular/network_gamesettings.patch
    This patch holds the game from loading autosave, kilometers and currency when loading a network game as client.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/37

Inconsistent train length limits

egladil opened the ticket and wrote:

When building or cloning a train, it can't be made longer than a certain length. However, when combining trains when dragging them in the depot window, only the length of the target train is checked. Neither the source train length or the combined train length is checked. Thus, by dragging the trains the right way, one can make trains many times longer than normally possible.
I can't say if the limit should be what it is now, or unlimited. Just that I think the limit should be the same everywhere.

An example on how to build a 700 wagon train can be found here: http://emil.djupfeldt.se/ottd/longtrain/

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/36

Fix rarity in town_cmd.c

Rubidium opened the ticket and wrote:

town_cmd.c at about row 815 has the following statements:
...
// Only work with plain land that not already has a house with map5=0
if (ti.tileh == 0 && (ti.type != MP_HOUSE || ti.map5 != 0)) {
if (!CmdFailed(DoCommandByTile(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) {
DoCommandByTile(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
...

The problem is that 'ti.map5 != 0' part of the if-statements makes no sense.
What it means is that it only allows destroying houses when they are in some, but not all, stages of construction and it allows destroying finished houses with a lift.

The original meaning probably was that it only may destroy houses when they are in development. On the other hand, http://svn.openttd.org/cgi-bin/trac.cgi/browser/branch/map completly removes the part.

So I've created two patches, one that changes the 'ti.map5 != 0' to 'building not finished', meaning that no finished house will be replaced by a road, and the other removes the complete part, meaning that no house will be replaced by a road.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/49

Rewrite memory pools

matthijs opened the ticket and wrote:

The memory pool code needs a rewrite. I have written a replacement in two parts: One malloc() like pool which just allocates (fixed-size) blocks of memory, and another one built on top of it which also gives every drop of memory a unique index (as the current pool does).

Reported version: 0.4.0.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/13

Crashes when building a station before any track was built

julik opened the ticket and wrote:

When clicking on the station construction button before any track has been laid down in a new game the program crashes with assertion:

GetAcceptanceAroundTiles in station_cmd.c (line 591)
"w > 0"

After any track has been laid down the station construction is possible. Reported as of build 3419.

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/44

Saving files when run from gdb

matthijs opened the ticket and wrote:

I've been experiencing crashes when saving with latest SVN (r3260). When run normally, everything is fine, but when run inside gdb, it crashes when saving:

Steps to reproduce: Clean compilation (though DEBUG or configuration doesn't seem to affect it). Start OpenTTD, new random game, save game. Bang.

===
matthijs@katherina:~/public_html/openttd/openttd-clean2$ gdb ./openttd
GNU gdb 6.3.90_20051119-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/matthijs/public_html/openttd/openttd-clean2/openttd
[Thread debugging using libthread_db enabled]
[New Thread -1212086592 (LWP 4147)]
[New Thread -1219277904 (LWP 4241)]
[Thread -1219277904 (LWP 4241) exited]
thread_db_get_info: cannot get thread info: generic error
(gdb)

Can somebody confirm this?

Reported version: trunk
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/20

[MorphOS] game crashes if no TCP/IP stack is loaded

tokai opened the ticket and wrote:

game crashes on start when no TCP/IP stack is loaded (some network related function is used before the network is initialized, aka OpenLibrary("bsdsocket.library",4UL); is executed).

There are 2 workarounds for this: open bsdsocket.library manually before the network function (which has to be found ;) is called or use new libnix constructor handling (which initializes bsdsocket.library before main() ), so it can fail gracefully w/o crash. Constructor handling is maybe a bit problematic with the crosscompiled nightly builds.

Reported version: 0.4.0.1
Operating system: MorphOS


This issue was imported from FlySpray: https://bugs.openttd.org/task/8

rating calculation and cargo loading priority

vlassarev opened the ticket and wrote:

  1. Station cargo rating is currently formed based on the age of the last train car as opposed to the engine age, which can be annoying in multiplayer games.
  2. The second of two competing trains transporting the same goods to arrive at its station seems to get an unfair advantage when it catches up with the rating of the train already at the station. Assuming that the maximum rating of the two trains is the same. Also annoying in small multiplayer games where people use this to their advantage (i.e. hold the train until the competition is already at the station and then arrive)

I realize these are small problems but when playing TTD head to head they can be major issues.

Reported version: 0.4.0.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/47

Sort vehicles by model (like in depot)

Meush opened the ticket and wrote:

This patch lets users sort theirs vehicles by model, just like in vehicle buying window.
Very small and safe patch, tested on road vehicles, ships, planes, standard trains, monorails and maglevs. Everything works fine :) Just merge it

Thank you for your time
Meush

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/35

no error window in cocoa builds

Bjarni opened the ticket and wrote:

I was just told that the nightly build didn't show the error window when a grf file was missing. A quick test showed that it's true for the nightly build. However I haven't got time right now to tell if it is an issue for the crosscompiler or cocoa
We should have this working before releasing or the guys, who do not include the TTD files will not get an error about it (read: a lot of bug reports)

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/29

[OSX] lazy pointer crash on exit

Bjarni opened the ticket and wrote:

OpenTTD crashes with a lazy pointer not found on exit
This only happens when linking statically to SDL

this is more like annoying than a real problem as it crashes after the game have saved openttd.cfg and no data is lost. It's quitting anyway, but it is annoying to get the crash window on exit

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/2

Commandline parameter to show revision number

Qball opened the ticket and wrote:

a "--version" (or --revision) option would be the nicest solution, but it looks like MyGetOpt doesn't like it and '-v'/'-r' is allready in use.

I've attached a patch that appends the revition number to the help output.
Like this:

List of music drivers:
extmidi: External MIDI Driver
null: Null Music Driver

OpenTTD Revision: r3257M

I hope it aint a duplicate from sf.

Qball

Attachments

Reported version: 0.4.0.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/15

Fix: [ 1342383 ] (SourceForge) Last built rail type not cleared when starting new game

thepizzaking opened the ticket and wrote:

At the moment, when playing a game in a later year eg. 2030 and you are building Maglev's, then you abandon the game and start a new game in an early year like 1930 and press the build rail button once, the Maglev toolbar will appear.
This patch fixes the problem, when ToolbarBuildRailClick is called, a loop is started to check if the last built railtype is available, if it is, that bar is opened, if it isn't, the next best railtype will be selected.
I hope that made sence, so here's the patch.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/42

rare assert during playing

Qball opened the ticket and wrote:

During playing openttd random (but very rare, just once every x day's) asserts with the following error:
------------------------------------------------------------------------------------
| openttd: gfx.c:142: GfxFillRect: Assertion `bottom > 0' failed.
| Aborted
------------------------------------------------------------------------------------
It happens when doing something, haven't noticed the problem when openttd is just running in the background.

I've been having this problem for almost a year now.
I am running openttd on linux (ubuntu), the problem occurs on x86 and ppc.

libsdl version: 1.2.7+1.2.8cvs20041007-5.3ubuntu2

Sorry for the vague description + summary.

Qball

Reported version: trunk
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/12

Windows Tasks upon release

Darkvater opened the ticket and wrote:

As you know I won't be here for the coming days, but if you guys by some wonder finish all impending tasks for the release (as it is REALLY about TIME) and want to do a release, here are some points to take into account when doing the windows release:

  1. Zipped version.
    - changelog, copyright, known-bugs, readme.txt (data, executable, language files, scenarios, strgen.exe)
    - make SURE you do the zip that it uncompresses into the same directory, not in OpenTTD-0.4.5-win32 or some similar one. This should also hold for the windows nightlies if possible, but that's another issue
  2. Installer version.
    - update the windows installer file (os/win32/installer/install.nsi), Give it new version 0.4.5 and set INSTALLERVERSION to the next number; which will be 16 or 17 I think
    - opdate openttd.rc. FILEVERSION, PRODUCTVERSION 0, 4, 5, 0, other FileVersion in string-form

That should be about it. Good luck!

General tasks for a release:
- update changelog
- update known-bugs file (C&P from SourceForge / Flyspray)
- update readme

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/14

[MorphOS] write to NULL when going to device root in filerequester

tokai opened the ticket and wrote:

openttd does a write to NULL when the user clicks "parent" and he reaches the device root.

Details: Under MorphOS paths looks like: volume:dir/subdir and OpenTTD is not aware of that. Since we compile using libnix (MorphOS libc) and not ixemul (alternative more unix-alike libc, but with certain limitations in 'nativiness') there is no automatical unix<->morphos path conversion and it has to be done manually. Prolly nothing problematic. :-)

Reported version: 0.4.0.1
Operating system: MorphOS


This issue was imported from FlySpray: https://bugs.openttd.org/task/9

Trains chosing an alternative path when encountering a 1-way presignal instead of waiting

StarLite opened the ticket and wrote:

If a way is blocked for a train, and it has to choose a way, it will CHOOSE the free way even it find 2 1-way signals, but ONLY in the direction of it's target. aka: it will never go to a north 1-way of the target is south of it.
This behaviour only accurs when there is a PRE-SIGNAL in front of it, in case of a normal signal it will behave as normal.
Attached are 5 screenshots of a test where the bug occured.

Attachments

Reported version: 0.4.5
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/50

[OSX] Native sound driver

Bjarni opened the ticket and wrote:

we really need a native sound driver as SDL really fucks up now

the code is working, but might need a minor change to make it work on x86 too. It's not committed yet

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/16

Old rail types not buildable after loading game.

peter1138 opened the ticket and wrote:

Upon loading a game, each player's available railtypes are reset according to data from railvehicleinfo. However, it is possible that all engines of a certain type have been made obsolete, and thus the railtype is no longer available. This will mean that the track for the obsolete rail type cannot be built, even if obsolete engines are still running.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/33

Remove unused (debug) code from OTTD

Rubidium opened the ticket and wrote:

Both ai/default/default.c and viewport.c contain code that is not used since rev. 1.

The ai code makes one tile unconditionally height 1 and unconditionally a single tile of a HQ. Making a single tile of a HQ makes no sense at all, and because the code is # if 0'ed since rev 1 I think it can be removed safely.

The viewport code is also not used since rev. 1. It furthermore does not compile when DEBUG_HILIGHT_MARKED_TILES is defined. It is furthermore inconsequent in using the extra bits -> it writes 4 bits, but only reads 1 back. The non-static functions in de # ifdef are not used anywhere in the code.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/48

Map array accessor patch

LordOfThePigs opened the ticket and wrote:

[EDIT by TrueLight]
All this work is now done in a branch in the OpenTTD.GPMI Repos. You can find it here:
svn://svn.libgpmi.org/openttd/branch/tfc_newmap
They will communicate via this task. If you want to see their progress, make a diff between regular OpenTTD Repos and this branch. They will try to keep the branch as up to date as possible.
[/EDIT]

This patch replaces all access to m1 of the current map array by accessor functions. The functions are designed to abstract the code from the underlying data structure, making it easy to change the data structure without breaking the code. Ultimately (ie: once all the fields of the old map array have been rewritten) this will allow switching to a better structure without breaking any code.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/19

fix for calculation min. profit

Graphite opened the ticket and wrote:

This patch fixes two issues:

- In the detailed performance rating, the min. profit would be set to the required value for the min. profit (10000) instead of 0 if the player had no vehicles yet.

- If all vehicles profits are higher than the min. profit value, it shows the maximum minimum profit instead of just the required min. profit value (so for example 25000/10000 instead of 10000/10000). This to make the profit window a bit more consistent as the others already do this.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/24

Train engine collides with rear of depot

peter1138 opened the ticket and wrote:

If a depot is positioned facing away from a piece of track, an engine will half at the end of the line such that it intrudes into the depot.

This can be fixed by making TrainCheckIfLineEnds() check for a depot facing away from the line -- then the train can stop and turn around before it reaches the tile edge.

This patch implements this check.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/41

BIGMULS return-type fix

Graphite opened the ticket and wrote:

The current inline function for BIGMULS casts two numbers to 64-bit, then casts the result to 32-bit, only to then return a 64-bit value. This patch fixes that so it returns a 64-bit result without casting it to 32-bit.

Priority is very low since it currently causes no problems (it's only used in inflation calculations and those numbers stay small enough). However it is a bug worth fixing to avoid future problems if someone were to use BIGMULS with big numbers.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/26

Sample Task

admin opened the ticket and wrote:

This isn't a real task. You should close it and start opening some real tasks.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1

Frame-per-second counter / texteff.c clean-up

oteek opened the ticket and wrote:

Adds FPS counter, cleans-up texteff.c (split to texteff.c, animated_tiles.c and textmessagebox.c)
generalization of network chat messages -> textmessagebox system (used both for network chat and info window)
(infobox is enabled only for DEBUG_)

Attachments

Reported version: 0.4.0.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/34

[OSX] linking error when linking statically to SDL 1.2.8

Bjarni opened the ticket and wrote:

===> Linking openttd
/usr/bin/ld: Undefined symbols:
std::__default_alloc_template<true, 0>::deallocate(void*, unsigned long)
std::__default_alloc_template<true, 0>::_S_force_new
std::__default_alloc_template<true, 0>::_S_free_list
std::__default_alloc_template<true, 0>::_S_node_allocator_lock
std::__default_alloc_template<true, 0>::allocate(unsigned long)
std::__default_alloc_template<true, 0>::_S_refill(unsigned long)

this bug appears if you link statically to SDL 1.2.8. This appears to be an issue to SDL and not OpenTTD as other projects got this issue too

workaround until a solution is found: link dynamically or use SDL 1.2.7

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/10

[OSX] SDL is weird in universal binaries

Bjarni opened the ticket and wrote:

for PPC we need to support all the way back to OSX 10.2 if possible, so dynamic linking is out of the question (they don't like opening libs in non-standard locations)
OpenTTD can't link statically to anything newer than SDL 1.2.7
I can't crosscompile SDL 1.2.7 for x86 OSX, but 1.2.9 can compile, so x86 needs to be dynamically linked to SDL. Luckily x86 is at least OSX 10.4 (developer edition, that is not for public release) or 10.5 (public release), so adding a dynamic lib to the release is possible

The result of this is that the universal binaries have to be static linked PPC code and static linked x86 code except for SDL, which will then be dynamically linked. This is NOT nice, so we better get rid of SDL. Specially since it causes so many issues, not just this one

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/18

Combine common parts of FiosGet...

egladil opened the ticket and wrote:

This patch takes the common parts of FiosGetSavegameList and FiosGetScenarioList, and replace them with FiosGetFileList which uses a callback to determine which files to add to the list. This removes the duplicated code, and also makes it easier to add new file formats to list. (Like the tutorials im working on.)
It needs testing on win32 and os2, since I don't have access to any of those.

Summary of changes:
* Moved arch independet fios functions to new file fios.c
* Added FiosGetFileList to os2.c, unix.c and win32.c
* Removed FiosGetSavegameList and FiosGetScenarioList from os2.c, unix.c and win32.c
* Created new FiosGetSavegameList and FiosGetScenarioList in fios.c
* Updated makefile and vc projects.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.