rubidium
b0ac283aec
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
2008-01-07 00:57:19 +00:00
bjarni
6196fa01ab
(svn r11710) -Feature: [build vehicles windows] added sorting for cost, running costs and speed to road vehicles and ships build windows
2007-12-27 15:47:08 +00:00
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
429521a7d1
(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
8f0e68285b
(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
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
2007-12-21 19:49:27 +00:00
rubidium
d582aea639
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
2007-12-19 20:45:46 +00:00
rubidium
8896bea306
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
2007-12-19 19:44:29 +00:00
rubidium
527b72749d
(svn r11555) -Codechange: use the new members introduced in r11551.
2007-12-02 14:29:48 +00:00
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
belugas
56e6282f2f
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
...
Patch heavily based on BiBB's work (FS#1383)
2007-11-04 00:08:57 +00:00
rubidium
8212088c03
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
2007-10-20 14:51:09 +00:00
glx
8e5480aa16
(svn r11214) -Fix [FS#1296]: planes can't use heliports so refuse these orders
2007-10-05 22:13:35 +00:00
rubidium
257fdb38e6
(svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes.
2007-09-17 04:23:03 +00:00
rubidium
ac838de385
(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
2007-08-27 21:33:26 +00:00
rubidium
c4613280d1
(svn r10731) -Codechange: allow smaller initial "build <vehicle type>" windows.
2007-07-29 22:58:59 +00:00
rubidium
c03cb2c8db
(svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size.
2007-07-27 12:49:04 +00:00
peter1138
306c21d6c9
(svn r10603) -Codechange: avoid direct access to _engine_info
2007-07-17 06:56:09 +00:00
rubidium
7aec26887c
(svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf.
2007-07-14 23:10:27 +00:00
truelight
a757ed52fd
(svn r10552) -Fix [FS#1034, r10546]: opening Available Aircrafts segfaulted
2007-07-13 19:06:12 +00:00
truelight
a84dcf7682
(svn r10546) -Fix [FS#1026]: you can now have both Available Train as Available Ship window open
2007-07-13 14:51:55 +00:00
peter1138
d69589b3c2
(svn r10324) -Codechange: reference engine names by index
2007-06-25 14:46:32 +00:00
truelight
6159f58948
(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action
2007-06-22 10:57:53 +00:00
rubidium
9c0944aa09
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
2007-06-21 17:25:17 +00:00
rubidium
eb1472a82d
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
2007-06-21 14:54:51 +00:00
rubidium
f806b46cc9
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
2007-06-21 14:32:27 +00:00
bjarni
532391db12
(svn r10025) -Fix: [build windows] sorting planes for capacity didn't check mail capacity. Now mail capacity is used if passenger capacity is the same
...
The sort will still resort to EngineID if both mail and passenger capacities are the same
2007-06-02 15:47:38 +00:00
bjarni
81698422a2
(svn r10024) -Feature: [build windows] trains, road vehicles and ships can now be sorted by cargo capacity (planes already had this option)
2007-06-02 15:41:37 +00:00
maedhros
ab8503f5a5
(svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own.
2007-06-01 11:41:02 +00:00
rubidium
0819f3a9a0
(svn r9917) -Codechange: prepare some more areas for more road types.
2007-05-25 08:13:01 +00:00
rubidium
7d4be11516
(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
rubidium
ba24c34f85
(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.
2007-05-18 17:31:41 +00:00
peter1138
1d5135830a
(svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains.
2007-05-12 07:05:34 +00:00
peter1138
bc7d762196
(svn r9809) -Codechange: [NewGRF] Add callback 36 properties to purchase lists and add running cost changing for ships.
2007-05-07 16:38:21 +00:00
peter1138
4591fb5b0d
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
2007-05-07 13:26:10 +00:00
peter1138
1052b0e8f1
(svn r9703) -Codechange: support callback 36 in vehicle purchase lists
2007-04-20 21:42:06 +00:00
rubidium
80c259f64f
(svn r9672) -Cleanup: lots of coding style fixes around operands.
2007-04-18 22:10:36 +00:00
maedhros
c25d539543
(svn r9476) -Codechange: Make build windows for all vehicle types the same width.
2007-03-26 12:28:44 +00:00
maedhros
cdf74ca0c9
(svn r9475) -Codechange: Allow the purchase details widget to expand dynamically if there's still not enough room for the text.
2007-03-26 11:41:14 +00:00
maedhros
d2bd12d52e
(svn r9474) -Fix (r8378): Expand the details widget in the vehicle build windows again to make room for all the text.
2007-03-26 08:55:45 +00:00
rubidium
ce919e8c71
(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
bjarni
f61f1962c5
(svn r9040) -Codechange: the build window and CmdBuildAircraft() now shares the code to figure out if an aircraft is buildable in the hangar in question
...
This should help ensuring that the build command and the list are consistent in what aircraft are buildable
2007-03-06 22:11:58 +00:00
celestar
f621608f7d
(svn r8973) -Feature/Codechange: Changed the internal unit for aircraft velocities to from 8mph to 1km/h (peter1138), also give aircraft realsitic velocities (so that 1km/h is 1km/h independent of vehicle type) (peter1138). Introduce a flag to reduce aircraft speed in holding patterns to some realistic velocity. Use this flag for the city airport for the time being and make use of the different entry points for this airport type.
2007-03-02 12:01:24 +00:00
belugas
6d199fcdb7
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
2007-02-23 11:50:43 +00:00
peter1138
ef2daa5060
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
2007-02-20 22:09:21 +00:00
tron
41d526415c
(svn r8822) -Fix
...
Variable scope, const
2007-02-20 06:39:09 +00:00
bjarni
853cc54ec6
(svn r8787) -Change r8771: allow fast aircraft in small airports
...
We should keep the list in sync with the build command as hacked clients can avoid a block in the GUI only
2007-02-17 18:38:35 +00:00
bjarni
f731d7ffc4
(svn r8783) -Fix r8771: aircraft vehicle subtype and aircraft engine subtype aren't the same (even though they both tell if it's a plane or helicopter)
2007-02-17 16:07:45 +00:00
bjarni
222aebc5dd
(svn r8771) -Fix r8343: build aircraft windows will no longer show aircraft that can't use the airport in question
...
Now it's even better than ever because unless the no jetcrash cheat is enabled, the small airports will not show fast aircraft
2007-02-17 12:45:15 +00:00
tron
87e03c7aa8
(svn r8755) -Fix
...
Abbreviate GetAirport(st->airport_type) to st->Airport()
2007-02-16 09:38:43 +00:00
bjarni
6460d5b441
(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
2007-02-15 20:58:45 +00:00
tron
5231f5669d
(svn r8747) -Fix
...
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
2007-02-15 20:16:33 +00:00
bjarni
8675b8ec7d
(svn r8746) -Regression r8331: build train window could sort incorrectly by EngineID with certain newGRF sets
2007-02-15 17:51:39 +00:00
bjarni
037d636734
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
...
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
2007-02-07 19:10:19 +00:00
bjarni
80125fd934
(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
rubidium
c8882bd3d2
(svn r8511) -Codechange: make WindowClass an enumerated value.
2007-02-01 15:49:12 +00:00
peter1138
8933ffd9ac
(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI code, as 1 mph == 1.6 km/h is too far out for some people.
2007-01-30 21:10:04 +00:00
bjarni
be19961f1e
(svn r8460) -Fix (r8455): the build train window put locomotives and wagons in appeantly random order
2007-01-30 17:19:58 +00:00
belugas
0c45071bb0
(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
bjarni
8c098db7a8
(svn r8390) -Codechange (r8384): Rewrote ResizeButtons()
...
Now it only works on first and last widget to resize
It now works with offsets correctly (no longer assumes the left is 0)
It's no longer needed to have a widget right of the ones you resize
Can handle any number of widgets
2007-01-24 14:32:20 +00:00
tron
0996de79df
(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
bjarni
e2f72cbf1f
(svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added
2007-01-24 02:36:55 +00:00
bjarni
a73f67af40
(svn r8381) -Fix (r8377): [build vehicle window] cleaned up the train refitable detection. It had two variables doing the same thing, but not always set to the same (oops)
2007-01-23 21:24:26 +00:00
bjarni
9f31b897b6
(svn r8379) -Cleanup: [build vehicle window] removed overloading with DrawVehiclePurchaseInfo() and renamed them into type specific names
2007-01-23 20:55:04 +00:00
bjarni
9c6317a203
(svn r8378) -Fix (r8331): [build vehicle window] extended the widget with the details with one line since some newgrf trains needs it
2007-01-23 20:23:13 +00:00
bjarni
8d89ca48e1
(svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable
2007-01-23 20:01:04 +00:00
bjarni
8c3e4ead65
(svn r8364) -Codechange (r8362): added an assert to catch conditions where a request wants to draw more vehicles than the list contains
2007-01-23 01:00:56 +00:00
bjarni
a9a1fd8c20
(svn r8362) -Codechange: [vehicle build window] moved the engine drawing loop to a function of it's own
...
-Fix (r8335): [vehicle build window] ship sprites were moved two pixels to the left
2007-01-22 23:23:30 +00:00
bjarni
29a89e0a2f
(svn r8343) -Cleanup: [build vehicle windows] added a few comments and removed two switch-cases, that we can do without
2007-01-22 14:08:14 +00:00
belugas
ac9d926606
(svn r8339) -Fix(r8331): MSVC seems to be a little more strict (or less intelligent) then other compilers when it comes to operator precedence.
...
A copy of code from train_gui.cpp to build_vehicle_gui.cpp was not exactly the same.
The earlier version did not require parenthesis to specify correct operator precedence.
2007-01-22 02:59:50 +00:00
bjarni
6ccbfffbea
(svn r8338) -Codechange: merged road vehicle build window into the other ones
...
Note: now all build vehicle windows are merged into build_vehicle_gui.cpp
2007-01-22 02:09:51 +00:00
bjarni
cf0e5816d6
(svn r8337) -Cleanup: removed some more switch-cases in build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead
2007-01-22 01:35:53 +00:00
bjarni
8f4e2e8040
(svn r8336) -Codechange: added function to translate vehicle types to 0,1,2... for use for index to arrays
...
Used this function to get rid of some switch-cases in build_vehicle_gui.cpp
-Fix (r8335): ship build window didn't remember assending/decending sort setting
2007-01-22 01:13:10 +00:00
bjarni
14b2998023
(svn r8335) -Feature: the build ship window is now also resizable horizontally and contains sorting options
...
-Codechange: the build ship window is merged into build_vehicle_gui.cpp
2007-01-22 00:26:46 +00:00
bjarni
1f32ce7e89
(svn r8334) -Fix (r8331): build window buttons now both resize as intended
2007-01-21 23:24:25 +00:00
bjarni
4bb18a450c
(svn r8333) -Codechange: when invalidating a build window list, set a flag instead of rebuilding the list and then rebuild it the next time it's redrawn
...
This should save CPU time in the (maybe unlikely) event that the list is invalidated more than once between two redraws
2007-01-21 23:13:46 +00:00
bjarni
d82ae7427d
(svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp
2007-01-21 22:57:52 +00:00
bjarni
b60e5c17cd
(svn r8331) -Feature: the train and aircraft build windows are now resizable in horizontal direction as well
...
-Codechange: merged train and aircraft build window code
2007-01-21 22:50:43 +00:00
peter1138
92d418b031
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
2007-01-14 19:57:49 +00:00
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00