diff options
author | md5 | 2011-04-10 14:26:24 +0300 |
---|---|---|
committer | md5 | 2011-04-10 17:27:48 +0300 |
commit | cd085b1ae889dfa12d1b525810b218342c61a7a6 (patch) | |
tree | e93e142077f56e97842568d60d5272b9dcb70b73 /engines/tinsel | |
parent | c89f2276d1b52a99f08861c5acd86fedb349c718 (diff) | |
download | scummvm-rg350-cd085b1ae889dfa12d1b525810b218342c61a7a6.tar.gz scummvm-rg350-cd085b1ae889dfa12d1b525810b218342c61a7a6.tar.bz2 scummvm-rg350-cd085b1ae889dfa12d1b525810b218342c61a7a6.zip |
TINSEL: Removed some unused global static variables
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/handle.cpp | 8 | ||||
-rw-r--r-- | engines/tinsel/music.cpp | 6 | ||||
-rw-r--r-- | engines/tinsel/scene.cpp | 18 |
3 files changed, 3 insertions, 29 deletions
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index a48fd2ca1f..f2db42bede 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -65,8 +65,6 @@ enum { fLoaded = 0x20000000L ///< set when file data has been loaded }; #define FSIZE_MASK 0x00FFFFFFL ///< mask to isolate the filesize -#define MALLOC_MASK 0xFF000000L ///< mask to isolate the memory allocation flags -//#define HANDLEMASK 0xFF800000L ///< get handle of address //----------------- LOCAL GLOBAL DATA -------------------- @@ -80,7 +78,6 @@ static uint numHandles = 0; static uint32 cdPlayHandle = (uint32)-1; -static int cdPlayFileNum, cdPlaySceneNum; static SCNHANDLE cdBaseHandle = 0, cdTopHandle = 0; static Common::File *cdGraphStream = 0; @@ -235,7 +232,7 @@ void LoadCDGraphData(MEMHANDLE *pH) { // clear the loading flag // pH->filesize &= ~fLoading; - if (bytes != ((cdTopHandle-cdBaseHandle) & OFFSETMASK)) + if (bytes != ((cdTopHandle - cdBaseHandle) & OFFSETMASK)) // file is corrupt error(FILE_READ_ERROR, "CD play file"); } @@ -248,7 +245,7 @@ void LoadCDGraphData(MEMHANDLE *pH) { * @param next Handle of end of range + 1 */ void LoadExtraGraphData(SCNHANDLE start, SCNHANDLE next) { - if (cdPlayFileNum == cdPlaySceneNum && start == cdBaseHandle) + if (start == cdBaseHandle) return; OpenCDGraphFile(); @@ -264,7 +261,6 @@ void LoadExtraGraphData(SCNHANDLE start, SCNHANDLE next) { } void SetCdPlaySceneDetails(int fileNum, const char *fileName) { - cdPlaySceneNum = fileNum; strcpy(szCdPlayFile, fileName); } diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index ea5d88ce1c..dd5ca27772 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -65,10 +65,6 @@ struct SOUND_BUFFER { // FIXME: Avoid non-const global vars -// get set when music driver is installed -//static MDI_DRIVER *mDriver; -//static HSEQUENCE mSeqHandle; - // MIDI buffer static SOUND_BUFFER midiBuffer = { 0, 0 }; @@ -152,8 +148,6 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { // the index and length of the last tune loaded static uint32 dwLastMidiIndex = 0; // FIXME: Avoid non-const global vars - //static uint32 dwLastSeqLen; - uint32 dwSeqLen = 0; // length of the sequence // Support for external music from the music enhancement project diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index 8f0f4771e3..67e0ea9ffd 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -112,15 +112,11 @@ struct ENTRANCE_STRUC { static bool ShowPosition = false; // Set when showpos() has been called #endif -SCNHANDLE newestScene = 0; - int sceneCtr = 0; static int initialMyEscape; static SCNHANDLE SceneHandle = 0; // Current scene handle - stored in case of Save_Scene() -static bool bWatchingOut = false; - SCENE_STRUC tempStruc; struct TP_INIT { @@ -180,9 +176,6 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) { _ctx->myEscape); CORO_INVOKE_1(Interpret, _ctx->pic); - if (_ctx->pInit->event == CLOSEDOWN || _ctx->pInit->event == LEAVE_T2) - bWatchingOut = false; - CORO_END_CODE; } @@ -193,9 +186,6 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) { void SendSceneTinselProcess(TINSEL_EVENT event) { SCENE_STRUC *ss; - if (event == CLOSEDOWN || event == LEAVE_T2) - bWatchingOut = true; - if (SceneHandle != (SCNHANDLE)NULL) { ss = (SCENE_STRUC *) FindChunk(SceneHandle, CHUNK_SCENE); @@ -206,11 +196,8 @@ void SendSceneTinselProcess(TINSEL_EVENT event) { init.hTinselCode = ss->hSceneScript; g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); - } else if (event == CLOSEDOWN) - bWatchingOut = false; + } } - else if (event == CLOSEDOWN) - bWatchingOut = false; } @@ -249,9 +236,6 @@ static void LoadScene(SCNHANDLE scene, int entry) { assert(ss != NULL); if (TinselV2) { - // Handle to scene description - newestScene = FROM_LE_32(ss->hSceneDesc); - // Music stuff char *cptr = (char *)FindChunk(scene, CHUNK_MUSIC_FILENAME); assert(cptr); |