ANSI code renderer starts working but I have to make it utf8/wchar_t friendly.
This commit is contained in:
parent
6ca4614fcb
commit
ae484bf425
9 changed files with 136 additions and 139 deletions
|
@ -5,10 +5,12 @@
|
|||
#include "rand.hpp"
|
||||
#include "collider.hpp"
|
||||
#include "events.hpp"
|
||||
#include "ftxui/screen/color.hpp"
|
||||
|
||||
using std::string;
|
||||
using namespace fmt;
|
||||
using namespace Components;
|
||||
using ftxui::Color;
|
||||
|
||||
#define HEARING_DISTANCE 8
|
||||
|
||||
|
@ -142,7 +144,7 @@ void System::draw_map(DinkyECS::World &world, Map &game_map, ftxui::Canvas &canv
|
|||
for(size_t y = 0; y < end_y; ++y) {
|
||||
string tile = walls[start.y+y][start.x+x] == 1 ? WALL_TILE : FLOOR_TILE;
|
||||
// the 2 and 4 are from ftxui::Canvas since it does a kind of "subpixel" drawing
|
||||
canvas.DrawText(x * 2, y * 4, tile);
|
||||
canvas.DrawText(x * 2, y * 4, tile, Color::HSV(100, 10, 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue