peter1138
544e04fe62
(svn r14926) -Feature: Automatically set last engine ageing year to the last 'introduction year plus half model life', to allow engines later than 2050 to appear.
2009-01-08 21:48:59 +00:00
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
2009-01-04 15:32:25 +00:00
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
2008-12-28 14:37:19 +00:00
rubidium
bf6ec8b19f
(svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
...
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
2008-12-24 09:53:15 +00:00
rubidium
e6ff168508
(svn r14732) -Codechange: replace some magic number with less magic constants and use the proper type for a few variables.
2008-12-23 21:03:43 +00:00
rubidium
2e916a154f
(svn r14683) -Change: only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos.
...
NOTE: it is still possible that a vehicle is marked refittable when there is nothing to refit to, e.g. when only one subcargo is available but that cannot be determined without a vehicle chain.
2008-12-16 22:02:12 +00:00
frosch
1fa409177c
(svn r14680) -Feature(ette) [FS#2434]: Use property 4 (model life) also for wagons.
...
Setting property 4 to 0xFF will protect the vehicle (engine or wagon) from expireing. (Necessary since early introduction dates)
Savegames will only be affected after 'resetengines'.
2008-12-16 18:09:40 +00:00
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
2008-09-30 20:39:50 +00:00
smatz
e543181b12
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
2008-09-15 19:02:50 +00:00
frosch
869e90ea86
(svn r14313) -Codechange: Move functions dealing with the EngineRenew pool to their own file.
2008-09-13 15:49:29 +00:00
peter1138
2e0d735f1f
(svn r14182) -Fix: After applying NewGRF settings, all rail and road types were available as the engine availability check was performed too early.
2008-08-28 19:53:25 +00:00
rubidium
8dffbcfd26
(svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client.
2008-08-13 06:22:04 +00:00
peter1138
ba8905fd2c
(svn r13825) -Revert (r13821 partially): preview_player_rank wasn't a PlayerByte value in r12143, and still isn't a PlayerByte value.
2008-07-25 17:33:53 +00:00
rubidium
fae2695854
(svn r13821) -Codechange: replace some uint8/bytes with more specificly named typedefs and replace a few magic numbers.
2008-07-25 10:00:03 +00:00
rubidium
cde65455ac
(svn r13731) -Codechange: make a pool of the array of players.
2008-07-18 16:40:29 +00:00
peter1138
0a41936df8
(svn r13388) -Codechange: Remove "my invented flag for something that is a wagon"
2008-06-05 12:08:20 +00:00
peter1138
7f8d9148b8
(svn r13331) -Fix (r12924): Wrong include type for (sdt::)map
2008-05-29 17:54:02 +00:00
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
2008-05-29 15:13:28 +00:00
peter1138
1272c55991
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
2008-05-27 12:24:23 +00:00
rubidium
d289464d69
(svn r13255) -Codechange: move _opt to _settings.
2008-05-25 22:36:44 +00:00
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00
smatz
23b9852480
(svn r13168) -Fix (r13072): forgot to 'fix' EngList_SortPartial() together with EngList_Sort()
2008-05-18 20:01:54 +00:00
rubidium
373343cef6
(svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls.
2008-05-15 13:39:36 +00:00
smatz
c90cda6c1c
(svn r13089) -Fix (r13072): MorphOS compilation was broken
2008-05-14 18:27:39 +00:00
smatz
e4dee736c5
(svn r13086) -Fix: do not crash badly after loading a newgrf with engines in-game that often
2008-05-14 15:29:48 +00:00
smatz
f92a48c24b
(svn r13077) -Codechange: move function that updates cached num_engines to engine.cpp, make it run only 1 loop
2008-05-13 21:36:09 +00:00
smatz
3670a25e3a
(svn r13072) -Fix (r12995): possible out-of-bounds access
2008-05-13 18:39:15 +00:00
rubidium
5d7851e8d6
(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
2008-05-13 10:17:04 +00:00
smatz
8a422e34df
(svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT
2008-05-07 18:31:29 +00:00
rubidium
1ce0b03bf0
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
2008-05-06 15:11:33 +00:00
peter1138
45034bc522
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
2008-04-29 21:31:29 +00:00
rubidium
d56827a9a9
(svn r12855) -Codechange: do not use autoptr's for testing whether certain objects can be build, but check it directly in the pool so we do not have to call destructors in the testing phase. Stations still use the autoptr though.
2008-04-23 20:56:08 +00:00
smatz
76eaed68a0
(svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining
2008-04-06 23:49:45 +00:00
rubidium
df1d9bd880
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
2008-03-31 00:17:39 +00:00
rubidium
2426f5342f
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
2008-03-28 08:53:36 +00:00
smatz
de8c95506b
(svn r12244) -Fix (r12150): typo resulting in no players are given the engine preview offer
2008-02-25 02:09:04 +00:00
smatz
55b0146498
(svn r12150) -Fix (r12143): compiler warnings - possible use of uninitialised variable
2008-02-15 21:05:46 +00:00
peter1138
359771c406
(svn r12143) -Fix (r8038): Engine::preview_player does not contain a Player ID. Rename this to preview_player_rank and change back to a uint8 to avoid confusion.
2008-02-15 11:02:50 +00:00
frosch
9e05e0ea01
(svn r12084) -Fix: 'Early retirement'-properties are signed.
2008-02-08 15:34:54 +00:00
peter1138
71b0d5f091
(svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types...
2008-02-04 11:28:12 +00:00
peter1138
f8255e10d5
(svn r11971) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops
2008-01-24 10:47:44 +00:00
peter1138
7ef297187e
(svn r11970) -Cleanup: Remove old comment
2008-01-24 10:41:12 +00:00
bjarni
48c2669185
(svn r11872) -Fix (r9874): EngineHasReplacementForPlayer() didn't look in ALL_GROUP
2008-01-16 01:27:24 +00:00
rubidium
9c0c798dd8
(svn r11834) -Codechange: only include settings_type.h if needed.
2008-01-13 14:37:30 +00:00
rubidium
fafab82a31
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
2008-01-13 13:36:01 +00:00
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
peter1138
0f7392bd61
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
...
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
peter1138
0ae26a0312
(svn r11789) -Codechange: coding style for global variable names
2008-01-09 10:15:20 +00:00
rubidium
285a4a106f
(svn r11788) -Fix (11787): makedepend doesn't mark delete files as changed...
2008-01-09 09:57:48 +00:00
peter1138
1cabc8eb63
(svn r11784) -Codechange: set up initial engine data in one place
2008-01-08 18:25:51 +00:00
peter1138
7a5c529db4
(svn r11783) -Codechange: compare engine type with its type property, not by its index
2008-01-08 18:16:26 +00:00
rubidium
b09d957f31
(svn r11777) -Codechange: split the string header and make do not include it when it's not necessary.
2008-01-07 14:23:25 +00:00
rubidium
e2f7ec1d3e
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
2008-01-07 09:19:53 +00:00
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
81bf9f8503
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
2007-12-25 11:26:07 +00:00
rubidium
1f6043458c
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
2007-12-22 23:30:28 +00:00
rubidium
766551b0bc
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
8427b8bad2
(svn r11675) -Codechange: split the string types from the string functions.
2007-12-21 19:49:27 +00:00
skidd13
3ae50673a3
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
2007-11-20 13:35:54 +00:00
skidd13
c0a2c0c23e
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
rubidium
c1d167ae14
(svn r10757) -Codechange: make the engine renew struct use the pool item class as super class.
2007-08-02 22:32:47 +00:00
rubidium
13692798e6
(svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf.
2007-07-14 23:10:27 +00:00
peter1138
cd0e022172
(svn r10364) -Fix [FS#706]: checking for duplicate custom names was inconsistent, and tested all 'namespaces'. now only check names of the same type.
2007-06-27 20:53:25 +00:00
rubidium
773a7c9cb6
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
3ccc83e640
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
rubidium
7ec428fe7e
(svn r9918) -Fix: the available roadtypes/railtypes were not updated on GRF updates.
2007-05-25 08:47:40 +00:00
rubidium
21546a66f3
(svn r9917) -Codechange: prepare some more areas for more road types.
2007-05-25 08:13:01 +00:00
rubidium
8f0f090c51
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
2007-05-19 09:40:18 +00:00
peter1138
f7ccb6e31e
(svn r9825) -Codechange: [NewGRF] Add support for early vehicle retirement.
2007-05-10 23:10:23 +00:00
peter1138
0eb9621096
(svn r9718) -Fix: Don't allow building of rail vehicles whose railtype isn't available yet. This also affects the rail purchase window.
2007-04-26 07:24:19 +00:00
bjarni
809888fa21
(svn r9688) -Codechange: Created a function to get default cargo type for a cargo type
2007-04-20 16:56:55 +00:00
belugas
097b3b3c7b
(svn r9662) -Documentation: Doxygen corrections and @file omissions
2007-04-17 20:23:13 +00:00
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
2007-03-08 16:27:54 +00:00
rubidium
4169bfba06
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
rubidium
356c2e2c90
(svn r9001) -Codechange: remove duplication of functions and strings with respect to the news of new vehicles.
2007-03-03 22:03:15 +00:00
maedhros
b9e079cff3
(svn r8944) -Codechange: Move the enum describing the bitmask of Engine.flags to engine.h and give the enum values better names.
2007-02-28 17:06:22 +00:00
belugas
0f090a0c1d
(svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
...
Some documentation addition, when i can easily supply them
2007-02-23 18:55:07 +00:00
tron
ced80aadaa
(svn r8660) -Fix
...
-Codechange: Remove _avail_aircraft
Its name is misleading. It is rather _avail_airports, but then only some of them, which leads to inconsistencies when using it.
Further it is unnecessary to store it in savegams.
2007-02-10 08:19:39 +00:00
bjarni
f626458af7
(svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
...
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
2007-02-06 11:11:12 +00:00
belugas
e8af755d7f
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
...
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
2007-01-30 11:53:35 +00:00
Darkvater
2ff4492abc
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
2007-01-27 12:29:55 +00:00
tron
044f395b7b
(svn r8410) -Fix
...
-Fix: Fix an out of bounds array access when assigning the engine type in the _engine array
This usually hits the _engine_name_strings array and causes an invalid StringID, though it depends on the compiler which data structure gets placed after the _engines array.
Most probably this was exposed by removing railtype from Engine, which changed the size of this struct.
2007-01-26 07:50:34 +00:00
tron
7fffe8b3d4
(svn r8385) -Fix
...
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
2007-01-24 07:14:09 +00:00
tron
3d5acc1450
(svn r8314) -Fix
...
-Codechange: Move the railtype from EngineInfo to RailVehicleInfo, because having a railtype for non-rail vehicles isn't that useful
2007-01-21 16:08:18 +00:00
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00