aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorMax Horn2009-11-09 22:19:21 +0000
committerMax Horn2009-11-09 22:19:21 +0000
commit10b8741c8b995962f3bcc51276b38e01ca398422 (patch)
tree6bf9489e565d24073f3b23cb029fff510cf8f177 /engines/tinsel
parent2bb7476a20fbd78e0dcfeeb77f08fb8bb2df393e (diff)
downloadscummvm-rg350-10b8741c8b995962f3bcc51276b38e01ca398422.tar.gz
scummvm-rg350-10b8741c8b995962f3bcc51276b38e01ca398422.tar.bz2
scummvm-rg350-10b8741c8b995962f3bcc51276b38e01ca398422.zip
TINSEL: Simplifying PolyTinselProcess
svn-id: r45783
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/events.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index a950dea7c2..9c01f15b2a 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -605,25 +605,27 @@ void PolyTinselProcess(CORO_PARAM, const void *param) {
void PolygonEvent(CORO_PARAM, HPOLYGON hPoly, TINSEL_EVENT tEvent, int actor, bool bWait,
int myEscape, bool *result) {
CORO_BEGIN_CONTEXT;
- PTP_INIT to;
PPROCESS pProc;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (result) *result = false;
- _ctx->to.hPoly = -1;
- _ctx->to.event = tEvent;
- _ctx->to.pic = InitInterpretContext(GS_POLYGON,
+ PTP_INIT to;
+
+ if (result)
+ *result = false;
+ to.hPoly = -1;
+ to.event = tEvent;
+ to.pic = InitInterpretContext(GS_POLYGON,
GetPolyScript(hPoly),
tEvent,
hPoly, // Polygon
actor, // Actor
NULL, // No Object
myEscape);
- if (_ctx->to.pic != NULL) {
- _ctx->pProc = g_scheduler->createProcess(PID_TCODE, PolyTinselProcess, &_ctx->to, sizeof(_ctx->to));
- AttachInterpret(_ctx->to.pic, _ctx->pProc);
+ if (to.pic != NULL) {
+ _ctx->pProc = g_scheduler->createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to));
+ AttachInterpret(to.pic, _ctx->pProc);
if (bWait)
CORO_INVOKE_2(WaitInterpret, _ctx->pProc, result);