diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt index 67524ee85d..34cf48b995 100644 --- a/bin/ai/regression/regression.txt +++ b/bin/ai/regression/regression.txt @@ -4998,7 +4998,7 @@ ERROR: HasNext() is invalid as Begin() is never called CanRefitCargo(): false GetCapacity(): 25 GetReliability(): 58 - GetMaxSpeed(): 238 + GetMaxSpeed(): 236 GetPrice(): 28710 GetMaxAge(): 7320 GetRunningCost(): 2390 @@ -5016,7 +5016,7 @@ ERROR: HasNext() is invalid as Begin() is never called CanRefitCargo(): false GetCapacity(): 65 GetReliability(): 95 - GetMaxSpeed(): 238 + GetMaxSpeed(): 236 GetPrice(): 30761 GetMaxAge(): 8784 GetRunningCost(): 2812 @@ -5070,7 +5070,7 @@ ERROR: HasNext() is invalid as Begin() is never called CanRefitCargo(): false GetCapacity(): 30 GetReliability(): 77 - GetMaxSpeed(): 238 + GetMaxSpeed(): 236 GetPrice(): 30761 GetMaxAge(): 10980 GetRunningCost(): 2756 diff --git a/known-bugs.txt b/known-bugs.txt index 0ca083eceb..28d981a7df 100644 --- a/known-bugs.txt +++ b/known-bugs.txt @@ -67,6 +67,38 @@ No suitable AI can be found "AI Settings" -> "Select AI" -> "Check Online Content" which is also accessed via the main menu. +After a while of playing, colours get corrupted + In Windows 7 the background slideshow corrupts the colour mapping of + OpenTTD's 8bpp screen modes. Workarounds for this are: + a) Switching to windowed mode, instead of fullscreen + b) Switching off background slideshow + c) Setting up the 32bpp-anim or 32bpp-optimized blitter + +Long delay between switching songs/music + On Windows there is a delay of a (few) second(s) between switching of + songs for the "win32" driver. This delay is caused by the fact that + opening a MIDI file via MCI is extremely slow. + + DirectMusic, known as "dmusic" in OpenTTD, has a much shorter delay. + However, under some circumstances DirectMusic does not reset its + state properly causing wrongly pitched/bad sounding songs. This + problem is in DirectMusic as it is reproducable with Microsoft's + DirectMusic Producer. DirectMusic has been deprecated since 2004 + and as such has no support for 64 bits OpenTTD. + + As a delay is favourable over bad sounding music the "win32" driver + is the default driver for OpenTTD. You can change this default by + setting the "musicdriver" in your openttd.cfg to "dmusic". + +Custom vehicle type name is incorrectly aligned + Some NewGRFs use sprites that are bigger than normal in the "buy + vehicle" window. Due to this they have to encode an offset for the + vehicle type name. Upon renaming the vehicle type this encoded offset + is stripped from the name because the "edit box" cannot show this + encoding. As a result the custom vehicle type names will get the + default alignment. The only way to (partly) fix this is by adding + spaces to the custom name. + Clipping problems [FS#119] In some cases sprites are not drawn as one would expect. Examples of this are aircraft that might be hidden below the runway or trees that @@ -178,3 +210,9 @@ OpenTTD not properly resizing with SDL on X [FS#3305] Window managers that are known to exhibit this behaviour are KDE's and GNOME's. With the XFCE's and LXDE's window managers the resize event is sent when the user releases the mouse. + +Crashes when playing music [FS#3941] + Mac OS X's QuickTime (default music driver) and Windows' MCI (win32 + music driver) crash on some songs from OpenMSX. OpenTTD cannot do + anything about this. Please report these crashes to the authors of + OpenMSX so the crash causing songs can be removed or fixed. diff --git a/os/debian/changelog b/os/debian/changelog index 3df8fd6b20..ef710a9088 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -251,7 +251,7 @@ openttd (0.6.0-2) unstable; urgency=low [ Matthijs Kooijman ] * Don't install anything into ~ during make install, this prevented successful builds on some architectures. Fix imported from upstream. - * Put the homepage in it's own Homepage field instead of in the description. + * Put the homepage in its own Homepage field instead of in the description. * Bump Standards-Version to 3.7.3 -- Jordi Mallach Thu, 03 Apr 2008 00:07:10 +0200 diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index e181fe6c4f..00b9d7325f 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -669,8 +669,8 @@ void UpdateAircraftCache(Aircraft *v) { uint max_speed = GetVehicleProperty(v, PROP_AIRCRAFT_SPEED, 0); if (max_speed != 0) { - /* Convert from original units to (approx) km/h */ - max_speed = (max_speed * 129) / 10; + /* Convert from original units to km-ish/h */ + max_speed = (max_speed * 128) / 10; v->acache.cached_max_speed = max_speed; } else { diff --git a/src/economy.cpp b/src/economy.cpp index 98a6c248c6..6042e9816f 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1237,7 +1237,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) case VEH_TRAIN: t = Train::From(u)->tcache.cached_max_speed; break; case VEH_ROAD: t = u->max_speed / 2; break; case VEH_SHIP: t = u->max_speed; break; - case VEH_AIRCRAFT: t = u->max_speed * 10 / 129; break; // convert to old units + case VEH_AIRCRAFT: t = u->max_speed * 10 / 128; break; // convert to old units default: NOT_REACHED(); } diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 4029239db3..6f61397753 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1251,7 +1251,7 @@ struct QueryStringWindow : public QueryStringBaseWindow QueryStringBaseWindow(maxsize) { GetString(this->edit_str_buf, str, &this->edit_str_buf[maxsize - 1]); - this->edit_str_buf[maxsize - 1] = '\0'; + str_validate(this->edit_str_buf, &this->edit_str_buf[maxsize - 1], false, true); if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 21804428af..2f1b311ba0 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1034,12 +1034,12 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int avi->cost_factor = buf->ReadByte(); break; - case PROP_AIRCRAFT_SPEED: // 0x0C Speed (1 unit is 8 mph, we translate to 1 unit is 1 km/h) - avi->max_speed = (buf->ReadByte() * 129) / 10; + case PROP_AIRCRAFT_SPEED: // 0x0C Speed (1 unit is 8 mph, we translate to 1 unit is 1 km-ish/h) + avi->max_speed = (buf->ReadByte() * 128) / 10; break; case 0x0D: // Acceleration - avi->acceleration = (buf->ReadByte() * 129) / 10; + avi->acceleration = (buf->ReadByte() * 128) / 10; break; case PROP_AIRCRAFT_RUNNING_COST_FACTOR: // 0x0E Running cost factor diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index cbf54a24a3..5a1de575f0 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -322,6 +322,7 @@ uint32 GetTerrainType(TileIndex tile, bool upper_halftile) has_snow = (GetTileMaxZ(tile) > GetSnowLine()); break; + case MP_VOID: case MP_WATER: has_snow = (GetTileZ(tile) > GetSnowLine()); break; diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 266cfbc292..15486c8874 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -863,6 +863,8 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const uint totalsets = in_motion ? group->num_loaded : group->num_loading; + if (totalsets == 0) return NULL; + uint set = (v->cargo.Count() * totalsets) / max((uint16)1, v->cargo_cap); set = min(set, totalsets - 1); diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 84746dd953..c7347c6c76 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1295,11 +1295,11 @@ bool AfterLoadGame() if (CheckSavegameVersion(50)) { Aircraft *v; - /* Aircraft units changed from 8 mph to 1 km/h */ + /* Aircraft units changed from 8 mph to 1 km-ish/h */ FOR_ALL_AIRCRAFT(v) { if (v->subtype <= AIR_AIRCRAFT) { const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); - v->cur_speed *= 129; + v->cur_speed *= 128; v->cur_speed /= 10; v->max_speed = avi->max_speed; v->acceleration = avi->acceleration; diff --git a/src/string.cpp b/src/string.cpp index 9309c71990..47cf3b8261 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -113,7 +113,7 @@ void str_validate(char *str, const char *last, bool allow_newlines, bool ignore) /* Assume the ABSOLUTE WORST to be in str as it comes from the outside. */ char *dst = str; - while (*str != '\0') { + while (str <= last && *str != '\0') { size_t len = Utf8EncodedCharLen(*str); /* If the character is unknown, i.e. encoded length is 0 * we assume worst case for the length check. @@ -146,6 +146,16 @@ void str_validate(char *str, const char *last, bool allow_newlines, bool ignore) /* Replace the undesirable character with a question mark */ str += len; if (!ignore) *dst++ = '?'; + + /* In case of these two special cases assume that they really + * mean SETX/SETXY and also "eat" the paramater. If this was + * not the case the string was broken to begin with and this + * would not break much more. */ + if (c == SCC_SETX) { + str++; + } else if (c == SCC_SETXY) { + str += 2; + } } } diff --git a/src/table/engines.h b/src/table/engines.h index 6820da1168..1f0b569c35 100644 --- a/src/table/engines.h +++ b/src/table/engines.h @@ -558,7 +558,7 @@ static const ShipVehicleInfo _orig_ship_vehicle_info[] = { * @param h mail_capacity * @param i passenger_capacity */ -#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, e, f, (g * 129) / 10, h, i } +#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, e, f, (g * 128) / 10, h, i } #define H AIR_HELI #define P AIR_CTOL #define J AIR_CTOL | AIR_FAST