diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/dispman.cpp | 1 | ||||
-rw-r--r-- | engines/lab/engine.cpp | 5 | ||||
-rw-r--r-- | engines/lab/eventman.cpp | 1 | ||||
-rw-r--r-- | engines/lab/eventman.h | 15 | ||||
-rw-r--r-- | engines/lab/interface.cpp | 3 | ||||
-rw-r--r-- | engines/lab/interface.h | 92 | ||||
-rw-r--r-- | engines/lab/intro.cpp | 5 | ||||
-rw-r--r-- | engines/lab/map.cpp | 3 | ||||
-rw-r--r-- | engines/lab/special.cpp | 5 |
9 files changed, 23 insertions, 107 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 0aa49f9904..0c2f56290e 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -35,7 +35,6 @@ #include "lab/anim.h" #include "lab/dispman.h" #include "lab/eventman.h" -#include "lab/interface.h" #include "lab/music.h" #include "lab/image.h" #include "lab/resource.h" diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 367f54163f..47d631c95c 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -34,7 +34,6 @@ #include "lab/dispman.h" #include "lab/eventman.h" #include "lab/image.h" -#include "lab/interface.h" #include "lab/intro.h" #include "lab/labsets.h" #include "lab/music.h" @@ -687,7 +686,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo if (_graphics->_longWinInFront) { if ((msgClass == RAWKEY) || ((msgClass == MOUSEBUTTONS) && ((IEQUALIFIER_LEFTBUTTON & qualifier) || - (IEQUALIFIER_RBUTTON & qualifier)))) { + (IEQUALIFIER_RIGHTBUTTON & qualifier)))) { _graphics->_longWinInFront = false; _graphics->_doNotDrawMessage = false; _graphics->drawPanel(); @@ -1063,7 +1062,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo if (wrkClosePtr) _event->setMousePos(Common::Point(_utils->scaleX((wrkClosePtr->_x1 + wrkClosePtr->_x2) / 2), _utils->scaleY((wrkClosePtr->_y1 + wrkClosePtr->_y2) / 2))); - } else if ((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & qualifier)) { + } else if ((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) { eatMessages(); _alternate = !_alternate; _anim->_doBlack = true; diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index e44771952a..7b5d184dc9 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -35,7 +35,6 @@ #include "lab/dispman.h" #include "lab/eventman.h" #include "lab/image.h" -#include "lab/interface.h" namespace Lab { diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h index f9facd815b..3becfeb693 100644 --- a/engines/lab/eventman.h +++ b/engines/lab/eventman.h @@ -38,6 +38,21 @@ namespace Lab { class LabEngine; class Image; +// Defines for the Class variable in IntuiMessage +#define MOUSEBUTTONS 0x00000008 +#define GADGETUP 0x00000040 +#define RAWKEY 0x00000400 +#define DELTAMOVE 0x00100000 + +// Defines for the Qualifier variable in IntuiMessage +#define IEQUALIFIER_RIGHTBUTTON 0x2000 +#define IEQUALIFIER_LEFTBUTTON 0x4000 + +#define VKEY_UPARROW 273 +#define VKEY_DNARROW 274 +#define VKEY_RTARROW 275 +#define VKEY_LTARROW 276 + struct IntuiMessage { uint32 _msgClass; uint16 _code, _qualifier, _mouseX, _mouseY, _gadgetID; diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp index b540a31357..08a53e2c63 100644 --- a/engines/lab/interface.cpp +++ b/engines/lab/interface.cpp @@ -35,7 +35,6 @@ #include "lab/dispman.h" #include "lab/eventman.h" #include "lab/image.h" -#include "lab/interface.h" #include "lab/utils.h" namespace Lab { @@ -158,7 +157,7 @@ IntuiMessage *LabEngine::getMsg() { return &message; } else if (_event->mouseButton(&message._mouseX, &message._mouseY, false)) { // Right Button - message._qualifier = IEQUALIFIER_RBUTTON | qualifiers; + message._qualifier = IEQUALIFIER_RIGHTBUTTON | qualifiers; message._msgClass = MOUSEBUTTONS; return &message; } else if (_event->keyPress(&message._code)) { diff --git a/engines/lab/interface.h b/engines/lab/interface.h deleted file mode 100644 index c8ac17180f..0000000000 --- a/engines/lab/interface.h +++ /dev/null @@ -1,92 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -/* - * This code is based on Labyrinth of Time code with assistance of - * - * Copyright (c) 1993 Terra Nova Development - * Copyright (c) 2004 The Wyrmkeep Entertainment Co. - * - */ - -#ifndef LAB_INTERFARCE_H -#define LAB_INTERFARCE_H - -namespace Lab { - - -// Defines for the Class variable in IntuiMessage -#define SIZEVERIFY 0x00000001 -#define NEWSIZE 0x00000002 -#define REFRESHWINDOW 0x00000004 -#define MOUSEBUTTONS 0x00000008 -#define MOUSEMOVE 0x00000010 -#define GADGETDOWN 0x00000020 -#define GADGETUP 0x00000040 -#define REQSET 0x00000080 -#define MENUPICK 0x00000100 -#define CLOSEWINDOW 0x00000200 -#define RAWKEY 0x00000400 -#define REQVERIFY 0x00000800 -#define REQCLEAR 0x00001000 -#define MENUVERIFY 0x00002000 -#define NEWPREFS 0x00004000 -#define DISKINSERTED 0x00008000 -#define DISKREMOVED 0x00010000 -#define WBENCHMESSAGE 0x00020000 // System use only -#define ACTIVEWINDOW 0x00040000 -#define INACTIVEWINDOW 0x00080000 -#define DELTAMOVE 0x00100000 -#define VANULLLAKEY 0x00200000 - - -// Defines for the Qualifier variable in IntuiMessage -#define IEQUALIFIER_LSHIFT 0x0001 -#define IEQUALIFIER_RSHIFT 0x0002 -#define IEQUALIFIER_CAPSLOCK 0x0004 -#define IEQUALIFIER_CONTROL 0x0008 -#define IEQUALIFIER_LALT 0x0010 -#define IEQUALIFIER_RALT 0x0020 -#define IEQUALIFIER_LCOMMAND 0x0040 -#define IEQUALIFIER_RCOMMAND 0x0080 -#define IEQUALIFIER_NUMERICPAD 0x0100 -#define IEQUALIFIER_REPEAT 0x0200 -#define IEQUALIFIER_INTERRUPT 0x0400 -#define IEQUALIFIER_MULTIBROADCAST 0x0800 -#define IEQUALIFIER_MIDBUTTON 0x1000 -#define IEQUALIFIER_RBUTTON 0x2000 -#define IEQUALIFIER_LEFTBUTTON 0x4000 - -#define VKEY_UPARROW 273 -#define VKEY_DNARROW 274 -#define VKEY_RTARROW 275 -#define VKEY_LTARROW 276 - - -//--------------------------------------------------------------------------- -//--------------------------- Function Prototypes --------------------------- -//--------------------------------------------------------------------------- - - -} // End of namespace Lab - -#endif // LAB_INTERFARCE_H diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index d918cb99fc..5b170f54a9 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -33,7 +33,6 @@ #include "lab/anim.h" #include "lab/dispman.h" #include "lab/eventman.h" -#include "lab/interface.h" #include "lab/intro.h" #include "lab/music.h" #include "lab/resource.h" @@ -61,7 +60,7 @@ void Intro::introEatMessages() { if (msg == NULL) return; else { - if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & msg->_qualifier)) || + if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & msg->_qualifier)) || ((msg->_msgClass == RAWKEY) && (msg->_code == 27)) ) _quitIntro = true; @@ -156,7 +155,7 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { qualifier = msg->_qualifier; code = msg->_code; - if (((cls == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & qualifier)) || + if (((cls == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) || ((cls == RAWKEY) && (code == 27))) { _quitIntro = true; diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index c76f3cb357..d0dce93388 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -33,7 +33,6 @@ #include "lab/dispman.h" #include "lab/eventman.h" #include "lab/image.h" -#include "lab/interface.h" #include "lab/labsets.h" #include "lab/music.h" #include "lab/processroom.h" @@ -480,7 +479,7 @@ void LabEngine::processMap(uint16 curRoom) { uint16 mouseX = msg->_mouseX; uint16 mouseY = msg->_mouseY; - if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & qualifier)) || ((msgClass == RAWKEY) && (msgCode == 27))) + if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) || ((msgClass == RAWKEY) && (msgCode == 27))) return; if (msgClass == GADGETUP) { diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 0024adbc80..b68963706f 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -34,7 +34,6 @@ #include "lab/dispman.h" #include "lab/eventman.h" #include "lab/image.h" -#include "lab/interface.h" #include "lab/labsets.h" #include "lab/music.h" #include "lab/processroom.h" @@ -271,7 +270,7 @@ void LabEngine::processJournal() { uint16 qualifier = msg->_qualifier; uint16 gadID = msg->_code; - if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & qualifier)) || + if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) || ((msgClass == RAWKEY) && (gadID == 27))) return; else if (msgClass == GADGETUP) { @@ -436,7 +435,7 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera uint16 mouseY = msg->_mouseY; uint16 code = msg->_code; - if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & qualifier)) || + if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) || ((msgClass == RAWKEY) && (code == 27))) return; |