From fb5f4778ad1c1d00bb6df42776ace72d6667e656 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 10 Apr 2019 16:51:32 +0200 Subject: Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c1570e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jonas Gunz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -- cgit v1.2.3 From 3a1857a875f3c249a53a3fd6d4e6057b831a968b Mon Sep 17 00:00:00 2001 From: jonas Date: Sun, 21 Apr 2019 17:40:53 +0200 Subject: cInput: removed static buffer length .gitignore: added missing files --- .gitignore | 2 ++ src/cInput.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e9cc8ed..4903daf 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ build/* doc/* version.h +tags +*.swp diff --git a/src/cInput.cpp b/src/cInput.cpp index 6384c91..32da417 100644 --- a/src/cInput.cpp +++ b/src/cInput.cpp @@ -23,8 +23,9 @@ cInput::~cInput() sInputEvent cInput::poll() { + const unsigned int buff_len = 5; sInputEvent ret; - unsigned char buff [6]; + unsigned char buff [buff_len]; //setup for select fd_set rfds; @@ -47,7 +48,7 @@ sInputEvent cInput::poll() } else if (buff[0] == '\x1B') //Escape sequence { - read (STDIN_FILENO, &buff, 5); + read (STDIN_FILENO, &buff, buff_len); if(buff[0] == '[') { if(buff[1] == 'M') //Mouse Event -- cgit v1.2.3 From 708ba0078f8087b813bd7fb0c8cab64a0e09802e Mon Sep 17 00:00:00 2001 From: jonas Date: Sun, 21 Apr 2019 18:35:08 +0200 Subject: Readme fixes --- Readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Readme.md b/Readme.md index cd229e6..7a4e56f 100644 --- a/Readme.md +++ b/Readme.md @@ -8,14 +8,14 @@ TermGL is a library for displaying ASCII-graphics in a xterm compatible console List of current features: - - Automatic terminal size detection, online resizing - - Framerate target - - Simple drawing functions - - Object Handling: - - Movement - - Collision - - Input handling with object mapping - - 3D wiremeshes (mostly useless eye-candy) +- Automatic terminal size detection, online resizing +- Framerate target +- Simple drawing functions +- Object Handling: + - Movement + - Collision +- Input handling with object mapping +- 3D wiremeshes (mostly useless eye-candy) For more information on how to use, consult the documentation (`make doc`) and look at the example programs in `example/`. -- cgit v1.2.3