summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp2
-rw-r--r--src/network/network_internal.h2
-rw-r--r--src/oldloader.cpp2
-rw-r--r--src/openttd.cpp3
-rw-r--r--src/signs.cpp3
-rw-r--r--src/signs_base.h (renamed from src/signs.h)28
-rw-r--r--src/signs_func.h21
-rw-r--r--src/signs_gui.cpp3
-rw-r--r--src/signs_type.h15
-rw-r--r--src/strings.cpp2
-rw-r--r--src/terraform_gui.cpp2
-rw-r--r--src/viewport.cpp3
12 files changed, 54 insertions, 32 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 3bf1ed798..e43bfd7ba 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -16,7 +16,7 @@
#include "news_func.h"
#include "town.h"
#include "console.h"
-#include "signs.h"
+#include "signs_func.h"
#include "waypoint.h"
#include "variables.h"
#include "train.h"
diff --git a/src/network/network_internal.h b/src/network/network_internal.h
index ae4c56c5a..f44d36133 100644
--- a/src/network/network_internal.h
+++ b/src/network/network_internal.h
@@ -45,7 +45,7 @@ enum {
/** How many vehicle/station types we put over the network */
NETWORK_VEHICLE_TYPES = 5,
NETWORK_STATION_TYPES = 5,
-}
+};
struct NetworkPlayerInfo {
char company_name[NETWORK_NAME_LENGTH]; ///< Company name
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index a5bf88f71..a84cb66fe 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -13,7 +13,7 @@
#include "roadveh.h"
#include "ship.h"
#include "train.h"
-#include "signs.h"
+#include "signs_base.h"
#include "debug.h"
#include "depot.h"
#include "newgrf_config.h"
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 81cfef80d..a82636b6f 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -44,7 +44,8 @@
#include "console.h"
#include "screenshot.h"
#include "network/network.h"
-#include "signs.h"
+#include "signs_base.h"
+#include "signs_func.h"
#include "depot.h"
#include "waypoint.h"
#include "ai/ai.h"
diff --git a/src/signs.cpp b/src/signs.cpp
index 7444bf024..4b3146b22 100644
--- a/src/signs.cpp
+++ b/src/signs.cpp
@@ -6,7 +6,8 @@
#include "openttd.h"
#include "landscape.h"
#include "player_func.h"
-#include "signs.h"
+#include "signs_base.h"
+#include "signs_func.h"
#include "saveload.h"
#include "command_func.h"
#include "variables.h"
diff --git a/src/signs.h b/src/signs_base.h
index ebf32f243..3fd945b5a 100644
--- a/src/signs.h
+++ b/src/signs_base.h
@@ -1,14 +1,13 @@
/* $Id$ */
-/** @file signs.h */
+/** @file signs_base.h Base class for signs. */
-#ifndef SIGNS_H
-#define SIGNS_H
+#ifndef SIGNS_BASE_H
+#define SIGNS_BASE_H
+#include "signs_type.h"
#include "oldpool.h"
-typedef uint16 SignID;
-struct Sign;
DECLARE_OLD_POOL(Sign, Sign, 2, 16000)
struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
@@ -30,13 +29,6 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
inline bool IsValid() const { return this->owner != INVALID_PLAYER; }
};
-enum {
- INVALID_SIGN = 0xFFFF,
-};
-
-extern SignID _new_sign_id;
-
-
static inline SignID GetMaxSignIndex()
{
/* TODO - This isn't the real content of the function, but
@@ -61,14 +53,4 @@ static inline bool IsValidSignID(uint index)
#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1U < GetSignPoolSize()) ? GetSign(ss->index + 1U) : NULL) if (ss->IsValid())
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)
-extern bool _sign_sort_dirty;
-
-void UpdateAllSignVirtCoords();
-void PlaceProc_Sign(TileIndex tile);
-
-/* signs_gui.cpp */
-void ShowRenameSignWindow(const Sign *si);
-
-void ShowSignList();
-
-#endif /* SIGNS_H */
+#endif /* SIGNS_BASE_H */
diff --git a/src/signs_func.h b/src/signs_func.h
new file mode 100644
index 000000000..5a38ba748
--- /dev/null
+++ b/src/signs_func.h
@@ -0,0 +1,21 @@
+/* $Id$ */
+
+/** @file signs_func.h Functions related to signs. */
+
+#ifndef SIGNS_FUNC_H
+#define SIGNS_FUNC_H
+
+#include "signs_type.h"
+
+extern SignID _new_sign_id;
+extern bool _sign_sort_dirty;
+
+void UpdateAllSignVirtCoords();
+void PlaceProc_Sign(TileIndex tile);
+
+/* signs_gui.cpp */
+void ShowRenameSignWindow(const Sign *si);
+
+void ShowSignList();
+
+#endif /* SIGNS_FUNC_H */
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index ce533954c..2e01f260a 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -8,7 +8,8 @@
#include "textbuf_gui.h"
#include "window_gui.h"
#include "player_gui.h"
-#include "signs.h"
+#include "signs_base.h"
+#include "signs_func.h"
#include "debug.h"
#include "variables.h"
#include "command_func.h"
diff --git a/src/signs_type.h b/src/signs_type.h
new file mode 100644
index 000000000..7f1dc5f4f
--- /dev/null
+++ b/src/signs_type.h
@@ -0,0 +1,15 @@
+/* $Id$ */
+
+/** @file signs_type.h Types related to signs */
+
+#ifndef SIGNS_TYPE_H
+#define SIGNS_TYPE_H
+
+typedef uint16 SignID;
+struct Sign;
+
+enum {
+ INVALID_SIGN = 0xFFFF,
+};
+
+#endif /* SIGNS_TYPE_H */
diff --git a/src/strings.cpp b/src/strings.cpp
index 62e822438..2fcb7055c 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -20,7 +20,7 @@
#include "group.h"
#include "debug.h"
#include "newgrf_townname.h"
-#include "signs.h"
+#include "signs_base.h"
#include "newgrf_engine.h"
#include "spritecache.h"
#include "fontcache.h"
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 935f39afc..a215bd475 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -13,7 +13,7 @@
#include "viewport_func.h"
#include "gfx_func.h"
#include "command_func.h"
-#include "signs.h"
+#include "signs_func.h"
#include "variables.h"
#include "functions.h"
#include "sound_func.h"
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 96e8dff88..659834fd1 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -12,7 +12,8 @@
#include "viewport_func.h"
#include "station_base.h"
#include "town.h"
-#include "signs.h"
+#include "signs_base.h"
+#include "signs_func.h"
#include "waypoint.h"
#include "variables.h"
#include "train.h"