diff options
author | Max Horn | 2009-11-09 22:18:25 +0000 |
---|---|---|
committer | Max Horn | 2009-11-09 22:18:25 +0000 |
commit | 2bb7476a20fbd78e0dcfeeb77f08fb8bb2df393e (patch) | |
tree | dd845918b6a17cdfa607d833e978831bfee9b30f /engines/tinsel/pdisplay.cpp | |
parent | 69b4d020fe7947d45f0f403477477f0f196eb447 (diff) | |
download | scummvm-rg350-2bb7476a20fbd78e0dcfeeb77f08fb8bb2df393e.tar.gz scummvm-rg350-2bb7476a20fbd78e0dcfeeb77f08fb8bb2df393e.tar.bz2 scummvm-rg350-2bb7476a20fbd78e0dcfeeb77f08fb8bb2df393e.zip |
TINSEL: Add EnablePointing() & DisablePointing() to pdisplay.h; turn DisablePointing from a coroutine into a plain function
svn-id: r45782
Diffstat (limited to 'engines/tinsel/pdisplay.cpp')
-rw-r--r-- | engines/tinsel/pdisplay.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp index 7a092f25f7..e05a6f6a9a 100644 --- a/engines/tinsel/pdisplay.cpp +++ b/engines/tinsel/pdisplay.cpp @@ -252,37 +252,31 @@ void CursorPositionProcess(CORO_PARAM, const void *) { /** * While inventory/menu is open. */ -void DisablePointing(CORO_PARAM) { - CORO_BEGIN_CONTEXT; - int i; - HPOLYGON hPoly; // Polygon handle - CORO_END_CONTEXT(_ctx); - - CORO_BEGIN_CODE(_ctx); +void DisablePointing() { + int i; + HPOLYGON hPoly; // Polygon handle bPointingActive = false; - for (_ctx->i = 0; _ctx->i < MAX_POLY; _ctx->i++) { - _ctx->hPoly = GetPolyHandle(_ctx->i); + for (i = 0; i < MAX_POLY; i++) { + hPoly = GetPolyHandle(i); - if (_ctx->hPoly != NOPOLY && PolyType(_ctx->hPoly) == TAG && PolyIsPointedTo(_ctx->hPoly)) { - SetPolyPointedTo(_ctx->hPoly, false); - SetPolyTagWanted(_ctx->hPoly, false, false, 0); - CORO_INVOKE_ARGS(PolygonEvent, (CORO_SUBCTX, _ctx->hPoly, UNPOINT, 0, false, 0)); + if (hPoly != NOPOLY && PolyType(hPoly) == TAG && PolyIsPointedTo(hPoly)) { + SetPolyPointedTo(hPoly, false); + SetPolyTagWanted(hPoly, false, false, 0); + PolygonEvent(nullContext, hPoly, UNPOINT, 0, false, 0); } } // For each tagged actor - for (_ctx->i = 0; (_ctx->i = NextTaggedActor(_ctx->i)) != 0; ) { - if (ActorIsPointedTo(_ctx->i)) { - SetActorPointedTo(_ctx->i, false); - SetActorTagWanted(_ctx->i, false, false, 0); + for (i = 0; (i = NextTaggedActor(i)) != 0; ) { + if (ActorIsPointedTo(i)) { + SetActorPointedTo(i, false); + SetActorTagWanted(i, false, false, 0); - CORO_INVOKE_ARGS(ActorEvent, (CORO_SUBCTX, _ctx->i, UNPOINT, false, 0)); + ActorEvent(nullContext, i, UNPOINT, false, 0); } } - - CORO_END_CODE; } /** |