1
0
Fork 0

(svn r1326) fixed compiler warnings in vehicle_gui.c and widget.c

release/0.4.5
bjarni 2005-01-02 22:28:56 +00:00
parent efc2702491
commit 6a6cbdd9b4
2 changed files with 43 additions and 41 deletions

View File

@ -526,7 +526,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
byte cargo;
EngineInfo *info;
if ( selected_id[0] >= ROAD_ENGINES_INDEX && selected_id[0] <= SHIP_ENGINES_INDEX )
if ( selected_id[0] >= ROAD_ENGINES_INDEX && selected_id[0] <= SHIP_ENGINES_INDEX ) {
cargo = RoadVehInfo(selected_id[0])->cargo_type;
do {
@ -549,7 +549,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
sel[0]--;
}
} while (++engine_id, ++e,--num);
}
break;
}
@ -563,7 +563,6 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
if ( selected_id[0] != -1 ) {
cargo = ShipVehInfo(selected_id[0])->cargo_type;
refittable = ShipVehInfo(selected_id[0])->refittable;
}
do {
info = &_engine_info[engine_id];
@ -586,6 +585,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
sel[0]--;
}
} while (++engine_id, ++e,--num);
}
break;
} //end of ship
@ -933,6 +933,7 @@ void ShowReplaceVehicleWindow(byte vehicletype)
w->vscroll.cap = 4;
WP(w,replaceveh_d).line_height = 24;
break;
default: return;
}
WP(w,replaceveh_d).vehicletype = vehicletype;
w->vscroll2.cap = w->vscroll.cap; // these two are always the same

View File

@ -76,6 +76,7 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
pos = x;
sb = &w->hscroll;
}
default: return; //this should never happen
}
if (pos <= mi+9) {
// Pressing the upper button?