summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-16 16:22:23 +0000
committeralberth <alberth@openttd.org>2009-07-16 16:22:23 +0000
commitd0a47fc1b417d697175b751d3236f66c4e325e91 (patch)
tree13681f47fc388cc4b331c11eca22c08c1b06fe83 /src/vehicle_gui.cpp
parent3cba03c5eb540f3a29aee96a6d8426ab297aed9d (diff)
downloadopenttd-d0a47fc1b417d697175b751d3236f66c4e325e91.tar.xz
(svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index a4fcf8811..1fcd3bb5a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -414,7 +414,7 @@ struct RefitWindow : public Window {
virtual void OnResize(Point delta)
{
this->vscroll.cap += delta.y / (int)this->resize.step_height;
- this->widget[VRW_MATRIX].data = (this->vscroll.cap << 8) + 1;
+ this->widget[VRW_MATRIX].data = (this->vscroll.cap << MAT_ROW_START) + (1 << MAT_COL_START);
}
};
@@ -967,7 +967,7 @@ struct VehicleListWindow : public BaseVehicleListWindow {
}
- this->widget[VLW_WIDGET_LIST].data = (this->vscroll.cap << 8) + 1;
+ this->widget[VLW_WIDGET_LIST].data = (this->vscroll.cap << MAT_ROW_START) + (1 << MAT_COL_START);
/* Set up sorting. Make the window-specific _sorting variable
* point to the correct global _sorting struct so we are freed
@@ -1184,7 +1184,7 @@ struct VehicleListWindow : public BaseVehicleListWindow {
virtual void OnResize(Point delta)
{
this->vscroll.cap += delta.y / (int)this->resize.step_height;
- this->widget[VLW_WIDGET_LIST].data = (this->vscroll.cap << 8) + 1;
+ this->widget[VLW_WIDGET_LIST].data = (this->vscroll.cap << MAT_ROW_START) + (1 << MAT_COL_START);
}
virtual void OnInvalidateData(int data)
@@ -1399,7 +1399,7 @@ struct VehicleDetailsWindow : Window {
this->widget[VLD_WIDGET_MIDDLE_DETAILS].right += 12;
}
- this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << 8) + 1;
+ this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << MAT_ROW_START) + (1 << MAT_COL_START);
this->owner = v->owner;
this->tab = TDW_TAB_CARGO;
@@ -1603,7 +1603,7 @@ struct VehicleDetailsWindow : Window {
if (delta.y == 0) return;
this->vscroll.cap += delta.y / 14;
- this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << 8) + 1;
+ this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << MAT_ROW_START) + (1 << MAT_COL_START);
}
};