Skip to content

Commit

Permalink
improve: removed unused includes
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah authored Dec 25, 2024
1 parent 418b0ef commit 2ad053c
Show file tree
Hide file tree
Showing 86 changed files with 52 additions and 130 deletions.
1 change: 0 additions & 1 deletion src/client/animatedtext.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "declarations.h"
#include <framework/core/timer.h>
#include <framework/graphics/cachedtext.h>
#include <framework/graphics/fontmanager.h>
#include <framework/luaengine/luaobject.h>

// @bindclass
Expand Down
2 changes: 0 additions & 2 deletions src/client/attachableobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <framework/graphics/particleeffect.h>
#include <framework/graphics/particlemanager.h>

#include <framework/core/eventdispatcher.h>
#include <framework/core/eventdispatcher.h>
#include <framework/ui/uimanager.h>
#include <framework/ui/uiwidget.h>
Expand All @@ -34,7 +33,6 @@
#include "client.h"
#include "game.h"
#include "map.h"
#include "tile.h"
#include "uimap.h"

extern ParticleManager g_particles;
Expand Down
2 changes: 1 addition & 1 deletion src/client/attachedeffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ onTop,
uint8_t minHeight{ 0 };
uint8_t height{ 0 };
uint16_t speed{ 0 };
Timer timer;
Timer timer{};
};

private:
Expand Down
1 change: 0 additions & 1 deletion src/client/attachedeffectmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "attachedeffectmanager.h"
#include "attachedeffect.h"
#include "spritemanager.h"
#include "thingtypemanager.h"
#include <framework/core/resourcemanager.h>

Expand Down
2 changes: 0 additions & 2 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

#include <framework/core/asyncdispatcher.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/resourcemanager.h>
#include <framework/graphics/image.h>
#include <framework/graphics/shadermanager.h>
#include <framework/ui/ui.h>

Expand Down
1 change: 0 additions & 1 deletion src/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "uimap.h"

#include <framework/core/graphicalapplication.h>
#include <framework/graphics/declarations.h>

class Client : public ApplicationDrawEvents
{
Expand Down
2 changes: 0 additions & 2 deletions src/client/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@
#include "localplayer.h"
#include "luavaluecasts_client.h"
#include "map.h"
#include "statictext.h"
#include "thingtypemanager.h"
#include "tile.h"

#include <framework/core/clock.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/graphicalapplication.h>
#include <framework/graphics/drawpoolmanager.h>
#include <framework/graphics/graphics.h>
#include <framework/graphics/shadermanager.h>
#include <framework/graphics/texturemanager.h>
#include <framework/ui/uiwidget.h>
Expand Down
3 changes: 1 addition & 2 deletions src/client/effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@

#include "thing.h"
#include <framework/core/timer.h>
#include <framework/global.h>

// @bindclass
// @bindclass
class Effect final : public Thing
{
public:
Expand Down
2 changes: 0 additions & 2 deletions src/client/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

#pragma once

#include "animatedtext.h"
#include "container.h"
#include "creature.h"
#include "declarations.h"
#include "item.h"
#include "outfit.h"
#include "protocolgame.h"
#include <bitset>
Expand Down
4 changes: 0 additions & 4 deletions src/client/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@
#include "item.h"
#include "container.h"
#include "game.h"
#include "map.h"
#include "spritemanager.h"
#include "thing.h"
#include "thingtypemanager.h"
#include "tile.h"

#include <framework/core/binarytree.h>
#include <framework/core/clock.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/filestream.h>
#include <framework/core/graphicalapplication.h>
#include <framework/graphics/shadermanager.h>

ItemPtr Item::create(const int id)
Expand Down
1 change: 0 additions & 1 deletion src/client/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#pragma once

#include "effect.h"
#include "thing.h"
#include <framework/global.h>

Expand Down
2 changes: 0 additions & 2 deletions src/client/lightview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

#include "lightview.h"
#include "map.h"
#include "mapview.h"
#include "spritemanager.h"

#include <framework/core/asyncdispatcher.h>
#include <framework/core/eventdispatcher.h>
Expand Down
1 change: 0 additions & 1 deletion src/client/mapview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "tile.h"

#include "framework/graphics/texturemanager.h"
#include <framework/core/application.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/resourcemanager.h>
#include <framework/graphics/drawpoolmanager.h>
Expand Down
1 change: 0 additions & 1 deletion src/client/mapview.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "lightview.h"
#include <framework/core/inputevent.h>
#include <framework/graphics/declarations.h>
#include <framework/graphics/paintershaderprogram.h>
#include <framework/luaengine/luaobject.h>

struct AwareRange
Expand Down
1 change: 0 additions & 1 deletion src/client/minimap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "minimap.h"
#include "tile.h"

#include <framework/core/eventdispatcher.h>
#include <framework/core/filestream.h>
#include <framework/core/resourcemanager.h>
#include <framework/graphics/drawpoolmanager.h>
Expand Down
3 changes: 1 addition & 2 deletions src/client/missile.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@

#include "thing.h"
#include <framework/core/timer.h>
#include <framework/global.h>

// @bindclass
// @bindclass
class Missile final : public Thing
{
public:
Expand Down
1 change: 0 additions & 1 deletion src/client/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "const.h"
#include <framework/const.h>
#include <framework/stdext/types.h>
#include <framework/util/point.h>

#include <array>
Expand Down
2 changes: 0 additions & 2 deletions src/client/protocolcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

#include "protocolcodes.h"

#include <algorithm>

namespace Proto
{
stdext::map<uint8_t, uint8_t > messageModesMap;
Expand Down
3 changes: 1 addition & 2 deletions src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "luavaluecasts_client.h"
#include "map.h"
#include "missile.h"
#include "statictext.h"
#include "thingtypemanager.h"
#include "tile.h"
#include <ctime>
Expand Down Expand Up @@ -1074,7 +1073,7 @@ void ProtocolGame::parseStoreError(const InputMessagePtr& msg) const
const uint8_t errorType = msg->getU8();
const auto& message = msg->getString();

g_lua.callGlobalField("g_game", "onParseStoreError", message);
g_lua.callGlobalField("g_game", "onParseStoreError", message, errorType);
}

void ProtocolGame::parseUnjustifiedStats(const InputMessagePtr& msg)
Expand Down
2 changes: 0 additions & 2 deletions src/client/protocolgamesend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "framework/net/outputmessage.h"
#include "game.h"
#include "protocolgame.h"
#include <framework/core/application.h>
#include <framework/platform/platform.h>
#include <framework/util/crypt.h>

void ProtocolGame::send(const OutputMessagePtr& outputMessage)
Expand Down
1 change: 0 additions & 1 deletion src/client/spriteappearances.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "spriteappearances.h"
#include "game.h"
#include <framework/core/filestream.h>
#include <framework/core/graphicalapplication.h>
#include <framework/core/resourcemanager.h>
#include <framework/graphics/image.h>

Expand Down
1 change: 0 additions & 1 deletion src/client/spritemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "gameconfig.h"
#include "spriteappearances.h"
#include <framework/core/asyncdispatcher.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/filestream.h>
#include <framework/core/graphicalapplication.h>
#include <framework/core/resourcemanager.h>
Expand Down
4 changes: 0 additions & 4 deletions src/client/thing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
#include "thing.h"
#include "game.h"
#include "map.h"
#include "thingtypemanager.h"
#include "tile.h"

#include <framework/core/eventdispatcher.h>
#include <framework/core/graphicalapplication.h>
#include <framework/graphics/shadermanager.h>

void Thing::setPosition(const Position& position, uint8_t /*stackPos*/, bool /*hasElevation*/)
Expand Down
4 changes: 0 additions & 4 deletions src/client/thingtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@

#include "animator.h"
#include "declarations.h"
#include "gameconfig.h"

#include <algorithm>
#include <framework/core/declarations.h>
#include <framework/graphics/drawpoolmanager.h>
#include <framework/graphics/texture.h>
#include <framework/luaengine/luaobject.h>
#include <framework/net/server.h>
#include <framework/otml/declarations.h>
#include <variant>

Expand Down
3 changes: 0 additions & 3 deletions src/client/thingtypemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@
#include "creatures.h"
#endif

#include <framework/core/binarytree.h>
#include <framework/core/eventdispatcher.h>
#include <framework/core/filestream.h>
#include <framework/core/resourcemanager.h>
#include <framework/otml/otml.h>

#include <client/spriteappearances.h>
#include <client/spritemanager.h>

#include <appearances.pb.h>

Expand Down
4 changes: 0 additions & 4 deletions src/client/tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <framework/core/eventdispatcher.h>
#include <framework/core/graphicalapplication.h>
#include <framework/graphics/drawpoolmanager.h>
#include <framework/ui/uimanager.h>
#include <framework/ui/uiwidget.h>

#include <ranges>
Expand All @@ -33,11 +32,8 @@
#include "effect.h"
#include "game.h"
#include "item.h"
#include "lightview.h"
#include "localplayer.h"
#include "map.h"
#include "protocolgame.h"
#include "statictext.h"
#include "uimap.h"
#include <algorithm>

Expand Down
3 changes: 0 additions & 3 deletions src/client/tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@

#include "attachableobject.h"
#include "declarations.h"
#include "effect.h"
#include "item.h"
#include "mapview.h"
#include "statictext.h"
#include <algorithm>

#ifdef FRAMEWORK_EDITOR
enum tileflags_t : uint32_t
Expand Down
3 changes: 0 additions & 3 deletions src/client/uimap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
#include "game.h"
#include "map.h"
#include "mapview.h"
#include <framework/core/eventdispatcher.h>
#include <framework/core/graphicalapplication.h>
#include <framework/graphics/drawpoolmanager.h>
#include <framework/graphics/graphics.h>

UIMap::UIMap()
{
Expand Down
1 change: 0 additions & 1 deletion src/client/uiprogressrect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

#include "uiprogressrect.h"
#include <framework/graphics/fontmanager.h>

#include "framework/graphics/drawpool.h"
#include "framework/graphics/drawpoolmanager.h"
Expand Down
2 changes: 0 additions & 2 deletions src/framework/core/adaptativeframecounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
*/

#include "adaptativeframecounter.h"
#include <framework/core/eventdispatcher.h>
#include <framework/graphics/drawpool.h>
#include <framework/platform/platformwindow.h>

bool AdaptativeFrameCounter::update()
{
Expand Down
2 changes: 0 additions & 2 deletions src/framework/core/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#pragma once

#include <framework/global.h>
#include <framework/graphics/declarations.h>

class ApplicationContext
{
Expand Down Expand Up @@ -92,7 +91,6 @@ class Application
};

#ifdef FRAMEWORK_GRAPHICS
#include "graphicalapplication.h"
#else
#include "consoleapplication.h"
#endif
1 change: 0 additions & 1 deletion src/framework/core/eventdispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "asyncdispatcher.h"

#include "timer.h"
#include <framework/core/clock.h>

EventDispatcher g_dispatcher, g_textDispatcher, g_mainDispatcher;
int16_t g_mainThreadId = stdext::getThreadId();
Expand Down
5 changes: 1 addition & 4 deletions src/framework/core/eventdispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

#pragma once

#include "clock.h"
#include "scheduledevent.h"

#include <thread>

// @bindsingleton g_dispatcher
// @bindsingleton g_dispatcher
class EventDispatcher
{
public:
Expand Down
1 change: 1 addition & 0 deletions src/framework/core/filestream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "filestream.h"
#include "binarytree.h"
#include "graphicalapplication.h"
#include <framework/core/application.h>

#include <physfs.h>
Expand Down
2 changes: 0 additions & 2 deletions src/framework/core/graphicalapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
#include <emscripten/emscripten.h>
#endif

#include <thread>

GraphicalApplication g_app;

void GraphicalApplication::init(std::vector<std::string>& args, ApplicationContext* context)
Expand Down
1 change: 0 additions & 1 deletion src/framework/core/graphicalapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <framework/core/adaptativeframecounter.h>
#include <framework/core/inputevent.h>
#include <framework/core/timer.h>
#include <framework/graphics/declarations.h>
#include <framework/platform/platformwindow.h>

Expand Down
1 change: 0 additions & 1 deletion src/framework/core/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "../global.h"

#include <fstream>
#include <mutex>

struct LogMessage
{
Expand Down
Loading

0 comments on commit 2ad053c

Please sign in to comment.