From 9ee2a66c8620d2f47c0d7792847c90146dfc4f8e Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 9 Aug 2009 19:50:44 +0000 Subject: (svn r17139) -Change: add the concept of sound sets --- src/network/core/tcp_content.h | 1 + src/network/network_content.cpp | 6 ++++++ src/network/network_content_gui.cpp | 4 ++++ 3 files changed, 11 insertions(+) (limited to 'src/network') 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 */ -- cgit v1.2.3-70-g09d2