summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-03-24 17:03:37 +0000
committertruelight <truelight@openttd.org>2005-03-24 17:03:37 +0000
commitd1e158d6f723b6fcb2f1edf1ffac29b81ed307e7 (patch)
tree45d160ba77950eea4f380bd7ff3bbcf6644f651a /main_gui.c
parent625d041e99b5ddd75a8f4cd3a1e11d9923d219f9 (diff)
downloadopenttd-d1e158d6f723b6fcb2f1edf1ffac29b81ed307e7.tar.xz
(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-Codechange: rewrote some functions while moving waypoint-stuff -Add: added support for 64k waypoints -Fix: made the waypoint struct a bit more logic (no bit-fucking)
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main_gui.c b/main_gui.c
index 3c411122e..22f0afd15 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -19,6 +19,7 @@
#include "sound.h"
#include "network.h"
#include "signs.h"
+#include "waypoint.h"
#ifdef ENABLE_NETWORK
#include "network_data.h"
@@ -390,14 +391,14 @@ void ShowRenameSignWindow(SignStruct *ss)
ShowQueryString(ss->str, STR_280B_EDIT_SIGN_TEXT, 30, 180, 1, 0);
}
-void ShowRenameWaypointWindow(Waypoint *cp)
+void ShowRenameWaypointWindow(Waypoint *wp)
{
- int id = cp - _waypoints;
+ int id = wp->index;
/* Are we allowed to change the name of the waypoint? */
- if (!CheckTileOwnership(cp->xy)) {
+ if (!CheckTileOwnership(wp->xy)) {
ShowErrorMessage(_error_message, STR_CANT_CHANGE_WAYPOINT_NAME,
- TileX(cp->xy) * 16, TileY(cp->xy) * 16);
+ TileX(wp->xy) * 16, TileY(wp->xy) * 16);
return;
}