chore: Change entity and component logic to use bitstream references (#1468)

* chore: Change entity and component logic to use bitstream references

* merge
This commit is contained in:
jadebenn
2024-02-27 01:25:44 -06:00
committed by GitHub
parent 75544e3eec
commit b261e63233
190 changed files with 915 additions and 915 deletions

View File

@@ -48,7 +48,7 @@ TEST_F(DestroyableTest, PlacementNewAddComponentTest) {
* Test Construction of a DestroyableComponent
*/
TEST_F(DestroyableTest, DestroyableComponentSerializeConstructionTest) {
destroyableComponent->Serialize(&bitStream, true);
destroyableComponent->Serialize(bitStream, true);
// Assert that the full number of bits are present
ASSERT_EQ(bitStream.GetNumberOfUnreadBits(), 748);
{
@@ -178,7 +178,7 @@ TEST_F(DestroyableTest, DestroyableComponentSerializeTest) {
destroyableComponent->SetMaxHealth(1233.0f);
// Now we test a serialization for correctness.
destroyableComponent->Serialize(&bitStream, false);
destroyableComponent->Serialize(bitStream, false);
ASSERT_EQ(bitStream.GetNumberOfUnreadBits(), 422);
{
// Now read in the full serialized BitStream

View File

@@ -30,7 +30,7 @@ protected:
};
TEST_F(SimplePhysicsTest, SimplePhysicsSerializeTest) {
simplePhysicsComponent->Serialize(&bitStream, false);
simplePhysicsComponent->Serialize(bitStream, false);
constexpr uint32_t sizeOfStream = 3 + BYTES_TO_BITS(3 * sizeof(NiPoint3)) + BYTES_TO_BITS(1 * sizeof(NiQuaternion)) + 1 * BYTES_TO_BITS(sizeof(uint32_t));
ASSERT_EQ(bitStream.GetNumberOfBitsUsed(), sizeOfStream);
@@ -77,7 +77,7 @@ TEST_F(SimplePhysicsTest, SimplePhysicsSerializeTest) {
}
TEST_F(SimplePhysicsTest, SimplePhysicsConstructionTest) {
simplePhysicsComponent->Serialize(&bitStream, true);
simplePhysicsComponent->Serialize(bitStream, true);
constexpr uint32_t sizeOfStream = 4 + BYTES_TO_BITS(1 * sizeof(int32_t)) + BYTES_TO_BITS(3 * sizeof(NiPoint3)) + BYTES_TO_BITS(1 * sizeof(NiQuaternion)) + 1 * BYTES_TO_BITS(sizeof(uint32_t));
ASSERT_EQ(bitStream.GetNumberOfBitsUsed(), sizeOfStream);