Skip to content

Commit

Permalink
TONY: Animate mouse cursors.
Browse files Browse the repository at this point in the history
This restores the forgotten doFrame code for RMPointer, which fixes
the bird mouse cursor. Thanks to eriktorbjorn for noticing it.
  • Loading branch information
fuzzie committed Aug 25, 2012
1 parent aa603bc commit af134e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion engines/tony/game.cpp
Expand Up @@ -1587,13 +1587,22 @@ void RMPointer::hideCursor() {
}
}

void RMPointer::doFrame() {
// Update the cursor animation if needed.
if (_nCurSpecialPointer == 0 || _nCurSpecialPointer == PTR_CUSTOM)
return;

RMGfxTargetBuffer buf;
if (_specialPointer[_nCurSpecialPointer - 1]->doFrame(&buf, false))
updateCursor();
}

void RMPointer::updateCursor() {
// Create an intermediate buffer and draw the cursor onto it
RMGfxTargetBuffer buf;
buf.create(64, 64, 16);
RMGfxPrimitive prim;

draw(Common::nullContext, buf, &prim);

// Get a pointer to the cursor data
Expand Down
2 changes: 1 addition & 1 deletion engines/tony/game.h
Expand Up @@ -98,7 +98,7 @@ class RMPointer {
/**
* Process a frame
*/
void doFrame(RMGfxTargetBuffer *bigBuf);
void doFrame();

/**
* Overloading of priorities
Expand Down
1 change: 1 addition & 0 deletions engines/tony/gfxengine.cpp
Expand Up @@ -310,6 +310,7 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
} else {
_point.hideCursor();
}
_point.doFrame();

// **********************
// Draw the list in the OT
Expand Down

0 comments on commit af134e0

Please sign in to comment.