2003-05-05 13:19:59 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2005-01-01 16:09:25 +00:00
|
|
|
* Copyright (C) 2003-2005 The ScummVM project
|
2003-05-05 13:19:59 +00:00
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2003-05-14 21:25:03 +00:00
|
|
|
#ifndef SKYMOUSE_H
|
|
|
|
#define SKYMOUSE_H
|
2003-05-05 13:19:59 +00:00
|
|
|
|
|
|
|
#include "stdafx.h"
|
2003-10-05 20:21:20 +00:00
|
|
|
#include "common/scummsys.h"
|
2003-05-05 13:19:59 +00:00
|
|
|
|
2003-10-05 20:21:20 +00:00
|
|
|
class OSystem;
|
2004-01-03 01:58:58 +00:00
|
|
|
|
|
|
|
namespace Sky {
|
|
|
|
|
2004-01-03 15:57:57 +00:00
|
|
|
class Disk;
|
|
|
|
class Logic;
|
2004-12-15 06:48:08 +00:00
|
|
|
class SkyCompact;
|
2003-06-04 17:13:24 +00:00
|
|
|
|
2004-01-03 15:57:57 +00:00
|
|
|
class Mouse {
|
2003-05-05 13:19:59 +00:00
|
|
|
|
|
|
|
public:
|
2003-05-31 11:53:28 +00:00
|
|
|
|
2004-12-15 06:48:08 +00:00
|
|
|
Mouse(OSystem *system, Disk *skyDisk, SkyCompact *skyCompact);
|
2004-01-03 15:57:57 +00:00
|
|
|
~Mouse(void);
|
2003-05-05 13:19:59 +00:00
|
|
|
|
2003-06-05 18:54:26 +00:00
|
|
|
void mouseEngine(uint16 mouseX, uint16 mouseY);
|
2003-05-05 13:19:59 +00:00
|
|
|
void replaceMouseCursors(uint16 fileNo);
|
2003-06-04 17:13:24 +00:00
|
|
|
bool fnAddHuman(void);
|
2003-06-05 18:54:26 +00:00
|
|
|
void fnSaveCoods(void);
|
2003-07-10 08:24:16 +00:00
|
|
|
void fnOpenCloseHand(bool open);
|
|
|
|
uint16 findMouseCursor(uint32 itemNum);
|
2003-05-05 13:19:59 +00:00
|
|
|
void lockMouse(void);
|
|
|
|
void unlockMouse(void);
|
|
|
|
void restoreMouseData(uint16 frameNum);
|
|
|
|
void drawNewMouse(void);
|
2003-06-05 18:54:26 +00:00
|
|
|
void spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY);
|
2004-01-03 15:57:57 +00:00
|
|
|
void useLogicInstance(Logic *skyLogic) { _skyLogic = skyLogic; };
|
2003-06-09 18:58:37 +00:00
|
|
|
void buttonPressed(uint8 button);
|
2003-06-09 18:15:02 +00:00
|
|
|
void waitMouseNotPressed(void);
|
2003-07-12 01:12:00 +00:00
|
|
|
uint16 giveMouseX(void) { return _mouseX; };
|
|
|
|
uint16 giveMouseY(void) { return _mouseY; };
|
|
|
|
uint16 giveCurrentMouseType(void) { return _currentCursor; };
|
2003-08-04 01:16:11 +00:00
|
|
|
bool wasClicked(void);
|
2003-07-12 02:07:37 +00:00
|
|
|
void logicClick(void) { _logicClick = true; };
|
2004-09-13 17:05:23 +00:00
|
|
|
void resetCursor();
|
|
|
|
|
2003-05-05 13:19:59 +00:00
|
|
|
protected:
|
2003-05-31 11:53:28 +00:00
|
|
|
|
2003-07-12 01:12:00 +00:00
|
|
|
void pointerEngine(uint16 xPos, uint16 yPos);
|
2003-06-04 17:13:24 +00:00
|
|
|
void buttonEngine1(void);
|
2003-05-05 13:19:59 +00:00
|
|
|
|
2003-07-12 01:12:00 +00:00
|
|
|
bool _logicClick;
|
|
|
|
|
|
|
|
uint16 _mouseB; //mouse button
|
|
|
|
uint16 _mouseX; //actual mouse coordinates
|
|
|
|
uint16 _mouseY;
|
2003-05-05 13:19:59 +00:00
|
|
|
|
2003-07-12 01:12:00 +00:00
|
|
|
uint16 _currentCursor;
|
2003-05-05 13:19:59 +00:00
|
|
|
|
|
|
|
byte *_miceData; //address of mouse sprites
|
|
|
|
byte *_objectMouseData; //address of object mouse sprites
|
2003-05-31 11:53:28 +00:00
|
|
|
|
2003-07-10 08:24:16 +00:00
|
|
|
static uint32 _mouseMainObjects[24];
|
|
|
|
static uint32 _mouseLincObjects[21];
|
2003-05-05 13:19:59 +00:00
|
|
|
|
2003-06-01 12:49:39 +00:00
|
|
|
OSystem *_system;
|
2004-01-03 15:57:57 +00:00
|
|
|
Disk *_skyDisk;
|
|
|
|
Logic *_skyLogic;
|
2004-12-15 06:48:08 +00:00
|
|
|
SkyCompact *_skyCompact;
|
2003-05-05 13:19:59 +00:00
|
|
|
};
|
|
|
|
|
2004-01-03 01:58:58 +00:00
|
|
|
} // End of namespace Sky
|
|
|
|
|
2003-05-14 21:25:03 +00:00
|
|
|
#endif //SKYMOUSE_H
|