Skip to content

Commit 0823b99

Browse files
committed
tweak: overall build improvements, speed, linux etc
1 parent 22f6848 commit 0823b99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+103
-112
lines changed

Code/client/Events/PapyrusFunctionRegisterEvent.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Stl.hpp>
4-
53
using TiltedPhoques::String;
64

75
/**

Code/client/Games/References.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ static TRotate* RealRotateZ = nullptr;
5353
static TActorProcess* RealActorProcess = nullptr;
5454
static TLockChange* RealLockChange = nullptr;
5555

56+
namespace Settings
57+
{
58+
int32_t* GetDifficulty() noexcept
59+
{
60+
POINTER_SKYRIMSE(int32_t, s_difficulty, 381472);
61+
return s_difficulty.Get();
62+
}
63+
64+
float* GetGreetDistance() noexcept
65+
{
66+
POINTER_SKYRIMSE(float, s_greetDistance, 370892);
67+
return s_greetDistance.Get();
68+
}
69+
}
70+
5671
namespace GameplayFormulas
5772
{
5873

Code/client/Games/References.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,13 @@
55

66
namespace GameplayFormulas
77
{
8-
98
float CalculateRealDamage(Actor* apHittee, float aDamage) noexcept;
10-
119
}
1210

1311
namespace Settings
1412
{
15-
16-
int32_t* GetDifficulty() noexcept
17-
{
18-
POINTER_SKYRIMSE(int32_t, s_difficulty, 381472);
19-
return s_difficulty.Get();
20-
}
21-
22-
float* GetGreetDistance() noexcept
23-
{
24-
POINTER_SKYRIMSE(float, s_greetDistance, 370892);
25-
return s_greetDistance.Get();
26-
}
27-
13+
int32_t* GetDifficulty() noexcept;
14+
float* GetGreetDistance() noexcept;
2815
}
2916

3017
void FadeOutGame(bool aFadingOut, bool aBlackFade, float aFadeDuration, bool aRemainVisible, float aSecondsToFade) noexcept;

Code/client/TiltedOnlinePCH.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <TiltedCore/TaskQueue.hpp>
3838
#include <TiltedCore/Buffer.hpp>
3939
#include <TiltedCore/Initializer.hpp>
40+
#include <TiltedCore/Serialization.hpp>
4041

4142
// TiltedReverse
4243
#include <AutoPtr.hpp>

Code/components/console/ConsoleRegistry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <console/Command.h>
66
#include <console/CommandQueue.h>
77
#include <console/Setting.h>
8-
#include <spdlog/spdlog-inl.h>
98

109
namespace Console
1110
{

Code/components/es_loader/ESLoader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace fs = std::filesystem;
66

77
namespace ESLoader
88
{
9-
class RecordCollection;
9+
struct RecordCollection;
1010

1111
struct PluginData
1212
{

Code/components/es_loader/RecordCollection.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010

1111
namespace ESLoader
1212
{
13-
class RecordCollection
13+
struct RecordCollection
1414
{
1515
friend class TESFile;
1616

17-
public:
1817
FormEnum GetFormType(uint32_t aFormId) const noexcept
1918
{
2019
auto record = m_allRecords.find(aFormId);
@@ -64,14 +63,14 @@ class RecordCollection
6463
void BuildReferences();
6564

6665
private:
67-
TiltedPhoques::Map<uint32_t, Record> m_allRecords{};
68-
TiltedPhoques::Map<uint32_t, REFR> m_objectReferences{};
69-
TiltedPhoques::Map<uint32_t, CLMT> m_climates{};
70-
TiltedPhoques::Map<uint32_t, NPC> m_npcs{};
71-
TiltedPhoques::Map<uint32_t, CONT> m_containers{};
72-
TiltedPhoques::Map<uint32_t, GMST> m_gameSettings{};
73-
TiltedPhoques::Map<uint32_t, WRLD> m_worlds{};
74-
TiltedPhoques::Map<uint32_t, NAVM> m_navMeshes{};
66+
Map<uint32_t, Record> m_allRecords{};
67+
Map<uint32_t, REFR> m_objectReferences{};
68+
Map<uint32_t, CLMT> m_climates{};
69+
Map<uint32_t, NPC> m_npcs{};
70+
Map<uint32_t, CONT> m_containers{};
71+
Map<uint32_t, GMST> m_gameSettings{};
72+
Map<uint32_t, WRLD> m_worlds{};
73+
Map<uint32_t, NAVM> m_navMeshes{};
7574
};
7675

7776
} // namespace ESLoader

Code/encoding/Differential.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <optional>
4-
#include <TiltedCore/Buffer.hpp>
53

64
template <class T>
75
struct Differential

Code/encoding/EncodingPch.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <mutex>
2+
#include <optional>
3+
4+
#include <TiltedCore/Stl.hpp>
5+
#include <TiltedCore/Allocator.hpp>
6+
#include <TiltedCore/Buffer.hpp>
7+
#include <TiltedCore/Serialization.hpp>
8+
9+
#include <glm/vec2.hpp>
10+
#include <glm/vec3.hpp>

Code/encoding/Messages/AuthenticationRequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "Message.h"
44
#include <Structs/Mods.h>
5-
#include <TiltedCore/Buffer.hpp>
5+
66

77
struct AuthenticationRequest final : ClientMessage
88
{

Code/encoding/Messages/ClientReferencesMoveRequest.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "Message.h"
44
#include <Structs/ReferenceUpdate.h>
5-
#include <TiltedCore/Stl.hpp>
65

76
using TiltedPhoques::String;
87

Code/encoding/Messages/Message.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#pragma once
22

33
#include "../Opcodes.h"
4-
#include <TiltedCore/Buffer.hpp>
5-
#include <TiltedCore/Stl.hpp>
6-
#include <TiltedCore/Serialization.hpp>
74

85
using TiltedPhoques::String;
96
using TiltedPhoques::Serialization;

Code/encoding/Messages/NotifyEquipmentChanges.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include "Message.h"
4-
#include <TiltedCore/Buffer.hpp>
4+
55
#include <Structs/GameId.h>
66

77
struct NotifyEquipmentChanges final : ServerMessage

Code/encoding/Messages/NotifyInventoryChanges.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include "Message.h"
4-
#include <TiltedCore/Buffer.hpp>
4+
55
#include <Structs/Inventory.h>
66

77
struct NotifyInventoryChanges final : ServerMessage

Code/encoding/Messages/NotifyObjectInventoryChanges.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include "Message.h"
4-
#include <TiltedCore/Buffer.hpp>
4+
55
#include <Structs/Inventory.h>
66

77
struct NotifyObjectInventoryChanges final : ServerMessage

Code/encoding/Messages/ServerMessageFactory.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Stl.hpp>
4-
#include <TiltedCore/Allocator.hpp>
53
#include <Messages/ServerMessageFactory.h>
64

75
static std::function<UniquePtr<ServerMessage>(TiltedPhoques::Buffer::Reader& aReader)>

Code/encoding/StringCache.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <mutex>
4-
#include <TiltedCore/Stl.hpp>
5-
#include <optional>
63
#include <Messages/StringCacheUpdate.h>
74

85
struct StringCache

Code/encoding/Structs/ActionEvent.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
22

33
#include <cstdint>
4-
#include <TiltedCore/Stl.hpp>
5-
#include <TiltedCore/Buffer.hpp>
64
#include "AnimationVariables.h"
75
#include "CachedString.h"
86

Code/encoding/Structs/ActorValues.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
4-
#include <TiltedCore/Stl.hpp>
5-
63
struct ActorValues
74
{
85
ActorValues() = default;

Code/encoding/Structs/AnimationGraphDescriptor.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Stl.hpp>
4-
#include <cstdint>
5-
63
struct AnimationGraphDescriptor
74
{
85
AnimationGraphDescriptor() = default;

Code/encoding/Structs/AnimationVariables.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
22

33
#include <cstdint>
4-
#include "TiltedCore/Buffer.hpp"
5-
#include "TiltedCore/Stl.hpp"
64

75
using TiltedPhoques::Vector;
86

Code/encoding/Structs/CachedString.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
4-
#include <TiltedCore/Stl.hpp>
5-
63
struct CachedString : TiltedPhoques::String
74
{
85
CachedString() = default;

Code/encoding/Structs/Factions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

3-
#include <Structs/Faction.h>
4-
#include <TiltedCore/Stl.hpp>
3+
#include "Faction.h"
54

65
using TiltedPhoques::Vector;
76

Code/encoding/Structs/GameId.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
4-
53
using TiltedPhoques::Buffer;
64

75
struct GameId

Code/encoding/Structs/GridCellCoords.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
3+
44
#include <Structs/Vector3_NetQuantize.h>
55
#include <limits>
66

Code/encoding/Structs/Inventory.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <optional>
4-
5-
#include <TiltedCore/Stl.hpp>
63
#include "MagicEquipment.h"
74

85
using TiltedPhoques::Buffer;

Code/encoding/Structs/LockData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
3+
44

55
struct LockData
66
{

Code/encoding/Structs/Mods.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
22

33
#include <cstdint>
4-
#include <TiltedCore/Stl.hpp>
5-
#include <TiltedCore/Buffer.hpp>
64

75
using TiltedPhoques::String;
86
using TiltedPhoques::Vector;

Code/encoding/Structs/Movement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include <Structs/GameId.h>
4-
#include <TiltedCore/Buffer.hpp>
4+
55
#include <Structs/Vector3_NetQuantize.h>
66
#include <Structs/Rotator2_NetQuantize.h>
77
#include <Structs/AnimationVariables.h>

Code/encoding/Structs/ObjectData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
3+
44
#include <Structs/GameId.h>
55
#include <Structs/LockData.h>
66
#include <Structs/Inventory.h>

Code/encoding/Structs/QuestLog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

33
#include <cstdint>
4-
#include <TiltedCore/Stl.hpp>
54
#include <Structs/GameId.h>
65

76
using TiltedPhoques::Vector;

Code/encoding/Structs/ReferenceUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
3+
44
#include <Structs/Movement.h>
55
#include <Structs/ActionEvent.h>
66

Code/encoding/Structs/Rotator2_NetQuantize.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <glm/vec2.hpp>
4-
#include <TiltedCore/Buffer.hpp>
5-
63
using TiltedPhoques::Buffer;
74

85
struct Rotator2_NetQuantize : glm::vec2

Code/encoding/Structs/ServerSettings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
3+
44

55
using TiltedPhoques::Buffer;
66

Code/encoding/Structs/Tints.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
#include "CachedString.h"
44

5-
#include <TiltedCore/Buffer.hpp>
6-
#include <TiltedCore/Stl.hpp>
7-
85
using TiltedPhoques::Buffer;
96
using TiltedPhoques::Vector;
107

Code/encoding/Structs/Vector2_NetQuantize.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
4-
#include <glm/vec2.hpp>
53

64
using TiltedPhoques::Buffer;
75

Code/encoding/Structs/Vector3_NetQuantize.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#pragma once
22

3-
#include <TiltedCore/Buffer.hpp>
4-
#include <glm/vec3.hpp>
5-
63
using TiltedPhoques::Buffer;
74

85
//! Network optimized 3d vector

Code/encoding/xmake.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ target(name)
66
add_includedirs(".", "../", {public = true})
77
add_headerfiles("**.h|Structs/Fallout4/**|Structs/Skyrim/**", {prefixdir = "Encoding"})
88
add_files("**.cpp|Structs/Fallout4/**|Structs/Skyrim/**")
9+
set_pcxxheader("EncodingPch.h")
10+
911
if is_plat("linux") then
1012
add_cxxflags("-fPIC")
1113
end

0 commit comments

Comments
 (0)