Skip to content

Commit

Permalink
#5346: Remove IGameConnection interface and header
Browse files Browse the repository at this point in the history
Now that GameConnection is a self-contained plugin, there is no further need
for a defined module interface.
  • Loading branch information
Matthew Mott authored and codereader committed Sep 28, 2020
1 parent 27ffd54 commit 0d1aa0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 37 deletions.
31 changes: 0 additions & 31 deletions include/igameconnection.h

This file was deleted.

8 changes: 7 additions & 1 deletion plugins/dm.gameconnection/GameConnection.cpp
Expand Up @@ -183,7 +183,7 @@ GameConnection::~GameConnection() {

const std::string& GameConnection::getName() const
{
static std::string _name = MODULE_GAMECONNECTION;
static std::string _name("GameConnection");
return _name;
}

Expand Down Expand Up @@ -467,3 +467,9 @@ void GameConnection::doUpdateMap() {
}

}

extern "C" void DARKRADIANT_DLLEXPORT RegisterModule(IModuleRegistry& registry)
{
module::performDefaultInitialisation(registry);
registry.registerModule(std::make_shared<gameconn::GameConnection>());
}
8 changes: 3 additions & 5 deletions plugins/dm.gameconnection/GameConnection.h
@@ -1,6 +1,5 @@
#pragma once

#include "igameconnection.h"
#include "icommandsystem.h"
#include "iscenegraph.h"
#include "MapObserver.h"
Expand All @@ -13,7 +12,8 @@ namespace sigc {
struct connection;
}

namespace gameconn {
namespace gameconn
{

class MessageTcp;

Expand All @@ -24,7 +24,7 @@ class MessageTcp;
* - updating edited entities in game immediately (aka "hot reload")
*/
class GameConnection :
public IGameConnection,
public RegisterableModule,
public wxEvtHandler //note: everything before this base must have no data members!
{
public:
Expand Down Expand Up @@ -140,5 +140,3 @@ class GameConnection :
};

}

using gameconn::GameConnection;

0 comments on commit 0d1aa0c

Please sign in to comment.