[Scummvm-cvs-logs] CVS: scummvm/gui console.cpp,1.38,1.39 console.h,1.22,1.23
Max Horn
fingolfin at users.sourceforge.net
Fri Nov 28 14:09:05 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.79,1.80 chooser.h,1.8,1.9 chooser.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.175,1.176 script_v6.cpp,1.214,1.215 scumm.h,1.327,1.328 scummvm.cpp,2.484,2.485
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv9016/gui
Modified Files:
console.cpp console.h
Log Message:
cleanup
Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- console.cpp 19 Nov 2003 23:46:39 -0000 1.38
+++ console.cpp 28 Nov 2003 22:08:52 -0000 1.39
@@ -136,11 +136,7 @@
uint32 time = g_system->get_msecs();
if (_caretTime < time) {
_caretTime = time + kCaretBlinkTime;
- if (_caretVisible) {
- drawCaret(true);
- } else {
- drawCaret(false);
- }
+ drawCaret(_caretVisible);
}
}
@@ -159,12 +155,10 @@
nextLine();
+ assert(_promptEndPos >= _promptStartPos);
int len = _promptEndPos - _promptStartPos;
bool keepRunning = true;
- // FIXME - len should NEVER be negative. If anything makes it negative,
- // then the code doing that is buggy and needs to be fixed.
- assert(len >= 0);
if (len > 0) {
@@ -530,12 +524,11 @@
void ConsoleDialog::scrollToCurrent() {
int line = _currentPos / _lineWidth;
- int displayLine = line - _scrollLine + _linesPerPage - 1;
- if (displayLine < 0) {
+ if (line + _linesPerPage <= _scrollLine) {
// TODO - this should only occur for loong edit lines, though
- } else if (displayLine >= _linesPerPage) {
- _scrollLine = _currentPos / _lineWidth;
+ } else if (line > _scrollLine) {
+ _scrollLine = line;
updateScrollBar();
}
}
Index: console.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- console.h 19 Nov 2003 23:46:39 -0000 1.22
+++ console.h 28 Nov 2003 22:08:52 -0000 1.23
@@ -108,13 +108,13 @@
void putcharIntern(int c);
void insertIntoPrompt(const char *str);
void print(const char *str);
- void nextLine();
void updateScrollBar();
void scrollToCurrent();
inline int getBufferPos() const { return _currentPos % kBufferSize; }
// Line editing
void specialKeys(int keycode);
+ void nextLine();
void killChar();
void killLine();
void killLastWord();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.79,1.80 chooser.h,1.8,1.9 chooser.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.175,1.176 script_v6.cpp,1.214,1.215 scumm.h,1.327,1.328 scummvm.cpp,2.484,2.485
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list