TINSEL: Revert commit 43ca9c86ab to fix bug #3303799

Commit 43ca9c86ab causes segfaults when trying to start a game in tinsel.

However, the code in question still should be investigated, as it
casts OBJECT** pointers to OBJECT*. Very fishy.
This commit is contained in:
Max Horn 2011-05-18 13:43:52 +02:00
parent 904739cc00
commit d85700bb94

View File

@ -162,7 +162,7 @@ OBJECT *GetPlayfieldList(int which) {
pPlayfield = pCurBgnd->fieldArray + which;
// return the display list pointer for this playfield
return pPlayfield->pDispList;
return (OBJECT *)&pPlayfield->pDispList;
}
/**
@ -202,10 +202,10 @@ void DrawBackgnd() {
pPlay->bMoved = true;
// sort the display list for this background - just in case somebody has changed object Z positions
SortObjectList(pPlay->pDispList);
SortObjectList((OBJECT *)&pPlay->pDispList);
// generate clipping rects for all objects that have moved etc.
FindMovingObjects(pPlay->pDispList, &ptWin,
FindMovingObjects((OBJECT *)&pPlay->pDispList, &ptWin,
&pPlay->rcClip, false, pPlay->bMoved);
// clear playfield moved flag
@ -232,7 +232,7 @@ void DrawBackgnd() {
if (IntersectRectangle(rcPlayClip, pPlay->rcClip, *r))
// redraw all objects within this clipping rect
UpdateClipRect(pPlay->pDispList,
UpdateClipRect((OBJECT *)&pPlay->pDispList,
&ptWin, &rcPlayClip);
}
}