Skip to content

Commit

Permalink
add image
Browse files Browse the repository at this point in the history
  • Loading branch information
AsPJT committed Apr 18, 2019
1 parent 698f288 commit 358ef1c
Show file tree
Hide file tree
Showing 30 changed files with 1,542 additions and 1,588 deletions.
71 changes: 37 additions & 34 deletions DungeonTemplateLibrary/Base/Struct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,43 @@

#include <cstddef>

namespace dtl::base {

template<typename Int_>
struct Coordinate1Dimensional {
Int_ x{};
constexpr Coordinate1Dimensional() noexcept = default;
constexpr Coordinate1Dimensional(const Int_& x_) noexcept :x(x_) {};
};

template<typename Int_>
struct Coordinate2Dimensional {
Int_ x{};
Int_ y{};
constexpr Coordinate2Dimensional() noexcept = default;
constexpr Coordinate2Dimensional(const Int_& x_, const Int_& y_) noexcept :x(x_), y(y_) {};
};

//座標と幅
template<typename Int_>
struct Coordinate2DimensionalAndLength2Dimensional {
Int_ x{};
Int_ y{};
Int_ w{};
Int_ h{};
constexpr Coordinate2DimensionalAndLength2Dimensional() noexcept = default;
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_) noexcept
:x(x_), y(y_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& l_) noexcept
:x(x_), y(y_), w(l_), h(l_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& w_, const Int_& h_) noexcept
:x(x_), y(y_), w(w_), h(h_) {};
};
using MatrixRange = Coordinate2DimensionalAndLength2Dimensional<std::size_t>;

namespace dtl {
inline namespace base {


template<typename Int_>
struct Coordinate1Dimensional {
Int_ x{};
constexpr Coordinate1Dimensional() noexcept = default;
constexpr Coordinate1Dimensional(const Int_& x_) noexcept :x(x_) {};
};

template<typename Int_>
struct Coordinate2Dimensional {
Int_ x{};
Int_ y{};
constexpr Coordinate2Dimensional() noexcept = default;
constexpr Coordinate2Dimensional(const Int_& x_, const Int_& y_) noexcept :x(x_), y(y_) {};
};

//座標と幅
template<typename Int_>
struct Coordinate2DimensionalAndLength2Dimensional {
Int_ x{};
Int_ y{};
Int_ w{};
Int_ h{};
constexpr Coordinate2DimensionalAndLength2Dimensional() noexcept = default;
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_) noexcept
:x(x_), y(y_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& l_) noexcept
:x(x_), y(y_), w(l_), h(l_) {};
constexpr Coordinate2DimensionalAndLength2Dimensional(const Int_& x_, const Int_& y_, const Int_& w_, const Int_& h_) noexcept
:x(x_), y(y_), w(w_), h(h_) {};
};
using MatrixRange = Coordinate2DimensionalAndLength2Dimensional<std::size_t>;

}
}

#endif //Included Dungeon Template Library
Loading

0 comments on commit 358ef1c

Please sign in to comment.