equal
deleted
inserted
replaced
12 #include "town.h" |
12 #include "town.h" |
13 #include "vehicle.h" |
13 #include "vehicle.h" |
14 #include "console.h" |
14 #include "console.h" |
15 #include "sound.h" |
15 #include "sound.h" |
16 #include "network.h" |
16 #include "network.h" |
|
17 #include "signs.h" |
17 |
18 |
18 #ifdef ENABLE_NETWORK |
19 #ifdef ENABLE_NETWORK |
19 #include "network_data.h" |
20 #include "network_data.h" |
20 #include "network_client.h" |
21 #include "network_client.h" |
21 #include "network_server.h" |
22 #include "network_server.h" |
368 |
369 |
369 #endif /* ENABLE_NETWORK */ |
370 #endif /* ENABLE_NETWORK */ |
370 |
371 |
371 void ShowRenameSignWindow(SignStruct *ss) |
372 void ShowRenameSignWindow(SignStruct *ss) |
372 { |
373 { |
373 _rename_id = ss - _sign_list; |
374 _rename_id = ss->index; |
374 _rename_what = 0; |
375 _rename_what = 0; |
375 ShowQueryString(ss->str, STR_280B_EDIT_SIGN_TEXT, 30, 180, 1, 0); |
376 ShowQueryString(ss->str, STR_280B_EDIT_SIGN_TEXT, 30, 180, 1, 0); |
376 } |
377 } |
377 |
378 |
378 void ShowRenameWaypointWindow(Waypoint *cp) |
379 void ShowRenameWaypointWindow(Waypoint *cp) |
388 |
389 |
389 _rename_id = id; |
390 _rename_id = id; |
390 _rename_what = 1; |
391 _rename_what = 1; |
391 SetDParam(0, id); |
392 SetDParam(0, id); |
392 ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, 1, 0); |
393 ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, 1, 0); |
393 } |
|
394 |
|
395 void CcPlaceSign(bool success, uint tile, uint32 p1, uint32 p2) |
|
396 { |
|
397 if (success) { |
|
398 ShowRenameSignWindow(_new_sign_struct); |
|
399 ResetObjectToPlace(); |
|
400 } |
|
401 } |
|
402 |
|
403 void PlaceProc_Sign(uint tile) |
|
404 { |
|
405 DoCommandP(tile, 0, 0, CcPlaceSign, CMD_PLACE_SIGN | CMD_MSG(STR_2809_CAN_T_PLACE_SIGN_HERE)); |
|
406 } |
394 } |
407 |
395 |
408 static void SelectSignTool() |
396 static void SelectSignTool() |
409 { |
397 { |
410 if (_cursor.sprite == 0x2D2) |
398 if (_cursor.sprite == 0x2D2) |