-
-
Notifications
You must be signed in to change notification settings - Fork 81
dtl::shape::FastRogueLike (形状クラス)
Kasugaccho edited this page Aug 16, 2019
·
1 revision
<DTL/Shape/FastRogueLike.hpp>
namespace dtl::shape {
template <typename T>
class FastRogueLike;
}
※ T
は3bit以上の型
機能名 | 対応 |
---|---|
非長方形Matrix | 不可 |
#include <DTL.hpp>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
std::array<std::array<shape_t, 32>, 24> matrix{ {} };
dtl::shape::FastRogueLike<shape_t>(0, 1, 2, 3, 4, 10).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("%%", "##", " ", "++", "--").draw(matrix);
return 0;
}
0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,0,0,0,1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,0,0,0,1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,4,1,0,0,0,1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,4,4,4,4,4,4,1,0,0,0,1,2,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,4,1,0,0,0,1,2,2,2,2,2,1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,0,0,0,1,2,2,2,2,2,3,2,2,2,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,0,0,0,1,1,1,3,1,1,1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,0,0,0,1,4,4,4,4,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,4,1,1,1,1,1,4,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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%%%%%## ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%
############--##%%%%%%## ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%
##------------##%%%%%%## ##########%%%%%%%%%%%%%%%%%%%%
############--##%%%%%%## ## ##%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--##%%%%%%## ++ ##%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--##%%%%%%######++###### ##%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--##%%%%%%##--------############%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--##########--########%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--####----------##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--####++##########%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%##--++ ################%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%###### ++ ##%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%## ## ##%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%############ ##%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%## ##%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%## ##%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%##################++######%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%##------------------##%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%##########--######################%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%##----------------------##%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%##########################%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) 2018-2021 As Project.
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)