diff --git a/network/networking.cpp b/Network/networking.cpp similarity index 99% rename from network/networking.cpp rename to Network/networking.cpp index c8186a5..c59bdcd 100644 --- a/network/networking.cpp +++ b/Network/networking.cpp @@ -3,6 +3,7 @@ // #include "networking.h" + std::unordered_map> playerPositions; std::unordered_map> lastKeepAlive; diff --git a/network/networking.h b/Network/networking.h similarity index 96% rename from network/networking.h rename to Network/networking.h index a6b2108..8f302ee 100644 --- a/network/networking.h +++ b/Network/networking.h @@ -7,7 +7,7 @@ #include #include #include -#include "../env.h" +#include "../Utility/env.h" #include "networking_client.h" #include "../player.h" #include "../shark.h" diff --git a/network/networking_client.cpp b/Network/networking_client.cpp similarity index 100% rename from network/networking_client.cpp rename to Network/networking_client.cpp diff --git a/network/networking_client.h b/Network/networking_client.h similarity index 95% rename from network/networking_client.h rename to Network/networking_client.h index afa79e3..75eff63 100644 --- a/network/networking_client.h +++ b/Network/networking_client.h @@ -9,7 +9,7 @@ #include #include #include -#include "../env.h" +#include "../Utility/env.h" #include "../player.h" class Player; diff --git a/Utility/close.h b/Utility/close.h index 2cd727b..0c556ca 100644 --- a/Utility/close.h +++ b/Utility/close.h @@ -12,7 +12,7 @@ #include #include #include "env.h" -#include "../network/networking.h" +#include "../Network/networking.h" void cleanup(); void handleQuit(); diff --git a/Utility/display.h b/Utility/display.h index 9c97dd9..cffbc0d 100644 --- a/Utility/display.h +++ b/Utility/display.h @@ -9,7 +9,7 @@ #include #include #include -#include "player.h" +#include "../player.h" double calculateDistance(int x1, int y1, int x2, int y2); void displayNearbyPlayers(SDL_Renderer* renderer, TTF_Font* font, Player& currentPlayer, std::vector& players, double threshold); diff --git a/decors.cpp b/decors.cpp index ab620b1..a44072e 100644 --- a/decors.cpp +++ b/decors.cpp @@ -3,9 +3,6 @@ // #include "decors.h" -#include - -#include "env.h" void Rock::draw(SDL_Renderer* renderer) const{ Camera& camera = Camera::getInstance(); diff --git a/decors.h b/decors.h index 120a9db..a6826d8 100644 --- a/decors.h +++ b/decors.h @@ -9,7 +9,9 @@ #include #include #include +#include #include "camera.h" +#include "Utility/env.h" class Rock { public: diff --git a/fish.h b/fish.h index 5309998..3facc25 100644 --- a/fish.h +++ b/fish.h @@ -7,7 +7,7 @@ #include #include #include "camera.h" -#include "env.h" +#include "Utility/env.h" class Fish { private: diff --git a/main.cpp b/main.cpp index e1bacde..3e896ee 100644 --- a/main.cpp +++ b/main.cpp @@ -21,11 +21,12 @@ #include "Utility/utility.h" #include "player.h" #include "menu.h" -#include "network/networking.h" -#include "network/networking_client.h" +#include "Network/networking.h" +#include "Network/networking_client.h" #include "shark.h" +#include "Utility/event.h" +#include "Utility/close.h" -#include "event.h" #include diff --git a/menu.h b/menu.h index 9d49fe3..c22e061 100644 --- a/menu.h +++ b/menu.h @@ -1,5 +1,5 @@ #include -#include "env.h" +#include "Utility/env.h" #include #include #include diff --git a/player.cpp b/player.cpp index bc6f99b..c6070fd 100644 --- a/player.cpp +++ b/player.cpp @@ -1,10 +1,5 @@ #include "player.h" -#include -#include -#include "network/networking_client.h" -#include "camera.h" - void Player::updatePlayerPos(int x, int y) { this->x = x; this->y = y; diff --git a/player.h b/player.h index 03c9a97..ec2c3fc 100644 --- a/player.h +++ b/player.h @@ -6,6 +6,10 @@ #include #include #include +#include +#include +#include "Network/networking_client.h" +#include "camera.h" #include "fish.h" diff --git a/shark.cpp b/shark.cpp index 1731be9..17f96a2 100644 --- a/shark.cpp +++ b/shark.cpp @@ -5,8 +5,6 @@ #define sharkIMG "../img/shark.png" #include "shark.h" -#include "network/networking.h" - Shark::Shark(const int x, const int y, const float vx, const float vy, const int id, const int width, const int height, SDL_Renderer* renderer, std::vector &players_list) : x(x), y(y), vx(vx), vy(vy), id(id), width(width), height(height), players_list(players_list) { SDL_Surface* sharkSurface = IMG_Load(sharkIMG); diff --git a/shark.h b/shark.h index 0e8a1bf..5b7c1a7 100644 --- a/shark.h +++ b/shark.h @@ -10,6 +10,7 @@ #include #include #include +#include "Network/networking.h" class Shark { private: