Skip to content

Commit

Permalink
Merge branch 'header'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/mc/world/level/block/states/BlockStateInstance.h
  • Loading branch information
OEOTYAN committed Jan 9, 2025
2 parents e776a62 + 6210b8e commit b4ce48d
Show file tree
Hide file tree
Showing 22 changed files with 170 additions and 257 deletions.
6 changes: 0 additions & 6 deletions src/mc/entity/systems/LevelChunkTickingSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ struct TickingSystemWithInfo;
// clang-format on

class LevelChunkTickingSystem : public ::ITickingSystem {
public:
// prevent constructor by default
LevelChunkTickingSystem& operator=(LevelChunkTickingSystem const&);
LevelChunkTickingSystem(LevelChunkTickingSystem const&);
LevelChunkTickingSystem();

public:
// virtual functions
// NOLINTBEGIN
Expand Down
6 changes: 3 additions & 3 deletions src/mc/external/webrtc/webrtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ namespace webrtc { struct SsrcInfo; }
namespace webrtc {
// inner types
enum : int {
KMaxSpatialLayers = 5,
// bitfield representation
KMaxEncoderBuffers = 1 << 3,
};

enum : int {
Expand All @@ -99,8 +100,7 @@ enum : int {
};

enum : int {
// bitfield representation
KMaxEncoderBuffers = 1 << 3,
KMaxSpatialLayers = 5,
};

// functions
Expand Down
8 changes: 1 addition & 7 deletions src/mc/network/packet/LevelChunkPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ class LevelChunkPacket : public ::Packet {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 8> mUnke3cf9a;
::ll::TypedStorage<8, 8, uint64> blobId;
// NOLINTEND

public:
// prevent constructor by default
SubChunkMetadata& operator=(SubChunkMetadata const&);
SubChunkMetadata(SubChunkMetadata const&);
SubChunkMetadata();
};

public:
Expand Down
18 changes: 3 additions & 15 deletions src/mc/world/level/BlockTickingQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,12 @@ class BlockTickingQueue {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<1, 1> mUnk958ddb;
::ll::UntypedStorage<8, 40> mUnk723bc0;
::ll::TypedStorage<1, 1, bool> mIsRemoved;
::ll::TypedStorage<8, 40, ::TickNextTickData> mData;
// NOLINTEND

public:
// prevent constructor by default
BlockTick& operator=(BlockTick const&);
BlockTick(BlockTick const&);
BlockTick();
};

struct HashBlockTick {
public:
// prevent constructor by default
HashBlockTick& operator=(HashBlockTick const&);
HashBlockTick(HashBlockTick const&);
HashBlockTick();
};
struct HashBlockTick {};

class TickDataSet
: public ::MovePriorityQueue<::BlockTickingQueue::BlockTick, ::std::greater<::BlockTickingQueue::BlockTick>> {
Expand Down
13 changes: 4 additions & 9 deletions src/mc/world/level/LevelChunkMetaDataManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,18 @@ class LevelChunk;
class LevelChunkMetaData;
class LevelChunkMetaDataDictionary;
class LevelSeed64;
namespace Bedrock::PubSub { class Subscription; }
// clang-format on

class LevelChunkMetaDataManager {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 16> mUnka0bf51;
::ll::UntypedStorage<8, 16> mUnkab425c;
::ll::UntypedStorage<8, 16> mUnk206103;
::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelChunkMetaDataDictionary>> mLevelChunkMetaDataDictionary;
::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnNewDimensionCreatedSubscription;
::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkLoadedSubscription;
// NOLINTEND

public:
// prevent constructor by default
LevelChunkMetaDataManager& operator=(LevelChunkMetaDataManager const&);
LevelChunkMetaDataManager(LevelChunkMetaDataManager const&);
LevelChunkMetaDataManager();

public:
// member functions
// NOLINTBEGIN
Expand Down
21 changes: 8 additions & 13 deletions src/mc/world/level/LevelChunkPerformanceTelemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,23 @@

// auto generated forward declare list
// clang-format off
class IMinecraftEventing;
struct ChunkPerformanceData;
// clang-format on

class LevelChunkPerformanceTelemetry {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 8> mUnkf6c20b;
::ll::UntypedStorage<4, 4> mUnk48c0ae;
::ll::UntypedStorage<1, 1> mUnk8b573f;
::ll::UntypedStorage<8, 8> mUnkd52427;
::ll::UntypedStorage<8, 64> mUnk13e530;
::ll::UntypedStorage<1, 1> mUnkf39a71;
::ll::UntypedStorage<1, 1> mUnk63c6e8;
::ll::TypedStorage<8, 8, ::IMinecraftEventing&> mEventing;
::ll::TypedStorage<4, 4, uint const> mServerTickRange;
::ll::TypedStorage<1, 1, bool const> mIsClientSide;
::ll::TypedStorage<8, 8, uint64> mPerformanceTelemetryTimer;
::ll::TypedStorage<8, 64, ::std::function<void()>> mTelemetryPeriodicCallback;
::ll::TypedStorage<1, 1, bool> mPerformanceTelemetryFired;
::ll::TypedStorage<1, 1, bool> mShouldTick;
// NOLINTEND

public:
// prevent constructor by default
LevelChunkPerformanceTelemetry& operator=(LevelChunkPerformanceTelemetry const&);
LevelChunkPerformanceTelemetry(LevelChunkPerformanceTelemetry const&);
LevelChunkPerformanceTelemetry();

public:
// member functions
// NOLINTBEGIN
Expand Down
14 changes: 7 additions & 7 deletions src/mc/world/level/block/states/BlockStateInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ class BlockState;
// clang-format on

class BlockStateInstance {
public:
template <typename T>
requires(std::is_integral_v<T> || std::is_enum_v<T>)
T get(ushort data) const {
return static_cast<T>((data >> (mEndBit - mNumBits + 1)) & ((1 << mNumBits) - 1));
}

public:
// member variables
// NOLINTBEGIN
Expand All @@ -19,13 +26,6 @@ class BlockStateInstance {
::ll::TypedStorage<8, 8, ::BlockState const*> mState;
// NOLINTEND

public:
template <typename T>
requires(std::is_integral_v<T> || std::is_enum_v<T>)
T get(ushort data) const {
return static_cast<T>((data >> (mEndBit - mNumBits + 1)) & ((1 << mNumBits) - 1));
}

public:
// member functions
// NOLINTBEGIN
Expand Down
24 changes: 6 additions & 18 deletions src/mc/world/level/chunk/LevelChunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,11 @@ class LevelChunk {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<1, 1> mUnk6421bd;
::ll::UntypedStorage<1, 1> mUnk82d63c;
::ll::UntypedStorage<1, 1> mUnk1cca4f;
::ll::UntypedStorage<1, 1> mUnkd8dd50;
::ll::TypedStorage<1, 1, bool> mWasStored;
::ll::TypedStorage<1, 1, bool> mWasGenerated;
::ll::TypedStorage<1, 1, bool> mWasRequestedInsideTickRange;
::ll::TypedStorage<1, 1, bool> mWasLoadedInsideTickRange;
// NOLINTEND

public:
// prevent constructor by default
Telemetry& operator=(Telemetry const&);
Telemetry(Telemetry const&);
Telemetry();
};

using BlockList = ::std::vector<::BlockPos>;
Expand All @@ -158,15 +152,9 @@ class LevelChunk {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<4, 24> mUnkaa0f6a;
::ll::UntypedStorage<1, 1> mUnkcb47a3;
::ll::TypedStorage<4, 24, ::BoundingBox> aabb;
::ll::TypedStorage<1, 1, ::HardcodedSpawnAreaType> type;
// NOLINTEND

public:
// prevent constructor by default
SpawningArea& operator=(SpawningArea const&);
SpawningArea(SpawningArea const&);
SpawningArea();
};

using BBorder = bool;
Expand Down
55 changes: 24 additions & 31 deletions src/mc/world/level/chunk/LevelChunkAndSubChunkLoggingData.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

// auto generated inclusion list
#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
#include "mc/world/level/chunk/ChunkState.h"
#include "mc/world/level/chunk/SubChunk.h"

// auto generated forward declare list
// clang-format off
class ChunkPos;
class SubChunkPos;
namespace Bedrock::Threading { class Mutex; }
// clang-format on

struct LevelChunkAndSubChunkLoggingData : public ::Bedrock::EnableNonOwnerReferences {
Expand All @@ -23,45 +26,35 @@ struct LevelChunkAndSubChunkLoggingData : public ::Bedrock::EnableNonOwnerRefere
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 8> mUnke8ff39;
::ll::UntypedStorage<8, 32> mUnk398c02;
::ll::UntypedStorage<1, 1> mUnk6c0f4b;
::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mTimePoint;
::ll::TypedStorage<8, 32, ::std::string> mLogEntry;
::ll::TypedStorage<1, 1, bool> mIsClientSide;
// NOLINTEND

public:
// prevent constructor by default
LogEntry& operator=(LogEntry const&);
LogEntry(LogEntry const&);
LogEntry();
};

public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<4, 12> mUnk825d58;
::ll::UntypedStorage<4, 12> mUnkeac1da;
::ll::UntypedStorage<1, 1> mUnk6f8486;
::ll::UntypedStorage<1, 1> mUnkde6950;
::ll::UntypedStorage<1, 1> mUnk52206e;
::ll::UntypedStorage<1, 1> mUnk9f6042;
::ll::UntypedStorage<1, 1> mUnkcd7f6b;
::ll::UntypedStorage<1, 1> mUnk3a940e;
::ll::UntypedStorage<4, 4> mUnke24144;
::ll::UntypedStorage<4, 4> mUnkd187a7;
::ll::UntypedStorage<4, 4> mUnkd5517f;
::ll::UntypedStorage<8, 8> mUnk2330e3;
::ll::UntypedStorage<8, 16> mUnkd1257b;
::ll::UntypedStorage<8, 16> mUnk768d4c;
::ll::UntypedStorage<8, 24> mUnk5de58f;
::ll::UntypedStorage<8, 80> mUnk15c6dd;
::ll::TypedStorage<4, 12, ::SubChunkPos> mCurrentPlayerSubChunk;
::ll::TypedStorage<4, 12, ::SubChunkPos> mSubChunkToTrack;
::ll::TypedStorage<1, 1, bool> mCollectData;
::ll::TypedStorage<1, 1, bool> mLogAllData;
::ll::TypedStorage<1, 1, bool> mCollectSubChunkPosition;
::ll::TypedStorage<1, 1, ::ChunkState> mTrackedLevelChunkStateServer;
::ll::TypedStorage<1, 1, ::ChunkState> mTrackedLevelChunkStateClient;
::ll::TypedStorage<1, 1, ::ChunkState> mTrackedLevelChunkStateClientServer;
::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mTrackedSubChunkStateServer;
::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mTrackedSubChunkStateClient;
::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mTrackedSubChunkStateClientServer;
::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLogStartTime;
::ll::TypedStorage<8, 16, ::std::map<::SubChunkPos, ::std::vector<::LevelChunkAndSubChunkLoggingData::LogEntry>>>
mSubChunkLog;
::ll::TypedStorage<8, 16, ::std::map<::ChunkPos, ::std::vector<::LevelChunkAndSubChunkLoggingData::LogEntry>>>
mLevelChunkLog;
::ll::TypedStorage<8, 24, ::std::vector<::LevelChunkAndSubChunkLoggingData::LogEntry>> mGeneralEventLog;
::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutex;
// NOLINTEND

public:
// prevent constructor by default
LevelChunkAndSubChunkLoggingData& operator=(LevelChunkAndSubChunkLoggingData const&);
LevelChunkAndSubChunkLoggingData(LevelChunkAndSubChunkLoggingData const&);
LevelChunkAndSubChunkLoggingData();

public:
// virtual functions
// NOLINTBEGIN
Expand Down
8 changes: 1 addition & 7 deletions src/mc/world/level/chunk/LevelChunkBlockActorAccessToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@

#include "mc/_HeaderOutputPredefine.h"

class LevelChunkBlockActorAccessToken {
public:
// prevent constructor by default
LevelChunkBlockActorAccessToken& operator=(LevelChunkBlockActorAccessToken const&);
LevelChunkBlockActorAccessToken(LevelChunkBlockActorAccessToken const&);
LevelChunkBlockActorAccessToken();
};
class LevelChunkBlockActorAccessToken {};
48 changes: 26 additions & 22 deletions src/mc/world/level/chunk/LevelChunkBuilderData.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

#include "mc/_HeaderOutputPredefine.h"

// auto generated inclusion list
#include "mc/world/level/chunk/ChunkState.h"
#include "mc/world/level/chunk/LevelChunkGridAreaElement.h"

// auto generated forward declare list
// clang-format off
class ChunkPos;
class LevelChunk;
class SpinLockImpl;
// clang-format on

class LevelChunkBuilderData {
public:
// LevelChunkBuilderData inner types declare
Expand All @@ -14,36 +25,29 @@ class LevelChunkBuilderData {
public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 16> mUnk8e203f;
::ll::UntypedStorage<4, 4> mUnkc31546;
::ll::TypedStorage<8, 16, ::std::pair<::ChunkPos, ::ChunkState>> mChunkPosAndExpectedState;
::ll::TypedStorage<4, 4, int> mPriority;
// NOLINTEND

public:
// prevent constructor by default
ChunkReadyForProcessingElement& operator=(ChunkReadyForProcessingElement const&);
ChunkReadyForProcessingElement(ChunkReadyForProcessingElement const&);
ChunkReadyForProcessingElement();
};

public:
// member variables
// NOLINTBEGIN
::ll::UntypedStorage<8, 32> mUnk335e83;
::ll::UntypedStorage<8, 64> mUnk9d1019;
::ll::UntypedStorage<8, 32> mUnk46c2a0;
::ll::UntypedStorage<8, 24> mUnkb5200d;
::ll::UntypedStorage<8, 32> mUnkdfaac4;
::ll::UntypedStorage<8, 64> mUnk18e213;
::ll::UntypedStorage<8, 24> mUnk242213;
::ll::UntypedStorage<4, 4> mUnkf58007;
::ll::UntypedStorage<8, 32> mUnkd4fa22;
::ll::TypedStorage<8, 32, ::SpinLockImpl> mChunkGenerationGridMapSpinLock;
::ll::TypedStorage<
8,
64,
::std::unordered_map<::ChunkPos, ::std::shared_ptr<::LevelChunkGridAreaElement<::std::weak_ptr<::LevelChunk>>>>>
mChunkGenerationGridMap;
::ll::TypedStorage<8, 32, ::SpinLockImpl> mChunksToAddToProcessingSpinLock;
::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::ChunkPos, ::ChunkState>>> mChunksToAddToProcessing;
::ll::TypedStorage<8, 32, ::SpinLockImpl> mChunksReadyForProcessingSpinLock;
::ll::TypedStorage<8, 64, ::std::unordered_set<::std::pair<::ChunkPos, ::ChunkState>>> mChunksReadyForProcessing;
::ll::TypedStorage<8, 24, ::std::vector<::LevelChunkBuilderData::ChunkReadyForProcessingElement>> mChunkSortVector;
::ll::TypedStorage<4, 4, ::std::atomic<int>> mChunkGenerationTasksInFlight;
::ll::TypedStorage<8, 32, ::SpinLockImpl> mSpawnTasksLock;
// NOLINTEND

public:
// prevent constructor by default
LevelChunkBuilderData& operator=(LevelChunkBuilderData const&);
LevelChunkBuilderData(LevelChunkBuilderData const&);

public:
// member functions
// NOLINTBEGIN
Expand Down
Loading

0 comments on commit b4ce48d

Please sign in to comment.