From debb158c95f7a75f584501adf3311baa1150ee6d Mon Sep 17 00:00:00 2001 From: darkvater Date: Tue, 7 Sep 2004 23:41:09 +0000 Subject: (svn r180) -Fix: some more warning fixes for C99 (Tron) --- airport_movement.h | 432 ++++++++++++++++++++++++++--------------------------- economy.h | 18 +-- misc.c | 10 +- misc_gui.c | 16 +- rail_gui.c | 2 +- sdl.c | 2 +- settings.c | 256 ++++++++++++++++--------------- settings_gui.c | 150 +++++++++---------- unix.c | 20 +-- 9 files changed, 452 insertions(+), 454 deletions(-) diff --git a/airport_movement.h b/airport_movement.h index 69beafeee..31029197f 100644 --- a/airport_movement.h +++ b/airport_movement.h @@ -24,14 +24,14 @@ typedef struct AirportFTAbuildup { } AirportFTAbuildup; enum { - AMED_NOSPDCLAMP = 1<<0, - AMED_TAKEOFF = 1<<1, - AMED_SLOWTURN = 1<<2, - AMED_LAND = 1<<3, - AMED_EXACTPOS = 1<<4, - AMED_BRAKE = 1<<5, - AMED_HELI_RAISE = 1<<6, - AMED_HELI_LOWER = 1<<7, + AMED_NOSPDCLAMP = 1<<0, + AMED_TAKEOFF = 1<<1, + AMED_SLOWTURN = 1<<2, + AMED_LAND = 1<<3, + AMED_EXACTPOS = 1<<4, + AMED_BRAKE = 1<<5, + AMED_HELI_RAISE = 1<<6, + AMED_HELI_LOWER = 1<<7, }; enum {MAX_ELEMENTS = 255}; @@ -66,201 +66,201 @@ enum { ///////**********Movement Blocks on Airports*********************////// // blocks (eg_airport_flags) enum { - TERM1_block = 1 << 0, - TERM2_block = 1 << 1, - TERM3_block = 1 << 2, - TERM4_block = 1 << 3, - TERM5_block = 1 << 4, - TERM6_block = 1 << 5, - HELIPAD1_block = 1 << 6, - HELIPAD2_block = 1 << 7, - RUNWAY_IN_OUT_block = 1 << 8, - RUNWAY_IN_block = 1 << 8, - AIRPORT_BUSY_block = 1 << 8, - RUNWAY_OUT_block = 1 << 9, - TAXIWAY_BUSY_block = 1 << 10, - OUT_WAY_block = 1 << 11, - IN_WAY_block = 1 << 12, - AIRPORT_ENTRANCE_block = 1 << 13, - TERM_GROUP1_block = 1 << 14, - TERM_GROUP2_block = 1 << 15, - HANGAR2_AREA_block = 1 << 16, - TERM_GROUP2_ENTER1_block = 1 << 17, - TERM_GROUP2_ENTER2_block = 1 << 18, - TERM_GROUP2_EXIT1_block = 1 << 19, - TERM_GROUP2_EXIT2_block = 1 << 20, - PRE_HELIPAD_block = 1 << 21, - NOTHING_block = 1 << 30 + TERM1_block = 1 << 0, + TERM2_block = 1 << 1, + TERM3_block = 1 << 2, + TERM4_block = 1 << 3, + TERM5_block = 1 << 4, + TERM6_block = 1 << 5, + HELIPAD1_block = 1 << 6, + HELIPAD2_block = 1 << 7, + RUNWAY_IN_OUT_block = 1 << 8, + RUNWAY_IN_block = 1 << 8, + AIRPORT_BUSY_block = 1 << 8, + RUNWAY_OUT_block = 1 << 9, + TAXIWAY_BUSY_block = 1 << 10, + OUT_WAY_block = 1 << 11, + IN_WAY_block = 1 << 12, + AIRPORT_ENTRANCE_block = 1 << 13, + TERM_GROUP1_block = 1 << 14, + TERM_GROUP2_block = 1 << 15, + HANGAR2_AREA_block = 1 << 16, + TERM_GROUP2_ENTER1_block = 1 << 17, + TERM_GROUP2_ENTER2_block = 1 << 18, + TERM_GROUP2_EXIT1_block = 1 << 19, + TERM_GROUP2_EXIT2_block = 1 << 20, + PRE_HELIPAD_block = 1 << 21, + NOTHING_block = 1 << 30 }; /////////////////////////////////////////////////////////////////////// /////*********Movement Positions on Airports********************/////// // Country Airfield (small) 4x3 static const AirportMovingData _airport_moving_data_country[22] = { - {53,3,AMED_EXACTPOS,3}, // 00 In Hangar - {53,27,0,0}, // 01 Taxi to right outside depot - {32,23,AMED_EXACTPOS,7}, // 02 Terminal 1 - {10,23,AMED_EXACTPOS,7}, // 03 Terminal 2 - {43,37,0,0}, // 04 Going towards terminal 2 - {24,37,0,0}, // 05 Going towards terminal 2 - {53,37,0,0}, // 06 Going for takeoff - {61,40,AMED_EXACTPOS,1}, // 07 Taxi to start of runway (takeoff) - {3,40,AMED_NOSPDCLAMP,0}, // 08 Accelerate to end of runway - {-79,40,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 09 Take off - {177,40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 10 Fly to landing position in air - {56,40,AMED_NOSPDCLAMP | AMED_LAND,0}, // 11 Going down for land - {3,40,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 12 Just landed, brake until end of runway - { 7,40,0,0}, // 13 Just landed, turn around and taxi 1 square - {53,40,0,0}, // 14 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 15 Fly around waiting for a landing spot (north-east) - {1,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 16 Fly around waiting for a landing spot (north-west) - {257,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 17 Fly around waiting for a landing spot (south-west) - {273,49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Fly around waiting for a landing spot (south) - {44,37,AMED_HELI_RAISE,0}, // 19 Helicopter takeoff - {44,40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 In position above landing spot helicopter - {44,40,AMED_HELI_LOWER,0} // 21 Helicopter landing + { 53, 3,AMED_EXACTPOS,3}, // 00 In Hangar + { 53, 27,0,0}, // 01 Taxi to right outside depot + { 32, 23,AMED_EXACTPOS,7}, // 02 Terminal 1 + { 10, 23,AMED_EXACTPOS,7}, // 03 Terminal 2 + { 43, 37,0,0}, // 04 Going towards terminal 2 + { 24, 37,0,0}, // 05 Going towards terminal 2 + { 53, 37,0,0}, // 06 Going for takeoff + { 61, 40,AMED_EXACTPOS,1}, // 07 Taxi to start of runway (takeoff) + { 3, 40,AMED_NOSPDCLAMP,0}, // 08 Accelerate to end of runway + {-79, 40,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 09 Take off + {177, 40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 10 Fly to landing position in air + { 56, 40,AMED_NOSPDCLAMP | AMED_LAND,0}, // 11 Going down for land + { 3, 40,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 12 Just landed, brake until end of runway + { 7, 40,0,0}, // 13 Just landed, turn around and taxi 1 square + { 53, 40,0,0}, // 14 Taxi from runway to crossing + {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 15 Fly around waiting for a landing spot (north-east) + { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 16 Fly around waiting for a landing spot (north-west) + {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 17 Fly around waiting for a landing spot (south-west) + {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Fly around waiting for a landing spot (south) + { 44, 37,AMED_HELI_RAISE,0}, // 19 Helicopter takeoff + { 44, 40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 In position above landing spot helicopter + { 44, 40,AMED_HELI_LOWER,0} // 21 Helicopter landing }; // City Airport (large) 6x6 static const AirportMovingData _airport_moving_data_town[25] = { - {85,3,AMED_EXACTPOS,3}, // 00 In Hangar - {85,27,0,0}, // 01 Taxi to right outside depot - {26,41,AMED_EXACTPOS,5}, // 02 Terminal 1 - {56,20,AMED_EXACTPOS,3}, // 03 Terminal 2 - {38,8,AMED_EXACTPOS,5}, // 04 Terminal 3 - {65,6,0,0}, // 05 Taxi to right in infront of terminal 2/3 - {80,27,0,0}, // 06 Taxiway terminals 2-3 - {44,63,0,0}, // 07 Taxi to Airport center - {58,71,0,0}, // 08 Towards takeoff - {72,85,0,0}, // 09 Taxi to runway (takeoff) - {89,85,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) - {3,85,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway - {-79,85,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off - {177,85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air - {89,85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land - {3,85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway - {20,87,0,0}, // 16 Just landed, turn around and taxi 1 square - {36,71,0,0}, // 17 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 18 Fly around waiting for a landing spot (north-east) - {1,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 19 Fly around waiting for a landing spot (north-west) - {257,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (south-west) - {273,49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south) - {44,63,AMED_HELI_RAISE,0}, // 22 Helicopter takeoff - {28,74,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 23 In position above landing spot helicopter - {28,74,AMED_HELI_LOWER,0} // 24 Helicopter landing + { 85, 3,AMED_EXACTPOS,3}, // 00 In Hangar + { 85, 27,0,0}, // 01 Taxi to right outside depot + { 26, 41,AMED_EXACTPOS,5}, // 02 Terminal 1 + { 56, 20,AMED_EXACTPOS,3}, // 03 Terminal 2 + { 38, 8,AMED_EXACTPOS,5}, // 04 Terminal 3 + { 65, 6,0,0}, // 05 Taxi to right in infront of terminal 2/3 + { 80, 27,0,0}, // 06 Taxiway terminals 2-3 + { 44, 63,0,0}, // 07 Taxi to Airport center + { 58, 71,0,0}, // 08 Towards takeoff + { 72, 85,0,0}, // 09 Taxi to runway (takeoff) + { 89, 85,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) + { 3, 85,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway + {-79, 85,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off + {177, 85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air + { 89, 85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land + { 3, 85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway + { 20, 87,0,0}, // 16 Just landed, turn around and taxi 1 square + { 36, 71,0,0}, // 17 Taxi from runway to crossing + {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Fly around waiting for a landing spot (north-east) + { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 19 Fly around waiting for a landing spot (north-west) + {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (south-west) + {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south) + { 44, 63,AMED_HELI_RAISE,0}, // 22 Helicopter takeoff + { 28, 74,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 23 In position above landing spot helicopter + { 28, 74,AMED_HELI_LOWER,0} // 24 Helicopter landing }; // Metropolitan Airport (metropolitan) - 2 runways static const AirportMovingData _airport_moving_data_metropolitan[27] = { - {85,3,AMED_EXACTPOS,3}, // 00 In Hangar - {85,27,0,0}, // 01 Taxi to right outside depot - {26,41,AMED_EXACTPOS,5}, // 02 Terminal 1 - {56,20,AMED_EXACTPOS,3}, // 03 Terminal 2 - {38,8,AMED_EXACTPOS,5}, // 04 Terminal 3 - {65,6,0,0}, // 05 Taxi to right in infront of terminal 2/3 - {70,33,0,0}, // 06 Taxiway terminals 2-3 - {44,58,0,0}, // 07 Taxi to Airport center - {72,58,0,0}, // 08 Towards takeoff - {72,69,0,0}, // 09 Taxi to runway (takeoff) - {89,69,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) - {3,69,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway - {-79,69,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off - {177,85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air - {89,85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land - {3,85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway - {21,85,0,0}, // 16 Just landed, turn around and taxi 1 square - {21,69,0,0}, // 17 On Runway-out taxiing to In-Way - {21,54,AMED_EXACTPOS,5}, // 18 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 19 Fly around waiting for a landing spot (north-east) - {1,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (north-west) - {257,1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south-west) - {273,49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 22 Fly around waiting for a landing spot (south) - {44,58,0,0}, // 23 Helicopter takeoff spot on ground (to clear airport sooner) - {44,63,AMED_HELI_RAISE,0}, // 24 Helicopter takeoff - {15,54,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 25 Get in position above landing spot helicopter - {15,54,AMED_HELI_LOWER,0} // 26 Helicopter landing + { 85, 3,AMED_EXACTPOS,3}, // 00 In Hangar + { 85, 27,0,0}, // 01 Taxi to right outside depot + { 26, 41,AMED_EXACTPOS,5}, // 02 Terminal 1 + { 56, 20,AMED_EXACTPOS,3}, // 03 Terminal 2 + { 38, 8,AMED_EXACTPOS,5}, // 04 Terminal 3 + { 65, 6,0,0}, // 05 Taxi to right in infront of terminal 2/3 + { 70, 33,0,0}, // 06 Taxiway terminals 2-3 + { 44, 58,0,0}, // 07 Taxi to Airport center + { 72, 58,0,0}, // 08 Towards takeoff + { 72, 69,0,0}, // 09 Taxi to runway (takeoff) + { 89, 69,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) + { 3, 69,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway + {-79, 69,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off + {177, 85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air + { 89, 85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land + { 3, 85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway + { 21, 85,0,0}, // 16 Just landed, turn around and taxi 1 square + { 21, 69,0,0}, // 17 On Runway-out taxiing to In-Way + { 21, 54,AMED_EXACTPOS,5}, // 18 Taxi from runway to crossing + {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 19 Fly around waiting for a landing spot (north-east) + { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (north-west) + {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south-west) + {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 22 Fly around waiting for a landing spot (south) + { 44, 58,0,0}, // 23 Helicopter takeoff spot on ground (to clear airport sooner) + { 44, 63,AMED_HELI_RAISE,0}, // 24 Helicopter takeoff + { 15, 54,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 25 Get in position above landing spot helicopter + { 15, 54,AMED_HELI_LOWER,0} // 26 Helicopter landing }; // International Airport (international) - 2 runways, 6 terminals, dedicated helipod static const AirportMovingData _airport_moving_data_international[51] = { - {7,55,AMED_EXACTPOS,3}, // 00 In Hangar 1 - {100,21,AMED_EXACTPOS,3}, // 01 In Hangar 2 - {7,70,0,0}, // 02 Taxi to right outside depot - {100,36,0,0}, // 03 Taxi to right outside depot - {38,70,AMED_EXACTPOS,5}, // 04 Terminal 1 - {38,54,AMED_EXACTPOS,5}, // 05 Terminal 2 - {38,38,AMED_EXACTPOS,5}, // 06 Terminal 3 - {70,70,AMED_EXACTPOS,1}, // 07 Terminal 4 - {70,54,AMED_EXACTPOS,1}, // 08 Terminal 5 - {70,38,AMED_EXACTPOS,1}, // 09 Terminal 6 - {104,71,AMED_EXACTPOS,1}, // 10 Helipad 1 - {104,55,AMED_EXACTPOS,1}, // 11 Helipad 2 - {22,87,0,0}, // 12 Towards Terminals 4/5/6, Helipad 1/2 - {60,87,0,0}, // 13 Towards Terminals 4/5/6, Helipad 1/2 - {66,87,0,0}, // 14 Towards Terminals 4/5/6, Helipad 1/2 - {86,87,AMED_EXACTPOS,7}, // 15 Towards Terminals 4/5/6, Helipad 1/2 - {86, 70,0,0}, // 16 In Front of Terminal 4 / Helipad 1 - {86, 54,0,0}, // 17 In Front of Terminal 5 / Helipad 2 - {86, 38,0,0}, // 18 In Front of Terminal 6 - {86, 22,0,0}, // 19 Towards Terminals Takeoff (Taxiway) - {66,22,0,0}, // 20 Towards Terminals Takeoff (Taxiway) - {60,22,0,}, // 21 Towards Terminals Takeoff (Taxiway) - {38,22,0,0}, // 22 Towards Terminals Takeoff (Taxiway) - {22, 70,0,0}, // 23 In Front of Terminal 1 - {22, 58,0,0}, // 24 In Front of Terminal 2 - {22, 38,0,0}, // 25 In Front of Terminal 3 - {22, 22,AMED_EXACTPOS,7}, // 26 Going for Takeoff - {22, 6,0,0}, // 27 On Runway-out, prepare for takeoff - {3,6,AMED_EXACTPOS,5}, // 28 Accelerate to end of runway - {60,6,AMED_NOSPDCLAMP,0}, // 29 Release control of runway, for smoother movement - {105,6,AMED_NOSPDCLAMP,0}, // 30 End of runway - {190, 6,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 31 Take off - {193,104,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 32 Fly to landing position in air - {105,104,AMED_NOSPDCLAMP | AMED_LAND,0}, // 33 Going down for land - { 3,104,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 34 Just landed, brake until end of runway - { 12,104,0,0}, // 35 Just landed, turn around and taxi 1 square - { 7,84,0,0}, // 36 Taxi from runway to crossing - {-31,209,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 37 Fly around waiting for a landing spot (north-east) - {1,6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 38 Fly around waiting for a landing spot (north-west) - {273,6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 39 Fly around waiting for a landing spot (south-west) - {305,81,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 40 Fly around waiting for a landing spot (south) + { 7, 55,AMED_EXACTPOS,3}, // 00 In Hangar 1 + {100, 21,AMED_EXACTPOS,3}, // 01 In Hangar 2 + { 7, 70,0,0}, // 02 Taxi to right outside depot + {100, 36,0,0}, // 03 Taxi to right outside depot + { 38, 70,AMED_EXACTPOS,5}, // 04 Terminal 1 + { 38, 54,AMED_EXACTPOS,5}, // 05 Terminal 2 + { 38, 38,AMED_EXACTPOS,5}, // 06 Terminal 3 + { 70, 70,AMED_EXACTPOS,1}, // 07 Terminal 4 + { 70, 54,AMED_EXACTPOS,1}, // 08 Terminal 5 + { 70, 38,AMED_EXACTPOS,1}, // 09 Terminal 6 + {104, 71,AMED_EXACTPOS,1}, // 10 Helipad 1 + {104, 55,AMED_EXACTPOS,1}, // 11 Helipad 2 + { 22, 87,0,0}, // 12 Towards Terminals 4/5/6, Helipad 1/2 + { 60, 87,0,0}, // 13 Towards Terminals 4/5/6, Helipad 1/2 + { 66, 87,0,0}, // 14 Towards Terminals 4/5/6, Helipad 1/2 + { 86, 87,AMED_EXACTPOS,7}, // 15 Towards Terminals 4/5/6, Helipad 1/2 + { 86, 70,0,0}, // 16 In Front of Terminal 4 / Helipad 1 + { 86, 54,0,0}, // 17 In Front of Terminal 5 / Helipad 2 + { 86, 38,0,0}, // 18 In Front of Terminal 6 + { 86, 22,0,0}, // 19 Towards Terminals Takeoff (Taxiway) + { 66, 22,0,0}, // 20 Towards Terminals Takeoff (Taxiway) + { 60, 22,0,0}, // 21 Towards Terminals Takeoff (Taxiway) + { 38, 22,0,0}, // 22 Towards Terminals Takeoff (Taxiway) + { 22, 70,0,0}, // 23 In Front of Terminal 1 + { 22, 58,0,0}, // 24 In Front of Terminal 2 + { 22, 38,0,0}, // 25 In Front of Terminal 3 + { 22, 22,AMED_EXACTPOS,7}, // 26 Going for Takeoff + { 22, 6,0,0}, // 27 On Runway-out, prepare for takeoff + { 3, 6,AMED_EXACTPOS,5}, // 28 Accelerate to end of runway + { 60, 6,AMED_NOSPDCLAMP,0}, // 29 Release control of runway, for smoother movement + {105, 6,AMED_NOSPDCLAMP,0}, // 30 End of runway + {190, 6,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 31 Take off + {193,104,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 32 Fly to landing position in air + {105,104,AMED_NOSPDCLAMP | AMED_LAND,0}, // 33 Going down for land + { 3,104,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 34 Just landed, brake until end of runway + { 12,104,0,0}, // 35 Just landed, turn around and taxi 1 square + { 7, 84,0,0}, // 36 Taxi from runway to crossing + {-31,209,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 37 Fly around waiting for a landing spot (north-east) + { 1, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 38 Fly around waiting for a landing spot (north-west) + {273, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 39 Fly around waiting for a landing spot (south-west) + {305, 81,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 40 Fly around waiting for a landing spot (south) // Helicopter - {128,80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 41 Bufferspace before helipad - {128,80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 42 Bufferspace before helipad - {96,71,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 43 Get in position for Helipad1 - {96,55,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 44 Get in position for Helipad2 - {96,71,AMED_HELI_LOWER,0}, // 45 Land at Helipad1 - {96,55,AMED_HELI_LOWER,0}, // 46 Land at Helipad2 - {104,71,AMED_HELI_RAISE,0}, // 47 Takeoff Helipad1 - {104,55,AMED_HELI_RAISE,0}, // 48 Takeoff Helipad2 - {104,32,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 49 Go to position for Hangarentrance in air - {104,32,AMED_HELI_LOWER,0} // 50 Land in HANGAR2_AREA to go to hangar + {128, 80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 41 Bufferspace before helipad + {128, 80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 42 Bufferspace before helipad + { 96, 71,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 43 Get in position for Helipad1 + { 96, 55,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 44 Get in position for Helipad2 + { 96, 71,AMED_HELI_LOWER,0}, // 45 Land at Helipad1 + { 96, 55,AMED_HELI_LOWER,0}, // 46 Land at Helipad2 + {104, 71,AMED_HELI_RAISE,0}, // 47 Takeoff Helipad1 + {104, 55,AMED_HELI_RAISE,0}, // 48 Takeoff Helipad2 + {104, 32,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 49 Go to position for Hangarentrance in air + {104, 32,AMED_HELI_LOWER,0} // 50 Land in HANGAR2_AREA to go to hangar }; // Heliport (heliport) static const AirportMovingData _airport_moving_data_heliport[9] = { - { 5,9,AMED_EXACTPOS,1}, // 0 - At heliport terminal - { 2,9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) - {-3,9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter - {-3,9,AMED_HELI_LOWER,0}, // 3 - Land - { 2,9,0,0}, // 4 - Goto terminal on ground - {-31, 59,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 5 - Circle #1 (north-east) - {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 6 - Circle #2 (north-west) - { 49,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 7 - Circle #3 (south-west) - { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 8 - Circle #4 (south) + { 5, 9,AMED_EXACTPOS,1}, // 0 - At heliport terminal + { 2, 9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) + { -3, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter + { -3, 9,AMED_HELI_LOWER,0}, // 3 - Land + { 2, 9,0,0}, // 4 - Goto terminal on ground + {-31, 59,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 5 - Circle #1 (north-east) + {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 6 - Circle #2 (north-west) + { 49,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 7 - Circle #3 (south-west) + { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 8 - Circle #4 (south) }; // Oilrig static const AirportMovingData _airport_moving_data_oilrig[9] = { - {31,9,AMED_EXACTPOS,1}, // 0 - At oilrig terminal - {28,9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) - {23,9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter - {23,9,AMED_HELI_LOWER,0}, // 3 - Land - {28,9,0,0}, // 4 - Goto terminal on ground - {-31, 69,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 5 - circle #1 (north-east) - {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 6 - circle #2 (north-west) - { 69,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 7 - circle #3 (south-west) - { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0},// 8 - circle #4 (south) + { 31, 9,AMED_EXACTPOS,1}, // 0 - At oilrig terminal + { 28, 9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) + { 23, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter + { 23, 9,AMED_HELI_LOWER,0}, // 3 - Land + { 28, 9,0,0}, // 4 - Goto terminal on ground + {-31, 69,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 5 - circle #1 (north-east) + {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 6 - circle #2 (north-west) + { 69,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 7 - circle #3 (south-west) + { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 8 - circle #4 (south) }; /////////////////////////////////////////////////////////////////////// @@ -269,17 +269,17 @@ static const AirportMovingData _airport_moving_data_oilrig[9] = { // this may be changed later when airports are moved to external file static const TileIndex _airport_depots_country[] = {1, TILE_XY(3,0)}; static const AirportFTAbuildup _airport_fta_country[] = { - {0,HANGAR,NOTHING_block,1}, - {1,255,AIRPORT_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM1,TERM1_block,2}, {1,TERM2,0,4}, {1,HELITAKEOFF,0,19}, {1,0,0,6}, - {2,TERM1,TERM1_block,1}, - {3,TERM2,TERM2_block,5}, - {4,255,AIRPORT_BUSY_block,0}, {4,TERM2,0,5}, {4,HANGAR,0,1}, {4,TAKEOFF,0,6}, {4,HELITAKEOFF,0,1}, - {5,255,AIRPORT_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,0,0,4}, - {6,0,AIRPORT_BUSY_block,7}, + { 0,HANGAR,NOTHING_block,1}, + { 1,255,AIRPORT_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM1,TERM1_block,2}, {1,TERM2,0,4}, {1,HELITAKEOFF,0,19}, {1,0,0,6}, + { 2,TERM1,TERM1_block,1}, + { 3,TERM2,TERM2_block,5}, + { 4,255,AIRPORT_BUSY_block,0}, {4,TERM2,0,5}, {4,HANGAR,0,1}, {4,TAKEOFF,0,6}, {4,HELITAKEOFF,0,1}, + { 5,255,AIRPORT_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,0,0,4}, + { 6,0,AIRPORT_BUSY_block,7}, // takeoff - {7,TAKEOFF,AIRPORT_BUSY_block,8}, - {8,STARTTAKEOFF,NOTHING_block,9}, - {9,ENDTAKEOFF,NOTHING_block,0}, + { 7,TAKEOFF,AIRPORT_BUSY_block,8}, + { 8,STARTTAKEOFF,NOTHING_block,9}, + { 9,ENDTAKEOFF,NOTHING_block,0}, // landing {10,FLYING,NOTHING_block,15}, {10,LANDING,0,11}, {10,HELILANDING,0,20}, {11,LANDING,AIRPORT_BUSY_block,12}, @@ -299,16 +299,16 @@ static const AirportFTAbuildup _airport_fta_country[] = { static const TileIndex _airport_depots_city[] = {1, TILE_XY(5,0)}; static const AirportFTAbuildup _airport_fta_city[] = { - {0,HANGAR,NOTHING_block,1}, {0,TAKEOFF,OUT_WAY_block,1}, {0,0,0,1}, - {1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 - {2,TERM1,TERM1_block,7}, {2,TAKEOFF,OUT_WAY_block,7}, {2,0,0,7}, - {3,TERM2,TERM2_block,5}, {3,TAKEOFF,OUT_WAY_block,5}, {3,0,0,5}, - {4,TERM3,TERM3_block,5}, {4,TAKEOFF,OUT_WAY_block,5}, {4,0,0,5}, - {5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, - {6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, - {7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,OUT_WAY_block,8}, {7,HELITAKEOFF,0,22}, {7,HANGAR,0,1}, {7,0,0,6}, - {8,0,OUT_WAY_block,9}, - {9,0,RUNWAY_IN_OUT_block,10}, + { 0,HANGAR,NOTHING_block,1}, {0,TAKEOFF,OUT_WAY_block,1}, {0,0,0,1}, + { 1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 + { 2,TERM1,TERM1_block,7}, {2,TAKEOFF,OUT_WAY_block,7}, {2,0,0,7}, + { 3,TERM2,TERM2_block,5}, {3,TAKEOFF,OUT_WAY_block,5}, {3,0,0,5}, + { 4,TERM3,TERM3_block,5}, {4,TAKEOFF,OUT_WAY_block,5}, {4,0,0,5}, + { 5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, + { 6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, + { 7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,OUT_WAY_block,8}, {7,HELITAKEOFF,0,22}, {7,HANGAR,0,1}, {7,0,0,6}, + { 8,0,OUT_WAY_block,9}, + { 9,0,RUNWAY_IN_OUT_block,10}, // takeoff {10,TAKEOFF,RUNWAY_IN_OUT_block,11}, {11,STARTTAKEOFF,NOTHING_block,12}, @@ -333,16 +333,16 @@ static const AirportFTAbuildup _airport_fta_city[] = { static const TileIndex _airport_depots_metropolitan[] = {1, TILE_XY(5,0)}; static const AirportFTAbuildup _airport_fta_metropolitan[] = { - {0,HANGAR,NOTHING_block,1}, - {1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 - {2,TERM1,TERM1_block,7}, - {3,TERM2,TERM2_block,5}, - {4,TERM3,TERM3_block,5}, - {5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, - {6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, - {7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,0,8}, {7,HELITAKEOFF,0,23}, {7,HANGAR,0,1}, {7,0,0,6}, - {8,0,OUT_WAY_block,9}, - {9,0,RUNWAY_OUT_block,10}, + { 0,HANGAR,NOTHING_block,1}, + { 1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 + { 2,TERM1,TERM1_block,7}, + { 3,TERM2,TERM2_block,5}, + { 4,TERM3,TERM3_block,5}, + { 5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, + { 6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, + { 7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,0,8}, {7,HELITAKEOFF,0,23}, {7,HANGAR,0,1}, {7,0,0,6}, + { 8,0,OUT_WAY_block,9}, + { 9,0,RUNWAY_OUT_block,10}, // takeoff {10,TAKEOFF,RUNWAY_OUT_block,11}, {11,STARTTAKEOFF,NOTHING_block,12}, @@ -369,16 +369,16 @@ static const AirportFTAbuildup _airport_fta_metropolitan[] = { static const TileIndex _airport_depots_international[] = {2, TILE_XY(0,3), TILE_XY(6,1)}; static const AirportFTAbuildup _airport_fta_international[] = { - {0,HANGAR,NOTHING_block,2}, {0,255,TERM_GROUP1_block,0}, {0,255,TERM_GROUP2_ENTER1_block,1}, {0,HELITAKEOFF,HELIPAD1_block,2}, {0,0,0,2}, - {1,HANGAR,NOTHING_block,3}, {1,255,HANGAR2_AREA_block,1}, {1,HELITAKEOFF,HELIPAD2_block,3}, {1,0,0,3}, - {2,255,AIRPORT_ENTRANCE_block,0}, {2,HANGAR,0,0}, {2,TERM4,0,12}, {2,TERM5,0,12}, {2,TERM6,0,12}, {2,HELIPAD1,0,12}, {2,HELIPAD2,0,12}, {2,HELITAKEOFF,0,12}, {2,0,0,23}, - {3,255,HANGAR2_AREA_block,0}, {3,HANGAR,0,1}, {3,0,0,18}, - {4,TERM1,TERM1_block,23}, {4,HANGAR,AIRPORT_ENTRANCE_block,23}, {4,0,0,23}, - {5,TERM2,TERM2_block,24}, {5,HANGAR,AIRPORT_ENTRANCE_block,24}, {5,0,0,24}, - {6,TERM3,TERM3_block,25}, {6,HANGAR,AIRPORT_ENTRANCE_block,25}, {6,0,0,25}, - {7,TERM4,TERM4_block,16}, {7,HANGAR,HANGAR2_AREA_block,16}, {7,0,0,16}, - {8,TERM5,TERM5_block,17}, {8,HANGAR,HANGAR2_AREA_block,17}, {8,0,0,17}, - {9,TERM6,TERM6_block,18}, {9,HANGAR,HANGAR2_AREA_block,18}, {9,0,0,18}, + { 0,HANGAR,NOTHING_block,2}, {0,255,TERM_GROUP1_block,0}, {0,255,TERM_GROUP2_ENTER1_block,1}, {0,HELITAKEOFF,HELIPAD1_block,2}, {0,0,0,2}, + { 1,HANGAR,NOTHING_block,3}, {1,255,HANGAR2_AREA_block,1}, {1,HELITAKEOFF,HELIPAD2_block,3}, {1,0,0,3}, + { 2,255,AIRPORT_ENTRANCE_block,0}, {2,HANGAR,0,0}, {2,TERM4,0,12}, {2,TERM5,0,12}, {2,TERM6,0,12}, {2,HELIPAD1,0,12}, {2,HELIPAD2,0,12}, {2,HELITAKEOFF,0,12}, {2,0,0,23}, + { 3,255,HANGAR2_AREA_block,0}, {3,HANGAR,0,1}, {3,0,0,18}, + { 4,TERM1,TERM1_block,23}, {4,HANGAR,AIRPORT_ENTRANCE_block,23}, {4,0,0,23}, + { 5,TERM2,TERM2_block,24}, {5,HANGAR,AIRPORT_ENTRANCE_block,24}, {5,0,0,24}, + { 6,TERM3,TERM3_block,25}, {6,HANGAR,AIRPORT_ENTRANCE_block,25}, {6,0,0,25}, + { 7,TERM4,TERM4_block,16}, {7,HANGAR,HANGAR2_AREA_block,16}, {7,0,0,16}, + { 8,TERM5,TERM5_block,17}, {8,HANGAR,HANGAR2_AREA_block,17}, {8,0,0,17}, + { 9,TERM6,TERM6_block,18}, {9,HANGAR,HANGAR2_AREA_block,18}, {9,0,0,18}, {10,HELIPAD1,HELIPAD1_block,10}, {10,HANGAR,HANGAR2_AREA_block,16}, {10,HELITAKEOFF,0,47}, {11,HELIPAD2,HELIPAD2_block,11}, {11,HANGAR,HANGAR2_AREA_block,17}, {11,HELITAKEOFF,0,48}, {12,0,TERM_GROUP2_ENTER1_block,13}, diff --git a/economy.h b/economy.h index 89f694f0e..b8134c64a 100644 --- a/economy.h +++ b/economy.h @@ -48,16 +48,16 @@ typedef struct ScoreInfo { } ScoreInfo; static const ScoreInfo score_info[] = { - {SCORE_VEHICLES, 120, 100}, - {SCORE_STATIONS, 80, 100}, - {SCORE_MIN_PROFIT, 10000, 100}, - {SCORE_MIN_INCOME, 50000, 50}, + {SCORE_VEHICLES, 120, 100}, + {SCORE_STATIONS, 80, 100}, + {SCORE_MIN_PROFIT, 10000, 100}, + {SCORE_MIN_INCOME, 50000, 50}, {SCORE_MAX_INCOME, 100000, 100}, - {SCORE_DELIVERED, 40000, 400}, - {SCORE_CARGO, 8, 50}, - {SCORE_MONEY, 10000000, 50}, - {SCORE_LOAN, 250000, 50}, - {SCORE_TOTAL} + {SCORE_DELIVERED, 40000, 400}, + {SCORE_CARGO, 8, 50}, + {SCORE_MONEY, 10000000, 50}, + {SCORE_LOAN, 250000, 50}, + {SCORE_TOTAL, 0, 0} }; int _score_part[MAX_PLAYERS][NUM_SCORE]; diff --git a/misc.c b/misc.c index 12cb98dc7..8b41dfc3f 100644 --- a/misc.c +++ b/misc.c @@ -700,7 +700,7 @@ static const SaveLoadGlobVarList _date_desc[] = { {&_next_competitor_start, SLE_FILE_U16 | SLE_VAR_UINT, 0, 255}, {&_trees_tick_ctr, SLE_UINT8, 0, 255}, {&_pause, SLE_UINT8, 4, 255}, - {NULL,0} + {NULL, 0, 0, 0} }; // Save load date related variables as well as persistent tick counters @@ -712,10 +712,10 @@ static void SaveLoad_DATE() static const SaveLoadGlobVarList _view_desc[] = { - {&_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_INT, 0, 255}, - {&_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_INT, 0, 255}, - {&_saved_scrollpos_zoom, SLE_UINT8, 0, 255}, - {NULL,0} + {&_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_INT, 0, 255}, + {&_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_INT, 0, 255}, + {&_saved_scrollpos_zoom, SLE_UINT8, 0, 255}, + {NULL, 0, 0, 0} }; static void SaveLoad_VIEW() diff --git a/misc_gui.c b/misc_gui.c index 629d1534f..cd6d7cee7 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -1432,14 +1432,14 @@ static void WriteCE(const CheatEntry *ce, int32 val) static const CheatEntry _cheats_ui[] = { - {CE_CLICK, 0, STR_CHEAT_MONEY, &_cheats.money.value, &_cheats.money.been_used, &ClickMoneyCheat}, - {CE_UINT8, 0, STR_CHEAT_CHANGE_PLAYER, &_local_player, &_cheats.switch_player.been_used, &ClickChangePlayerCheat, 0, 11, 1}, - {CE_BOOL, 0, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used}, - {CE_BOOL, 0, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value,&_cheats.crossing_tunnels.been_used}, - {CE_BOOL, 0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used}, - {CE_BOOL, 0, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used}, - {CE_UINT8, 0, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat, -1, 4, 1}, - {CE_UINT8, 0, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat, -1,1,1}, + {CE_CLICK, 0, STR_CHEAT_MONEY, &_cheats.money.value, &_cheats.money.been_used, &ClickMoneyCheat, 0, 0, 0}, + {CE_UINT8, 0, STR_CHEAT_CHANGE_PLAYER, &_local_player, &_cheats.switch_player.been_used, &ClickChangePlayerCheat, 0, 11, 1}, + {CE_BOOL, 0, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used, NULL, 0, 0, 0}, + {CE_BOOL, 0, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value,&_cheats.crossing_tunnels.been_used,NULL, 0, 0, 0}, + {CE_BOOL, 0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used, NULL, 0, 0, 0}, + {CE_BOOL, 0, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, NULL, 0, 0, 0}, + {CE_UINT8, 0, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat,-1, 4, 1}, + {CE_UINT8, 0, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat, -1, 1, 1}, }; diff --git a/rail_gui.c b/rail_gui.c index 98f2c9f78..b69d68e2e 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -355,7 +355,7 @@ static const BestFitStruct _bestfit[] = { {5, M(0,16), 0, 1<<3}, // right track {5, M(1,16), 0, 1<<3}, // right track - {0xff,0,0}, + {0xff, 0, 0, 0}, }; #undef M diff --git a/sdl.c b/sdl.c index 030a348b9..4aeb8ba1b 100644 --- a/sdl.c +++ b/sdl.c @@ -363,7 +363,7 @@ static const VkMapping _vk_mapping[] = { AS(SDLK_KP_PLUS, WKC_NUM_PLUS), AS(SDLK_KP_ENTER, WKC_NUM_ENTER), AS(SDLK_KP_PERIOD, WKC_NUM_DECIMAL), - {0} + {0, 0, 0} }; static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym) diff --git a/settings.c b/settings.c index a8aedf1d8..44bf4d36d 100644 --- a/settings.c +++ b/settings.c @@ -725,178 +725,176 @@ static void save_setting_desc(IniFile *ini, const SettingDesc *desc, void *grpna //*************************** static const SettingDesc music_settings[] = { - {"playlist", SDT_UINT8, (void*)0, (void*)offsetof(MusicFileSettings, playlist) }, - {"music_vol", SDT_UINT8, (void*)128, (void*)offsetof(MusicFileSettings, music_vol) }, - {"effect_vol", SDT_UINT8, (void*)128, (void*)offsetof(MusicFileSettings, effect_vol) }, - {"custom_1", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_1) << 16, NULL, (void*)offsetof(MusicFileSettings, custom_1) }, - {"custom_2", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_2) << 16, NULL, (void*)offsetof(MusicFileSettings, custom_2) }, - {"playing", SDT_BOOL, (void*)true, (void*)offsetof(MusicFileSettings, btn_down) }, - {"shuffle", SDT_BOOL, (void*)false, (void*)offsetof(MusicFileSettings, shuffle) }, - {NULL} + {"playlist", SDT_UINT8, (void*)0, (void*)offsetof(MusicFileSettings, playlist), NULL}, + {"music_vol", SDT_UINT8, (void*)128, (void*)offsetof(MusicFileSettings, music_vol), NULL}, + {"effect_vol",SDT_UINT8, (void*)128, (void*)offsetof(MusicFileSettings, effect_vol), NULL}, + {"custom_1", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_1) << 16, NULL, (void*)offsetof(MusicFileSettings, custom_1), NULL}, + {"custom_2", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_2) << 16, NULL, (void*)offsetof(MusicFileSettings, custom_2), NULL}, + {"playing", SDT_BOOL, (void*)true, (void*)offsetof(MusicFileSettings, btn_down), NULL}, + {"shuffle", SDT_BOOL, (void*)false, (void*)offsetof(MusicFileSettings, shuffle), NULL}, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc win32_settings[] = { - {"display_hz", SDT_UINT, (void*)0, &_display_hz}, - {"force_full_redraw", SDT_BOOL, (void*)false, &_force_full_redraw}, - {"fullscreen_bpp", SDT_UINT, (void*)8, &_fullscreen_bpp}, - {"double_size", SDT_BOOL, (void*)false, &_double_size}, - {NULL} + {"display_hz", SDT_UINT, (void*)0, &_display_hz, NULL}, + {"force_full_redraw", SDT_BOOL, (void*)false, &_force_full_redraw, NULL}, + {"fullscreen_bpp", SDT_UINT, (void*)8, &_fullscreen_bpp, NULL}, + {"double_size", SDT_BOOL, (void*)false, &_double_size, NULL}, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc misc_settings[] = { - {"display_opt", SDT_MANYOFMANY | SDT_UINT8, (void*)(DO_SHOW_TOWN_NAMES|DO_SHOW_STATION_NAMES|DO_SHOW_SIGNS|DO_FULL_ANIMATION|DO_FULL_DETAIL|DO_TRANS_BUILDINGS|DO_CHECKPOINTS), &_display_opt, "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|TRANS_BUILDINGS|FULL_DETAIL|CHECKPOINTS"}, - {"news_display_opt", SDT_UINT16, (void*)-1, &_news_display_opt}, - {"fullscreen", SDT_BOOL, (void*)false, &_fullscreen}, - {"videodriver", SDT_STRINGBUF | (lengthof(_ini_videodriver)<<16) | SDT_NOSAVE, NULL, _ini_videodriver}, - {"musicdriver", SDT_STRINGBUF | (lengthof(_ini_musicdriver)<<16) | SDT_NOSAVE, NULL, _ini_musicdriver}, - {"sounddriver", SDT_STRINGBUF | (lengthof(_ini_sounddriver)<<16) | SDT_NOSAVE, NULL, _ini_sounddriver}, - {"language", SDT_STRINGBUF | lengthof(_dynlang.curr_file)<<16, NULL, _dynlang.curr_file }, - {"resolution", SDT_UINT16 | SDT_INTLIST | lengthof(_cur_resolution) << 16, "640,480", _cur_resolution}, - {"cache_sprites", SDT_BOOL, (void*)false, &_cache_sprites}, - {"screenshot_format", SDT_STRINGBUF | (lengthof(_screenshot_format_name)<<16), NULL, _screenshot_format_name}, - {"savegame_format", SDT_STRINGBUF | (lengthof(_savegame_format)<<16), NULL, _savegame_format}, - {"rightclick_emulate", SDT_BOOL, (void*)false, &_rightclick_emulate}, - {NULL} + {"display_opt", SDT_MANYOFMANY | SDT_UINT8, (void*)(DO_SHOW_TOWN_NAMES|DO_SHOW_STATION_NAMES|DO_SHOW_SIGNS|DO_FULL_ANIMATION|DO_FULL_DETAIL|DO_TRANS_BUILDINGS|DO_CHECKPOINTS), &_display_opt, "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|TRANS_BUILDINGS|FULL_DETAIL|CHECKPOINTS"}, + {"news_display_opt", SDT_UINT16, (void*)-1, &_news_display_opt, NULL}, + {"fullscreen", SDT_BOOL, (void*)false, &_fullscreen, NULL}, + {"videodriver", SDT_STRINGBUF | (lengthof(_ini_videodriver)<<16) | SDT_NOSAVE,NULL, _ini_videodriver, NULL}, + {"musicdriver", SDT_STRINGBUF | (lengthof(_ini_musicdriver)<<16) | SDT_NOSAVE,NULL, _ini_musicdriver, NULL}, + {"sounddriver", SDT_STRINGBUF | (lengthof(_ini_sounddriver)<<16) | SDT_NOSAVE,NULL, _ini_sounddriver, NULL}, + {"language", SDT_STRINGBUF | lengthof(_dynlang.curr_file)<<16, NULL, _dynlang.curr_file, NULL}, + {"resolution", SDT_UINT16 | SDT_INTLIST | lengthof(_cur_resolution) << 16, "640,480",_cur_resolution, NULL}, + {"cache_sprites", SDT_BOOL, (void*)false, &_cache_sprites, NULL}, + {"screenshot_format", SDT_STRINGBUF | (lengthof(_screenshot_format_name)<<16), NULL, _screenshot_format_name,NULL}, + {"savegame_format", SDT_STRINGBUF | (lengthof(_savegame_format)<<16), NULL, _savegame_format, NULL}, + {"rightclick_emulate",SDT_BOOL, (void*)false, &_rightclick_emulate, NULL}, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc network_settings[] = { - {"port", SDT_UINT | SDT_NOSAVE, (void*)3978, &_network_client_port}, - {"server_port", SDT_UINT | SDT_NOSAVE, (void*)3979, &_network_server_port}, - {"sync_freq", SDT_UINT | SDT_NOSAVE, (void*)4, &_network_sync_freq}, - {"ahead_frames", SDT_UINT | SDT_NOSAVE, (void*)5, &_network_ahead_frames}, - {NULL} + {"port", SDT_UINT | SDT_NOSAVE, (void*)3978, &_network_client_port, NULL}, + {"server_port", SDT_UINT | SDT_NOSAVE, (void*)3979, &_network_server_port, NULL}, + {"sync_freq", SDT_UINT | SDT_NOSAVE, (void*)4, &_network_sync_freq, NULL}, + {"ahead_frames", SDT_UINT | SDT_NOSAVE, (void*)5, &_network_ahead_frames, NULL}, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc debug_settings[] = { - {"savedump_path", SDT_STRINGBUF | (lengthof(_savedump_path)<<16) | SDT_NOSAVE, NULL, _savedump_path}, - {"savedump_first", SDT_UINT | SDT_NOSAVE, 0, &_savedump_first}, - {"savedump_freq", SDT_UINT | SDT_NOSAVE, (void*)1, &_savedump_freq}, - {"savedump_last", SDT_UINT | SDT_NOSAVE, 0, &_savedump_last}, - {NULL} + {"savedump_path", SDT_STRINGBUF | (lengthof(_savedump_path)<<16) | SDT_NOSAVE, NULL, _savedump_path, NULL}, + {"savedump_first", SDT_UINT | SDT_NOSAVE, 0, &_savedump_first, NULL}, + {"savedump_freq", SDT_UINT | SDT_NOSAVE, (void*)1, &_savedump_freq, NULL}, + {"savedump_last", SDT_UINT | SDT_NOSAVE, 0, &_savedump_last, NULL}, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc gameopt_settings[] = { - {"diff_level", SDT_UINT8, (void*)9, (void*)offsetof(GameOptions, diff_level) }, - {"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, (void*)offsetof(GameOptions, diff) }, - {"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)21, (void*)offsetof(GameOptions, currency), "GBP|USD|FF|DM|YEN|PT|FT|ZL|ATS|BEF|DKK|FIM|GRD|CHF|NLG|ITL|SEK|RUR|CZK|ISK|NOK|EUR" }, - {"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, kilometers), "imperial|metric" }, - {"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, (void*)offsetof(GameOptions, town_name), "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|czech|slovakish|hungarian" }, - {"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, (void*)offsetof(GameOptions, landscape), "normal|hilly|desert|candy" }, - {"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, autosave), "off|monthly|quarterly|half year|yearly" }, - {"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, road_side), "left|right" }, - - {NULL} + {"diff_level", SDT_UINT8, (void*)9, (void*)offsetof(GameOptions, diff_level), NULL}, + {"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, (void*)offsetof(GameOptions, diff), NULL}, + {"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)21, (void*)offsetof(GameOptions, currency), "GBP|USD|FF|DM|YEN|PT|FT|ZL|ATS|BEF|DKK|FIM|GRD|CHF|NLG|ITL|SEK|RUR|CZK|ISK|NOK|EUR" }, + {"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, kilometers), "imperial|metric" }, + {"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, (void*)offsetof(GameOptions, town_name), "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|czech|slovakish|hungarian" }, + {"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, (void*)offsetof(GameOptions, landscape), "normal|hilly|desert|candy" }, + {"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, autosave), "off|monthly|quarterly|half year|yearly" }, + {"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, (void*)offsetof(GameOptions, road_side), "left|right" }, + {NULL, 0, NULL, NULL, NULL} }; static const SettingDesc patch_settings[] = { - {"vehicle_speed", SDT_BOOL, (void*)true, (void*)offsetof(Patches, vehicle_speed) }, - {"build_on_slopes", SDT_BOOL, (void*)true, (void*)offsetof(Patches, build_on_slopes) }, - {"mammoth_trains", SDT_BOOL, (void*)true, (void*)offsetof(Patches, mammoth_trains) }, - {"join_stations", SDT_BOOL, (void*)true, (void*)offsetof(Patches, join_stations) }, - {"station_spread", SDT_UINT8, (void*)12, (void*)offsetof(Patches, station_spread) }, - {"full_load_any", SDT_BOOL, (void*)true, (void*)offsetof(Patches, full_load_any)}, - {"order_review_system", SDT_UINT8, (void*)2, (void*)offsetof(Patches, order_review_system)}, - - {"inflation", SDT_BOOL, (void*)true, (void*)offsetof(Patches, inflation)}, - {"selectgoods", SDT_BOOL, (void*)true, (void*)offsetof(Patches, selectgoods)}, - {"longbridges", SDT_BOOL, (void*)false, (void*)offsetof(Patches, longbridges)}, - {"gotodepot", SDT_BOOL, (void*)true, (void*)offsetof(Patches, gotodepot)}, - - {"build_rawmaterial_ind", SDT_BOOL, (void*)false, (void*)offsetof(Patches, build_rawmaterial_ind)}, - {"multiple_industry_per_town", SDT_BOOL, (void*)false, (void*)offsetof(Patches, multiple_industry_per_town)}, - {"same_industry_close", SDT_BOOL, (void*)false, (void*)offsetof(Patches, same_industry_close)}, - - {"lost_train_days", SDT_UINT16, (void*)180, (void*)offsetof(Patches, lost_train_days)}, - {"train_income_warn", SDT_BOOL, (void*)true, (void*)offsetof(Patches, train_income_warn)}, - - {"status_long_date", SDT_BOOL, (void*)true, (void*)offsetof(Patches, status_long_date)}, - {"signal_side", SDT_BOOL, (void*)true, (void*)offsetof(Patches, signal_side)}, - {"show_finances", SDT_BOOL, (void*)true, (void*)offsetof(Patches, show_finances)}, - - {"new_nonstop", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_nonstop)}, - {"roadveh_queue", SDT_BOOL, (void*)false, (void*)offsetof(Patches, roadveh_queue)}, - - {"autoscroll", SDT_BOOL, (void*)false, (void*)offsetof(Patches, autoscroll)}, - {"errmsg_duration", SDT_UINT8, (void*)5, (void*)offsetof(Patches, errmsg_duration)}, - {"snow_line_height", SDT_UINT8, (void*)7, (void*)offsetof(Patches, snow_line_height)}, - - {"bribe", SDT_BOOL, (void*)false, (void*)offsetof(Patches, bribe)}, - {"new_depot_finding", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_depot_finding)}, - - {"nonuniform_stations", SDT_BOOL, (void*)false, (void*)offsetof(Patches, nonuniform_stations)}, - {"always_small_airport", SDT_BOOL, (void*)false, (void*)offsetof(Patches, always_small_airport)}, - {"realistic_acceleration", SDT_BOOL, (void*)false, (void*)offsetof(Patches, realistic_acceleration)}, + {"vehicle_speed", SDT_BOOL, (void*)true, (void*)offsetof(Patches, vehicle_speed), NULL}, + {"build_on_slopes", SDT_BOOL, (void*)true, (void*)offsetof(Patches, build_on_slopes), NULL}, + {"mammoth_trains", SDT_BOOL, (void*)true, (void*)offsetof(Patches, mammoth_trains), NULL}, + {"join_stations", SDT_BOOL, (void*)true, (void*)offsetof(Patches, join_stations), NULL}, + {"station_spread", SDT_UINT8, (void*)12, (void*)offsetof(Patches, station_spread), NULL}, + {"full_load_any", SDT_BOOL, (void*)true, (void*)offsetof(Patches, full_load_any), NULL}, + {"order_review_system", SDT_UINT8, (void*)2, (void*)offsetof(Patches, order_review_system), NULL}, + + {"inflation", SDT_BOOL, (void*)true, (void*)offsetof(Patches, inflation), NULL}, + {"selectgoods", SDT_BOOL, (void*)true, (void*)offsetof(Patches, selectgoods), NULL}, + {"longbridges", SDT_BOOL, (void*)false, (void*)offsetof(Patches, longbridges), NULL}, + {"gotodepot", SDT_BOOL, (void*)true, (void*)offsetof(Patches, gotodepot), NULL}, + + {"build_rawmaterial_ind", SDT_BOOL, (void*)false, (void*)offsetof(Patches, build_rawmaterial_ind),NULL}, + {"multiple_industry_per_town",SDT_BOOL, (void*)false, (void*)offsetof(Patches, multiple_industry_per_town), NULL}, + {"same_industry_close", SDT_BOOL, (void*)false, (void*)offsetof(Patches, same_industry_close), NULL}, + + {"lost_train_days", SDT_UINT16, (void*)180, (void*)offsetof(Patches, lost_train_days), NULL}, + {"train_income_warn", SDT_BOOL, (void*)true, (void*)offsetof(Patches, train_income_warn), NULL}, + + {"status_long_date", SDT_BOOL, (void*)true, (void*)offsetof(Patches, status_long_date), NULL}, + {"signal_side", SDT_BOOL, (void*)true, (void*)offsetof(Patches, signal_side), NULL}, + {"show_finances", SDT_BOOL, (void*)true, (void*)offsetof(Patches, show_finances), NULL}, + + {"new_nonstop", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_nonstop), NULL}, + {"roadveh_queue", SDT_BOOL, (void*)false, (void*)offsetof(Patches, roadveh_queue), NULL}, + + {"autoscroll", SDT_BOOL, (void*)false, (void*)offsetof(Patches, autoscroll), NULL}, + {"errmsg_duration", SDT_UINT8, (void*)5, (void*)offsetof(Patches, errmsg_duration), NULL}, + {"snow_line_height", SDT_UINT8, (void*)7, (void*)offsetof(Patches, snow_line_height), NULL}, + + {"bribe", SDT_BOOL, (void*)false, (void*)offsetof(Patches, bribe), NULL}, + {"new_depot_finding", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_depot_finding), NULL}, + + {"nonuniform_stations", SDT_BOOL, (void*)false, (void*)offsetof(Patches, nonuniform_stations), NULL}, + {"always_small_airport",SDT_BOOL, (void*)false, (void*)offsetof(Patches, always_small_airport), NULL}, + {"realistic_acceleration",SDT_BOOL, (void*)false, (void*)offsetof(Patches, realistic_acceleration), NULL}, - {"toolbar_pos", SDT_UINT8, (void*)0, (void*)offsetof(Patches, toolbar_pos)}, + {"toolbar_pos", SDT_UINT8, (void*)0, (void*)offsetof(Patches, toolbar_pos), NULL}, - {"max_trains", SDT_UINT8, (void*)80,(void*)offsetof(Patches, max_trains)}, - {"max_roadveh", SDT_UINT8, (void*)80,(void*)offsetof(Patches, max_roadveh)}, - {"max_aircraft", SDT_UINT8, (void*)40,(void*)offsetof(Patches, max_aircraft)}, - {"max_ships", SDT_UINT8, (void*)50,(void*)offsetof(Patches, max_ships)}, + {"max_trains", SDT_UINT8, (void*)80, (void*)offsetof(Patches, max_trains), NULL}, + {"max_roadveh", SDT_UINT8, (void*)80, (void*)offsetof(Patches, max_roadveh), NULL}, + {"max_aircraft", SDT_UINT8, (void*)40, (void*)offsetof(Patches, max_aircraft), NULL}, + {"max_ships", SDT_UINT8, (void*)50, (void*)offsetof(Patches, max_ships), NULL}, - {"servint_ispercent", SDT_BOOL, (void*)false,(void*)offsetof(Patches, servint_ispercent)}, - {"servint_trains", SDT_UINT16, (void*)150,(void*)offsetof(Patches, servint_trains)}, - {"servint_roadveh", SDT_UINT16, (void*)150,(void*)offsetof(Patches, servint_roadveh)}, - {"servint_ships", SDT_UINT16, (void*)360,(void*)offsetof(Patches, servint_ships)}, - {"servint_aircraft", SDT_UINT16, (void*)100,(void*)offsetof(Patches, servint_aircraft)}, + {"servint_ispercent", SDT_BOOL, (void*)false, (void*)offsetof(Patches, servint_ispercent), NULL}, + {"servint_trains", SDT_UINT16, (void*)150, (void*)offsetof(Patches, servint_trains), NULL}, + {"servint_roadveh", SDT_UINT16, (void*)150, (void*)offsetof(Patches, servint_roadveh), NULL}, + {"servint_ships", SDT_UINT16, (void*)360, (void*)offsetof(Patches, servint_ships), NULL}, + {"servint_aircraft", SDT_UINT16, (void*)100, (void*)offsetof(Patches, servint_aircraft), NULL}, - {"autorenew", SDT_BOOL, (void*)false,(void*)offsetof(Patches, autorenew)}, - {"autorenew_months", SDT_INT16, (void*)-6, (void*)offsetof(Patches, autorenew_months)}, - {"autorenew_money", SDT_INT32, (void*)100000, (void*)offsetof(Patches, autorenew_money)}, + {"autorenew", SDT_BOOL, (void*)false, (void*)offsetof(Patches, autorenew), NULL}, + {"autorenew_months", SDT_INT16, (void*)-6, (void*)offsetof(Patches, autorenew_months), NULL}, + {"autorenew_money", SDT_INT32, (void*)100000,(void*)offsetof(Patches, autorenew_money), NULL}, - {"new_pathfinding", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_pathfinding)}, - {"pf_maxlength", SDT_UINT16, (void*)512, (void*)offsetof(Patches, pf_maxlength)}, - {"pf_maxdepth", SDT_UINT8, (void*)16, (void*)offsetof(Patches, pf_maxdepth)}, + {"new_pathfinding", SDT_BOOL, (void*)false, (void*)offsetof(Patches, new_pathfinding), NULL}, + {"pf_maxlength", SDT_UINT16, (void*)512, (void*)offsetof(Patches, pf_maxlength), NULL}, + {"pf_maxdepth", SDT_UINT8, (void*)16, (void*)offsetof(Patches, pf_maxdepth), NULL}, + {"ai_disable_veh_train",SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_train), NULL}, + {"ai_disable_veh_roadveh",SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_roadveh), NULL}, + {"ai_disable_veh_aircraft",SDT_BOOL,(void*)false, (void*)offsetof(Patches, ai_disable_veh_aircraft),NULL}, + {"ai_disable_veh_ship", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_ship), NULL}, + {"starting_date", SDT_UINT32, (void*)1950, (void*)offsetof(Patches, starting_date), NULL}, - {"ai_disable_veh_train", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_train)}, - {"ai_disable_veh_roadveh", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_roadveh)}, - {"ai_disable_veh_aircraft", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_aircraft)}, - {"ai_disable_veh_ship", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ai_disable_veh_ship)}, - {"starting_date", SDT_UINT32, (void*)1950, (void*)offsetof(Patches, starting_date)}, + {"colored_news_date", SDT_UINT32, (void*)2000, (void*)offsetof(Patches, colored_news_date), NULL}, - {"colored_news_date", SDT_UINT32, (void*)2000, (void*)offsetof(Patches, colored_news_date)}, + {"bridge_pillars", SDT_BOOL, (void*)true, (void*)offsetof(Patches, bridge_pillars), NULL}, + {"invisible_trees", SDT_BOOL, (void*)false, (void*)offsetof(Patches, invisible_trees), NULL}, - {"bridge_pillars", SDT_BOOL, (void*)true, (void*)offsetof(Patches, bridge_pillars)}, - {"invisible_trees", SDT_BOOL, (void*)false, (void*)offsetof(Patches, invisible_trees)}, + {"keep_all_autosave", SDT_BOOL, (void*)false, (void*)offsetof(Patches, keep_all_autosave), NULL}, - {"keep_all_autosave", SDT_BOOL, (void*)false, (void*)offsetof(Patches, keep_all_autosave)}, + {"extra_dynamite", SDT_BOOL, (void*)false, (void*)offsetof(Patches, extra_dynamite), NULL}, - {"extra_dynamite", SDT_BOOL, (void*)false, (void*)offsetof(Patches, extra_dynamite)}, + {"never_expire_vehicles",SDT_BOOL, (void*)false, (void*)offsetof(Patches, never_expire_vehicles),NULL}, + {"extend_vehicle_life", SDT_UINT8, (void*)0, (void*)offsetof(Patches, extend_vehicle_life), NULL}, - {"never_expire_vehicles", SDT_BOOL, (void*)false, (void*)offsetof(Patches, never_expire_vehicles)}, - {"extend_vehicle_life", SDT_UINT8, (void*)0, (void*)offsetof(Patches, extend_vehicle_life)}, + {"auto_euro", SDT_BOOL, (void*)true, (void*)offsetof(Patches, auto_euro), NULL}, - {"auto_euro", SDT_BOOL, (void*)true, (void*)offsetof(Patches, auto_euro)}, + {"serviceathelipad", SDT_BOOL, (void*)true, (void*)offsetof(Patches, serviceathelipad), NULL}, + {"smooth_economy", SDT_BOOL, (void*)false, (void*)offsetof(Patches, smooth_economy), NULL}, + {"dist_local_authority",SDT_UINT8, (void*)20, (void*)offsetof(Patches, dist_local_authority), NULL}, - {"serviceathelipad", SDT_BOOL, (void*)true, (void*)offsetof(Patches, serviceathelipad)}, - {"smooth_economy", SDT_BOOL, (void*)false, (void*)offsetof(Patches, smooth_economy)}, - {"dist_local_authority", SDT_UINT8, (void*)20, (void*)offsetof(Patches, dist_local_authority)}, - - {"wait_oneway_signal", SDT_UINT8, (void*)15, (void*)offsetof(Patches, wait_oneway_signal)}, - {"wait_twoway_signal", SDT_UINT8, (void*)41, (void*)offsetof(Patches, wait_twoway_signal)}, + {"wait_oneway_signal", SDT_UINT8, (void*)15, (void*)offsetof(Patches, wait_oneway_signal), NULL}, + {"wait_twoway_signal", SDT_UINT8, (void*)41, (void*)offsetof(Patches, wait_twoway_signal), NULL}, - {"ainew_active", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ainew_active)}, + {"ainew_active", SDT_BOOL, (void*)false, (void*)offsetof(Patches, ainew_active), NULL}, - {"drag_signals_density", SDT_UINT8, (void*)4, (void*)offsetof(Patches, drag_signals_density)}, + {"drag_signals_density",SDT_UINT8, (void*)4, (void*)offsetof(Patches, drag_signals_density), NULL}, - {NULL} + {NULL, 0, NULL, NULL, NULL} }; typedef void SettingDescProc(IniFile *ini, const SettingDesc *desc, void *grpname, void *base); static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc) { - proc(ini, misc_settings, "misc", NULL); - proc(ini, win32_settings, "win32", NULL); - proc(ini, network_settings, "network", NULL); - proc(ini, music_settings, "music", &msf); - proc(ini, gameopt_settings, "gameopt", &_new_opt); - proc(ini, patch_settings, "patches", &_patches); - - proc(ini, debug_settings, "debug", NULL); + proc(ini, misc_settings, "misc", NULL); + proc(ini, win32_settings, "win32", NULL); + proc(ini, network_settings, "network", NULL); + proc(ini, music_settings, "music", &msf); + proc(ini, gameopt_settings, "gameopt", &_new_opt); + proc(ini, patch_settings, "patches", &_patches); + + proc(ini, debug_settings, "debug", NULL); } void LoadGrfSettings(IniFile *ini) diff --git a/settings_gui.c b/settings_gui.c index 7245fee9d..83173aaca 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -541,101 +541,101 @@ typedef struct PatchEntry { } PatchEntry; enum { - PE_BOOL = 0, - PE_UINT8 = 1, - PE_INT16 = 2, - PE_UINT16 = 3, - PE_INT32 = 4, - PE_CURRENCY = 5, - - PF_0ISDIS = 1, - PF_NOCOMMA = 2, - PF_MULTISTRING = 4, + PE_BOOL = 0, + PE_UINT8 = 1, + PE_INT16 = 2, + PE_UINT16 = 3, + PE_INT32 = 4, + PE_CURRENCY = 5, + + PF_0ISDIS = 1, + PF_NOCOMMA = 2, + PF_MULTISTRING = 4, }; static const PatchEntry _patches_ui[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_VEHICLESPEED, &_patches.vehicle_speed}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_LONGDATE, &_patches.status_long_date}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SHOWFINANCES, &_patches.show_finances}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AUTOSCROLL, &_patches.autoscroll}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_VEHICLESPEED, &_patches.vehicle_speed, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_LONGDATE, &_patches.status_long_date, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SHOWFINANCES, &_patches.show_finances, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AUTOSCROLL, &_patches.autoscroll, 0, 0, 0, NULL}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_ERRMSG_DURATION, &_patches.errmsg_duration, 0, 20, 1}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_ERRMSG_DURATION, &_patches.errmsg_duration, 0, 20, 1, NULL}, - {PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_TOOLBAR_POS, &_patches.toolbar_pos, 0, 2, 1, &v_PositionMainToolbar}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_INVISIBLE_TREES, &_patches.invisible_trees, 0, 1, 1, &InvisibleTreesActive}, + {PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_TOOLBAR_POS, &_patches.toolbar_pos, 0, 2, 1, &v_PositionMainToolbar}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_INVISIBLE_TREES, &_patches.invisible_trees, 0, 1, 1, &InvisibleTreesActive}, }; static const PatchEntry _patches_construction[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_BUILDONSLOPES, &_patches.build_on_slopes}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_EXTRADYNAMITE, &_patches.extra_dynamite}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_LONGBRIDGES, &_patches.longbridges}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SIGNALSIDE, &_patches.signal_side}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_BUILDONSLOPES, &_patches.build_on_slopes, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_EXTRADYNAMITE, &_patches.extra_dynamite, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_LONGBRIDGES, &_patches.longbridges, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SIGNALSIDE, &_patches.signal_side, 0, 0, 0, NULL}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SMALL_AIRPORTS, &_patches.always_small_airport}, - {PE_UINT8,0, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY, &_patches.drag_signals_density, 1, 20, 1}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SMALL_AIRPORTS, &_patches.always_small_airport, 0, 0, 0, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY, &_patches.drag_signals_density, 1, 20, 1, NULL}, }; static const PatchEntry _patches_vehicles[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_REALISTICACCEL, &_patches.realistic_acceleration}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_MAMMOTHTRAINS, &_patches.mammoth_trains}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_GOTODEPOT, &_patches.gotodepot}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_ROADVEH_QUEUE, &_patches.roadveh_queue}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_DEPOT_FINDING, &_patches.new_depot_finding}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_TRAIN_PATHFIND, &_patches.new_pathfinding}, - - {PE_BOOL, 0, STR_CONFIG_PATCHES_WARN_INCOME_LESS, &_patches.train_income_warn}, - {PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_ORDER_REVIEW, &_patches.order_review_system,0,2,1}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_NEVER_EXPIRE_VEHICLES, &_patches.never_expire_vehicles}, - - {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_LOST_TRAIN_DAYS, &_patches.lost_train_days, 180, 720, 60}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AUTORENEW_VEHICLE, &_patches.autorenew}, - {PE_INT16, 0, STR_CONFIG_PATCHES_AUTORENEW_MONTHS, &_patches.autorenew_months, -12, 12, 1}, - {PE_CURRENCY, 0, STR_CONFIG_PATCHES_AUTORENEW_MONEY, &_patches.autorenew_money, 0, 2000000, 100000}, - - {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_TRAINS, &_patches.max_trains, 0, 240, 10}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_ROADVEH, &_patches.max_roadveh, 0, 240, 10}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_AIRCRAFT, &_patches.max_aircraft, 0, 240, 10}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_SHIPS, &_patches.max_ships, 0, 240, 10}, - - {PE_BOOL, 0, STR_CONFIG_PATCHES_SERVINT_ISPERCENT, &_patches.servint_ispercent, 0, 0, 0, &CheckInterval}, - {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_TRAINS, &_patches.servint_trains, 5, 800, 5, &InValidateDetailsWindow}, - {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_ROADVEH, &_patches.servint_roadveh, 5, 800, 5, &InValidateDetailsWindow}, - {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT, &_patches.servint_aircraft, 5, 800, 5, &InValidateDetailsWindow}, - {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_SHIPS, &_patches.servint_ships, 5, 800, 5, &InValidateDetailsWindow}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_REALISTICACCEL, &_patches.realistic_acceleration, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_MAMMOTHTRAINS, &_patches.mammoth_trains, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_GOTODEPOT, &_patches.gotodepot, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_ROADVEH_QUEUE, &_patches.roadveh_queue, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_DEPOT_FINDING,&_patches.new_depot_finding, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_TRAIN_PATHFIND, &_patches.new_pathfinding, 0, 0, 0, NULL}, + + {PE_BOOL, 0, STR_CONFIG_PATCHES_WARN_INCOME_LESS, &_patches.train_income_warn, 0, 0, 0, NULL}, + {PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_ORDER_REVIEW,&_patches.order_review_system,0,2, 1, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_NEVER_EXPIRE_VEHICLES, &_patches.never_expire_vehicles,0,0,0, NULL}, + + {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_LOST_TRAIN_DAYS, &_patches.lost_train_days, 180,720, 60, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AUTORENEW_VEHICLE,&_patches.autorenew, 0, 0, 0, NULL}, + {PE_INT16, 0, STR_CONFIG_PATCHES_AUTORENEW_MONTHS, &_patches.autorenew_months, -12, 12, 1, NULL}, + {PE_CURRENCY, 0, STR_CONFIG_PATCHES_AUTORENEW_MONEY,&_patches.autorenew_money, 0, 2000000, 100000, NULL}, + + {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_TRAINS, &_patches.max_trains, 0,240, 10, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_ROADVEH, &_patches.max_roadveh, 0,240, 10, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_AIRCRAFT, &_patches.max_aircraft, 0,240, 10, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_SHIPS, &_patches.max_ships, 0,240, 10, NULL}, + + {PE_BOOL, 0, STR_CONFIG_PATCHES_SERVINT_ISPERCENT,&_patches.servint_ispercent, 0, 0, 0, &CheckInterval}, + {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_TRAINS, &_patches.servint_trains, 5,800, 5, &InValidateDetailsWindow}, + {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_ROADVEH, &_patches.servint_roadveh, 5,800, 5, &InValidateDetailsWindow}, + {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT, &_patches.servint_aircraft, 5,800, 5, &InValidateDetailsWindow}, + {PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_SHIPS, &_patches.servint_ships, 5,800, 5, &InValidateDetailsWindow}, }; static const PatchEntry _patches_stations[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_JOINSTATIONS, &_patches.join_stations}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_FULLLOADANY, &_patches.full_load_any}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SELECTGOODS, &_patches.selectgoods}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_NONSTOP, &_patches.new_nonstop}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_NONUNIFORM_STATIONS, &_patches.nonuniform_stations}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_STATION_SPREAD, &_patches.station_spread, 4, 64, 1}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SERVICEATHELIPAD, &_patches.serviceathelipad}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_JOINSTATIONS, &_patches.join_stations, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_FULLLOADANY, &_patches.full_load_any, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SELECTGOODS, &_patches.selectgoods, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_NONSTOP, &_patches.new_nonstop, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_NONUNIFORM_STATIONS, &_patches.nonuniform_stations, 0, 0, 0, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_STATION_SPREAD, &_patches.station_spread, 4, 64, 1, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SERVICEATHELIPAD, &_patches.serviceathelipad, 0, 0, 0, NULL}, }; static const PatchEntry _patches_economy[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_INFLATION, &_patches.inflation}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_BUILDXTRAIND, &_patches.build_rawmaterial_ind}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_MULTIPINDTOWN, &_patches.multiple_industry_per_town}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SAMEINDCLOSE, &_patches.same_industry_close}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_BRIBE, &_patches.bribe}, - {PE_UINT8, 0, STR_CONFIG_PATCHES_SNOWLINE_HEIGHT, &_patches.snow_line_height, 2, 13, 1}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_INFLATION, &_patches.inflation, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_BUILDXTRAIND, &_patches.build_rawmaterial_ind, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_MULTIPINDTOWN, &_patches.multiple_industry_per_town,0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SAMEINDCLOSE, &_patches.same_industry_close, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_BRIBE, &_patches.bribe, 0, 0, 0, NULL}, + {PE_UINT8, 0, STR_CONFIG_PATCHES_SNOWLINE_HEIGHT, &_patches.snow_line_height, 2, 13, 1, NULL}, - {PE_INT32, PF_NOCOMMA, STR_CONFIG_PATCHES_COLORED_NEWS_DATE, &_patches.colored_news_date, 1900, 2200, 5}, - {PE_INT32, PF_NOCOMMA, STR_CONFIG_PATCHES_STARTING_DATE, &_patches.starting_date, 1920, 2100, 1}, + {PE_INT32, PF_NOCOMMA, STR_CONFIG_PATCHES_COLORED_NEWS_DATE, &_patches.colored_news_date, 1900, 2200, 5, NULL}, + {PE_INT32, PF_NOCOMMA, STR_CONFIG_PATCHES_STARTING_DATE, &_patches.starting_date, 1920,2100, 1, NULL}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_SMOOTH_ECONOMY, &_patches.smooth_economy}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_SMOOTH_ECONOMY, &_patches.smooth_economy, 0, 0, 0, NULL}, }; static const PatchEntry _patches_ai[] = { - {PE_BOOL, 0, STR_CONFIG_PATCHES_AINEW_ACTIVE, &_patches.ainew_active, 0, 1, 1, &AiNew_PatchActive_Warning}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AINEW_ACTIVE, &_patches.ainew_active, 0, 1, 1, &AiNew_PatchActive_Warning}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, &_patches.ai_disable_veh_train}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH, &_patches.ai_disable_veh_roadveh}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT, &_patches.ai_disable_veh_aircraft}, - {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_SHIPS, &_patches.ai_disable_veh_ship}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, &_patches.ai_disable_veh_train, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH,&_patches.ai_disable_veh_roadveh, 0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT, &_patches.ai_disable_veh_aircraft,0, 0, 0, NULL}, + {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_SHIPS, &_patches.ai_disable_veh_ship, 0, 0, 0, NULL}, }; typedef struct PatchPage { @@ -644,12 +644,12 @@ typedef struct PatchPage { } PatchPage; static const PatchPage _patches_page[] = { - {_patches_ui, lengthof(_patches_ui) }, + {_patches_ui, lengthof(_patches_ui) }, {_patches_construction, lengthof(_patches_construction) }, - {_patches_vehicles, lengthof(_patches_vehicles) }, - {_patches_stations, lengthof(_patches_stations) }, - {_patches_economy, lengthof(_patches_economy) }, - {_patches_ai, lengthof(_patches_ai) }, + {_patches_vehicles, lengthof(_patches_vehicles) }, + {_patches_stations, lengthof(_patches_stations) }, + {_patches_economy, lengthof(_patches_economy) }, + {_patches_ai, lengthof(_patches_ai) }, }; extern uint GetCurrentCurrencyRate(); diff --git a/unix.c b/unix.c index 90663f72d..f9f7eeccd 100644 --- a/unix.c +++ b/unix.c @@ -318,19 +318,19 @@ void FiosDelete(const char *name) } const DriverDesc _video_driver_descs[] = { - {"null", "Null Video Driver", &_null_video_driver, 0}, + {"null", "Null Video Driver", &_null_video_driver, 0}, #if defined(WITH_SDL) - {"sdl", "SDL Video Driver", &_sdl_video_driver, 1}, + { "sdl", "SDL Video Driver", &_sdl_video_driver, 1}, #endif - {NULL} + { NULL, NULL, NULL, 0} }; const DriverDesc _sound_driver_descs[] = { - {"null", "Null Sound Driver", &_null_sound_driver, 0}, + {"null", "Null Sound Driver", &_null_sound_driver, 0}, #if defined(WITH_SDL) - {"sdl", "SDL Sound Driver", &_sdl_sound_driver, 1}, + { "sdl", "SDL Sound Driver", &_sdl_sound_driver, 1}, #endif - {NULL} + { NULL, NULL, NULL, 0} }; #if defined(__APPLE__) @@ -343,14 +343,14 @@ const DriverDesc _music_driver_descs[] = { #ifndef __BEOS__ #ifndef __MORPHOS__ // MorphOS have no music support - {"extmidi", "External MIDI Driver", &_extmidi_music_driver, EXTMIDI_PRI}, + {"extmidi", "External MIDI Driver", &_extmidi_music_driver, EXTMIDI_PRI}, #endif #endif #ifdef __BEOS__ - {"bemidi", "BeOS MIDI Driver", &_bemidi_music_driver, 1}, + { "bemidi", "BeOS MIDI Driver", &_bemidi_music_driver, 1}, #endif - {"null", "Null Music Driver", &_null_music_driver, 1}, - {NULL} + { "null", "Null Music Driver", &_null_music_driver, 1}, + { NULL, NULL, NULL, 0} }; bool FileExists(const char *filename) -- cgit v1.2.3-70-g09d2