summaryrefslogtreecommitdiffstats
path: root/Game.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-04-23 15:39:59 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-04-21 15:39:59 +0200
commitd46f3a7180afdb5213afc80c97ae5fc8db43248a (patch)
tree2e00ab460474084042176d71df3f6f2cee8d3d63 /Game.cpp
parent2017-04-21 (diff)
downloadAltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar.gz
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar.bz2
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar.lz
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar.xz
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.tar.zst
AltCraft-d46f3a7180afdb5213afc80c97ae5fc8db43248a.zip
Diffstat (limited to '')
-rw-r--r--Game.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Game.cpp b/Game.cpp
index 8674942..c3adaae 100644
--- a/Game.cpp
+++ b/Game.cpp
@@ -7,8 +7,8 @@ Game::Game() {
m_display = new Display(1280, 720, "AltCraft", &m_world, gameStartWaiter);
m_nc = new NetworkClient("127.0.0.1", 25565, "HelloOne");
Packet &response = *m_nc->GetPacket();
- if (response.GetId()!=0x02){
- std::cout<< response.GetId()<<std::endl;
+ if (response.GetId() != 0x02) {
+ std::cout << response.GetId() << std::endl;
throw 127;
}
PacketParser::Parse(response, Login);
@@ -20,11 +20,11 @@ Game::Game() {
}
Game::~Game() {
- std::cout<<"Stopping game thread..."<<std::endl;
+ std::cout << "Stopping game thread..." << std::endl;
m_gameThread.join();
- std::cout<<"Stopping graphics..."<<std::endl;
+ std::cout << "Stopping graphics..." << std::endl;
delete m_display;
- std::cout<<"Stopping network..."<<std::endl;
+ std::cout << "Stopping network..." << std::endl;
delete m_nc;
}
@@ -38,7 +38,7 @@ void Game::MainLoop() {
}
void Game::ParsePackets() {
- Packet *packetPtr =m_nc->GetPacket();
+ Packet *packetPtr = m_nc->GetPacket();
if (!packetPtr) {
using namespace std::chrono_literals;
std::this_thread::sleep_for(16ms);
@@ -154,6 +154,6 @@ void Game::ParsePackets() {
}
void Game::Exec() {
- m_gameThread = std::thread(&Game::MainLoop,this);
+ m_gameThread = std::thread(&Game::MainLoop, this);
m_display->MainLoop();
}