diff options
Diffstat (limited to 'engines/tinsel/background.cpp')
-rw-r--r-- | engines/tinsel/background.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp index 91d21b4e0b..94525e33dd 100644 --- a/engines/tinsel/background.cpp +++ b/engines/tinsel/background.cpp @@ -37,6 +37,9 @@ namespace Tinsel { // current background BACKGND *pCurBgnd = NULL; +// FIXME: Not yet used +static bool bEntireRedraw; + /** * Called to initialise a background. * @param pBgnd Pointer to data struct for current background @@ -125,6 +128,27 @@ void PlayfieldGetPos(int which, int *pXpos, int *pYpos) { } /** + * Returns the x position of the centre of the specified playfield + * @param which Which playfield + */ + +int PlayfieldGetCentreX(int which) { + PLAYFIELD *pPlayfield; // pointer to relavent playfield + + // make sure there is a background + assert(pCurBgnd != NULL); + + // make sure the playfield number is in range + assert(which >= 0 && which < pCurBgnd->numPlayfields); + + // get playfield pointer + pPlayfield = pCurBgnd->fieldArray + which; + + // get current integer position + return fracToInt(pPlayfield->fieldX) + SCREEN_WIDTH/2; +} + +/** * Returns the display list for the specified playfield. * @param which Which playfield */ @@ -229,4 +253,9 @@ void DrawBackgnd(void) { ResetClipRect(); } +void ForceEntireRedraw(void) { + bEntireRedraw = true; +} + + } // end of namespace Tinsel |