From c26a162606a00711ee619eda6f6f94cbbb1d990c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 21 Mar 2009 19:57:54 +0000 Subject: Converted some leftover tinselV1 code, so that the engine builds when DEBUG is set svn-id: r39598 --- engines/tinsel/dialogs.cpp | 2 +- engines/tinsel/pdisplay.cpp | 10 +++++----- engines/tinsel/polygons.cpp | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'engines/tinsel') diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index c9487a62e3..5c1d5eb1bd 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -5566,7 +5566,7 @@ void setInvWinParts(SCNHANDLE hf) { #ifdef DEBUG pfilm = (const FILM *)LockMem(hf); - assert(FROM_LE_32(pfilm->numreels) >= HOPEDFORREELS); // not as many reels as expected + assert(FROM_LE_32(pfilm->numreels) >= (uint32)(TinselV2 ? T2_HOPEDFORREELS : T1_HOPEDFORREELS)); // not as many reels as expected #endif } diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp index 9f0a592be0..e0262839a2 100644 --- a/engines/tinsel/pdisplay.cpp +++ b/engines/tinsel/pdisplay.cpp @@ -163,7 +163,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { // New text objects sprintf(PositionString, "%d %d", aniX + Loffset, aniY + Toffset); - _ctx->cpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->cpText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, 0, CPOSX, POSY, GetTagFontHandle(), TXT_CENTRE); if (DispPath) { HPOLYGON hp = InPolygon(aniX + Loffset, aniY + Toffset, PATH); @@ -175,7 +175,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { PolyCornerX(hp, 1), PolyCornerY(hp, 1), PolyCornerX(hp, 2), PolyCornerY(hp, 2), PolyCornerX(hp, 3), PolyCornerY(hp, 3)); - _ctx->cpathText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->cpathText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, 0, 4, POSY+ 10, GetTagFontHandle(), 0); } @@ -207,7 +207,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { | Lead actor's position. | \*----------------------*/ pActor = GetMover(LEAD_ACTOR); - if (pActor && pActor->MActorState == NORM_MOVER) { + if (pActor && getMActorState(pActor)) { // get lead's animation position GetActorPos(LEAD_ACTOR, &aniX, &aniY); @@ -221,7 +221,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { // create new text object list sprintf(PositionString, "%d %d", aniX, aniY); - _ctx->rpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->rpText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, 0, LPOSX, POSY, GetTagFontHandle(), TXT_CENTRE); // update previous position @@ -240,7 +240,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { } sprintf(PositionString, "String: %d", newestString); - _ctx->spText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->spText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, 0, SPOSX, POSY+10, GetTalkFontHandle(), TXT_CENTRE); // update previous value diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp index 8be174c779..ca337e7921 100644 --- a/engines/tinsel/polygons.cpp +++ b/engines/tinsel/polygons.cpp @@ -1412,7 +1412,7 @@ void CheckNPathIntegrity() { uint8 *pps; // Compiled polygon data const POLYGON *rp; // Run-time polygon structure HPOLYGON hp; - const POLY *cp; // Compiled polygon structure + const Poly *cp; // Compiled polygon structure int i, j; // Loop counters int n; // Last node in current path int32 *nlistx, *nlisty; @@ -1423,11 +1423,11 @@ void CheckNPathIntegrity() { rp = Polys[i]; if (rp && rp->polyType == PATH && rp->subtype == NODE) { //...if it's a node path // Get compiled polygon structure - cp = (const POLY *)pps + rp->pIndex; // This polygon - nlistx = (int32 *)(pps + (int)FROM_LE_32(cp.pnodelistx)); - nlisty = (int32 *)(pps + (int)FROM_LE_32(cp.pnodelisty)); + cp = (const Poly *)pps + rp->pIndex; // This polygon + nlistx = (int32 *)(pps + (int)FROM_LE_32(cp->pnodelistx)); + nlisty = (int32 *)(pps + (int)FROM_LE_32(cp->pnodelisty)); - n = (int)FROM_LE_32(cp.nodecount) - 1; // Last node + n = (int)FROM_LE_32(cp->nodecount) - 1; // Last node assert(n >= 1); // Node paths must have at least 2 nodes hp = PolygonIndex(rp); @@ -1447,12 +1447,12 @@ void CheckNPathIntegrity() { if (IsInPolygon((int)FROM_LE_32(nlistx[0]), (int)FROM_LE_32(nlisty[0]), PolygonIndex(rp->adjpaths[j]))) { sprintf(TextBufferAddr(), "Node (%d, %d) is in another path (starting (%d, %d))", (int)FROM_LE_32(nlistx[0]), (int)FROM_LE_32(nlisty[0]), rp->adjpaths[j]->cx[0], rp->adjpaths[j]->cy[0]); - error(TextBufferAddr()) + error(TextBufferAddr()); } if (IsInPolygon((int)FROM_LE_32(nlistx[n]), (int)FROM_LE_32(nlisty[n]), PolygonIndex(rp->adjpaths[j]))) { sprintf(TextBufferAddr(), "Node (%d, %d) is in another path (starting (%d, %d))", (int)FROM_LE_32(nlistx[n]), (int)FROM_LE_32(nlisty[n]), rp->adjpaths[j]->cx[0], rp->adjpaths[j]->cy[0]); - error(TextBufferAddr()) + error(TextBufferAddr()); } } } -- cgit v1.2.3