begin working on pathing segments

main
Brett 2025-03-18 21:18:02 -04:00
parent 8638f2f589
commit 9518e8d714
6 changed files with 36 additions and 7 deletions

View File

@ -51,7 +51,7 @@ macro(blt_add_project name source type)
project(tower-defense)
endmacro()
project(tower-defense VERSION 0.0.18)
project(tower-defense VERSION 0.0.19)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)

28
include/bounding_box.h Normal file
View File

@ -0,0 +1,28 @@
#pragma once
/*
* Copyright (C) 2024 Brett Terpstra
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef BOUNDING_BOX_H
#define BOUNDING_BOX_H
namespace td
{
class bounding_box_t
{};
}
#endif //BOUNDING_BOX_H

View File

@ -23,6 +23,7 @@
#include <string>
#include <vector>
#include <blt/std/types.h>
#include <bounding_box.h>
namespace td
{

View File

@ -26,13 +26,15 @@
namespace td
{
class path_segment_t
{
public:
explicit path_segment_t(const blt::gfx::curve2d_t& curve): m_curve{curve}
{}
private:
blt::gfx::curve2d_t m_curve;
std::vector<enemy_instance_t> m_enemies;
};
class map_t
@ -40,9 +42,7 @@ namespace td
public:
private:
};
}
#endif //MAP_H

@ -1 +1 @@
Subproject commit f60ce3dc0b6528e0fd8ce65eb4def187c8d5834a
Subproject commit 66e764be6be316c31a35bf62879a8bfc77f12006

View File

@ -13,7 +13,7 @@ blt::gfx::first_person_camera camera;
float t = 0;
float dir = 1;
blt::gfx::curve2d_t curve{blt::vec2{250, 250}, blt::vec2{400, 500}, blt::vec2{600, 500}, blt::vec2{750, 250}};
blt::gfx::curve2d_t curve{blt::vec2{250, 250}, blt::vec2{350, 500}, blt::vec2{650, 500}, blt::vec2{750, 250}};
blt::gfx::curve2d_mesh_data_t mesh;
void init(const blt::gfx::window_data&)