dock_gui.c
changeset 3157 3f35e2d9c8e3
parent 2952 58522ed8f0f1
child 3636 a36cc46e754d
equal deleted inserted replaced
3156:f4caf4197189 3157:3f35e2d9c8e3
    16 #include "variables.h"
    16 #include "variables.h"
    17 
    17 
    18 static void ShowBuildDockStationPicker(void);
    18 static void ShowBuildDockStationPicker(void);
    19 static void ShowBuildDocksDepotPicker(void);
    19 static void ShowBuildDocksDepotPicker(void);
    20 
    20 
    21 static byte _ship_depot_direction;
    21 static Axis _ship_depot_direction;
    22 
    22 
    23 void CcBuildDocks(bool success, TileIndex tile, uint32 p1, uint32 p2)
    23 void CcBuildDocks(bool success, TileIndex tile, uint32 p1, uint32 p2)
    24 {
    24 {
    25 	if (success) {
    25 	if (success) {
    26 		SndPlayTileFx(SND_02_SPLAT, tile);
    26 		SndPlayTileFx(SND_02_SPLAT, tile);
   291 	AllocateWindowDesc(&_build_dock_station_desc);
   291 	AllocateWindowDesc(&_build_dock_station_desc);
   292 }
   292 }
   293 
   293 
   294 static void UpdateDocksDirection(void)
   294 static void UpdateDocksDirection(void)
   295 {
   295 {
   296 	if (_ship_depot_direction != 0) {
   296 	if (_ship_depot_direction != AXIS_X) {
   297 		SetTileSelectSize(1, 2);
   297 		SetTileSelectSize(1, 2);
   298 	} else {
   298 	} else {
   299 		SetTileSelectSize(2, 1);
   299 		SetTileSelectSize(2, 1);
   300 	}
   300 	}
   301 }
   301 }
   360 }
   360 }
   361 
   361 
   362 
   362 
   363 void InitializeDockGui(void)
   363 void InitializeDockGui(void)
   364 {
   364 {
   365 	_ship_depot_direction = 0;
   365 	_ship_depot_direction = AXIS_X;
   366 }
   366 }