summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-09 19:50:44 +0000
committerrubidium <rubidium@openttd.org>2009-08-09 19:50:44 +0000
commit9ee2a66c8620d2f47c0d7792847c90146dfc4f8e (patch)
treedae5e6c7eac84bc443fc16ebb012bb7697923649 /src/network
parent35d5a197d6f93e05eb358ed0a30db9ab2645911b (diff)
downloadopenttd-9ee2a66c8620d2f47c0d7792847c90146dfc4f8e.tar.xz
(svn r17139) -Change: add the concept of sound sets
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/tcp_content.h1
-rw-r--r--src/network/network_content.cpp6
-rw-r--r--src/network/network_content_gui.cpp4
3 files changed, 11 insertions, 0 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h
index 50365c109..9a7d0deb8 100644
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -23,6 +23,7 @@ enum ContentType {
CONTENT_TYPE_AI_LIBRARY = 4, ///< The content consists of an AI library
CONTENT_TYPE_SCENARIO = 5, ///< The content consists of a scenario
CONTENT_TYPE_HEIGHTMAP = 6, ///< The content consists of a heightmap
+ CONTENT_TYPE_BASE_SOUNDS = 7, ///< The content consists of base sounds
CONTENT_TYPE_END, ///< Helper to mark the end of the types
};
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index 5f1590f15..2e9ea559d 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -82,6 +82,10 @@ DEF_CONTENT_RECEIVE_COMMAND(Client, PACKET_CONTENT_SERVER_INFO)
proc = BaseGraphics::HasSet;
break;
+ case CONTENT_TYPE_BASE_SOUNDS:
+ proc = BaseSounds::HasSet;
+ break;
+
case CONTENT_TYPE_AI:
case CONTENT_TYPE_AI_LIBRARY:
proc = AI::HasAI; break;
@@ -149,6 +153,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type)
{
if (type == CONTENT_TYPE_END) {
this->RequestContentList(CONTENT_TYPE_BASE_GRAPHICS);
+ this->RequestContentList(CONTENT_TYPE_BASE_SOUNDS);
this->RequestContentList(CONTENT_TYPE_SCENARIO);
this->RequestContentList(CONTENT_TYPE_HEIGHTMAP);
this->RequestContentList(CONTENT_TYPE_AI);
@@ -290,6 +295,7 @@ static char *GetFullFilename(const ContentInfo *ci, bool compressed)
switch (ci->type) {
default: return NULL;
case CONTENT_TYPE_BASE_GRAPHICS: dir = DATA_DIR; break;
+ case CONTENT_TYPE_BASE_SOUNDS: dir = DATA_DIR; break;
case CONTENT_TYPE_NEWGRF: dir = DATA_DIR; break;
case CONTENT_TYPE_AI: dir = AI_DIR; break;
case CONTENT_TYPE_AI_LIBRARY: dir = AI_LIBRARY_DIR; break;
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 44f5456d7..a57638394 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -95,6 +95,10 @@ public:
BaseGraphics::FindSets();
break;
+ case CONTENT_TYPE_BASE_SOUNDS:
+ BaseSounds::FindSets();
+ break;
+
case CONTENT_TYPE_NEWGRF:
ScanNewGRFFiles();
/* Yes... these are the NewGRF windows */