summaryrefslogtreecommitdiff
path: root/rail_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-16 09:13:04 +0000
committertron <tron@openttd.org>2005-10-16 09:13:04 +0000
commit66bf4f863dc4e98a16772f661f6b3e214c3d92f1 (patch)
tree3d8e77c53a48b7cf354777fe120740126f2a7615 /rail_gui.c
parentab657338ec74150e083f2b04a2c3975e1546ad13 (diff)
downloadopenttd-66bf4f863dc4e98a16772f661f6b3e214c3d92f1.tar.xz
(svn r3049) Replace byte/int/uint by RailType where appropriate
Diffstat (limited to 'rail_gui.c')
-rw-r--r--rail_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rail_gui.c b/rail_gui.c
index a541ff789..e3f929ec2 100644
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -21,7 +21,7 @@
#include "debug.h"
#include "variables.h"
-static uint _cur_railtype;
+static RailType _cur_railtype;
static bool _remove_button_clicked;
static byte _build_depot_direction;
static byte _waypoint_count=1;
@@ -539,7 +539,7 @@ typedef enum {
* @param railtype the railtype to display
* @param w the window to modify
*/
-static void SetupRailToolbar(uint16 railtype, Window *w)
+static void SetupRailToolbar(RailType railtype, Window *w)
{
const RailtypeInfo *rti = GetRailTypeInfo(railtype);
@@ -555,7 +555,7 @@ static void SetupRailToolbar(uint16 railtype, Window *w)
w->widget[RTW_BUILD_TUNNEL].unkA = rti->gui_sprites.build_tunnel;
}
-void ShowBuildRailToolbar(int index, int button)
+void ShowBuildRailToolbar(RailType railtype, int button)
{
Window *w;
@@ -564,9 +564,9 @@ void ShowBuildRailToolbar(int index, int button)
// don't recreate the window if we're clicking on a button and the window exists.
if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) {
DeleteWindowById(WC_BUILD_TOOLBAR, 0);
- _cur_railtype = (byte)index;
+ _cur_railtype = railtype;
w = AllocateWindowDesc(&_build_rail_desc);
- SetupRailToolbar( (byte) index, w);
+ SetupRailToolbar(railtype, w);
}
_remove_button_clicked = false;
@@ -763,7 +763,7 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e)
{
switch(e->event) {
case WE_PAINT: {
- int r;
+ RailType r;
w->click_state = (1 << 3) << _build_depot_direction;
DrawWindowWidgets(w);