The cursor in IHNM changes to an hourglass now while loading scenes, like in the original interpreter

svn-id: r26768
This commit is contained in:
Filippos Karapetis 2007-05-06 22:18:31 +00:00
parent b9cdca27ee
commit c4c9ff5533
4 changed files with 27 additions and 3 deletions

View File

@ -437,6 +437,12 @@ int Events::handleOneShot(Event *event) {
case kEventHide:
_vm->_gfx->showCursor(false);
break;
case kEventSetNormalCursor:
_vm->_gfx->setCursor(kCursorNormal);
break;
case kEventSetBusyCursor:
_vm->_gfx->setCursor(kCursorBusy);
break;
default:
break;
}

View File

@ -97,6 +97,8 @@ enum EventOps {
// CURSOR events
kEventShow = 1,
// kEventHide = 2, // reused
kEventSetNormalCursor = 3,
kEventSetBusyCursor = 4,
// GRAPHICS events
kEventFillRect = 1,
// kEventSetFlag = 4, // reused

View File

@ -148,9 +148,9 @@ public:
void palToBlack(PalEntry *src_pal, double percent);
void blackToPal(PalEntry *src_pal, double percent);
void showCursor(bool state);
void setCursor(CursorType cursorType = kCursorNormal);
private:
void setCursor(CursorType cursorType = kCursorNormal);
int _init;
Surface _backBuffer;
byte _currentPal[PAL_ENTRIES * 4];

View File

@ -595,6 +595,15 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
Event *q_event;
static PalEntry current_pal[PAL_ENTRIES];
// Change the cursor to an hourglass in IHNM
if (_vm->getGameType() == GType_IHNM) {
event.type = kEvTOneshot;
event.code = kCursorEvent;
event.op = kEventSetBusyCursor;
event.time = 0;
_vm->_events->queue(&event);
}
if ((_vm->getGameType() == GType_IHNM) && (loadSceneParams->chapter != NO_CHAPTER_CHANGE)) {
if (loadSceneParams->loadFlag != kLoadBySceneNumber) {
error("loadScene wrong usage");
@ -874,8 +883,6 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
loadSceneParams->sceneProc(SCENE_BEGIN, this);
}
// We probably don't want "followers" to go into scene -1 , 0. At the very
// least we don't want garbage to be drawn that early in the ITE intro.
if (_sceneNumber > 0 && _sceneNumber != ITE_SCENE_PUZZLE)
@ -892,6 +899,15 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
event.time = 0;
_vm->_events->queue(&event);
}
// Change the cursor back to a crosshair in IHNM
if (_vm->getGameType() == GType_IHNM) {
event.type = kEvTOneshot;
event.code = kCursorEvent;
event.op = kEventSetNormalCursor;
event.time = 0;
_vm->_events->queue(&event);
}
}
void Scene::loadSceneDescriptor(uint32 resourceId) {