Commit Graph

786 Commits (c8817d7f4e10c79aaf3d6e34e50a9cbdc3feefe0)

Author SHA1 Message Date
maedhros 822ce5661d (svn r9475) -Codechange: Allow the purchase details widget to expand dynamically if there's still not enough room for the text. 18 years ago
maedhros cdf74ca0c9 (svn r9475) -Codechange: Allow the purchase details widget to expand dynamically if there's still not enough room for the text. 18 years ago
maedhros 9339c954e1 (svn r9474) -Fix (r8378): Expand the details widget in the vehicle build windows again to make room for all the text. 18 years ago
maedhros d2bd12d52e (svn r9474) -Fix (r8378): Expand the details widget in the vehicle build windows again to make room for all the text. 18 years ago
rubidium 36cea84b11 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
rubidium ce919e8c71 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
bjarni 13c72c07d6 (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
18 years ago
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
18 years ago
celestar 5828617a07 (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. 18 years ago
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. 18 years ago
belugas 4160d85cd2 (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style. 18 years ago
belugas 6d199fcdb7 (svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style. 18 years ago
peter1138 3d581f4f89 (svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels. 18 years ago
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. 18 years ago
tron 27f48c5dda (svn r8822) -Fix
Variable scope, const
18 years ago
tron 41d526415c (svn r8822) -Fix
Variable scope, const
18 years ago
bjarni da422574ad (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
18 years ago
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
18 years ago
bjarni 8175371eee (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) 18 years ago
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) 18 years ago
bjarni 6bbe135446 (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
18 years ago
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
18 years ago
tron 128caa5050 (svn r8755) -Fix
Abbreviate GetAirport(st->airport_type) to st->Airport()
18 years ago
tron 87e03c7aa8 (svn r8755) -Fix
Abbreviate GetAirport(st->airport_type) to st->Airport()
18 years ago
bjarni a7c92492df (svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game 18 years ago
bjarni 6460d5b441 (svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game 18 years ago
tron 16df378623 (svn r8747) -Fix
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
18 years ago
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
18 years ago
bjarni ab08096aab (svn r8746) -Regression r8331: build train window could sort incorrectly by EngineID with certain newGRF sets 18 years ago
bjarni 8675b8ec7d (svn r8746) -Regression r8331: build train window could sort incorrectly by EngineID with certain newGRF sets 18 years ago
bjarni d40886903d (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
18 years ago
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
18 years ago
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
18 years ago
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
18 years ago
rubidium 2a9851a3ad (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago
rubidium c8882bd3d2 (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago
peter1138 4438b99ae4 (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. 18 years ago
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. 18 years ago
bjarni a97d87be9a (svn r8460) -Fix (r8455): the build train window put locomotives and wagons in appeantly random order 18 years ago
bjarni be19961f1e (svn r8460) -Fix (r8455): the build train window put locomotives and wagons in appeantly random order 18 years ago
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.
18 years ago
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.
18 years ago
bjarni 058df1b99f (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
18 years ago
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
18 years ago
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.
18 years ago
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.
18 years ago
bjarni 4dd0d007b1 (svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added 18 years ago
bjarni e2f72cbf1f (svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added 18 years ago
bjarni e40723568a (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) 18 years ago
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) 18 years ago
bjarni ff2ce417a3 (svn r8379) -Cleanup: [build vehicle window] removed overloading with DrawVehiclePurchaseInfo() and renamed them into type specific names 18 years ago
bjarni 9f31b897b6 (svn r8379) -Cleanup: [build vehicle window] removed overloading with DrawVehiclePurchaseInfo() and renamed them into type specific names 18 years ago
bjarni 116cbcedb1 (svn r8378) -Fix (r8331): [build vehicle window] extended the widget with the details with one line since some newgrf trains needs it 18 years ago
bjarni 9c6317a203 (svn r8378) -Fix (r8331): [build vehicle window] extended the widget with the details with one line since some newgrf trains needs it 18 years ago
bjarni 5a47d11689 (svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable 18 years ago
bjarni 8d89ca48e1 (svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable 18 years ago
bjarni aa2b69262b (svn r8364) -Codechange (r8362): added an assert to catch conditions where a request wants to draw more vehicles than the list contains 18 years ago
bjarni 8c3e4ead65 (svn r8364) -Codechange (r8362): added an assert to catch conditions where a request wants to draw more vehicles than the list contains 18 years ago
bjarni a6a65f6c3e (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
18 years ago
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
18 years ago
bjarni f19c84dc25 (svn r8343) -Cleanup: [build vehicle windows] added a few comments and removed two switch-cases, that we can do without 18 years ago
bjarni 29a89e0a2f (svn r8343) -Cleanup: [build vehicle windows] added a few comments and removed two switch-cases, that we can do without 18 years ago
belugas bfa5822bd8 (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.
18 years ago
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.
18 years ago
bjarni 71d22b2f5e (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
18 years ago
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
18 years ago
bjarni 09c9fe501f (svn r8337) -Cleanup: removed some more switch-cases in build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead 18 years ago
bjarni cf0e5816d6 (svn r8337) -Cleanup: removed some more switch-cases in build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead 18 years ago
bjarni be5f289275 (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
18 years ago
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
18 years ago
bjarni c39e513076 (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
18 years ago
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
18 years ago
bjarni e6e1334eb3 (svn r8334) -Fix (r8331): build window buttons now both resize as intended 18 years ago
bjarni 1f32ce7e89 (svn r8334) -Fix (r8331): build window buttons now both resize as intended 18 years ago
bjarni ade2af8ac6 (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
18 years ago
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
18 years ago
bjarni f87494587e (svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp 18 years ago
bjarni d82ae7427d (svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp 18 years ago
bjarni 884af9d856 (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
18 years ago
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
18 years ago
peter1138 ca9843424b (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.
18 years ago
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.
18 years ago
rubidium a7d0cdf95f (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr 07c30785ab (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago