[Scummvm-cvs-logs] SF.net SVN: scummvm:[45782] scummvm/trunk/engines/tinsel
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Nov 9 23:18:25 CET 2009
Revision: 45782
http://scummvm.svn.sourceforge.net/scummvm/?rev=45782&view=rev
Author: fingolfin
Date: 2009-11-09 22:18:25 +0000 (Mon, 09 Nov 2009)
Log Message:
-----------
TINSEL: Add EnablePointing() & DisablePointing() to pdisplay.h; turn DisablePointing from a coroutine into a plain function
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/dialogs.cpp
scummvm/trunk/engines/tinsel/events.cpp
scummvm/trunk/engines/tinsel/pdisplay.cpp
scummvm/trunk/engines/tinsel/pdisplay.h
Modified: scummvm/trunk/engines/tinsel/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/dialogs.cpp 2009-11-09 21:34:01 UTC (rev 45781)
+++ scummvm/trunk/engines/tinsel/dialogs.cpp 2009-11-09 22:18:25 UTC (rev 45782)
@@ -46,6 +46,7 @@
#include "tinsel/music.h"
#include "tinsel/palette.h"
#include "tinsel/pcode.h"
+#include "tinsel/pdisplay.h"
#include "tinsel/pid.h"
#include "tinsel/polygons.h"
#include "tinsel/savescn.h"
@@ -74,14 +75,6 @@
#endif
-//----------------- EXTERNAL FUNCTIONS ---------------------
-
-// Tag functions in PDISPLAY.C
-extern void EnableTags();
-extern void DisableTags();
-extern void DisablePointing(CORO_PARAM);
-extern void EnablePointing();
-
//----------------- LOCAL DEFINES --------------------
#define HOPPER_FILENAME "hopper"
@@ -3825,7 +3818,7 @@
DisableTags(); // Tags disabled during inventory
if (TinselV2)
- DisablePointing(nullContext); // Pointing disabled during inventory
+ DisablePointing(); // Pointing disabled during inventory
if (invno == INV_CONV) { // Conversation window?
if (TinselV2)
Modified: scummvm/trunk/engines/tinsel/events.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/events.cpp 2009-11-09 21:34:01 UTC (rev 45781)
+++ scummvm/trunk/engines/tinsel/events.cpp 2009-11-09 22:18:25 UTC (rev 45782)
@@ -626,7 +626,7 @@
AttachInterpret(_ctx->to.pic, _ctx->pProc);
if (bWait)
- CORO_INVOKE_2(WaitInterpret,_ctx->pProc, result);
+ CORO_INVOKE_2(WaitInterpret, _ctx->pProc, result);
}
CORO_END_CODE;
Modified: scummvm/trunk/engines/tinsel/pdisplay.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/pdisplay.cpp 2009-11-09 21:34:01 UTC (rev 45781)
+++ scummvm/trunk/engines/tinsel/pdisplay.cpp 2009-11-09 22:18:25 UTC (rev 45782)
@@ -252,37 +252,31 @@
/**
* While inventory/menu is open.
*/
-void DisablePointing(CORO_PARAM) {
- CORO_BEGIN_CONTEXT;
- int i;
- HPOLYGON hPoly; // Polygon handle
- CORO_END_CONTEXT(_ctx);
+void DisablePointing() {
+ int i;
+ HPOLYGON hPoly; // Polygon handle
- CORO_BEGIN_CODE(_ctx);
-
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;
}
/**
Modified: scummvm/trunk/engines/tinsel/pdisplay.h
===================================================================
--- scummvm/trunk/engines/tinsel/pdisplay.h 2009-11-09 21:34:01 UTC (rev 45781)
+++ scummvm/trunk/engines/tinsel/pdisplay.h 2009-11-09 22:18:25 UTC (rev 45782)
@@ -32,6 +32,9 @@
void EnableTags();
void DisableTags();
+void DisablePointing();
+void EnablePointing();
+
} // End of namespace Tinsel
#endif /* TINSEL_PDISPLAY_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list