Skip to content

Commit 762ac97

Browse files
committed
Cleared most of the include paths.
1 parent 105faf1 commit 762ac97

29 files changed

Lines changed: 112 additions & 362 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__generated__debugger_ui.h
1+
**/__generated__debugger_ui.h
22

33
# Godot-specific ignores
44
.import/

bit_array.h

Lines changed: 0 additions & 69 deletions
This file was deleted.

bit_array.cpp renamed to core/bit_array.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
/*************************************************************************/
2-
/* bit_array.cpp */
3-
/*************************************************************************/
4-
/* This file is part of: */
5-
/* GODOT ENGINE */
6-
/* https://godotengine.org */
7-
/*************************************************************************/
8-
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
9-
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
10-
/* */
11-
/* Permission is hereby granted, free of charge, to any person obtaining */
12-
/* a copy of this software and associated documentation files (the */
13-
/* "Software"), to deal in the Software without restriction, including */
14-
/* without limitation the rights to use, copy, modify, merge, publish, */
15-
/* distribute, sublicense, and/or sell copies of the Software, and to */
16-
/* permit persons to whom the Software is furnished to do so, subject to */
17-
/* the following conditions: */
18-
/* */
19-
/* The above copyright notice and this permission notice shall be */
20-
/* included in all copies or substantial portions of the Software. */
21-
/* */
22-
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23-
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24-
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
25-
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26-
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27-
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28-
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29-
/*************************************************************************/
30-
31-
/**
32-
@author AndreaCatania
33-
*/
34-
351
#include "bit_array.h"
362

373
#include "core/math/math_funcs.h"

core/bit_array.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#pragma once
2+
3+
#include "core/templates/vector.h"
4+
5+
class BitArray {
6+
Vector<uint8_t> bytes;
7+
8+
public:
9+
BitArray() = default;
10+
BitArray(uint32_t p_initial_size_in_bit);
11+
BitArray(const Vector<uint8_t> &p_bytes);
12+
13+
const Vector<uint8_t> &get_bytes() const {
14+
return bytes;
15+
}
16+
17+
Vector<uint8_t> &get_bytes_mut() {
18+
return bytes;
19+
}
20+
21+
bool resize_in_bytes(int p_bytes_count);
22+
int size_in_bytes() const;
23+
24+
bool resize_in_bits(int p_bits_count);
25+
int size_in_bits() const;
26+
27+
bool store_bits(int p_bit_offset, uint64_t p_value, int p_bits);
28+
bool read_bits(int p_bit_offset, int p_bits, std::uint64_t &r_out) const;
29+
30+
// Puts all the bytes to 0.
31+
void zero();
32+
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "net_utilities.h"
22

3-
#include "core/ensure.h"
4-
#include "core/object_data.h"
3+
#include "../scene_synchronizer.h"
4+
#include "ensure.h"
5+
#include "object_data.h"
56
#include "peer_networked_controller.h"
6-
#include "scene_synchronizer.h"
77
#include "scene_synchronizer_debugger.h"
88
#include <limits>
99
#include <memory>

net_utilities.h renamed to core/net_utilities.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include "core/config/project_settings.h"
44
#include "core/templates/local_vector.h"
55

6-
#include "core/core.h"
7-
#include "core/processor.h"
8-
#include "core/var_data.h"
6+
#include "core.h"
7+
#include "processor.h"
8+
#include "var_data.h"
99
#include <chrono>
1010
#include <map>
1111
#include <string>

core/object_data_storage.cpp

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

33
#include "core/error/error_macros.h"
44
#include "core/os/memory.h"
5-
#include "modules/network_synchronizer/core/core.h"
6-
#include "modules/network_synchronizer/core/object_data.h"
7-
#include "modules/network_synchronizer/core/var_data.h"
8-
#include "modules/network_synchronizer/net_utilities.h"
9-
#include "modules/network_synchronizer/scene_synchronizer.h"
10-
#include <vector>
5+
6+
#include "../scene_synchronizer.h"
7+
#include "var_data.h"
118

129
NS_NAMESPACE_BEGIN
1310

core/object_data_storage.h

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

33
#include "core.h"
4-
#include "modules/network_synchronizer/core/object_data.h"
5-
#include "modules/network_synchronizer/net_utilities.h"
4+
#include "net_utilities.h"
5+
#include "object_data.h"
66
#include <map>
77
#include <vector>
88

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "peer_networked_controller.h"
22

33
#include "core/io/marshalls.h"
4+
#include "core/os/os.h"
45
#include "core/templates/vector.h"
56

6-
#include "core/ensure.h"
7-
#include "net_utilities.h"
8-
#include "scene_synchronizer.h"
7+
#include "../scene_synchronizer.h"
8+
#include "ensure.h"
99
#include "scene_synchronizer_debugger.h"
1010
#include <algorithm>
1111
#include <string>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#pragma once
22

3-
#include "core/core.h"
4-
#include "core/processor.h"
5-
#include "data_buffer.h"
3+
#include "../data_buffer.h"
64
#include "net_utilities.h"
5+
#include "core.h"
6+
#include "processor.h"
77
#include <deque>
88

99
NS_NAMESPACE_BEGIN

0 commit comments

Comments
 (0)