Compare commits
7 Commits
83d18443c3
...
win_build
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa52ff9f8e | ||
|
|
3180fc026d | ||
|
|
f57d52c670 | ||
|
|
7ef37e180a | ||
|
|
8008f55cb9 | ||
|
|
118c6260b4 | ||
|
|
1240d21ef8 |
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[submodule "vs/SDL"]
|
||||||
|
path = vs/SDL
|
||||||
|
url = https://github.com/libsdl-org/SDL.git
|
||||||
|
[submodule "vs/glew"]
|
||||||
|
path = vs/glew
|
||||||
|
url = gitea@gitea.veleslabs.org:jan.mrna/glew.git
|
||||||
|
[submodule "vs/SDL_image"]
|
||||||
|
path = vs/SDL_image
|
||||||
|
url = https://github.com/libsdl-org/SDL_image.git
|
||||||
@@ -2,13 +2,21 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define LOG_CRITICAL(...) Log::critical(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
#define LOG_ERROR(...) Log::error(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
# define PRETTY_FUNC __PRETTY_FUNCTION__
|
||||||
#define LOG_WARNING(...) Log::warning(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
#elif defined(_MSC_VER)
|
||||||
#define LOG_INFO(...) Log::info(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
# define PRETTY_FUNC __FUNCTION__
|
||||||
#define LOG_DEBUG(...) Log::debug(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
#else
|
||||||
|
# define PRETTY_FUNC __func__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LOG_CRITICAL(...) Log::critical(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
|
#define LOG_ERROR(...) Log::error(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
|
#define LOG_WARNING(...) Log::warning(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
|
#define LOG_INFO(...) Log::info(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
|
#define LOG_DEBUG(...) Log::debug(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
#define LOG_PROFILING_DEBUG(...) \
|
#define LOG_PROFILING_DEBUG(...) \
|
||||||
Log::profiling_debug(__PRETTY_FUNCTION__, ": ", __VA_ARGS__)
|
Log::profiling_debug(PRETTY_FUNC, ": ", __VA_ARGS__)
|
||||||
|
|
||||||
namespace Log {
|
namespace Log {
|
||||||
enum class LevelTypes {
|
enum class LevelTypes {
|
||||||
|
|||||||
156
cpp/src/main.cpp
156
cpp/src/main.cpp
@@ -1,5 +1,4 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <queue>
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -524,17 +523,17 @@ class Map {
|
|||||||
public:
|
public:
|
||||||
static constexpr float TILE_SIZE = 100.0f; // tile size in world
|
static constexpr float TILE_SIZE = 100.0f; // tile size in world
|
||||||
|
|
||||||
Map(int rows, int cols) : m_Cols(cols), m_Rows(rows) {
|
Map(int width, int height) : m_Width(width), m_Height(height) {
|
||||||
bool sw = true;
|
bool sw = true;
|
||||||
LOG_DEBUG("cols = ", cols, " rows = ", rows);
|
LOG_DEBUG("width = ", width, " height = ", height);
|
||||||
m_Tiles = std::vector<std::vector<const Tile *>>{};
|
m_Tiles = std::vector<std::vector<const Tile *>>{};
|
||||||
for (size_t row = 0; row < m_Rows; row++) {
|
for (int i = 0; i < m_Width; i++) {
|
||||||
m_Tiles.push_back(std::vector<const Tile *>{});
|
m_Tiles.push_back(std::vector<const Tile *>{});
|
||||||
for (size_t col = 0; col < m_Cols; col++) {
|
for (int j = 0; j < m_Height; j++) {
|
||||||
if (sw)
|
if (sw)
|
||||||
m_Tiles[row].push_back(&tile_types.at("Grass"));
|
m_Tiles[i].push_back(&tile_types.at("Grass"));
|
||||||
else
|
else
|
||||||
m_Tiles[row].push_back(&tile_types.at("Water"));
|
m_Tiles[i].push_back(&tile_types.at("Water"));
|
||||||
sw = !sw;
|
sw = !sw;
|
||||||
}
|
}
|
||||||
sw = !sw;
|
sw = !sw;
|
||||||
@@ -558,36 +557,11 @@ public:
|
|||||||
return Vec2D<float>{TILE_SIZE, TILE_SIZE};
|
return Vec2D<float>{TILE_SIZE, TILE_SIZE};
|
||||||
}
|
}
|
||||||
|
|
||||||
const Tile* GetTileAt(TilePos p) const {
|
|
||||||
assert(IsTilePosValid(p));
|
|
||||||
size_t row = p.x;
|
|
||||||
size_t col = p.y;
|
|
||||||
|
|
||||||
return m_Tiles[row][col];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const Tile* GetTileAt(WorldPos p) const {
|
|
||||||
return GetTileAt(WorldToTile(p));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsTilePosValid(TilePos p) const {
|
|
||||||
size_t row = p.x;
|
|
||||||
size_t col = p.y;
|
|
||||||
|
|
||||||
return row < m_Tiles.size() && col < m_Tiles[0].size();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
double GetTileVelocityCoeff(T p) const {
|
|
||||||
return 1.0 / GetTileAt(p)->cost;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// std::vector<std::vector<const Tile*>> m_Tiles;
|
// std::vector<std::vector<const Tile*>> m_Tiles;
|
||||||
std::vector<std::vector<const Tile *>> m_Tiles;
|
std::vector<std::vector<const Tile *>> m_Tiles;
|
||||||
size_t m_Cols = 0;
|
int m_Width = 0;
|
||||||
size_t m_Rows = 0;
|
int m_Height = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathFindingDemo {
|
class PathFindingDemo {
|
||||||
@@ -621,41 +595,85 @@ public:
|
|||||||
|
|
||||||
std::vector<std::shared_ptr<Entity>> &GetEntities() { return m_Entities; }
|
std::vector<std::shared_ptr<Entity>> &GetEntities() { return m_Entities; }
|
||||||
|
|
||||||
std::optional<WorldPos> GetMoveTarget() {
|
void UpdateEntities() {
|
||||||
WorldPos current_player_pos = GetPlayer()->GetPosition();
|
float time_delta = 1.0f;
|
||||||
|
|
||||||
if (m_MoveQueue.empty()) {
|
// Remove entities marked as expired and handle expiry logic (e.g. bomb
|
||||||
return {};
|
// exploding); for all other entities, reset the actual velocity to the
|
||||||
|
// requested; actual velocity will be updated later with collisions
|
||||||
|
for (auto &entity : m_Entities) {
|
||||||
|
if (entity->IsFlaggedExpired()) {
|
||||||
|
ExpiryGameLogic(*entity);
|
||||||
|
auto it = std::find(m_Entities.begin(), m_Entities.end(), entity);
|
||||||
|
if (it != m_Entities.end()) {
|
||||||
|
std::swap(*it, m_Entities.back());
|
||||||
|
m_Entities.pop_back();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Actual velocity might be changed later by collisions
|
||||||
|
entity->SetActualVelocity(entity->GetRequestedVelocity());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPos next_player_pos = m_MoveQueue.front();
|
// Handle collisions:
|
||||||
|
// - update actual velocity for colliding objects
|
||||||
if (current_player_pos.distance(next_player_pos) > 10.0) {
|
// - handle collision logic
|
||||||
// target not reached yet
|
auto &collisions = GetEntityCollisions();
|
||||||
return next_player_pos;
|
// LOG_DEBUG("number of collisions: ", collisions.size());
|
||||||
|
for (auto &collision : collisions) {
|
||||||
|
Entity &A = *std::get<0>(collision);
|
||||||
|
Entity &B = *std::get<1>(collision);
|
||||||
|
if (!A.IsMovable())
|
||||||
|
continue;
|
||||||
|
// modify actual speed
|
||||||
|
// LOG_DEBUG("Collision: A is ", A, ", B is ", B);
|
||||||
|
Vec2D<float> AB = B.GetPosition() - A.GetPosition();
|
||||||
|
A.ZeroActualVelocityInDirection(AB);
|
||||||
|
// handle logic
|
||||||
|
CollisionGameLogic(A, B);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update entities: this advances animations,
|
||||||
|
// internal timers, and updates positions (with velocity
|
||||||
|
// modified by the collision handling)
|
||||||
|
for (auto &entity : m_Entities) {
|
||||||
|
entity->Update(time_delta);
|
||||||
}
|
}
|
||||||
// target reached, pop it
|
|
||||||
m_MoveQueue.pop();
|
|
||||||
// return nothing - we'll get the next value in the next iteration
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CollisionGameLogic(Entity &A, Entity &B) {
|
||||||
|
// not used for path finding demo
|
||||||
|
}
|
||||||
|
|
||||||
void UpdatePlayerVelocity()
|
void ExpiryGameLogic(Entity &entity) {
|
||||||
{
|
// not used for path finding demo
|
||||||
auto player = GetPlayer();
|
}
|
||||||
auto current_pos = player->GetPosition();
|
|
||||||
double tile_velocity_coeff = m_Map.GetTileVelocityCoeff(current_pos);
|
const std::vector<Collision> &GetEntityCollisions() {
|
||||||
auto next_pos = GetMoveTarget();
|
static std::vector<Collision> m_Collisions;
|
||||||
auto velocity = WorldPos{};
|
|
||||||
if (next_pos) {
|
m_Collisions.clear();
|
||||||
velocity = next_pos.value() - current_pos;
|
for (const auto &entity_A : m_Entities) {
|
||||||
velocity.normalize();
|
for (const auto &entity_B : m_Entities) {
|
||||||
LOG_DEBUG("I want to move to: ", next_pos.value(), ", velocity: ", velocity);
|
if (entity_A == entity_B)
|
||||||
|
continue;
|
||||||
|
if (!entity_A->IsCollidable() || !entity_B->IsCollidable())
|
||||||
|
continue;
|
||||||
|
// check distance of player to given entity
|
||||||
|
auto position_A = entity_A->GetPosition();
|
||||||
|
auto position_B = entity_B->GetPosition();
|
||||||
|
auto distance_sq = position_A.distance_squared(position_B);
|
||||||
|
auto collision_distance_sq =
|
||||||
|
entity_A->GetCollisionRadiusSquared() +
|
||||||
|
entity_B->GetCollisionRadiusSquared() +
|
||||||
|
2 * entity_A->GetCollisionRadius() * entity_B->GetCollisionRadius();
|
||||||
|
// TODO use vector instructions
|
||||||
|
if (distance_sq < collision_distance_sq) {
|
||||||
|
m_Collisions.emplace_back(Collision(entity_A, entity_B));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
player->SetActualVelocity(velocity * tile_velocity_coeff);
|
return m_Collisions;
|
||||||
float time_delta = 1.0f;
|
|
||||||
player->Update(time_delta);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleActions(const std::vector<UserAction> &actions) {
|
void HandleActions(const std::vector<UserAction> &actions) {
|
||||||
@@ -670,12 +688,9 @@ public:
|
|||||||
LOG_INFO("Move direction ", action.Argument.position);
|
LOG_INFO("Move direction ", action.Argument.position);
|
||||||
m_Player->SetRequestedVelocity(action.Argument.position * 4.0f);
|
m_Player->SetRequestedVelocity(action.Argument.position * 4.0f);
|
||||||
} else if (action.type == UserAction::Type::MOVE_TARGET) {
|
} else if (action.type == UserAction::Type::MOVE_TARGET) {
|
||||||
WorldPos wp = action.Argument.position;
|
TilePos p = m_Map.WorldToTile(action.Argument.position);
|
||||||
TilePos p = m_Map.WorldToTile(wp);
|
LOG_INFO("Move target: ", action.Argument.position, ", tile pos: ", p);
|
||||||
LOG_INFO("Clearing current move queue and inserting new target: ", wp);
|
// TODO move
|
||||||
std::queue<WorldPos> empty;
|
|
||||||
std::swap(empty, m_MoveQueue);
|
|
||||||
m_MoveQueue.push(wp);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -692,7 +707,6 @@ private:
|
|||||||
bool m_DrawCollisionBox = true;
|
bool m_DrawCollisionBox = true;
|
||||||
std::vector<std::shared_ptr<Entity>> m_Entities;
|
std::vector<std::shared_ptr<Entity>> m_Entities;
|
||||||
std::shared_ptr<Player> m_Player;
|
std::shared_ptr<Player> m_Player;
|
||||||
std::queue<WorldPos> m_MoveQueue;
|
|
||||||
Map m_Map;
|
Map m_Map;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -707,15 +721,15 @@ public:
|
|||||||
LOG_INFO("Running the game");
|
LOG_INFO("Running the game");
|
||||||
while (!m_Game->IsExitRequested()) {
|
while (!m_Game->IsExitRequested()) {
|
||||||
m_Game->HandleActions(m_UserInput->GetActions());
|
m_Game->HandleActions(m_UserInput->GetActions());
|
||||||
m_Game->UpdatePlayerVelocity();
|
m_Game->UpdateEntities();
|
||||||
|
|
||||||
m_Window->ClearWindow();
|
m_Window->ClearWindow();
|
||||||
|
|
||||||
// draw the map (terrain tiles)
|
// draw the map (terrain tiles)
|
||||||
const Map &map = m_Game->GetMap();
|
const Map &map = m_Game->GetMap();
|
||||||
const auto &tiles = map.GetMapTiles();
|
const auto &tiles = map.GetMapTiles();
|
||||||
for (size_t row = 0; row < tiles.size(); row++) {
|
for (int row = 0; row < tiles.size(); row++) {
|
||||||
for (size_t col = 0; col < tiles[row].size(); col++) {
|
for (int col = 0; col < tiles[row].size(); col++) {
|
||||||
// LOG_DEBUG("Drawing rect (", row, ", ", col, ")");
|
// LOG_DEBUG("Drawing rect (", row, ", ", col, ")");
|
||||||
m_Window->DrawRect(
|
m_Window->DrawRect(
|
||||||
map.TileToWorld(TilePos{row, col}),
|
map.TileToWorld(TilePos{row, col}),
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
#include <concepts>
|
#include <concepts>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <numbers>
|
||||||
|
#define M_PI std::numbers::pi
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename T> struct Vec2D {
|
template <typename T> struct Vec2D {
|
||||||
public:
|
public:
|
||||||
Vec2D() = default;
|
Vec2D() = default;
|
||||||
|
|||||||
1
vs/SDL
Submodule
1
vs/SDL
Submodule
Submodule vs/SDL added at 3e9e22f17d
1
vs/SDL_image
Submodule
1
vs/SDL_image
Submodule
Submodule vs/SDL_image added at eeae8a64df
1
vs/glew
Submodule
1
vs/glew
Submodule
Submodule vs/glew added at 02505d6cc1
61
vs/pathfinding_demo/pathfinding_demo.sln
Normal file
61
vs/pathfinding_demo/pathfinding_demo.sln
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.9.34622.214
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pathfinding_demo", "pathfinding_demo.vcxproj", "{E14D159C-08E1-46E4-BD63-6157EDBC70DC}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "..\SDL\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew_static", "..\glew\build\vc15\glew_static.vcxproj", "{664E6F0D-6784-4760-9565-D54F8EB1EDF4}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_image", "..\SDL_image\VisualC\SDL_image.vcxproj", "{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x64.Build.0 = Release|x64
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.Build.0 = Release|x64
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x64.Build.0 = Release|x64
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {7CCA451E-D4BA-48B4-AAD0-8AC02333FD9D}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
167
vs/pathfinding_demo/pathfinding_demo.vcxproj
Normal file
167
vs/pathfinding_demo/pathfinding_demo.vcxproj
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\cpp\src\main.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\cpp\src\array.hpp" />
|
||||||
|
<ClInclude Include="..\..\cpp\src\log.hpp" />
|
||||||
|
<ClInclude Include="..\..\cpp\src\math.hpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\glew\build\vc15\glew_static.vcxproj">
|
||||||
|
<Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\SDL\VisualC\SDL\SDL.vcxproj">
|
||||||
|
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\SDL_image\VisualC\SDL_image.vcxproj">
|
||||||
|
<Project>{2bd5534e-00e2-4bea-ac96-d9a92ea24696}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{e14d159c-08e1-46e4-bd63-6157edbc70dc}</ProjectGuid>
|
||||||
|
<RootNamespace>pathfindingdemo</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>GLEW_STATIC</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>GLEW_STATIC</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>GLEW_STATIC</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>GLEW_STATIC</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
33
vs/pathfinding_demo/pathfinding_demo.vcxproj.filters
Normal file
33
vs/pathfinding_demo/pathfinding_demo.vcxproj.filters
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\cpp\src\main.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\cpp\src\array.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\cpp\src\log.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\cpp\src\math.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
19
vs/pathfinding_demo/pathfinding_demo.vcxproj.user
Normal file
19
vs/pathfinding_demo/pathfinding_demo.vcxproj.user
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\cpp</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\cpp</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\cpp</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\cpp</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user