From d608bef678fa97b3af910fa62598c55f33650825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Fri, 17 Jul 2020 16:23:43 -0300 Subject: Restructure source files --- src/client/window.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/client/window.cpp (limited to 'src/client/window.cpp') diff --git a/src/client/window.cpp b/src/client/window.cpp new file mode 100644 index 0000000..e718e63 --- /dev/null +++ b/src/client/window.cpp @@ -0,0 +1,16 @@ +struct Window { + char *view; + int width; + int height; + + void init() { + view = new char[width * height]; + for (int i = 0; i < width * height; i++) { + view[i] = 0; + } + } + + char pos(size_t x, size_t y) { + return view[x + y * width]; + } +}; -- cgit v1.2.3