--- a/roadveh_gui.c Mon Sep 26 20:32:13 2005 +0000
+++ b/roadveh_gui.c Tue Sep 27 18:51:04 2005 +0000
@@ -886,8 +886,8 @@
static void PlayerRoadVehWndProc(Window *w, WindowEvent *e)
{
- int station = (int)w->window_number >> 16;
- int owner = w->window_number & 0xff;
+ StationID station = GB(w->window_number, 16, 16);
+ PlayerID owner = GB(w->window_number, 0, 8);
vehiclelist_d *vl = &WP(w, vehiclelist_d);
switch(e->event) {
@@ -909,7 +909,7 @@
/* draw the widgets */
{
const Player *p = GetPlayer(owner);
- if (station == -1) {
+ if (station == INVALID_STATION) {
/* Company Name -- (###) Road vehicles */
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
@@ -1079,7 +1079,7 @@
};
-void ShowPlayerRoadVehicles(int player, int station)
+void ShowPlayerRoadVehicles(PlayerID player, StationID station)
{
Window *w;