summaryrefslogtreecommitdiff
path: root/newgrf_station.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-20 17:04:08 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-20 17:04:08 +0000
commitc8b1ff8654708fa0b156bb0936c5bb7053850854 (patch)
tree2b85744b60fcd7085bb5bb2052610cd2f8a17edf /newgrf_station.c
parent3d137e9c0f25fb3d9fc2cfa5013310818c0d37da (diff)
downloadopenttd-c8b1ff8654708fa0b156bb0936c5bb7053850854.tar.xz
(svn r4484) - Newstations: Use StringIDs instead of char*s to reference our custom names.
Diffstat (limited to 'newgrf_station.c')
-rw-r--r--newgrf_station.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index ce336c6ae..4151fcae3 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -6,6 +6,7 @@
#include "openttd.h"
#include "debug.h"
#include "sprite.h"
+#include "table/strings.h"
#include "station.h"
#include "station_map.h"
#include "newgrf_station.h"
@@ -22,10 +23,7 @@ void ResetStationClasses(void)
StationClassID i;
for (i = 0; i < STAT_CLASS_MAX; i++) {
station_classes[i].id = 0;
-
- free(station_classes[i].name);
- station_classes[i].name = NULL;
-
+ station_classes[i].name = STR_EMPTY;
station_classes[i].stations = 0;
free(station_classes[i].spec);
@@ -34,13 +32,13 @@ void ResetStationClasses(void)
// Set up initial data
station_classes[0].id = 'DFLT';
- station_classes[0].name = strdup("Default");
+ station_classes[0].name = STR_STAT_CLASS_DFLT;
station_classes[0].stations = 1;
station_classes[0].spec = malloc(sizeof(*station_classes[0].spec));
station_classes[0].spec[0] = NULL;
station_classes[1].id = 'WAYP';
- station_classes[1].name = strdup("Waypoints");
+ station_classes[1].name = STR_STAT_CLASS_WAYP;
station_classes[1].stations = 1;
station_classes[1].spec = malloc(sizeof(*station_classes[1].spec));
station_classes[1].spec[0] = NULL;