Commit Graph

2033 Commits (jgrpp)

Author SHA1 Message Date
rubidium af3001b988 (svn r8700) -Fix (8698): replaced a magic number with the wrong enum :( 18 years ago
rubidium eb5648f382 (svn r8698) -Codechange: enumify the returns of VehicleEnterTile 18 years ago
rubidium a419f4aeda (svn r8698) -Codechange: enumify the returns of VehicleEnterTile 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
tron cf5514ce8d (svn r8550) -Fix
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
18 years ago
tron c326ff3795 (svn r8550) -Fix
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
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
peter1138 45654f8be0 (svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers... 18 years ago
peter1138 60ddc05925 (svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers... 18 years ago
tron 9ccb6ddd71 (svn r8430) -Fix
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
18 years ago
tron 430e64c848 (svn r8430) -Fix
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
18 years ago
tron fdee057baf (svn r8393) -Fix
-Codechange: CheckCompatibleRail() is only called for tiles which are known to contain a piece of rail. Simplify the function accordingly by eliminating unnecessary checks.
-Fix (?): Also fix an inconsistency in deciding what a compatible rail type is between level crossings and other rail tiles. It is unknown if this caused any problems.
18 years ago
tron 18effde565 (svn r8393) -Fix
-Codechange: CheckCompatibleRail() is only called for tiles which are known to contain a piece of rail. Simplify the function accordingly by eliminating unnecessary checks.
-Fix (?): Also fix an inconsistency in deciding what a compatible rail type is between level crossings and other rail tiles. It is unknown if this caused any problems.
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
tron 5438336102 (svn r8320) -Fix
Simplify TrainPowerChanged() somewhat by eleminating code duplication
18 years ago
tron fb8b0557f9 (svn r8320) -Fix
Simplify TrainPowerChanged() somewhat by eleminating code duplication
18 years ago
tron 81e88a2a7c (svn r8276) -Fix
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
18 years ago
tron b2def96248 (svn r8276) -Fix
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
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
KUDr 92e42d621d (svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue. 18 years ago
KUDr 9bfb3f08d9 (svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue. 18 years ago
celestar c56ee62ade (svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation 18 years ago
celestar 1691b2da61 (svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation 18 years ago
celestar 08de6b082a (svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max(). 18 years ago
celestar 2ac0410767 (svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max(). 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