aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tinsel/dialogs.cpp11
-rw-r--r--engines/tinsel/events.cpp2
-rw-r--r--engines/tinsel/pdisplay.cpp34
-rw-r--r--engines/tinsel/pdisplay.h3
4 files changed, 20 insertions, 30 deletions
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 3f2cbd9545..5374bfedfb 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -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 @@ extern int volMaster;
#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 @@ void PopUpInventory(int invno) {
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)
diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index c66c127413..a950dea7c2 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -626,7 +626,7 @@ void PolygonEvent(CORO_PARAM, HPOLYGON hPoly, TINSEL_EVENT tEvent, int actor, bo
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;
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;
}
/**
diff --git a/engines/tinsel/pdisplay.h b/engines/tinsel/pdisplay.h
index f720da639d..4e19f1a78a 100644
--- a/engines/tinsel/pdisplay.h
+++ b/engines/tinsel/pdisplay.h
@@ -32,6 +32,9 @@ namespace Tinsel {
void EnableTags();
void DisableTags();
+void DisablePointing();
+void EnablePointing();
+
} // End of namespace Tinsel
#endif /* TINSEL_PDISPLAY_H */