equal
deleted
inserted
replaced
20 static byte _road_depot_orientation; |
20 static byte _road_depot_orientation; |
21 static byte _road_station_picker_orientation; |
21 static byte _road_station_picker_orientation; |
22 |
22 |
23 static void CcPlaySound1D(bool success, uint tile, uint32 p1, uint32 p2) |
23 static void CcPlaySound1D(bool success, uint tile, uint32 p1, uint32 p2) |
24 { |
24 { |
25 if (success) { SndPlayTileFx(0x1D, tile); } |
25 if (success) SndPlayTileFx(SND_1F_SPLAT, tile); |
26 } |
26 } |
27 |
27 |
28 static void PlaceRoad_NE(uint tile) |
28 static void PlaceRoad_NE(uint tile) |
29 { |
29 { |
30 _place_road_flag = (_tile_fract_coords.y >= 8) + 4; |
30 _place_road_flag = (_tile_fract_coords.y >= 8) + 4; |
44 |
44 |
45 |
45 |
46 static void CcBuildTunnel(bool success, uint tile, uint32 p1, uint32 p2) |
46 static void CcBuildTunnel(bool success, uint tile, uint32 p1, uint32 p2) |
47 { |
47 { |
48 if (success) { |
48 if (success) { |
49 SndPlayTileFx(0x1E, tile); |
49 SndPlayTileFx(SND_20_SPLAT_2, tile); |
50 ResetObjectToPlace(); |
50 ResetObjectToPlace(); |
51 } else { |
51 } else { |
52 SetRedErrorSquare(_build_tunnel_endtile); |
52 SetRedErrorSquare(_build_tunnel_endtile); |
53 } |
53 } |
54 } |
54 } |
69 } |
69 } |
70 |
70 |
71 static void CcDepot(bool success, uint tile, uint32 p1, uint32 p2) |
71 static void CcDepot(bool success, uint tile, uint32 p1, uint32 p2) |
72 { |
72 { |
73 if (success) { |
73 if (success) { |
74 SndPlayTileFx(0x1D, tile); |
74 SndPlayTileFx(SND_1F_SPLAT, tile); |
75 ResetObjectToPlace(); |
75 ResetObjectToPlace(); |
76 BuildRoadOutsideStation(tile, (int)p1); |
76 BuildRoadOutsideStation(tile, (int)p1); |
77 } |
77 } |
78 } |
78 } |
79 |
79 |
157 static void BuildRoadClick_Remove(Window *w) |
157 static void BuildRoadClick_Remove(Window *w) |
158 { |
158 { |
159 if (w->disabled_state & (1<<12)) |
159 if (w->disabled_state & (1<<12)) |
160 return; |
160 return; |
161 SetWindowDirty(w); |
161 SetWindowDirty(w); |
162 SndPlayFx(0x13); |
162 SndPlayFx(SND_15_BEEP); |
163 _thd.make_square_red = !!((w->click_state ^= (1 << 12)) & (1<<12)); |
163 _thd.make_square_red = !!((w->click_state ^= (1 << 12)) & (1<<12)); |
164 MarkTileDirty(_thd.pos.x, _thd.pos.y); |
164 MarkTileDirty(_thd.pos.x, _thd.pos.y); |
165 } |
165 } |
166 |
166 |
167 static void BuildRoadClick_Purchase(Window *w) |
167 static void BuildRoadClick_Purchase(Window *w) |
360 case 3: |
360 case 3: |
361 case 4: |
361 case 4: |
362 case 5: |
362 case 5: |
363 case 6: |
363 case 6: |
364 _road_depot_orientation = e->click.widget - 3; |
364 _road_depot_orientation = e->click.widget - 3; |
365 SndPlayFx(0x13); |
365 SndPlayFx(SND_15_BEEP); |
366 SetWindowDirty(w); |
366 SetWindowDirty(w); |
367 break; |
367 break; |
368 } |
368 } |
369 } break; |
369 } break; |
370 |
370 |
434 case 3: |
434 case 3: |
435 case 4: |
435 case 4: |
436 case 5: |
436 case 5: |
437 case 6: |
437 case 6: |
438 _road_station_picker_orientation = e->click.widget - 3; |
438 _road_station_picker_orientation = e->click.widget - 3; |
439 SndPlayFx(0x13); |
439 SndPlayFx(SND_15_BEEP); |
440 SetWindowDirty(w); |
440 SetWindowDirty(w); |
441 break; |
441 break; |
442 case 7: |
442 case 7: |
443 case 8: |
443 case 8: |
444 _station_show_coverage = e->click.widget - 7; |
444 _station_show_coverage = e->click.widget - 7; |
445 SndPlayFx(0x13); |
445 SndPlayFx(SND_15_BEEP); |
446 SetWindowDirty(w); |
446 SetWindowDirty(w); |
447 break; |
447 break; |
448 } |
448 } |
449 } break; |
449 } break; |
450 |
450 |