summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-11 22:45:11 +0000
committerrubidium <rubidium@openttd.org>2008-08-11 22:45:11 +0000
commit31d69a49e87e1388c4cfdbccb7d256572283d308 (patch)
tree96b3b7c215db821df9b9268eb9af5a55ee1200ce /src/gfx.cpp
parent122f029b9387c0834fdc1e9b75c09abf6ebf024e (diff)
downloadopenttd-31d69a49e87e1388c4cfdbccb7d256572283d308.tar.xz
(svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 3da6d25a2..79e67586e 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -20,6 +20,7 @@
#include "core/alloc_func.hpp"
#include "core/sort_func.hpp"
#include "landscape_type.h"
+#include "network/network_func.h"
#include "table/palettes.h"
#include "table/sprites.h"
@@ -81,7 +82,10 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
if (xo == 0 && yo == 0) return;
if (_cursor.visible) UndrawMouseCursor();
- UndrawChatMessage();
+
+#ifdef ENABLE_NETWORK
+ NetworkUndrawChatMessage();
+#endif /* ENABLE_NETWORK */
blitter->ScrollBuffer(_screen.dst_ptr, left, top, width, height, xo, yo);
/* This part of the screen is now dirty. */
@@ -1252,7 +1256,10 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
UndrawMouseCursor();
}
}
- UndrawChatMessage();
+
+#ifdef ENABLE_NETWORK
+ NetworkUndrawChatMessage();
+#endif /* ENABLE_NETWORK */
DrawOverlappedWindowForAll(left, top, right, bottom);