Ticket #9061: cruise-diff.patch
File cruise-diff.patch, 3.1 KB (added by , 15 years ago) |
---|
-
engines/cruise/cruise_main.cpp
1390 1390 } 1391 1391 1392 1392 // Player Menu - test for both buttons or the F10 key 1393 if (((button & MB_BOTH) ==MB_BOTH) || (keyboardCode == Common::KEYCODE_F10)) {1393 if (((button & CRS_MB_BOTH) == CRS_MB_BOTH) || (keyboardCode == Common::KEYCODE_F10)) { 1394 1394 changeCursor(CURSOR_NORMAL); 1395 1395 keyboardCode = Common::KEYCODE_INVALID; 1396 1396 return (playerMenu(mouseX, mouseY)); … … 1398 1398 1399 1399 if (userWait) { 1400 1400 // Check for left mouse button click or Space to end user waiting 1401 if ((keyboardCode == Common::KEYCODE_SPACE) || (button == MB_LEFT))1401 if ((keyboardCode == Common::KEYCODE_SPACE) || (button == CRS_MB_LEFT)) 1402 1402 userWait = 0; 1403 1403 1404 1404 keyboardCode = Common::KEYCODE_INVALID; … … 1450 1450 menuDown = 0; 1451 1451 } 1452 1452 } else { 1453 if ((button & MB_LEFT) && (buttonDown == 0)) {1453 if ((button & CRS_MB_LEFT) && (buttonDown == 0)) { 1454 1454 if (menuTable[0]) { 1455 1455 callRelation(getSelectedEntryInMenu(menuTable[0]), dialogueObj); 1456 1456 … … 1472 1472 } 1473 1473 } 1474 1474 1475 } else if ((button & MB_LEFT) && (buttonDown == 0)) {1475 } else if ((button & CRS_MB_LEFT) && (buttonDown == 0)) { 1476 1476 // left click 1477 1477 buttonDown = 1; 1478 1478 … … 1587 1587 } 1588 1588 } 1589 1589 } 1590 } else if ((button & MB_RIGHT) || (keyboardCode == Common::KEYCODE_F9)) {1590 } else if ((button & CRS_MB_RIGHT) || (keyboardCode == Common::KEYCODE_F9)) { 1591 1591 if (buttonDown == 0) { 1592 1592 keyboardCode = Common::KEYCODE_INVALID; 1593 1593 … … 1633 1633 1634 1634 switch (event.type) { 1635 1635 case Common::EVENT_LBUTTONDOWN: 1636 currentMouseButton |= MB_LEFT;1636 currentMouseButton |= CRS_MB_LEFT; 1637 1637 break; 1638 1638 case Common::EVENT_LBUTTONUP: 1639 currentMouseButton &= ~ MB_LEFT;1639 currentMouseButton &= ~CRS_MB_LEFT; 1640 1640 break; 1641 1641 case Common::EVENT_RBUTTONDOWN: 1642 currentMouseButton |= MB_RIGHT;1642 currentMouseButton |= CRS_MB_RIGHT; 1643 1643 break; 1644 1644 case Common::EVENT_RBUTTONUP: 1645 currentMouseButton &= ~ MB_RIGHT;1645 currentMouseButton &= ~CRS_MB_RIGHT; 1646 1646 break; 1647 1647 case Common::EVENT_MOUSEMOVE: 1648 1648 currentMouseX = event.mouse.x; … … 1656 1656 case Common::EVENT_KEYUP: 1657 1657 switch (event.kbd.keycode) { 1658 1658 case Common::KEYCODE_ESCAPE: 1659 currentMouseButton &= ~ MB_MIDDLE;1659 currentMouseButton &= ~CRS_MB_MIDDLE; 1660 1660 break; 1661 1661 default: 1662 1662 break; … … 1665 1665 case Common::EVENT_KEYDOWN: 1666 1666 switch (event.kbd.keycode) { 1667 1667 case Common::KEYCODE_ESCAPE: 1668 currentMouseButton |= MB_MIDDLE;1668 currentMouseButton |= CRS_MB_MIDDLE; 1669 1669 break; 1670 1670 default: 1671 1671 keyboardCode = event.kbd.keycode; -
engines/cruise/cruise_main.h
56 56 namespace Cruise { 57 57 58 58 enum MouseButton { 59 MB_LEFT = 1,60 MB_RIGHT = 2,61 MB_MIDDLE = 4,62 MB_BOTH = MB_LEFT |MB_RIGHT59 CRS_MB_LEFT = 1, 60 CRS_MB_RIGHT = 2, 61 CRS_MB_MIDDLE = 4, 62 CRS_MB_BOTH = CRS_MB_LEFT | CRS_MB_RIGHT 63 63 }; 64 64 65 65 /*#define DUMP_SCRIPT