TINSEL: Start cleanup BMV code

svn-id: r45268
This commit is contained in:
Max Horn 2009-10-20 14:05:35 +00:00
parent 95c572c8b9
commit 5b514a9bd1
4 changed files with 56 additions and 33 deletions

View File

@ -201,8 +201,6 @@ static int movieTick;
static int startTick;
static uint32 nextMovieTime = 0;
static int nowTick;
static uint16 Au_Prev1 = 0;
static uint16 Au_Prev2 = 0;
static byte *ScreenBeg;
@ -497,7 +495,7 @@ static void MovieAudio(int audioOffset, int blobs) {
|-------------------------------------------------------|
\*-----------------------------------------------------*/
void FettleMovieText(void) {
static void FettleMovieText(void) {
int i;
bIsText = false;
@ -519,7 +517,7 @@ void FettleMovieText(void) {
|-------------------------------------------------------|
\*-----------------------------------------------------*/
void BmvDrawText(bool bDraw) {
static void BmvDrawText(bool bDraw) {
int w, h, x, y;
for (int i = 0; i < 2; i++) {
@ -555,7 +553,7 @@ void BmvDrawText(bool bDraw) {
|-------------------------------------------------------|
\*-----------------------------------------------------*/
void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration) {
static void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration) {
SCNHANDLE hFont;
int index;
@ -1253,19 +1251,4 @@ void AbortMovie(void) {
bAbort = true;
}
void SlowMovieDown(void) {
bigProblemCount = 0;
if (currentFrame < (nowTick-startTick)/2 && bMovieOn) {
startTick = nowTick - 2*currentFrame;
} else
startTick += 2;
}
void SpeedMovieUp(void) {
if (!bigProblemCount) {
startTick -= 2;
}
}
} // End of namespace Tinsel

51
engines/tinsel/bmv.h Normal file
View File

@ -0,0 +1,51 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
* Plays films within a scene, takes into account the actor in each 'column'.
*/
#ifndef TINSEL_BMV_H
#define TINSEL_BMV_H
#include "tinsel/coroutine.h"
namespace Tinsel {
void PlayBMV(CORO_PARAM, SCNHANDLE hFileStem, int myEscape);
void FinishBMV();
void CopyMovieToScreen(void);
void FettleBMV(void);
bool MoviePlaying(void);
int32 MovieAudioLag(void);
uint32 NextMovieTime(void);
void AbortMovie(void);
} // End of namespace Tinsel
#endif

View File

@ -33,6 +33,7 @@
#include "tinsel/actors.h"
#include "tinsel/background.h"
#include "tinsel/bmv.h"
#include "tinsel/config.h"
#include "tinsel/coroutine.h"
#include "tinsel/cursor.h"
@ -90,11 +91,6 @@ int clRunMode = 0;
// in BG.CPP
extern void ChangePalette(SCNHANDLE hPal);
// in BMV.CPP
void PlayBMV(CORO_PARAM, SCNHANDLE hFileStem, int myEscape);
bool MoviePlaying(void);
void AbortMovie(void);
// in PDISPLAY.CPP
extern void EnableTags(void);
extern void DisableTags(void);

View File

@ -45,6 +45,7 @@
#include "tinsel/actors.h"
#include "tinsel/background.h"
#include "tinsel/bmv.h"
#include "tinsel/config.h"
#include "tinsel/cursor.h"
#include "tinsel/drives.h"
@ -76,14 +77,6 @@ namespace Tinsel {
extern void SetDoFadeIn(bool tf);
extern void DropBackground(void);
// In BMV.CPP
extern void FettleBMV(void);
extern bool MoviePlaying(void);
extern void CopyMovieToScreen(void);
extern void FinishBMV();
extern int32 MovieAudioLag();
extern uint32 NextMovieTime();
// In CURSOR.CPP
extern void CursorProcess(CORO_PARAM, const void *);