summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
AgeCommit message (Collapse)Author
2007-02-07(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that ↵bjarni
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-06(svn r8610) -Codechange/Feature: rewrote the list handling in the ↵bjarni
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-01(svn r8511) -Codechange: make WindowClass an enumerated value.rubidium
2007-01-30(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI ↵peter1138
code, as 1 mph == 1.6 km/h is too far out for some people.
2007-01-30(svn r8460) -Fix (r8455): the build train window put locomotives and wagons ↵bjarni
in appeantly random order
2007-01-30(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member ↵belugas
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-24(svn r8390) -Codechange (r8384): Rewrote ResizeButtons()bjarni
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(svn r8385) -Fixtron
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
2007-01-24(svn r8384) -Codechange: [GUI] instead of writing a resize button function ↵bjarni
for each window, a global ResizeButtons() is added
2007-01-23(svn r8381) -Fix (r8377): [build vehicle window] cleaned up the train ↵bjarni
refitable detection. It had two variables doing the same thing, but not always set to the same (oops)
2007-01-23(svn r8379) -Cleanup: [build vehicle window] removed overloading with ↵bjarni
DrawVehiclePurchaseInfo() and renamed them into type specific names
2007-01-23(svn r8378) -Fix (r8331): [build vehicle window] extended the widget with ↵bjarni
the details with one line since some newgrf trains needs it
2007-01-23(svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now ↵bjarni
only add "(refitable)" if the engine in question is refitable
2007-01-23(svn r8364) -Codechange (r8362): added an assert to catch conditions where a ↵bjarni
request wants to draw more vehicles than the list contains
2007-01-22(svn r8362) -Codechange: [vehicle build window] moved the engine drawing ↵bjarni
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(svn r8343) -Cleanup: [build vehicle windows] added a few comments and ↵bjarni
removed two switch-cases, that we can do without
2007-01-22(svn r8339) -Fix(r8331): MSVC seems to be a little more strict (or less ↵belugas
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(svn r8338) -Codechange: merged road vehicle build window into the other onesbjarni
Note: now all build vehicle windows are merged into build_vehicle_gui.cpp
2007-01-22(svn r8337) -Cleanup: removed some more switch-cases in ↵bjarni
build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead
2007-01-22(svn r8336) -Codechange: added function to translate vehicle types to ↵bjarni
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(svn r8335) -Feature: the build ship window is now also resizable ↵bjarni
horizontally and contains sorting options -Codechange: the build ship window is merged into build_vehicle_gui.cpp
2007-01-21(svn r8334) -Fix (r8331): build window buttons now both resize as intendedbjarni
2007-01-21(svn r8333) -Codechange: when invalidating a build window list, set a flag ↵bjarni
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(svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() ↵bjarni
from build_vehicle_gui.cpp to aircraft_gui.cpp
2007-01-21(svn r8331) -Feature: the train and aircraft build windows are now resizable ↵bjarni
in horizontal direction as well -Codechange: merged train and aircraft build window code
2007-01-14(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit ↵peter1138
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-10(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, ↵rubidium
stillunknown and pv2b.
2007-01-10(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files ↵KUDr
renamed to .cpp)