[Scummvm-cvs-logs] SF.net SVN: scummvm: [23470] scummvm/trunk/engines/sword2/animation.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Jul 20 22:40:15 CEST 2006


Revision: 23470
          http://svn.sourceforge.net/scummvm/?rev=23470&view=rev
Author:   eriktorbjorn
Date:     2006-07-10 02:29:12 -0700 (Mon, 10 Jul 2006)

Log Message:
-----------
Fixed bug #1519817, "ALL: Build failure if libmpeg2 is disabled".

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/animation.cpp

Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp	2006-07-10 08:07:01 UTC (rev 23469)
+++ scummvm/trunk/engines/sword2/animation.cpp	2006-07-10 09:29:12 UTC (rev 23470)
@@ -481,6 +481,8 @@
 
 #endif
 
+#ifdef USE_MPEG2
+
 ///////////////////////////////////////////////////////////////////////////////
 // Movie player for the old MPEG movies
 ///////////////////////////////////////////////////////////////////////////////
@@ -538,7 +540,23 @@
 	return result;
 }
 
-#ifndef BACKEND_8BIT
+AnimationState::AnimationState(Sword2Engine *vm, MoviePlayer *player)
+	: BaseAnimationState(vm->_mixer, vm->_system, 640, 480) {
+	_vm = vm;
+	_player = player;
+}
+
+AnimationState::~AnimationState() {
+}
+
+#ifdef BACKEND_8BIT
+
+void AnimationState::setPalette(byte *pal) {
+	_player->updatePalette(pal, false);
+}
+
+#else
+
 void MoviePlayerMPEG::handleScreenChanged() {
 	_anim->handleScreenChanged();
 }
@@ -559,23 +577,7 @@
 		_anim->drawTextObject(t->textSprite, _textSurface);
 	}
 }
-#endif
 
-AnimationState::AnimationState(Sword2Engine *vm, MoviePlayer *player)
-	: BaseAnimationState(vm->_mixer, vm->_system, 640, 480) {
-	_vm = vm;
-	_player = player;
-}
-
-AnimationState::~AnimationState() {
-}
-
-#ifdef BACKEND_8BIT
-void AnimationState::setPalette(byte *pal) {
-	_player->updatePalette(pal, false);
-}
-#else
-
 void AnimationState::drawTextObject(SpriteInfo *s, byte *src) {
 	int moviePitch = _movieScale * _movieWidth;
 	int textX = _movieScale * s->x;
@@ -625,7 +627,6 @@
 		src += s->w;
 	}
 }
-
 #endif
 
 void AnimationState::clearScreen() {
@@ -670,6 +671,8 @@
 #endif
 }
 
+#endif
+
 ///////////////////////////////////////////////////////////////////////////////
 // Dummy player for subtitled speech only
 ///////////////////////////////////////////////////////////////////////////////






More information about the Scummvm-git-logs mailing list