Skip to content

Commit

Permalink
[zone] Start on ZoneServer
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Mar 19, 2022
1 parent a6ccecb commit 8b332cc
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/map/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ set(SOURCES
latent_effect.h
linkshell.cpp
linkshell.h
main.cpp
map.cpp
map.h
merit.cpp
Expand Down
27 changes: 27 additions & 0 deletions src/map/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

#include "zone_server.h"

int main(int argc, char** argv)
{
auto argParser = std::make_unique<argparse::ArgumentParser>(argv[0]);

try
{
argParser->parse_args(argc, argv);
}
catch (const std::runtime_error& err)
{
std::cerr << err.what() << std::endl;
std::cerr << argParser;
std::exit(1);
}

auto pZoneServer = std::make_unique<ZoneServer>(std::move(argParser));

while (pZoneServer->IsRunning())
{
pZoneServer->Tick();
}

return 0;
}
1 change: 1 addition & 0 deletions src/map/packet_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ along with this program. If not, see http://www.gnu.org/licenses/
#include "common/timer.h"
#include "common/utils.h"
#include "common/version.h"
#include "common/settings_manager.h"

#include <cstring>
#include <utility>
Expand Down
23 changes: 23 additions & 0 deletions src/map/zone_server.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once

#include "common/application.h"

class ZoneServer final : public Application
{
public:
ZoneServer(std::unique_ptr<argparse::ArgumentParser>&& pArgParser)
: Application("zone", std::move(pArgParser))
{
}

~ZoneServer() override
{
}

void Tick() override
{
Application::Tick();
}

private:
};

0 comments on commit 8b332cc

Please sign in to comment.