rail_gui.c
changeset 3157 3f35e2d9c8e3
parent 3132 4ecd7f40fc76
child 3269 62fb247bf94b
equal deleted inserted replaced
3156:f4caf4197189 3157:3f35e2d9c8e3
    21 #include "debug.h"
    21 #include "debug.h"
    22 #include "variables.h"
    22 #include "variables.h"
    23 
    23 
    24 static RailType _cur_railtype;
    24 static RailType _cur_railtype;
    25 static bool _remove_button_clicked;
    25 static bool _remove_button_clicked;
    26 static byte _build_depot_direction;
    26 static DiagDirection _build_depot_direction;
    27 static byte _waypoint_count = 1;
    27 static byte _waypoint_count = 1;
    28 static byte _cur_waypoint_type;
    28 static byte _cur_waypoint_type;
    29 
    29 
    30 static struct {
    30 static struct {
    31 	byte orientation;
    31 	byte orientation;
    99 
    99 
   100 
   100 
   101 void CcRailDepot(bool success, TileIndex tile, uint32 p1, uint32 p2)
   101 void CcRailDepot(bool success, TileIndex tile, uint32 p1, uint32 p2)
   102 {
   102 {
   103 	if (success) {
   103 	if (success) {
   104 		int dir = p2;
   104 		DiagDirection dir = p2;
   105 
   105 
   106 		SndPlayTileFx(SND_20_SPLAT_2, tile);
   106 		SndPlayTileFx(SND_20_SPLAT_2, tile);
   107 		ResetObjectToPlace();
   107 		ResetObjectToPlace();
   108 
   108 
   109 		tile += TileOffsByDir(dir);
   109 		tile += TileOffsByDir(dir);
   899 }
   899 }
   900 
   900 
   901 
   901 
   902 void InitializeRailGui(void)
   902 void InitializeRailGui(void)
   903 {
   903 {
   904 	_build_depot_direction = 3;
   904 	_build_depot_direction = DIAGDIR_NW;
   905 	_railstation.numtracks = 1;
   905 	_railstation.numtracks = 1;
   906 	_railstation.platlength = 1;
   906 	_railstation.platlength = 1;
   907 	_railstation.dragdrop = true;
   907 	_railstation.dragdrop = true;
   908 }
   908 }