Compare commits

..

1 Commits

Author SHA1 Message Date
rubidium 89f9c9ce20 (svn r18355) -Release: 0.7.4 2009-12-01 00:03:55 +00:00
40 changed files with 90 additions and 201 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -24,7 +24,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTDD.GRF = 2e1f3667175e8eeb013ea35881ecffb7
OPENTTDD.GRF = c886c7d5b38a93f2cb1cdc0d33472eb8
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
+1 -1
View File
@@ -24,7 +24,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTDD.GRF = 2e1f3667175e8eeb013ea35881ecffb7
OPENTTDD.GRF = c886c7d5b38a93f2cb1cdc0d33472eb8
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
+1 -1
View File
@@ -24,7 +24,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTDW.GRF = a73ff4dce8936fadc02dea183afad638
OPENTTDW.GRF = b6689105405fa3ea34cb8a5543633d29
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
+5 -31
View File
@@ -1,29 +1,3 @@
0.7.5 (2009-12-23)
------------------------------------------------------------------------
(None)
0.7.5-RC1 (2009-12-14)
------------------------------------------------------------------------
- Add: Some missing latin-ish characters from the OpenGFX set (r18431)
- Change: Recolour the bubble generator just like any other industry [FS#3349] (r18409)
- Fix: Read after free in case no network connection could be made with the content server (r18493)
- Fix: [NewGRF] Initialisation of cargo payment was broken for NewGRF cargos [FS#3344] (r18475)
- Fix: [NoAI] AIOrder::SkipToOrder did not properly resolve ORDER_CURRENT (r18471)
- Fix: When moving a wagon and only the last part of a dual headed engine you could split the dual headed engine over two vehicles. This could be used to crash servers [CVE-2009-4007] (r18462)
- Fix: [Windows] Forgot to load the symbol from SDL.dll (r18439)
- Fix: Do not run the 'jam protection' for vehicles in a depot [FS#3360] (r18428)
- Fix: [Windows] the help window would be too large in some cases [FS#3327] (r18424)
- Fix: Under some circumstances a pointer could be left untouched and then freed. Make sure this does not happen by ensuring it starts out as NULL instead of 'garbage' [FS#3298] (r18418)
- Fix: On slopes the original and better road layouts did not check their minimum distance requirements [FS#3332] (r18415)
- Fix: Aqueducts were not influenced by the 'long bridges' setting [FS#3338] (r18407)
- Fix: Drive through road stops did not get flooded (r18401)
- Fix: [YAPP] Trains on bridges were not found, when searching for the origin of a reservation [FS#3345] (r18392)
- Fix: (Invalid) GRFs could trigger invalid reads (r18391)
- Fix: One could not share orders between buses carrying different cargos (r18380)
- Fix: Off-by-one in the preconfigured music lists [FS#3339] (r18369)
0.7.4 (2009-12-01)
------------------------------------------------------------------------
- Fix: Endianness issue with saving the zoom level [FS#3333] (r18351)
@@ -652,7 +626,7 @@
- Fix: In some cases the sprite cache could be filled with unremovable items [FS#2153] (r13869)
- Fix: Return of wrong parent scope of (NewGRF) industry variables (r13868)
- Fix: Loading of TTD(Patch) savegames from the command line did not work (r13859)
- Fix: Buffer overflow for too long filename supplied as '-g' parameter [CVE-2008-3577] (r13858)
- Fix: Buffer overflow for too long filename supplied as '-g' parameter (r13858)
- Fix: Cargo type lookup was incorrect for NewGRF version 7 files without a translation table [FS#2157] (r13855)
- Fix: GetTownByTile() is only valid for houses and roads (r13851)
- Fix: Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window (r13844)
@@ -673,13 +647,13 @@
- Fix: Possible desync on the autorenew settings 20+ game years (i.e. 4.5+ hours) after a company was started (r13718)
- Fix: Any player could construct new companies [FS#2144] (r13716)
- Fix: Remove the unique_id from the message that a client has joined as it is only exposes the unique_id more than needed (r13714)
- Fix: Possible crash on creating a network packet [CVE-2008-3547] (r13713)
- Fix: Possible crash on creating a network packet (r13713)
- Fix: Enforce the length restrictions of company and president name in the commands too (r13712)
0.6.2-RC1 (2008-07-16)
------------------------------------------------------------------------
- Fix: Possible buffer overflow in string truncation code [CVE-2008-3576] (r13700)
- Fix: Possible buffer overflow in string truncation code (r13700)
- Fix: Handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string (r13699)
- Fix: In some cases the (sound) mixer could overflow causing artefacts in the sound [FS#2120] (r13695)
- Fix: Do not rely on .tar files always ending with a block of zeros (r13693)
@@ -1738,7 +1712,7 @@
- Fix: Danish town names were saved/loaded as Swiss
- Fix: Removing roads on crossings was done without a check for ownership
- Fix: [Autoreplace] Fix drawing of train list for outdated engines
- Fix: Malicious clients/servers could crash the game [CVE-2006-1999, CVE-2006-1998]
- Fix: Malicious clients/servers could crash the game
- Fix: [Autoreplace] allow replacement of wagons even when the engine fails to be replaced
- Fix: Certain operations involving trains inside a depot could cause a crash
- Fix: [Autoreplace] cost for refitting a new vehicle is added to the cost animation (player always paid for it, it just was not shown)
@@ -1888,7 +1862,7 @@
- Fix: On OS/2 show the trailing \ if the current directory is a root directory (r2860)
- Fix: Return a proper version number, when testing the TTDPatch version in the SkipIf action (r2862)
- Fix: Change the way NewGRFs are loaded, this saves quite some sprite slots - about 2000 for DBSetXL for example (r2868)
- Fix: Several format string vulnerabilities and buffer overflows in the network code [CVE-2005-2764, CVE-2005-2763] (r2899)
- Fix: Several format string vulnerabilities and buffer overflows in the network code (r2899)
- Fix: fixed issue where autorenewed vehicles did not get all stats updated (r2912)
- Fix: Exit the child of the extmidi backend with _exit() instead of exit(), because we do not want any atexit handlers - especially flushing output streams - to run, if exec() fails (r2938)
- Fix: Server crash with 'say'-command (r2950)
+3 -3
View File
@@ -5,7 +5,7 @@ log() {
}
set_default() {
released_version=""
released_version="0.7.4"
ignore_extra_parameters="0"
# We set all kinds of defaults for params. Later on the user can override
@@ -47,8 +47,8 @@ set_default() {
enable_static="1"
enable_translator="0"
enable_unicode="1"
enable_assert="1"
enable_strip="0"
enable_assert="0"
enable_strip="1"
enable_universal="1"
enable_osx_g5="0"
enable_cocoa_quartz="1"
+2 -2
View File
@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2009-12-23
Release version: 0.7.5
Last updated: 2009-12-01
Release version: 0.7.4
------------------------------------------------------------------------
-12
View File
@@ -1,15 +1,3 @@
openttd (0.7.5) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 23 Dec 2009 20:52:34 +0100
openttd (0.7.5~RC1) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 14 Dec 2009 19:28:37 +0100
openttd (0.7.4) unstable; urgency=low
* New upstream release.
+1 -1
View File
@@ -13,7 +13,7 @@
#-------------------------------------------------------------------------------
Name: openttd
Version: 0.7.5
Version: 0.7.4
Release: 1%{?dist}
Group: Amusements/Games
+3 -3
View File
@@ -1,7 +1,7 @@
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "0.7.5" ; Define application version
!define APPVERSIONINTERNAL "0.7.5.0" ; Define application version in X.X.X.X
!define INSTALLERVERSION 72 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPVERSION "0.7.4" ; Define application version
!define APPVERSIONINTERNAL "0.7.4.0" ; Define application version in X.X.X.X
!define INSTALLERVERSION 70 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!include ${VERSION_INCLUDE}
!define APPURLLINK "http://www.openttd.org"
+1
View File
@@ -32,6 +32,7 @@ Sub UpdateFiles(version)
modified = Mid(version, InStrRev(version, Chr(9)) + 1)
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
Else
version = "0.7.4"
revision = 0
modified = 1
End If
+2 -2
View File
@@ -60,7 +60,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -273,7 +273,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
+2 -2
View File
@@ -60,7 +60,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -273,7 +273,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
+2 -2
View File
@@ -61,7 +61,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -271,7 +271,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
+2 -2
View File
@@ -61,7 +61,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -271,7 +271,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
+2 -2
View File
@@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2009-12-23
Release version: 0.7.5
Last updated: 2009-12-01
Release version: 0.7.4
------------------------------------------------------------------------
-6
View File
@@ -162,12 +162,6 @@ bool AIFileInfo::CheckMethod(const char *name) const
return 0;
}
AIInfo::AIInfo() :
min_loadable_version(0),
use_as_random(false)
{
}
AIInfo::~AIInfo()
{
/* Free all allocated strings */
+1 -2
View File
@@ -41,7 +41,7 @@ public:
friend class AIInfo;
friend class AILibrary;
AIFileInfo() : SQ_instance(NULL), main_script(NULL), author(NULL), name(NULL), short_name(NULL), description(NULL), date(NULL), instance_name(NULL), version(0), url(NULL) {};
AIFileInfo() : SQ_instance(NULL), main_script(NULL), author(NULL), name(NULL), short_name(NULL), description(NULL), date(NULL), instance_name(NULL), url(NULL) {};
~AIFileInfo();
/**
@@ -123,7 +123,6 @@ class AIInfo : public AIFileInfo {
public:
static const char *GetClassName() { return "AIInfo"; }
AIInfo();
~AIInfo();
/**
-4
View File
@@ -14,10 +14,6 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 0.7.5
*
* No changes
*
* \b 0.7.4
*
* No changes
-2
View File
@@ -393,8 +393,6 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
/* static */ bool AIOrder::SkipToOrder(VehicleID vehicle_id, OrderPosition next_order)
{
next_order = AIOrder::ResolveOrderPosition(vehicle_id, next_order);
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, next_order));
return AIObject::DoCommand(0, vehicle_id, next_order, CMD_SKIP_TO_ORDER);
+5 -1
View File
@@ -188,7 +188,11 @@
/* static */ bool AIVehicle::SkipToVehicleOrder(VehicleID vehicle_id, AIOrder::OrderPosition order_position)
{
return AIOrder::SkipToOrder(vehicle_id, order_position);
order_position = AIOrder::ResolveOrderPosition(vehicle_id, order_position);
EnforcePrecondition(false, AIOrder::IsValidVehicleOrder(vehicle_id, order_position));
return AIObject::DoCommand(0, vehicle_id, order_position, CMD_SKIP_TO_ORDER);
}
/* static */ bool AIVehicle::ReverseVehicle(VehicleID vehicle_id)
-4
View File
@@ -4,7 +4,6 @@
#include "stdafx.h"
#include "openttd.h"
#include "functions.h"
#include "landscape.h"
#include "company_func.h"
#include "variables.h"
@@ -285,9 +284,6 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_
GfxLoadSprites();
LoadStringWidthTable();
/* Initialise cargo payment */
InitializeLandscapeVariables(false);
/* Re-init the windowing system */
ResetWindowSystem();
+1 -1
View File
@@ -64,7 +64,7 @@ static ReusableBuffer<uint8> _cursor_backup;
*/
static Rect _invalid_rect;
static const byte *_colour_remap_ptr;
static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures, that ST_FONT sprites only use colours 0 to 2.
static byte _string_colourremap[3];
enum {
DIRTY_BLOCK_HEIGHT = 8,
+3 -3
View File
@@ -29,15 +29,15 @@ static byte _playlist_all[] = {
};
static byte _playlist_old_style[] = {
2, 9, 3, 10, 15, 16, 20, 14, 0
1, 8, 2, 9, 14, 15, 19, 13, 0
};
static byte _playlist_new_style[] = {
7, 12, 11, 18, 22, 19, 6, 0
6, 11, 10, 17, 21, 18, 5, 0
};
static byte _playlist_ezy_street[] = {
13, 8, 17, 4, 21, 5, 0
12, 7, 16, 3, 20, 4, 0
};
static byte * const _playlists[] = {
-1
View File
@@ -711,7 +711,6 @@ public:
if (!success) {
ShowErrorMessage(INVALID_STRING_ID, STR_CONTENT_ERROR_COULD_NOT_CONNECT, 0, 0);
delete this;
return;
}
this->SetDirty();
+3 -2
View File
@@ -1094,8 +1094,9 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return CMD_ERROR;
/* Trucks can't share orders with busses (and visa versa) */
if (src->type == VEH_ROAD && IsCargoInClass(src->cargo_type, CC_PASSENGERS) != IsCargoInClass(dst->cargo_type, CC_PASSENGERS)) {
return CMD_ERROR;
if (src->type == VEH_ROAD) {
if (src->cargo_type != dst->cargo_type && (IsCargoInClass(src->cargo_type, CC_PASSENGERS) || IsCargoInClass(dst->cargo_type, CC_PASSENGERS)))
return CMD_ERROR;
}
/* Is the vehicle already in the shared list? */
+4 -15
View File
@@ -57,17 +57,6 @@ BEGIN
END
101 DIALOG DISCARDABLE 0, 0, 600, 400
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "OpenTTD command line help"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "&OK",12,274,378,50,14,BS_CENTER
EDITTEXT 11,7,6,583,365,ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_HSCROLL
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
@@ -75,8 +64,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,7,0,!!REVISION!!
PRODUCTVERSION 0,7,0,!!REVISION!!
FILEVERSION 0,7,4,18355
PRODUCTVERSION 0,7,4,18355
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -94,14 +83,14 @@ BEGIN
VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
VALUE "CompanyName", "OpenTTD Development Team\0"
VALUE "FileDescription", "OpenTTD\0"
VALUE "FileVersion", "Development !!VERSION!!\0"
VALUE "FileVersion", "0.7.4\0"
VALUE "InternalName", "openttd\0"
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2009. All Rights Reserved.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "openttd.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "OpenTTD\0"
VALUE "ProductVersion", "Development !!VERSION!!\0"
VALUE "ProductVersion", "0.7.4\0"
VALUE "SpecialBuild", "-\0"
END
END
+1 -3
View File
@@ -233,9 +233,7 @@ static Vehicle *FindTrainOnTrackEnum(Vehicle *v, void *data)
{
FindTrainOnTrackInfo *info = (FindTrainOnTrackInfo *)data;
if (v->type != VEH_TRAIN || (v->vehstatus & VS_CRASHED)) return NULL;
if (v->u.rail.track == TRACK_BIT_WORMHOLE || HasBit((TrackBits)v->u.rail.track, TrackdirToTrack(info->res.trackdir))) {
if (v->type == VEH_TRAIN && !(v->vehstatus & VS_CRASHED) && HasBit((TrackBits)v->u.rail.track, TrackdirToTrack(info->res.trackdir))) {
v = v->First();
/* ALWAYS return the lowest ID (anti-desync!) */
+3 -3
View File
@@ -20,7 +20,7 @@
* norev000 is for non-releases that are made on systems without
* subversion or sources that are not a checkout of subversion.
*/
const char _openttd_revision[] = "!!VERSION!!";
const char _openttd_revision[] = "0.7.4";
/**
* Let us know if current build was modified. This detection
@@ -45,11 +45,11 @@ const byte _openttd_revision_modified = !!MODIFIED!!;
* final release will always have a lower version number than the released
* version, thus making comparisions on specific revisions easy.
*/
const uint32 _openttd_newgrf_version = 0 << 28 | 7 << 24 | 0 << 20 | 0 << 19 | (!!REVISION!! & ((1 << 19) - 1));
const uint32 _openttd_newgrf_version = 0 << 28 | 7 << 24 | 4 << 20 | 1 << 19 | (18355 & ((1 << 19) - 1));
#ifdef __MORPHOS__
/**
* Variable used by MorphOS to show the version.
*/
extern const char morphos_versions_tag[] = "$VER: OpenTTD !!VERSION!! (!!DATE!!) OpenTTD Team [MorphOS, PowerPC]";
extern const char morphos_versions_tag[] = "$VER: OpenTTD 0.7.4 (!!DATE!!) OpenTTD Team [MorphOS, PowerPC]";
#endif
+3 -3
View File
@@ -736,7 +736,7 @@ static Vehicle *EnumCheckRoadVehClose(Vehicle *v, void *data)
return NULL;
}
static Vehicle *RoadVehFindCloseTo(Vehicle *v, int x, int y, Direction dir, bool update_blocked_ctr = true)
static Vehicle *RoadVehFindCloseTo(Vehicle *v, int x, int y, Direction dir)
{
RoadVehFindData rvf;
Vehicle *front = v->First();
@@ -765,7 +765,7 @@ static Vehicle *RoadVehFindCloseTo(Vehicle *v, int x, int y, Direction dir, bool
return NULL;
}
if (update_blocked_ctr && ++front->u.road.blocked_ctr > 1480) return NULL;
if (++front->u.road.blocked_ctr > 1480) return NULL;
return rvf.best;
}
@@ -1227,7 +1227,7 @@ static bool RoadVehLeaveDepot(Vehicle *v, bool first)
int y = TileY(v->tile) * TILE_SIZE + (rdp[RVC_DEPOT_START_FRAME].y & 0xF);
if (first) {
if (RoadVehFindCloseTo(v, x, y, v->direction, false) != NULL) return true;
if (RoadVehFindCloseTo(v, x, y, v->direction) != NULL) return true;
VehicleServiceInDepot(v);
+1 -1
View File
@@ -46,7 +46,7 @@ void ResetViewportAfterLoadGame()
w->viewport->dest_scrollpos_y = _saved_scrollpos_y;
ViewPort *vp = w->viewport;
vp->zoom = (ZoomLevel)min(_saved_scrollpos_zoom, ZOOM_LVL_MAX);
vp->zoom = min<ZoomLevel>(_saved_scrollpos_zoom, ZOOM_LVL_MAX);
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
-1
View File
@@ -61,7 +61,6 @@ static const char sdl_files[] =
M("SDL_SetColorKey")
M("SDL_WM_SetIcon")
M("SDL_MapRGB")
M("SDL_VideoModeOK")
M("")
;
#undef M
+2 -10
View File
@@ -121,11 +121,7 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot,
}
for (int x = 0; x < length; x++) {
switch (sprite_type) {
case ST_NORMAL: data->m = _palette_remap_grf[file_slot] ? _palette_remap[*dest] : *dest; break;
case ST_FONT: data->m = min(*dest, 2u); break;
default: data->m = *dest; break;
}
data->m = ((sprite_type == ST_NORMAL && _palette_remap_grf[file_slot]) ? _palette_remap[*dest] : *dest);
dest++;
data++;
}
@@ -146,11 +142,7 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot,
dest = dest_orig;
for (int i = 0; i < sprite->width * sprite->height; i++) {
switch (sprite_type) {
case ST_NORMAL: sprite->data[i].m = _palette_remap_grf[file_slot] ? _palette_remap[dest[i]] : dest[i]; break;
case ST_FONT: sprite->data[i].m = min(dest[i], 2u); break;
default: sprite->data[i].m = dest[i]; break;
}
sprite->data[i].m = ((sprite_type == ST_NORMAL && _palette_remap_grf[file_slot]) ? _palette_remap[dest[i]] : dest[i]);
}
}
-3
View File
@@ -3154,9 +3154,6 @@ static void ChangeTileOwner_Station(TileIndex tile, Owner old_owner, Owner new_o
*/
static bool CanRemoveRoadWithStop(TileIndex tile, DoCommandFlag flags)
{
/* Yeah... water can always remove stops, right? */
if (_current_company == OWNER_WATER) return true;
Owner road_owner = _current_company;
Owner tram_owner = _current_company;
+9 -9
View File
@@ -684,17 +684,17 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF
M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1285 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3),
M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3),
M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3),
M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3),
M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3),
M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),
+15 -4
View File
@@ -760,8 +760,19 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
}
cur_slope = _settings_game.construction.build_on_slopes ? GetFoundationSlope(tile, NULL) : GetTileSlope(tile, NULL);
bool ret = !IsNeighborRoadTile(tile, dir, t->layout == TL_ORIGINAL ? 1 : 2);
if (cur_slope == SLOPE_FLAT) return ret;
if (cur_slope == SLOPE_FLAT) {
no_slope:
/* Tile has no slope */
switch (t->layout) {
default: NOT_REACHED();
case TL_ORIGINAL: // Disallow the road if any neighboring tile has a road (distance: 1)
return !IsNeighborRoadTile(tile, dir, 1);
case TL_BETTER_ROADS: // Disallow the road if any neighboring tile has a road (distance: 1 and 2).
return !IsNeighborRoadTile(tile, dir, 2);
}
}
/* If the tile is not a slope in the right direction, then
* maybe terraform some. */
@@ -776,12 +787,12 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
}
if (CmdFailed(res) && Chance16(1, 3)) {
/* We can consider building on the slope, though. */
return ret;
goto no_slope;
}
}
return false;
}
return ret;
return true;
}
}
+4
View File
@@ -965,6 +965,10 @@ static void AddWagonToConsist(Vehicle *v, Vehicle *dest)
*/
static void NormaliseTrainConsist(Vehicle *v)
{
if (IsFreeWagon(v)) return;
assert(IsFrontEngine(v));
for (; v != NULL; v = GetNextVehicle(v)) {
if (!IsMultiheaded(v) || !IsTrainEngine(v)) continue;
-2
View File
@@ -248,8 +248,6 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
if (transport_type != TRANSPORT_WATER) {
/* set and test bridge length, availability */
if (!CheckBridge_Stuff(bridge_type, bridge_len, flags)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
} else {
if (bridge_len > (_settings_game.construction.longbridges ? 100U : 16U)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
}
/* retrieve landscape height and ensure it's on land */
+7 -56
View File
@@ -937,72 +937,23 @@ void CreateConsole()
#endif
}
/** Temporary pointer to get the help message to the window */
static const char *_help_msg;
/** Callback function to handle the window */
static INT_PTR CALLBACK HelpDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG: {
char help_msg[8192];
const char *p = _help_msg;
char *q = help_msg;
while (q != lastof(help_msg) && *p != '\0') {
if (*p == '\n') {
*q++ = '\r';
if (q == lastof(help_msg)) {
q[-1] = '\0';
break;
}
}
*q++ = *p++;
}
*q = '\0';
#if defined(UNICODE)
/* We need to put the text in a seperate buffer because the default
* buffer in MB_TO_WIDE might not be large enough (512 chars) */
wchar_t help_msgW[8192];
#endif
SetDlgItemText(wnd, 11, MB_TO_WIDE_BUFFER(help_msg, help_msgW, lengthof(help_msgW)));
SendDlgItemMessage(wnd, 11, WM_SETFONT, (WPARAM)GetStockObject(ANSI_FIXED_FONT), FALSE);
} return TRUE;
case WM_COMMAND:
if (wParam == 12) ExitProcess(0);
return TRUE;
case WM_CLOSE:
ExitProcess(0);
}
return FALSE;
}
void ShowInfo(const char *str)
{
if (_has_console) {
fprintf(stderr, "%s\n", str);
} else {
bool old;
#if defined(UNICODE)
/* We need to put the text in a seperate buffer because the default
* buffer in MB_TO_WIDE might not be large enough (512 chars) */
wchar_t help_msgW[8192];
#endif
ReleaseCapture();
_left_button_clicked = _left_button_down = false;
old = MyShowCursor(true);
if (strlen(str) > 2048) {
/* The minimum length of the help message is 2048. Other messages sent via
* ShowInfo are much shorter, or so long they need this way of displaying
* them anyway. */
_help_msg = str;
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(101), NULL, HelpDialogFunc);
} else {
#if defined(UNICODE)
/* We need to put the text in a seperate buffer because the default
* buffer in MB_TO_WIDE might not be large enough (512 chars) */
wchar_t help_msgW[8192];
#endif
if (MessageBox(GetActiveWindow(), MB_TO_WIDE_BUFFER(str, help_msgW, lengthof(help_msgW)), _T("OpenTTD"), MB_ICONINFORMATION | MB_OKCANCEL) == IDCANCEL) {
CreateConsole();
}
if (MessageBox(GetActiveWindow(), MB_TO_WIDE_BUFFER(str, help_msgW, lengthof(help_msgW)), _T("OpenTTD"), MB_ICONINFORMATION | MB_OKCANCEL) == IDCANCEL) {
CreateConsole();
}
MyShowCursor(old);
}