[Scummvm-cvs-logs] SF.net SVN: scummvm:[39598] scummvm/trunk/engines/tinsel
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Mar 21 20:57:54 CET 2009
Revision: 39598
http://scummvm.svn.sourceforge.net/scummvm/?rev=39598&view=rev
Author: thebluegr
Date: 2009-03-21 19:57:54 +0000 (Sat, 21 Mar 2009)
Log Message:
-----------
Converted some leftover tinselV1 code, so that the engine builds when DEBUG is set
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/dialogs.cpp
scummvm/trunk/engines/tinsel/pdisplay.cpp
scummvm/trunk/engines/tinsel/polygons.cpp
Modified: scummvm/trunk/engines/tinsel/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/dialogs.cpp 2009-03-21 19:38:33 UTC (rev 39597)
+++ scummvm/trunk/engines/tinsel/dialogs.cpp 2009-03-21 19:57:54 UTC (rev 39598)
@@ -5566,7 +5566,7 @@
#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
}
Modified: scummvm/trunk/engines/tinsel/pdisplay.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/pdisplay.cpp 2009-03-21 19:38:33 UTC (rev 39597)
+++ scummvm/trunk/engines/tinsel/pdisplay.cpp 2009-03-21 19:57:54 UTC (rev 39598)
@@ -163,7 +163,7 @@
// 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 @@
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 @@
| 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 @@
// 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 @@
}
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
Modified: scummvm/trunk/engines/tinsel/polygons.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/polygons.cpp 2009-03-21 19:38:33 UTC (rev 39597)
+++ scummvm/trunk/engines/tinsel/polygons.cpp 2009-03-21 19:57:54 UTC (rev 39598)
@@ -1412,7 +1412,7 @@
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 @@
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 @@
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());
}
}
}
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