Skip to content

Commit 430d3b2

Browse files
committedJan 11, 2017
Cleanup some header inclusions to improve compilation times
1 parent 6647939 commit 430d3b2

10 files changed

+22
-13
lines changed
 

Diff for: ‎src/client.h

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3434
#include "localplayer.h"
3535
#include "hud.h"
3636
#include "particles.h"
37+
#include "mapnode.h"
3738

3839
struct MeshMakeData;
3940
class MapBlockMesh;

Diff for: ‎src/clientenvironment.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2828
#include "profiler.h"
2929
#include "raycast.h"
3030
#include "voxelalgorithms.h"
31+
#include "settings.h"
3132

3233
/*
3334
ClientEnvironment

Diff for: ‎src/environment.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3636
#include "irr_v3d.h"
3737
#include "activeobject.h"
3838
#include "util/numeric.h"
39-
#include "mapnode.h"
40-
#include "mapblock.h"
4139
#include "threading/mutex.h"
4240
#include "threading/atomic.h"
4341
#include "network/networkprotocol.h" // for AccessDeniedCode
4442

43+
class Map;
44+
4545
class Environment
4646
{
4747
public:

Diff for: ‎src/guiFormSpecMenu.h

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2525
#include <stack>
2626

2727
#include "irrlichttypes_extrabloated.h"
28-
#include "inventory.h"
2928
#include "inventorymanager.h"
3029
#include "modalMenu.h"
3130
#include "guiTable.h"

Diff for: ‎src/localplayer.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,17 @@ v3s16 LocalPlayer::getStandingNodePos()
655655
return floatToInt(getPosition() - v3f(0, BS, 0), BS);
656656
}
657657

658+
v3s16 LocalPlayer::getLightPosition() const
659+
{
660+
return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
661+
}
662+
663+
v3f LocalPlayer::getEyeOffset() const
664+
{
665+
float eye_height = camera_barely_in_ceiling ? 1.5f : 1.625f;
666+
return v3f(0, BS * eye_height, 0);
667+
}
668+
658669
// Horizontal acceleration (X and Z), Y direction is ignored
659670
void LocalPlayer::accelerateHorizontal(const v3f &target_speed, const f32 max_increase)
660671
{

Diff for: ‎src/localplayer.h

+2-9
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ class LocalPlayer : public Player
105105
u16 getBreath() const { return m_breath; }
106106
void setBreath(u16 breath) { m_breath = breath; }
107107

108-
v3s16 getLightPosition() const
109-
{
110-
return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
111-
}
108+
v3s16 getLightPosition() const;
112109

113110
void setYaw(f32 yaw)
114111
{
@@ -131,11 +128,7 @@ class LocalPlayer : public Player
131128

132129
v3f getPosition() const { return m_position; }
133130
v3f getEyePosition() const { return m_position + getEyeOffset(); }
134-
v3f getEyeOffset() const
135-
{
136-
float eye_height = camera_barely_in_ceiling ? 1.5f : 1.625f;
137-
return v3f(0, BS * eye_height, 0);
138-
}
131+
v3f getEyeOffset() const;
139132
private:
140133
void accelerateHorizontal(const v3f &target_speed, const f32 max_increase);
141134
void accelerateVertical(const v3f &target_speed, const f32 max_increase);

Diff for: ‎src/minimap.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2626
#include "porting.h"
2727
#include "util/numeric.h"
2828
#include "util/string.h"
29+
#include "mapblock.h"
2930
#include <math.h>
3031

3132

Diff for: ‎src/network/serverpackethandler.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2323
#include "content_abm.h"
2424
#include "content_sao.h"
2525
#include "emerge.h"
26+
#include "mapblock.h"
2627
#include "nodedef.h"
2728
#include "player.h"
2829
#include "rollback_interface.h"

Diff for: ‎src/player.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2222

2323
#include "irrlichttypes_bloated.h"
2424
#include "inventory.h"
25-
#include "constants.h" // BS
2625
#include "threading/mutex.h"
2726
#include <list>
2827

Diff for: ‎src/serverenvironment.h

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2121
#define SERVER_ENVIRONMENT_HEADER
2222

2323
#include "environment.h"
24+
#include "mapnode.h"
25+
#include "mapblock.h"
26+
#include <set>
2427

2528
class IGameDef;
2629
class ServerMap;

0 commit comments

Comments
 (0)
Please sign in to comment.