~ubuntu-branches/debian/jessie/scummvm/jessie

« back to all changes in this revision

Viewing changes to engines/agi/keyboard.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Moritz Muehlenhoff
  • Date: 2011-05-25 19:02:23 UTC
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20110525190223-fiqm0oaec714xk31
Tags: upstream-1.3.0
ImportĀ upstreamĀ versionĀ 1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-2-1/engines/agi/keyboard.cpp $
22
 
 * $Id: keyboard.cpp 49843 2010-06-15 12:33:20Z fingolfin $
 
21
 * $URL$
 
22
 * $Id$
23
23
 *
24
24
 */
25
25
 
121
121
                if (_game.controllers[i].keycode == key) {
122
122
                        debugC(3, kDebugLevelInput, "event %d: key press", _game.controllers[i].controller);
123
123
                        _game.controllerOccured[_game.controllers[i].controller] = true;
124
 
                        report("event AC:%i occurred\n", _game.controllers[i].controller);
125
124
                        return true;
126
125
                }
127
126
        }
280
279
void AgiEngine::handleKeys(int key) {
281
280
        uint8 *p = NULL;
282
281
        int c = 0;
283
 
        static uint8 formattedEntry[256];
 
282
        static uint8 formattedEntry[40];
284
283
        int l = _game.lineUserInput;
285
284
        int fg = _game.colorFg, bg = _game.colorBg;
286
285
        int promptLength = strlen(agiSprintf(_game.strings[0]));
299
298
                        ;
300
299
 
301
300
                // Copy to internal buffer
302
 
                for (; *p; p++) {
 
301
                for (; *p && c < 40-1; p++) {
303
302
                        // Squash spaces
304
303
                        if (*p == 0x20 && *(p + 1) == 0x20) {
305
304
                                p++;