BIG deep clean
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Console output/input
|
||||
PIP - Platform Independent Primitives
|
||||
Console output/input
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "piscreen.h"
|
||||
#include "piincludes_p.h"
|
||||
@@ -162,7 +162,6 @@ void PIScreen::SystemConsole::print() {
|
||||
///cells[mouse_y][mouse_x].format.flags ^= Inverse;
|
||||
}
|
||||
#ifdef WINDOWS
|
||||
//static int cnt = 0;
|
||||
PRIVATE->srect = PRIVATE->sbi.srWindow;
|
||||
int dx0 = -1, dx1 = -1, dy0 = -1, dy1 = -1;
|
||||
for (int j = 0; j < height; ++j) {
|
||||
@@ -189,11 +188,8 @@ void PIScreen::SystemConsole::print() {
|
||||
Cell & c(cells[j + dy0][i + dx0]);
|
||||
PRIVATE->chars[k].Char.UnicodeChar = 0;
|
||||
PRIVATE->chars[k].Char.AsciiChar = c.symbol.toConsole1Byte();
|
||||
//PRIVATE->chars[k].Char.UnicodeChar = c.symbol.toInt();
|
||||
PRIVATE->chars[k].Attributes = attributes(c);
|
||||
}
|
||||
//PRIVATE->bc.X = dx0;
|
||||
//PRIVATE->bc.Y = dy0;
|
||||
//piCout << "draw" << dw << dh;
|
||||
PRIVATE->bs.X = dw;
|
||||
PRIVATE->bs.Y = dh;
|
||||
@@ -235,10 +231,6 @@ void PIScreen::SystemConsole::print() {
|
||||
printf("%s", s.data());
|
||||
s.clear();
|
||||
}
|
||||
/*for (int i = 0; i < width; ++i) {
|
||||
moveTo(i, j);
|
||||
printf("%s", (formatString(cells[j][i]) + cells[j][i].symbol).data());
|
||||
}*/
|
||||
}
|
||||
printf("\e[0m");
|
||||
fflush(0);
|
||||
@@ -420,9 +412,7 @@ PIScreen::~PIScreen() {
|
||||
|
||||
void PIScreen::setMouseEnabled(bool on) {
|
||||
mouse_ = on;
|
||||
//lock();
|
||||
console.mouse_x = console.mouse_y = -1;
|
||||
//unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user