-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2024-2024 the openage authors. See copying.md for legal info. | ||
|
||
#include "path.h" | ||
|
||
|
||
namespace openage::path { | ||
|
||
// this file is intentionally empty | ||
|
||
} // namespace openage::path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2024-2024 the openage authors. See copying.md for legal info. | ||
|
||
#pragma once | ||
|
||
#include <vector> | ||
|
||
#include "coord/tile.h" | ||
|
||
|
||
namespace openage::path { | ||
|
||
/** | ||
* Path request for the pathfinder. | ||
*/ | ||
struct PathRequest { | ||
// ID of the grid to use for pathfinding. | ||
size_t grid_id; | ||
// Start position of the path. | ||
coord::tile start; | ||
// Target position of the path. | ||
coord::tile target; | ||
}; | ||
|
||
/** | ||
* Path found by the pathfinder. | ||
*/ | ||
struct Path { | ||
// ID of the grid to used for pathfinding. | ||
size_t grid_id; | ||
// Waypoints of the path. | ||
std::vector<coord::tile> waypoints; | ||
}; | ||
|
||
} // namespace openage::path |