Add mouse state VAR for HE 72+ games.

svn-id: r17631
This commit is contained in:
Travis Howell 2005-04-16 14:59:15 +00:00
parent 40c45f5408
commit ee62127ace
4 changed files with 9 additions and 0 deletions

View File

@ -1052,6 +1052,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
VAR_NUM_SPRITES = 0xFF;
VAR_NUM_PALETTES = 0xFF;
VAR_NUM_UNK = 0xFF;
VAR_MOUSE_STATE = 0xFF;
VAR_POLYGONS_ONLY = 0xFF;
VAR_WINDOWS_VERSION = 0xFF;
VAR_KEY_STATE = 0xFF;

View File

@ -1354,6 +1354,7 @@ public:
byte VAR_NUM_SPRITES;
byte VAR_NUM_PALETTES;
byte VAR_NUM_UNK;
byte VAR_MOUSE_STATE;
byte VAR_POLYGONS_ONLY;
byte VAR_WINDOWS_VERSION;
byte VAR_KEY_STATE;

View File

@ -261,6 +261,7 @@ void ScummEngine_v72he::setupScummVars() {
VAR_NUM_IMAGES = 72;
VAR_NUM_CHARSETS = 73;
VAR_NUM_GLOBAL_OBJS = 74;
VAR_MOUSE_STATE = 75;
VAR_POLYGONS_ONLY = 76;
if (_heversion >= 80)

View File

@ -353,9 +353,15 @@ void ScummEngine::checkExecVerbs() {
int i, over;
VerbSlot *vs;
if (VAR_MOUSE_STATE != 0xFF)
VAR(VAR_MOUSE_STATE) = 0;
if (_userPut <= 0 || _mouseButStat == 0)
return;
if (VAR_MOUSE_STATE != 0xFF)
VAR(VAR_MOUSE_STATE) = _mouseButStat;
if (_mouseButStat < MBS_MAX_KEY) {
/* Check keypresses */
vs = &_verbs[1];