|
|
@ -20,6 +20,7 @@
|
|
|
|
#include "viewport.h"
|
|
|
|
#include "viewport.h"
|
|
|
|
#include "player.h"
|
|
|
|
#include "player.h"
|
|
|
|
#include "depot.h"
|
|
|
|
#include "depot.h"
|
|
|
|
|
|
|
|
#include "airport.h"
|
|
|
|
#include "vehicle_gui.h"
|
|
|
|
#include "vehicle_gui.h"
|
|
|
|
#include "newgrf_engine.h"
|
|
|
|
#include "newgrf_engine.h"
|
|
|
|
|
|
|
|
|
|
|
@ -117,10 +118,13 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
|
|
|
|
int count = 0;
|
|
|
|
int count = 0;
|
|
|
|
int num = NUM_AIRCRAFT_ENGINES;
|
|
|
|
int num = NUM_AIRCRAFT_ENGINES;
|
|
|
|
const Engine* e = GetEngine(AIRCRAFT_ENGINES_INDEX);
|
|
|
|
const Engine* e = GetEngine(AIRCRAFT_ENGINES_INDEX);
|
|
|
|
|
|
|
|
EngineID engine_id = AIRCRAFT_ENGINES_INDEX;
|
|
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
if (HASBIT(e->player_avail, _local_player)) count++;
|
|
|
|
if (HASBIT(e->player_avail, _local_player) &&
|
|
|
|
} while (++e,--num);
|
|
|
|
!( (GetAirport(GetStationByTile(w->window_number)->airport_type)->acc_planes == HELICOPTERS_ONLY) &&
|
|
|
|
|
|
|
|
(AircraftVehInfo(engine_id)->subtype & AIR_CTOL) ) ) count++;
|
|
|
|
|
|
|
|
} while (++engine_id, ++e,--num);
|
|
|
|
SetVScrollCount(w, count);
|
|
|
|
SetVScrollCount(w, count);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -137,7 +141,9 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
|
|
|
|
EngineID selected_id = INVALID_ENGINE;
|
|
|
|
EngineID selected_id = INVALID_ENGINE;
|
|
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
if (HASBIT(e->player_avail, _local_player)) {
|
|
|
|
if (HASBIT(e->player_avail, _local_player) &&
|
|
|
|
|
|
|
|
!( (GetAirport(GetStationByTile(w->window_number)->airport_type)->acc_planes == HELICOPTERS_ONLY) &&
|
|
|
|
|
|
|
|
(AircraftVehInfo(engine_id)->subtype & AIR_CTOL) ) ) {
|
|
|
|
if (sel==0) selected_id = engine_id;
|
|
|
|
if (sel==0) selected_id = engine_id;
|
|
|
|
if (IS_INT_INSIDE(--pos, -w->vscroll.cap, 0)) {
|
|
|
|
if (IS_INT_INSIDE(--pos, -w->vscroll.cap, 0)) {
|
|
|
|
DrawString(x+62, y+7, GetCustomEngineName(engine_id), sel==0 ? 0xC : 0x10);
|
|
|
|
DrawString(x+62, y+7, GetCustomEngineName(engine_id), sel==0 ? 0xC : 0x10);
|
|
|
|