Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor quadtree: Extracted into tfs::map::quadtree namespace with code improvements and tests #4798

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0065b9e
Rework quadtree
ramon-bernardo Oct 5, 2024
35e0ee0
Use stl array
ramon-bernardo Oct 5, 2024
eee435c
Use inline instead static constexpr
ramon-bernardo Oct 5, 2024
e9d4f5f
Use int32_t instead of fast int32_t and auto when possible; move east…
ramon-bernardo Oct 5, 2024
30976c9
Remove remove erase check and fix comparison qt::find param
ramon-bernardo Oct 5, 2024
b7c3159
Fix use map quadtree
ramon-bernardo Oct 5, 2024
081114f
Rename namespace tfs::quadtree
ramon-bernardo Oct 5, 2024
18e1ea4
Add wildtree doc and some fix in namespace
ramon-bernardo Oct 5, 2024
cc7d235
Add quadtree doc
ramon-bernardo Oct 5, 2024
fe6172e
Simplify namespace doc
ramon-bernardo Oct 5, 2024
50b41c9
Add quadtree doc
ramon-bernardo Oct 5, 2024
d7cf93e
Rename push method, some doc fix
ramon-bernardo Oct 5, 2024
05f887e
Fix quadtree
ramon-bernardo Oct 5, 2024
e8c8d4d
Fix quadtree
ramon-bernardo Oct 6, 2024
ade4eb8
Remove unused z position
ramon-bernardo Oct 6, 2024
10594d5
Impl destructors
ramon-bernardo Oct 6, 2024
657d756
Impl destructors
ramon-bernardo Oct 6, 2024
26420d3
Use generator isntead comparasion
ramon-bernardo Oct 6, 2024
6c301d9
Remove const
ramon-bernardo Oct 6, 2024
33f3b2a
Fix nullptr check
ramon-bernardo Oct 6, 2024
9ad4755
Fix the creation of quadtree leaf nodes
ramon-bernardo Oct 6, 2024
fce5839
Add quadtree test
ramon-bernardo Oct 6, 2024
ab8a668
Fix quadtree function
ramon-bernardo Oct 6, 2024
94f660a
Fix quadtree
ramon-bernardo Oct 6, 2024
8877e35
Add tfs::generator
ramon-bernardo Oct 6, 2024
1ef0a43
Bump cmake C++23
ramon-bernardo Oct 6, 2024
d083eac
Add tfs::generator
ramon-bernardo Oct 6, 2024
01ed2d8
Add tfs::generator
ramon-bernardo Oct 6, 2024
9ff7d47
Add tfs::generator
ramon-bernardo Oct 6, 2024
33f00bd
Test bump gh os
ramon-bernardo Oct 6, 2024
20b994b
Revert "Test bump gh os"
ramon-bernardo Oct 6, 2024
bc23c52
Force use experimental generator
ramon-bernardo Oct 25, 2024
98daa5e
Use SpectatorVec instead generators
ramon-bernardo Oct 26, 2024
8272891
Use explicit const.
ramon-bernardo Oct 26, 2024
1061f10
Fix tests
ramon-bernardo Oct 26, 2024
228911c
Fix tests
ramon-bernardo Oct 26, 2024
010fa48
Fix tests
ramon-bernardo Oct 26, 2024
819c7b6
Fix tests
ramon-bernardo Oct 26, 2024
13caf97
Add new tests
ramon-bernardo Oct 26, 2024
63cd064
Fix tests
ramon-bernardo Oct 26, 2024
1ca68f5
Fix tests
ramon-bernardo Oct 26, 2024
d8d7df7
Fix tests
ramon-bernardo Oct 26, 2024
14c00d3
Create leaf node if not exists
ramon-bernardo Oct 26, 2024
fd9e407
Add method to reset quadtree and fix tests
ramon-bernardo Oct 26, 2024
938396a
Add method to reset quadtree ad remove precompiled header
ramon-bernardo Oct 26, 2024
9c920bf
Add method to reset quadtree
ramon-bernardo Oct 26, 2024
c3a5e0d
Remove quadtree test
ramon-bernardo Oct 26, 2024
9d8fedd
Merge branch 'master' into quadtree-rework-and-tests
ramon-bernardo Nov 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into quadtree-rework-and-tests
  • Loading branch information
ramon-bernardo authored Nov 17, 2024
commit 9d8fedda9d1a19790682860d49f24c84607b3b01
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void Map::removeTile(uint16_t x, uint16_t y, uint8_t z)
if (const CreatureVector* creatures = tile->getCreatures()) {
for (int32_t i = creatures->size(); --i >= 0;) {
if (Player* player = (*creatures)[i]->getPlayer()) {
g_game.internalTeleport(player, player->getTown()->getTemplePosition(), false, FLAG_NOLIMIT);
g_game.internalTeleport(player, player->getTown()->templePosition, false, FLAG_NOLIMIT);
} else {
g_game.removeCreature((*creatures)[i]);
}
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.